// File: /workspace/github_cpp_makefile_star2_O3/jaldhar[P]Lets-Build-a-Simple-Interpreter/calc3.cc
// Function: Interpreter::get_next_token()
Token Interpreter::get_next_token() {

    while (_current_char != '\0') {

        if (isspace(_current_char)) {
            skip_whitespace();
        }

        if (isdigit(_current_char)) {
            Token token(TOKENTYPE::INTEGER, integer());
            cerr << token << endl;
            return token;
        }

        if (_current_char == '+') {
            advance();
            Token token(TOKENTYPE::PLUS, '+');
            cerr << token << endl;
            return token;
        }

        if (_current_char == '-') {
            advance();
            Token token(TOKENTYPE::MINUS, '-');
            cerr << token << endl;
            return token;
        }

        ostringstream out;
        out << "Error parsing input. Got: " << _current_char;
        throw(out.str().c_str());
    }

    Token token(TOKENTYPE::ENDOFFILE, '\0');
    cerr << token << endl;
    return token;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movsbl 0x10(%rdi), %ebp
testl %ebp, %ebp
je 0x2509
movq %rdi, %rbx
movl %ebp, %edi
callq 0x2050
testl %eax, %eax
je 0x251a
movq %rbx, %rdi
callq 0x27fe
movb 0x10(%rbx), %al
movsbl %al, %ebp
jmp 0x251c
movl $0x0, 0x8(%rsp)
xorl %ebx, %ebx
xorl %ebp, %ebp
jmp 0x25c5
movl %ebp, %eax
addl $-0x30, %ebp
cmpl $0x9, %ebp
ja 0x2541
movq %rbx, %rdi
callq 0x2850
movq %rax, %rbx
movl $0x1, 0x8(%rsp)
movl $0x1, %ebp
jmp 0x25c5
cmpb $0x2d, %al
je 0x256f
movzbl %al, %eax
cmpl $0x2b, %eax
jne 0x2615
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
incq %rax
movq %rax, 0x8(%rbx)
movq 0x8(%rcx), %rdx
decq %rdx
cmpq %rdx, %rax
jbe 0x25aa
xorl %eax, %eax
jmp 0x25b0
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
incq %rax
movq %rax, 0x8(%rbx)
movq 0x8(%rcx), %rdx
decq %rdx
cmpq %rdx, %rax
jbe 0x258d
xorl %eax, %eax
jmp 0x2593
movq (%rcx), %rcx
movb (%rcx,%rax), %al
movb %al, 0x10(%rbx)
movl $0x3, 0x8(%rsp)
movl $0x3, %ebp
movl $0x2d, %ebx
jmp 0x25c5
movq (%rcx), %rcx
movb (%rcx,%rax), %al
movb %al, 0x10(%rbx)
movl $0x2, 0x8(%rsp)
movl $0x2, %ebp
movl $0x2b, %ebx
leaq 0x8(%rsp), %rsi
movq %rbx, 0x8(%rsi)
movq 0x2a1b(%rip), %r14      # 0x4ff0
movq %r14, %rdi
callq 0x23f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movl %ebp, %eax
movq %rbx, %rdx
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x2170
leaq 0xa21(%rip), %rsi       # 0x304a
movl $0x1a, %edx
movq %r14, %rdi
callq 0x2160
movb 0x10(%rbx), %al
leaq 0x18(%rsp), %rsi
movb %al, (%rsi)
leaq 0x38(%rsp), %rdi
movl $0x1, %edx
callq 0x2160
movl $0x8, %edi
callq 0x2090
movq %rax, %r14
leaq 0x40(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x21c0
movq 0x18(%rsp), %rax
movq %rax, (%r14)
movq 0x2936(%rip), %rsi      # 0x4fb0
movq %r14, %rdi
xorl %edx, %edx
callq 0x21e0
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26b4
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2150
jmp 0x26b4
movq %rax, %rbx
movq %r14, %rdi
callq 0x20e0
jmp 0x26b4
movq %rax, %rbx
movq 0x2905(%rip), %rsi      # 0x4fc0
leaq 0x38(%rsp), %rdi
callq 0x20a0
leaq 0xa8(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x21f0