// File: joncampbell123[P]haxcc/haxpp.cpp
// Function: parse_hex_number_float_sub(__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_hex_number_float_sub(string::iterator &li,const string::iterator lie) {
    const unsigned long long tmp_msd = 0xfull << (64ull - 4ull);
    unsigned long long tmp = 0;
    int tmpshf = 64;
    token r;

    if (li != lie) {
        while (li != lie && isxdigit(*li)) {
            if (tmpshf >= 4) {
                tmpshf -= 4;
                tmp += ((unsigned long long)char2hex_assume(*li)) << (unsigned long long)tmpshf;
            }

            li++;
        }
    }

    if (tmp != 0ull) { /* or else this will loop forever */
        while ((tmp & tmp_msd) == 0ull) {
            tmpshf += 4;
            tmp <<= 4ull;
        }

        assert(tmpshf <= 64);
    }

    const int dpshf = tmpshf;

    if (strit_next_match_inc(li,lie,'.')) {
        while (li != lie && isxdigit(*li)) {
            if (tmpshf >= 4) {
                tmpshf -= 4;
                tmp += ((unsigned long long)char2hex_assume(*li)) << (unsigned long long)tmpshf;
            }

            li++;
        }
    }

    signed long long exponent = -dpshf;

    /* FIXME: GCC behavior suggests the 'p' is mandatory. */
    if (strit_next_match_inc(li,lie,'p'))
        parse_float_hexponent(exponent,li,lie);
    else if (strit_next_match_inc(li,lie,'P'))
        parse_float_hexponent(exponent,li,lie);

    r.tval = token::FLOAT;
    r.f.fraction = tmp;
    r.f.exponent = exponent;
    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0xa0(%rbp)
movq %rdi, %rax
movq %rax, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movabsq $-0x1000000000000000, %rax # imm = 0xF000000000000000
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x40, -0x2c(%rbp)
movb $0x0, -0x2d(%rbp)
callq 0x3e40
movq -0x18(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x15a10
testb $0x1, %al
jne 0x6b54
jmp 0x6be5
jmp 0x6b56
movq -0x18(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x15a10
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0xa1(%rbp)
jne 0x6b74
jmp 0x6b91
movq -0x18(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %edi
callq 0x3090
cmpl $0x0, %eax
setne %al
movb %al, -0xa1(%rbp)
movb -0xa1(%rbp), %al
testb $0x1, %al
jne 0x6b9d
jmp 0x6be3
cmpl $0x4, -0x2c(%rbp)
jl 0x6bcf
movl -0x2c(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %edi
callq 0x58f0
movzbl %al, %eax
movslq -0x2c(%rbp), %rcx
shlq %cl, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x15a70
movq %rax, -0x38(%rbp)
jmp 0x6b56
jmp 0x6be5
cmpq $0x0, -0x28(%rbp)
je 0x6c42
jmp 0x6bee
movabsq $-0x1000000000000000, %rax # imm = 0xF000000000000000
andq -0x28(%rbp), %rax
cmpq $0x0, %rax
jne 0x6c19
movl -0x2c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
shlq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0x6bee
cmpl $0x40, -0x2c(%rbp)
jg 0x6c21
jmp 0x6c40
leaq 0x1e195(%rip), %rdi     # 0x24dbd
leaq 0x1e19b(%rip), %rsi     # 0x24dca
movl $0x59f, %edx            # imm = 0x59F
leaq 0x1e199(%rip), %rcx     # 0x24dd4
callq 0x31a0
jmp 0x6c42
movl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
movl $0x2e, %edx
callq 0x64a0
movb %al, -0xa2(%rbp)
jmp 0x6c6a
movb -0xa2(%rbp), %al
testb $0x1, %al
jne 0x6c79
jmp 0x6d29
jmp 0x6c7b
movq -0x18(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x15a10
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0xa3(%rbp)
jne 0x6c99
jmp 0x6cb6
movq -0x18(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %edi
callq 0x3090
cmpl $0x0, %eax
setne %al
movb %al, -0xa3(%rbp)
movb -0xa3(%rbp), %al
testb $0x1, %al
jne 0x6cc2
jmp 0x6d27
cmpl $0x4, -0x2c(%rbp)
jl 0x6d13
movl -0x2c(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %edi
callq 0x58f0
movzbl %al, %eax
movslq -0x2c(%rbp), %rcx
shlq %cl, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x6d13
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
callq 0x15bf0
jmp 0x6e37
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x15a70
movq %rax, -0x60(%rbp)
jmp 0x6c7b
jmp 0x6d29
movl -0x3c(%rbp), %eax
negl %eax
cltq
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rsi
movl $0x70, %edx
callq 0x64a0
movb %al, -0xa4(%rbp)
jmp 0x6d56
movb -0xa4(%rbp), %al
testb $0x1, %al
jne 0x6d62
jmp 0x6d7f
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x63d0
jmp 0x6d7d
jmp 0x6dd2
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rsi
movl $0x50, %edx
callq 0x64a0
movb %al, -0xa5(%rbp)
jmp 0x6da1
movb -0xa5(%rbp), %al
testb $0x1, %al
jne 0x6dad
jmp 0x6dd0
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x63d0
jmp 0x6dce
jmp 0x6dd0
jmp 0x6dd2
movq -0xa0(%rbp), %rax
movl $0xa, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, -0x90(%rbp)
testq %rcx, %rcx
sets %cl
movzbl %cl, %ecx
movl %ecx, %edx
fildll -0x90(%rbp)
leaq 0x1dc16(%rip), %rcx     # 0x24a18
flds (%rcx,%rdx,4)
faddp %st, %st(1)
fstpt 0x20(%rax)
movq -0x68(%rbp), %rcx
movl %ecx, 0x30(%rax)
movb $0x1, -0x2d(%rbp)
testb $0x1, -0x2d(%rbp)
jne 0x6e27
movq -0xa0(%rbp), %rdi
callq 0x15bf0
movq -0x98(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x34e0