// File: /workspace/github_cpp_makefile_star2_O3/mouda[P]LTE_random_access-simulate/alglibinternal.cpp
// Function: alglib_impl::internalschurdecomposition(alglib_impl::ae_matrix*, long, long, long, alglib_impl::ae_vector*, alglib_impl::ae_vector*, alglib_impl::ae_matrix*, long*, alglib_impl::ae_state*)
void internalschurdecomposition(/* Real    */ ae_matrix* h,
     ae_int_t n,
     ae_int_t tneeded,
     ae_int_t zneeded,
     /* Real    */ ae_vector* wr,
     /* Real    */ ae_vector* wi,
     /* Real    */ ae_matrix* z,
     ae_int_t* info,
     ae_state *_state)
{
    ae_frame _frame_block;
    ae_vector work;
    ae_int_t i;
    ae_int_t i1;
    ae_int_t i2;
    ae_int_t ierr;
    ae_int_t ii;
    ae_int_t itemp;
    ae_int_t itn;
    ae_int_t its;
    ae_int_t j;
    ae_int_t k;
    ae_int_t l;
    ae_int_t maxb;
    ae_int_t nr;
    ae_int_t ns;
    ae_int_t nv;
    double absw;
    double ovfl;
    double smlnum;
    double tau;
    double temp;
    double tst1;
    double ulp;
    double unfl;
    ae_matrix s;
    ae_vector v;
    ae_vector vv;
    ae_vector workc1;
    ae_vector works1;
    ae_vector workv3;
    ae_vector tmpwr;
    ae_vector tmpwi;
    ae_bool initz;
    ae_bool wantt;
    ae_bool wantz;
    double cnst;
    ae_bool failflag;
    ae_int_t p1;
    ae_int_t p2;
    double vt;

    ae_frame_make(_state, &_frame_block);
    ae_vector_clear(wr);
    ae_vector_clear(wi);
    *info = 0;
    ae_vector_init(&work, 0, DT_REAL, _state, ae_true);
    ae_matrix_init(&s, 0, 0, DT_REAL, _state, ae_true);
    ae_vector_init(&v, 0, DT_REAL, _state, ae_true);
    ae_vector_init(&vv, 0, DT_REAL, _state, ae_true);
    ae_vector_init(&workc1, 0, DT_REAL, _state, ae_true);
    ae_vector_init(&works1, 0, DT_REAL, _state, ae_true);
    ae_vector_init(&workv3, 0, DT_REAL, _state, ae_true);
    ae_vector_init(&tmpwr, 0, DT_REAL, _state, ae_true);
    ae_vector_init(&tmpwi, 0, DT_REAL, _state, ae_true);

    
    /*
     * Set the order of the multi-shift QR algorithm to be used.
     * If you want to tune algorithm, change this values
     */
    ns = 12;
    maxb = 50;
    
    /*
     * Now 2 < NS <= MAXB < NH.
     */
    maxb = ae_maxint(3, maxb, _state);
    ns = ae_minint(maxb, ns, _state);
    
    /*
     * Initialize
     */
    cnst = 1.5;
    ae_vector_set_length(&work, ae_maxint(n, 1, _state)+1, _state);
    ae_matrix_set_length(&s, ns+1, ns+1, _state);
    ae_vector_set_length(&v, ns+1+1, _state);
    ae_vector_set_length(&vv, ns+1+1, _state);
    ae_vector_set_length(wr, ae_maxint(n, 1, _state)+1, _state);
    ae_vector_set_length(wi, ae_maxint(n, 1, _state)+1, _state);
    ae_vector_set_length(&workc1, 1+1, _state);
    ae_vector_set_length(&works1, 1+1, _state);
    ae_vector_set_length(&workv3, 3+1, _state);
    ae_vector_set_length(&tmpwr, ae_maxint(n, 1, _state)+1, _state);
    ae_vector_set_length(&tmpwi, ae_maxint(n, 1, _state)+1, _state);
    ae_assert(n>=0, "InternalSchurDecomposition: incorrect N!", _state);
    ae_assert(tneeded==0||tneeded==1, "InternalSchurDecomposition: incorrect TNeeded!", _state);
    ae_assert((zneeded==0||zneeded==1)||zneeded==2, "InternalSchurDecomposition: incorrect ZNeeded!", _state);
    wantt = tneeded==1;
    initz = zneeded==2;
    wantz = zneeded!=0;
    *info = 0;
    
    /*
     * Initialize Z, if necessary
     */
    if( initz )
    {
        ae_matrix_set_length(z, n+1, n+1, _state);
        for(i=1; i<=n; i++)
        {
            for(j=1; j<=n; j++)
            {
                if( i==j )
                {
                    z->ptr.pp_double[i][j] = 1;
                }
                else
                {
                    z->ptr.pp_double[i][j] = 0;
                }
            }
        }
    }
    
    /*
     * Quick return if possible
     */
    if( n==0 )
    {
        ae_frame_leave(_state);
        return;
    }
    if( n==1 )
    {
        wr->ptr.p_double[1] = h->ptr.pp_double[1][1];
        wi->ptr.p_double[1] = 0;
        ae_frame_leave(_state);
        return;
    }
    
    /*
     * Set rows and columns 1 to N to zero below the first
     * subdiagonal.
     */
    for(j=1; j<=n-2; j++)
    {
        for(i=j+2; i<=n; i++)
        {
            h->ptr.pp_double[i][j] = 0;
        }
    }
    
    /*
     * Test if N is sufficiently small
     */
    if( (ns<=2||ns>n)||maxb>=n )
    {
        
        /*
         * Use the standard double-shift algorithm
         */
        hsschur_internalauxschur(wantt, wantz, n, 1, n, h, wr, wi, 1, n, z, &work, &workv3, &workc1, &works1, info, _state);
        
        /*
         * fill entries under diagonal blocks of T with zeros
         */
        if( wantt )
        {
            j = 1;
            while(j<=n)
            {
                if( ae_fp_eq(wi->ptr.p_double[j],0) )
                {
                    for(i=j+1; i<=n; i++)
                    {
                        h->ptr.pp_double[i][j] = 0;
                    }
                    j = j+1;
                }
                else
                {
                    for(i=j+2; i<=n; i++)
                    {
                        h->ptr.pp_double[i][j] = 0;
                        h->ptr.pp_double[i][j+1] = 0;
                    }
                    j = j+2;
                }
            }
        }
        ae_frame_leave(_state);
        return;
    }
    unfl = ae_minrealnumber;
    ovfl = 1/unfl;
    ulp = 2*ae_machineepsilon;
    smlnum = unfl*(n/ulp);
    
    /*
     * I1 and I2 are the indices of the first row and last column of H
     * to which transformations must be applied. If eigenvalues only are
     * being computed, I1 and I2 are set inside the main loop.
     */
    i1 = 1;
    i2 = n;
    
    /*
     * ITN is the total number of multiple-shift QR iterations allowed.
     */
    itn = 30*n;
    
    /*
     * The main loop begins here. I is the loop index and decreases from
     * IHI to ILO in steps of at most MAXB. Each iteration of the loop
     * works with the active submatrix in rows and columns L to I.
     * Eigenvalues I+1 to IHI have already converged. Either L = ILO or
     * H(L,L-1) is negligible so that the matrix splits.
     */
    i = n;
    for(;;)
    {
        l = 1;
        if( i<1 )
        {
            
            /*
             * fill entries under diagonal blocks of T with zeros
             */
            if( wantt )
            {
                j = 1;
                while(j<=n)
                {
                    if( ae_fp_eq(wi->ptr.p_double[j],0) )
                    {
                        for(i=j+1; i<=n; i++)
                        {
                            h->ptr.pp_double[i][j] = 0;
                        }
                        j = j+1;
                    }
                    else
                    {
                        for(i=j+2; i<=n; i++)
                        {
                            h->ptr.pp_double[i][j] = 0;
                            h->ptr.pp_double[i][j+1] = 0;
                        }
                        j = j+2;
                    }
                }
            }
            
            /*
             * Exit
             */
            ae_frame_leave(_state);
            return;
        }
        
        /*
         * Perform multiple-shift QR iterations on rows and columns ILO to I
         * until a submatrix of order at most MAXB splits off at the bottom
         * because a subdiagonal element has become negligible.
         */
        failflag = ae_true;
        for(its=0; its<=itn; its++)
        {
            
            /*
             * Look for a single small subdiagonal element.
             */
            for(k=i; k>=l+1; k--)
            {
                tst1 = ae_fabs(h->ptr.pp_double[k-1][k-1], _state)+ae_fabs(h->ptr.pp_double[k][k], _state);
                if( ae_fp_eq(tst1,0) )
                {
                    tst1 = upperhessenberg1norm(h, l, i, l, i, &work, _state);
                }
                if( ae_fp_less_eq(ae_fabs(h->ptr.pp_double[k][k-1], _state),ae_maxreal(ulp*tst1, smlnum, _state)) )
                {
                    break;
                }
            }
            l = k;
            if( l>1 )
            {
                
                /*
                 * H(L,L-1) is negligible.
                 */
                h->ptr.pp_double[l][l-1] = 0;
            }
            
            /*
             * Exit from loop if a submatrix of order <= MAXB has split off.
             */
            if( l>=i-maxb+1 )
            {
                failflag = ae_false;
                break;
            }
            
            /*
             * Now the active submatrix is in rows and columns L to I. If
             * eigenvalues only are being computed, only the active submatrix
             * need be transformed.
             */
            if( its==20||its==30 )
            {
                
                /*
                 * Exceptional shifts.
                 */
                for(ii=i-ns+1; ii<=i; ii++)
                {
                    wr->ptr.p_double[ii] = cnst*(ae_fabs(h->ptr.pp_double[ii][ii-1], _state)+ae_fabs(h->ptr.pp_double[ii][ii], _state));
                    wi->ptr.p_double[ii] = 0;
                }
            }
            else
            {
                
                /*
                 * Use eigenvalues of trailing submatrix of order NS as shifts.
                 */
                copymatrix(h, i-ns+1, i, i-ns+1, i, &s, 1, ns, 1, ns, _state);
                hsschur_internalauxschur(ae_false, ae_false, ns, 1, ns, &s, &tmpwr, &tmpwi, 1, ns, z, &work, &workv3, &workc1, &works1, &ierr, _state);
                for(p1=1; p1<=ns; p1++)
                {
                    wr->ptr.p_double[i-ns+p1] = tmpwr.ptr.p_double[p1];
                    wi->ptr.p_double[i-ns+p1] = tmpwi.ptr.p_double[p1];
                }
                if( ierr>0 )
                {
                    
                    /*
                     * If DLAHQR failed to compute all NS eigenvalues, use the
                     * unconverged diagonal elements as the remaining shifts.
                     */
                    for(ii=1; ii<=ierr; ii++)
                    {
                        wr->ptr.p_double[i-ns+ii] = s.ptr.pp_double[ii][ii];
                        wi->ptr.p_double[i-ns+ii] = 0;
                    }
                }
            }
            
            /*
             * Form the first column of (G-w(1)) (G-w(2)) . . . (G-w(ns))
             * where G is the Hessenberg submatrix H(L:I,L:I) and w is
             * the vector of shifts (stored in WR and WI). The result is
             * stored in the local array V.
             */
            v.ptr.p_double[1] = 1;
            for(ii=2; ii<=ns+1; ii++)
            {
                v.ptr.p_double[ii] = 0;
            }
            nv = 1;
            for(j=i-ns+1; j<=i; j++)
            {
                if( ae_fp_greater_eq(wi->ptr.p_double[j],0) )
                {
                    if( ae_fp_eq(wi->ptr.p_double[j],0) )
                    {
                        
                        /*
                         * real shift
                         */
                        p1 = nv+1;
                        ae_v_move(&vv.ptr.p_double[1], 1, &v.ptr.p_double[1], 1, ae_v_len(1,p1));
                        matrixvectormultiply(h, l, l+nv, l, l+nv-1, ae_false, &vv, 1, nv, 1.0, &v, 1, nv+1, -wr->ptr.p_double[j], _state);
                        nv = nv+1;
                    }
                    else
                    {
                        if( ae_fp_greater(wi->ptr.p_double[j],0) )
                        {
                            
                            /*
                             * complex conjugate pair of shifts
                             */
                            p1 = nv+1;
                            ae_v_move(&vv.ptr.p_double[1], 1, &v.ptr.p_double[1], 1, ae_v_len(1,p1));
                            matrixvectormultiply(h, l, l+nv, l, l+nv-1, ae_false, &v, 1, nv, 1.0, &vv, 1, nv+1, -2*wr->ptr.p_double[j], _state);
                            itemp = vectoridxabsmax(&vv, 1, nv+1, _state);
                            temp = 1/ae_maxreal(ae_fabs(vv.ptr.p_double[itemp], _state), smlnum, _state);
                            p1 = nv+1;
                            ae_v_muld(&vv.ptr.p_double[1], 1, ae_v_len(1,p1), temp);
                            absw = pythag2(wr->ptr.p_double[j], wi->ptr.p_double[j], _state);
                            temp = temp*absw*absw;
                            matrixvectormultiply(h, l, l+nv+1, l, l+nv, ae_false, &vv, 1, nv+1, 1.0, &v, 1, nv+2, temp, _state);
                            nv = nv+2;
                        }
                    }
                    
                    /*
                     * Scale V(1:NV) so that max(abs(V(i))) = 1. If V is zero,
                     * reset it to the unit vector.
                     */
                    itemp = vectoridxabsmax(&v, 1, nv, _state);
                    temp = ae_fabs(v.ptr.p_double[itemp], _state);
                    if( ae_fp_eq(temp,0) )
                    {
                        v.ptr.p_double[1] = 1;
                        for(ii=2; ii<=nv; ii++)
                        {
                            v.ptr.p_double[ii] = 0;
                        }
                    }
                    else
                    {
                        temp = ae_maxreal(temp, smlnum, _state);
                        vt = 1/temp;
                        ae_v_muld(&v.ptr.p_double[1], 1, ae_v_len(1,nv), vt);
                    }
                }
            }
            
            /*
             * Multiple-shift QR step
             */
            for(k=l; k<=i-1; k++)
            {
                
                /*
                 * The first iteration of this loop determines a reflection G
                 * from the vector V and applies it from left and right to H,
                 * thus creating a nonzero bulge below the subdiagonal.
                 *
                 * Each subsequent iteration determines a reflection G to
                 * restore the Hessenberg form in the (K-1)th column, and thus
                 * chases the bulge one step toward the bottom of the active
                 * submatrix. NR is the order of G.
                 */
                nr = ae_minint(ns+1, i-k+1, _state);
                if( k>l )
                {
                    p1 = k-1;
                    p2 = k+nr-1;
                    ae_v_move(&v.ptr.p_double[1], 1, &h->ptr.pp_double[k][p1], h->stride, ae_v_len(1,nr));
                }
                generatereflection(&v, nr, &tau, _state);
                if( k>l )
                {
                    h->ptr.pp_double[k][k-1] = v.ptr.p_double[1];
                    for(ii=k+1; ii<=i; ii++)
                    {
                        h->ptr.pp_double[ii][k-1] = 0;
                    }
                }
                v.ptr.p_double[1] = 1;
                
                /*
                 * Apply G from the left to transform the rows of the matrix in
                 * columns K to I2.
                 */
                applyreflectionfromtheleft(h, tau, &v, k, k+nr-1, k, i2, &work, _state);
                
                /*
                 * Apply G from the right to transform the columns of the
                 * matrix in rows I1 to min(K+NR,I).
                 */
                applyreflectionfromtheright(h, tau, &v, i1, ae_minint(k+nr, i, _state), k, k+nr-1, &work, _state);
                if( wantz )
                {
                    
                    /*
                     * Accumulate transformations in the matrix Z
                     */
                    applyreflectionfromtheright(z, tau, &v, 1, n, k, k+nr-1, &work, _state);
                }
            }
        }
        
        /*
         * Failure to converge in remaining number of iterations
         */
        if( failflag )
        {
            *info = i;
            ae_frame_leave(_state);
            return;
        }
        
        /*
         * A submatrix of order <= MAXB in rows and columns L to I has split
         * off. Use the double-shift QR algorithm to handle it.
         */
        hsschur_internalauxschur(wantt, wantz, n, l, i, h, wr, wi, 1, n, z, &work, &workv3, &workc1, &works1, info, _state);
        if( *info>0 )
        {
            ae_frame_leave(_state);
            return;
        }
        
        /*
         * Decrement number of remaining iterations, and return to start of
         * the main loop with a new value of I.
         */
        itn = itn-its;
        i = l-1;
    }
    ae_frame_leave(_state);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %r9, %r13
movq %r8, %r14
movq %rcx, 0x38(%rsp)
movq %rdx, 0x28(%rsp)
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
movq 0x2e0(%rsp), %rbp
movq 0x2d8(%rsp), %rbx
leaq 0x280(%rsp), %rsi
movq %rbp, %rdi
callq 0x25055
movq %r14, %rdi
callq 0x253a5
movq %r13, %rdi
callq 0x253a5
xorl %eax, %eax
movq %rax, (%rbx)
leaq 0x120(%rsp), %rdi
movl $0x3, %edx
xorl %esi, %esi
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x251ec
leaq 0x240(%rsp), %rdi
movl $0x3, %ecx
xorl %esi, %esi
xorl %edx, %edx
movq %rbp, %r8
movl $0x1, %r9d
callq 0x2541c
leaq 0x58(%rsp), %rdi
movl $0x3, %edx
xorl %esi, %esi
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x251ec
leaq 0xf0(%rsp), %r15
movl $0x3, %edx
movq %r15, %rdi
xorl %esi, %esi
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x251ec
leaq 0x1b0(%rsp), %rdi
movl $0x3, %edx
xorl %esi, %esi
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x251ec
leaq 0x180(%rsp), %rdi
movl $0x3, %edx
xorl %esi, %esi
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x251ec
leaq 0x150(%rsp), %rdi
movl $0x3, %edx
xorl %esi, %esi
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x251ec
leaq 0x210(%rsp), %rdi
movl $0x3, %edx
xorl %esi, %esi
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x251ec
leaq 0x1e0(%rsp), %rdi
movl $0x3, %edx
xorl %esi, %esi
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x251ec
movl $0x3, %edi
movl $0x32, %esi
movq %rbp, %rdx
callq 0x25ec6
movl $0xc, %esi
movq %rax, 0x88(%rsp)
movq %rax, %rdi
movq %rbp, %rdx
callq 0x25ed1
movq %rax, %rbx
movl $0x1, %esi
movq %r12, %rdi
movq %rbp, %rdx
callq 0x25ec6
leaq 0x1(%rax), %rsi
leaq 0x120(%rsp), %rdi
movq %rbp, %rdx
callq 0x25326
leaq 0x1(%rbx), %rdx
leaq 0x240(%rsp), %rdi
movq %rdx, %rsi
movq %rdx, 0xe0(%rsp)
movq %rbp, %rcx
callq 0x256d1
movq %rbx, 0x30(%rsp)
addq $0x2, %rbx
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x25326
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x25326
movl $0x1, %esi
movq %r12, %rdi
movq %rbp, %rdx
callq 0x25ec6
leaq 0x1(%rax), %rsi
movq %r14, 0x20(%rsp)
movq %r14, %rdi
movq %rbp, %rdx
callq 0x25326
movl $0x1, %esi
movq %r12, %rdi
movq %rbp, %rdx
callq 0x25ec6
leaq 0x1(%rax), %rsi
movq %r13, %rdi
movq %rbp, %rdx
callq 0x25326
movl $0x2, %esi
leaq 0x1b0(%rsp), %rdi
movq %rbp, %rdx
callq 0x25326
movl $0x2, %esi
leaq 0x180(%rsp), %rdi
movq %rbp, %rdx
callq 0x25326
movl $0x4, %esi
leaq 0x150(%rsp), %rdi
movq %rbp, %rdx
callq 0x25326
movl $0x1, %esi
movq %r12, %rdi
movq %rbp, %rdx
callq 0x25ec6
leaq 0x1(%rax), %rsi
leaq 0x210(%rsp), %rdi
movq %rbp, %rdx
callq 0x25326
movl $0x1, %esi
movq %r12, %rdi
movq %rbp, %rdx
callq 0x25ec6
leaq 0x1(%rax), %rsi
leaq 0x1e0(%rsp), %rdi
movq %rbp, %rdx
callq 0x25326
xorl %edi, %edi
testq %r12, %r12
setns %dil
leaq 0x1b99a(%rip), %rsi     # 0x35feb
movq %rbp, %rdx
callq 0x2510e
xorl %edi, %edi
cmpq $0x2, 0x28(%rsp)
setb %dil
leaq 0x1b9a8(%rip), %rsi     # 0x36014
movq %rbp, %rdx
callq 0x2510e
xorl %edi, %edi
movq 0x38(%rsp), %rbx
cmpq $0x3, %rbx
setb %dil
leaq 0x1b9b9(%rip), %rsi     # 0x36043
movq %rbp, %rdx
callq 0x2510e
movq 0x2d0(%rsp), %r8
xorl %eax, %eax
movq 0x2d8(%rsp), %rcx
movq %rax, (%rcx)
cmpq $0x2, %rbx
jne 0x1a713
leaq 0x1(%r12), %rdx
movq %r8, %rdi
movq %rdx, %rsi
movq 0x2e0(%rsp), %rcx
movq %r8, %rbx
callq 0x256d1
movq %rbx, %r8
testq %r12, %r12
jle 0x1a713
movl $0x1, %ecx
xorl %eax, %eax
movsd 0x18b01(%rip), %xmm0    # 0x331e0
xorl %edx, %edx
movapd %xmm0, %xmm1
cmpq %rdx, %rax
je 0x1a6ee
xorpd %xmm1, %xmm1
movq 0x38(%r8), %rsi
movq (%rsi,%rcx,8), %rsi
movsd %xmm1, 0x8(%rsi,%rdx,8)
incq %rdx
cmpq %rdx, %r12
jne 0x1a6e1
leaq 0x1(%rcx), %rdx
incq %rax
cmpq %r12, %rcx
movq %rdx, %rcx
jne 0x1a6df
testq %r12, %r12
je 0x1b3e8
cmpq $0x1, %r12
jne 0x1a753
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rax
movsd 0x8(%rax), %xmm0
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rax
movsd %xmm0, 0x8(%rax)
movq 0x28(%r13), %rax
movq $0x0, 0x8(%rax)
jmp 0x1b3e8
cmpq $0x3, %r12
movq 0x8(%rsp), %r15
jl 0x1a798
leaq -0x2(%r12), %rax
movl $0x1, %edx
movl $0x2, %ecx
movq %rcx, %rsi
movq 0x38(%r15), %rdi
movq 0x8(%rdi,%rsi,8), %rdi
movq $0x0, (%rdi,%rdx,8)
incq %rsi
cmpq %r12, %rsi
jl 0x1a770
leaq 0x1(%rdx), %rsi
incq %rcx
cmpq %rax, %rdx
movq %rsi, %rdx
jne 0x1a76d
cmpq %r12, 0x88(%rsp)
movq 0x30(%rsp), %rcx
jge 0x1b2c7
cmpq $0x3, %rcx
jl 0x1b2c7
cmpq %r12, %rcx
jg 0x1b2c7
xorps %xmm0, %xmm0
cvtsi2sd %r12, %xmm0
divsd 0x18f5a(%rip), %xmm0    # 0x33728
mulsd 0x19a9a(%rip), %xmm0    # 0x34270
movsd %xmm0, 0x50(%rsp)
movq %r12, %rbp
shlq $0x5, %rbp
subq %r12, %rbp
subq %r12, %rbp
leaq (,%rcx,8), %rax
movl $0x8, %ecx
subq %rax, %rcx
movq %rcx, 0xb0(%rsp)
movq %r12, 0x48(%rsp)
movq %r12, 0x10(%rsp)
movq %r13, 0x40(%rsp)
testq %rbp, %rbp
js 0x1b3d8
movq 0x10(%rsp), %rcx
movq %rcx, %rax
subq 0x88(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq %rcx, %rax
subq 0x30(%rsp), %rax
movq %rax, 0x90(%rsp)
incq %rax
movq %rax, 0xb8(%rsp)
leaq 0x1(%rcx), %rax
movq %rax, 0xd8(%rsp)
movq 0xb0(%rsp), %rax
leaq (%rax,%rcx,8), %rax
movq %rax, 0xa0(%rsp)
movl $0x1, %r12d
xorl %eax, %eax
movq %rbp, 0xc0(%rsp)
movq %rax, 0x98(%rsp)
movq %r12, %rbx
movq 0x10(%rsp), %rcx
movq %rcx, %r12
cmpq %rbx, %rcx
jle 0x1a978
movq 0x38(%r15), %rax
movq -0x8(%rax,%r12,8), %rax
movsd -0x8(%rax,%r12,8), %xmm0
movq 0x2e0(%rsp), %r14
movq %r14, %rdi
callq 0x25e30
movsd %xmm0, (%rsp)
movq 0x38(%r15), %rax
movq (%rax,%r12,8), %rax
movsd (%rax,%r12,8), %xmm0
movq %r14, %rdi
callq 0x25e30
addsd (%rsp), %xmm0
xorpd %xmm1, %xmm1
movsd %xmm0, (%rsp)
callq 0x25b75
testb %al, %al
je 0x1a91c
subq $0x8, %rsp
movq %r15, %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rcx
movq %rdx, %r8
leaq 0x128(%rsp), %r9
pushq 0x2e8(%rsp)
callq 0x16372
addq $0x10, %rsp
movsd %xmm0, (%rsp)
movq 0x38(%r15), %rax
movq (%rax,%r12,8), %rax
movsd -0x8(%rax,%r12,8), %xmm0
movq 0x2e0(%rsp), %r14
movq %r14, %rdi
callq 0x25e30
movsd %xmm0, 0x18(%rsp)
movsd (%rsp), %xmm0
mulsd 0x18dda(%rip), %xmm0    # 0x33728
movsd 0x50(%rsp), %xmm1
movq %r14, %rdi
callq 0x25edc
movapd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
callq 0x25bd9
leaq -0x1(%r12), %rcx
testb %al, %al
je 0x1a88c
cmpq $0x2, %r12
jl 0x1a98f
movq 0x38(%r15), %rax
movq (%rax,%r12,8), %rax
movq $0x0, -0x8(%rax,%r12,8)
cmpq 0xc8(%rsp), %r12
movq 0x98(%rsp), %r14
jg 0x1b184
cmpq $0x1e, %r14
je 0x1a9b1
cmpq $0x14, %r14
jne 0x1aa2f
movq 0x90(%rsp), %rbx
leaq 0x1(%rbx), %r14
movq 0x38(%r15), %rax
movq 0x8(%rax,%rbx,8), %rax
movsd (%rax,%rbx,8), %xmm0
movq 0x2e0(%rsp), %rbp
movq %rbp, %rdi
callq 0x25e30
movsd %xmm0, (%rsp)
movq 0x38(%r15), %rax
movq 0x8(%rax,%rbx,8), %rax
movsd 0x8(%rax,%rbx,8), %xmm0
movq %rbp, %rdi
callq 0x25e30
addsd (%rsp), %xmm0
mulsd 0x1b074(%rip), %xmm0    # 0x35a78
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rax
movsd %xmm0, 0x8(%rax,%rbx,8)
movq 0x28(%r13), %rax
movq $0x0, 0x8(%rax,%rbx,8)
movq %r14, %rbx
cmpq 0x10(%rsp), %r14
jl 0x1a9b9
jmp 0x1ab72
subq $0x8, %rsp
movq %r15, %rdi
movq 0xc0(%rsp), %rcx
movq %rcx, %rsi
movq 0x18(%rsp), %rdx
movq %rdx, %r8
leaq 0x248(%rsp), %r15
movq %r15, %r9
movq 0x2e8(%rsp), %rbx
pushq %rbx
movq 0x40(%rsp), %r14
pushq %r14
movl $0x1, %eax
pushq %rax
pushq %r14
pushq %rax
callq 0x164b9
addq $0x30, %rsp
movl $0x1, %ecx
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
movq %r14, %r8
movq %r15, %r9
pushq %rbx
leaq 0xf0(%rsp), %rax
pushq %rax
leaq 0x190(%rsp), %rax
pushq %rax
leaq 0x1c8(%rsp), %rax
pushq %rax
leaq 0x170(%rsp), %rax
pushq %rax
leaq 0x148(%rsp), %rax
pushq %rax
pushq 0x300(%rsp)
pushq %r14
leaq 0x220(%rsp), %rax
pushq %rax
leaq 0x258(%rsp), %rax
pushq %rax
callq 0x1b407
addq $0x50, %rsp
xorl %eax, %eax
movq 0x20(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x238(%rsp), %rcx
movsd 0x8(%rcx,%rax,8), %xmm0
movq 0x28(%rsi), %rcx
addq %rdx, %rcx
movsd %xmm0, (%rcx,%rax,8)
movq 0x208(%rsp), %rcx
movsd 0x8(%rcx,%rax,8), %xmm0
movq 0x28(%r13), %rcx
addq %rdx, %rcx
movsd %xmm0, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r14
jne 0x1aae9
movq 0xe8(%rsp), %rax
testq %rax, %rax
jle 0x1ab72
xorl %ecx, %ecx
movq 0x278(%rsp), %rdx
movq 0x8(%rdx,%rcx,8), %rdx
movsd 0x8(%rdx,%rcx,8), %xmm0
movq 0x28(%rsi), %rdx
movq 0xa0(%rsp), %rdi
addq %rdi, %rdx
movsd %xmm0, (%rdx,%rcx,8)
movq 0x28(%r13), %rdx
addq %rdi, %rdx
movq $0x0, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x1ab34
movq 0x80(%rsp), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x8(%rax)
xorl %eax, %eax
movq 0x30(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq $0x0, 0x10(%rcx,%rax,8)
incq %rax
cmpq %rax, %rdx
jne 0x1ab8f
movl $0x1, %r14d
movq 0x90(%rsp), %r15
leaq 0x58(%rsp), %rbp
movq %r12, 0x18(%rsp)
movq 0x28(%r13), %rax
movsd 0x8(%rax,%r15,8), %xmm0
incq %r15
xorpd %xmm1, %xmm1
callq 0x25c15
testb %al, %al
je 0x1af67
movq 0x28(%r13), %rax
movsd (%rax,%r15,8), %xmm0
xorpd %xmm1, %xmm1
callq 0x25b75
testb %al, %al
je 0x1acaf
leaq 0x1(%r14), %rbx
movq 0x118(%rsp), %r13
addq $0x8, %r13
movq 0x80(%rsp), %rbp
addq $0x8, %rbp
movl $0x1, %edi
movq %rbx, %rsi
callq 0x2897c
movl $0x1, %esi
movl $0x1, %ecx
movq %r13, %rdi
movq 0x40(%rsp), %r13
movq %rbp, %rdx
movq 0x2e0(%rsp), %rbp
movq %rax, %r8
callq 0x2860a
leaq (%r12,%r14), %rdx
leaq (%r12,%r14), %r8
decq %r8
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rax
movsd (%rax,%r15,8), %xmm1
xorpd 0x18546(%rip), %xmm1    # 0x331b0
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %r12, %rcx
xorl %r9d, %r9d
movsd 0x1855c(%rip), %xmm0    # 0x331e0
pushq %rbp
leaq 0x68(%rsp), %rbp
pushq %rbx
movl $0x1, %eax
pushq %rax
pushq %rbp
pushq %r14
pushq %rax
leaq 0x128(%rsp), %rax
pushq %rax
callq 0x16897
addq $0x40, %rsp
movq %rbx, %r14
jmp 0x1ae92
movq 0x28(%r13), %rax
movsd (%rax,%r15,8), %xmm0
xorpd %xmm1, %xmm1
callq 0x25bf9
testb %al, %al
je 0x1ae92
leaq 0x1(%r14), %rbx
movq 0x118(%rsp), %r13
addq $0x8, %r13
movq 0x80(%rsp), %rbp
addq $0x8, %rbp
movl $0x1, %edi
movq %rbx, %rsi
callq 0x2897c
movl $0x1, %esi
movl $0x1, %ecx
movq %r13, %rdi
movq %rbp, %rdx
movq %rax, %r8
callq 0x2860a
leaq (%r12,%r14), %rdx
movq %rdx, 0xd0(%rsp)
leaq (%r12,%r14), %r8
decq %r8
movq 0x20(%rsp), %r13
movq 0x28(%r13), %rax
movsd (%rax,%r15,8), %xmm1
mulsd 0x186db(%rip), %xmm1    # 0x33410
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %r12, %rcx
xorl %r9d, %r9d
movsd 0x18491(%rip), %xmm0    # 0x331e0
pushq 0x2e8(%rsp)
pushq %rbx
movl $0x1, %eax
pushq %rax
leaq 0x110(%rsp), %r12
pushq %r12
pushq %r14
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
callq 0x16897
addq $0x40, %rsp
movl $0x1, %esi
movq %r12, %rdi
movq %rbx, %rdx
movq 0x2e0(%rsp), %rcx
callq 0x16176
movq 0x118(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm0
movq 0x2e0(%rsp), %rdi
callq 0x25e30
movsd 0x50(%rsp), %xmm1
movq 0x2e0(%rsp), %rdi
callq 0x25edc
movsd 0x18417(%rip), %xmm1    # 0x331e0
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq 0x118(%rsp), %rbp
addq $0x8, %rbp
movl $0x1, %edi
movq %rbx, %rsi
callq 0x2897c
movl $0x1, %esi
movq %rbp, %rdi
movq 0x2e0(%rsp), %rbp
movq %rax, %rdx
movsd (%rsp), %xmm0
callq 0x28939
movq 0x28(%r13), %rax
movsd (%rax,%r15,8), %xmm0
movq 0x40(%rsp), %rax
movq 0x28(%rax), %rax
movsd (%rax,%r15,8), %xmm1
movq %rbp, %rdi
callq 0x16c30
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movq 0x18(%rsp), %rax
leaq (%rax,%r14), %rdx
incq %rdx
addq $0x2, %r14
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x20(%rsp), %rcx
movq 0xd8(%rsp), %r8
movq 0x48(%rsp), %r13
xorl %r9d, %r9d
movsd 0x1836f(%rip), %xmm0    # 0x331e0
pushq %rbp
leaq 0x68(%rsp), %rbp
pushq %r14
movl $0x1, %eax
pushq %rax
pushq %rbp
pushq %rbx
pushq %rax
pushq %r12
movq 0x58(%rsp), %r12
callq 0x16897
addq $0x40, %rsp
movl $0x1, %esi
movq %rbp, %rdi
movq %r14, %rdx
movq 0x2e0(%rsp), %rbx
movq %rbx, %rcx
callq 0x16176
movq 0x80(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm0
movq %rbx, %rdi
callq 0x25e30
xorpd %xmm1, %xmm1
movsd %xmm0, (%rsp)
callq 0x25b75
testb %al, %al
je 0x1af10
movq 0x80(%rsp), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x8(%rax)
cmpq $0x2, %r14
jl 0x1af67
movl $0x1, %eax
movq 0x80(%rsp), %rcx
movq $0x0, 0x8(%rcx,%rax,8)
incq %rax
cmpq %rax, %r14
jne 0x1aef5
jmp 0x1af67
movsd (%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
movq 0x2e0(%rsp), %rdi
callq 0x25edc
movsd 0x182b0(%rip), %xmm1    # 0x331e0
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq 0x80(%rsp), %rbx
addq $0x8, %rbx
movl $0x1, %edi
movq %r14, %rsi
callq 0x2897c
movl $0x1, %esi
movq %rbx, %rdi
movq %rax, %rdx
movsd (%rsp), %xmm0
callq 0x28939
cmpq 0x10(%rsp), %r15
jl 0x1abc0
movq %r12, %r14
movq 0x10(%rsp), %r13
cmpq %r13, %r12
movq 0x8(%rsp), %r15
jge 0x1b15d
movq 0xd8(%rsp), %rsi
subq %r14, %rsi
movq 0xe0(%rsp), %rdi
movq 0x2e0(%rsp), %rdx
callq 0x25ed1
movq %rax, %rbx
cmpq %r12, %r14
jle 0x1b061
movq 0x80(%rsp), %r13
addq $0x8, %r13
movq 0x10(%r15), %rbp
movq 0x38(%r15), %rax
movq (%rax,%r14,8), %rax
leaq (%rax,%r14,8), %r15
addq $-0x8, %r15
movl $0x1, %edi
movq %rbx, %rsi
callq 0x2897c
movl $0x1, %esi
movq %r13, %rdi
movq 0x10(%rsp), %r13
movq %r15, %rdx
movq 0x8(%rsp), %r15
movq %rbp, %rcx
movq 0x2e0(%rsp), %rbp
movq %rax, %r8
callq 0x2860a
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
leaq 0xa8(%rsp), %rdx
movq %rbp, %rcx
leaq 0x58(%rsp), %rbp
callq 0x17f9f
movq 0x80(%rsp), %rax
movsd 0x8(%rax), %xmm0
movq 0x38(%r15), %rax
movq (%rax,%r14,8), %rax
movsd %xmm0, -0x8(%rax,%r14,8)
movq %r14, %rax
movq 0x38(%r15), %rcx
movq 0x8(%rcx,%rax,8), %rcx
incq %rax
movq $0x0, -0x8(%rcx,%r14,8)
cmpq %r13, %rax
jl 0x1b045
jmp 0x1b07c
movq %rbp, %rdi
movq %rbx, %rsi
leaq 0xa8(%rsp), %rdx
movq 0x2e0(%rsp), %rcx
callq 0x17f9f
movq 0x80(%rsp), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x8(%rax)
movsd 0xa8(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq %r13, %r12
leaq (%rbx,%r14), %r13
decq %r13
addq %r14, %rbx
subq $0x8, %rsp
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r13, %rcx
movq %r14, %r8
movq 0x50(%rsp), %r9
leaq 0x128(%rsp), %rax
pushq %rax
callq 0x18296
addq $0x10, %rsp
movq %rbx, %rdi
movq %r12, %rsi
movq 0x2e0(%rsp), %rdx
callq 0x25ed1
subq $0x10, %rsp
movl $0x1, %edx
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
movq %rbp, %rsi
movq %rax, %rcx
movq %r14, %r8
movq %r13, %r9
callq 0x18437
addq $0x10, %rsp
cmpq $0x0, 0x38(%rsp)
je 0x1b147
subq $0x10, %rsp
movl $0x1, %edx
movq 0x2e0(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
movq %rbp, %rsi
movq 0x58(%rsp), %rcx
movq %r14, %r8
movq %r13, %r9
callq 0x18437
addq $0x10, %rsp
incq %r14
movq 0x10(%rsp), %r13
cmpq %r13, %r14
movq 0x18(%rsp), %r12
jne 0x1af88
movq 0x98(%rsp), %rcx
leaq 0x1(%rcx), %rax
movq 0xc0(%rsp), %rbp
cmpq %rcx, %rbp
movq 0x40(%rsp), %r13
jne 0x1a87c
jmp 0x1b3d8
xorl %esi, %esi
cmpq $0x0, 0x38(%rsp)
setne %sil
xorl %edi, %edi
cmpq $0x1, 0x28(%rsp)
sete %dil
movq 0x48(%rsp), %rdx
movq %r12, %rcx
movq 0x10(%rsp), %r8
movq %r15, %r9
pushq 0x2e0(%rsp)
movq 0x2e0(%rsp), %rbx
pushq %rbx
leaq 0x190(%rsp), %r10
pushq %r10
leaq 0x1c8(%rsp), %r10
pushq %r10
leaq 0x170(%rsp), %r10
pushq %r10
leaq 0x148(%rsp), %r10
pushq %r10
movq 0x300(%rsp), %r10
pushq %r10
pushq %rdx
pushq %r13
pushq 0x68(%rsp)
callq 0x1b407
addq $0x50, %rsp
cmpq $0x0, (%rbx)
jg 0x1b3e8
subq %r14, %rbp
leaq -0x1(%r12), %rax
movq %rax, 0x10(%rsp)
cmpq $0x2, %r12
movq 0x8(%rsp), %r15
jge 0x1a810
cmpq $0x1, 0x28(%rsp)
movq 0x48(%rsp), %r12
jne 0x1b3e8
leaq -0x1(%r12), %rbx
movl $0x1, %r15d
xorl %r14d, %r14d
movq 0x28(%r13), %rax
movsd (%rax,%r15,8), %xmm0
xorpd %xmm1, %xmm1
callq 0x25b75
testb %al, %al
je 0x1b286
leaq 0x1(%r15), %rax
cmpq %r12, %r15
jge 0x1b2ba
movq %r15, %rcx
movq 0x8(%rsp), %rsi
movq 0x38(%rsi), %rdx
movq 0x8(%rdx,%rcx,8), %rdx
movq $0x0, (%rdx,%r15,8)
incq %rcx
cmpq %rcx, %r12
jne 0x1b26b
jmp 0x1b2ba
leaq 0x2(%r15), %rax
cmpq %r12, %rax
jg 0x1b2ba
movq %r15, %rcx
movq 0x8(%rsp), %rsi
movq 0x38(%rsi), %rdx
movq 0x10(%rdx,%rcx,8), %rdx
movq %r14, (%rdx,%r15,8)
movq 0x38(%rsi), %rdx
movq 0x10(%rdx,%rcx,8), %rdx
movq %r14, 0x8(%rdx,%r15,8)
incq %rcx
cmpq %rcx, %rbx
jne 0x1b297
movq %rax, %r15
cmpq %r12, %rax
jle 0x1b243
jmp 0x1b3e8
xorl %esi, %esi
cmpq $0x0, 0x38(%rsp)
setne %sil
xorl %edi, %edi
cmpq $0x1, 0x28(%rsp)
setne %bpl
sete %dil
movl $0x1, %ebx
movl $0x1, %ecx
movq %r12, %rdx
movq %r8, %rax
movq %r12, %r8
movq %r15, %r9
pushq 0x2e0(%rsp)
pushq 0x2e0(%rsp)
leaq 0x190(%rsp), %r10
pushq %r10
leaq 0x1c8(%rsp), %r10
pushq %r10
leaq 0x170(%rsp), %r10
pushq %r10
leaq 0x148(%rsp), %r10
pushq %r10
pushq %rax
pushq %r12
pushq %r13
pushq 0x68(%rsp)
callq 0x1b407
addq $0x50, %rsp
testq %r12, %r12
setle %al
orb %bpl, %al
jne 0x1b3e8
leaq -0x1(%r12), %r14
xorl %r15d, %r15d
movq 0x28(%r13), %rax
movsd (%rax,%rbx,8), %xmm0
xorpd %xmm1, %xmm1
callq 0x25b75
testb %al, %al
je 0x1b39a
leaq 0x1(%rbx), %rax
cmpq %r12, %rbx
jge 0x1b3ce
movq %rbx, %rcx
movq 0x8(%rsp), %rsi
movq 0x38(%rsi), %rdx
movq 0x8(%rdx,%rcx,8), %rdx
movq $0x0, (%rdx,%rbx,8)
incq %rcx
cmpq %rcx, %r12
jne 0x1b37f
jmp 0x1b3ce
leaq 0x2(%rbx), %rax
cmpq %r12, %rax
jg 0x1b3ce
movq %rbx, %rcx
movq 0x8(%rsp), %rsi
movq 0x38(%rsi), %rdx
movq 0x10(%rdx,%rcx,8), %rdx
movq %r15, (%rdx,%rbx,8)
movq 0x38(%rsi), %rdx
movq 0x10(%rdx,%rcx,8), %rdx
movq %r15, 0x8(%rdx,%rbx,8)
incq %rcx
cmpq %rcx, %r14
jne 0x1b3ab
movq %rax, %rbx
cmpq %r12, %rax
jle 0x1b358
jmp 0x1b3e8
movq 0x2d8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
movq 0x2e0(%rsp), %rdi
callq 0x24ff2
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq