/* 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",
    "%pop",
    "%pragma",
    "%push",
    "%rep",
    "%repl",
    "%rotate",
    "%stacksize",
    "%undef",
    "%undefalias",
    "%use",
    "%warning",
    NULL,
    "%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,
    4,
    7,
    5,
    4,
    5,
    7,
    10,
    6,
    11,
    4,
    8,
    9,
    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,
        -31,
        0,
        UNUSED_HASH_ENTRY,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        0,
        6,
        UNUSED_HASH_ENTRY,
        -17,
        UNUSED_HASH_ENTRY,
        -40,
        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,
        -25,
        -27,
        UNUSED_HASH_ENTRY,
        -84,
        124,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        -45,
        106,
        -79,
        4,
        UNUSED_HASH_ENTRY,
        -7,
        0,
        UNUSED_HASH_ENTRY,
        36,
        17,
        UNUSED_HASH_ENTRY,
        0,
        153,
        83,
        UNUSED_HASH_ENTRY,
        78,
        UNUSED_HASH_ENTRY,
        -68,
        26,
        27,
        57,
        32,
        96,
        -52,
        98,
        UNUSED_HASH_ENTRY,
        49,
        0,
        0,
        41,
        85,
        -107,
        -38,
        0,
        -53,
        -49,
        UNUSED_HASH_ENTRY,
        134,
        UNUSED_HASH_ENTRY,
        48,
        UNUSED_HASH_ENTRY,
        0,
        39,
        UNUSED_HASH_ENTRY,
        -85,
        21,
        60,
        UNUSED_HASH_ENTRY,
        17,
        15,
        -63,
        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,
        90,
        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,
        77,
        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,
        50,
        UNUSED_HASH_ENTRY,
        -55,
        108,
        125,
        0,
        78,
        UNUSED_HASH_ENTRY,
        113,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        0,
        UNUSED_HASH_ENTRY,
        6,
        UNUSED_HASH_ENTRY,
        78,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        115,
        UNUSED_HASH_ENTRY,
        23,
        UNUSED_HASH_ENTRY,
        58,
        137,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        3,
        94,
        62,
        8,
        89,
        119,
        UNUSED_HASH_ENTRY,
        105,
        27,
        0,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        19,
        85,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        16,
        0,
        0,
        80,
        UNUSED_HASH_ENTRY,
        10,
        100,
        UNUSED_HASH_ENTRY,
        52,
        -10,
        139,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        140,
        11,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        111,
        UNUSED_HASH_ENTRY,
        UNUSED_HASH_ENTRY,
        86,
        110,
        113,
        UNUSED_HASH_ENTRY,
        63,
        89,
        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;
}
