// File: /workspace/github_cpp_makefile_star2_O2/mouda[P]LTE_random_access-simulate/specialfunctions.cpp
// Function: alglib_impl::invincompletebeta(double, double, double, alglib_impl::ae_state*)
double invincompletebeta(double a, double b, double y, ae_state *_state)
{
    double aaa;
    double bbb;
    double y0;
    double d;
    double yyy;
    double x;
    double x0;
    double x1;
    double lgm;
    double yp;
    double di;
    double dithresh;
    double yl;
    double yh;
    double xt;
    ae_int_t i;
    ae_int_t rflg;
    ae_int_t dir;
    ae_int_t nflg;
    double s;
    ae_int_t mainlooppos;
    ae_int_t ihalve;
    ae_int_t ihalvecycle;
    ae_int_t newt;
    ae_int_t newtcycle;
    ae_int_t breaknewtcycle;
    ae_int_t breakihalvecycle;
    double result;


    i = 0;
    ae_assert(ae_fp_greater_eq(y,0)&&ae_fp_less_eq(y,1), "Domain error in InvIncompleteBeta", _state);
    
    /*
     * special cases
     */
    if( ae_fp_eq(y,0) )
    {
        result = 0;
        return result;
    }
    if( ae_fp_eq(y,1.0) )
    {
        result = 1;
        return result;
    }
    
    /*
     * these initializations are not really necessary,
     * but without them compiler complains about 'possibly uninitialized variables'.
     */
    dithresh = 0;
    rflg = 0;
    aaa = 0;
    bbb = 0;
    y0 = 0;
    x = 0;
    yyy = 0;
    lgm = 0;
    dir = 0;
    di = 0;
    
    /*
     * normal initializations
     */
    x0 = 0.0;
    yl = 0.0;
    x1 = 1.0;
    yh = 1.0;
    nflg = 0;
    mainlooppos = 0;
    ihalve = 1;
    ihalvecycle = 2;
    newt = 3;
    newtcycle = 4;
    breaknewtcycle = 5;
    breakihalvecycle = 6;
    
    /*
     * main loop
     */
    for(;;)
    {
        
        /*
         * start
         */
        if( mainlooppos==0 )
        {
            if( ae_fp_less_eq(a,1.0)||ae_fp_less_eq(b,1.0) )
            {
                dithresh = 1.0e-6;
                rflg = 0;
                aaa = a;
                bbb = b;
                y0 = y;
                x = aaa/(aaa+bbb);
                yyy = incompletebeta(aaa, bbb, x, _state);
                mainlooppos = ihalve;
                continue;
            }
            else
            {
                dithresh = 1.0e-4;
            }
            yp = -invnormaldistribution(y, _state);
            if( ae_fp_greater(y,0.5) )
            {
                rflg = 1;
                aaa = b;
                bbb = a;
                y0 = 1.0-y;
                yp = -yp;
            }
            else
            {
                rflg = 0;
                aaa = a;
                bbb = b;
                y0 = y;
            }
            lgm = (yp*yp-3.0)/6.0;
            x = 2.0/(1.0/(2.0*aaa-1.0)+1.0/(2.0*bbb-1.0));
            d = yp*ae_sqrt(x+lgm, _state)/x-(1.0/(2.0*bbb-1.0)-1.0/(2.0*aaa-1.0))*(lgm+5.0/6.0-2.0/(3.0*x));
            d = 2.0*d;
            if( ae_fp_less(d,ae_log(ae_minrealnumber, _state)) )
            {
                x = 0;
                break;
            }
            x = aaa/(aaa+bbb*ae_exp(d, _state));
            yyy = incompletebeta(aaa, bbb, x, _state);
            yp = (yyy-y0)/y0;
            if( ae_fp_less(ae_fabs(yp, _state),0.2) )
            {
                mainlooppos = newt;
                continue;
            }
            mainlooppos = ihalve;
            continue;
        }
        
        /*
         * ihalve
         */
        if( mainlooppos==ihalve )
        {
            dir = 0;
            di = 0.5;
            i = 0;
            mainlooppos = ihalvecycle;
            continue;
        }
        
        /*
         * ihalvecycle
         */
        if( mainlooppos==ihalvecycle )
        {
            if( i<=99 )
            {
                if( i!=0 )
                {
                    x = x0+di*(x1-x0);
                    if( ae_fp_eq(x,1.0) )
                    {
                        x = 1.0-ae_machineepsilon;
                    }
                    if( ae_fp_eq(x,0.0) )
                    {
                        di = 0.5;
                        x = x0+di*(x1-x0);
                        if( ae_fp_eq(x,0.0) )
                        {
                            break;
                        }
                    }
                    yyy = incompletebeta(aaa, bbb, x, _state);
                    yp = (x1-x0)/(x1+x0);
                    if( ae_fp_less(ae_fabs(yp, _state),dithresh) )
                    {
                        mainlooppos = newt;
                        continue;
                    }
                    yp = (yyy-y0)/y0;
                    if( ae_fp_less(ae_fabs(yp, _state),dithresh) )
                    {
                        mainlooppos = newt;
                        continue;
                    }
                }
                if( ae_fp_less(yyy,y0) )
                {
                    x0 = x;
                    yl = yyy;
                    if( dir<0 )
                    {
                        dir = 0;
                        di = 0.5;
                    }
                    else
                    {
                        if( dir>3 )
                        {
                            di = 1.0-(1.0-di)*(1.0-di);
                        }
                        else
                        {
                            if( dir>1 )
                            {
                                di = 0.5*di+0.5;
                            }
                            else
                            {
                                di = (y0-yyy)/(yh-yl);
                            }
                        }
                    }
                    dir = dir+1;
                    if( ae_fp_greater(x0,0.75) )
                    {
                        if( rflg==1 )
                        {
                            rflg = 0;
                            aaa = a;
                            bbb = b;
                            y0 = y;
                        }
                        else
                        {
                            rflg = 1;
                            aaa = b;
                            bbb = a;
                            y0 = 1.0-y;
                        }
                        x = 1.0-x;
                        yyy = incompletebeta(aaa, bbb, x, _state);
                        x0 = 0.0;
                        yl = 0.0;
                        x1 = 1.0;
                        yh = 1.0;
                        mainlooppos = ihalve;
                        continue;
                    }
                }
                else
                {
                    x1 = x;
                    if( rflg==1&&ae_fp_less(x1,ae_machineepsilon) )
                    {
                        x = 0.0;
                        break;
                    }
                    yh = yyy;
                    if( dir>0 )
                    {
                        dir = 0;
                        di = 0.5;
                    }
                    else
                    {
                        if( dir<-3 )
                        {
                            di = di*di;
                        }
                        else
                        {
                            if( dir<-1 )
                            {
                                di = 0.5*di;
                            }
                            else
                            {
                                di = (yyy-y0)/(yh-yl);
                            }
                        }
                    }
                    dir = dir-1;
                }
                i = i+1;
                mainlooppos = ihalvecycle;
                continue;
            }
            else
            {
                mainlooppos = breakihalvecycle;
                continue;
            }
        }
        
        /*
         * breakihalvecycle
         */
        if( mainlooppos==breakihalvecycle )
        {
            if( ae_fp_greater_eq(x0,1.0) )
            {
                x = 1.0-ae_machineepsilon;
                break;
            }
            if( ae_fp_less_eq(x,0.0) )
            {
                x = 0.0;
                break;
            }
            mainlooppos = newt;
            continue;
        }
        
        /*
         * newt
         */
        if( mainlooppos==newt )
        {
            if( nflg!=0 )
            {
                break;
            }
            nflg = 1;
            lgm = lngamma(aaa+bbb, &s, _state)-lngamma(aaa, &s, _state)-lngamma(bbb, &s, _state);
            i = 0;
            mainlooppos = newtcycle;
            continue;
        }
        
        /*
         * newtcycle
         */
        if( mainlooppos==newtcycle )
        {
            if( i<=7 )
            {
                if( i!=0 )
                {
                    yyy = incompletebeta(aaa, bbb, x, _state);
                }
                if( ae_fp_less(yyy,yl) )
                {
                    x = x0;
                    yyy = yl;
                }
                else
                {
                    if( ae_fp_greater(yyy,yh) )
                    {
                        x = x1;
                        yyy = yh;
                    }
                    else
                    {
                        if( ae_fp_less(yyy,y0) )
                        {
                            x0 = x;
                            yl = yyy;
                        }
                        else
                        {
                            x1 = x;
                            yh = yyy;
                        }
                    }
                }
                if( ae_fp_eq(x,1.0)||ae_fp_eq(x,0.0) )
                {
                    mainlooppos = breaknewtcycle;
                    continue;
                }
                d = (aaa-1.0)*ae_log(x, _state)+(bbb-1.0)*ae_log(1.0-x, _state)+lgm;
                if( ae_fp_less(d,ae_log(ae_minrealnumber, _state)) )
                {
                    break;
                }
                if( ae_fp_greater(d,ae_log(ae_maxrealnumber, _state)) )
                {
                    mainlooppos = breaknewtcycle;
                    continue;
                }
                d = ae_exp(d, _state);
                d = (yyy-y0)/d;
                xt = x-d;
                if( ae_fp_less_eq(xt,x0) )
                {
                    yyy = (x-x0)/(x1-x0);
                    xt = x0+0.5*yyy*(x-x0);
                    if( ae_fp_less_eq(xt,0.0) )
                    {
                        mainlooppos = breaknewtcycle;
                        continue;
                    }
                }
                if( ae_fp_greater_eq(xt,x1) )
                {
                    yyy = (x1-x)/(x1-x0);
                    xt = x1-0.5*yyy*(x1-x);
                    if( ae_fp_greater_eq(xt,1.0) )
                    {
                        mainlooppos = breaknewtcycle;
                        continue;
                    }
                }
                x = xt;
                if( ae_fp_less(ae_fabs(d/x, _state),128.0*ae_machineepsilon) )
                {
                    break;
                }
                i = i+1;
                mainlooppos = newtcycle;
                continue;
            }
            else
            {
                mainlooppos = breaknewtcycle;
                continue;
            }
        }
        
        /*
         * breaknewtcycle
         */
        if( mainlooppos==breaknewtcycle )
        {
            dithresh = 256.0*ae_machineepsilon;
            mainlooppos = ihalve;
            continue;
        }
    }
    
    /*
     * done
     */
    if( rflg!=0 )
    {
        if( ae_fp_less_eq(x,ae_machineepsilon) )
        {
            x = 1.0-ae_machineepsilon;
        }
        else
        {
            x = 1.0-x;
        }
    }
    result = x;
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdi, %rbx
movapd %xmm1, 0xf0(%rsp)
movaps %xmm0, 0x100(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorpd %xmm1, %xmm1
movsd %xmm2, 0x80(%rsp)
movapd %xmm2, %xmm0
callq 0x24295
testb %al, %al
je 0xa9c1
movsd 0x25847(%rip), %xmm1    # 0x301f8
movsd 0x80(%rsp), %xmm0
callq 0x24259
jmp 0xa9c3
xorl %eax, %eax
movzbl %al, %edi
leaq 0x27dc5(%rip), %rsi     # 0x32792
movq %rbx, %rdx
callq 0x238ca
xorpd %xmm1, %xmm1
movsd 0x80(%rsp), %xmm0
callq 0x241f5
testb %al, %al
jne 0xbae1
movsd 0x25801(%rip), %xmm1    # 0x301f8
movsd 0x80(%rsp), %xmm0
movsd %xmm1, 0x8(%rsp)
callq 0x241f5
testb %al, %al
jne 0xbae1
movsd 0x257dd(%rip), %xmm3    # 0x301f8
movapd %xmm3, %xmm0
subsd 0x80(%rsp), %xmm0
movsd %xmm0, 0x118(%rsp)
movapd 0x100(%rsp), %xmm2
movapd %xmm2, %xmm0
movapd 0xf0(%rsp), %xmm1
addsd %xmm1, %xmm0
movapd %xmm2, %xmm4
divsd %xmm0, %xmm4
movapd %xmm4, 0x120(%rsp)
movapd %xmm2, %xmm0
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movapd %xmm0, 0x140(%rsp)
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
movapd %xmm1, 0x130(%rsp)
movb $0x1, %cl
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
xorl %edx, %edx
movl $0x0, %eax
movq %rax, 0x88(%rsp)
movl $0x0, %r15d
movq $0x0, 0x110(%rsp)
xorl %esi, %esi
xorl %edi, %edi
xorl %r8d, %r8d
xorl %ebp, %ebp
xorl %r9d, %r9d
movapd %xmm0, 0x90(%rsp)
movsd %xmm3, 0x78(%rsp)
movapd %xmm0, 0xd0(%rsp)
xorpd %xmm7, %xmm7
xorpd %xmm2, %xmm2
xorpd %xmm5, %xmm5
xorpd %xmm1, %xmm1
movapd %xmm1, 0xa0(%rsp)
xorpd %xmm4, %xmm4
movapd %xmm4, 0xb0(%rsp)
movq %r15, %r13
movq %rdx, %r14
movapd %xmm7, %xmm4
testb $0x1, %cl
je 0xabde
movsd %xmm4, 0x40(%rsp)
movapd %xmm2, 0x60(%rsp)
movsd %xmm3, 0x10(%rsp)
movaps 0x100(%rsp), %xmm0
movsd 0x256d2(%rip), %xmm1    # 0x301f8
callq 0x24259
testb %al, %al
jne 0xab4c
movaps 0xf0(%rsp), %xmm0
movsd 0x256b9(%rip), %xmm1    # 0x301f8
callq 0x24259
testb %al, %al
je 0xae97
movapd 0x100(%rsp), %xmm0
movaps 0xf0(%rsp), %xmm1
movaps 0x120(%rsp), %xmm2
movq %rbx, %rdi
callq 0x9cf5
movapd %xmm0, %xmm5
movb $0x1, %sil
movq $0x0, 0x88(%rsp)
movaps 0x120(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movsd 0x40(%rsp), %xmm7
movsd 0x26735(%rip), %xmm0    # 0x312d0
movq %r14, %rdx
movq %r13, %r15
xorl %ecx, %ecx
xorl %edi, %edi
xorl %r8d, %r8d
xorl %ebp, %ebp
xorl %r9d, %r9d
movsd 0x80(%rsp), %xmm1
movaps %xmm1, 0xa0(%rsp)
movapd 0xf0(%rsp), %xmm1
movapd 0x100(%rsp), %xmm2
movapd %xmm2, 0xb0(%rsp)
jmp 0xb1a8
movl %r9d, %eax
movl %ebp, %r10d
movl %r8d, %r11d
movl %edi, %r12d
movapd %xmm0, %xmm6
movb $0x1, %dil
xorl %edx, %edx
movsd 0x2588d(%rip), %xmm7    # 0x30488
movl $0x0, %r15d
movl $0x0, %ecx
movl $0x0, %r8d
movl $0x0, %ebp
movl $0x0, %r9d
testb $0x1, %sil
movl $0x0, %esi
jne 0xaaf1
testb $0x1, %r12b
je 0xaefb
movb $0x1, %r8b
xorl %ecx, %ecx
movapd %xmm4, %xmm7
movapd %xmm6, %xmm0
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %edi
cmpq $0x63, %r14
jg 0xaaf1
testq %r14, %r14
movapd %xmm1, 0x50(%rsp)
movsd %xmm3, 0x10(%rsp)
movapd %xmm2, 0x60(%rsp)
movsd %xmm6, 0x18(%rsp)
je 0xae28
movsd 0x78(%rsp), %xmm1
movapd 0x90(%rsp), %xmm0
subsd %xmm0, %xmm1
movsd %xmm4, 0x40(%rsp)
movsd %xmm1, 0x8(%rsp)
mulsd %xmm1, %xmm4
addsd %xmm0, %xmm4
movsd %xmm4, 0x20(%rsp)
movapd %xmm4, %xmm0
movsd 0x2554c(%rip), %xmm1    # 0x301f8
callq 0x241f5
movsd 0x265d7(%rip), %xmm0    # 0x31290
testb %al, %al
jne 0xacc3
movsd 0x20(%rsp), %xmm0
movapd %xmm0, 0x20(%rsp)
xorpd %xmm1, %xmm1
callq 0x241f5
testb %al, %al
je 0xad1a
movsd 0x8(%rsp), %xmm2
movsd 0x257a4(%rip), %xmm0    # 0x30488
mulsd %xmm0, %xmm2
addsd 0x90(%rsp), %xmm2
xorpd %xmm1, %xmm1
movapd %xmm2, 0x20(%rsp)
movapd %xmm2, %xmm0
callq 0x241f5
movsd 0x2577c(%rip), %xmm0    # 0x30488
movsd %xmm0, 0x40(%rsp)
testb %al, %al
jne 0xba8b
movaps 0xb0(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movq %rbx, %rdi
callq 0x9cf5
movaps %xmm0, 0x30(%rsp)
movapd 0x90(%rsp), %xmm1
addsd 0x78(%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x2440c
movsd 0x18(%rsp), %xmm1
callq 0x24239
movapd 0x30(%rsp), %xmm5
movapd 0x50(%rsp), %xmm1
movb $0x1, %bpl
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %r9d
testb %al, %al
movsd 0x10(%rsp), %xmm3
movapd 0x60(%rsp), %xmm2
jne 0xaaf1
movapd 0xa0(%rsp), %xmm1
subsd %xmm1, %xmm5
divsd %xmm1, %xmm5
movapd %xmm5, %xmm0
movq %rbx, %rdi
callq 0x2440c
movsd 0x18(%rsp), %xmm1
callq 0x24239
movsd 0x18(%rsp), %xmm0
movsd 0x40(%rsp), %xmm4
movapd 0x30(%rsp), %xmm5
movapd 0x60(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
movapd 0x50(%rsp), %xmm1
xorl %ecx, %ecx
movapd %xmm4, %xmm7
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %r9d
testb %al, %al
jne 0xaaf1
movsd %xmm4, 0x40(%rsp)
movapd %xmm5, 0x30(%rsp)
movapd %xmm5, %xmm0
movapd 0xa0(%rsp), %xmm1
callq 0x24239
testb %al, %al
je 0xb370
testq %r13, %r13
movaps 0x20(%rsp), %xmm2
js 0xb3c3
cmpq $0x4, %r13
movsd 0x10(%rsp), %xmm0
movapd 0x30(%rsp), %xmm1
jb 0xb403
movsd 0x2537e(%rip), %xmm1    # 0x301f8
movapd %xmm1, %xmm0
subsd 0x40(%rsp), %xmm0
mulsd %xmm0, %xmm0
subsd %xmm0, %xmm1
movapd %xmm1, 0x40(%rsp)
jmp 0xb48b
movsd 0x80(%rsp), %xmm0
movq %rbx, %rdi
callq 0x53d1
movaps %xmm0, 0x20(%rsp)
movsd 0x80(%rsp), %xmm0
movsd 0x255ca(%rip), %xmm1    # 0x30488
callq 0x24279
testb %al, %al
je 0xafaf
pushq $0x1
popq %rax
movq %rax, 0x88(%rsp)
movsd 0x118(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movapd 0x140(%rsp), %xmm1
movapd 0x20(%rsp), %xmm0
jmp 0xafe7
testb $0x1, %r11b
je 0xb1b9
movsd %xmm6, 0x18(%rsp)
movsd %xmm4, 0x40(%rsp)
movapd %xmm5, 0x30(%rsp)
movapd %xmm2, 0x60(%rsp)
movsd %xmm3, 0x10(%rsp)
movapd %xmm1, 0x50(%rsp)
movaps 0x90(%rsp), %xmm0
movsd 0x252bf(%rip), %xmm1    # 0x301f8
callq 0x24295
testb %al, %al
jne 0xba93
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorpd %xmm1, %xmm1
movaps 0x20(%rsp), %xmm0
callq 0x24259
movb $0x1, %bpl
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %r9d
testb %al, %al
movapd 0x50(%rsp), %xmm1
movsd 0x10(%rsp), %xmm3
movapd 0x60(%rsp), %xmm2
movapd 0x30(%rsp), %xmm5
je 0xaaf1
jmp 0xbaa1
movapd 0x20(%rsp), %xmm2
xorpd 0x251f3(%rip), %xmm2    # 0x301b0
movq $0x0, 0x88(%rsp)
movsd 0x80(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movapd 0x130(%rsp), %xmm1
movapd %xmm2, %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm1, 0x50(%rsp)
movapd %xmm0, %xmm3
mulsd %xmm0, %xmm3
movsd 0x262ad(%rip), %xmm0    # 0x312b0
addsd %xmm0, %xmm3
shufpd $0x2, 0x26ef0(%rip), %xmm3 # xmm3 = xmm3[0],mem[1]
movapd %xmm3, %xmm4
movapd %xmm1, %xmm0
addpd %xmm1, %xmm0
addpd 0x26ecc(%rip), %xmm0    # 0x31ef0
movapd 0x26d84(%rip), %xmm3    # 0x31db0
divpd %xmm0, %xmm3
movapd %xmm3, %xmm0
unpckhpd %xmm3, %xmm0            # xmm0 = xmm0[1],xmm3[1]
movapd %xmm3, %xmm1
addsd %xmm0, %xmm1
movapd 0x26ec8(%rip), %xmm2    # 0x31f10
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
divpd %xmm2, %xmm4
movapd %xmm4, 0xd0(%rsp)
subsd %xmm0, %xmm3
movapd %xmm3, 0x30(%rsp)
movapd %xmm4, %xmm1
unpckhpd %xmm4, %xmm1            # xmm1 = xmm1[1],xmm4[1]
movapd %xmm1, 0xb0(%rsp)
movapd %xmm4, %xmm0
addsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x24424
movapd %xmm0, %xmm2
mulsd 0x20(%rsp), %xmm2
movapd 0xb0(%rsp), %xmm0
divsd %xmm0, %xmm2
mulsd 0x2620d(%rip), %xmm0    # 0x312b0
movapd %xmm0, %xmm1
movsd 0x25349(%rip), %xmm0    # 0x303f8
divsd %xmm1, %xmm0
movapd 0xd0(%rsp), %xmm1
addsd 0x261f4(%rip), %xmm1    # 0x312b8
addsd %xmm0, %xmm1
mulsd 0x30(%rsp), %xmm1
subsd %xmm1, %xmm2
addsd %xmm2, %xmm2
movsd %xmm2, 0x20(%rsp)
movsd 0x2618c(%rip), %xmm0    # 0x31270
movq %rbx, %rdi
callq 0x2455f
movapd %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
callq 0x24239
testb %al, %al
jne 0xba85
movsd 0x20(%rsp), %xmm0
movq %rbx, %rdi
callq 0x24569
movapd 0x50(%rsp), %xmm1
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
mulsd %xmm1, %xmm0
addsd %xmm3, %xmm0
movapd %xmm3, %xmm2
divsd %xmm0, %xmm2
movapd %xmm3, 0xb0(%rsp)
movapd %xmm3, %xmm0
movapd %xmm2, 0x20(%rsp)
movq %rbx, %rdi
callq 0x9cf5
movapd %xmm0, 0x30(%rsp)
movapd 0xa0(%rsp), %xmm1
subsd %xmm1, %xmm0
divsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x2440c
movsd 0x2614f(%rip), %xmm1    # 0x312c0
callq 0x24239
movapd 0x30(%rsp), %xmm5
movl %eax, %ebp
movl %eax, %esi
xorb $0x1, %sil
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x26134(%rip), %xmm0    # 0x312c8
movq %r14, %rdx
movq %r13, %r15
xorl %edi, %edi
xorl %r8d, %r8d
xorl %r9d, %r9d
movapd 0x50(%rsp), %xmm1
movsd 0x10(%rsp), %xmm3
movapd 0x60(%rsp), %xmm2
jmp 0xaaf1
testb $0x1, %r10b
je 0xb2b7
cmpq $0x0, 0x110(%rsp)
jne 0xba8b
movapd %xmm1, %xmm0
addsd 0xb0(%rsp), %xmm0
leaq 0x150(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movapd %xmm1, 0x50(%rsp)
movsd %xmm3, 0x10(%rsp)
movapd %xmm2, 0x60(%rsp)
movapd %xmm5, 0x30(%rsp)
movsd %xmm4, 0x40(%rsp)
movsd %xmm6, 0x18(%rsp)
callq 0x48dc
movapd %xmm0, 0xd0(%rsp)
movapd 0xb0(%rsp), %xmm0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x48dc
movapd 0xd0(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, 0xd0(%rsp)
movapd 0x50(%rsp), %xmm0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x48dc
movapd 0x30(%rsp), %xmm5
movapd 0x60(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
movapd 0x50(%rsp), %xmm1
movapd 0xd0(%rsp), %xmm4
subsd %xmm0, %xmm4
movapd %xmm4, 0xd0(%rsp)
movb $0x1, %r9b
xorl %edx, %edx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r13, %r15
pushq $0x1
popq %rax
movq %rax, 0x110(%rsp)
xorl %ecx, %ecx
xorl %esi, %esi
xorl %edi, %edi
xorl %r8d, %r8d
xorl %ebp, %ebp
jmp 0xaaf1
movb $0x1, %sil
xorl %ecx, %ecx
movapd %xmm4, %xmm7
movsd 0x25fd0(%rip), %xmm0    # 0x31298
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %edi
testb $0x1, %al
je 0xaaf1
xorl %ecx, %ecx
movapd %xmm4, %xmm7
movapd %xmm6, %xmm0
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %esi
cmpq $0x7, %r14
jg 0xaaf1
movsd %xmm6, 0x18(%rsp)
movsd %xmm4, 0x40(%rsp)
movsd %xmm3, 0x10(%rsp)
movapd %xmm1, 0x50(%rsp)
testq %r14, %r14
movapd %xmm2, 0x60(%rsp)
je 0xb343
movapd 0xb0(%rsp), %xmm0
movapd 0x50(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movq %rbx, %rdi
callq 0x9cf5
movapd 0x60(%rsp), %xmm2
movapd %xmm0, %xmm5
movapd %xmm5, 0x30(%rsp)
movapd %xmm5, %xmm0
movapd %xmm2, %xmm1
callq 0x24239
testb %al, %al
je 0xb421
movaps 0x90(%rsp), %xmm2
movaps 0x60(%rsp), %xmm0
jmp 0xb445
cmpq $0x1, 0x88(%rsp)
jne 0xb396
movapd 0x20(%rsp), %xmm0
movsd 0x25467(%rip), %xmm1    # 0x307f0
callq 0x24239
testb %al, %al
jne 0xbaf9
testq %r13, %r13
jle 0xb3d9
movsd 0x250e5(%rip), %xmm7    # 0x30488
xorl %r13d, %r13d
movapd 0x50(%rsp), %xmm1
movapd 0x60(%rsp), %xmm2
movapd 0x30(%rsp), %xmm5
movsd 0x18(%rsp), %xmm4
jmp 0xba52
movsd 0x250bd(%rip), %xmm0    # 0x30488
movapd %xmm0, 0x40(%rsp)
xorl %r13d, %r13d
jmp 0xb48b
cmpq $-0x4, %r13
movapd 0x50(%rsp), %xmm1
movapd 0x60(%rsp), %xmm2
movapd 0x30(%rsp), %xmm5
movsd 0x18(%rsp), %xmm4
jg 0xb44f
movsd 0x40(%rsp), %xmm0
mulsd %xmm0, %xmm0
jmp 0xb467
cmpq $0x2, %r13
movsd 0x40(%rsp), %xmm3
jb 0xb470
movsd 0x25071(%rip), %xmm0    # 0x30488
mulsd %xmm0, %xmm3
addsd %xmm0, %xmm3
jmp 0xb485
movaps 0x30(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x24279
testb %al, %al
je 0xb5d2
movsd 0x78(%rsp), %xmm2
movsd 0x10(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
jmp 0xb622
cmpq $-0x2, %r13
movsd 0x40(%rsp), %xmm0
jg 0xba39
mulsd 0x25021(%rip), %xmm0    # 0x30488
movapd %xmm0, %xmm7
jmp 0xba52
movapd 0xa0(%rsp), %xmm3
subsd %xmm1, %xmm3
subsd %xmm1, %xmm0
divsd %xmm0, %xmm3
movapd %xmm3, 0x40(%rsp)
movq %r13, %r15
incq %r15
movaps %xmm2, %xmm0
movsd 0x25e0c(%rip), %xmm1    # 0x312a8
movaps %xmm2, 0x20(%rsp)
callq 0x24279
testb %al, %al
je 0xb4e5
cmpq $0x1, 0x88(%rsp)
movsd 0x80(%rsp), %xmm0
jne 0xb519
movq $0x0, 0x88(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps 0xf0(%rsp), %xmm0
movapd 0x100(%rsp), %xmm3
jmp 0xb546
movaps 0x20(%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
movapd 0x30(%rsp), %xmm5
movapd %xmm5, %xmm2
movapd 0x50(%rsp), %xmm1
movsd 0x10(%rsp), %xmm3
movsd 0x18(%rsp), %xmm4
movapd 0x40(%rsp), %xmm7
jmp 0xba67
pushq $0x1
popq %rax
movq %rax, 0x88(%rsp)
movsd 0x118(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movaps 0x100(%rsp), %xmm0
movapd 0xf0(%rsp), %xmm3
movapd 0x20(%rsp), %xmm1
movaps %xmm0, 0x50(%rsp)
movsd 0x24c9f(%rip), %xmm2    # 0x301f8
subsd %xmm1, %xmm2
movsd %xmm2, 0x60(%rsp)
movapd %xmm3, 0xb0(%rsp)
movapd %xmm3, %xmm0
movaps 0x50(%rsp), %xmm1
movq %rbx, %rdi
callq 0x9cf5
movapd 0x50(%rsp), %xmm1
movapd %xmm0, %xmm5
movb $0x1, %sil
xorl %ecx, %ecx
movsd 0x60(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movsd 0x24c4e(%rip), %xmm3    # 0x301f8
movsd %xmm3, 0x78(%rsp)
movsd 0x18(%rsp), %xmm0
xorpd %xmm2, %xmm2
movq %r14, %rdx
xorl %edi, %edi
xorl %r8d, %r8d
xorl %ebp, %ebp
xorl %r9d, %r9d
movapd 0x40(%rsp), %xmm7
jmp 0xaaf1
movaps 0x30(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
callq 0x24239
movaps 0x20(%rsp), %xmm2
movaps %xmm2, %xmm0
movapd 0x30(%rsp), %xmm3
movapd %xmm3, %xmm1
testb %al, %al
jne 0xb614
movaps 0x90(%rsp), %xmm0
movsd %xmm2, 0x78(%rsp)
movapd 0x60(%rsp), %xmm1
movsd %xmm3, 0x10(%rsp)
movaps %xmm0, 0x90(%rsp)
movapd %xmm1, 0x60(%rsp)
movaps %xmm2, 0x20(%rsp)
movaps %xmm2, %xmm0
movsd 0x24bc6(%rip), %xmm1    # 0x301f8
callq 0x241f5
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %ebp
movl $0x0, %r9d
testb %al, %al
movapd 0x50(%rsp), %xmm1
movsd 0x10(%rsp), %xmm3
movapd 0x60(%rsp), %xmm2
movapd 0x30(%rsp), %xmm5
jne 0xaaf1
xorpd %xmm1, %xmm1
movaps 0x20(%rsp), %xmm0
callq 0x241f5
movapd 0x30(%rsp), %xmm5
movapd 0x60(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
movapd 0x50(%rsp), %xmm1
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %ebp
movl $0x0, %r9d
testb %al, %al
jne 0xaaf1
movapd 0xb0(%rsp), %xmm2
movsd 0x24b0c(%rip), %xmm0    # 0x30200
addsd %xmm0, %xmm2
movsd %xmm2, 0xc8(%rsp)
movaps 0x20(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2455f
movsd %xmm0, 0x8(%rsp)
movapd 0x50(%rsp), %xmm0
addsd 0x24ade(%rip), %xmm0    # 0x30200
movsd %xmm0, 0xe8(%rsp)
movsd 0x24ac5(%rip), %xmm0    # 0x301f8
subsd 0x20(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2455f
mulsd 0xe8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
mulsd 0xc8(%rsp), %xmm1
addsd %xmm0, %xmm1
addsd 0xd0(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x25afc(%rip), %xmm0    # 0x31270
movq %rbx, %rdi
callq 0x2455f
movapd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x24239
testb %al, %al
jne 0xba8b
movsd 0x24ec5(%rip), %xmm0    # 0x30660
movq %rbx, %rdi
callq 0x2455f
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x24279
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %ebp
movl $0x0, %r9d
testb %al, %al
movapd 0x50(%rsp), %xmm1
movsd 0x10(%rsp), %xmm3
movapd 0x60(%rsp), %xmm2
movapd 0x30(%rsp), %xmm5
jne 0xaaf1
movsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x24569
movapd 0x30(%rsp), %xmm1
subsd 0xa0(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd 0x20(%rsp), %xmm0
movsd %xmm1, 0xe8(%rsp)
subsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x90(%rsp), %xmm1
callq 0x24259
movapd 0x30(%rsp), %xmm5
movsd 0x78(%rsp), %xmm0
subsd 0x90(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
testb %al, %al
je 0xb902
movapd 0x20(%rsp), %xmm2
movapd 0x90(%rsp), %xmm1
subsd %xmm1, %xmm2
movapd %xmm2, %xmm0
divsd 0xc8(%rsp), %xmm0
movapd %xmm0, 0x30(%rsp)
mulsd 0x24bec(%rip), %xmm0    # 0x30488
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
movsd %xmm0, 0x8(%rsp)
callq 0x24259
movapd 0x30(%rsp), %xmm5
movapd 0x60(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
movapd 0x50(%rsp), %xmm1
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %ebp
movl $0x0, %r9d
testb %al, %al
jne 0xaaf1
movapd %xmm5, 0x30(%rsp)
movsd 0x8(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
callq 0x24295
movapd 0x30(%rsp), %xmm5
testb %al, %al
je 0xb9bc
movsd 0x78(%rsp), %xmm1
movapd %xmm1, %xmm2
subsd 0x20(%rsp), %xmm2
movapd %xmm2, %xmm0
divsd 0xc8(%rsp), %xmm0
movapd %xmm0, 0x30(%rsp)
mulsd 0x24b56(%rip), %xmm0    # 0x304a8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x24890(%rip), %xmm1    # 0x301f8
callq 0x24295
movapd 0x30(%rsp), %xmm5
movapd 0x60(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
movapd 0x50(%rsp), %xmm1
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r14, %rdx
movq %r13, %r15
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %ebp
movl $0x0, %r9d
testb %al, %al
jne 0xaaf1
movapd %xmm5, 0x30(%rsp)
movsd 0xe8(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2440c
movsd 0x258bf(%rip), %xmm1    # 0x312a0
callq 0x24239
testb %al, %al
jne 0xbaa1
incq %r14
movb $0x1, %r9b
xorl %ecx, %ecx
movsd 0x8(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r14, %rdx
movq %r13, %r15
xorl %esi, %esi
xorl %edi, %edi
xorl %r8d, %r8d
xorl %ebp, %ebp
movapd 0x50(%rsp), %xmm1
movsd 0x10(%rsp), %xmm3
movapd 0x60(%rsp), %xmm2
movapd 0x30(%rsp), %xmm5
jmp 0xaaf1
movapd %xmm5, %xmm7
subsd 0xa0(%rsp), %xmm7
movapd %xmm5, %xmm0
subsd %xmm2, %xmm0
divsd %xmm0, %xmm7
decq %r13
movaps 0x20(%rsp), %xmm0
movsd %xmm0, 0x78(%rsp)
movapd %xmm5, %xmm3
movq %r13, %r15
incq %r14
movb $0x1, %dil
xorl %ecx, %ecx
movapd %xmm4, %xmm0
movq %r14, %rdx
xorl %esi, %esi
xorl %r8d, %r8d
xorl %ebp, %ebp
xorl %r9d, %r9d
jmp 0xaaf1
xorpd %xmm0, %xmm0
jmp 0xba9b
movapd 0x20(%rsp), %xmm0
jmp 0xba9b
movsd 0x257f5(%rip), %xmm0    # 0x31290
movsd %xmm0, 0x8(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0xbae1
movsd 0x24d3c(%rip), %xmm1    # 0x307f0
movsd 0x8(%rsp), %xmm0
callq 0x24259
testb %al, %al
je 0xbacd
movsd 0x257c5(%rip), %xmm0    # 0x31290
jmp 0xbadb
movsd 0x24723(%rip), %xmm0    # 0x301f8
subsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0xbaac