// File: /workspace/github_cpp_makefile_star2_O1/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::doConjugateLinearStep(FitBitSlicedAB*)
NUMBER HMMProblemSlicedAB::doConjugateLinearStep(FitBitSlicedAB *fb) {
	NPAR i=0, j=0, m=0, z=0;
    NPAR nS = this->p->nS, nO = this->p->nO, nZ = this->p->nZ;
	// first scale down gradients
    fb->doLog10ScaleGentle(FBS_GRAD);
    
    // compute beta_gradient_direction
    NUMBER beta_grad = 0, beta_grad_num = 0, beta_grad_den = 0;
    
    switch (this->p->solver_setting) {
        case 1: // Fletcher-Reeves
            for(i=0; i<nS; i++)
            {
                if(fb->pi != NULL) {
                    beta_grad_num += fb->gradPI  [i]*fb->gradPI   [i];
                    beta_grad_den += fb->gradPIm1[i]*fb->gradPIm1[i];
                }
                if(fb->A  != NULL)
                    for(j=0; j<nS; j++) {
                        for(z=0; z<nZ; z++){
                            beta_grad_num += fb->gradA  [z][i][j]*fb->gradA  [z][i][j];
                            beta_grad_den += fb->gradAm1[z][i][j]*fb->gradAm1[z][i][j];
                        }
                    }
                if(fb->B  != NULL)
                    for(m=0; m<nO; m++) {
                        for(z=0; z<nZ; z++){
                            beta_grad_num += fb->gradB  [z][i][m]*fb->gradB  [z][i][m];
                            beta_grad_den += fb->gradBm1[z][i][m]*fb->gradBm1[z][i][m];
                        }
                    }
            }
            break;
        case 2: // Polak–Ribiere
            for(i=0; i<nS; i++)
            {
                if(fb->pi != NULL) {
                    beta_grad_num += -fb->gradPI  [i]*(-fb->gradPI  [i] + fb->gradPIm1[i]);
                    beta_grad_den +=  fb->gradPIm1[i]*  fb->gradPIm1[i];
                }
                if(fb->A != NULL)
                    for(j=0; j<nS; j++) {
                        for(z=0; z<nZ; z++){
                            beta_grad_num += -fb->gradA  [z][i][j]*(-fb->gradA[z][i][j] + fb->gradAm1[z][i][j]);
                            beta_grad_den +=  fb->gradAm1[z][i][j]*fb->gradAm1[z][i][j];
                        }
                    }
                if(fb->B  != NULL)
                    for(m=0; m<nO; m++) {
                        for(z=0; z<nZ; z++){
                            beta_grad_num += -fb->gradB  [z][i][j]*(-fb->gradB  [z][i][j] + fb->gradBm1[z][i][j]);
                            beta_grad_den +=  fb->gradBm1[z][i][m]*  fb->gradBm1[z][i][m];
                        }
                    }
            }
            break;
        case 3: // Hestenes-Stiefel
            for(i=0; i<nS; i++)
            {
                if(fb->pi != NULL) {
                    beta_grad_num += -fb->gradPI [i]*(-fb->gradPI[i] + fb->gradPIm1[i]);
                    beta_grad_den +=  fb->dirPIm1[i]*(-fb->gradPI[i] + fb->gradPIm1[i]);
                }
                if(fb->A  != NULL)
                    for(j=0; j<nS; j++) {
                        for(z=0; z<nZ; z++){
                            beta_grad_num += -fb->gradA [z][i][j]*(-fb->gradA[z][i][j] + fb->gradAm1[z][i][j]);
                            beta_grad_den +=  fb->dirAm1[z][i][j]*(-fb->gradA[z][i][j] + fb->gradAm1[z][i][j]);
                        }
                    }
                if(fb->B  != NULL)
                    for(m=0; m<nO; m++) {
                        for(z=0; z<nZ; z++){
                            beta_grad_num += -fb->gradB [z][i][j]*(-fb->gradB[z][i][j] + fb->gradBm1[z][i][j]);
                            beta_grad_den +=  fb->dirBm1[z][i][m]*(-fb->gradB[z][i][j] + fb->gradBm1[z][i][j]);
                        }
                    }
            }
            break;
        case 4: // Dai-Yuan
            for(i=0; i<nS; i++)
            {
                if(fb->pi != NULL) {
                    beta_grad_num += -fb->gradPI  [i]*fb->gradPI  [i];
                    beta_grad_den +=  fb->dirPIm1[i]*(-fb->gradPI[i] + fb->gradPIm1[i]);
                }
                if(fb->A  != NULL)
                    for(j=0; j<nS; j++) {
                        for(z=0; z<nZ; z++){
                            beta_grad_num += -fb->gradA [z][i][j]*fb->gradA  [z][i][j];
                            beta_grad_den +=  fb->dirAm1[z][i][j]*(-fb->gradA[z][i][j] + fb->gradAm1[z][i][j]);
                        }
                    }
                if(fb->B  != NULL)
                    for(m=0; m<nO; m++) {
                        for(z=0; z<nZ; z++){
                            beta_grad_num += -fb->gradB [z][i][m]*fb->gradB  [z][i][m];
                            beta_grad_den +=  fb->dirBm1[z][i][m]*(-fb->gradB[z][i][j] + fb->gradBm1[z][i][j]);
                        }
                    }
            }
            break;
        default:
            fprintf(stderr,"Wrong stepping algorithm (%d) specified for Conjugate Gradient Descent\n",this->p->solver_setting);
            break;
    }
    beta_grad = beta_grad_num / safe0num(beta_grad_den);
    beta_grad = (beta_grad>=0)?beta_grad:0;
	
    // compute new direction (in place of old)
	for(i=0; i<nS; i++)
	{
        if(fb->pi != NULL) {
            fb->dirPIm1[i] = -fb->gradPI[i] + beta_grad * fb->dirPIm1[i];
        }
        if(fb->A  != NULL) {
            for(j=0; j<nS; j++) {
                for(z=0; z<nZ; z++) {
                    fb->dirAm1[z][i][j] = -fb->gradA[z][i][j] + beta_grad * fb->dirAm1[z][i][j];
                }
            }
        }
        if(fb->B  != NULL) {
            for(m=0; m<nO; m++) {
                for(z=0; z<nZ; z++) {
                    fb->dirBm1[z][i][m] = -fb->gradB[z][i][m] + beta_grad * fb->dirBm1[z][i][m];
                }
            }
        }
	}
	// scale down direction
    fb->doLog10ScaleGentle(FBS_DIRm1);
    
    fb->init(FBS_PARcopy);
    
	NUMBER e = this->p->ArmijoSeed; // step seed
	bool compliesArmijo = false;
	NUMBER f_xk = HMMProblemSlicedAB::getSumLogPOPara(fb->xndat, fb->x_data);
	NUMBER f_xkplus1 = 0;
	
    fb->copy(FBS_PAR, FBS_PARcopy);
	// compute p_k * -p_k >>>> now current gradient by current direction
	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->dirPIm1[i];
        }
        if(fb->A  != NULL) {
            for(j=0; j<nS; j++) {
                for(z=0; z<nZ; z++) {
                    p_k_by_neg_p_k = fb->gradA[z][i][j]*fb->dirAm1[z][i][j];
                }
            }
        }
        if(fb->B  != NULL) {
            for(m=0; m<nO; m++) {
                for(z=0; z<nZ; z++) {
                    p_k_by_neg_p_k = fb->gradB[z][i][m]*fb->dirBm1[z][i][m];
                }
            }
        }
	}
	int iter = 0; // limit iter steps to 20, actually now 10, via ArmijoMinStep
	while( !compliesArmijo && e > this->p->ArmijoMinStep) {
		// update
		for(i=0; i<nS; i++) {
            if(fb->pi != NULL) {
                fb->pi[i] = fb->PIcopy[i] + e * fb->dirPIm1[i];
            }
            if(fb->A  != NULL) {
                for(j=0; j<nS; j++) {
                    for(z=0; z<nZ; z++) {
                        fb->A[z][i][j] = fb->Acopy[z][i][j] + e * fb->dirAm1[z][i][j];
                    }
                }
            }
            if(fb->B  != NULL) {
                for(m=0; m<nO; m++) {
                    for(z=0; z<nZ; z++) {
                        fb->B[z][i][m] = fb->Bcopy[z][i][m] + e * fb->dirBm1[z][i][m];
                    }
                }
            }
		}
		// scale
		if( !this->hasNon01Constraints() ) {
            if(fb->pi != NULL) {
                projectsimplex(fb->pi, nS);
            }
            for(i=0; i<nS; i++) {
                for(z=0; z<nZ; z++) {
                    if(fb->A != NULL) {
                        projectsimplex(fb->A[z][i], nS);
                    }
                    if(fb->B != NULL) {
                        projectsimplex(fb->B[z][i], nS);
                    }
                }
			}
		} else {
			if(fb->pi != NULL) projectsimplexbounded(fb->pi, this->getLbPI(), this->getUbPI(), nS);
            for(i=0; i<nS; i++) {
                for(z=0; z<nZ; z++){
                    if(fb->A != NULL) projectsimplexbounded(fb->A[z][i], this->getLbA()[z][i], this->getUbA()[z][i], nS); // tag is currently fit slice
                    if(fb->B != NULL) projectsimplexbounded(fb->B[z][i], this->getLbB()[z][i], this->getUbB()[z][i], nS);
                }
            }
		}
		// recompute alpha and p(O|param)
		computeAlphaAndPOParam(fb->xndat, fb->x_data);
		// compute f(x_{k+1})
		f_xkplus1 = HMMProblemSlicedAB::getSumLogPOPara(fb->xndat, fb->x_data);
		// compute Armijo compliance
		compliesArmijo = (f_xkplus1 <= (f_xk + (this->p->ArmijoC1 * e * p_k_by_neg_p_k)));
		e /= (compliesArmijo)?1:this->p->ArmijoReduceFactor;
		iter++;
	} // armijo loop
    if(!compliesArmijo) { // failed to step away from initial, reinstate the inital parameters
        e = 0;
        fb->copy(FBS_PARcopy, FBS_PAR);
    }
    //    RecycleFitData(xndat, x_data, this->p);
    fb->destroy(FBS_PARcopy);
    return f_xkplus1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %rbp
