// File: /workspace/github_c_makefile_star2_O0/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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x15d5(%rip), %rsi      # 0x7014
callq 0x10a0
cmpl $0x0, %eax
je 0x5ae3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x15da(%rip), %rsi      # 0x7036
callq 0x10a0
cmpl $0x0, %eax
je 0x5ae3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x1844(%rip), %rsi      # 0x72b9
callq 0x10a0
cmpl $0x0, %eax
je 0x5ae3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x157c(%rip), %rsi      # 0x700a
callq 0x10a0
cmpl $0x0, %eax
je 0x5ae3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x155d(%rip), %rsi      # 0x7004
callq 0x10a0
cmpl $0x0, %eax
je 0x5ae3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x154f(%rip), %rsi      # 0x700f
callq 0x10a0
cmpl $0x0, %eax
je 0x5ae3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x1542(%rip), %rsi      # 0x701b
callq 0x10a0
cmpl $0x0, %eax
jne 0x5af2
movq -0x10(%rbp), %rax
movl $0x4, (%rax)
jmp 0x5c87
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x17bf(%rip), %rsi      # 0x72c0
callq 0x10a0
cmpl $0x0, %eax
jne 0x5b1a
movq -0x10(%rbp), %rax
movl $0x2f, (%rax)
jmp 0x5c85
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x179c(%rip), %rsi      # 0x72c5
callq 0x10a0
cmpl $0x0, %eax
jne 0x5b42
movq -0x10(%rbp), %rax
movl $0xb, (%rax)
jmp 0x5c83
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x1778(%rip), %rsi      # 0x72c9
callq 0x10a0
cmpl $0x0, %eax
jne 0x5b6a
movq -0x10(%rbp), %rax
movl $0x12, (%rax)
jmp 0x5c81
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x1753(%rip), %rsi      # 0x72cc
callq 0x10a0
cmpl $0x0, %eax
jne 0x5b92
movq -0x10(%rbp), %rax
movl $0x13, (%rax)
jmp 0x5c7f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x1730(%rip), %rsi      # 0x72d1
callq 0x10a0
cmpl $0x0, %eax
jne 0x5bba
movq -0x10(%rbp), %rax
movl $0x1d, (%rax)
jmp 0x5c7d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x170e(%rip), %rsi      # 0x72d7
callq 0x10a0
cmpl $0x0, %eax
jne 0x5be2
movq -0x10(%rbp), %rax
movl $0x1e, (%rax)
jmp 0x5c7b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x16ee(%rip), %rsi      # 0x72df
callq 0x10a0
cmpl $0x0, %eax
jne 0x5c07
movq -0x10(%rbp), %rax
movl $0x1f, (%rax)
jmp 0x5c79
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x16cc(%rip), %rsi      # 0x72e2
callq 0x10a0
cmpl $0x0, %eax
jne 0x5c2c
movq -0x10(%rbp), %rax
movl $0x30, (%rax)
jmp 0x5c77
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x16b0(%rip), %rsi      # 0x72eb
callq 0x10a0
cmpl $0x0, %eax
jne 0x5c51
movq -0x10(%rbp), %rax
movl $0x11, (%rax)
jmp 0x5c75
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x4420
movsbl %al, %eax
cmpl $0x28, %eax
jne 0x5c73
movq -0x10(%rbp), %rax
movl $0x1c, (%rax)
jmp 0x5c75
jmp 0x5c77
jmp 0x5c79
jmp 0x5c7b
jmp 0x5c7d
jmp 0x5c7f
jmp 0x5c81
jmp 0x5c83
jmp 0x5c85
jmp 0x5c87
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)