// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
xorl %ebx, %ebx
movl %ebx, (%rdi)
movb %bl, 0x4(%rdi)
movq %rbx, 0x8(%rdi)
movb $0x1, 0x10(%rdi)
fldz
fstpt 0x20(%rdi)
movl %ebx, 0x30(%rdi)
movq $-0x1, 0x40(%rdi)
leaq 0x58(%rdi), %rax
movq %rax, 0x48(%rdi)
movq %rbx, 0x50(%rdi)
movq %rdi, 0x18(%rsp)
movb %bl, 0x58(%rdi)
movq (%rsi), %r13
movl $0x40, %ebp
cmpq %rdx, %r13
je 0x461c
xorl %r12d, %r12d
movb (%r13), %bl
movsbl %bl, %edi
callq 0x2060
testl %eax, %eax
je 0x45e9
cmpl $0x4, %ebp
jl 0x45de
addl $-0x4, %ebp
leal -0x61(%rbx), %eax
cmpb $0x6, %al
movl $0xd0, %eax
movl $0xa9, %ecx
cmovbl %ecx, %eax
leal -0x41(%rbx), %ecx
cmpb $0x6, %cl
movl $0xc9, %ecx
cmovbl %ecx, %eax
addb %bl, %al
movzbl %al, %eax
movl %ebp, %ecx
shlq %cl, %rax
addq %rax, %r12
incq %r13
movq %r13, (%r15)
cmpq %r14, %r13
jne 0x4599
testq %r12, %r12
je 0x460c
movq %r12, %rax
shrq $0x3c, %rax
jne 0x4610
movq %r12, %rbx
addl $0x4, %ebp
shlq $0x4, %rbx
shrq $0x38, %r12
movq %rbx, %r12
je 0x45fa
jmp 0x4613
xorl %ebx, %ebx
jmp 0x461c
movq %r12, %rbx
cmpl $0x41, %ebp
jge 0x471d
cmpq %r14, %r13
je 0x46ab
cmpb $0x2e, (%r13)
jne 0x46ab
incq %r13
movq %r13, (%r15)
cmpq %r14, %r13
je 0x46ab
movl %ebp, %r12d
movq %r14, 0x8(%rsp)
movq %r15, %r14
movb (%r13), %r15b
movsbl %r15b, %edi
callq 0x2060
testl %eax, %eax
je 0x46a3
cmpl $0x4, %r12d
jl 0x468e
addl $-0x4, %r12d
leal -0x61(%r15), %eax
cmpb $0x6, %al
movl $0xd0, %eax
movl $0xa9, %ecx
cmovbl %ecx, %eax
leal -0x41(%r15), %ecx
cmpb $0x6, %cl
movl $0xc9, %ecx
cmovbl %ecx, %eax
addb %r15b, %al
movzbl %al, %eax
movl %r12d, %ecx
shlq %cl, %rax
addq %rax, %rbx
incq %r13
movq %r14, %r15
movq %r13, (%r14)
movq 0x8(%rsp), %r14
cmpq %r14, %r13
jne 0x463f
jmp 0x46ab
movq %r14, %r15
movq 0x8(%rsp), %r14
negl %ebp
movslq %ebp, %rax
movq %rax, 0x10(%rsp)
cmpq %r14, %r13
je 0x46de
cmpb $0x70, (%r13)
je 0x46c8
cmpb $0x50, (%r13)
jne 0x46de
incq %r13
movq %r13, (%r15)
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4245
movq 0x18(%rsp), %rax
movl $0xa, (%rax)
movq %rbx, 0x20(%rsp)
xorl %edx, %edx
testq %rbx, %rbx
sets %dl
fildll 0x20(%rsp)
leaq 0xf047(%rip), %rcx      # 0x13748
fadds (%rcx,%rdx,4)
fstpt 0x20(%rax)
movl 0x10(%rsp), %ecx
movl %ecx, 0x30(%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf3c9(%rip), %rdi      # 0x13aed
leaq 0xf3cf(%rip), %rsi      # 0x13afa
leaq 0xf3d2(%rip), %rcx      # 0x13b04
movl $0x59f, %edx            # imm = 0x59F
callq 0x2130