// File: /workspace/github_c_makefile_star2_O2/mahrr[P]raven/src/lexer.c
// Function: lexer_next
Token lexer_next(Lexer *lexer) {
#define New_Token(type) (new_token(lexer, type))

    skip_whitespace(lexer);

    lexer->start = lexer->current;

    if (at_end(lexer)) return New_Token(TOKEN_EOF);

    char c = advance(lexer);
    switch (c) {
    // One-Character Tokens
    case '+': return New_Token(TOKEN_PLUS);
    case '*': return New_Token(TOKEN_STAR);
    case '/': return New_Token(TOKEN_SLASH);
    case '%': return New_Token(TOKEN_PERCENT);
    case ',': return New_Token(TOKEN_COMMA);
    case '(': return New_Token(TOKEN_LEFT_PAREN);
    case ')': return New_Token(TOKEN_RIGHT_PAREN);
    case '[': return New_Token(TOKEN_LEFT_BRACKET);
    case ']': return New_Token(TOKEN_RIGHT_BRACKET);
    case '{': return New_Token(TOKEN_LEFT_BRACE);
    case ';': return New_Token(TOKEN_SEMICOLON);
    case '\\': return New_Token(TOKEN_BACK_SLASH);

    // Possible Two-Charachter Tokens
    case '-':
        if (match(lexer, '>')) return New_Token(TOKEN_ARROW);
        return New_Token(TOKEN_MINUS);

    case '=':
        if (match(lexer, '=')) return New_Token(TOKEN_EQUAL_EQUAL);
        return New_Token(TOKEN_EQUAL);

    case '<':
        if (match(lexer, '=')) return New_Token(TOKEN_LESS_EQUAL);
        return New_Token(TOKEN_LESS);

    case '>':
        if (match(lexer, '=')) return New_Token(TOKEN_GREATER_EQUAL);
        return New_Token(TOKEN_GREATER);

    case ':':
        if (match(lexer, ':')) return New_Token(TOKEN_COLON_COLON);
        return New_Token(TOKEN_COLON);

    case '.':
        if (match(lexer, '.')) return New_Token(TOKEN_DOT_DOT);
        return New_Token(TOKEN_DOT);

    case '!':
        if (match(lexer, '=')) return New_Token(TOKEN_BANG_EQUAL);
        break;

    // Strings
    case '}':
        if (match(lexer, '}')) return string_interpolated(lexer);
        return New_Token(TOKEN_RIGHT_BRACE);
    case '\'':
        return string(lexer);
    case '"':
        return string_interpolated(lexer);

    default:
        if (isalpha(c) || c == '_') return identifier(lexer);
        if (isdigit(c)) return number(lexer);
    }

    return error_token(lexer, "Unexpected symbol");
#undef New_Token
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r15
movzbl (%r15), %eax
cmpl $0xa, %eax
jne 0x735b
incl 0x18(%r14)
cmpb $0x0, (%r15)
je 0x7346
jmp 0x7387
cmpl $0x9, %eax
je 0x7387
cmpl $0xd, %eax
je 0x7387
cmpl $0x20, %eax
je 0x7387
cmpl $0x23, %eax
jne 0x7395
incq %r15
testb %al, %al
je 0x7390
movzbl %al, %eax
cmpl $0xa, %eax
je 0x7390
movq %r15, 0x10(%r14)
movb (%r15), %al
jmp 0x736f
incq %r15
movq %r15, 0x10(%r14)
jmp 0x7346
decq %r15
jmp 0x7346
movq %r15, 0x8(%r14)
cmpb $0x0, (%r15)
je 0x73e3
leaq 0x1(%r15), %r13
movq %r13, 0x10(%r14)
movzbl (%r15), %r12d
leal -0x21(%r12), %eax
cmpl $0x1d, %eax
ja 0x73fd
leaq 0x29c0(%rip), %rcx      # 0x9d7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x3d, (%r13)
jne 0x7480
leaq 0x2(%r15), %rax
movq %rax, 0x10(%r14)
movl $0x21, (%rbx)
jmp 0x75b4
movl $0x36, (%rbx)
movl 0x18(%r14), %eax
movl %eax, 0x14(%rbx)
movq %r15, 0x8(%rbx)
andl $0x0, 0x10(%rbx)
jmp 0x76ee
cmpl $0x5b, %r12d
je 0x75ec
cmpl $0x5c, %r12d
je 0x75cb
cmpl $0x5d, %r12d
je 0x75e1
cmpl $0x7b, %r12d
je 0x75d6
cmpl $0x7d, %r12d
jne 0x744e
cmpb $0x7d, (%r13)
jne 0x76d6
addq $0x2, %r15
movq %r15, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7a79
jmp 0x76ee
callq 0x2220
cmpb $0x5f, %r12b
je 0x75f7
movsbq %r12b, %rdx
movq (%rax), %rcx
movzwl (%rcx,%rdx,2), %edx
movl %edx, %esi
andl $0x400, %esi            # imm = 0x400
jne 0x75f7
btl $0xb, %edx
jb 0x76fb
leaq 0x29c9(%rip), %rdx      # 0x9e50
jmp 0x76b9
cmpb $0x3a, (%r13)
jne 0x7678
leaq 0x2(%r15), %rax
movq %rax, 0x10(%r14)
movl $0x1a, (%rbx)
jmp 0x75b4
cmpb $0x3d, (%r13)
jne 0x7680
leaq 0x2(%r15), %rax
movq %rax, 0x10(%r14)
movl $0x1e, (%rbx)
jmp 0x75b4
cmpb $0x3d, (%r13)
jne 0x7688
leaq 0x2(%r15), %rax
movq %rax, 0x10(%r14)
movl $0x1c, (%rbx)
jmp 0x75b4
leaq 0x2(%r15), %rcx
pushq $0x2
popq %rax
movzbl -0x1(%rcx), %edx
testl %edx, %edx
je 0x76b2
cmpl $0x27, %edx
je 0x7690
movq %rcx, 0x10(%r14)
incl %eax
incq %rcx
jmp 0x74ed
movl $0x29, (%rbx)
jmp 0x76dc
movl $0x28, (%rbx)
jmp 0x76dc
movl $0x14, (%rbx)
jmp 0x76dc
cmpb $0x2e, (%r13)
jne 0x76aa
leaq 0x2(%r15), %rax
movq %rax, 0x10(%r14)
movl $0x19, (%rbx)
jmp 0x75b4
movl $0x13, (%rbx)
jmp 0x76dc
movl $0x12, (%rbx)
jmp 0x76dc
movl $0x26, (%rbx)
jmp 0x76dc
movl $0x25, (%rbx)
jmp 0x76dc
movl $0x10, (%rbx)
jmp 0x76dc
cmpb $0x3e, (%r13)
jne 0x76c6
leaq 0x2(%r15), %rax
movq %rax, 0x10(%r14)
movl $0x24, (%rbx)
jmp 0x75b4
cmpb $0x3d, (%r13)
jne 0x76ce
leaq 0x2(%r15), %rax
movq %rax, 0x10(%r14)
movl $0x20, (%rbx)
movl 0x18(%r14), %eax
movl %eax, 0x14(%rbx)
movq %r15, 0x8(%rbx)
movl $0x2, 0x10(%rbx)
jmp 0x76ee
movl $0x2e, (%rbx)
jmp 0x76dc
movl $0x2a, (%rbx)
jmp 0x76dc
movl $0x2d, (%rbx)
jmp 0x76dc
movl $0x2c, (%rbx)
jmp 0x76dc
xorl %r12d, %r12d
movsbq 0x1(%r15,%r12), %rcx
testq %rcx, %rcx
je 0x7627
cmpb $0x5f, %cl
je 0x7616
movq (%rax), %rdx
movzwl (%rdx,%rcx,2), %ecx
andl $0x8, %ecx
je 0x7627
leaq (%r15,%r12), %rcx
addq $0x2, %rcx
movq %rcx, 0x10(%r14)
incq %r12
jmp 0x75fa
movzbl (%r15), %ecx
pushq $0x2f
popq %rax
addl $-0x61, %ecx
cmpl $0x16, %ecx
ja 0x79f6
leaq 0x27b3(%rip), %rdx      # 0x9df4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x1(%r12), %rcx
cmpq $0x3, %rcx
jl 0x79f6
cmpb $0x6e, (%r13)
jne 0x79f6
leaq 0x1f45(%rip), %rcx      # 0x95b0
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
pushq $0x17
jmp 0x79ec
movl $0x27, (%rbx)
jmp 0x76dc
movl $0x1d, (%rbx)
jmp 0x76dc
movl $0x1b, (%rbx)
jmp 0x76dc
movq %rcx, 0x10(%r14)
movl $0x31, (%rbx)
movl 0x18(%r14), %ecx
movl %ecx, 0x14(%rbx)
movq %r15, 0x8(%rbx)
movl %eax, 0x10(%rbx)
jmp 0x76ee
movl $0x15, (%rbx)
jmp 0x76dc
leaq 0x27a9(%rip), %rdx      # 0x9e62
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7b06
jmp 0x76ee
movl $0x11, (%rbx)
jmp 0x76dc
movl $0x1f, (%rbx)
jmp 0x76dc
movl $0x2b, (%rbx)
movl 0x18(%r14), %eax
movl %eax, 0x14(%rbx)
movq %r15, 0x8(%rbx)
movl $0x1, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
cmpb $0x30, %r12b
jne 0x776d
movzbl (%r13), %edx
addl $-0x42, %edx
cmpl $0x36, %edx
ja 0x776d
movabsq $0x100000001, %rsi      # imm = 0x100000001
btq %rdx, %rsi
jb 0x77ee
movabsq $0x200000002000, %rsi   # imm = 0x200000002000
btq %rdx, %rsi
jb 0x77bc
movabsq $0x40000000400000, %rsi # imm = 0x40000000400000
btq %rdx, %rsi
jae 0x776d
leaq 0x2(%r15), %r13
movq %r13, 0x10(%r14)
movq (%rax), %rdx
movsbq (%r13), %rcx
movzwl (%rdx,%rcx,2), %edx
btl $0xc, %edx
jae 0x7806
testb %cl, %cl
je 0x775a
incq %r13
jmp 0x774a
movsbq (%r13), %rdx
movzwl (%rcx,%rdx,2), %esi
btl $0xb, %esi
jae 0x778c
testb %dl, %dl
je 0x7776
incq %r13
movq %r13, 0x10(%r14)
movq (%rax), %rcx
jmp 0x776d
cmpb $0x2e, %dl
jne 0x7806
movsbq 0x1(%r13), %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x7806
incq %r13
movq %r13, 0x10(%r14)
movq (%rax), %rdx
movsbq (%r13), %rcx
movzwl (%rdx,%rcx,2), %edx
btl $0xb, %edx
jae 0x7806
testb %cl, %cl
je 0x77b0
jmp 0x779d
leaq 0x2(%r15), %r13
movq %r13, 0x10(%r14)
movq (%rax), %rdx
movsbq (%r13), %rcx
cmpq $0x38, %rcx
setl %sil
movb 0x1(%rdx,%rcx,2), %dl
andb $0x8, %dl
shrb $0x3, %dl
andb %sil, %dl
testb %dl, %dl
je 0x7806
testb %cl, %cl
je 0x77e1
incq %r13
jmp 0x77c0
leaq 0x2(%r15), %r13
movq %r13, 0x10(%r14)
movb (%r13), %al
andb $-0x2, %al
incq %r13
cmpb $0x30, %al
je 0x77f2
decq %r13
movl $0x30, (%rbx)
movl 0x18(%r14), %eax
movl %eax, 0x14(%rbx)
movq %r15, 0x8(%rbx)
subl %r15d, %r13d
movl %r13d, 0x10(%rbx)
jmp 0x76ee
leaq 0x265e(%rip), %rcx      # 0x9e88
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
pushq $0xd
jmp 0x79ec
leaq 0x1971(%rip), %rcx      # 0x91af
pushq $0x1
popq %rdx
pushq $0x18
jmp 0x7919
leaq 0x1(%r12), %rcx
cmpq $0x3, %rcx
jl 0x79f6
movzbl (%r13), %ecx
cmpl $0x6c, %ecx
je 0x7a0f
cmpl $0x6e, %ecx
jne 0x79f6
leaq 0x1d3b(%rip), %rcx      # 0x95b0
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
pushq $0x23
jmp 0x79ec
leaq 0x1(%r12), %rcx
cmpq $0x4, %rcx
jl 0x79f6
movzbl (%r13), %ecx
cmpl $0x79, %ecx
je 0x7a20
cmpl $0x72, %ecx
jne 0x79f6
leaq 0x218e(%rip), %rcx      # 0x9a3d
pushq $0x2
popq %rdx
pushq $0xe
jmp 0x7919
leaq 0x1(%r12), %rcx
cmpq $0x2, %rcx
jl 0x79f6
movzbl (%r13), %ecx
cmpl $0x6f, %ecx
je 0x7a57
cmpl $0x6e, %ecx
je 0x7a42
cmpl $0x61, %ecx
jne 0x79f6
leaq 0x1dcd(%rip), %rcx      # 0x96b9
pushq $0x2
popq %rsi
pushq $0x3
popq %rdx
pushq $0x4
jmp 0x79ec
leaq 0x2582(%rip), %rcx      # 0x9e82
pushq $0x1
popq %rsi
pushq $0x5
popq %rdx
pushq $0xc
jmp 0x79ec
leaq 0x2567(%rip), %rcx      # 0x9e7b
pushq $0x1
popq %rdx
pushq $0x22
popq %r8
movq %r14, %rdi
movl %edx, %esi
jmp 0x79f1
leaq 0x1(%r12), %rcx
cmpq $0x4, %rcx
jl 0x79f6
cmpb $0x6f, (%r13)
jne 0x79f6
cmpb $0x6e, 0x2(%r15)
jne 0x79f6
movzbl 0x3(%r15), %ecx
cmpl $0x74, %ecx
je 0x7a68
cmpl $0x64, %ecx
jne 0x79f6
leaq 0x16ef(%rip), %rcx      # 0x9057
pushq $0x4
popq %rsi
pushq $0x1
jmp 0x7a4e
leaq 0x24fd(%rip), %rcx      # 0x9e76
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
xorl %r8d, %r8d
jmp 0x79f1
cmpq $0x1, %r12
jne 0x79f6
movb (%r13), %al
cmpb $0x6e, %al
pushq $0x8
popq %rcx
pushq $0x2f
popq %rdx
cmovel %ecx, %edx
cmpb $0x66, %al
pushq $0x7
popq %rax
cmovnel %edx, %eax
jmp 0x79f6
leaq 0x226e(%rip), %rcx      # 0x9c1b
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $0x9
jmp 0x79ec
cmpq $0x2, %r12
jne 0x79f6
movzbl (%r13), %ecx
cmpl $0x6f, %ecx
je 0x7a31
cmpl $0x69, %ecx
jne 0x79f6
leaq 0x2823(%rip), %rcx      # 0xa1f6
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
pushq $0xb
jmp 0x79ec
leaq 0x2499(%rip), %rcx      # 0x9e7d
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
pushq $0xa
popq %r8
movq %r14, %rdi
callq 0x7b58
movl %eax, (%rbx)
movl 0x18(%r14), %eax
movl %eax, 0x14(%rbx)
movq %r15, 0x8(%rbx)
incl %r12d
movl %r12d, 0x10(%rbx)
jmp 0x76ee
leaq 0x1ca4(%rip), %rcx      # 0x96ba
pushq $0x2
popq %rdx
pushq $0x3
jmp 0x7919
leaq 0x1a19(%rip), %rcx      # 0x9440
pushq $0x2
popq %rdx
pushq $0xf
jmp 0x7919
leaq 0x21e4(%rip), %rcx      # 0x9c1c
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
pushq $0x16
jmp 0x79ec
leaq 0x160e(%rip), %rcx      # 0x9057
pushq $0x2
popq %rsi
pushq $0x5
popq %r8
movq %r14, %rdi
xorl %edx, %edx
jmp 0x79f1
leaq 0x1751(%rip), %rcx      # 0x91af
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
pushq $0x6
jmp 0x79ec
leaq 0x241e(%rip), %rcx      # 0x9e8d
pushq $0x4
popq %rdx
pushq $0x2
jmp 0x7919