/* Automatically generated from ./asm/pptok.dat by ./asm/pptok.pl */
/* Do not edit */

#include "compiler.h"
#include "nctype.h"
#include "nasmlib.h"
#include "hashtbl.h"
#include "preproc.h"

const char * const pp_directives[118] = {
    "%if",
    "%ifctx",
    "%ifdef",
    "%ifdefalias",
    "%ifempty",
    "%ifenv",
    "%ifid",
    "%ifidn",
    "%ifidni",
    "%ifmacro",
    "%ifnum",
    "%ifstr",
    "%iftoken",
    "%ifusable",
    "%ifusing",
    NULL,
    "%ifn",
    "%ifnctx",
    "%ifndef",
    "%ifndefalias",
    "%ifnempty",
    "%ifnenv",
    "%ifnid",
    "%ifnidn",
    "%ifnidni",
    "%ifnmacro",
    "%ifnnum",
    "%ifnstr",
    "%ifntoken",
    "%ifnusable",
    "%ifnusing",
    NULL,
    "%elif",
    "%elifctx",
    "%elifdef",
    "%elifdefalias",
    "%elifempty",
    "%elifenv",
    "%elifid",
    "%elifidn",
    "%elifidni",
    "%elifmacro",
    "%elifnum",
    "%elifstr",
    "%eliftoken",
    "%elifusable",
    "%elifusing",
    NULL,
    "%elifn",
    "%elifnctx",
    "%elifndef",
    "%elifndefalias",
    "%elifnempty",
    "%elifnenv",
    "%elifnid",
    "%elifnidn",
    "%elifnidni",
    "%elifnmacro",
    "%elifnnum",
    "%elifnstr",
    "%elifntoken",
    "%elifnusable",
    "%elifnusing",
    NULL,
    "%aliases",
    "%arg",
    "%clear",
    "%depend",
    "%else",
    "%endif",
    "%endm",
    "%endmacro",
    "%endrep",
    "%error",
    "%exitmacro",
    "%exitrep",
    "%fatal",
    "%include",
    "%line",
    "%local",
    "%null",
    "%pop",
    "%pragma",
    "%push",
    "%rep",
    "%repl",
    "%rotate",
    "%stacksize",
    "%undef",
    "%undefalias",
    "%use",
    "%warning",
    "%assign",
    "%iassign",
    "%defalias",
    "%idefalias",
    "%define",
    "%idefine",
    "%defstr",
    "%idefstr",
    "%deftok",
    "%ideftok",
    "%macro",
    "%imacro",
    "%pathsearch",
    "%ipathsearch",
    "%rmacro",
    "%irmacro",
    "%strcat",
    "%istrcat",
    "%strlen",
    "%istrlen",
    "%substr",
    "%isubstr",
    "%xdefine",
    "%ixdefine",
    "%unmacro",
    "%unimacro",
};
const uint8_t pp_directives_len[118] = {
    3,
    6,
    6,
    11,
    8,
    6,
    5,
    6,
    7,
    8,
    6,
    6,
    8,
    9,
    8,
    11,
    4,
    7,
    7,
    12,
    9,
    7,
    6,
    7,
    8,
    9,
    7,
    7,
    9,
    10,
    9,
    12,
    5,
    8,
    8,
    13,
    10,
    8,
    7,
    8,
    9,
    10,
    8,
    8,
    10,
    11,
    10,
    13,
    6,
    9,
    9,
    14,
    11,
    9,
    8,
    9,
    10,
    11,
    9,
    9,
    11,
    12,
    11,
    14,
    8,
    4,
    6,
    7,
    5,
    6,
    5,
    9,
    7,
    6,
    10,
    8,
    6,
    8,
    5,
    6,
    5,
    4,
    7,
    5,
    4,
    5,
    7,
    10,
    6,
    11,
    4,
    8,
    7,
    8,
    9,
    10,
    7,
    8,
    7,
    8,
    7,
    8,
    6,
    7,
    11,
    12,
    7,
    8,
    7,
    8,
    7,
    8,
    7,
    8,
    8,
    9,
    8,
    9,
};
enum preproc_token pp_token_hash(const char *token)
{
#define UNUSED_HASH_ENTRY (65535/3)
    static const int16_t hash1[128] = {
        UNUSED_HASH_ENTRY,
        0,
        0,
        0,
        0,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        -32,
        0,
        UNUSED_HASH_ENTRY,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        0,
        6,
        UNUSED_HASH_ENTRY,
        -17,
        UNUSED_HASH_ENTRY,
        -39,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        -21,
        UNUSED_HASH_ENTRY,
        0,
        -58,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        0,
        UNUSED_HASH_ENTRY,
        13,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        9,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        -26,
        -28,
        UNUSED_HASH_ENTRY,
        -84,
        124,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        -45,
        106,
        -79,
        4,
        UNUSED_HASH_ENTRY,
        -5,
        0,
        UNUSED_HASH_ENTRY,
        36,
        17,
        UNUSED_HASH_ENTRY,
        0,
        153,
        83,
        UNUSED_HASH_ENTRY,
        80,
        UNUSED_HASH_ENTRY,
        -68,
        26,
        28,
        57,
        32,
        97,
        -52,
        99,
        UNUSED_HASH_ENTRY,
        48,
        0,
        0,
        41,
        86,
        -107,
        -38,
        0,
        -53,
        -48,
        UNUSED_HASH_ENTRY,
        135,
        UNUSED_HASH_ENTRY,
        48,
        UNUSED_HASH_ENTRY,
        0,
        39,
        UNUSED_HASH_ENTRY,
        -84,
        21,
        61,
        UNUSED_HASH_ENTRY,
        18,
        14,
        -64,
        77,
        UNUSED_HASH_ENTRY,
        -17,
        0,
        92,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        74,
        -18,
        UNUSED_HASH_ENTRY,
        30,
        54,
        104,
        12,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        91,
        7,
        UNUSED_HASH_ENTRY,
    };
    static const int16_t hash2[128] = {
        UNUSED_HASH_ENTRY,
        0,
        UNUSED_HASH_ENTRY,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        0,
        31,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        -32,
        120,
        0,
        65,
        UNUSED_HASH_ENTRY,
        0,
        0,
        0,
        78,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        52,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        0,
        97,
        51,
        UNUSED_HASH_ENTRY,
        -55,
        108,
        126,
        0,
        78,
        UNUSED_HASH_ENTRY,
        113,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        0,
        UNUSED_HASH_ENTRY,
        5,
        UNUSED_HASH_ENTRY,
        78,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        115,
        UNUSED_HASH_ENTRY,
        23,
        106,
        58,
        136,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        3,
        94,
        62,
        8,
        90,
        118,
        UNUSED_HASH_ENTRY,
        105,
        27,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        19,
        86,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        16,
        0,
        0,
        81,
        UNUSED_HASH_ENTRY,
        10,
        101,
        UNUSED_HASH_ENTRY,
        52,
        -10,
        139,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        141,
        11,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        111,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        87,
        110,
        113,
        UNUSED_HASH_ENTRY,
        64,
        88,
        0,
        51,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        106,
        -57,
        103,
        159,
        UNUSED_HASH_ENTRY,
        18,
        45,
        -53,
        43,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        72,
        81,
        UNUSED_HASH_ENTRY,
    };
    uint32_t k1, k2;
    uint64_t crc;
    uint16_t ix;

    crc = crc64i(UINT64_C(0xaee7ac5ccabdec91), token);
    k1 = (uint32_t)crc;
    k2 = (uint32_t)(crc >> 32);

    ix = hash1[k1 & 0x7f] + hash2[k2 & 0x7f];
    if (ix >= 118)
        return PP_INVALID;

    if (!pp_directives[ix] || nasm_stricmp(pp_directives[ix], token))
        return PP_INVALID;

    return ix;
}
