// File: joncampbell123[P]haxcc/haxpp.cpp
// Function: parse_dec_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>>>)
long double parse_dec_number_float_sub(string::iterator &li,const string::iterator lie) {
    long double r = 0;

    if (li != lie) {
        unsigned long long tmp = 0,tmpdiv = 1;

        /* NTS: Process digits in batches to allow precision in integer math and reduce cumulative floating point error */
        while (li != lie && isdigit(*li)) {
            if (tmpdiv >= 100000000000ull) {
                r = (r * tmpdiv) + tmp;
                tmpdiv = 1;
                tmp = 0;
            }

            tmp = (tmp * 10ull) + ((unsigned long long)(*(li++) - '0'));
            tmpdiv *= 10ull;
        }

        if (tmpdiv > 1ull) {
            r = (r * tmpdiv) + tmp;
        }
    }

    if (li != lie && *li == '.') {
        unsigned long long tmp = 0,tmpdiv = 1;
        long double d = 1.0;

        /* skip '.' */
        li++;

        /* NTS: Process digits in batches to allow precision in integer math and reduce cumulative floating point error */
        while (li != lie && isdigit(*li)) {
            if (tmpdiv >= 100000000000ull) {
                d *= (signed long long)tmpdiv; /* only because on x86 there is only a signed divide by int */
                r += tmp / d;
                tmpdiv = 1;
                tmp = 0;
            }

            tmp = (tmp * 10ull) + ((unsigned long long)(*(li++) - '0'));
            tmpdiv *= 10ull;
        }

        if (tmpdiv > 1ull) {
            d *= (signed long long)tmpdiv; /* only because on x86 there is only a signed divide by int */
            r += tmp / d;
        }
    }

    if (strit_next_match_inc(li,lie,'e'))
        parse_float_exponent(r,li,lie);
    else if (strit_next_match_inc(li,lie,'E'))
        parse_float_exponent(r,li,lie);

    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
fldz
fstpt -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x15a10
testb $0x1, %al
jne 0x6e6e
jmp 0x6fe3
movq $0x0, -0x28(%rbp)
movq $0x1, -0x30(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x15a10
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0xd1(%rbp)
jne 0x6e9c
jmp 0x6eb9
movq -0x10(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %edi
callq 0x3260
cmpl $0x0, %eax
setne %al
movb %al, -0xd1(%rbp)
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0x6ec8
jmp 0x6f87
movabsq $0x174876e800, %rax     # imm = 0x174876E800
cmpq %rax, -0x30(%rbp)
jb 0x6f3b
fldt -0x20(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xd0(%rbp)
testq %rax, %rax
sets %al
movzbl %al, %eax
movl %eax, %ecx
fildll -0xd0(%rbp)
leaq 0x1db1a(%rip), %rax     # 0x24a18
flds (%rax,%rcx,4)
faddp %st, %st(1)
movq -0x28(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
testq %rcx, %rcx
sets %cl
movzbl %cl, %ecx
fildll -0xc8(%rbp)
flds (%rax,%rcx,4)
faddp %st, %st(1)
fxch %st(2)
fmulp %st, %st(1)
faddp %st, %st(1)
fstpt -0x20(%rbp)
movq $0x1, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
imulq $0xa, -0x28(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x15a70
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x15a50
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movsbl (%rcx), %ecx
subl $0x30, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
imulq $0xa, -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x6e7e
cmpq $0x1, -0x30(%rbp)
jbe 0x6fe1
fldt -0x20(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
testq %rax, %rax
sets %al
movzbl %al, %eax
movl %eax, %ecx
fildll -0xa0(%rbp)
leaq 0x1da64(%rip), %rax     # 0x24a18
flds (%rax,%rcx,4)
faddp %st, %st(1)
movq -0x28(%rbp), %rcx
movq %rcx, -0x98(%rbp)
testq %rcx, %rcx
sets %cl
movzbl %cl, %ecx
fildll -0x98(%rbp)
flds (%rax,%rcx,4)
faddp %st, %st(1)
fxch %st(2)
fmulp %st, %st(1)
faddp %st, %st(1)
fstpt -0x20(%rbp)
jmp 0x6fe3
movq -0x10(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x15a10
testb $0x1, %al
jne 0x6ff9
jmp 0x718d
movq -0x10(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x718d
movq $0x0, -0x40(%rbp)
movq $0x1, -0x48(%rbp)
fld1
fstpt -0x60(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x15a70
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x15a10
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0xe1(%rbp)
jne 0x7050
jmp 0x706d
movq -0x10(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %edi
callq 0x3260
cmpl $0x0, %eax
setne %al
movb %al, -0xe1(%rbp)
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x707c
jmp 0x7136
movabsq $0x174876e800, %rax     # imm = 0x174876E800
cmpq %rax, -0x48(%rbp)
jb 0x70ea
movq -0x48(%rbp), %rax
movq %rax, -0xc0(%rbp)
fildll -0xc0(%rbp)
fldt -0x60(%rbp)
fmulp %st, %st(1)
fstpt -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xb8(%rbp)
testq %rax, %rax
sets %al
movzbl %al, %eax
movl %eax, %ecx
fildll -0xb8(%rbp)
leaq 0x1d950(%rip), %rax     # 0x24a18
flds (%rax,%rcx,4)
faddp %st, %st(1)
fldt -0x60(%rbp)
fdivrp %st, %st(1)
fldt -0x20(%rbp)
faddp %st, %st(1)
fstpt -0x20(%rbp)
movq $0x1, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
imulq $0xa, -0x40(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x15a70
movq %rax, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x15a50
movq %rax, %rcx
movq -0xf0(%rbp), %rax
movsbl (%rcx), %ecx
subl $0x30, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
imulq $0xa, -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x7032
cmpq $0x1, -0x48(%rbp)
jbe 0x718b
movq -0x48(%rbp), %rax
movq %rax, -0xb0(%rbp)
fildll -0xb0(%rbp)
fldt -0x60(%rbp)
fmulp %st, %st(1)
fstpt -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xa8(%rbp)
testq %rax, %rax
sets %al
movzbl %al, %eax
movl %eax, %ecx
fildll -0xa8(%rbp)
leaq 0x1d89f(%rip), %rax     # 0x24a18
flds (%rax,%rcx,4)
faddp %st, %st(1)
fldt -0x60(%rbp)
fdivrp %st, %st(1)
fldt -0x20(%rbp)
faddp %st, %st(1)
fstpt -0x20(%rbp)
jmp 0x718d
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rsi
movl $0x65, %edx
callq 0x64a0
testb $0x1, %al
jne 0x71ad
jmp 0x71c8
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x6500
jmp 0x720f
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rsi
movl $0x45, %edx
callq 0x64a0
testb $0x1, %al
jne 0x71ee
jmp 0x720d
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x6500
jmp 0x720f
fldt -0x20(%rbp)
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax,%rax)