// File: /workspace/github_cpp_makefile_star2_O3/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, 0xe0(%rsp)
movaps %xmm0, 0xf0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorpd %xmm1, %xmm1
movsd %xmm2, 0x80(%rsp)
movapd %xmm2, %xmm0
callq 0x25c15
testb %al, %al
je 0xb145
movsd 0x280ab(%rip), %xmm1    # 0x331e0
movsd 0x80(%rsp), %xmm0
callq 0x25bd9
jmp 0xb147
xorl %eax, %eax
movzbl %al, %edi
leaq 0x2a651(%rip), %rsi     # 0x357a2
movq %rbx, %rdx
callq 0x2510e
xorpd %xmm1, %xmm1
movsd 0x80(%rsp), %xmm0
callq 0x25b75
testb %al, %al
jne 0xc256
movsd 0x28065(%rip), %xmm1    # 0x331e0
movsd 0x80(%rsp), %xmm0
movsd %xmm1, 0x8(%rsp)
callq 0x25b75
testb %al, %al
jne 0xc256
movsd 0x28041(%rip), %xmm3    # 0x331e0
movapd %xmm3, %xmm0
subsd 0x80(%rsp), %xmm0
movsd %xmm0, 0x110(%rsp)
movapd 0xf0(%rsp), %xmm2
movapd %xmm2, %xmm0
movapd 0xe0(%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, %r14d
movq $0x0, 0x108(%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, 0xc0(%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 %r14, %r12
movq %rdx, %r13
movapd %xmm7, %xmm4
testb $0x1, %cl
je 0xb362
movsd %xmm4, 0x40(%rsp)
movapd %xmm2, 0x60(%rsp)
movsd %xmm3, 0x10(%rsp)
movaps 0xf0(%rsp), %xmm0
movsd 0x27f36(%rip), %xmm1    # 0x331e0
callq 0x25bd9
testb %al, %al
jne 0xb2d0
movaps 0xe0(%rsp), %xmm0
movsd 0x27f1d(%rip), %xmm1    # 0x331e0
callq 0x25bd9
testb %al, %al
je 0xb61b
movapd 0xf0(%rsp), %xmm0
movaps 0xe0(%rsp), %xmm1
movaps 0x120(%rsp), %xmm2
movq %rbx, %rdi
callq 0xa477
movapd %xmm0, %xmm5
movb $0x1, %sil
movq $0x0, 0x88(%rsp)
movaps 0x120(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movsd 0x40(%rsp), %xmm7
movsd 0x28fb1(%rip), %xmm0    # 0x342d0
movq %r13, %rdx
movq %r12, %r14
xorl %ecx, %ecx
xorl %edi, %edi
xorl %r8d, %r8d
xorl %ebp, %ebp
xorl %r9d, %r9d
movsd 0x80(%rsp), %xmm1
movaps %xmm1, 0xa0(%rsp)
movapd 0xe0(%rsp), %xmm1
movapd 0xf0(%rsp), %xmm2
movapd %xmm2, 0xb0(%rsp)
jmp 0xb924
movl %r9d, %eax
movl %ebp, %r10d
movl %r8d, %r11d
movl %edi, %r15d
movapd %xmm0, %xmm6
movb $0x1, %dil
xorl %edx, %edx
movsd 0x28109(%rip), %xmm7    # 0x33488
movl $0x0, %r14d
movl $0x0, %ecx
movl $0x0, %r8d
movl $0x0, %ebp
movl $0x0, %r9d
testb $0x1, %sil
movl $0x0, %esi
jne 0xb275
testb $0x1, %r15b
je 0xb679
movb $0x1, %r8b
xorl %ecx, %ecx
movapd %xmm4, %xmm7
movapd %xmm6, %xmm0
movq %r13, %rdx
movq %r12, %r14
movl $0x0, %edi
cmpq $0x63, %r13
jg 0xb275
testq %r13, %r13
movapd %xmm1, 0x50(%rsp)
movsd %xmm3, 0x10(%rsp)
movapd %xmm2, 0x60(%rsp)
movsd %xmm6, 0x18(%rsp)
je 0xb5ac
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 0x27db0(%rip), %xmm1    # 0x331e0
callq 0x25b75
movsd 0x28e53(%rip), %xmm0    # 0x34290
testb %al, %al
jne 0xb447
movsd 0x20(%rsp), %xmm0
movapd %xmm0, 0x20(%rsp)
xorpd %xmm1, %xmm1
callq 0x25b75
testb %al, %al
je 0xb49e
movsd 0x8(%rsp), %xmm2
movsd 0x28020(%rip), %xmm0    # 0x33488
mulsd %xmm0, %xmm2
addsd 0x90(%rsp), %xmm2
xorpd %xmm1, %xmm1
movapd %xmm2, 0x20(%rsp)
movapd %xmm2, %xmm0
callq 0x25b75
movsd 0x27ff8(%rip), %xmm0    # 0x33488
movsd %xmm0, 0x40(%rsp)
testb %al, %al
jne 0xc200
movaps 0xb0(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movq %rbx, %rdi
callq 0xa477
movaps %xmm0, 0x30(%rsp)
movapd 0x90(%rsp), %xmm1
addsd 0x78(%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x25e30
movsd 0x18(%rsp), %xmm1
callq 0x25bb9
movapd 0x30(%rsp), %xmm5
movapd 0x50(%rsp), %xmm1
movb $0x1, %bpl
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r13, %rdx
movq %r12, %r14
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %r9d
testb %al, %al
movsd 0x10(%rsp), %xmm3
movapd 0x60(%rsp), %xmm2
jne 0xb275
movapd 0xa0(%rsp), %xmm1
subsd %xmm1, %xmm5
divsd %xmm1, %xmm5
movapd %xmm5, %xmm0
movq %rbx, %rdi
callq 0x25e30
movsd 0x18(%rsp), %xmm1
callq 0x25bb9
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 %r13, %rdx
movq %r12, %r14
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %r9d
testb %al, %al
jne 0xb275
movsd %xmm4, 0x40(%rsp)
movapd %xmm5, 0x30(%rsp)
movapd %xmm5, %xmm0
movapd 0xa0(%rsp), %xmm1
callq 0x25bb9
testb %al, %al
je 0xbaee
testq %r12, %r12
movaps 0x20(%rsp), %xmm2
js 0xbb41
cmpq $0x4, %r12
movsd 0x10(%rsp), %xmm0
movapd 0x30(%rsp), %xmm1
jb 0xbb81
movsd 0x27be2(%rip), %xmm1    # 0x331e0
movapd %xmm1, %xmm0
subsd 0x40(%rsp), %xmm0
mulsd %xmm0, %xmm0
subsd %xmm0, %xmm1
movapd %xmm1, 0x40(%rsp)
jmp 0xbc09
movsd 0x80(%rsp), %xmm0
movq %rbx, %rdi
callq 0x5a3e
movaps %xmm0, 0x20(%rsp)
movsd 0x80(%rsp), %xmm0
movsd 0x27e46(%rip), %xmm1    # 0x33488
callq 0x25bf9
movl $0x1, %ecx
testb %al, %al
je 0xb72d
movsd 0x110(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movapd 0x140(%rsp), %xmm1
movapd 0x20(%rsp), %xmm0
jmp 0xb75b
testb $0x1, %r11b
je 0xb935
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 0x27b29(%rip), %xmm1    # 0x331e0
callq 0x25c15
testb %al, %al
jne 0xc208
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorpd %xmm1, %xmm1
movaps 0x20(%rsp), %xmm0
callq 0x25bd9
movb $0x1, %bpl
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r13, %rdx
movq %r12, %r14
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 0xb275
jmp 0xc216
movapd 0x20(%rsp), %xmm2
xorpd 0x27a75(%rip), %xmm2    # 0x331b0
xorl %ecx, %ecx
movsd 0x80(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movapd 0x130(%rsp), %xmm1
movapd %xmm2, %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm1, 0x50(%rsp)
movq %rcx, 0x88(%rsp)
movapd %xmm0, %xmm3
mulsd %xmm0, %xmm3
movsd 0x28b31(%rip), %xmm0    # 0x342b0
addsd %xmm0, %xmm3
shufpd $0x2, 0x29784(%rip), %xmm3 # xmm3 = xmm3[0],mem[1]
movapd %xmm3, %xmm4
movapd %xmm1, %xmm0
addpd %xmm1, %xmm0
addpd 0x29760(%rip), %xmm0    # 0x34f00
movapd 0x29608(%rip), %xmm3    # 0x34db0
divpd %xmm0, %xmm3
movapd %xmm3, %xmm0
unpckhpd %xmm3, %xmm0            # xmm0 = xmm0[1],xmm3[1]
movapd %xmm3, %xmm1
addsd %xmm0, %xmm1
movapd 0x2975c(%rip), %xmm2    # 0x34f20
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
divpd %xmm2, %xmm4
movapd %xmm4, 0xc0(%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 0x25e48
movapd %xmm0, %xmm2
mulsd 0x20(%rsp), %xmm2
movapd 0xb0(%rsp), %xmm0
divsd %xmm0, %xmm2
mulsd 0x28a91(%rip), %xmm0    # 0x342b0
movapd %xmm0, %xmm1
movsd 0x27bd5(%rip), %xmm0    # 0x33400
divsd %xmm1, %xmm0
movapd 0xc0(%rsp), %xmm1
addsd 0x28a78(%rip), %xmm1    # 0x342b8
addsd %xmm0, %xmm1
mulsd 0x30(%rsp), %xmm1
subsd %xmm1, %xmm2
addsd %xmm2, %xmm2
movsd %xmm2, 0x20(%rsp)
movsd 0x28a10(%rip), %xmm0    # 0x34270
movq %rbx, %rdi
callq 0x25f91
movapd %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
callq 0x25bb9
testb %al, %al
jne 0xc1fa
movsd 0x20(%rsp), %xmm0
movq %rbx, %rdi
callq 0x25f9b
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 0xa477
movapd %xmm0, 0x30(%rsp)
movapd 0xa0(%rsp), %xmm1
subsd %xmm1, %xmm0
divsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x25e30
movsd 0x289d3(%rip), %xmm1    # 0x342c0
callq 0x25bb9
movapd 0x30(%rsp), %xmm5
movl %eax, %ebp
movl %eax, %esi
xorb $0x1, %sil
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x289b8(%rip), %xmm0    # 0x342c8
movq %r13, %rdx
movq %r12, %r14
xorl %edi, %edi
xorl %r8d, %r8d
xorl %r9d, %r9d
movapd 0x50(%rsp), %xmm1
movsd 0x10(%rsp), %xmm3
movapd 0x60(%rsp), %xmm2
jmp 0xb275
testb $0x1, %r10b
je 0xba35
cmpq $0x0, 0x108(%rsp)
jne 0xc200
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 0x4e80
movapd %xmm0, 0xc0(%rsp)
movapd 0xb0(%rsp), %xmm0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4e80
movapd 0xc0(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, 0xc0(%rsp)
movapd 0x50(%rsp), %xmm0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4e80
movapd 0x30(%rsp), %xmm5
movapd 0x60(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
movapd 0x50(%rsp), %xmm1
movapd 0xc0(%rsp), %xmm4
subsd %xmm0, %xmm4
movapd %xmm4, 0xc0(%rsp)
movb $0x1, %r9b
movl $0x1, %eax
movq %rax, 0x108(%rsp)
xorl %edx, %edx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r12, %r14
xorl %ecx, %ecx
xorl %esi, %esi
xorl %edi, %edi
xorl %r8d, %r8d
xorl %ebp, %ebp
jmp 0xb275
movb $0x1, %sil
xorl %ecx, %ecx
movapd %xmm4, %xmm7
movsd 0x28852(%rip), %xmm0    # 0x34298
movq %r13, %rdx
movq %r12, %r14
movl $0x0, %edi
testb $0x1, %al
je 0xb275
xorl %ecx, %ecx
movapd %xmm4, %xmm7
movapd %xmm6, %xmm0
movq %r13, %rdx
movq %r12, %r14
movl $0x0, %esi
cmpq $0x7, %r13
jg 0xb275
movsd %xmm6, 0x18(%rsp)
movsd %xmm4, 0x40(%rsp)
movsd %xmm3, 0x10(%rsp)
movapd %xmm1, 0x50(%rsp)
testq %r13, %r13
movapd %xmm2, 0x60(%rsp)
je 0xbac1
movapd 0xb0(%rsp), %xmm0
movapd 0x50(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movq %rbx, %rdi
callq 0xa477
movapd 0x60(%rsp), %xmm2
movapd %xmm0, %xmm5
movapd %xmm5, 0x30(%rsp)
movapd %xmm5, %xmm0
movapd %xmm2, %xmm1
callq 0x25bb9
testb %al, %al
je 0xbb9f
movaps 0x90(%rsp), %xmm2
movaps 0x60(%rsp), %xmm0
jmp 0xbbc3
cmpq $0x1, 0x88(%rsp)
jne 0xbb14
movapd 0x20(%rsp), %xmm0
movsd 0x27ce9(%rip), %xmm1    # 0x337f0
callq 0x25bb9
testb %al, %al
jne 0xc26e
testq %r12, %r12
jle 0xbb57
movsd 0x27967(%rip), %xmm7    # 0x33488
xorl %r12d, %r12d
movapd 0x50(%rsp), %xmm1
movapd 0x60(%rsp), %xmm2
movapd 0x30(%rsp), %xmm5
movsd 0x18(%rsp), %xmm4
jmp 0xc1c7
movsd 0x2793f(%rip), %xmm0    # 0x33488
movapd %xmm0, 0x40(%rsp)
xorl %r12d, %r12d
jmp 0xbc09
cmpq $-0x4, %r12
movapd 0x50(%rsp), %xmm1
movapd 0x60(%rsp), %xmm2
movapd 0x30(%rsp), %xmm5
movsd 0x18(%rsp), %xmm4
jg 0xbbcd
movsd 0x40(%rsp), %xmm0
mulsd %xmm0, %xmm0
jmp 0xbbe5
cmpq $0x2, %r12
movsd 0x40(%rsp), %xmm3
jb 0xbbee
movsd 0x278f3(%rip), %xmm0    # 0x33488
mulsd %xmm0, %xmm3
addsd %xmm0, %xmm3
jmp 0xbc03
movaps 0x30(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x25bf9
testb %al, %al
je 0xbd52
movsd 0x78(%rsp), %xmm2
movsd 0x10(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
jmp 0xbda2
cmpq $-0x2, %r12
movsd 0x40(%rsp), %xmm0
jg 0xc1ae
mulsd 0x278a3(%rip), %xmm0    # 0x33488
movapd %xmm0, %xmm7
jmp 0xc1c7
movapd 0xa0(%rsp), %xmm3
subsd %xmm1, %xmm3
subsd %xmm1, %xmm0
divsd %xmm0, %xmm3
movapd %xmm3, 0x40(%rsp)
movq %r12, %r14
incq %r14
movaps %xmm2, %xmm0
movsd 0x2868e(%rip), %xmm1    # 0x342a8
movaps %xmm2, 0x20(%rsp)
callq 0x25bf9
testb %al, %al
je 0xbc63
cmpq $0x1, 0x88(%rsp)
movsd 0x80(%rsp), %xmm0
jne 0xbc97
movq $0x0, 0x88(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps 0xe0(%rsp), %xmm0
movapd 0xf0(%rsp), %xmm3
jmp 0xbcc6
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 0xc1dc
movl $0x1, %eax
movq %rax, 0x88(%rsp)
movsd 0x110(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movaps 0xf0(%rsp), %xmm0
movapd 0xe0(%rsp), %xmm3
movapd 0x20(%rsp), %xmm1
movaps %xmm0, 0x50(%rsp)
movsd 0x27507(%rip), %xmm2    # 0x331e0
subsd %xmm1, %xmm2
movsd %xmm2, 0x60(%rsp)
movapd %xmm3, 0xb0(%rsp)
movapd %xmm3, %xmm0
movaps 0x50(%rsp), %xmm1
movq %rbx, %rdi
callq 0xa477
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 0x274b6(%rip), %xmm3    # 0x331e0
movsd %xmm3, 0x78(%rsp)
movsd 0x18(%rsp), %xmm0
xorpd %xmm2, %xmm2
movq %r13, %rdx
xorl %edi, %edi
xorl %r8d, %r8d
xorl %ebp, %ebp
xorl %r9d, %r9d
movapd 0x40(%rsp), %xmm7
jmp 0xb275
movaps 0x30(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
callq 0x25bb9
movaps 0x20(%rsp), %xmm2
movaps %xmm2, %xmm0
movapd 0x30(%rsp), %xmm3
movapd %xmm3, %xmm1
testb %al, %al
jne 0xbd94
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 0x2742e(%rip), %xmm1    # 0x331e0
callq 0x25b75
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r13, %rdx
movq %r12, %r14
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 0xb275
xorpd %xmm1, %xmm1
movaps 0x20(%rsp), %xmm0
callq 0x25b75
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 %r13, %rdx
movq %r12, %r14
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %ebp
movl $0x0, %r9d
testb %al, %al
jne 0xb275
movapd 0xb0(%rsp), %xmm2
movsd 0x27394(%rip), %xmm0    # 0x33208
addsd %xmm0, %xmm2
movsd %xmm2, 0xd8(%rsp)
movaps 0x20(%rsp), %xmm0
movq %rbx, %rdi
callq 0x25f91
movsd %xmm0, 0x8(%rsp)
movapd 0x50(%rsp), %xmm0
addsd 0x27366(%rip), %xmm0    # 0x33208
movsd %xmm0, 0x118(%rsp)
movsd 0x2732d(%rip), %xmm0    # 0x331e0
subsd 0x20(%rsp), %xmm0
movq %rbx, %rdi
callq 0x25f91
mulsd 0x118(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
mulsd 0xd8(%rsp), %xmm1
addsd %xmm0, %xmm1
addsd 0xc0(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x2837c(%rip), %xmm0    # 0x34270
movq %rbx, %rdi
callq 0x25f91
movapd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x25bb9
testb %al, %al
jne 0xc200
movsd 0x27745(%rip), %xmm0    # 0x33660
movq %rbx, %rdi
callq 0x25f91
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x25bf9
xorl %ecx, %ecx
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r13, %rdx
movq %r12, %r14
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 0xb275
movsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x25f9b
movapd 0x30(%rsp), %xmm1
subsd 0xa0(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd 0x20(%rsp), %xmm0
movsd %xmm1, 0xd8(%rsp)
subsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x90(%rsp), %xmm1
callq 0x25bd9
movapd 0x30(%rsp), %xmm5
testb %al, %al
je 0xc06f
movapd 0x20(%rsp), %xmm3
movapd 0x90(%rsp), %xmm2
subsd %xmm2, %xmm3
movsd 0x78(%rsp), %xmm1
subsd %xmm2, %xmm1
movapd %xmm3, %xmm0
divsd %xmm1, %xmm0
movapd %xmm0, 0x30(%rsp)
mulsd 0x2747f(%rip), %xmm0    # 0x33488
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
xorpd %xmm1, %xmm1
movsd %xmm0, 0x8(%rsp)
callq 0x25bd9
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 %r13, %rdx
movq %r12, %r14
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %ebp
movl $0x0, %r9d
testb %al, %al
jne 0xb275
movapd %xmm5, 0x30(%rsp)
movsd 0x8(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
callq 0x25c15
movapd 0x30(%rsp), %xmm5
testb %al, %al
je 0xc131
movsd 0x78(%rsp), %xmm2
movapd %xmm2, %xmm3
subsd 0x20(%rsp), %xmm3
movapd %xmm2, %xmm1
subsd 0x90(%rsp), %xmm1
movapd %xmm3, %xmm0
divsd %xmm1, %xmm0
movapd %xmm0, 0x30(%rsp)
mulsd 0x273e1(%rip), %xmm0    # 0x334a8
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x27103(%rip), %xmm1    # 0x331e0
callq 0x25c15
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 %r13, %rdx
movq %r12, %r14
movl $0x0, %esi
movl $0x0, %edi
movl $0x0, %r8d
movl $0x0, %ebp
movl $0x0, %r9d
testb %al, %al
jne 0xb275
movapd %xmm5, 0x30(%rsp)
movsd 0xd8(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x25e30
movsd 0x2814a(%rip), %xmm1    # 0x342a0
callq 0x25bb9
testb %al, %al
jne 0xc216
incq %r13
movb $0x1, %r9b
xorl %ecx, %ecx
movsd 0x8(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movsd 0x40(%rsp), %xmm7
movsd 0x18(%rsp), %xmm0
movq %r13, %rdx
movq %r12, %r14
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 0xb275
movapd %xmm5, %xmm7
subsd 0xa0(%rsp), %xmm7
movapd %xmm5, %xmm0
subsd %xmm2, %xmm0
divsd %xmm0, %xmm7
decq %r12
movaps 0x20(%rsp), %xmm0
movsd %xmm0, 0x78(%rsp)
movapd %xmm5, %xmm3
movq %r12, %r14
incq %r13
movb $0x1, %dil
xorl %ecx, %ecx
movapd %xmm4, %xmm0
movq %r13, %rdx
xorl %esi, %esi
xorl %r8d, %r8d
xorl %ebp, %ebp
xorl %r9d, %r9d
jmp 0xb275
xorpd %xmm0, %xmm0
jmp 0xc210
movapd 0x20(%rsp), %xmm0
jmp 0xc210
movsd 0x28080(%rip), %xmm0    # 0x34290
movsd %xmm0, 0x8(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0xc256
movsd 0x275c7(%rip), %xmm1    # 0x337f0
movsd 0x8(%rsp), %xmm0
callq 0x25bd9
testb %al, %al
je 0xc242
movsd 0x28050(%rip), %xmm0    # 0x34290
jmp 0xc250
movsd 0x26f96(%rip), %xmm0    # 0x331e0
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 0xc221