// File: /workspace/github_c_makefile_star2_O1/jtuu[P]quesler/src/scanner.c
// Function: scan_token
Token scan_token() {
    skip_whitespace();

    scanner.start = scanner.current;

    if (is_at_end()) {
        return make_token(TOKEN_EOF);
    }

    char c = advance();

    if (is_identifier_prefix(c)) {
        return identifier();
    }

    if (is_digit(c)) {
        return number();
    }

    switch (c) {
        case '(': return make_token(TOKEN_LEFT_PAREN);
        case ')': return make_token(TOKEN_RIGHT_PAREN);
        case '{': return make_token(TOKEN_LEFT_BRACE);
        case '}': return make_token(TOKEN_RIGHT_BRACE);
        case ';': return make_token(TOKEN_SEMICOLON);
        case ',': return make_token(TOKEN_COMMA);
        case '-': return make_token(TOKEN_MINUS);
        case '+': return make_token(TOKEN_PLUS);
        case '/': return make_token(TOKEN_SLASH);
        case '*': return make_token(TOKEN_STAR);
        case '^': return make_token(TOKEN_CARET);
        case '%': return make_token(TOKEN_PERCENT);
        case '!':
            return make_token(
                match('=') ? TOKEN_BANG_EQUAL : TOKEN_BANG);
        case '=':
            return make_token(
                match('=') ? TOKEN_EQUAL_EQUAL : TOKEN_EQUAL);
        case '<':
            if (match('=')) {
                return make_token(TOKEN_LESS_EQUAL);
            } else if (match('<')) {
                return make_token(TOKEN_LESS_LESS);
            } else {
                return make_token(TOKEN_LESS);
            }
            break;
        case '>':
            if (match('=')) {
                return make_token(TOKEN_GREATER_EQUAL);
            } else if (match('>')) {
                return make_token(TOKEN_GREATER_GREATER);
            } else {
                return make_token(TOKEN_GREATER);
            }
            break;
        case '"':
            return string();
        case '|':
            return make_token(
                match('|') ? TOKEN_PIPE_PIPE : TOKEN_PIPE);
        case '&':
            return make_token(
                match('&') ? TOKEN_AMP_AMP : TOKEN_AMP);
    }

    return error_token("Unexpected character");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xf6fb(%rip), %rax      # 0x17760
movq 0xf6fc(%rip), %rcx      # 0x17768
movzbl (%rax), %edx
cmpl $0x2f, %edx
jne 0x8092
cmpb $0x2f, 0x1(%rax)
jne 0x80c3
movzbl (%rax), %edx
testl %edx, %edx
je 0x806c
cmpl $0xa, %edx
je 0x806c
incq %rax
movq %rax, 0xf6d0(%rip)      # 0x17760
jmp 0x807a
cmpl $0xc, %edx
jg 0x80ad
cmpl $0x9, %edx
je 0x80b7
cmpl $0xa, %edx
jne 0x80c3
incq %rcx
movq %rcx, 0xf6bd(%rip)      # 0x17768
jmp 0x80b7
cmpl $0xd, %edx
je 0x80b7
cmpl $0x20, %edx
jne 0x80c3
incq %rax
movq %rax, 0xf69f(%rip)      # 0x17760
jmp 0x806c
movq 0xf696(%rip), %rax      # 0x17760
movq %rax, 0xf687(%rip)      # 0x17758
cmpb $0x0, (%rax)
je 0x8183
leaq 0x1(%rax), %rdx
movq %rdx, 0xf67b(%rip)      # 0x17760
movzbl (%rax), %ecx
cmpl $0x5f, %ecx
je 0x819a
movl %ecx, %esi
andb $-0x21, %sil
addb $-0x41, %sil
cmpb $0x19, %sil
jbe 0x819a
leal -0x30(%rcx), %esi
cmpb $0x9, %sil
ja 0x8244
movb (%rdx), %cl
leal -0x30(%rcx), %esi
cmpb $0x9, %sil
ja 0x8139
leaq 0x2(%rax), %rdx
movq %rdx, 0xf638(%rip)      # 0x17760
movb (%rdx), %cl
leal -0x30(%rcx), %esi
incq %rdx
cmpb $0xa, %sil
jb 0x8121
decq %rdx
cmpb $0x2e, %cl
jne 0x8288
movb 0x1(%rdx), %cl
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x8288
movq %rdx, %rcx
subq %rax, %rcx
incq %rdx
movq %rdx, 0xf5ff(%rip)      # 0x17760
movb (%rdx), %sil
addb $-0x30, %sil
incq %rcx
incq %rdx
cmpb $0xa, %sil
jb 0x815a
movl $0x1d, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x841e
movl $0x2a, (%rbx)
movq %rax, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
jmp 0x8422
movb (%rdx), %sil
leal -0x30(%rsi), %ecx
cmpb $0xa, %cl
jb 0x81bc
cmpb $0x5f, %sil
je 0x81bc
andb $-0x21, %sil
addb $-0x41, %sil
movq %rdx, %rcx
cmpb $0x19, %sil
ja 0x81ed
leaq 0x2(%rax), %rcx
movq %rcx, 0xf599(%rip)      # 0x17760
movb (%rcx), %sil
leal -0x30(%rsi), %edi
incq %rcx
cmpb $0xa, %dil
jb 0x81c0
cmpb $0x5f, %sil
je 0x81c0
andb $-0x21, %sil
addb $-0x41, %sil
cmpb $0x1a, %sil
jb 0x81c0
decq %rcx
movzbl (%rax), %edi
movl $0x1a, %esi
addl $-0x65, %edi
cmpl $0x12, %edi
ja 0x8415
leaq 0x3d7c(%rip), %r8       # 0xbf84
movslq (%r8,%rdi,4), %rdi
addq %r8, %rdi
jmpq *%rdi
movq %rcx, %rsi
subq %rax, %rsi
cmpq $0x4, %rsi
jne 0x82de
movzwl (%rdx), %esi
xorl $0x736c, %esi           # imm = 0x736C
movzbl 0x2(%rdx), %edx
xorl $0x65, %edx
orw %si, %dx
jne 0x82de
movl $0x1e, %esi
jmp 0x8415
cmpl $0x5d, %ecx
jg 0x829e
addl $-0x21, %ecx
cmpl $0x1d, %ecx
ja 0x8587
leaq 0x3cb0(%rip), %rsi      # 0xbf0c
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl $0xc, %ecx
cmpb $0x3d, (%rdx)
jne 0x8575
leaq 0x2(%rax), %rcx
movq %rcx, 0xf4e2(%rip)      # 0x17760
movl $0xd, %ecx
jmp 0x8575
movl $0x1c, (%rbx)
movq %rax, 0x8(%rbx)
subq %rax, %rdx
movq %rdx, 0x10(%rbx)
jmp 0x8422
cmpl $0x7b, %ecx
jg 0x843d
cmpl $0x5e, %ecx
je 0x8544
cmpl $0x7b, %ecx
jne 0x8587
movl $0x2, (%rbx)
jmp 0x854a
movq %rcx, %rsi
subq %rax, %rsi
cmpq $0x2, %rsi
jne 0x82de
movl $0x22, %esi
cmpb $0x66, (%rdx)
je 0x8415
movl $0x1a, %esi
jmp 0x8415
movq %rcx, %rdi
subq %rax, %rdi
cmpq $0x5, %rdi
jne 0x8415
cmpl $0x746e6972, (%rdx)     # imm = 0x746E6972
jne 0x8415
movl $0x24, %esi
jmp 0x8415
movq %rcx, %rdi
subq %rax, %rdi
cmpq $0x2, %rdi
jl 0x8415
movzbl (%rdx), %edx
cmpl $0x75, %edx
je 0x8609
cmpl $0x6f, %edx
je 0x85eb
cmpl $0x61, %edx
jne 0x8415
cmpq $0x5, %rdi
jne 0x82de
movzwl 0x2(%rax), %edx
xorl $0x736c, %edx           # imm = 0x736C
movzbl 0x4(%rax), %esi
xorl $0x65, %esi
orw %dx, %si
jne 0x82de
movl $0x1f, %esi
jmp 0x8415
movq %rcx, %rdi
subq %rax, %rdi
cmpq $0x6, %rdi
jne 0x8415
movl $0x72757465, %edi       # imm = 0x72757465
xorl (%rdx), %edi
movzbl 0x4(%rdx), %edx
xorl $0x6e, %edx
orl %edi, %edx
jne 0x8415
movl $0x25, %esi
jmp 0x8415
movq %rcx, %rdi
subq %rax, %rdi
cmpq $0x4, %rdi
jne 0x8415
movzwl (%rdx), %edi
xorl $0x7572, %edi           # imm = 0x7572
movzbl 0x2(%rdx), %edx
xorl $0x65, %edx
orw %di, %dx
jne 0x8415
movl $0x26, %esi
jmp 0x8415
movq %rcx, %rdi
subq %rax, %rdi
cmpq $0x3, %rdi
jne 0x8415
cmpw $0x7465, (%rdx)         # imm = 0x7465
jne 0x8415
movl $0x27, %esi
jmp 0x8415
movq %rcx, %rdi
subq %rax, %rdi
cmpq $0x4, %rdi
jne 0x8415
movzwl (%rdx), %edi
xorl $0x6c75, %edi           # imm = 0x6C75
movzbl 0x2(%rdx), %edx
xorl $0x6c, %edx
orw %di, %dx
jne 0x8415
movl $0x23, %esi
jmp 0x8415
movq %rcx, %rdi
subq %rax, %rdi
cmpq $0x5, %rdi
jne 0x8415
cmpl $0x656c6968, (%rdx)     # imm = 0x656C6968
jne 0x8415
movl $0x28, %esi
movl %esi, (%rbx)
movq %rax, 0x8(%rbx)
subq %rax, %rcx
movq %rcx, 0x10(%rbx)
movq 0xf33f(%rip), %rax      # 0x17768
movq %rax, 0x18(%rbx)
movq 0xf33c(%rip), %rax      # 0x17770
movq %rax, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
retq
cmpl $0x7c, %ecx
je 0x855b
cmpl $0x7d, %ecx
jne 0x8587
movl $0x3, (%rbx)
jmp 0x854a
movl $0x8, (%rbx)
jmp 0x854a
movl $0x5, (%rbx)
jmp 0x854a
movl $0xe, %ecx
cmpb $0x3d, (%rdx)
jne 0x8575
leaq 0x2(%rax), %rcx
movq %rcx, 0xf2d7(%rip)      # 0x17760
movl $0xf, %ecx
jmp 0x8575
movl $0x7, (%rbx)
jmp 0x854a
movl $0x1, (%rbx)
jmp 0x854a
movl $0x4, (%rbx)
jmp 0x854a
cmpb $0x3d, (%rdx)
jne 0x85a5
leaq 0x2(%rax), %rcx
movq %rcx, 0xf298(%rip)      # 0x17760
movl $0x11, (%rbx)
jmp 0x8533
movl $0x6, (%rbx)
jmp 0x854a
movl $0x9, (%rbx)
jmp 0x854a
movl $0xb, (%rbx)
jmp 0x854a
movl $0x0, (%rbx)
jmp 0x854a
movq %rbx, %rdi
callq 0x864d
jmp 0x8438
movl $0x16, %ecx
cmpb $0x26, (%rdx)
jne 0x8575
leaq 0x2(%rax), %rcx
movq %rcx, 0xf24e(%rip)      # 0x17760
movl $0x17, %ecx
jmp 0x8575
cmpb $0x3d, (%rdx)
jne 0x85ca
leaq 0x2(%rax), %rcx
movq %rcx, 0xf233(%rip)      # 0x17760
movl $0x14, (%rbx)
movq %rax, 0x8(%rbx)
movq $0x2, 0x10(%rbx)
jmp 0x8422
movl $0xa, (%rbx)
movq %rax, 0x8(%rbx)
movq $0x1, 0x10(%rbx)
jmp 0x8422
movl $0x18, %ecx
cmpb $0x7c, (%rdx)
jne 0x8575
leaq 0x2(%rax), %rcx
movq %rcx, 0xf1f0(%rip)      # 0x17760
movl $0x19, %ecx
movl %ecx, (%rbx)
movq %rax, 0x8(%rbx)
movq 0xf1de(%rip), %rcx      # 0x17760
jmp 0x841b
movl $0x29, (%rbx)
leaq 0x3a3c(%rip), %rax      # 0xbfd0
movq %rax, 0x8(%rbx)
movq $0x14, 0x10(%rbx)
jmp 0x8422
movq 0xf1b4(%rip), %rcx      # 0x17760
cmpb $0x3e, (%rcx)
jne 0x8637
incq %rcx
movq %rcx, 0xf1a1(%rip)      # 0x17760
movl $0x12, (%rbx)
jmp 0x8417
movq 0xf18f(%rip), %rcx      # 0x17760
cmpb $0x3c, (%rcx)
jne 0x8642
incq %rcx
movq %rcx, 0xf180(%rip)      # 0x17760
movl $0x15, (%rbx)
jmp 0x8417
cmpq $0x3, %rdi
jne 0x82de
movl $0x20, %esi
cmpb $0x72, 0x2(%rax)
jne 0x82de
jmp 0x8415
cmpq $0x8, %rdi
jne 0x82de
movl $0x6974636e, %edx       # imm = 0x6974636E
xorl 0x2(%rax), %edx
movzwl 0x6(%rax), %esi
xorl $0x6e6f, %esi           # imm = 0x6E6F
orl %edx, %esi
jne 0x82de
movl $0x21, %esi
jmp 0x8415
movl $0x10, (%rbx)
jmp 0x8577
movl $0x13, (%rbx)
jmp 0x8577