// File: /workspace/github_cpp_makefile_star2_O3/mouda[P]LTE_random_access-simulate/alglibinternal.cpp
// Function: alglib_impl::mcsrch(long, alglib_impl::ae_vector*, double*, alglib_impl::ae_vector*, alglib_impl::ae_vector*, double*, double, double, long*, long*, alglib_impl::ae_vector*, alglib_impl::linminstate*, long*, alglib_impl::ae_state*)
void mcsrch(ae_int_t n,
     /* Real    */ ae_vector* x,
     double* f,
     /* Real    */ ae_vector* g,
     /* Real    */ ae_vector* s,
     double* stp,
     double stpmax,
     double gtol,
     ae_int_t* info,
     ae_int_t* nfev,
     /* Real    */ ae_vector* wa,
     linminstate* state,
     ae_int_t* stage,
     ae_state *_state)
{
    double v;
    double p5;
    double p66;
    double zero;


    
    /*
     * init
     */
    p5 = 0.5;
    p66 = 0.66;
    state->xtrapf = 4.0;
    zero = 0;
    if( ae_fp_eq(stpmax,0) )
    {
        stpmax = linmin_defstpmax;
    }
    if( ae_fp_less(*stp,linmin_stpmin) )
    {
        *stp = linmin_stpmin;
    }
    if( ae_fp_greater(*stp,stpmax) )
    {
        *stp = stpmax;
    }
    
    /*
     * Main cycle
     */
    for(;;)
    {
        if( *stage==0 )
        {
            
            /*
             * NEXT
             */
            *stage = 2;
            continue;
        }
        if( *stage==2 )
        {
            state->infoc = 1;
            *info = 0;
            
            /*
             *     CHECK THE INPUT PARAMETERS FOR ERRORS.
             */
            if( ae_fp_less(stpmax,linmin_stpmin)&&ae_fp_greater(stpmax,0) )
            {
                *info = 5;
                *stp = 0.0;
                return;
            }
            if( ((((((n<=0||ae_fp_less_eq(*stp,0))||ae_fp_less(linmin_ftol,0))||ae_fp_less(gtol,zero))||ae_fp_less(linmin_xtol,zero))||ae_fp_less(linmin_stpmin,zero))||ae_fp_less(stpmax,linmin_stpmin))||linmin_maxfev<=0 )
            {
                *stage = 0;
                return;
            }
            
            /*
             *     COMPUTE THE INITIAL GRADIENT IN THE SEARCH DIRECTION
             *     AND CHECK THAT S IS A DESCENT DIRECTION.
             */
            v = ae_v_dotproduct(&g->ptr.p_double[0], 1, &s->ptr.p_double[0], 1, ae_v_len(0,n-1));
            state->dginit = v;
            if( ae_fp_greater_eq(state->dginit,0) )
            {
                *stage = 0;
                return;
            }
            
            /*
             *     INITIALIZE LOCAL VARIABLES.
             */
            state->brackt = ae_false;
            state->stage1 = ae_true;
            *nfev = 0;
            state->finit = *f;
            state->dgtest = linmin_ftol*state->dginit;
            state->width = stpmax-linmin_stpmin;
            state->width1 = state->width/p5;
            ae_v_move(&wa->ptr.p_double[0], 1, &x->ptr.p_double[0], 1, ae_v_len(0,n-1));
            
            /*
             *     THE VARIABLES STX, FX, DGX CONTAIN THE VALUES OF THE STEP,
             *     FUNCTION, AND DIRECTIONAL DERIVATIVE AT THE BEST STEP.
             *     THE VARIABLES STY, FY, DGY CONTAIN THE VALUE OF THE STEP,
             *     FUNCTION, AND DERIVATIVE AT THE OTHER ENDPOINT OF
             *     THE INTERVAL OF UNCERTAINTY.
             *     THE VARIABLES STP, F, DG CONTAIN THE VALUES OF THE STEP,
             *     FUNCTION, AND DERIVATIVE AT THE CURRENT STEP.
             */
            state->stx = 0;
            state->fx = state->finit;
            state->dgx = state->dginit;
            state->sty = 0;
            state->fy = state->finit;
            state->dgy = state->dginit;
            
            /*
             * NEXT
             */
            *stage = 3;
            continue;
        }
        if( *stage==3 )
        {
            
            /*
             *     START OF ITERATION.
             *
             *     SET THE MINIMUM AND MAXIMUM STEPS TO CORRESPOND
             *     TO THE PRESENT INTERVAL OF UNCERTAINTY.
             */
            if( state->brackt )
            {
                if( ae_fp_less(state->stx,state->sty) )
                {
                    state->stmin = state->stx;
                    state->stmax = state->sty;
                }
                else
                {
                    state->stmin = state->sty;
                    state->stmax = state->stx;
                }
            }
            else
            {
                state->stmin = state->stx;
                state->stmax = *stp+state->xtrapf*(*stp-state->stx);
            }
            
            /*
             *        FORCE THE STEP TO BE WITHIN THE BOUNDS STPMAX AND STPMIN.
             */
            if( ae_fp_greater(*stp,stpmax) )
            {
                *stp = stpmax;
            }
            if( ae_fp_less(*stp,linmin_stpmin) )
            {
                *stp = linmin_stpmin;
            }
            
            /*
             *        IF AN UNUSUAL TERMINATION IS TO OCCUR THEN LET
             *        STP BE THE LOWEST POINT OBTAINED SO FAR.
             */
            if( (((state->brackt&&(ae_fp_less_eq(*stp,state->stmin)||ae_fp_greater_eq(*stp,state->stmax)))||*nfev>=linmin_maxfev-1)||state->infoc==0)||(state->brackt&&ae_fp_less_eq(state->stmax-state->stmin,linmin_xtol*state->stmax)) )
            {
                *stp = state->stx;
            }
            
            /*
             *        EVALUATE THE FUNCTION AND GRADIENT AT STP
             *        AND COMPUTE THE DIRECTIONAL DERIVATIVE.
             */
            ae_v_move(&x->ptr.p_double[0], 1, &wa->ptr.p_double[0], 1, ae_v_len(0,n-1));
            ae_v_addd(&x->ptr.p_double[0], 1, &s->ptr.p_double[0], 1, ae_v_len(0,n-1), *stp);
            
            /*
             * NEXT
             */
            *stage = 4;
            return;
        }
        if( *stage==4 )
        {
            *info = 0;
            *nfev = *nfev+1;
            v = ae_v_dotproduct(&g->ptr.p_double[0], 1, &s->ptr.p_double[0], 1, ae_v_len(0,n-1));
            state->dg = v;
            state->ftest1 = state->finit+*stp*state->dgtest;
            
            /*
             *        TEST FOR CONVERGENCE.
             */
            if( (state->brackt&&(ae_fp_less_eq(*stp,state->stmin)||ae_fp_greater_eq(*stp,state->stmax)))||state->infoc==0 )
            {
                *info = 6;
            }
            if( (ae_fp_eq(*stp,stpmax)&&ae_fp_less_eq(*f,state->ftest1))&&ae_fp_less_eq(state->dg,state->dgtest) )
            {
                *info = 5;
            }
            if( ae_fp_eq(*stp,linmin_stpmin)&&(ae_fp_greater(*f,state->ftest1)||ae_fp_greater_eq(state->dg,state->dgtest)) )
            {
                *info = 4;
            }
            if( *nfev>=linmin_maxfev )
            {
                *info = 3;
            }
            if( state->brackt&&ae_fp_less_eq(state->stmax-state->stmin,linmin_xtol*state->stmax) )
            {
                *info = 2;
            }
            if( ae_fp_less_eq(*f,state->ftest1)&&ae_fp_less_eq(ae_fabs(state->dg, _state),-gtol*state->dginit) )
            {
                *info = 1;
            }
            
            /*
             *        CHECK FOR TERMINATION.
             */
            if( *info!=0 )
            {
                *stage = 0;
                return;
            }
            
            /*
             *        IN THE FIRST STAGE WE SEEK A STEP FOR WHICH THE MODIFIED
             *        FUNCTION HAS A NONPOSITIVE VALUE AND NONNEGATIVE DERIVATIVE.
             */
            if( (state->stage1&&ae_fp_less_eq(*f,state->ftest1))&&ae_fp_greater_eq(state->dg,ae_minreal(linmin_ftol, gtol, _state)*state->dginit) )
            {
                state->stage1 = ae_false;
            }
            
            /*
             *        A MODIFIED FUNCTION IS USED TO PREDICT THE STEP ONLY IF
             *        WE HAVE NOT OBTAINED A STEP FOR WHICH THE MODIFIED
             *        FUNCTION HAS A NONPOSITIVE FUNCTION VALUE AND NONNEGATIVE
             *        DERIVATIVE, AND IF A LOWER FUNCTION VALUE HAS BEEN
             *        OBTAINED BUT THE DECREASE IS NOT SUFFICIENT.
             */
            if( (state->stage1&&ae_fp_less_eq(*f,state->fx))&&ae_fp_greater(*f,state->ftest1) )
            {
                
                /*
                 *           DEFINE THE MODIFIED FUNCTION AND DERIVATIVE VALUES.
                 */
                state->fm = *f-*stp*state->dgtest;
                state->fxm = state->fx-state->stx*state->dgtest;
                state->fym = state->fy-state->sty*state->dgtest;
                state->dgm = state->dg-state->dgtest;
                state->dgxm = state->dgx-state->dgtest;
                state->dgym = state->dgy-state->dgtest;
                
                /*
                 *           CALL CSTEP TO UPDATE THE INTERVAL OF UNCERTAINTY
                 *           AND TO COMPUTE THE NEW STEP.
                 */
                linmin_mcstep(&state->stx, &state->fxm, &state->dgxm, &state->sty, &state->fym, &state->dgym, stp, state->fm, state->dgm, &state->brackt, state->stmin, state->stmax, &state->infoc, _state);
                
                /*
                 *           RESET THE FUNCTION AND GRADIENT VALUES FOR F.
                 */
                state->fx = state->fxm+state->stx*state->dgtest;
                state->fy = state->fym+state->sty*state->dgtest;
                state->dgx = state->dgxm+state->dgtest;
                state->dgy = state->dgym+state->dgtest;
            }
            else
            {
                
                /*
                 *           CALL MCSTEP TO UPDATE THE INTERVAL OF UNCERTAINTY
                 *           AND TO COMPUTE THE NEW STEP.
                 */
                linmin_mcstep(&state->stx, &state->fx, &state->dgx, &state->sty, &state->fy, &state->dgy, stp, *f, state->dg, &state->brackt, state->stmin, state->stmax, &state->infoc, _state);
            }
            
            /*
             *        FORCE A SUFFICIENT DECREASE IN THE SIZE OF THE
             *        INTERVAL OF UNCERTAINTY.
             */
            if( state->brackt )
            {
                if( ae_fp_greater_eq(ae_fabs(state->sty-state->stx, _state),p66*state->width1) )
                {
                    *stp = state->stx+p5*(state->sty-state->stx);
                }
                state->width1 = state->width;
                state->width = ae_fabs(state->sty-state->stx, _state);
            }
            
            /*
             *  NEXT.
             */
            *stage = 3;
            continue;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movaps %xmm1, 0x50(%rsp)
movq %r9, %rbx
movq %r8, 0x28(%rsp)
movq %rcx, 0x48(%rsp)
movq %rdx, %r15
movq %rsi, 0x30(%rsp)
movq %rdi, 0x38(%rsp)
movq 0x128(%rsp), %r13
movabsq $0x4010000000000000, %rax # imm = 0x4010000000000000
movq %rax, 0xb8(%r13)
xorps %xmm1, %xmm1
movsd %xmm0, (%rsp)
callq 0x25b75
testb %al, %al
je 0x20030
movsd 0x15a7d(%rip), %xmm0    # 0x35aa8
movsd %xmm0, (%rsp)
movsd (%rbx), %xmm0
movsd 0x15a74(%rip), %xmm1    # 0x35ab0
callq 0x25bb9
testb %al, %al
je 0x20061
movabsq $0x358dee7a4ad4b81f, %rax # imm = 0x358DEE7A4AD4B81F
movq %rax, (%rbx)
movsd (%rsp), %xmm1
movsd 0x15a51(%rip), %xmm0    # 0x35ab0
jmp 0x2006a
movsd (%rbx), %xmm0
movsd (%rsp), %xmm1
movq 0x130(%rsp), %rbp
callq 0x25bf9
movsd (%rsp), %xmm0
testb %al, %al
je 0x20084
movsd %xmm0, (%rbx)
movq (%rbp), %rax
movq 0x38(%rsp), %rcx
decq %rcx
movq %rcx, 0x20(%rsp)
leaq 0x8(%r13), %rcx
movq %rcx, 0x8(%rsp)
movaps 0x1310b(%rip), %xmm1    # 0x331b0
xorps 0x50(%rsp), %xmm1
movaps %xmm1, 0xc0(%rsp)
leaq 0x68(%r13), %rcx
movq %rcx, 0x40(%rsp)
leaq 0x88(%r13), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x30(%r13), %rcx
movq %rcx, 0xb8(%rsp)
leaq 0x90(%r13), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x78(%r13), %rcx
movq %rcx, 0xb0(%rsp)
leaq 0x40(%r13), %rcx
movq %rcx, 0xa8(%rsp)
leaq 0x70(%r13), %rcx
movq %rcx, 0x80(%rsp)
movsd 0x159ad(%rip), %xmm1    # 0x35ab8
addsd %xmm0, %xmm1
movsd %xmm1, 0x98(%rsp)
addsd %xmm1, %xmm1
movsd %xmm1, 0x90(%rsp)
leaq 0x15aac(%rip), %rcx     # 0x35bd8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0x80(%r13), %rdx
movq %rdx, 0x78(%rsp)
leaq 0x38(%r13), %rdx
movq %rdx, 0x70(%rsp)
leaq 0x48(%r13), %rdx
movq %rdx, 0x68(%rsp)
movl $0x2, %r14d
movq %rbx, 0xa0(%rsp)
jmpq *%rax
movq 0x8(%rsp), %rax
movq $0x1, (%rax)
movq 0x110(%rsp), %r14
movq $0x0, (%r14)
movsd 0x1592c(%rip), %xmm1    # 0x35ab0
movsd (%rsp), %xmm0
callq 0x25bb9
testb %al, %al
je 0x201a7
xorps %xmm1, %xmm1
movsd (%rsp), %xmm0
callq 0x25bf9
testb %al, %al
jne 0x20378
cmpq $0x0, 0x38(%rsp)
jle 0x20388
movsd (%rbx), %xmm0
xorps %xmm1, %xmm1
callq 0x25bd9
testb %al, %al
jne 0x20388
movsd 0x144c1(%rip), %xmm0    # 0x34690
xorps %xmm1, %xmm1
callq 0x25bb9
testb %al, %al
jne 0x20388
xorps %xmm1, %xmm1
movaps 0x50(%rsp), %xmm0
callq 0x25bb9
testb %al, %al
jne 0x20388
movsd 0x158c4(%rip), %xmm0    # 0x35ac0
xorps %xmm1, %xmm1
callq 0x25bb9
testb %al, %al
jne 0x20388
movsd 0x1589c(%rip), %xmm0    # 0x35ab0
xorps %xmm1, %xmm1
callq 0x25bb9
testb %al, %al
jne 0x20388
movsd 0x15884(%rip), %xmm1    # 0x35ab0
movsd (%rsp), %xmm0
callq 0x25bb9
testb %al, %al
jne 0x20388
movq 0x48(%rsp), %rax
movq 0x28(%rax), %rbp
movq 0x28(%rsp), %rax
movq 0x28(%rax), %r14
xorl %edi, %edi
movq 0x20(%rsp), %r12
movq %r12, %rsi
callq 0x2897c
movl $0x1, %esi
movl $0x1, %ecx
movq %rbp, %rdi
movq %r14, %rdx
movq %rax, %r8
callq 0x28519
movsd %xmm0, 0x20(%r13)
xorps %xmm1, %xmm1
callq 0x25c15
testb %al, %al
jne 0x20367
movw $0x100, (%r13)          # imm = 0x100
movq 0x118(%rsp), %rax
movq $0x0, (%rax)
movsd (%r15), %xmm0
movsd %xmm0, 0x50(%r13)
movsd 0x20(%r13), %xmm0
mulsd 0x143d4(%rip), %xmm0    # 0x34690
movsd %xmm0, 0x28(%r13)
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0xa8(%r13)
movsd 0x90(%rsp), %xmm0
movsd %xmm0, 0xb0(%r13)
movq 0x120(%rsp), %rax
movq 0x28(%rax), %r14
movq 0x30(%rsp), %rax
movq 0x28(%rax), %rbp
xorl %edi, %edi
movq %r12, %rsi
callq 0x2897c
movl $0x1, %esi
movl $0x1, %ecx
movq %r14, %rdi
movq %rbp, %rdx
movq %rax, %r8
callq 0x2860a
movsd 0x20(%r13), %xmm0
movsd 0x50(%r13), %xmm1
movsd %xmm1, 0x68(%r13)
movsd %xmm0, 0x30(%r13)
xorps %xmm2, %xmm2
movups %xmm2, 0x88(%r13)
movsd %xmm1, 0x78(%r13)
movsd %xmm0, 0x40(%r13)
movl $0x3, %r14d
movq 0x130(%rsp), %rbp
movq 0xa0(%rsp), %rbx
jmp 0x20a1c
movq 0x130(%rsp), %rax
movq $0x0, (%rax)
jmp 0x20390
movq $0x5, (%r14)
movq $0x0, (%rbx)
jmp 0x20390
movq $0x0, (%rbp)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd 0x88(%r13), %xmm0
cmpb $0x1, (%r13)
jne 0x203d8
movq 0x10(%rsp), %rax
movsd (%rax), %xmm1
callq 0x25bb9
testb %al, %al
je 0x203fc
movsd 0x88(%r13), %xmm0
movsd 0x90(%r13), %xmm3
jmp 0x2040e
movsd %xmm0, 0x98(%r13)
movsd (%rbx), %xmm2
movapd %xmm2, %xmm3
subsd %xmm0, %xmm3
mulsd 0xb8(%r13), %xmm3
addsd %xmm2, %xmm3
jmp 0x20417
movsd 0x88(%r13), %xmm3
movsd 0x90(%r13), %xmm0
movsd %xmm0, 0x98(%r13)
movsd (%rsp), %xmm1
movsd %xmm1, (%rsp)
movsd %xmm3, 0xa0(%r13)
movsd (%rbx), %xmm0
callq 0x25bf9
testb %al, %al
je 0x20442
movsd (%rsp), %xmm0
movsd %xmm0, (%rbx)
jmp 0x20446
movsd (%rbx), %xmm0
movsd 0x15662(%rip), %xmm1    # 0x35ab0
callq 0x25bb9
testb %al, %al
je 0x20464
movabsq $0x358dee7a4ad4b81f, %rax # imm = 0x358DEE7A4AD4B81F
movq %rax, (%rbx)
cmpb $0x1, (%r13)
jne 0x20497
movsd (%rbx), %xmm0
movsd 0x98(%r13), %xmm1
callq 0x25bd9
testb %al, %al
jne 0x204de
movsd (%rbx), %xmm0
movsd 0xa0(%r13), %xmm1
callq 0x25c15
testb %al, %al
jne 0x204de
movq 0x118(%rsp), %rax
cmpq $0x12, (%rax)
jg 0x204de
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x204de
cmpb $0x1, (%r13)
jne 0x204eb
movsd 0xa0(%r13), %xmm1
movapd %xmm1, %xmm0
subsd 0x98(%r13), %xmm0
mulsd 0x155eb(%rip), %xmm1    # 0x35ac0
callq 0x25bd9
testb %al, %al
je 0x204eb
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, (%rbx)
movq 0x30(%rsp), %r12
movq 0x28(%r12), %r14
movq 0x120(%rsp), %rax
movq 0x28(%rax), %r15
xorl %edi, %edi
movq 0x20(%rsp), %r13
movq %r13, %rsi
callq 0x2897c
movl $0x1, %esi
movl $0x1, %ecx
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %r8
callq 0x2860a
movq 0x28(%r12), %r14
movq 0x28(%rsp), %rax
movq 0x28(%rax), %r15
xorl %edi, %edi
movq %r13, %rsi
callq 0x2897c
movsd (%rbx), %xmm0
movl $0x1, %esi
movl $0x1, %ecx
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %r8
callq 0x28815
movq $0x4, (%rbp)
jmp 0x20390
movq 0x110(%rsp), %r12
movq $0x0, (%r12)
movq 0x118(%rsp), %rax
incq (%rax)
movq 0x48(%rsp), %rax
movq 0x28(%rax), %r14
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rbp
xorl %edi, %edi
movq 0x20(%rsp), %rsi
callq 0x2897c
movl $0x1, %esi
movl $0x1, %ecx
movq %r14, %rdi
movq %rbp, %rdx
movq %rax, %r8
callq 0x28519
movsd %xmm0, 0x10(%r13)
movsd (%rbx), %xmm0
mulsd 0x28(%r13), %xmm0
addsd 0x50(%r13), %xmm0
movsd %xmm0, 0x58(%r13)
cmpb $0x1, (%r13)
jne 0x20609
movsd (%rbx), %xmm0
movsd 0x98(%r13), %xmm1
callq 0x25bd9
testb %al, %al
jne 0x20614
movsd (%rbx), %xmm0
movsd 0xa0(%r13), %xmm1
callq 0x25c15
testb %al, %al
jne 0x20614
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x2061c
movq $0x6, (%r12)
movsd (%rbx), %xmm0
movsd (%rsp), %xmm1
callq 0x25b75
testb %al, %al
je 0x2065f
movsd (%r15), %xmm0
movsd 0x58(%r13), %xmm1
callq 0x25bd9
testb %al, %al
je 0x2065f
movsd 0x10(%r13), %xmm0
movsd 0x28(%r13), %xmm1
callq 0x25bd9
testb %al, %al
je 0x2065f
movq $0x5, (%r12)
movsd (%rbx), %xmm0
movsd 0x15445(%rip), %xmm1    # 0x35ab0
callq 0x25b75
testb %al, %al
movq 0x130(%rsp), %rbp
je 0x206ad
movsd (%r15), %xmm0
movsd 0x58(%r13), %xmm1
callq 0x25bf9
testb %al, %al
jne 0x206a5
movsd 0x10(%r13), %xmm0
movsd 0x28(%r13), %xmm1
callq 0x25c15
testb %al, %al
je 0x206ad
movq $0x4, (%r12)
movq 0x118(%rsp), %rax
cmpq $0x14, (%rax)
jl 0x206c3
movq $0x3, (%r12)
cmpb $0x1, (%r13)
jne 0x206f9
movsd 0xa0(%r13), %xmm1
movapd %xmm1, %xmm0
subsd 0x98(%r13), %xmm0
mulsd 0x153d8(%rip), %xmm1    # 0x35ac0
callq 0x25bd9
testb %al, %al
je 0x206f9
movq $0x2, (%r12)
movsd (%r15), %xmm0
movsd 0x58(%r13), %xmm1
callq 0x25bd9
testb %al, %al
je 0x2073c
movsd 0x10(%r13), %xmm0
movq 0x138(%rsp), %rdi
callq 0x25e30
movsd 0x20(%r13), %xmm1
mulsd 0xc0(%rsp), %xmm1
callq 0x25bd9
testb %al, %al
jne 0x20a36
cmpq $0x0, (%r12)
jne 0x20388
cmpb $0x1, 0x1(%r13)
jne 0x207ac
movsd (%r15), %xmm0
movsd 0x58(%r13), %xmm1
callq 0x25bd9
testb %al, %al
je 0x207ac
movsd 0x10(%r13), %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x13f17(%rip), %xmm0    # 0x34690
movaps 0x50(%rsp), %xmm1
movq 0x138(%rsp), %rdi
callq 0x25ee1
movapd %xmm0, %xmm1
mulsd 0x20(%r13), %xmm1
movsd 0x88(%rsp), %xmm0
callq 0x25c15
testb %al, %al
je 0x207ac
movb $0x0, 0x1(%r13)
cmpb $0x1, 0x1(%r13)
jne 0x20917
movsd (%r15), %xmm0
movq 0x40(%rsp), %rax
movsd (%rax), %xmm1
callq 0x25bd9
testb %al, %al
je 0x20917
movsd (%r15), %xmm0
movsd 0x58(%r13), %xmm1
callq 0x25bf9
testb %al, %al
je 0x20917
movsd (%r15), %xmm0
movsd 0x10(%r13), %xmm1
movsd 0x28(%r13), %xmm2
movsd (%rbx), %xmm3
mulsd %xmm2, %xmm3
subsd %xmm3, %xmm0
movsd %xmm0, 0x60(%r13)
movsd 0x68(%r13), %xmm3
movsd 0x88(%r13), %xmm4
mulsd %xmm2, %xmm4
subsd %xmm4, %xmm3
movsd %xmm3, 0x70(%r13)
movsd 0x78(%r13), %xmm3
movsd 0x90(%r13), %xmm4
mulsd %xmm2, %xmm4
subsd %xmm4, %xmm3
movsd %xmm3, 0x80(%r13)
subsd %xmm2, %xmm1
movsd %xmm1, 0x18(%r13)
movsd 0x30(%r13), %xmm3
subsd %xmm2, %xmm3
movsd %xmm3, 0x38(%r13)
movsd 0x40(%r13), %xmm3
subsd %xmm2, %xmm3
movsd %xmm3, 0x48(%r13)
movsd 0x98(%r13), %xmm2
movsd 0xa0(%r13), %xmm3
movq 0x18(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0x78(%rsp), %r8
movq 0x68(%rsp), %r9
pushq 0x138(%rsp)
pushq 0x10(%rsp)
pushq %r13
pushq %rbx
callq 0x20a43
addq $0x20, %rsp
movsd 0x28(%r13), %xmm0
movsd 0x88(%r13), %xmm1
mulsd %xmm0, %xmm1
addsd 0x70(%r13), %xmm1
movsd %xmm1, 0x68(%r13)
movsd 0x90(%r13), %xmm1
mulsd %xmm0, %xmm1
addsd 0x80(%r13), %xmm1
movsd %xmm1, 0x78(%r13)
movsd 0x38(%r13), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x30(%r13)
addsd 0x48(%r13), %xmm0
movsd %xmm0, 0x40(%r13)
jmp 0x20972
movsd (%r15), %xmm0
movsd 0x10(%r13), %xmm1
movsd 0x98(%r13), %xmm2
movsd 0xa0(%r13), %xmm3
movq 0x18(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0xb8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0xb0(%rsp), %r8
movq 0xa8(%rsp), %r9
pushq 0x138(%rsp)
pushq 0x10(%rsp)
pushq %r13
pushq %rbx
callq 0x20a43
addq $0x20, %rsp
movl $0x3, %r14d
cmpb $0x1, (%r13)
jne 0x20a1c
movsd 0x90(%r13), %xmm0
subsd 0x88(%r13), %xmm0
movq 0x138(%rsp), %rdi
callq 0x25e30
movsd 0xb0(%r13), %xmm1
mulsd 0x15115(%rip), %xmm1    # 0x35ac8
callq 0x25c15
testb %al, %al
je 0x209e2
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movq 0x10(%rsp), %rax
movsd (%rax), %xmm1
subsd %xmm0, %xmm1
mulsd 0x12aae(%rip), %xmm1    # 0x33488
addsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
movsd 0x90(%r13), %xmm0
movsd 0xa8(%r13), %xmm1
movsd %xmm1, 0xb0(%r13)
subsd 0x88(%r13), %xmm0
movq 0x138(%rsp), %rdi
callq 0x25e30
movsd %xmm0, 0xa8(%r13)
leaq 0x151b5(%rip), %rcx     # 0x35bd8
movq %r14, (%rbp)
movslq (%rcx,%r14,4), %rax
addq %rcx, %rax
movl $0x2, %r14d
jmpq *%rax
movq $0x1, (%r12)
jmp 0x20388