// File: /workspace/github_c_makefile_star2_O3/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 0xf85b(%rip), %rcx      # 0x17760
movq 0xf85c(%rip), %rax      # 0x17768
movzbl (%rcx), %edx
cmpl $0x2f, %edx
jne 0x7f3e
cmpb $0x2f, 0x1(%rcx)
jne 0x7f6f
incq %rcx
movb $0x2f, %dl
testb %dl, %dl
je 0x7f39
movzbl %dl, %edx
cmpl $0xa, %edx
je 0x7f39
movq %rcx, 0xf82e(%rip)      # 0x17760
movb (%rcx), %dl
incq %rcx
jmp 0x7f1f
decq %rcx
jmp 0x7f0c
cmpl $0xc, %edx
jg 0x7f59
cmpl $0x9, %edx
je 0x7f63
cmpl $0xa, %edx
jne 0x7f6f
incq %rax
movq %rax, 0xf811(%rip)      # 0x17768
jmp 0x7f63
cmpl $0xd, %edx
je 0x7f63
cmpl $0x20, %edx
jne 0x7f6f
incq %rcx
movq %rcx, 0xf7f3(%rip)      # 0x17760
jmp 0x7f0c
movq %rcx, 0xf7e2(%rip)      # 0x17758
cmpb $0x0, (%rcx)
je 0x802d
leaq 0x1(%rcx), %rdx
movq %rdx, 0xf7d6(%rip)      # 0x17760
movzbl (%rcx), %edi
cmpl $0x5f, %edi
je 0x8044
movl %edi, %esi
andb $-0x21, %sil
addb $-0x41, %sil
cmpb $0x19, %sil
jbe 0x8044
leal -0x30(%rdi), %esi
cmpb $0x9, %sil
ja 0x80f8
movb (%rdx), %sil
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x7fe0
leaq 0x2(%rcx), %rdx
movq %rdx, 0xf792(%rip)      # 0x17760
movb (%rdx), %sil
leal -0x30(%rsi), %edi
incq %rdx
cmpb $0xa, %dil
jb 0x7fc7
decq %rdx
movl $0x1c, %edi
cmpb $0x2e, %sil
jne 0x801b
movb 0x1(%rdx), %sil
addb $-0x30, %sil
cmpb $0x9, %sil
ja 0x801b
incq %rdx
movq %rdx, 0xf75d(%rip)      # 0x17760
movb (%rdx), %sil
addb $-0x30, %sil
incq %rdx
cmpb $0xa, %sil
jb 0x7ffc
decq %rdx
movl $0x1d, %edi
movl %edi, (%rbx)
movq %rcx, 0x8(%rbx)
subq %rcx, %rdx
movq %rdx, 0x10(%rbx)
jmp 0x84ca
movl $0x2a, (%rbx)
movq %rcx, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
jmp 0x84ca
movb (%rdx), %r8b
leal -0x30(%r8), %esi
cmpb $0xa, %sil
jb 0x8068
cmpb $0x5f, %r8b
je 0x8068
andb $-0x21, %r8b
addb $-0x41, %r8b
movq %rdx, %rsi
cmpb $0x19, %r8b
ja 0x809d
leaq 0x2(%rcx), %rsi
movq %rsi, 0xf6ed(%rip)      # 0x17760
movb (%rsi), %dil
leal -0x30(%rdi), %r8d
incq %rsi
cmpb $0xa, %r8b
jb 0x806c
cmpb $0x5f, %dil
je 0x806c
andb $-0x21, %dil
addb $-0x41, %dil
cmpb $0x1a, %dil
jb 0x806c
movb (%rcx), %dil
decq %rsi
subq %rcx, %rsi
movzbl %dil, %r8d
movl $0x1a, %edi
addl $-0x65, %r8d
cmpl $0x12, %r8d
ja 0x82af
leaq 0x3ef6(%rip), %r9       # 0xbfb4
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
cmpq $0x4, %rsi
jne 0x82af
movzwl (%rdx), %r8d
xorl $0x736c, %r8d           # imm = 0x736C
movzbl 0x2(%rdx), %edx
xorl $0x65, %edx
orw %r8w, %dx
jne 0x82af
movl $0x1e, %edi
jmp 0x8290
cmpl $0x5d, %edi
jg 0x813c
addl $-0x21, %edi
cmpl $0x1d, %edi
ja 0x840c
leaq 0x3e2c(%rip), %rsi      # 0xbf3c
movslq (%rsi,%rdi,4), %rdi
addq %rsi, %rdi
jmpq *%rdi
movl $0xc, %esi
cmpb $0x3d, (%rdx)
jne 0x8405
leaq 0x2(%rcx), %rdx
movq %rdx, 0xf62e(%rip)      # 0x17760
movl $0xd, %esi
jmp 0x8405
cmpl $0x7b, %edi
jg 0x82be
cmpl $0x5e, %edi
je 0x83e0
cmpl $0x7b, %edi
jne 0x840c
movl $0x2, (%rbx)
jmp 0x84be
cmpq $0x2, %rsi
jne 0x82af
cmpb $0x66, (%rdx)
jne 0x82af
movl $0x22, %edi
movl $0x2, %esi
jmp 0x82af
cmpq $0x5, %rsi
jne 0x82af
cmpl $0x746e6972, (%rdx)     # imm = 0x746E6972
jne 0x82af
movl $0x24, %edi
jmp 0x82aa
cmpq $0x2, %rsi
jl 0x82af
movzbl (%rdx), %edx
cmpl $0x75, %edx
je 0x8448
cmpl $0x6f, %edx
je 0x842a
cmpl $0x61, %edx
jne 0x82af
cmpq $0x5, %rsi
jne 0x82af
movzwl 0x2(%rcx), %edx
xorl $0x736c, %edx           # imm = 0x736C
movzbl 0x4(%rcx), %r8d
xorl $0x65, %r8d
orw %dx, %r8w
jne 0x82af
movl $0x1f, %edi
jmp 0x82aa
cmpq $0x6, %rsi
jne 0x82af
movl $0x72757465, %r8d       # imm = 0x72757465
xorl (%rdx), %r8d
movzbl 0x4(%rdx), %edx
xorl $0x6e, %edx
orl %r8d, %edx
jne 0x82af
movl $0x25, %edi
movl $0x6, %esi
jmp 0x82af
cmpq $0x4, %rsi
jne 0x82af
movzwl (%rdx), %r8d
xorl $0x7572, %r8d           # imm = 0x7572
movzbl 0x2(%rdx), %edx
xorl $0x65, %edx
orw %r8w, %dx
jne 0x82af
movl $0x26, %edi
jmp 0x8290
cmpq $0x3, %rsi
jne 0x82af
cmpw $0x7465, (%rdx)         # imm = 0x7465
jne 0x82af
movl $0x27, %edi
movl $0x3, %esi
jmp 0x82af
cmpq $0x4, %rsi
jne 0x82af
movzwl (%rdx), %r8d
xorl $0x6c75, %r8d           # imm = 0x6C75
movzbl 0x2(%rdx), %edx
xorl $0x6c, %edx
orw %r8w, %dx
jne 0x82af
movl $0x23, %edi
movl $0x4, %esi
jmp 0x82af
cmpq $0x5, %rsi
jne 0x82af
cmpl $0x656c6968, (%rdx)     # imm = 0x656C6968
jne 0x82af
movl $0x28, %edi
movl $0x5, %esi
movl %edi, (%rbx)
movq %rcx, 0x8(%rbx)
movq %rsi, 0x10(%rbx)
jmp 0x84ca
cmpl $0x7c, %edi
je 0x83eb
cmpl $0x7d, %edi
jne 0x840c
movl $0x3, (%rbx)
jmp 0x84be
movl $0x8, (%rbx)
jmp 0x84be
movl $0x5, (%rbx)
jmp 0x84be
movl $0xe, %esi
cmpb $0x3d, (%rdx)
jne 0x8405
leaq 0x2(%rcx), %rdx
movq %rdx, 0xf456(%rip)      # 0x17760
movl $0xf, %esi
jmp 0x8405
movl $0x7, (%rbx)
jmp 0x84be
movl $0x1, (%rbx)
jmp 0x84be
movl $0x4, (%rbx)
jmp 0x84be
movzbl (%rdx), %edx
cmpl $0x3e, %edx
je 0x847e
cmpl $0x3d, %edx
jne 0x84b0
leaq 0x2(%rcx), %rdx
movq %rdx, 0xf40b(%rip)      # 0x17760
movl $0x11, (%rbx)
jmp 0x84a2
movl $0x6, (%rbx)
jmp 0x84be
movl $0x9, (%rbx)
jmp 0x84be
movl $0xb, (%rbx)
jmp 0x84be
movl $0x0, (%rbx)
jmp 0x84be
movq %rbx, %rdi
callq 0x84de
jmp 0x84d9
movl $0x16, %esi
cmpb $0x26, (%rdx)
jne 0x8405
leaq 0x2(%rcx), %rdx
movq %rdx, 0xf3b2(%rip)      # 0x17760
movl $0x17, %esi
jmp 0x8405
movzbl (%rdx), %edx
cmpl $0x3c, %edx
je 0x8491
cmpl $0x3d, %edx
jne 0x84b8
leaq 0x2(%rcx), %rdx
movq %rdx, 0xf38b(%rip)      # 0x17760
movl $0x14, (%rbx)
jmp 0x84a2
movl $0xa, (%rbx)
jmp 0x84be
movl $0x18, %esi
cmpb $0x7c, (%rdx)
jne 0x8405
leaq 0x2(%rcx), %rdx
movq %rdx, 0xf360(%rip)      # 0x17760
movl $0x19, %esi
movl %esi, (%rbx)
jmp 0x801d
movl $0x29, (%rbx)
leaq 0x3be7(%rip), %rcx      # 0xc000
movq %rcx, 0x8(%rbx)
movq $0x14, 0x10(%rbx)
jmp 0x84ca
cmpq $0x3, %rsi
jne 0x82af
cmpb $0x72, 0x2(%rcx)
jne 0x82af
movl $0x20, %edi
jmp 0x8266
cmpq $0x8, %rsi
jne 0x82af
movl $0x6974636e, %edx       # imm = 0x6974636E
xorl 0x2(%rcx), %edx
movzwl 0x6(%rcx), %r8d
xorl $0x6e6f, %r8d           # imm = 0x6E6F
orl %edx, %r8d
jne 0x82af
movl $0x21, %edi
movl $0x8, %esi
jmp 0x82af
leaq 0x2(%rcx), %rdx
movq %rdx, 0xf2d7(%rip)      # 0x17760
movl $0x12, (%rbx)
jmp 0x84a2
leaq 0x2(%rcx), %rdx
movq %rdx, 0xf2c4(%rip)      # 0x17760
movl $0x15, (%rbx)
movq %rcx, 0x8(%rbx)
movq $0x2, 0x10(%rbx)
jmp 0x84ca
movl $0x10, (%rbx)
jmp 0x84be
movl $0x13, (%rbx)
movq %rcx, 0x8(%rbx)
movq $0x1, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq 0xf29b(%rip), %rax      # 0x17770
movq %rax, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
retq