// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::doLinearStep(FitBit*)
NUMBER HMMProblem::doLinearStep(FitBit *fb) {
	NPAR i,j,m;
    NPAR nS = fb->nS, nO = this->p->nO;
    fb->doLog10ScaleGentleByRow(FBS_GRAD);
	
    NCAT xndat = fb->xndat;
    struct data **x_data = fb->x_data;
    fb->init(FBS_PARcopy);
    fb->init(FBS_GRADcopy);
    
	NUMBER e = this->p->ArmijoSeed; // step seed
	bool compliesArmijo = false;
	bool compliesWolfe2 = false; // second wolfe condition is turned on, if satisfied - honored, if not, just the 1st is used
    NUMBER e_Armijo = -1; // e (step size) at which Armijo (Wolfe 1) criterion is satisfied, 'cos both criterions are sometimes not met.
    NUMBER f_xkplus1_Armijo = 0; // f_xkplus1_Armijo at which Armijo (Wolfe 1) criterion is satisfied, 'cos both criterions are sometimes not met.
	NUMBER f_xk = HMMProblem::getSumLogPOPara(xndat, x_data);
	NUMBER f_xkplus1 = 0;
	
    fb->copy(FBS_PAR, FBS_PARcopy); // save original parameters
    fb->copy(FBS_GRAD, FBS_GRADcopy); // save original gradient
	// compute p_k * -p_k
	NUMBER p_k_by_neg_p_k = 0;
	for(i=0; i<nS; i++)
	{
		if(fb->pi != NULL) p_k_by_neg_p_k -= fb->gradPI[i]*fb->gradPI[i];
		if(fb->A  != NULL) for(j=0; j<nS; j++) p_k_by_neg_p_k -= fb->gradA[i][j]*fb->gradA[i][j];
		if(fb->B  != NULL) for(m=0; m<nO; m++) p_k_by_neg_p_k -= fb->gradB[i][m]*fb->gradB[i][m];
	}
    
	int iter = 0; // limit iter steps to 20, via ArmijoMinStep (now 10)
    while( !(compliesArmijo && compliesWolfe2) && e > this->p->ArmijoMinStep) {
		// update
		for(i=0; i<nS; i++) {
            if(fb->pi != NULL) {
                fb->pi[i] = fb->PIcopy[i] - e * fb->gradPIcopy[i];
                if( (fb->pi[i]<0 || fb->pi[i] >1) && (fb->pi[i] > 0) && (fb->pi[i] < 1) ) {
                    fprintf(stderr, "ERROR! pi value is not within [0, 1] range!\n");
                }
            }
            
            if(fb->A  != NULL)
                for(j=0; j<nS; j++) {
                    fb->A[i][j] = fb->Acopy[i][j] - e * fb->gradAcopy[i][j];
                    if( (fb->A[i][j]<0 || fb->A[i][j] >1) && (fb->A[i][j] > 0) && (fb->A[i][j] < 1) ) {
                        fprintf(stderr, "ERROR! A value is not within [0, 1] range!\n");
                    }
                }
            
            if(fb->B  != NULL)
                for(m=0; m<nO; m++) {
                    fb->B[i][m] = fb->Bcopy[i][m] - e * fb->gradBcopy[i][m];
                    if( (fb->B[i][m]<0 || fb->B[i][m] >1) && (fb->B[i][m] > 0) && (fb->B[i][m] < 1) ) {
                        fprintf(stderr, "ERROR! B value is not within [0, 1] range!\n");
                    }
                }
		}
        // project parameters to simplex if needs be
        if(fb->projecttosimplex==1) {
            // scale
            if( !this->hasNon01Constraints() || fb->observe_non01_boundaries==0 ) {
                if(fb->pi != NULL) projectsimplex(fb->pi, nS);
                for(i=0; i<nS; i++) {
                    if(fb->A  != NULL) projectsimplex(fb->A[i], nS);
                    if(fb->B  != NULL) projectsimplex(fb->B[i], nO);
                }
            } else {
                if(fb->pi != NULL) projectsimplexbounded(fb->pi, this->getLbPI(), this->getUbPI(), nS);
                for(i=0; i<nS; i++) {
                    if(fb->A  != NULL) projectsimplexbounded(fb->A[i], this->getLbA()[i], this->getUbA()[i], nS);
                    if(fb->B  != NULL) projectsimplexbounded(fb->B[i], this->getLbB()[i], this->getUbB()[i], nO);
                }
            }
        }
        
		// recompute alpha and p(O|param)
		computeAlphaAndPOParam(xndat, x_data);
		// compute f(x_{k+1})
		f_xkplus1 = HMMProblem::getSumLogPOPara(xndat, x_data);
		// compute Armijo compliance
		compliesArmijo = (f_xkplus1 <= (f_xk + (this->p->ArmijoC1 * e * p_k_by_neg_p_k)));
        
        // compute Wolfe 2
        NUMBER p_k_by_neg_p_kp1 = 0;
        // NDAT ndat = computeGradients(fb);
        fb->doLog10ScaleGentleByRow(FBS_GRAD);
        for(i=0; i<nS; i++)
        {
            if(fb->pi != NULL) p_k_by_neg_p_kp1 -= fb->gradPIcopy[i]*fb->gradPI[i];
            if(fb->A  != NULL) for(j=0; j<nS; j++) p_k_by_neg_p_kp1 -= fb->gradAcopy[i][j]*fb->gradA[i][j];
            if(fb->B  != NULL) for(m=0; m<nO; m++) p_k_by_neg_p_kp1 -= fb->gradBcopy[i][m]*fb->gradB[i][m];
        }
        compliesWolfe2 = (p_k_by_neg_p_kp1 >= this->p->ArmijoC2 * p_k_by_neg_p_k);
        
        if( compliesArmijo && e_Armijo==-1 ){
            e_Armijo = e; // save the first time Armijo is statisfied, in case we'll roll back to it when Wolfe 2 is finnaly not satisfied
            f_xkplus1_Armijo = f_xkplus1;
        }
        
		e /= (compliesArmijo && compliesWolfe2)?1:this->p->ArmijoReduceFactor;
		iter++;
	} // armijo loop
    
//    fb->copy(FBS_GRADcopy, FBS_GRAD); // return the original gradient in its place // unnecessary
    
    if(!compliesArmijo) { // we couldn't step away from current, copy the inital point back
        e = 0;
        fb->copy(FBS_PARcopy, FBS_PAR);
        f_xkplus1 = f_xk;
    } else if(compliesArmijo && !compliesWolfe2) { // we couldn't step away from current, copy the inital point back
        e = e_Armijo; // return the first Armijo-compliant e
        f_xkplus1 = f_xkplus1_Armijo; // return the first Armijo-compliant f_xkplus1
        // create new versions of FBS_PAR using e_Armijo as a step
        fb->copy(FBS_GRADcopy, FBS_GRAD); // return the old gradient
        // update
        for(i=0; i<nS; i++) {
            if(fb->pi != NULL) {
                fb->pi[i] = fb->PIcopy[i] - e * fb->gradPIcopy[i];
                if( (fb->pi[i]<0 || fb->pi[i] >1) && (fb->pi[i] > 0) && (fb->pi[i] < 1) ) {
                    fprintf(stderr, "ERROR! pi value is not within [0, 1] range!\n");
                }
            }
            if(fb->A  != NULL)
                for(j=0; j<nS; j++) {
                    fb->A[i][j] = fb->Acopy[i][j] - e * fb->gradAcopy[i][j];
                    if( (fb->A[i][j]<0 || fb->A[i][j] >1) && (fb->A[i][j] > 0) && (fb->A[i][j] < 1) ) {
                        fprintf(stderr, "ERROR! A value is not within [0, 1] range!\n");
                    }
                }
            if(fb->B  != NULL)
                for(m=0; m<nO; m++) {
                    fb->B[i][m] = fb->Bcopy[i][m] - e * fb->gradBcopy[i][m];
                    if( (fb->B[i][m]<0 || fb->B[i][m] >1) && (fb->B[i][m] > 0) && (fb->B[i][m] < 1) ) {
                        fprintf(stderr, "ERROR! B value is not within [0, 1] range!\n");
                    }
                }
        }
        // project parameters to simplex if needs be
        if(fb->projecttosimplex==1) {
            // scale
            if( !this->hasNon01Constraints() || fb->observe_non01_boundaries==0 ) {
                if(fb->pi != NULL) projectsimplex(fb->pi, nS);
                for(i=0; i<nS; i++) {
                    if(fb->A  != NULL) projectsimplex(fb->A[i], nS);
                    if(fb->B  != NULL) projectsimplex(fb->B[i], nO);
                }
            } else {
                if(fb->pi != NULL) projectsimplexbounded(fb->pi, this->getLbPI(), this->getUbPI(), nS);
                for(i=0; i<nS; i++) {
                    if(fb->A  != NULL) projectsimplexbounded(fb->A[i], this->getLbA()[i], this->getUbA()[i], nS);
                    if(fb->B  != NULL) projectsimplexbounded(fb->B[i], this->getLbB()[i], this->getUbB()[i], nO);
                }
            }
        }
        // ^^^^^ end of create new versions of FBS_PAR using e_Armijo as a step
    }
    fb->destroy(FBS_PARcopy);
    fb->destroy(FBS_GRADcopy);
    return f_xkplus1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl 0x1(%rsi), %eax
movl %eax, 0x20(%rsp)
movq 0x88(%rdi), %rax
movzbl 0x8b9(%rax), %eax
movl %eax, 0x4(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x8f0e
movl 0xe8(%rbx), %r13d
movq 0xf0(%rbx), %rbp
pushq $0x5
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x878c
pushq $0x9
popq %r12
movq %rbx, %rdi
movl %r12d, %esi
callq 0x878c
movq %r14, 0x8(%rsp)
movq 0x88(%r14), %rax
movsd 0x968(%rax), %xmm0
movapd %xmm0, 0x60(%rsp)
movl %r13d, 0x4c(%rsp)
movl %r13d, %esi
movq %rbp, 0x78(%rsp)
movq %rbp, %rdx
callq 0xe400
movsd %xmm0, 0x50(%rsp)
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x88b6
movq %rbx, %rdi
pushq $0x3
popq %rsi
movl %r12d, %edx
callq 0x88b6
movl 0x4(%rsp), %edi
movl 0x20(%rsp), %esi
xorl %eax, %eax
testb %sil, %sil
movl %esi, %r12d
cmovlel %eax, %r12d
testb %dil, %dil
movl %edi, %r15d
cmovlel %eax, %r15d
movl $0xff, %ecx
andl %ecx, %r12d
andl %ecx, %r15d
xorpd %xmm1, %xmm1
cmpq %r12, %rax
je 0x14696
cmpq $0x0, 0x10(%rbx)
je 0x14641
movq 0x58(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm0
mulsd %xmm0, %xmm0
subsd %xmm0, %xmm1
cmpq $0x0, 0x18(%rbx)
je 0x14669
xorl %ecx, %ecx
cmpq %rcx, %r12
je 0x14669
movq 0x60(%rbx), %rdx
movq (%rdx,%rax,8), %rdx
movsd (%rdx,%rcx,8), %xmm0
mulsd %xmm0, %xmm0
subsd %xmm0, %xmm1
incq %rcx
jmp 0x1464a
cmpq $0x0, 0x20(%rbx)
je 0x14691
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x14691
movq 0x68(%rbx), %rdx
movq (%rdx,%rax,8), %rdx
movsd (%rdx,%rcx,8), %xmm0
mulsd %xmm0, %xmm0
subsd %xmm0, %xmm1
incq %rcx
jmp 0x14672
incq %rax
jmp 0x14624
movsd %xmm1, 0x58(%rsp)
xorpd %xmm1, %xmm1
movsd 0x18240(%rip), %xmm0    # 0x2c8e8
xorl %ebp, %ebp
movsbl %dil, %eax
movl %eax, 0x14(%rsp)
movsbl %sil, %eax
movl %eax, 0x4(%rsp)
movsd 0x1822e(%rip), %xmm4    # 0x2c8f0
xorl %eax, %eax
xorl %ecx, %ecx
movapd %xmm0, 0x30(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
xorpd %xmm6, %xmm6
movapd 0x60(%rsp), %xmm5
testb $0x1, %al
je 0x146ed
testb $0x1, %cl
jne 0x14eed
movq 0x8(%rsp), %rdx
movq 0x88(%rdx), %rdx
ucomisd 0x970(%rdx), %xmm5
jbe 0x14bae
movapd %xmm5, %xmm2
xorpd 0x1822d(%rip), %xmm2    # 0x2c940
xorl %r14d, %r14d
movapd %xmm5, 0x60(%rsp)
movapd %xmm2, 0x20(%rsp)
cmpq %r12, %r14
je 0x148df
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x14774
movq 0x88(%rbx), %rcx
movq 0xa0(%rbx), %rdx
movsd (%rcx,%r14,8), %xmm0
mulsd %xmm2, %xmm0
addsd (%rdx,%r14,8), %xmm0
movsd %xmm0, (%rax,%r14,8)
ucomisd %xmm0, %xmm1
ja 0x14764
ucomisd %xmm4, %xmm0
jbe 0x14774
ucomisd %xmm1, %xmm0
jbe 0x14774
ucomisd %xmm0, %xmm4
ja 0x148ac
cmpq $0x0, 0x18(%rbx)
je 0x1480c
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x1480c
movq 0xa8(%rbx), %rax
movq (%rax,%r14,8), %rax
movq 0x18(%rbx), %rcx
movq 0x90(%rbx), %rdx
movq (%rdx,%r14,8), %rdx
movsd (%rdx,%r13,8), %xmm0
mulsd %xmm2, %xmm0
addsd (%rax,%r13,8), %xmm0
movq (%rcx,%r14,8), %rax
movsd %xmm0, (%rax,%r13,8)
ucomisd %xmm0, %xmm1
ja 0x147cb
ucomisd %xmm4, %xmm0
jbe 0x147d7
ucomisd %xmm1, %xmm0
jbe 0x147d7
ucomisd %xmm0, %xmm4
ja 0x147dc
incq %r13
jmp 0x14782
movq 0x247f5(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x18fd0(%rip), %rdi     # 0x2d7bd
pushq $0x2b
popq %rsi
pushq $0x1
popq %rdx
callq 0x44b0
movapd 0x20(%rsp), %xmm2
movsd 0x180ea(%rip), %xmm4    # 0x2c8f0
xorpd %xmm1, %xmm1
jmp 0x147d7
cmpq $0x0, 0x20(%rbx)
je 0x148a4
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x148a4
movq 0xb0(%rbx), %rax
movq (%rax,%r14,8), %rax
movq 0x20(%rbx), %rcx
movq 0x98(%rbx), %rdx
movq (%rdx,%r14,8), %rdx
movsd (%rdx,%r13,8), %xmm0
mulsd %xmm2, %xmm0
addsd (%rax,%r13,8), %xmm0
movq (%rcx,%r14,8), %rax
movsd %xmm0, (%rax,%r13,8)
ucomisd %xmm0, %xmm1
ja 0x14863
ucomisd %xmm4, %xmm0
jbe 0x1486f
ucomisd %xmm1, %xmm0
jbe 0x1486f
ucomisd %xmm0, %xmm4
ja 0x14874
incq %r13
jmp 0x1481a
movq 0x2475d(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x18f64(%rip), %rdi     # 0x2d7e9
pushq $0x2b
popq %rsi
pushq $0x1
popq %rdx
callq 0x44b0
movapd 0x20(%rsp), %xmm2
movsd 0x18052(%rip), %xmm4    # 0x2c8f0
xorpd %xmm1, %xmm1
jmp 0x1486f
incq %r14
jmp 0x14722
movq 0x24725(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x18ed3(%rip), %rdi     # 0x2d790
pushq $0x2c
popq %rsi
pushq $0x1
popq %rdx
callq 0x44b0
movapd 0x20(%rsp), %xmm2
movsd 0x1801a(%rip), %xmm4    # 0x2c8f0
xorpd %xmm1, %xmm1
jmp 0x14774
cmpb $0x1, 0xf8(%rbx)
jne 0x149fd
movq 0x8(%rsp), %rax
cmpb $0x0, 0x80(%rax)
je 0x149b2
cmpb $0x0, 0xf9(%rbx)
movq 0x10(%rbx), %rdi
je 0x149b6
testq %rdi, %rdi
je 0x1492a
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rsi
movq 0x68(%rax), %rdx
movl 0x4(%rsp), %ecx
callq 0x5d80
xorl %r14d, %r14d
cmpq %r14, %r12
je 0x149fd
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x14970
movq (%rax,%r14,8), %rdi
movq 0x8(%rsp), %rcx
cmpb $0x0, 0x80(%rcx)
movq 0x58(%rcx), %rax
cmoveq %rbp, %rax
movq (%rax,%r14,8), %rsi
movq 0x70(%rcx), %rax
cmoveq %rbp, %rax
movq (%rax,%r14,8), %rdx
movl 0x4(%rsp), %ecx
callq 0x5d80
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x149aa
movq (%rax,%r14,8), %rdi
movq 0x8(%rsp), %rcx
cmpb $0x0, 0x80(%rcx)
movq 0x60(%rcx), %rax
cmoveq %rbp, %rax
movq (%rax,%r14,8), %rsi
movq 0x78(%rcx), %rax
cmoveq %rbp, %rax
movq (%rax,%r14,8), %rdx
movl 0x14(%rsp), %ecx
callq 0x5d80
incq %r14
jmp 0x1492d
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x149c4
movl 0x4(%rsp), %esi
callq 0x5600
xorl %r14d, %r14d
cmpq %r14, %r12
je 0x149fd
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x149e2
movq (%rax,%r14,8), %rdi
movl 0x4(%rsp), %esi
callq 0x5600
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x149f8
movq (%rax,%r14,8), %rdi
movl 0x14(%rsp), %esi
callq 0x5600
incq %r14
jmp 0x149c7
movq 0x8(%rsp), %r14
movq %r14, %rdi
movl 0x4c(%rsp), %r13d
movl %r13d, %esi
movq 0x78(%rsp), %rbp
movq %rbp, %rdx
callq 0xe7b0
movl %r13d, %esi
movq %rbp, %rdx
callq 0xe400
movsd %xmm0, 0x20(%rsp)
movq 0x88(%r14), %rax
movsd 0x950(%rax), %xmm0
mulsd 0x60(%rsp), %xmm0
mulsd 0x58(%rsp), %xmm0
addsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
movq %rbx, %rdi
pushq $0x3
popq %rsi
callq 0x8f0e
xorpd %xmm0, %xmm0
xorl %eax, %eax
movapd 0x30(%rsp), %xmm2
cmpq %r12, %rax
je 0x14b05
cmpq $0x0, 0x10(%rbx)
je 0x14a95
movq 0x58(%rbx), %rcx
movq 0x88(%rbx), %rdx
movsd (%rdx,%rax,8), %xmm1
mulsd (%rcx,%rax,8), %xmm1
subsd %xmm1, %xmm0
cmpq $0x0, 0x18(%rbx)
je 0x14ac9
xorl %ecx, %ecx
cmpq %rcx, %r12
je 0x14ac9
movq 0x60(%rbx), %rdx
movq 0x90(%rbx), %rsi
movq (%rsi,%rax,8), %rsi
movsd (%rsi,%rcx,8), %xmm1
movq (%rdx,%rax,8), %rdx
mulsd (%rdx,%rcx,8), %xmm1
subsd %xmm1, %xmm0
incq %rcx
jmp 0x14a9e
cmpq $0x0, 0x20(%rbx)
je 0x14afd
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x14afd
movq 0x68(%rbx), %rdx
movq 0x98(%rbx), %rsi
movq (%rsi,%rax,8), %rsi
movsd (%rsi,%rcx,8), %xmm1
movq (%rdx,%rax,8), %rdx
mulsd (%rdx,%rcx,8), %xmm1
subsd %xmm1, %xmm0
incq %rcx
jmp 0x14ad2
incq %rax
jmp 0x14a6c
movsd 0x20(%rsp), %xmm6
movsd 0x80(%rsp), %xmm7
ucomisd %xmm6, %xmm7
setae %al
movq 0x8(%rsp), %rcx
movq 0x88(%rcx), %rdx
movsd 0x958(%rdx), %xmm3
mulsd 0x58(%rsp), %xmm3
ucomisd %xmm3, %xmm0
setae %cl
ucomisd 0x17da4(%rip), %xmm2    # 0x2c8e8
setnp %sil
sete %dil
andb %sil, %dil
movapd 0x60(%rsp), %xmm5
movapd %xmm5, %xmm1
movapd %xmm2, %xmm4
movapd %xmm6, %xmm2
testb %dil, %al
movl $0x0, %ebp
jne 0x14b75
movapd %xmm4, %xmm1
movsd 0x18(%rsp), %xmm2
ucomisd %xmm6, %xmm7
movsd 0x17d6f(%rip), %xmm4    # 0x2c8f0
jb 0x14b8d
ucomisd %xmm3, %xmm0
movapd %xmm4, %xmm0
jae 0x14b95
movsd 0x960(%rdx), %xmm0
divsd %xmm0, %xmm5
movapd %xmm1, 0x30(%rsp)
movsd %xmm2, 0x18(%rsp)
xorpd %xmm1, %xmm1
jmp 0x146e0
testb $0x1, %al
je 0x14dad
testb $0x1, %cl
jne 0x14eed
pushq $0x9
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x88b6
movapd 0x30(%rsp), %xmm1
xorpd 0x17d65(%rip), %xmm1    # 0x2c940
xorl %ebp, %ebp
xorpd %xmm2, %xmm2
movsd 0x17d07(%rip), %xmm3    # 0x2c8f0
pushq $0x1
popq %r13
movapd %xmm1, 0x30(%rsp)
cmpq %r12, %rbp
je 0x14dc6
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x14c42
movq 0x88(%rbx), %rcx
movq 0xa0(%rbx), %rdx
movsd (%rcx,%rbp,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%rdx,%rbp,8), %xmm0
movsd %xmm0, (%rax,%rbp,8)
ucomisd %xmm0, %xmm2
ja 0x14c32
ucomisd %xmm3, %xmm0
jbe 0x14c42
ucomisd %xmm2, %xmm0
jbe 0x14c42
ucomisd %xmm0, %xmm3
ja 0x14d7a
cmpq $0x0, 0x18(%rbx)
je 0x14cda
xorl %r14d, %r14d
cmpq %r14, %r12
je 0x14cda
movq 0xa8(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x18(%rbx), %rcx
movq 0x90(%rbx), %rdx
movq (%rdx,%rbp,8), %rdx
movsd (%rdx,%r14,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%rax,%r14,8), %xmm0
movq (%rcx,%rbp,8), %rax
movsd %xmm0, (%rax,%r14,8)
ucomisd %xmm0, %xmm2
ja 0x14c99
ucomisd %xmm3, %xmm0
jbe 0x14ca5
ucomisd %xmm2, %xmm0
jbe 0x14ca5
ucomisd %xmm0, %xmm3
ja 0x14caa
incq %r14
jmp 0x14c50
movq 0x24327(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x18b02(%rip), %rdi     # 0x2d7bd
pushq $0x2b
popq %rsi
movq %r13, %rdx
callq 0x44b0
movsd 0x17c22(%rip), %xmm3    # 0x2c8f0
xorpd %xmm2, %xmm2
movapd 0x30(%rsp), %xmm1
jmp 0x14ca5
cmpq $0x0, 0x20(%rbx)
je 0x14d72
xorl %r14d, %r14d
cmpq %r14, %r15
je 0x14d72
movq 0xb0(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x20(%rbx), %rcx
movq 0x98(%rbx), %rdx
movq (%rdx,%rbp,8), %rdx
movsd (%rdx,%r14,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%rax,%r14,8), %xmm0
movq (%rcx,%rbp,8), %rax
movsd %xmm0, (%rax,%r14,8)
ucomisd %xmm0, %xmm2
ja 0x14d31
ucomisd %xmm3, %xmm0
jbe 0x14d3d
ucomisd %xmm2, %xmm0
jbe 0x14d3d
ucomisd %xmm0, %xmm3
ja 0x14d42
incq %r14
jmp 0x14ce8
movq 0x2428f(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x18a96(%rip), %rdi     # 0x2d7e9
pushq $0x2b
popq %rsi
movq %r13, %rdx
callq 0x44b0
movsd 0x17b8a(%rip), %xmm3    # 0x2c8f0
xorpd %xmm2, %xmm2
movapd 0x30(%rsp), %xmm1
jmp 0x14d3d
incq %rbp
jmp 0x14bf3
movq 0x24257(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x18a05(%rip), %rdi     # 0x2d790
pushq $0x2c
popq %rsi
movq %r13, %rdx
callq 0x44b0
movsd 0x17b52(%rip), %xmm3    # 0x2c8f0
xorpd %xmm2, %xmm2
movapd 0x30(%rsp), %xmm1
jmp 0x14c42
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x88b6
movsd 0x50(%rsp), %xmm6
jmp 0x14eed
cmpb $0x1, 0xf8(%rbx)
jne 0x14ee7
movq 0x8(%rsp), %rax
cmpb $0x0, 0x80(%rax)
je 0x14e9c
cmpb $0x0, 0xf9(%rbx)
movq 0x10(%rbx), %rdi
je 0x14ea0
testq %rdi, %rdi
je 0x14e11
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rsi
movq 0x68(%rax), %rdx
movl 0x4(%rsp), %ecx
callq 0x5d80
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x14ee7
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x14e5a
movq (%rax,%r15,8), %rdi
movq 0x8(%rsp), %rcx
cmpb $0x0, 0x80(%rcx)
movq 0x58(%rcx), %rax
cmoveq %r14, %rax
movq (%rax,%r15,8), %rsi
movq 0x70(%rcx), %rax
cmoveq %r14, %rax
movq (%rax,%r15,8), %rdx
movl 0x4(%rsp), %ecx
callq 0x5d80
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x14e94
movq (%rax,%r15,8), %rdi
movq 0x8(%rsp), %rcx
cmpb $0x0, 0x80(%rcx)
movq 0x60(%rcx), %rax
cmoveq %r14, %rax
movq (%rax,%r15,8), %rsi
movq 0x78(%rcx), %rax
cmoveq %r14, %rax
movq (%rax,%r15,8), %rdx
movl 0x14(%rsp), %ecx
callq 0x5d80
incq %r15
jmp 0x14e17
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x14eae
movl 0x4(%rsp), %esi
callq 0x5600
xorl %r14d, %r14d
cmpq %r14, %r12
je 0x14ee7
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x14ecc
movq (%rax,%r14,8), %rdi
movl 0x4(%rsp), %esi
callq 0x5600
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x14ee2
movq (%rax,%r14,8), %rdi
movl 0x14(%rsp), %esi
callq 0x5600
incq %r14
jmp 0x14eb1
movsd 0x18(%rsp), %xmm6
movsd %xmm6, 0x20(%rsp)
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x883c
pushq $0x9
popq %rsi
movq %rbx, %rdi
callq 0x883c
movsd 0x20(%rsp), %xmm0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop