// File: 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
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movq %rdi, -0x28(%rbp)
movq $0x0, -0xa8(%rbp)
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
callq 0x3c500
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x109(%rbp)
jne 0xf3e7
jmp 0xf3ff
movsd -0x20(%rbp), %xmm0
movsd 0x45c14(%rip), %xmm1    # 0x55008
callq 0x3c480
movb %al, -0x109(%rbp)
movb -0x109(%rbp), %al
movq -0x28(%rbp), %rdx
movzbl %al, %edi
andl $0x1, %edi
leaq 0x4816c(%rip), %rsi     # 0x57582
callq 0x3b240
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
callq 0x3c3d0
testb $0x1, %al
jne 0xf42e
jmp 0xf44b
xorps %xmm0, %xmm0
movsd %xmm0, -0x108(%rbp)
movsd -0x108(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x1042d
movsd -0x20(%rbp), %xmm0
movsd 0x45bb0(%rip), %xmm1    # 0x55008
callq 0x3c3d0
testb $0x1, %al
jne 0xf463
jmp 0xf485
movsd 0x45b9d(%rip), %xmm0    # 0x55008
movsd %xmm0, -0x108(%rbp)
movsd -0x108(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x1042d
xorps %xmm0, %xmm0
movsd %xmm0, -0x88(%rbp)
movq $0x0, -0xb0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x70(%rbp)
movq $0x0, -0xb8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x80(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x90(%rbp)
movsd 0x45b0f(%rip), %xmm0    # 0x55008
movsd %xmm0, -0x68(%rbp)
movsd 0x45b02(%rip), %xmm0    # 0x55008
movsd %xmm0, -0x98(%rbp)
movq $0x0, -0xc0(%rbp)
movq $0x0, -0xd0(%rbp)
movq $0x1, -0xd8(%rbp)
movq $0x2, -0xe0(%rbp)
movq $0x3, -0xe8(%rbp)
movq $0x4, -0xf0(%rbp)
movq $0x5, -0xf8(%rbp)
movq $0x6, -0x100(%rbp)
cmpq $0x0, -0xd0(%rbp)
jne 0xf968
movsd -0x10(%rbp), %xmm0
movsd 0x45a87(%rip), %xmm1    # 0x55008
callq 0x3c480
testb $0x1, %al
jne 0xf5a5
movsd -0x18(%rbp), %xmm0
movsd 0x45a71(%rip), %xmm1    # 0x55008
callq 0x3c480
testb $0x1, %al
jne 0xf5a5
jmp 0xf626
movsd 0x46ed3(%rip), %xmm0    # 0x56480
movsd %xmm0, -0x88(%rbp)
movq $0x0, -0xb0(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
addsd -0x38(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movq -0x28(%rbp), %rdi
callq 0xeb20
movsd %xmm0, -0x50(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movsd 0x46e2a(%rip), %xmm0    # 0x56458
movsd %xmm0, -0x88(%rbp)
movsd -0x20(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x6870
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x20(%rbp), %xmm0
movsd 0x45de3(%rip), %xmm1    # 0x55450
callq 0x3c4c0
testb $0x1, %al
jne 0xf678
jmp 0xf6cc
movq $0x1, -0xb0(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x45969(%rip), %xmm0    # 0x55008
subsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x78(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x78(%rbp)
jmp 0xf6f5
movq $0x0, -0xb0(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x78(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x46d65(%rip), %xmm1    # 0x56470
addsd %xmm1, %xmm0
movsd 0x46d51(%rip), %xmm1    # 0x56468
divsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x30(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd 0x45a9f(%rip), %xmm1    # 0x551d0
addsd %xmm1, %xmm0
movsd 0x458cb(%rip), %xmm1    # 0x55008
divsd %xmm0, %xmm1
movsd -0x38(%rbp), %xmm2
addsd %xmm2, %xmm2
movsd 0x45a7e(%rip), %xmm0    # 0x551d0
addsd %xmm0, %xmm2
movsd 0x458aa(%rip), %xmm0    # 0x55008
divsd %xmm2, %xmm0
addsd %xmm0, %xmm1
movsd 0x45c5a(%rip), %xmm0    # 0x553c8
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x120(%rbp)
movsd -0x58(%rbp), %xmm0
addsd -0x70(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x3c890
movsd -0x120(%rbp), %xmm1
mulsd %xmm0, %xmm1
divsd -0x58(%rbp), %xmm1
movsd -0x38(%rbp), %xmm2
addsd %xmm2, %xmm2
movsd 0x45a17(%rip), %xmm0    # 0x551d0
addsd %xmm0, %xmm2
movsd 0x45843(%rip), %xmm0    # 0x55008
divsd %xmm2, %xmm0
movsd -0x30(%rbp), %xmm3
addsd %xmm3, %xmm3
movsd 0x459f6(%rip), %xmm2    # 0x551d0
addsd %xmm2, %xmm3
movsd 0x45822(%rip), %xmm2    # 0x55008
divsd %xmm3, %xmm2
subsd %xmm2, %xmm0
movsd 0x46c6a(%rip), %xmm2    # 0x56460
addsd -0x70(%rbp), %xmm2
movsd 0x459ad(%rip), %xmm4    # 0x551b0
mulsd -0x58(%rbp), %xmm4
movsd 0x45bb8(%rip), %xmm3    # 0x553c8
divsd %xmm4, %xmm3
subsd %xmm3, %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd 0x45b84(%rip), %xmm0    # 0x553c8
mulsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x118(%rbp)
movq -0x28(%rbp), %rdi
movsd 0x46bc1(%rip), %xmm0    # 0x56428
callq 0x3cd70
movaps %xmm0, %xmm1
movsd -0x118(%rbp), %xmm0
callq 0x3c440
testb $0x1, %al
jne 0xf882
jmp 0xf88f
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x103ce
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x128(%rbp)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x130(%rbp)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x138(%rbp)
movsd -0x48(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x3cdd0
movsd -0x138(%rbp), %xmm1
movsd -0x130(%rbp), %xmm2
movaps %xmm0, %xmm3
movsd -0x128(%rbp), %xmm0
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movq -0x28(%rbp), %rdi
callq 0xeb20
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
divsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x3c820
movsd 0x46b41(%rip), %xmm1    # 0x56478
callq 0x3c440
testb $0x1, %al
jne 0xf942
jmp 0xf955
movq -0xe8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movq -0xd8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movq -0xd0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jne 0xf9ae
movq $0x0, -0xb8(%rbp)
movsd 0x45ac5(%rip), %xmm0    # 0x55450
movsd %xmm0, -0x80(%rbp)
movq $0x0, -0xa8(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movq -0xd0(%rbp), %rax
cmpq -0xe0(%rbp), %rax
jne 0xfe4a
cmpq $0x63, -0xa8(%rbp)
jg 0xfe37
cmpq $0x0, -0xa8(%rbp)
je 0xfb37
movsd -0x60(%rbp), %xmm1
movsd -0x80(%rbp), %xmm0
movsd -0x68(%rbp), %xmm2
subsd -0x60(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
movsd 0x455fc(%rip), %xmm1    # 0x55008
callq 0x3c3d0
testb $0x1, %al
jne 0xfa17
jmp 0xfa24
movsd 0x46a19(%rip), %xmm0    # 0x56438
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
xorps %xmm1, %xmm1
callq 0x3c3d0
testb $0x1, %al
jne 0xfa37
jmp 0xfa7f
movsd 0x45a11(%rip), %xmm0    # 0x55450
movsd %xmm0, -0x80(%rbp)
movsd -0x60(%rbp), %xmm1
movsd -0x80(%rbp), %xmm0
movsd -0x68(%rbp), %xmm2
subsd -0x60(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
xorps %xmm1, %xmm1
callq 0x3c3d0
testb $0x1, %al
jne 0xfa78
jmp 0xfa7d
jmp 0x103ce
jmp 0xfa7f
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movq -0x28(%rbp), %rdi
callq 0xeb20
movsd %xmm0, -0x50(%rbp)
movsd -0x68(%rbp), %xmm0
subsd -0x60(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
addsd -0x60(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x3c820
movsd -0x88(%rbp), %xmm1
callq 0x3c440
testb $0x1, %al
jne 0xfada
jmp 0xfaed
movq -0xe8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movsd -0x50(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
divsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x3c820
movsd -0x88(%rbp), %xmm1
callq 0x3c440
testb $0x1, %al
jne 0xfb22
jmp 0xfb35
movq -0xe8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
jmp 0xfb37
movsd -0x50(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
callq 0x3c440
testb $0x1, %al
jne 0xfb4f
jmp 0xfd36
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
cmpq $0x0, -0xb8(%rbp)
jge 0xfb8d
movq $0x0, -0xb8(%rbp)
movsd 0x458cd(%rip), %xmm0    # 0x55450
movsd %xmm0, -0x80(%rbp)
jmp 0xfc2c
cmpq $0x3, -0xb8(%rbp)
jle 0xfbdf
movsd 0x45469(%rip), %xmm0    # 0x55008
subsd -0x80(%rbp), %xmm0
movsd 0x4545c(%rip), %xmm1    # 0x55008
subsd -0x80(%rbp), %xmm1
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm1, %xmm0
movsd 0x45434(%rip), %xmm1    # 0x55008
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0xfc2a
cmpq $0x1, -0xb8(%rbp)
jle 0xfc05
movsd -0x80(%rbp), %xmm0
movsd 0x4585a(%rip), %xmm1    # 0x55450
mulsd %xmm1, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0xfc28
movsd -0x40(%rbp), %xmm0
subsd -0x50(%rbp), %xmm0
movsd -0x98(%rbp), %xmm1
subsd -0x90(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0xfc2a
jmp 0xfc2c
movq -0xb8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb8(%rbp)
movsd -0x60(%rbp), %xmm0
movsd 0x46805(%rip), %xmm1    # 0x56450
callq 0x3c4c0
testb $0x1, %al
jne 0xfc59
jmp 0xfd31
cmpq $0x1, -0xb0(%rbp)
jne 0xfc8e
movq $0x0, -0xb0(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xfcbf
movq $0x1, -0xb0(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x45353(%rip), %xmm0    # 0x55008
subsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd 0x45341(%rip), %xmm0    # 0x55008
subsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movq -0x28(%rbp), %rdi
callq 0xeb20
movsd %xmm0, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x90(%rbp)
movsd 0x452ff(%rip), %xmm0    # 0x55008
movsd %xmm0, -0x68(%rbp)
movsd 0x452f2(%rip), %xmm0    # 0x55008
movsd %xmm0, -0x98(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
jmp 0xfe12
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
cmpq $0x1, -0xb0(%rbp)
jne 0xfd6f
movsd -0x68(%rbp), %xmm0
movsd 0x45bc1(%rip), %xmm1    # 0x55918
callq 0x3c440
testb $0x1, %al
jne 0xfd62
jmp 0xfd6f
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x103ce
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
cmpq $0x0, -0xb8(%rbp)
jle 0xfda0
movq $0x0, -0xb8(%rbp)
movsd 0x456b7(%rip), %xmm0    # 0x55450
movsd %xmm0, -0x80(%rbp)
jmp 0xfe00
cmpq $-0x3, -0xb8(%rbp)
jge 0xfdbb
movsd -0x80(%rbp), %xmm0
mulsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0xfdfe
cmpq $-0x1, -0xb8(%rbp)
jge 0xfdd9
movsd 0x45683(%rip), %xmm0    # 0x55450
mulsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0xfdfc
movsd -0x50(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
movsd -0x98(%rbp), %xmm1
subsd -0x90(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0xfdfe
jmp 0xfe00
movq -0xb8(%rbp), %rax
subq $0x1, %rax
movq %rax, -0xb8(%rbp)
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movq -0x100(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movq -0xd0(%rbp), %rax
cmpq -0x100(%rbp), %rax
jne 0xfeb7
movsd -0x60(%rbp), %xmm0
movsd 0x451a1(%rip), %xmm1    # 0x55008
callq 0x3c500
testb $0x1, %al
jne 0xfe72
jmp 0xfe84
movsd 0x465be(%rip), %xmm0    # 0x56438
movsd %xmm0, -0x58(%rbp)
jmp 0x103ce
movsd -0x58(%rbp), %xmm0
xorps %xmm1, %xmm1
callq 0x3c480
testb $0x1, %al
jne 0xfe97
jmp 0xfea4
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x103ce
movq -0xe8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movq -0xd0(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jne 0xff7a
cmpq $0x0, -0xc0(%rbp)
je 0xfeda
jmp 0x103ce
movq $0x1, -0xc0(%rbp)
movsd -0x30(%rbp), %xmm0
addsd -0x38(%rbp), %xmm0
movq -0x28(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x5530
movsd %xmm0, -0x148(%rbp)
movsd -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x5530
movaps %xmm0, %xmm1
movsd -0x148(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x140(%rbp)
movsd -0x38(%rbp), %xmm0
movq -0x28(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x5530
movaps %xmm0, %xmm1
movsd -0x140(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
movq $0x0, -0xa8(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movq -0xd0(%rbp), %rax
cmpq -0xf0(%rbp), %rax
jne 0x10396
cmpq $0x7, -0xa8(%rbp)
jg 0x10383
cmpq $0x0, -0xa8(%rbp)
je 0xffc3
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movq -0x28(%rbp), %rdi
callq 0xeb20
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movsd -0x90(%rbp), %xmm1
callq 0x3c440
testb $0x1, %al
jne 0xffdb
jmp 0xfff4
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x1006e
movsd -0x50(%rbp), %xmm0
movsd -0x98(%rbp), %xmm1
callq 0x3c4c0
testb $0x1, %al
jne 0x1000c
jmp 0x10025
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x1006c
movsd -0x50(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
callq 0x3c440
testb $0x1, %al
jne 0x1003a
jmp 0x10053
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
jmp 0x1006a
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
jmp 0x1006c
jmp 0x1006e
movsd -0x58(%rbp), %xmm0
movsd 0x44f8d(%rip), %xmm1    # 0x55008
callq 0x3c3d0
testb $0x1, %al
jne 0x10097
movsd -0x58(%rbp), %xmm0
xorps %xmm1, %xmm1
callq 0x3c3d0
testb $0x1, %al
jne 0x10097
jmp 0x100aa
movq -0xf8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movsd -0x30(%rbp), %xmm0
movsd 0x44f51(%rip), %xmm1    # 0x55008
subsd %xmm1, %xmm0
movsd %xmm0, -0x158(%rbp)
movsd -0x58(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x3cd70
movsd %xmm0, -0x160(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x44f22(%rip), %xmm1    # 0x55008
subsd %xmm1, %xmm0
movsd %xmm0, -0x168(%rbp)
movsd 0x44f0e(%rip), %xmm0    # 0x55008
subsd -0x58(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x3cd70
movsd -0x168(%rbp), %xmm1
movsd -0x160(%rbp), %xmm2
movaps %xmm0, %xmm3
movsd -0x158(%rbp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x150(%rbp)
movq -0x28(%rbp), %rdi
movsd 0x462d6(%rip), %xmm0    # 0x56428
callq 0x3cd70
movaps %xmm0, %xmm1
movsd -0x150(%rbp), %xmm0
callq 0x3c440
testb $0x1, %al
jne 0x1016d
jmp 0x10172
jmp 0x103ce
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x170(%rbp)
movq -0x28(%rbp), %rdi
movsd 0x4561d(%rip), %xmm0    # 0x557a8
callq 0x3cd70
movaps %xmm0, %xmm1
movsd -0x170(%rbp), %xmm0
callq 0x3c4c0
testb $0x1, %al
jne 0x101a6
jmp 0x101b9
movq -0xf8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movsd -0x48(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x3cdd0
movsd %xmm0, -0x48(%rbp)
movsd -0x50(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
divsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x58(%rbp), %xmm0
subsd -0x48(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0xa0(%rbp), %xmm0
movsd -0x60(%rbp), %xmm1
callq 0x3c480
testb $0x1, %al
jne 0x1020a
jmp 0x1027e
movsd -0x58(%rbp), %xmm0
subsd -0x60(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
subsd -0x60(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x60(%rbp), %xmm1
movsd 0x4521c(%rip), %xmm0    # 0x55450
mulsd -0x50(%rbp), %xmm0
movsd -0x58(%rbp), %xmm2
subsd -0x60(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0xa0(%rbp), %xmm0
xorps %xmm1, %xmm1
callq 0x3c480
testb $0x1, %al
jne 0x10269
jmp 0x1027c
movq -0xf8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
jmp 0x1027e
movsd -0xa0(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
callq 0x3c500
testb $0x1, %al
jne 0x10299
jmp 0x10329
movsd -0x68(%rbp), %xmm0
subsd -0x58(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
subsd -0x60(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x68(%rbp), %xmm1
movsd 0x4518d(%rip), %xmm0    # 0x55450
mulsd -0x50(%rbp), %xmm0
movsd -0x68(%rbp), %xmm2
subsd -0x58(%rbp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0xa0(%rbp), %xmm0
movsd 0x44cff(%rip), %xmm1    # 0x55008
callq 0x3c500
testb $0x1, %al
jne 0x10314
jmp 0x10327
movq -0xf8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
jmp 0x10329
movsd -0xa0(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x48(%rbp), %xmm0
divsd -0x58(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x3c820
movsd 0x460f7(%rip), %xmm1    # 0x56448
callq 0x3c440
testb $0x1, %al
jne 0x1035c
jmp 0x1035e
jmp 0x103ce
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movq -0xf8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
movq -0xd0(%rbp), %rax
cmpq -0xf8(%rbp), %rax
jne 0x103c9
movsd 0x46092(%rip), %xmm0    # 0x56440
movsd %xmm0, -0x88(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xf566
jmp 0xf566
cmpq $0x0, -0xb0(%rbp)
je 0x10413
movsd -0x58(%rbp), %xmm0
movsd 0x45533(%rip), %xmm1    # 0x55918
callq 0x3c480
testb $0x1, %al
jne 0x103f0
jmp 0x103ff
movsd 0x46040(%rip), %xmm0    # 0x56438
movsd %xmm0, -0x58(%rbp)
jmp 0x10411
movsd 0x44c01(%rip), %xmm0    # 0x55008
subsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x10413
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x108(%rbp)
movsd -0x108(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nopl (%rax,%rax)