/* Generated by libdrgn/build-aux/gen_c_keywords_inc_strswitch.py. */
static const char * const keyword_spelling[] = {
	[C_TOKEN_ATOMIC] = "_Atomic",
	[C_TOKEN_BOOL] = "_Bool",
	[C_TOKEN_CHAR] = "char",
	[C_TOKEN_CLASS] = "class",
	[C_TOKEN_CONST] = "const",
	[C_TOKEN_DOUBLE] = "double",
	[C_TOKEN_ENUM] = "enum",
	[C_TOKEN_FLOAT] = "float",
	[C_TOKEN_INT] = "int",
	[C_TOKEN_LONG] = "long",
	[C_TOKEN_RESTRICT] = "restrict",
	[C_TOKEN_SHORT] = "short",
	[C_TOKEN_SIGNED] = "signed",
	[C_TOKEN_STRUCT] = "struct",
	[C_TOKEN_UNION] = "union",
	[C_TOKEN_UNSIGNED] = "unsigned",
	[C_TOKEN_VOID] = "void",
	[C_TOKEN_VOLATILE] = "volatile",
};

static int identifier_token_kind(const char *s, size_t len, bool cpp)
{
	/* Generated by libdrgn/build-aux/gen_strswitch.py. */
	switch (1) {
	default: {
		#define memswitch0_args(ptr, len) \
			const void *memswitch0_ptr = (ptr); \
			const char *memswitch0_str = memswitch0_ptr; \
			size_t memswitch0_len = (len);
		memswitch0_args(
	            s, len
		)
		#undef memswitch0_args
		if (memswitch0_len == 3) {
			if (memcmp(&memswitch0_str[0], "int", sizeof("int") - 1) == 0) {
				memswitch0_case8:
		return C_TOKEN_INT;
				goto memswitch0_case9;
			} else {
				goto memswitch0_default;
			}
		} else if (memswitch0_len == 4) {
			if (memswitch0_str[0] == 'c') {
				if (memcmp(&memswitch0_str[1], "har", sizeof("har") - 1) == 0) {
					memswitch0_case2:
		return C_TOKEN_CHAR;
					goto memswitch0_case3;
				} else {
					goto memswitch0_default;
				}
			} else if (memswitch0_str[0] == 'e') {
				if (memcmp(&memswitch0_str[1], "num", sizeof("num") - 1) == 0) {
					memswitch0_case6:
		return C_TOKEN_ENUM;
					goto memswitch0_case7;
				} else {
					goto memswitch0_default;
				}
			} else if (memswitch0_str[0] == 'l') {
				if (memcmp(&memswitch0_str[1], "ong", sizeof("ong") - 1) == 0) {
					memswitch0_case9:
		return C_TOKEN_LONG;
					goto memswitch0_case10;
				} else {
					goto memswitch0_default;
				}
			} else if (memswitch0_str[0] == 'v') {
				if (memcmp(&memswitch0_str[1], "oid", sizeof("oid") - 1) == 0) {
					memswitch0_case16:
		return C_TOKEN_VOID;
					goto memswitch0_case17;
				} else {
					goto memswitch0_default;
				}
			} else {
				goto memswitch0_default;
			}
		} else if (memswitch0_len == 5) {
			if (memswitch0_str[0] == '_') {
				if (memcmp(&memswitch0_str[1], "Bool", sizeof("Bool") - 1) == 0) {
					memswitch0_case1:
		return C_TOKEN_BOOL;
					goto memswitch0_case2;
				} else {
					goto memswitch0_default;
				}
			} else if (memswitch0_str[0] == 'c') {
				if (memswitch0_str[1] == 'l') {
					if (memcmp(&memswitch0_str[2], "ass", sizeof("ass") - 1) == 0) {
						memswitch0_case3:
		return cpp ? C_TOKEN_CLASS : C_TOKEN_IDENTIFIER;
						goto memswitch0_case4;
					} else {
						goto memswitch0_default;
					}
				} else if (memswitch0_str[1] == 'o') {
					if (memcmp(&memswitch0_str[2], "nst", sizeof("nst") - 1) == 0) {
						memswitch0_case4:
		return C_TOKEN_CONST;
						goto memswitch0_case5;
					} else {
						goto memswitch0_default;
					}
				} else {
					goto memswitch0_default;
				}
			} else if (memswitch0_str[0] == 'f') {
				if (memcmp(&memswitch0_str[1], "loat", sizeof("loat") - 1) == 0) {
					memswitch0_case7:
		return C_TOKEN_FLOAT;
					goto memswitch0_case8;
				} else {
					goto memswitch0_default;
				}
			} else if (memswitch0_str[0] == 's') {
				if (memcmp(&memswitch0_str[1], "hort", sizeof("hort") - 1) == 0) {
					memswitch0_case11:
		return C_TOKEN_SHORT;
					goto memswitch0_case12;
				} else {
					goto memswitch0_default;
				}
			} else if (memswitch0_str[0] == 'u') {
				if (memcmp(&memswitch0_str[1], "nion", sizeof("nion") - 1) == 0) {
					memswitch0_case14:
		return C_TOKEN_UNION;
					goto memswitch0_case15;
				} else {
					goto memswitch0_default;
				}
			} else {
				goto memswitch0_default;
			}
		} else if (memswitch0_len == 6) {
			if (memswitch0_str[0] == 'd') {
				if (memcmp(&memswitch0_str[1], "ouble", sizeof("ouble") - 1) == 0) {
					memswitch0_case5:
		return C_TOKEN_DOUBLE;
					goto memswitch0_case6;
				} else {
					goto memswitch0_default;
				}
			} else if (memswitch0_str[0] == 's') {
				if (memswitch0_str[1] == 'i') {
					if (memcmp(&memswitch0_str[2], "gned", sizeof("gned") - 1) == 0) {
						memswitch0_case12:
		return C_TOKEN_SIGNED;
						goto memswitch0_case13;
					} else {
						goto memswitch0_default;
					}
				} else if (memswitch0_str[1] == 't') {
					if (memcmp(&memswitch0_str[2], "ruct", sizeof("ruct") - 1) == 0) {
						memswitch0_case13:
		return C_TOKEN_STRUCT;
						goto memswitch0_case14;
					} else {
						goto memswitch0_default;
					}
				} else {
					goto memswitch0_default;
				}
			} else {
				goto memswitch0_default;
			}
		} else if (memswitch0_len == 7) {
			if (memcmp(&memswitch0_str[0], "_Atomic", sizeof("_Atomic") - 1) == 0) {
		return C_TOKEN_ATOMIC;
				goto memswitch0_case1;
			} else {
				goto memswitch0_default;
			}
		} else if (memswitch0_len == 8) {
			if (memswitch0_str[0] == 'r') {
				if (memcmp(&memswitch0_str[1], "estrict", sizeof("estrict") - 1) == 0) {
					memswitch0_case10:
		return C_TOKEN_RESTRICT;
					goto memswitch0_case11;
				} else {
					goto memswitch0_default;
				}
			} else if (memswitch0_str[0] == 'u') {
				if (memcmp(&memswitch0_str[1], "nsigned", sizeof("nsigned") - 1) == 0) {
					memswitch0_case15:
		return C_TOKEN_UNSIGNED;
					goto memswitch0_case16;
				} else {
					goto memswitch0_default;
				}
			} else if (memswitch0_str[0] == 'v') {
				if (memcmp(&memswitch0_str[1], "olatile", sizeof("olatile") - 1) == 0) {
					memswitch0_case17:
		return C_TOKEN_VOLATILE;
					goto memswitch0_default;
				} else {
					goto memswitch0_default;
				}
			} else {
				goto memswitch0_default;
			}
		} else {
			memswitch0_default:
		return C_TOKEN_IDENTIFIER;
		}
	}
	}
}
