// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./wcc_alexer.cpp
// Function: Alexer::tokenize()
void Alexer::tokenize()
{
    auto source = input.trim_begin();
    while (source.count > 0) {
        if (is_symbol_start(*source.data)) {
            String_View token_text = chop_while(&source, is_symbol);

            if (token_text == "while"_sv) {
                tokens.push(Token {Token_Type::While, token_text});
            } else if (token_text == "func"_sv) {
                tokens.push(Token {Token_Type::Func, token_text});
            } else if (token_text == "local"_sv) {
                tokens.push(Token {Token_Type::Local, token_text});
            } else if (token_text == "if"_sv) {
                tokens.push(Token {Token_Type::If, token_text});
            } else if (token_text == "else"_sv) {
                tokens.push(Token {Token_Type::Else, token_text});
            } else if (token_text == "return"_sv) {
                tokens.push(Token {Token_Type::Return, token_text});
            } else if (token_text == "true"_sv) {
                tokens.push(Token {Token_Type::True, token_text});
            } else if (token_text == "false"_sv) {
                tokens.push(Token {Token_Type::False, token_text});
            } else {
                tokens.push(Token {Token_Type::Symbol, token_text});
            }
        } else if (isdigit(*source.data)) {
            String_View token_text = chop_while(&source, isdigit);
            tokens.push(Token {Token_Type::Number_Literal, token_text});
        } else {
            switch (*source.data) {
            case '(':
                tokens.push(Token {Token_Type::Open_Paren, chop_off(&source, 1)});
                break;
            case ')':
                tokens.push(Token {Token_Type::Closed_Paren, chop_off(&source, 1)});
                break;
            case ':':
                tokens.push(Token {Token_Type::Colon, chop_off(&source, 1)});
                break;
            case '{':
                tokens.push(Token {Token_Type::Open_Curly, chop_off(&source, 1)});
                break;
            case '}':
                tokens.push(Token {Token_Type::Closed_Curly, chop_off(&source, 1)});
                break;
            case '=':
                if (source.count > 1 && source.data[1] == '=') {
                    tokens.push(Token {Token_Type::Equals_Equals, chop_off(&source, 2)});
                } else {
                    tokens.push(Token {Token_Type::Equals, chop_off(&source, 1)});
                }
                break;
            case '>':
                tokens.push(Token {Token_Type::Greater, chop_off(&source, 1)});
                break;
            case '<':
                if (source.count > 1 && source.data[1] == '=') {
                    tokens.push(Token {Token_Type::Less_Equals, chop_off(&source, 2)});
                } else {
                    reporter.fail(static_cast<size_t>(source.data - input.data), "Unexpected character `", *source.data, "`");
                }
                break;
            case '&':
                if (source.count > 1 && source.data[1] == '&') {
                    tokens.push(Token {Token_Type::And, chop_off(&source, 2)});
                } else {
                    reporter.fail(static_cast<size_t>(source.data - input.data), "Unexpected character `", *source.data, "`");
                }
                break;
            case ',':
                tokens.push(Token {Token_Type::Comma, chop_off(&source, 1)});
                break;
            case '+':
                if (source.count > 1 && source.data[1] == '=') {
                    tokens.push(Token {Token_Type::Plus_Equals, chop_off(&source, 2)});
                } else {
                    tokens.push(Token {Token_Type::Plus, chop_off(&source, 1)});
                }
                break;
            case '*':
                tokens.push(Token {Token_Type::Asterisk, chop_off(&source, 1)});
                break;
            case '/':
                if (source.count > 1 && source.data[1] == '/') {
                    chop_while(&source, is_not_newline);
                } else {
                    reporter.fail(static_cast<size_t>(source.data - input.data), "Unexpected character `", *source.data, "`");
                }
                break;
            case '%':
                tokens.push(Token {Token_Type::Rem, chop_off(&source, 1)});
                break;
            case '-':
                if (source.count > 1 && source.data[1] == '=') {
                    tokens.push(Token {Token_Type::Minus_Equals, chop_off(&source, 2)});
                } else {
                    tokens.push(Token {Token_Type::Minus, chop_off(&source, 1)});
                }
                break;
            case ';':
                tokens.push(Token {Token_Type::Semicolon, chop_off(&source, 1)});
                break;

            default: {
                assert(input.data <= source.data);
                reporter.fail(static_cast<size_t>(source.data - input.data), "Unexpected character `", *source.data, "`");
            }
            }
        }
        source = source.trim_begin();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdi, -0x40(%rbp)
callq 0x6ffc
movq %rax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rax, %rax
je 0x3134
movq %rax, %r15
movq %rdx, %r12
movq -0x40(%rbp), %rax
leaq 0x10(%rax), %r14
movsbl (%r12), %ebx
movl %ebx, %edi
callq 0x1150
cmpl $0x5f, %ebx
je 0x292f
testl %eax, %eax
jne 0x292f
leal -0x30(%rbx), %eax
cmpl $0x9, %eax
ja 0x2a2a
xorl %eax, %eax
movsbl (%r12,%rax), %ecx
addl $-0x3a, %ecx
cmpl $-0xa, %ecx
jb 0x28db
incq %rax
cmpq %rax, %r15
jne 0x28c3
movq %r15, %rax
movq %r15, %rsi
movl $0x0, %edx
movl $0x0, %ecx
movl $0x0, %edi
subq %rax, %rsi
jb 0x28fe
movq %rax, %r15
movq %rax, %rdx
movq %r12, %rcx
movq %rsi, %rdi
addq %r15, %r12
movq %r12, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
movl $0xb, -0x208(%rbp)
movq %rdx, -0x200(%rbp)
movq %rcx, -0x1f8(%rbp)
movq %rcx, 0x10(%rsp)
movups -0x208(%rbp), %xmm0
jmp 0x2993
xorl %r13d, %r13d
movsbl (%r12,%r13), %ebx
movl %ebx, %edi
callq 0x10b0
cmpl $0x5f, %ebx
je 0x2947
testl %eax, %eax
je 0x2952
incq %r13
cmpq %r13, %r15
jne 0x2932
movq %r15, %r13
movq %r15, %rax
subq %r13, %rax
jae 0x29c4
addq %r15, %r12
movq %r12, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
xorl %r13d, %r13d
xorl %r12d, %r12d
movl $0x1, -0x220(%rbp)
movq %r13, -0x218(%rbp)
movq %r12, -0x210(%rbp)
movq %r12, 0x10(%rsp)
movups -0x220(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0x7046
leaq -0x38(%rbp), %rdi
callq 0x6ffc
movq %rax, %r15
movq %rdx, %r12
movq %rax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rax, %rax
jne 0x28a0
jmp 0x3134
leaq (%r12,%r13), %rcx
movq %rcx, -0x30(%rbp)
movq %rax, -0x38(%rbp)
leaq -0x2(%r13), %rax
cmpq $0x4, %rax
ja 0x296f
leaq 0x676b(%rip), %rcx      # 0x914c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpw $0x6669, (%r12)         # imm = 0x6669
movl $0x2, %r13d
jne 0x296f
movl $0x16, -0x298(%rbp)
movq $0x2, -0x290(%rbp)
movq %r12, -0x288(%rbp)
movq %r12, 0x10(%rsp)
movups -0x298(%rbp), %xmm0
jmp 0x2993
movzbl %bl, %eax
leal -0x25(%rax), %ecx
cmpl $0x19, %ecx
ja 0x2bbc
leaq 0x66a4(%rip), %rdx      # 0x90e4
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movl $0x15, -0xa0(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0x98(%rbp)
movq %r12, -0x90(%rbp)
movq %r12, 0x10(%rsp)
movups -0xa0(%rbp), %xmm0
jmp 0x2993
movl (%r12), %eax
movl $0x6c696877, %ecx       # imm = 0x6C696877
xorl %ecx, %eax
movzbl 0x4(%r12), %ecx
xorl $0x65, %ecx
orl %eax, %ecx
je 0x2c0b
movl (%r12), %eax
movl $0x61636f6c, %ecx       # imm = 0x61636F6C
xorl %ecx, %eax
movzbl 0x4(%r12), %ecx
xorl $0x6c, %ecx
orl %eax, %ecx
je 0x302f
movl (%r12), %eax
movl $0x736c6166, %ecx       # imm = 0x736C6166
xorl %ecx, %eax
movzbl 0x4(%r12), %ecx
xorl $0x65, %ecx
orl %eax, %ecx
movl $0x5, %r13d
jne 0x296f
movl $0x1b, -0x238(%rbp)
movq $0x5, -0x230(%rbp)
movq %r12, -0x228(%rbp)
movq %r12, 0x10(%rsp)
movups -0x238(%rbp), %xmm0
jmp 0x2993
cmpl $0x636e7566, (%r12)     # imm = 0x636E7566
je 0x2c38
cmpl $0x65736c65, (%r12)     # imm = 0x65736C65
je 0x305c
cmpl $0x65757274, (%r12)     # imm = 0x65757274
movl $0x4, %r13d
jne 0x296f
movl $0x1a, -0x250(%rbp)
movq $0x4, -0x248(%rbp)
movq %r12, -0x240(%rbp)
movq %r12, 0x10(%rsp)
movups -0x250(%rbp), %xmm0
jmp 0x2993
movl (%r12), %eax
movl $0x75746572, %ecx       # imm = 0x75746572
xorl %ecx, %eax
movzwl 0x4(%r12), %ecx
xorl $0x6e72, %ecx           # imm = 0x6E72
orl %eax, %ecx
movl $0x6, %r13d
jne 0x296f
movl $0x19, -0x268(%rbp)
movq $0x6, -0x260(%rbp)
movq %r12, -0x258(%rbp)
movq %r12, 0x10(%rsp)
movups -0x268(%rbp), %xmm0
jmp 0x2993
cmpl $0x7b, %eax
je 0x2ff2
cmpl $0x7d, %eax
jne 0x31bb
movl $0x7, -0x190(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0x188(%rbp)
movq %r12, -0x180(%rbp)
movq %r12, 0x10(%rsp)
movups -0x190(%rbp), %xmm0
jmp 0x2993
movl $0xc, -0x2e0(%rbp)
movq $0x5, -0x2d8(%rbp)
movq %r12, -0x2d0(%rbp)
movq %r12, 0x10(%rsp)
movups -0x2e0(%rbp), %xmm0
jmp 0x2993
movl $0x0, -0x2c8(%rbp)
movq $0x4, -0x2c0(%rbp)
movq %r12, -0x2b8(%rbp)
movq %r12, 0x10(%rsp)
movups -0x2c8(%rbp), %xmm0
jmp 0x2993
movl $0xd, -0x148(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0x140(%rbp)
movq %r12, -0x138(%rbp)
movq %r12, 0x10(%rsp)
movups -0x148(%rbp), %xmm0
jmp 0x2993
cmpq $0x1, %r15
je 0x3089
cmpb $0x3d, 0x1(%r12)
jne 0x3089
movl $0xa, -0x178(%rbp)
addq $-0x2, %r15
leaq 0x2(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x2, -0x170(%rbp)
movq %r12, -0x168(%rbp)
movq %r12, 0x10(%rsp)
movups -0x178(%rbp), %xmm0
jmp 0x2993
movl $0x13, -0x58(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0x50(%rbp)
movq %r12, -0x48(%rbp)
movq %r12, 0x10(%rsp)
movups -0x58(%rbp), %xmm0
jmp 0x2993
movl $0x18, -0xb8(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0xb0(%rbp)
movq %r12, -0xa8(%rbp)
movq %r12, 0x10(%rsp)
movups -0xb8(%rbp), %xmm0
jmp 0x2993
movl $0x4, -0x1c0(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0x1b8(%rbp)
movq %r12, -0x1b0(%rbp)
movq %r12, 0x10(%rsp)
movups -0x1c0(%rbp), %xmm0
jmp 0x2993
cmpq $0x1, %r15
je 0x3194
cmpb $0x26, 0x1(%r12)
jne 0x3194
movl $0x14, -0x118(%rbp)
addq $-0x2, %r15
leaq 0x2(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x2, -0x110(%rbp)
movq %r12, -0x108(%rbp)
movq %r12, 0x10(%rsp)
movups -0x118(%rbp), %xmm0
jmp 0x2993
movl $0x3, -0x1d8(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0x1d0(%rbp)
movq %r12, -0x1c8(%rbp)
movq %r12, 0x10(%rsp)
movups -0x1d8(%rbp), %xmm0
jmp 0x2993
movl $0x5, -0x100(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0xf8(%rbp)
movq %r12, -0xf0(%rbp)
movq %r12, 0x10(%rsp)
movups -0x100(%rbp), %xmm0
jmp 0x2993
cmpq $0x1, %r15
je 0x30c6
cmpb $0x3d, 0x1(%r12)
jne 0x30c6
movl $0x10, -0x88(%rbp)
addq $-0x2, %r15
leaq 0x2(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x2, -0x80(%rbp)
movq %r12, -0x78(%rbp)
movq %r12, 0x10(%rsp)
movups -0x88(%rbp), %xmm0
jmp 0x2993
movl $0x2, -0x1f0(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0x1e8(%rbp)
movq %r12, -0x1e0(%rbp)
movq %r12, 0x10(%rsp)
movups -0x1f0(%rbp), %xmm0
jmp 0x2993
cmpq $0x1, %r15
je 0x316d
cmpb $0x2f, 0x1(%r12)
jne 0x316d
xorl %eax, %eax
cmpb $0xa, (%r12,%rax)
je 0x2f24
incq %rax
cmpq %rax, %r15
jne 0x2f12
movq %r15, %rax
cmpq %r15, %rax
movq %r15, %rcx
cmovbq %rax, %rcx
subq %rax, %r15
movl $0x0, %eax
cmovaeq %r15, %rax
addq %rcx, %r12
movq %r12, -0x30(%rbp)
movq %rax, -0x38(%rbp)
jmp 0x299f
cmpq $0x1, %r15
je 0x30f7
cmpb $0x3d, 0x1(%r12)
jne 0x30f7
movl $0x11, -0xe8(%rbp)
addq $-0x2, %r15
leaq 0x2(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x2, -0xe0(%rbp)
movq %r12, -0xd8(%rbp)
movq %r12, 0x10(%rsp)
movups -0xe8(%rbp), %xmm0
jmp 0x2993
cmpq $0x1, %r15
je 0x3146
cmpb $0x3d, 0x1(%r12)
jne 0x3146
movl $0xe, -0x130(%rbp)
addq $-0x2, %r15
leaq 0x2(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x2, -0x128(%rbp)
movq %r12, -0x120(%rbp)
movq %r12, 0x10(%rsp)
movups -0x130(%rbp), %xmm0
jmp 0x2993
movl $0x6, -0x1a8(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0x1a0(%rbp)
movq %r12, -0x198(%rbp)
movq %r12, 0x10(%rsp)
movups -0x1a8(%rbp), %xmm0
jmp 0x2993
movl $0x8, -0x2b0(%rbp)
movq $0x5, -0x2a8(%rbp)
movq %r12, -0x2a0(%rbp)
movq %r12, 0x10(%rsp)
movups -0x2b0(%rbp), %xmm0
jmp 0x2993
movl $0x17, -0x280(%rbp)
movq $0x4, -0x278(%rbp)
movq %r12, -0x270(%rbp)
movq %r12, 0x10(%rsp)
movups -0x280(%rbp), %xmm0
jmp 0x2993
movl $0x9, -0x160(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0x158(%rbp)
movq %r12, -0x150(%rbp)
movq %r12, 0x10(%rsp)
movups -0x160(%rbp), %xmm0
jmp 0x2993
movl $0x12, -0x70(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0x68(%rbp)
movq %r12, -0x60(%rbp)
movq %r12, 0x10(%rsp)
movups -0x70(%rbp), %xmm0
jmp 0x2993
movl $0xf, -0xd0(%rbp)
decq %r15
leaq 0x1(%r12), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq $0x1, -0xc8(%rbp)
movq %r12, -0xc0(%rbp)
movq %r12, 0x10(%rsp)
movups -0xd0(%rbp), %xmm0
jmp 0x2993
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rdi
subq 0x8(%rdi), %r12
addq $0x28, %rdi
leaq 0x67f7(%rip), %rdx      # 0x9950
leaq 0x6541(%rip), %r8       # 0x96a1
movq %r12, %rsi
movl $0x3c, %ecx
callq 0x70c6
movq -0x40(%rbp), %rdi
subq 0x8(%rdi), %r12
addq $0x28, %rdi
leaq 0x67d0(%rip), %rdx      # 0x9950
leaq 0x651a(%rip), %r8       # 0x96a1
movq %r12, %rsi
movl $0x2f, %ecx
callq 0x70c6
movq -0x40(%rbp), %rdi
subq 0x8(%rdi), %r12
addq $0x28, %rdi
leaq 0x67a9(%rip), %rdx      # 0x9950
leaq 0x64f3(%rip), %r8       # 0x96a1
movq %r12, %rsi
movl $0x26, %ecx
callq 0x70c6
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
cmpq %r12, %rax
jbe 0x31e7
leaq 0x6798(%rip), %rdi      # 0x9967
leaq 0x67ab(%rip), %rsi      # 0x9981
leaq 0x67b9(%rip), %rcx      # 0x9996
movl $0xb2, %edx
callq 0x1090
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
subq %rax, %r12
leaq 0x6757(%rip), %rdx      # 0x9950
leaq 0x64a1(%rip), %r8       # 0x96a1
movq %r12, %rsi
movl %ebx, %ecx
callq 0x70c6