// File: /workspace/github_c_makefile_star2_O2/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 0xebd1(%rip), %rax      # 0x15760
movq 0xebd2(%rip), %rcx      # 0x15768
movzbl (%rax), %edx
cmpl $0x2f, %edx
jne 0x6bc8
cmpb $0x2f, 0x1(%rax)
jne 0x6bf2
incq %rax
movb $0x2f, %dl
testb %dl, %dl
je 0x6bc3
movzbl %dl, %edx
cmpl $0xa, %edx
je 0x6bc3
movq %rax, 0xeba4(%rip)      # 0x15760
movb (%rax), %dl
incq %rax
jmp 0x6ba9
decq %rax
jmp 0x6b96
cmpl $0x9, %edx
je 0x6be6
cmpl $0x20, %edx
je 0x6be6
cmpl $0xd, %edx
je 0x6be6
cmpl $0xa, %edx
jne 0x6bf2
incq %rcx
movq %rcx, 0xeb82(%rip)      # 0x15768
incq %rax
movq %rax, 0xeb70(%rip)      # 0x15760
jmp 0x6b96
movq %rax, 0xeb5f(%rip)      # 0x15758
cmpb $0x0, (%rax)
je 0x6c4d
leaq 0x1(%rax), %rdx
movq %rdx, 0xeb57(%rip)      # 0x15760
movzbl (%rax), %esi
cmpl $0x5f, %esi
je 0x6c55
movl %esi, %edi
andb $-0x21, %dil
addb $-0x41, %dil
cmpb $0x19, %dil
jbe 0x6c55
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x6cc2
addq $0x2, %rax
movb -0x1(%rax), %cl
leal -0x30(%rcx), %edx
cmpb $0x9, %dl
ja 0x6cf5
movq %rax, 0xeb18(%rip)      # 0x15760
incq %rax
jmp 0x6c32
pushq $0x2a
popq %rsi
jmp 0x6e0f
pushq $0x1
popq %rcx
movb (%rax,%rcx), %sil
leal -0x30(%rsi), %edi
cmpb $0xa, %dil
jb 0x6c79
cmpb $0x5f, %sil
je 0x6c79
andb $-0x21, %sil
addb $-0x41, %sil
cmpb $0x19, %sil
ja 0x6c8c
leaq (%rax,%rcx), %rsi
incq %rsi
movq %rsi, 0xead9(%rip)      # 0x15760
incq %rcx
jmp 0x6c58
movzbl (%rax), %eax
pushq $0x1a
popq %rsi
addl $-0x65, %eax
cmpl $0x12, %eax
ja 0x6e0f
leaq 0x32df(%rip), %rdi      # 0x9f84
movslq (%rdi,%rax,4), %rax
addq %rdi, %rax
jmpq *%rax
leaq 0x33a6(%rip), %rdx      # 0xa05b
pushq $0x1
popq %rdi
pushq $0x3
popq %rsi
pushq $0x1e
jmp 0x6e07
leal -0x21(%rsi), %edi
cmpl $0x1d, %edi
ja 0x6d2b
leaq 0x323b(%rip), %rsi      # 0x9f0c
movslq (%rsi,%rdi,4), %rdi
addq %rsi, %rdi
jmpq *%rdi
cmpb $0x3d, (%rdx)
jne 0x6f5a
addq $0x2, %rax
movq %rax, 0xea72(%rip)      # 0x15760
pushq $0xd
jmp 0x6c4f
pushq $0x1c
popq %rsi
cmpb $0x2e, %cl
jne 0x6e0f
movb (%rax), %cl
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x6e0f
pushq $0x1d
popq %rsi
movq %rax, 0xea47(%rip)      # 0x15760
movb (%rax), %cl
addb $-0x30, %cl
incq %rax
cmpb $0xa, %cl
jb 0x6d12
jmp 0x6e0f
cmpl $0x5e, %esi
je 0x6f20
cmpl $0x7b, %esi
je 0x6f3e
cmpl $0x7c, %esi
je 0x6f27
cmpl $0x7d, %esi
jne 0x6e1c
pushq $0x3
jmp 0x6c4f
leaq 0x330c(%rip), %rdx      # 0xa069
pushq $0x1
popq %rdi
pushq $0x22
popq %rcx
movq %rdi, %rsi
jmp 0x6e08
leaq 0x3273(%rip), %rdx      # 0x9fe5
pushq $0x1
popq %rdi
pushq $0x4
popq %rsi
pushq $0x24
jmp 0x6e07
cmpq $0x2, %rcx
jl 0x6e0f
movzbl (%rdx), %eax
cmpl $0x75, %eax
je 0x6f90
cmpl $0x6f, %eax
je 0x6f7c
cmpl $0x61, %eax
jne 0x6e0f
leaq 0x32b1(%rip), %rdx      # 0xa05b
pushq $0x2
popq %rdi
pushq $0x3
popq %rsi
pushq $0x1f
jmp 0x6e07
leaq 0x322f(%rip), %rdx      # 0x9fea
pushq $0x1
popq %rdi
pushq $0x5
popq %rsi
pushq $0x25
jmp 0x6e07
leaq 0x3289(%rip), %rdx      # 0xa055
pushq $0x1
popq %rdi
pushq $0x3
popq %rsi
pushq $0x26
jmp 0x6e07
leaq 0x19df(%rip), %rdx      # 0x87bc
pushq $0x1
popq %rdi
pushq $0x2
popq %rsi
pushq $0x27
jmp 0x6e07
leaq 0x327e(%rip), %rdx      # 0xa06c
pushq $0x1
popq %rdi
pushq $0x3
popq %rsi
pushq $0x23
jmp 0x6e07
leaq 0x31f1(%rip), %rdx      # 0x9ff0
pushq $0x1
popq %rdi
pushq $0x4
popq %rsi
pushq $0x28
popq %rcx
callq 0x7031
movl %eax, %esi
movq %rbx, %rdi
callq 0x6fdd
movq %rbx, %rax
popq %rbx
retq
leaq 0x31ad(%rip), %rsi      # 0x9fd0
jmp 0x6f6f
pushq $0x8
jmp 0x6c4f
movzbl (%rdx), %ecx
cmpl $0x3c, %ecx
je 0x6fab
cmpl $0x3d, %ecx
jne 0x6fbd
addq $0x2, %rax
movq %rax, 0xe911(%rip)      # 0x15760
pushq $0x14
jmp 0x6c4f
pushq $0xb
jmp 0x6c4f
cmpb $0x3d, (%rdx)
jne 0x6f45
addq $0x2, %rax
movq %rax, 0xe8ef(%rip)      # 0x15760
pushq $0xf
jmp 0x6c4f
pushq $0x9
jmp 0x6c4f
pushq $0x1
jmp 0x6c4f
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x6e12
addq $0x2, %rax
movzbl -0x1(%rax), %edx
cmpl $0xa, %edx
je 0x6eac
testl %edx, %edx
je 0x6f68
cmpl $0x22, %edx
jne 0x6eb6
jmp 0x6f4c
incq %rcx
movq %rcx, 0xe8b2(%rip)      # 0x15768
movq %rax, 0xe8a3(%rip)      # 0x15760
incq %rax
jmp 0x6e91
cmpb $0x26, (%rdx)
jne 0x6f61
addq $0x2, %rax
movq %rax, 0xe88a(%rip)      # 0x15760
pushq $0x17
jmp 0x6c4f
pushq $0x6
jmp 0x6c4f
movzbl (%rdx), %ecx
cmpl $0x3e, %ecx
je 0x6fc4
cmpl $0x3d, %ecx
jne 0x6fd6
addq $0x2, %rax
movq %rax, 0xe85c(%rip)      # 0x15760
pushq $0x11
jmp 0x6c4f
pushq $0x7
jmp 0x6c4f
pushq $0x4
jmp 0x6c4f
pushq $0x5
jmp 0x6c4f
pushq $0xa
jmp 0x6c4f
cmpb $0x7c, (%rdx)
jne 0x6fa4
addq $0x2, %rax
movq %rax, 0xe829(%rip)      # 0x15760
pushq $0x19
jmp 0x6c4f
pushq $0x2
jmp 0x6c4f
pushq $0xe
jmp 0x6c4f
movq %rax, 0xe80d(%rip)      # 0x15760
pushq $0x1b
jmp 0x6c4f
pushq $0xc
jmp 0x6c4f
pushq $0x16
jmp 0x6c4f
leaq 0x3086(%rip), %rsi      # 0x9ff5
movq %rbx, %rdi
callq 0x7007
jmp 0x6e17
leaq 0x1bec(%rip), %rdx      # 0x8b6f
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
pushq $0x20
jmp 0x6e07
leaq 0x110a(%rip), %rdx      # 0x80a1
pushq $0x2
popq %rdi
pushq $0x6
popq %rsi
pushq $0x21
jmp 0x6e07
pushq $0x18
jmp 0x6c4f
addq $0x2, %rax
movq %rax, 0xe7aa(%rip)      # 0x15760
pushq $0x15
jmp 0x6c4f
pushq $0x13
jmp 0x6c4f
addq $0x2, %rax
movq %rax, 0xe791(%rip)      # 0x15760
pushq $0x12
jmp 0x6c4f
pushq $0x10
jmp 0x6c4f