// File: joncampbell123[P]haxcc/haxpp.cpp
// Function: parse_number(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>)
token parse_number(string::iterator &li,const string::iterator lie) {
    token r;

    /* at this point isdigit(*li) */
    if (li == lie) throw invalid_argument("expected number, got end of line");
    if (!isdigit(*li)) throw invalid_argument(string("expected number, got ") + *li);

    if (parse_number_looks_like_float(li,lie)) {
        if (strit_next_match_inc(li,lie,'0','x'))
            r = parse_hex_number_float_sub(li,lie);
        else
            r = parse_dec_number_float_sub(li,lie);

        parse_float_suffixes(r,li,lie);
    }
    else {
        if (strit_next_match_inc(li,lie,'0')) {
            if (strit_next_match_inc(li,lie,'x')) /* hexadecimal integer */
                r = parse_hex_number(li,lie);
            else /* octal */
                r = parse_oct_number(li,lie);
        }
        else { /* integer */
            r = parse_dec_number(li,lie);
        }

        parse_int_suffixes(r,li,lie);
    }

    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x370, %rsp            # imm = 0x370
movq %rdi, -0x330(%rbp)
movq %rdi, %rax
movq %rax, -0x328(%rbp)
movq %rdi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x3e40
movq -0x18(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x15b70
testb $0x1, %al
jne 0x7414
jmp 0x7486
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x338(%rbp)
leaq 0x1d9ef(%rip), %rsi     # 0x24e21
callq 0x3530
jmp 0x7439
movq -0x338(%rbp), %rdi
movq 0x2bb91(%rip), %rsi     # 0x32fd8
movq 0x2bb72(%rip), %rdx     # 0x32fc0
callq 0x34b0
jmp 0x7887
movq -0x338(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x31f0
jmp 0x7872
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x7872
movq -0x18(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %edi
callq 0x3260
cmpl $0x0, %eax
jne 0x758a
movb $0x1, -0x72(%rbp)
movl $0x10, %edi
callq 0x3130
movq %rax, -0x348(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0x34f0
movq -0x340(%rbp), %rdx
leaq 0x1d96f(%rip), %rsi     # 0x24e42
leaq -0x70(%rbp), %rdi
callq 0x15960
jmp 0x74de
movq -0x18(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %edx
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x15c10
jmp 0x74f9
movq -0x348(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x34d0
jmp 0x750b
movq -0x348(%rbp), %rdi
movb $0x0, -0x72(%rbp)
movq 0x2babb(%rip), %rsi     # 0x32fd8
movq 0x2ba9c(%rip), %rdx     # 0x32fc0
callq 0x34b0
jmp 0x7887
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x7568
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x755f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3598
leaq -0x70(%rbp), %rdi
callq 0x3598
leaq -0x71(%rbp), %rdi
callq 0x32f0
testb $0x1, -0x72(%rbp)
jne 0x7579
jmp 0x7585
movq -0x348(%rbp), %rdi
callq 0x31f0
jmp 0x7872
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x7220
movb %al, -0x349(%rbp)
jmp 0x75b8
movb -0x349(%rbp), %al
testb $0x1, %al
jne 0x75c7
jmp 0x76c9
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rsi
movl $0x30, %edx
movl $0x78, %ecx
callq 0x6a30
movb %al, -0x34a(%rbp)
jmp 0x75f4
movb -0x34a(%rbp), %al
testb $0x1, %al
jne 0x7600
jmp 0x7645
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdx
leaq -0x100(%rbp), %rdi
callq 0x6af0
jmp 0x7624
movq -0x330(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x15c60
leaq -0x100(%rbp), %rdi
callq 0x15bf0
jmp 0x76a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rsi
callq 0x6e40
fstpt -0x354(%rbp)
jmp 0x7668
fldt -0x354(%rbp)
movq %rsp, %rax
fstpt (%rax)
leaq -0x180(%rbp), %rdi
callq 0x3f80
jmp 0x7681
movq -0x330(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x15c60
leaq -0x180(%rbp), %rdi
callq 0x15bf0
movq -0x330(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rdx
callq 0x6660
jmp 0x76c4
jmp 0x784c
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rsi
movl $0x30, %edx
callq 0x64a0
movb %al, -0x355(%rbp)
jmp 0x76f1
movb -0x355(%rbp), %al
testb $0x1, %al
jne 0x7700
jmp 0x77db
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rsi
movl $0x78, %edx
callq 0x64a0
movb %al, -0x356(%rbp)
jmp 0x7728
movb -0x356(%rbp), %al
testb $0x1, %al
jne 0x7734
jmp 0x7781
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rsi
callq 0x61f0
movq %rax, %rsi
leaq -0x210(%rbp), %rdi
callq 0x4020
jmp 0x7760
movq -0x330(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x15c60
leaq -0x210(%rbp), %rdi
callq 0x15bf0
jmp 0x77d9
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x298(%rbp), %rsi
callq 0x6290
movq %rax, -0x360(%rbp)
jmp 0x77a5
movq -0x360(%rbp), %rsi
leaq -0x290(%rbp), %rdi
callq 0x4020
jmp 0x77ba
movq -0x330(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x15c60
leaq -0x290(%rbp), %rdi
callq 0x15bf0
jmp 0x7826
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x318(%rbp)
movq -0x318(%rbp), %rsi
callq 0x6330
movq %rax, %rsi
leaq -0x310(%rbp), %rdi
callq 0x4020
jmp 0x7807
movq -0x330(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x15c60
leaq -0x310(%rbp), %rdi
callq 0x15bf0
movq -0x330(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x320(%rbp)
movq -0x320(%rbp), %rdx
callq 0x6790
jmp 0x784a
jmp 0x784c
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x7862
movq -0x330(%rbp), %rdi
callq 0x15bf0
movq -0x328(%rbp), %rax
addq $0x370, %rsp            # imm = 0x370
popq %rbp
retq
movq -0x330(%rbp), %rdi
callq 0x15bf0
movq -0x28(%rbp), %rdi
callq 0x34e0
nopw (%rax,%rax)