movq 0x88(%rdi), %rax
movb 0x8b8(%rax), %cl
movb %cl, 0x7(%rsp)
movzbl %cl, %ecx
movq %rcx, 0x8(%rsp)
movzbl 0x8b9(%rax), %ecx
movq %rcx, 0x10(%rsp)
movzbl 0x8c8(%rax), %r15d
movq %rsi, %rdi
movl $0x3, %esi
callq 0xd7a6
movq 0x88(%rbp), %rax
movzbl 0x40(%rax), %eax
leal -0x1(%rax), %ecx
cmpl $0x3, %ecx
movq %rbp, 0x18(%rsp)
ja 0x28533
leaq 0xdba1(%rip), %rax      # 0x35b74
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpb $0x0, 0x7(%rsp)
jle 0x2854e
movq 0x10(%rbx), %rax
cmpq $0x0, 0x20(%rbx)
movq 0x18(%rbx), %rcx
sete %sil
cmpb $0x0, 0x10(%rsp)
setle %dl
orb %sil, %dl
xorpd %xmm0, %xmm0
xorl %esi, %esi
xorpd %xmm4, %xmm4
testq %rax, %rax
je 0x28035
movq 0x58(%rbx), %rdi
movq 0x70(%rbx), %r8
movsd (%rdi,%rsi,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm4
movsd (%r8,%rsi,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
testq %rcx, %rcx
je 0x2808a
xorl %edi, %edi
testb %r15b, %r15b
jle 0x28080
movq 0x60(%rbx), %r8
movq 0x78(%rbx), %r9
xorl %r10d, %r10d
movq (%r8,%r10,8), %r11
movq (%r11,%rsi,8), %r11
movsd (%r11,%rdi,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm4
movq (%r9,%r10,8), %r11
movq (%r11,%rsi,8), %r11
movsd (%r11,%rdi,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %r10
cmpq %r10, %r15
jne 0x2804c
incq %rdi
cmpq 0x8(%rsp), %rdi
jne 0x2803c
testb %dl, %dl
jne 0x280e1
xorl %edi, %edi
testb %r15b, %r15b
jle 0x280d7
movq 0x68(%rbx), %r8
movq 0x80(%rbx), %r9
xorl %r10d, %r10d
movq (%r8,%r10,8), %r11
movq (%r11,%rsi,8), %r11
movsd (%r11,%rdi,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm4
movq (%r9,%r10,8), %r11
movq (%r11,%rsi,8), %r11
movsd (%r11,%rdi,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %r10
cmpq %r10, %r15
jne 0x280a3
incq %rdi
cmpq 0x10(%rsp), %rdi
jne 0x28090
incq %rsi
cmpq 0x8(%rsp), %rsi
jne 0x2800d
jmp 0x28556
cmpb $0x0, 0x7(%rsp)
jle 0x2854e
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
cmpq $0x0, 0x20(%rbx)
sete %sil
cmpb $0x0, 0x10(%rsp)
setle %dl
orb %sil, %dl
xorpd %xmm0, %xmm0
xorl %esi, %esi
xorl %edi, %edi
xorpd %xmm4, %xmm4
xorl %r8d, %r8d
testq %rax, %rax
je 0x28160
movq 0x58(%rbx), %r9
movq 0x70(%rbx), %r10
movsd (%r9,%rdi,8), %xmm1
movsd (%r10,%rdi,8), %xmm2
subsd %xmm1, %xmm2
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm4
movq 0xb8(%rbx), %r9
mulsd (%r9,%rdi,8), %xmm2
addsd %xmm2, %xmm0
movzbl %r8b, %r8d
testq %rcx, %rcx
cmovnel %esi, %r8d
je 0x281d8
xorl %r8d, %r8d
testb %r15b, %r15b
jle 0x281c9
movq 0x60(%rbx), %r9
movq 0x78(%rbx), %r10
movq 0xc0(%rbx), %r11
xorl %r14d, %r14d
movq (%r9,%r14,8), %r12
movq (%r12,%rdi,8), %r12
movsd (%r12,%r8,8), %xmm1
movq (%r10,%r14,8), %r12
movq (%r12,%rdi,8), %r12
movsd (%r12,%r8,8), %xmm2
subsd %xmm1, %xmm2
mulsd %xmm2, %xmm1
movq (%r11,%r14,8), %r12
movq (%r12,%rdi,8), %r12
mulsd (%r12,%r8,8), %xmm2
subsd %xmm1, %xmm4
addsd %xmm2, %xmm0
incq %r14
cmpq %r14, %r15
jne 0x28187
incq %r8
cmpq 0x8(%rsp), %r8
jne 0x28170
movb 0x7(%rsp), %r8b
testb %dl, %dl
jne 0x2824f
movsbq %r8b, %r9
xorl %r10d, %r10d
testb %r15b, %r15b
jle 0x28245
movq 0x68(%rbx), %r11
movq 0x80(%rbx), %r14
movq 0xc8(%rbx), %r12
xorl %r13d, %r13d
movq (%r11,%r13,8), %rbp
movq (%rbp,%rdi,8), %rbp
movsd (%rbp,%r9,8), %xmm1
movq (%r14,%r13,8), %rbp
movq (%rbp,%rdi,8), %rbp
movsd (%rbp,%r9,8), %xmm2
subsd %xmm1, %xmm2
mulsd %xmm2, %xmm1
movq (%r12,%r13,8), %rbp
movq (%rbp,%rdi,8), %rbp
mulsd (%rbp,%r10,8), %xmm2
subsd %xmm1, %xmm4
addsd %xmm2, %xmm0
incq %r13
cmpq %r13, %r15
jne 0x281fd
incq %r10
cmpq 0x10(%rsp), %r10
jne 0x281e3
incq %rdi
cmpq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rbp
jne 0x2812a
jmp 0x28556
cmpb $0x0, 0x7(%rsp)
jle 0x2854e
movq 0x10(%rbx), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rbx), %rcx
cmpq $0x0, 0x20(%rbx)
sete %sil
cmpb $0x0, 0x10(%rsp)
setle %dl
orb %sil, %dl
xorpd %xmm0, %xmm0
xorl %edi, %edi
xorpd %xmm4, %xmm4
xorl %r8d, %r8d
cmpq $0x0, 0x20(%rsp)
je 0x282d9
movq 0x58(%rbx), %r9
movq 0x70(%rbx), %r10
movsd (%r9,%rdi,8), %xmm1
movsd (%r10,%rdi,8), %xmm2
subsd %xmm1, %xmm2
mulsd %xmm1, %xmm1
subsd %xmm1, %xmm4
movq 0xb8(%rbx), %r9
mulsd (%r9,%rdi,8), %xmm2
addsd %xmm2, %xmm0
movzbl %r8b, %r8d
testq %rcx, %rcx
movl $0x0, %eax
cmovnel %eax, %r8d
je 0x28358
xorl %r8d, %r8d
testb %r15b, %r15b
jle 0x28347
movq 0x60(%rbx), %r9
movq 0x78(%rbx), %r10
movq 0xc0(%rbx), %r11
xorl %r14d, %r14d
movq (%r9,%r14,8), %r12
movq (%r12,%rdi,8), %r12
movsd (%r12,%r8,8), %xmm1
movq (%r10,%r14,8), %r12
movq (%r12,%rdi,8), %r12
movsd (%r12,%r8,8), %xmm2
subsd %xmm1, %xmm2
mulsd %xmm1, %xmm1
movq (%r11,%r14,8), %r12
movq (%r12,%rdi,8), %r12
mulsd (%r12,%r8,8), %xmm2
subsd %xmm1, %xmm4
addsd %xmm2, %xmm0
incq %r14
cmpq %r14, %r15
jne 0x28305
incq %r8
cmpq 0x8(%rsp), %r8
jne 0x282ee
movb 0x7(%rsp), %al
movl %eax, %r8d
testb %dl, %dl
jne 0x283ce
movsbq %r8b, %r9
xorl %r10d, %r10d
testb %r15b, %r15b
jle 0x283c4
movq 0x68(%rbx), %r11
movq 0x80(%rbx), %r14
movq 0xc8(%rbx), %r12
xorl %r13d, %r13d
movq (%r11,%r13,8), %rbp
movq (%rbp,%rdi,8), %rbp
movsd (%rbp,%r10,8), %xmm1
mulsd %xmm1, %xmm1
movq (%r12,%r13,8), %rsi
movq (%rsi,%rdi,8), %rsi
movq (%r14,%r13,8), %rax
movq (%rax,%rdi,8), %rax
movsd (%rax,%r9,8), %xmm2
subsd (%rbp,%r9,8), %xmm2
mulsd (%rsi,%r10,8), %xmm2
subsd %xmm1, %xmm4
addsd %xmm2, %xmm0
incq %r13
cmpq %r13, %r15
jne 0x2837d
incq %r10
cmpq 0x10(%rsp), %r10
jne 0x28363
incq %rdi
cmpq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rbp
jne 0x282a0
jmp 0x28556
cmpb $0x0, 0x7(%rsp)
jle 0x2854e
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
cmpq $0x0, 0x20(%rbx)
sete %sil
cmpb $0x0, 0x10(%rsp)
setle %dl
orb %sil, %dl
xorpd %xmm0, %xmm0
xorl %esi, %esi
xorl %edi, %edi
xorpd %xmm4, %xmm4
xorl %r8d, %r8d
testq %rax, %rax
je 0x2844d
movq 0x58(%rbx), %r9
movq 0x70(%rbx), %r10
movsd (%r9,%rdi,8), %xmm1
movsd (%r10,%rdi,8), %xmm2
movapd %xmm2, %xmm3
subsd %xmm1, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm3, %xmm4
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
movzbl %r8b, %r8d
testq %rcx, %rcx
cmovnel %esi, %r8d
je 0x284b8
xorl %r8d, %r8d
testb %r15b, %r15b
jle 0x284a9
movq 0x60(%rbx), %r9
movq 0x78(%rbx), %r10
xorl %r11d, %r11d
movq (%r9,%r11,8), %r14
movq (%r14,%rdi,8), %r14
movsd (%r14,%r8,8), %xmm1
movq (%r10,%r11,8), %r14
movq (%r14,%rdi,8), %r14
movsd (%r14,%r8,8), %xmm2
movapd %xmm2, %xmm3
subsd %xmm1, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm3, %xmm4
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %r11
cmpq %r11, %r15
jne 0x2846d
incq %r8
cmpq 0x8(%rsp), %r8
jne 0x2845d
movb 0x7(%rsp), %r8b
testb %dl, %dl
jne 0x28523
movsbq %r8b, %r9
xorl %r10d, %r10d
testb %r15b, %r15b
jle 0x28519
movq 0x68(%rbx), %r11
movq 0x80(%rbx), %r14
xorl %r12d, %r12d
movq (%r11,%r12,8), %r13
movq (%r13,%rdi,8), %r13
movsd (%r13,%r9,8), %xmm1
movq (%r14,%r12,8), %r13
movq (%r13,%rdi,8), %r13
movsd (%r13,%r9,8), %xmm2
subsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm4
movsd (%r13,%r10,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %r12
cmpq %r12, %r15
jne 0x284d6
incq %r10
cmpq 0x10(%rsp), %r10
jne 0x284c3
incq %rdi
cmpq 0x8(%rsp), %rdi
jne 0x2841c
jmp 0x28556
movsbl %al, %edx
movq 0x17a9b(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
leaq 0xd23e(%rip), %rsi      # 0x35785
xorl %eax, %eax
callq 0x4330
xorpd %xmm4, %xmm4
xorpd %xmm0, %xmm0
movapd %xmm4, 0x20(%rsp)
callq 0x8d88
cmpb $0x0, 0x7(%rsp)
jle 0x28677
movapd 0x20(%rsp), %xmm1
divsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
cmplesd %xmm1, %xmm0
andpd %xmm1, %xmm0
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
cmpq $0x0, 0x20(%rbx)
sete %sil
cmpb $0x0, 0x10(%rsp)
setle %dl
orb %sil, %dl
xorl %esi, %esi
testq %rax, %rax
je 0x285c6
movq 0x58(%rbx), %rdi
movq 0xb8(%rbx), %r8
movsd (%r8,%rsi,8), %xmm1
mulsd %xmm0, %xmm1
subsd (%rdi,%rsi,8), %xmm1
movsd %xmm1, (%r8,%rsi,8)
testq %rcx, %rcx
je 0x28618
xorl %edi, %edi
testb %r15b, %r15b
jle 0x2860e
movq 0x60(%rbx), %r8
movq 0xc0(%rbx), %r9
xorl %r10d, %r10d
movq (%r8,%r10,8), %r11
movq (%r11,%rsi,8), %r11
movq (%r9,%r10,8), %r14
movq (%r14,%rsi,8), %r14
movsd (%r14,%rdi,8), %xmm1
mulsd %xmm0, %xmm1
subsd (%r11,%rdi,8), %xmm1
movsd %xmm1, (%r14,%rdi,8)
incq %r10
cmpq %r10, %r15
jne 0x285e0
incq %rdi
cmpq 0x8(%rsp), %rdi
jne 0x285cd
testb %dl, %dl
jne 0x28669
xorl %edi, %edi
testb %r15b, %r15b
jle 0x2865f
movq 0x68(%rbx), %r8
movq 0xc8(%rbx), %r9
xorl %r10d, %r10d
movq (%r8,%r10,8), %r11
movq (%r11,%rsi,8), %r11
movq (%r9,%r10,8), %r14
movq (%r14,%rsi,8), %r14
movsd (%r14,%rdi,8), %xmm1
mulsd %xmm0, %xmm1
subsd (%r11,%rdi,8), %xmm1
movsd %xmm1, (%r14,%rdi,8)
incq %r10
cmpq %r10, %r15
jne 0x28631
incq %rdi
cmpq 0x10(%rsp), %rdi
jne 0x2861e
incq %rsi
cmpq 0x8(%rsp), %rsi
jne 0x285a1
movq %rbx, %rdi
movl $0x6, %esi
callq 0xd7a6
movq %rbx, %rdi
movl $0x5, %esi
callq 0xd392
movq 0x88(%rbp), %rax
movsd 0x968(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0xd0(%rbx), %esi
movq 0xd8(%rbx), %rdx
movq %rbp, %rdi
callq 0x1161c
movsd %xmm0, 0x40(%rsp)
movq %rbx, %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0xd4bc
xorpd %xmm2, %xmm2
cmpb $0x0, 0x7(%rsp)
jle 0x287ad
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
cmpq $0x0, 0x20(%rbx)
sete %dil
cmpb $0x0, 0x10(%rsp)
setle %dl
leal -0x1(%r15), %esi
movsbq %sil, %rsi
orb %dil, %dl
xorl %edi, %edi
testq %rax, %rax
je 0x28724
movq 0x58(%rbx), %r8
movq 0xb8(%rbx), %r9
movsd (%r8,%rdi,8), %xmm2
mulsd (%r9,%rdi,8), %xmm2
testq %rcx, %rcx
je 0x28762
xorl %r8d, %r8d
testb %r15b, %r15b
jle 0x28758
movq 0x60(%rbx), %r9
movq 0xc0(%rbx), %r10
movq (%r9,%rsi,8), %r9
movq (%r9,%rdi,8), %r9
movsd (%r9,%r8,8), %xmm2
movq (%r10,%rsi,8), %r9
movq (%r9,%rdi,8), %r9
mulsd (%r9,%r8,8), %xmm2
incq %r8
cmpq %r8, 0x8(%rsp)
jne 0x2872c
testb %dl, %dl
jne 0x2879f
xorl %r8d, %r8d
testb %r15b, %r15b
jle 0x28795
movq 0x68(%rbx), %r9
movq 0xc8(%rbx), %r10
movq (%r9,%rsi,8), %r9
movq (%r9,%rdi,8), %r9
movsd (%r9,%r8,8), %xmm2
movq (%r10,%rsi,8), %r9
movq (%r9,%rdi,8), %r9
mulsd (%r9,%r8,8), %xmm2
incq %r8
cmpq %r8, 0x10(%rsp)
jne 0x28769
incq %rdi
cmpq 0x8(%rsp), %rdi
jne 0x28708
movq 0x88(%rbp), %rax
movsd 0x20(%rsp), %xmm3
ucomisd 0x970(%rax), %xmm3
jbe 0x28b03
xorl %r13d, %r13d
movsd %xmm2, 0x38(%rsp)
cmpb $0x0, 0x7(%rsp)
jle 0x288ef
cmpb $0x0, 0x10(%rsp)
setle %dil
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rdx
testq %rdx, %rdx
sete %sil
orb %dil, %sil
xorl %edi, %edi
testq %rax, %rax
je 0x28825
movq 0x88(%rbx), %r8
movq 0xb8(%rbx), %r9
movsd (%r9,%rdi,8), %xmm0
mulsd %xmm3, %xmm0
addsd (%r8,%rdi,8), %xmm0
movsd %xmm0, (%rax,%rdi,8)
testq %rcx, %rcx
je 0x28883
xorl %r8d, %r8d
testb %r15b, %r15b
jle 0x28879
movq 0x90(%rbx), %r9
movq 0xc0(%rbx), %r10
xorl %r11d, %r11d
movq (%r9,%r11,8), %r14
movq (%r14,%rdi,8), %r14
movq (%r10,%r11,8), %r12
movq (%r12,%rdi,8), %r12
movsd (%r12,%r8,8), %xmm0
mulsd %xmm3, %xmm0
addsd (%r14,%r8,8), %xmm0
movq (%rcx,%r11,8), %r14
movq (%r14,%rdi,8), %r14
movsd %xmm0, (%r14,%r8,8)
incq %r11
cmpq %r11, %r15
jne 0x28843
incq %r8
cmpq 0x8(%rsp), %r8
jne 0x2882d
testb %sil, %sil
jne 0x288e1
xorl %r8d, %r8d
testb %r15b, %r15b
jle 0x288d7
movq 0x98(%rbx), %r9
movq 0xc8(%rbx), %r10
xorl %r11d, %r11d
movq (%r9,%r11,8), %r14
movq (%r14,%rdi,8), %r14
movq (%r10,%r11,8), %r12
movq (%r12,%rdi,8), %r12
movsd (%r12,%r8,8), %xmm0
mulsd %xmm3, %xmm0
addsd (%r14,%r8,8), %xmm0
movq (%rdx,%r11,8), %r14
movq (%r14,%rdi,8), %r14
movsd %xmm0, (%r14,%r8,8)
incq %r11
cmpq %r11, %r15
jne 0x288a1
incq %r8
cmpq 0x10(%rsp), %r8
jne 0x2888b
incq %rdi
cmpq 0x8(%rsp), %rdi
jne 0x287fd
movsd %xmm3, 0x20(%rsp)
movq %rbp, %rdi
callq 0x114a8
movsbl 0x7(%rsp), %ebp
testb %al, %al
je 0x28931
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x289a9
movq 0x18(%rsp), %rax
cmpb $0x0, 0x80(%rax)
je 0x2899e
movq 0xa0(%rax), %rsi
movq 0xb8(%rax), %rdx
jmp 0x289a2
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x28941
movl %ebp, %esi
callq 0x692d
cmpb $0x0, 0x7(%rsp)
jle 0x28a71
xorl %r14d, %r14d
testb %r15b, %r15b
jle 0x2898f
xorl %r12d, %r12d
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x2896f
movq (%rax,%r12,8), %rax
movq (%rax,%r14,8), %rdi
movl %ebp, %esi
callq 0x692d
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x28987
movq (%rax,%r12,8), %rax
movq (%rax,%r14,8), %rdi
movl %ebp, %esi
callq 0x692d
incq %r12
cmpq %r12, %r15
jne 0x28957
incq %r14
cmpq 0x8(%rsp), %r14
jne 0x2894f
jmp 0x28a71
xorl %esi, %esi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x79f5
cmpb $0x0, 0x7(%rsp)
jle 0x28a71
xorl %r12d, %r12d
testb %r15b, %r15b
jle 0x28a63
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x28a0d
movq 0x18(%rsp), %rdx
cmpb $0x0, 0x80(%rdx)
movq (%rax,%r14,8), %rax
movq 0xa8(%rdx), %rcx
cmoveq %r13, %rcx
movq (%rax,%r12,8), %rdi
movq (%rcx,%r14,8), %rax
movq (%rax,%r12,8), %rsi
movq 0xc0(%rdx), %rax
cmoveq %r13, %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r12,8), %rdx
movl %ebp, %ecx
callq 0x79f5
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x28a57
movq 0x18(%rsp), %rdx
cmpb $0x0, 0x80(%rdx)
movq (%rax,%r14,8), %rax
movq 0xb0(%rdx), %rcx
cmoveq %r13, %rcx
movq (%rax,%r12,8), %rdi
movq (%rcx,%r14,8), %rax
movq (%rax,%r12,8), %rsi
movq 0xc8(%rdx), %rax
cmoveq %r13, %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r12,8), %rdx
movl %ebp, %ecx
callq 0x79f5
incq %r14
cmpq %r14, %r15
jne 0x289c3
incq %r12
cmpq 0x8(%rsp), %r12
jne 0x289b7
movl 0xd0(%rbx), %esi
movq 0xd8(%rbx), %rdx
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x25d92
movl 0xd0(%rbx), %esi
movq 0xd8(%rbx), %rdx
movq %rbp, %rdi
callq 0x1161c
movq 0x88(%rbp), %rcx
movsd 0x950(%rcx), %xmm4
movsd 0x20(%rsp), %xmm3
mulsd %xmm3, %xmm4
movsd 0x38(%rsp), %xmm2
mulsd %xmm2, %xmm4
addsd 0x40(%rsp), %xmm4
ucomisd %xmm0, %xmm4
setae %al
movsd 0xbe18(%rip), %xmm1     # 0x348f0
jae 0x28ae2
movsd 0x960(%rcx), %xmm1
ucomisd %xmm0, %xmm4
jae 0x28b27
divsd %xmm1, %xmm3
movq 0x88(%rbp), %rcx
ucomisd 0x970(%rcx), %xmm3
ja 0x287d1
jmp 0x28b09
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd %xmm0, 0x8(%rsp)
testb %al, %al
jne 0x28b2d
movq %rbx, %rdi
movl $0x5, %esi
movl $0x1, %edx
callq 0xd4bc
jmp 0x28b2d
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x5, %esi
callq 0xd442
movsd 0x8(%rsp), %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop