// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/parse_id.c
// Function: parse_id
token* parse_id(lex_state* state, token* token) {
    if (
        strcmp(token->value, "string") == 0 ||
        strcmp(token->value, "int") == 0 ||
        strcmp(token->value, "struct") == 0 ||
        strcmp(token->value, "void") == 0 ||
        strcmp(token->value, "float") == 0 ||
        strcmp(token->value, "char") == 0 ||
        strcmp(token->value, "vector") == 0
    ) {
        token->type = _DATA_TYPE;
    } else if (strcmp(token->value, "comp") == 0) {
        token->type = _TYPE_COMPONENT;
    } else if (strcmp(token->value, "use") == 0) {
        token->type = _USE;
    } else if (strcmp(token->value, "if") == 0) {
        token->type = _IF;
    } else if (strcmp(token->value, "else") == 0) {
        token->type = _ELSE;
    } else if (strcmp(token->value, "while") == 0) {
        token->type = _WHILE;
    } else if (strcmp(token->value, "foreach") == 0) {
        token->type = _FOREACH;
    } else if (strcmp(token->value, "as") == 0) {
        token->type = _AS;
    } else if (strcmp(token->value, "function") == 0) {
        token->type = _TYPE_FUNCTION;
    } else if (strcmp(token->value, "return") == 0) {
        token->type = _RETURN;
    } else if (lex_peek_next(state, state->pos) == '(') {
        token->type = _FUNCTION_CALL;
    } 

    return token;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %r15
leaq 0xc40(%rip), %rsi       # 0x5014
movq %r15, %rdi
callq 0x10c0
movl $0x4, %r12d
testl %eax, %eax
je 0x4592
leaq 0xc57(%rip), %rsi       # 0x5048
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x4592
leaq 0x1008(%rip), %rsi      # 0x5410
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x4592
leaq 0xbeb(%rip), %rsi       # 0x500a
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x4592
leaq 0xbce(%rip), %rsi       # 0x5004
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x4592
leaq 0xbc2(%rip), %rsi       # 0x500f
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x4592
leaq 0xbb7(%rip), %rsi       # 0x501b
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x4592
leaq 0xf9c(%rip), %rsi       # 0x5417
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x454c
leaq 0xf8a(%rip), %rsi       # 0x541c
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x4554
movb (%r15), %r12b
cmpb $0x69, %r12b
jne 0x44bd
cmpb $0x66, 0x1(%r15)
jne 0x44bd
cmpb $0x0, 0x2(%r15)
je 0x4574
leaq 0xf5c(%rip), %rsi       # 0x5420
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x455c
leaq 0xf4a(%rip), %rsi       # 0x5425
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x4564
leaq 0xf3d(%rip), %rsi       # 0x542b
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x456c
cmpb $0x61, %r12b
jne 0x450e
cmpb $0x73, 0x1(%r15)
jne 0x450e
cmpb $0x0, 0x2(%r15)
je 0x458c
leaq 0xf1e(%rip), %rsi       # 0x5433
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x457c
leaq 0xf14(%rip), %rsi       # 0x543c
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0x4584
movl 0xc(%r14), %esi
movq %r14, %rdi
callq 0x35bc
movl $0x1c, %r12d
cmpb $0x28, %al
je 0x4592
jmp 0x4595
movl $0x2f, %r12d
jmp 0x4592
movl $0xb, %r12d
jmp 0x4592
movl $0x13, %r12d
jmp 0x4592
movl $0x1d, %r12d
jmp 0x4592
movl $0x1e, %r12d
jmp 0x4592
movl $0x12, %r12d
jmp 0x4592
movl $0x30, %r12d
jmp 0x4592
movl $0x11, %r12d
jmp 0x4592
movl $0x1f, %r12d
movl %r12d, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)