// File: /workspace/github_cpp_makefile_star2_O2/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, 0x8(%rsp)
callq 0x241f5
testb %al, %al
je 0x1e9d5
movsd 0x140c9(%rip), %xmm0    # 0x32a98
movsd %xmm0, 0x8(%rsp)
movsd (%rbx), %xmm0
movsd 0x140bf(%rip), %xmm1    # 0x32aa0
callq 0x24239
movabsq $0x358dee7a4ad4b81f, %rcx # imm = 0x358DEE7A4AD4B81F
testb %al, %al
je 0x1ea07
movq %rcx, (%rbx)
movsd 0x8(%rsp), %xmm1
movsd 0x1409b(%rip), %xmm0    # 0x32aa0
jmp 0x1ea11
movsd (%rbx), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x130(%rsp), %rbp
callq 0x24279
movsd 0x8(%rsp), %xmm0
testb %al, %al
je 0x1ea2c
movsd %xmm0, (%rbx)
movq 0x110(%rsp), %r14
movq (%rbp), %rax
movq 0x38(%rsp), %rcx
decq %rcx
movq %rcx, 0x20(%rsp)
leaq 0x8(%r13), %r12
movaps 0x11760(%rip), %xmm1    # 0x301b0
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 0x13ff2(%rip), %xmm1    # 0x32aa8
addsd %xmm0, %xmm1
movsd %xmm1, 0x98(%rsp)
addsd %xmm1, %xmm1
movsd %xmm1, 0x90(%rsp)
leaq 0x140f1(%rip), %rdx     # 0x32bc8
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0x80(%r13), %rax
movq %rax, 0x78(%rsp)
leaq 0x38(%r13), %rax
movq %rax, 0x70(%rsp)
leaq 0x48(%r13), %rax
movq %rax, 0x68(%rsp)
pushq $0x2
popq %rax
movq %rbx, 0xa0(%rsp)
jmpq *%rcx
movq $0x1, (%r12)
andq $0x0, (%r14)
movsd 0x13f83(%rip), %xmm1    # 0x32aa0
movsd 0x8(%rsp), %xmm0
callq 0x24239
testb %al, %al
je 0x1eb42
xorps %xmm1, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x24279
testb %al, %al
jne 0x1ed11
cmpq $0x0, 0x38(%rsp)
jle 0x1ed1e
movsd (%rbx), %xmm0
xorps %xmm1, %xmm1
callq 0x24259
testb %al, %al
jne 0x1ed1e
movsd 0x12b26(%rip), %xmm0    # 0x31690
xorps %xmm1, %xmm1
callq 0x24239
testb %al, %al
jne 0x1ed1e
xorps %xmm1, %xmm1
movaps 0x50(%rsp), %xmm0
callq 0x24239
testb %al, %al
jne 0x1ed1e
movsd 0x13f19(%rip), %xmm0    # 0x32ab0
xorps %xmm1, %xmm1
callq 0x24239
testb %al, %al
jne 0x1ed1e
movsd 0x13ef1(%rip), %xmm0    # 0x32aa0
xorps %xmm1, %xmm1
callq 0x24239
testb %al, %al
jne 0x1ed1e
movsd 0x13ed9(%rip), %xmm1    # 0x32aa0
movsd 0x8(%rsp), %xmm0
callq 0x24239
testb %al, %al
jne 0x1ed1e
movq %r12, %rbx
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 0x26b4d
pushq $0x1
popq %rcx
movq %rbp, %rdi
movq %rcx, %rsi
movq %r14, %rdx
movq %rax, %r8
callq 0x2668d
movsd %xmm0, 0x20(%r13)
xorps %xmm1, %xmm1
callq 0x24295
testb %al, %al
jne 0x1ed03
movw $0x100, (%r13)          # imm = 0x100
movq 0x118(%rsp), %rax
andq $0x0, (%rax)
movsd (%r15), %xmm0
movsd %xmm0, 0x50(%r13)
movsd 0x20(%r13), %xmm0
mulsd 0x12a3c(%rip), %xmm0    # 0x31690
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 0x26b4d
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %rcx, %rsi
movq %rbp, %rdx
movq %rax, %r8
callq 0x2675e
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)
pushq $0x3
popq %rax
movq 0x130(%rsp), %rbp
movq %rbx, %r12
movq 0xa0(%rsp), %rbx
movq 0x110(%rsp), %r14
jmp 0x1f391
movq 0x130(%rsp), %rax
andq $0x0, (%rax)
jmp 0x1ed23
movq $0x5, (%r14)
andq $0x0, (%rbx)
jmp 0x1ed23
andq $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 0x1ed6b
movq 0x10(%rsp), %rax
movsd (%rax), %xmm1
callq 0x24239
testb %al, %al
je 0x1ed8f
movsd 0x88(%r13), %xmm0
movsd 0x90(%r13), %xmm3
jmp 0x1eda1
movsd %xmm0, 0x98(%r13)
movsd (%rbx), %xmm2
movapd %xmm2, %xmm3
subsd %xmm0, %xmm3
mulsd 0xb8(%r13), %xmm3
addsd %xmm2, %xmm3
jmp 0x1edaa
movsd 0x88(%r13), %xmm3
movsd 0x90(%r13), %xmm0
movsd %xmm0, 0x98(%r13)
movsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm3, 0xa0(%r13)
movsd (%rbx), %xmm0
callq 0x24279
testb %al, %al
je 0x1edd8
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rbx)
jmp 0x1eddc
movsd (%rbx), %xmm0
movsd 0x13cbc(%rip), %xmm1    # 0x32aa0
callq 0x24239
testb %al, %al
je 0x1edfa
movabsq $0x358dee7a4ad4b81f, %rax # imm = 0x358DEE7A4AD4B81F
movq %rax, (%rbx)
cmpb $0x1, (%r13)
jne 0x1ee2d
movsd (%rbx), %xmm0
movsd 0x98(%r13), %xmm1
callq 0x24259
testb %al, %al
jne 0x1ee70
movsd (%rbx), %xmm0
movsd 0xa0(%r13), %xmm1
callq 0x24295
testb %al, %al
jne 0x1ee70
movq 0x118(%rsp), %rax
cmpq $0x12, (%rax)
jg 0x1ee70
cmpq $0x0, (%r12)
je 0x1ee70
cmpb $0x1, (%r13)
jne 0x1ee7d
movsd 0xa0(%r13), %xmm1
movapd %xmm1, %xmm0
subsd 0x98(%r13), %xmm0
mulsd 0x13c49(%rip), %xmm1    # 0x32ab0
callq 0x24259
testb %al, %al
je 0x1ee7d
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 0x26b4d
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %rcx, %rsi
movq %r15, %rdx
movq %rax, %r8
callq 0x2675e
movq 0x28(%r12), %r14
movq 0x28(%rsp), %rax
movq 0x28(%rax), %r15
xorl %edi, %edi
movq %r13, %rsi
callq 0x26b4d
movsd (%rbx), %xmm0
movq %r14, %rdi
pushq $0x1
popq %rcx
movq %rcx, %rsi
movq %r15, %rdx
movq %rax, %r8
callq 0x269b8
movq $0x4, (%rbp)
jmp 0x1ed23
andq $0x0, (%r14)
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 0x26b4d
pushq $0x1
popq %rcx
movq %r14, %rdi
movq 0x110(%rsp), %r14
movq %rcx, %rsi
movq %rbp, %rdx
movq %rax, %r8
callq 0x2668d
movsd %xmm0, 0x10(%r13)
movsd (%rbx), %xmm0
mulsd 0x28(%r13), %xmm0
addsd 0x50(%r13), %xmm0
movsd %xmm0, 0x58(%r13)
cmpb $0x1, (%r13)
jne 0x1ef8b
movsd (%rbx), %xmm0
movsd 0x98(%r13), %xmm1
callq 0x24259
testb %al, %al
jne 0x1ef92
movsd (%rbx), %xmm0
movsd 0xa0(%r13), %xmm1
callq 0x24295
testb %al, %al
jne 0x1ef92
cmpq $0x0, (%r12)
jne 0x1ef99
movq $0x6, (%r14)
movsd (%rbx), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x241f5
testb %al, %al
je 0x1efdc
movsd (%r15), %xmm0
movsd 0x58(%r13), %xmm1
callq 0x24259
testb %al, %al
je 0x1efdc
movsd 0x10(%r13), %xmm0
movsd 0x28(%r13), %xmm1
callq 0x24259
testb %al, %al
je 0x1efdc
movq $0x5, (%r14)
movsd (%rbx), %xmm0
movsd 0x13ab8(%rip), %xmm1    # 0x32aa0
callq 0x241f5
testb %al, %al
movq 0x130(%rsp), %rbp
je 0x1f029
movsd (%r15), %xmm0
movsd 0x58(%r13), %xmm1
callq 0x24279
testb %al, %al
jne 0x1f022
movsd 0x10(%r13), %xmm0
movsd 0x28(%r13), %xmm1
callq 0x24295
testb %al, %al
je 0x1f029
movq $0x4, (%r14)
movq 0x118(%rsp), %rax
cmpq $0x14, (%rax)
jl 0x1f03e
movq $0x3, (%r14)
cmpb $0x1, (%r13)
jne 0x1f073
movsd 0xa0(%r13), %xmm1
movapd %xmm1, %xmm0
subsd 0x98(%r13), %xmm0
mulsd 0x13a4d(%rip), %xmm1    # 0x32ab0
callq 0x24259
testb %al, %al
je 0x1f073
movq $0x2, (%r14)
movsd (%r15), %xmm0
movsd 0x58(%r13), %xmm1
callq 0x24259
testb %al, %al
je 0x1f0b6
movsd 0x10(%r13), %xmm0
movq 0x138(%rsp), %rdi
callq 0x2440c
movsd 0x20(%r13), %xmm1
mulsd 0xc0(%rsp), %xmm1
callq 0x24259
testb %al, %al
jne 0x1f3a8
cmpq $0x0, (%r14)
jne 0x1ed1e
cmpb $0x1, 0x1(%r13)
jne 0x1f125
movsd (%r15), %xmm0
movsd 0x58(%r13), %xmm1
callq 0x24259
testb %al, %al
je 0x1f125
movsd 0x10(%r13), %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x1259e(%rip), %xmm0    # 0x31690
movaps 0x50(%rsp), %xmm1
movq 0x138(%rsp), %rdi
callq 0x244bb
movapd %xmm0, %xmm1
mulsd 0x20(%r13), %xmm1
movsd 0x88(%rsp), %xmm0
callq 0x24295
testb %al, %al
je 0x1f125
movb $0x0, 0x1(%r13)
cmpb $0x1, 0x1(%r13)
jne 0x1f28e
movsd (%r15), %xmm0
movq 0x40(%rsp), %rax
movsd (%rax), %xmm1
callq 0x24259
testb %al, %al
je 0x1f28e
movsd (%r15), %xmm0
movsd 0x58(%r13), %xmm1
callq 0x24279
testb %al, %al
je 0x1f28e
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 %r12
pushq %r13
pushq %rbx
callq 0x1f3b4
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 0x1f2e7
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 %r12
pushq %r13
pushq %rbx
callq 0x1f3b4
addq $0x20, %rsp
cmpb $0x1, (%r13)
pushq $0x3
popq %rax
jne 0x1f391
movsd 0x90(%r13), %xmm0
subsd 0x88(%r13), %xmm0
movq 0x138(%rsp), %rdi
callq 0x2440c
movsd 0xb0(%r13), %xmm1
mulsd 0x13793(%rip), %xmm1    # 0x32ab8
callq 0x24295
testb %al, %al
je 0x1f354
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movq 0x10(%rsp), %rax
movsd (%rax), %xmm1
subsd %xmm0, %xmm1
mulsd 0x1113c(%rip), %xmm1    # 0x30488
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 0x2440c
movsd %xmm0, 0xa8(%r13)
pushq $0x3
popq %rax
movq %rax, (%rbp)
leaq 0x1382c(%rip), %rdx     # 0x32bc8
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
pushq $0x2
popq %rax
jmpq *%rcx
movq $0x1, (%r14)
jmp 0x1ed1e