// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: string_to_double_with_radix_1
static s7_double string_to_double_with_radix_1(const char *ur_str, int32_t radix)
#endif
        {
            /* strtod follows LANG which is not what we want (only "." is decimal point in Scheme).
             *   To overcome LANG in strtod would require screwing around with setlocale which never works.
             *   So we use our own code -- according to valgrind, this function is much faster than strtod.
             * comma as decimal point causes ambiguities: `(+ ,1 2) etc
             */

            int32_t i, sign = 1, frac_len, int_len, dig, max_len, exponent = 0;
            int64_t int_part = 0, frac_part = 0;
            char *str;
            char *ipart, *fpart;
            s7_double dval = 0.0;

            /* there's an ambiguity in number notation here if we allow "1e1" or "1.e1" in base 16 (or 15) -- is e a digit or an exponent marker?
             *   but 1e+1, for example disambiguates it -- kind of messy! -- the scheme spec says "e" can only occur in base 10.
             * '@' can now be used as the exponent marker (26-Mar-12).
             * Another slight ambiguity: 1+1/2i is parsed as 1 + 0.5i, not 1+1/(2i), or (1+1)/(2i) or (1+1/2)i etc
             */

            max_len = s7_int_digits_by_radix[radix];
            str = (char *)ur_str;

            if (*str == '+')
                str++;
            else
            {
                if (*str == '-')
                {
                    str++;
                    sign = -1;
                }
            }
            while (*str == '0') {str++;};

            ipart = str;
            while (digits[(int32_t)(*str)] < radix) str++;
            int_len = str - ipart;

            if (*str == '.') str++;
            fpart = str;
            while (digits[(int32_t)(*str)] < radix) str++;
            frac_len = str - fpart;

            if ((*str) && (exponent_table[(uint8_t)(*str)]))
            {
                int32_t exp_negative = false;
                str++;
                if (*str == '+')
                    str++;
                else
                {
                    if (*str == '-')
                    {
                        str++;
                        exp_negative = true;
                    }
                }
                while ((dig = digits[(int32_t)(*str++)]) < 10) /* exponent itself is always base 10 */
                {
#if HAVE_OVERFLOW_CHECKS
                    if ((int32_multiply_overflow(exponent, 10, &exponent)) ||
                            (int32_add_overflow(exponent, dig, &exponent)))
                    {
                        exponent = 1000000; /* see below */
                        break;
                    }
#else
                    exponent = dig + (exponent * 10);
#endif
                }
#if (!defined(__GNUC__)) || (__GNUC__ < 5)
                if (exponent < 0)         /* we overflowed, so make sure we notice it below (need to check for 0.0e... first) (Brian Damgaard) */
                    exponent = 1000000;     /*   see below for examples -- this number needs to be very big but not too big for add */
#endif
                if (exp_negative)
                    exponent = -exponent;

                /*           2e12341234123123123123213123123123 -> 0.0
                 * but exp len is not the decider: 2e00000000000000000000000000000000000000001 -> 20.0
                 * first zero: 2e123412341231231231231
                 * then:     2e12341234123123123123123123 -> inf
                 * then:     2e123412341231231231231231231231231231 -> 0.0
                 *           2e-123412341231231231231 -> inf
                 * but:      0e123412341231231231231231231231231231
                 */
            }

#if WITH_GMP
            /* 9007199254740995.0 */
            if (int_len + frac_len >= max_len)
            {
                (*overflow) = true;
                return(0.0);
            }
#endif

            str = ipart;
            if ((int_len + exponent) > max_len)
            {
                /*  12341234.56789e12                   12341234567889999872.0              1.234123456789e+19
                 * -1234567890123456789.0              -1234567890123456768.0              -1.2345678901235e+18
                 *  12345678901234567890.0              12345678901234567168.0              1.2345678901235e+19
                 *  123.456e30                          123456000000000012741097792995328.0 1.23456e+32
                 *  12345678901234567890.0e12           12345678901234569054409354903552.0  1.2345678901235e+31
                 *  1.234567890123456789012e30          1234567890123456849145940148224.0   1.2345678901235e+30
                 *  1e20                                100000000000000000000.0             1e+20
                 *  1234567890123456789.0               1234567890123456768.0               1.2345678901235e+18
                 *  123.456e16                          1234560000000000000.0               1.23456e+18
                 *  98765432101234567890987654321.0e-5  987654321012345728401408.0          9.8765432101235e+23
                 *  98765432101234567890987654321.0e-10 9876543210123456512.0               9.8765432101235e+18
                 *  0.00000000000000001234e20           1234.0
                 *  0.000000000000000000000000001234e30 1234.0
                 *  0.0000000000000000000000000000000000001234e40 1234.0
                 *  0.000000000012345678909876543210e15 12345.678909877
                 *  0e1000                              0.0
                 */

                for (i = 0; i < max_len; i++)
                {
                    dig = digits[(int32_t)(*str++)];
                    if (dig < radix)
                        int_part = dig + (int_part * radix);
                    else break;
                }

                /* if the exponent is huge, check for 0 int_part and frac_part before complaining (0e1000 or 0.0e1000)
                */
                if ((int_part == 0) &&
                        (exponent > max_len))
                {
                    /* if frac_part is also 0, return 0.0 */
                    if (frac_len == 0)
                        return(0.0);

                    str = fpart;
                    while ((dig = digits[(int32_t)(*str++)]) < radix)
                        frac_part = dig + (frac_part * radix);
                    if (frac_part == 0)
                        return(0.0);

#if WITH_GMP
                    (*overflow) = true;
#endif
                }

#if WITH_GMP
                (*overflow) = ((int_part > 0) || (exponent > 20));    /* .1e310 is a tricky case */
#endif

                if (int_part != 0) /* 0.<310 zeros here>1e310 for example --
                                    *   pow (via dpow) thinks it has to be too big, returns Nan,
                                    *   then Nan * 0 -> Nan and the NaN propagates
                                    */
                {
                    if (int_len <= max_len)
                        dval = int_part * dpow(radix, exponent);
                    else dval = int_part * dpow(radix, exponent + int_len - max_len);
                }
                else dval = 0.0;

                /* shift by exponent, but if int_len > max_len then we assumed (see below) int_len - max_len 0's on the left */
                /*   using int_to_int or table lookups here instead of pow did not make any difference in speed */

                if (int_len < max_len)
                {
                    int32_t k, flen;
                    str = fpart;

                    for (k = 0; (frac_len > 0) && (k < exponent); k += max_len)
                    {
                        if (frac_len > max_len) flen = max_len; else flen = frac_len;
                        frac_len -= max_len;

                        frac_part = 0;
                        for (i = 0; i < flen; i++)
                            frac_part = digits[(int32_t)(*str++)] + (frac_part * radix);

                        if (frac_part != 0)                                /* same pow->NaN problem as above can occur here */
                            dval += frac_part * dpow(radix, exponent - flen - k);
                    }
                }
                else
                {
                    /* some of the fraction is in the integer part before the negative exponent shifts it over */
                    if (int_len > max_len)
                    {
                        int32_t ilen;
                        /* str should be at the last digit we read */
                        ilen = int_len - max_len;                          /* we read these above */
                        if (ilen > max_len)
                            ilen = max_len;

                        for (i = 0; i < ilen; i++)
                            frac_part = digits[(int32_t)(*str++)] + (frac_part * radix);

                        dval += frac_part * dpow(radix, exponent - ilen);
                    }
                }

                return(sign * dval);
            }

            /* int_len + exponent <= max_len */

            if (int_len <= max_len)
            {
                int32_t int_exponent;

                /* a better algorithm (since the inaccuracies are in the radix^exponent portion):
                 *   strip off leading zeros and possible sign,
                 *   strip off digits beyond max_len, then remove any trailing zeros.
                 *     (maybe fiddle with the lowest order digit here for rounding, but I doubt it matters)
                 *   read digits until end of number or max_len reached, ignoring the decimal point
                 *   get exponent and use it and decimal point location to position the current result integer
                 * this always combines the same integer and the same exponent no matter how the number is expressed.
                 */

                int_exponent = exponent;
                if (int_len > 0)
                {
                    char *iend;
                    iend = (char *)(str + int_len - 1);
                    while ((*iend == '0') && (iend != str)) {iend--; int_exponent++;}

                    while (str <= iend)
                        int_part = digits[(int32_t)(*str++)] + (int_part * radix);
                }
                if (int_exponent != 0)
                    dval = int_part * dpow(radix, int_exponent);
                else dval = (s7_double)int_part;
            }
            else
            {
                int32_t len, flen;
                int64_t frpart = 0;

                /* 98765432101234567890987654321.0e-20    987654321.012346
                 * 98765432101234567890987654321.0e-29    0.98765432101235
                 * 98765432101234567890987654321.0e-30    0.098765432101235
                 * 98765432101234567890987654321.0e-28    9.8765432101235
                 */

                len = int_len + exponent;
                for (i = 0; i < len; i++)
                    int_part = digits[(int32_t)(*str++)] + (int_part * radix);

                flen = -exponent;
                if (flen > max_len)
                    flen = max_len;

                for (i = 0; i < flen; i++)
                    frpart = digits[(int32_t)(*str++)] + (frpart * radix);

                if (len <= 0)
                    dval = int_part + frpart * dpow(radix, len - flen);
                else dval = int_part + frpart * dpow(radix, -flen);
            }

            if (frac_len > 0)
            {
                str = fpart;
                if (frac_len <= max_len)
                {
                    /* splitting out base 10 case saves very little here */
                    /* this ignores trailing zeros, so that 0.3 equals 0.300 */
                    char *fend;

                    fend = (char *)(str + frac_len - 1);
                    while ((*fend == '0') && (fend != str)) {fend--; frac_len--;} /* (= .6 0.6000) */

                    if ((frac_len & 1) == 0)
                    {
                        while (str <= fend)
                        {
                            frac_part = digits[(int32_t)(*str++)] + (frac_part * radix);
                            frac_part = digits[(int32_t)(*str++)] + (frac_part * radix);
                        }
                    }
                    else
                    {
                        while (str <= fend)
                            frac_part = digits[(int32_t)(*str++)] + (frac_part * radix);
                    }
                    dval += frac_part * dpow(radix, exponent - frac_len);

                    /* 0.6:    frac:    6, exp: 0.10000000000000000555, val: 0.60000000000000008882
                     * 0.60:   frac:   60, exp: 0.01000000000000000021, val: 0.59999999999999997780
                     * 0.6000: frac: 6000, exp: 0.00010000000000000000, val: 0.59999999999999997780
                     * (= 0.6 0.60): #f
                     * (= #i3/5 0.6): #f
                     * so (string->number (number->string num)) == num only if both num's are the same text (or you get lucky)
                     * (= 0.6 6e-1): #t ; but not 60e-2
                     * to fix the 0.60 case, we need to ignore trailing post-dot zeros.
                     */
                }
                else
                {
                    if (exponent <= 0)
                    {
                        for (i = 0; i < max_len; i++)
                            frac_part = digits[(int32_t)(*str++)] + (frac_part * radix);

                        dval += frac_part * dpow(radix, exponent - max_len);
                    }
                    else
                    {
                        /* 1.0123456789876543210e1         10.12345678987654373771
                         * 1.0123456789876543210e10        10123456789.87654304504394531250
                         * 0.000000010000000000000000e10   100.0
                         * 0.000000010000000000000000000000000000000000000e10 100.0
                         * 0.000000012222222222222222222222222222222222222e10 122.22222222222222
                         * 0.000000012222222222222222222222222222222222222e17 1222222222.222222
                         */

                        int_part = 0;
                        for (i = 0; i < exponent; i++)
                            int_part = digits[(int32_t)(*str++)] + (int_part * radix);

                        frac_len -= exponent;
                        if (frac_len > max_len)
                            frac_len = max_len;

                        for (i = 0; i < frac_len; i++)
                            frac_part = digits[(int32_t)(*str++)] + (frac_part * radix);

                        dval += int_part + frac_part * dpow(radix, -frac_len);
                    }
                }
            }

#if WITH_GMP
            if ((int_part == 0) &&
                    (frac_part == 0))
                return(0.0);
            (*overflow) = ((frac_len - exponent) > max_len);
#endif

            return(sign * dval);
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, %r10d
movq %rdi, %r14
movslq %esi, %r15
leaq 0xc0d36(%rip), %rax     # 0x15a2e0
movslq (%rax,%r15,4), %r8
movl %r8d, %edi
movzbl (%r14), %eax
cmpl $0x2d, %eax
je 0x995d2
movsd 0x75a6e(%rip), %xmm0    # 0x10f030
movsd %xmm0, 0x40(%rsp)
cmpl $0x2b, %eax
jne 0x995e3
incq %r14
jmp 0x995e3
incq %r14
movsd 0x75a73(%rip), %xmm0    # 0x10f050
movsd %xmm0, 0x40(%rsp)
decq %r14
cmpb $0x30, 0x1(%r14)
leaq 0x1(%r14), %r14
je 0x995e6
movl %r8d, %eax
negl %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %ebx, %ebx
leaq 0xc405c(%rip), %r11     # 0x15d660
movsbq (%r14,%rbx), %rdx
incl %ecx
incq %rbx
cmpl %r10d, (%r11,%rdx,4)
jl 0x99604
xorl %esi, %esi
cmpb $0x2e, %dl
sete %sil
movq %rsi, 0x30(%rsp)
addq %rbx, %rsi
leaq (%r14,%rsi), %rbp
decq %rbp
movl %r8d, %edx
notl %edx
addq %rbx, %rdx
movq %rdx, 0x50(%rsp)
leaq -0x1(%rbx), %rdx
movq %rdx, 0x8(%rsp)
leaq (%rbx,%r14), %rdx
decq %rdx
movq %rdx, 0x48(%rsp)
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
leaq (%rsi,%r13), %rdx
movsbq -0x1(%r14,%rdx), %rdx
incl %r12d
incq %r13
cmpl %r10d, (%r11,%rdx,4)
jl 0x99657
movzbl %dl, %edx
xorl %r9d, %r9d
testq %rdx, %rdx
movq %r8, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
movq %rsi, (%rsp)
je 0x99726
leaq 0xc45cf(%rip), %rsi     # 0x15dc60
cmpb $0x1, (%rdx,%rsi)
movq (%rsp), %rsi
jne 0x99726
leaq (%rsi,%r13), %rdx
movzbl -0x1(%r14,%rdx), %esi
cmpl $0x2b, %esi
je 0x996c2
cmpl $0x2d, %esi
jne 0x996cf
movq (%rsp), %rdx
leaq (%r14,%rdx), %rsi
addq %r13, %rsi
xorl %edx, %edx
jmp 0x996d8
movq (%rsp), %rdx
leaq (%r14,%rdx), %rsi
addq %r13, %rsi
jmp 0x996d6
leaq (%r14,%rdx), %rsi
decq %rsi
movb $0x1, %dl
xorl %edi, %edi
movsbq (%rsi), %r8
movl (%r11,%r8,4), %r9d
cmpl $0x9, %r9d
jg 0x996fd
imull $0xa, %edi, %edi
movl $0xf4240, %r8d          # imm = 0xF4240
jo 0x99700
incq %rsi
addl %r9d, %edi
jno 0x996da
jmp 0x99700
movl %edi, %r8d
testl %r8d, %r8d
movl $0xf4240, %esi          # imm = 0xF4240
cmovnsl %r8d, %esi
movl %esi, %r9d
negl %r9d
testb %dl, %dl
cmovnel %esi, %r9d
movq 0x18(%rsp), %r8
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
leaq -0x1(%r13), %rdx
movq %rdx, 0x38(%rsp)
movl %r9d, %edx
movq %rdx, 0x20(%rsp)
addq %rbx, %rdx
decq %rdx
cmpl %r8d, %edx
movq %r9, 0x28(%rsp)
jle 0x99788
testl %r8d, %r8d
jle 0x998ad
xorl %esi, %esi
xorl %ecx, %ecx
movq %rsi, %rdx
movsbq (%r14,%rsi), %rsi
movslq (%r11,%rsi,4), %rsi
cmpl %r10d, %esi
jge 0x99774
imulq %r15, %rcx
addq %rsi, %rcx
leaq 0x1(%rdx), %rsi
cmpl %esi, %edi
jne 0x99754
addq %r14, %rdx
incq %rdx
movq %rdx, 0x30(%rsp)
movq (%rsp), %rsi
jmp 0x998b4
movq 0x8(%rsp), %rax
cmpl %eax, %r8d
jge 0x99859
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
movq %r14, %rax
testl %edx, %edx
jle 0x997db
movslq %r9d, %rax
movslq 0x8(%rsp), %rcx
addq %rax, %rcx
xorl %eax, %eax
xorl %esi, %esi
movsbq (%r14,%rax), %rdi
movslq (%r11,%rdi,4), %rdi
imulq %r15, %rsi
addq %rdi, %rsi
incq %rax
cmpl %eax, %ecx
jne 0x997b4
xorps %xmm2, %xmm2
cvtsi2sd %rsi, %xmm2
addq %r14, %rax
movq 0x10(%rsp), %rdi
movl %r9d, %esi
negl %esi
cmpl %esi, %r8d
movl %esi, %ecx
cmovll %r8d, %ecx
testl %ecx, %ecx
jle 0x9982a
movslq %esi, %rsi
cmpq %rsi, %r8
cmovlq %r8, %rsi
xorl %edi, %edi
xorl %r8d, %r8d
movsbq (%rax,%rdi), %r9
movslq (%r11,%r9,4), %r9
imulq %r15, %r8
addq %r9, %r8
incq %rdi
cmpl %edi, %esi
jne 0x997fc
xorps %xmm1, %xmm1
cvtsi2sd %r8, %xmm1
movq 0x28(%rsp), %r9
movq 0x18(%rsp), %r8
movq 0x10(%rsp), %rdi
testl %edx, %edx
jle 0x999b6
leal -0x41(%rcx), %eax
cmpl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
ja 0x99a28
negl %ecx
cvtsi2sd %r10d, %xmm0
movsd %xmm1, 0x8(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
jmp 0x999e5
testl %eax, %eax
jle 0x99a1d
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl $0x1, %edx
subq %rcx, %rdx
xorl %esi, %esi
leaq (%rcx,%rsi), %rdi
leaq -0x1(%rsi), %rax
cmpb $0x30, -0x1(%r14,%rdi)
jne 0x99889
cmpq %rsi, %rdx
movq %rax, %rsi
jne 0x99871
addq %r14, %rcx
addq %rax, %rcx
leal -0x1(%r9), %ebx
subq %rax, %rbx
cmpq %rcx, %r14
jbe 0x99a34
xorpd %xmm1, %xmm1
movq 0x10(%rsp), %rdi
jmp 0x99a5a
xorl %ecx, %ecx
movq %r14, 0x30(%rsp)
xorl %r12d, %r12d
testq %rcx, %rcx
jne 0x99908
cmpl %r8d, %r9d
jle 0x99908
xorpd %xmm0, %xmm0
cmpl $0x1, %r13d
je 0x99f82
addq %rsi, %r14
movsbq (%rbp), %rdx
movl (%r11,%rdx,4), %edx
xorl %r12d, %r12d
cmpl %r10d, %edx
jge 0x998fa
movslq %edx, %rdx
imulq %r15, %r12
addq %rdx, %r12
movsbq (%r14), %rdx
incq %r14
movl (%r11,%rdx,4), %edx
jmp 0x998de
movq %r14, 0x30(%rsp)
testq %r12, %r12
je 0x99f82
testq %rcx, %rcx
je 0x99958
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
cmpl 0x8(%rsp), %edi
movq 0x38(%rsp), %r13
jge 0x99966
movq 0x20(%rsp), %rdx
movl %edx, %ecx
subl %edi, %ecx
addl %ebx, %ecx
addl $-0x41, %ecx
cmpl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
ja 0x99ad1
movl %r8d, %eax
notl %eax
addq %rdx, %rax
addq %rbx, %rax
movsd %xmm0, (%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r10d, %xmm0
cvtsi2sd %eax, %xmm1
jmp 0x99987
xorpd %xmm2, %xmm2
movq 0x38(%rsp), %r13
jmp 0x99af8
leal -0x40(%r9), %eax
cmpl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
ja 0x99ada
movsd %xmm0, (%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r10d, %xmm0
cvtsi2sd %r9d, %xmm1
movl %r10d, %r14d
callq 0x9160
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
movq 0x28(%rsp), %r9
leaq 0xc3cbb(%rip), %r11     # 0x15d660
movl %r14d, %r10d
movapd %xmm0, %xmm2
movsd (%rsp), %xmm0
jmp 0x99af4
movl %r9d, %eax
subl %ecx, %eax
leal (%rax,%rbx), %ecx
addl $-0x41, %ecx
cmpl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
ja 0x99ca0
addq %rbx, %rax
decq %rax
cvtsi2sd %r10d, %xmm0
movsd %xmm1, 0x8(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movl %r10d, %ebx
movsd %xmm2, 0x20(%rsp)
callq 0x9160
movsd 0x20(%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
movq 0x28(%rsp), %r9
leaq 0xc3c4b(%rip), %r11     # 0x15d660
movl %ebx, %r10d
jmp 0x99cbb
xorpd %xmm1, %xmm1
movq 0x20(%rsp), %rbx
jmp 0x99a5e
movl $0x40, %eax
subl %ecx, %eax
jmp 0x99ca5
xorl %eax, %eax
movq %r14, %rdx
movq 0x10(%rsp), %rdi
movsbq (%rdx), %rsi
incq %rdx
movslq (%r11,%rsi,4), %rsi
imulq %r15, %rax
addq %rsi, %rax
cmpq %rcx, %rdx
jbe 0x99a3e
cvtsi2sd %rax, %xmm1
movq (%rsp), %rsi
testl %ebx, %ebx
je 0x99cc7
leal -0x40(%rbx), %eax
cmpl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
ja 0x99aaf
cvtsi2sd %r10d, %xmm0
movsd %xmm1, 0x8(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
movl %r10d, %ebx
callq 0x9160
movsd 0x8(%rsp), %xmm1
movq (%rsp), %rsi
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
movq 0x28(%rsp), %r9
leaq 0xc3bb6(%rip), %r11     # 0x15d660
movl %ebx, %r10d
jmp 0x99ac8
addl $0x40, %ebx
movq %r15, %rax
shlq $0xa, %rax
leaq 0xbc400(%rip), %rcx     # 0x155ec0
addq %rax, %rcx
movsd (%rcx,%rbx,8), %xmm0
mulsd %xmm0, %xmm1
jmp 0x99cc7
addl %edx, %eax
addl %ebx, %eax
addl $0x3f, %eax
jmp 0x99ade
leal 0x40(%r9), %eax
movq %r15, %rcx
shlq $0xa, %rcx
leaq 0xbc3d4(%rip), %rdx     # 0x155ec0
addq %rcx, %rdx
movsd (%rdx,%rax,8), %xmm2
mulsd %xmm0, %xmm2
movq 0x8(%rsp), %rax
cmpl %eax, %r8d
jle 0x99c14
testl %r13d, %r13d
jle 0x99e32
cmpl $0x0, 0x20(%rsp)
jle 0x99e32
xorps %xmm0, %xmm0
cvtsi2sd %r10d, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %ebx, %ebx
movq %r15, %rax
shlq $0xa, %rax
leaq 0xbc388(%rip), %r14     # 0x155ec0
addq %rax, %r14
movslq %r13d, %rax
cmpq %rax, %r8
movq %rax, %rcx
cmovlq %r8, %rcx
cmpl %eax, %edi
movl %r13d, %edx
cmovll %edi, %edx
cmpl %edi, %eax
movl %edi, %eax
cmovll %r13d, %eax
testl %eax, %eax
jle 0x99b91
decl %edx
leaq 0x1(%rbp), %rsi
xorl %edi, %edi
xorl %r12d, %r12d
movsbq (%rbp,%rdi), %r8
movslq (%r11,%r8,4), %r8
imulq %r15, %r12
addq %r8, %r12
incq %rdi
cmpl %edi, %ecx
jne 0x99b67
addq %rdx, %rsi
movq %rsi, %rbp
movq 0x18(%rsp), %r8
movq 0x10(%rsp), %rdi
jmp 0x99b94
xorl %r12d, %r12d
testq %r12, %r12
je 0x99bf7
addl %ebx, %eax
movl %r9d, %ecx
subl %eax, %ecx
leal -0x40(%rcx), %eax
cmpl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
ja 0x99bde
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
movsd 0x8(%rsp), %xmm0
movsd %xmm2, (%rsp)
callq 0x9160
movsd (%rsp), %xmm2
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
movq 0x28(%rsp), %r9
leaq 0xc3a84(%rip), %r11     # 0x15d660
jmp 0x99be7
addl $0x40, %ecx
movsd (%r14,%rcx,8), %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm2
subl %r8d, %r13d
testl %r13d, %r13d
jle 0x99e32
addl %r8d, %ebx
cmpl %r9d, %ebx
jl 0x99b3b
jmp 0x99e32
cmpl %eax, %edi
jge 0x99e32
movl %r8d, %eax
notl %eax
addl %ebx, %eax
cmpl %edi, %eax
cmovgel %edi, %eax
testl %eax, %eax
jle 0x99c56
movslq 0x50(%rsp), %rcx
cmpq %rcx, %r8
cmovlq %r8, %rcx
xorl %edx, %edx
movq 0x30(%rsp), %rdi
movsbq (%rdi,%rdx), %rsi
movslq (%r11,%rsi,4), %rsi
imulq %r15, %r12
addq %rsi, %r12
incq %rdx
cmpl %edx, %ecx
jne 0x99c3f
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
subl %eax, %r9d
leal -0x40(%r9), %eax
cmpl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
ja 0x99e12
xorps %xmm0, %xmm0
cvtsi2sd %r10d, %xmm0
movsd %xmm1, 0x10(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %r9d, %xmm1
movsd %xmm2, (%rsp)
callq 0x9160
movsd 0x10(%rsp), %xmm1
movsd (%rsp), %xmm2
jmp 0x99e2a
addl %ebx, %eax
addl $0x3f, %eax
movq %r15, %rcx
shlq $0xa, %rcx
leaq 0xbc20d(%rip), %rdx     # 0x155ec0
addq %rcx, %rdx
movsd (%rdx,%rax,8), %xmm0
movq (%rsp), %rsi
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
movq 0x38(%rsp), %rax
testl %eax, %eax
jle 0x99f78
cmpl %eax, %edi
jge 0x99d45
testl %r9d, %r9d
jle 0x99ddc
xorl %eax, %eax
movl %r9d, %ecx
movsbq (%rbp), %rdx
incq %rbp
movslq (%r11,%rdx,4), %rdx
imulq %r15, %rax
addq %rdx, %rax
decl %ecx
jne 0x99ce6
notl %r9d
leal (%r9,%r13), %ecx
cmpl %r8d, %ecx
cmovll %ecx, %r8d
testl %r8d, %r8d
jle 0x99ea0
addl %r13d, %r9d
cmpl %r9d, %edi
cmovll %edi, %r9d
xorl %ecx, %ecx
movsbq (%rbp), %rdx
incq %rbp
movslq (%r11,%rdx,4), %rdx
imulq %r15, %rcx
addq %rdx, %rcx
decl %r9d
jne 0x99d20
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
jmp 0x99ea4
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl $0x1, %ecx
subq %r12, %rcx
addq %r12, %rsi
xorl %edi, %edi
movl %r13d, %edx
leaq (%rsi,%rdi), %r8
leaq -0x1(%rdi), %rax
decl %edx
cmpb $0x30, -0x2(%r14,%r8)
jne 0x99d76
cmpq %rdi, %rcx
movq %rax, %rdi
jne 0x99d5c
movq (%rsp), %rcx
addq %r12, %rcx
addq %rcx, %r14
leaq (%rax,%r14), %rcx
decq %rcx
testb $0x1, %dl
jne 0x99dd3
cmpq %rcx, %rbp
ja 0x99dd8
xorl %edx, %edx
movq 0x30(%rsp), %r8
movq 0x48(%rsp), %rbx
leaq (%rbx,%r8), %rsi
addq $0x2, %rsi
movsbq -0x2(%rsi), %rdi
movslq (%r11,%rdi,4), %rdi
imulq %r15, %rdx
addq %rdi, %rdx
movsbq -0x1(%rsi), %rdi
movslq (%r11,%rdi,4), %rdi
imulq %r15, %rdx
addq %rdi, %rdx
addq $0x2, %rbx
cmpq %rcx, %rsi
jbe 0x99d9d
jmp 0x99e5b
cmpq %rcx, %rbp
jbe 0x99e41
xorl %edx, %edx
jmp 0x99e5b
testl %r8d, %r8d
jle 0x99f17
xorl %eax, %eax
xorl %ecx, %ecx
leaq (%rsi,%rax), %rdx
movsbq -0x1(%r14,%rdx), %rdx
movslq (%r11,%rdx,4), %rdx
imulq %r15, %rcx
addq %rdx, %rcx
incq %rax
cmpl %eax, %edi
jne 0x99de9
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
jmp 0x99f1b
addl $0x40, %r9d
shlq $0xa, %r15
leaq 0xbc09f(%rip), %rax     # 0x155ec0
addq %r15, %rax
movsd (%rax,%r9,8), %xmm0
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm2
movsd 0x40(%rsp), %xmm0
mulsd %xmm2, %xmm0
jmp 0x99f82
xorl %edx, %edx
movsbq (%rbp), %rsi
incq %rbp
movslq (%r11,%rsi,4), %rsi
imulq %r15, %rdx
addq %rsi, %rdx
cmpq %rcx, %rbp
jbe 0x99e43
xorps %xmm2, %xmm2
cvtsi2sd %rdx, %xmm2
movl %r9d, %ecx
subl %r13d, %ecx
movl %ecx, %edx
subl %eax, %edx
addl $-0x40, %edx
cmpl $0xffffff7f, %edx       # imm = 0xFFFFFF7F
ja 0x99e95
subq %rax, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %r10d, %xmm0
movsd %xmm1, 0x8(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
jmp 0x99f3f
subl %r13d, %r9d
subl %eax, %r9d
jmp 0x99f58
xorpd %xmm2, %xmm2
cvtsi2sd %rax, %xmm3
leal -0x41(%r8), %eax
cmpl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
ja 0x99ef2
negl %r8d
xorps %xmm0, %xmm0
cvtsi2sd %r10d, %xmm0
movsd %xmm1, 0x8(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %r8d, %xmm1
movsd %xmm2, 0x10(%rsp)
movsd %xmm3, 0x18(%rsp)
callq 0x9160
movsd 0x18(%rsp), %xmm3
movsd 0x10(%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
jmp 0x99f0d
movl $0x40, %eax
subl %r8d, %eax
shlq $0xa, %r15
leaq 0xbbfbb(%rip), %rcx     # 0x155ec0
addq %r15, %rcx
movsd (%rcx,%rax,8), %xmm0
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
jmp 0x99f74
xorpd %xmm2, %xmm2
subl %edi, %r9d
leal -0x40(%r9), %eax
cmpl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
ja 0x99f58
xorps %xmm0, %xmm0
cvtsi2sd %r10d, %xmm0
movsd %xmm1, 0x8(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %r9d, %xmm1
movsd %xmm2, 0x10(%rsp)
callq 0x9160
movsd 0x10(%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
jmp 0x99f70
addl $0x40, %r9d
shlq $0xa, %r15
leaq 0xbbf59(%rip), %rax     # 0x155ec0
addq %r15, %rax
movsd (%rax,%r9,8), %xmm0
mulsd %xmm0, %xmm2
addsd %xmm2, %xmm1
movsd 0x40(%rsp), %xmm0
mulsd %xmm1, %xmm0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq