// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedA.cpp
// Function: HMMProblemSlicedA::doConjugateLinearStep(FitBitSlicedA*)
NUMBER HMMProblemSlicedA::doConjugateLinearStep(FitBitSlicedA *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(z=0; z<nZ; z++)
                        for(j=0; j<nS; j++) {
                            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++) {
                        beta_grad_num += fb->gradB  [i][m]*fb->gradB  [i][m];
                        beta_grad_den += fb->gradBm1[i][m]*fb->gradBm1[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(z=0; z<nZ; z++)
                        for(j=0; j<nS; j++) {
                            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++) {
                        beta_grad_num += -fb->gradB  [i][j]*(-fb->gradB  [i][j] + fb->gradBm1[i][j]);
                        beta_grad_den +=  fb->gradBm1[i][m]*  fb->gradBm1[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(z=0; z<nZ; z++)
                        for(j=0; j<nS; j++) {
                            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++) {
                        beta_grad_num += -fb->gradB [i][j]*(-fb->gradB[i][j] + fb->gradBm1[i][j]);
                        beta_grad_den +=  fb->dirBm1[i][m]*(-fb->gradB[i][j] + fb->gradBm1[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++) {
                        beta_grad_num += -fb->gradB [i][m]*fb->gradB  [i][m];
                        beta_grad_den +=  fb->dirBm1[i][m]*(-fb->gradB[i][j] + fb->gradBm1[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(z=0; z<nZ; z++) {
                for(j=0; j<nS; j++) {
                    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++) {
                fb->dirBm1[i][m] = -fb->gradB[i][m] + beta_grad * fb->dirBm1[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 = HMMProblemSlicedA::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(z=0; z<nZ; z++) {
                for(j=0; j<nS; j++) {
                    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++) {
                p_k_by_neg_p_k = fb->gradB[i][m]*fb->dirBm1[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(z=0; z<nZ; z++) {
                    for(j=0; j<nS; j++) {
                        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++) {
                    fb->B[i][m] = fb->Bcopy[i][m] + e * fb->dirBm1[i][m];
                }
            }
		}
		// scale
		if( !this->hasNon01Constraints() ) {
            if(fb->pi != NULL) {
                projectsimplex(fb->pi, nS);
            }
            for(i=0; i<nS; i++) {
                if(fb->A != NULL) {
                    for(z=0; z<nZ; z++) {
                        projectsimplex(fb->A[z][i], nS);
                    }
                }
                if(fb->B != NULL) {
                    projectsimplex(fb->B[i], nS);
                }
			}
		} else {
            if(fb->pi != NULL) {
                projectsimplexbounded(fb->pi, this->getLbPI(), this->getUbPI(), nS);
            }
            for(i=0; i<nS; i++) {
                if(fb->A != NULL) {
                    for(z=0; z<nZ; z++) {
                        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[i], this->getLbB()[i], this->getUbB()[i], nS);
                }
            }
		}
		// recompute alpha and p(O|param)
		computeAlphaAndPOParam(fb->xndat, fb->x_data);
		// compute f(x_{k+1})
		f_xkplus1 = HMMProblemSlicedA::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, %r15
movq 0x88(%rdi), %rax
movb 0x8b8(%rax), %r13b
movb 0x8b9(%rax), %r14b
movb 0x8c8(%rax), %bpl
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x9d84
movq %r15, 0x8(%rsp)
movq 0x88(%r15), %rax
movzbl 0x40(%rax), %eax
leal -0x1(%rax), %ecx
movl %r13d, %r12d
movzbl %r13b, %r15d
movzbl %bpl, %ebp
movzbl %r14b, %r14d
cmpl $0x3, %ecx
ja 0x278c7
leaq 0x6897(%rip), %rax      # 0x2dc88
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %eax, %eax
testb %r15b, %r15b
cmovlel %eax, %r15d
testb %bpl, %bpl
cmovlel %eax, %ebp
testb %r14b, %r14b
cmovlel %eax, %r14d
movl $0xff, %esi
movl %r15d, %r13d
andl %esi, %r13d
movl %ebp, %ecx
andl %esi, %ecx
movl %r14d, %edx
andl %esi, %edx
xorpd %xmm4, %xmm4
cmpq %r13, %rax
je 0x27906
cmpq $0x0, 0x10(%rbx)
je 0x27452
movq 0x58(%rbx), %rsi
movq 0x70(%rbx), %rdi
movsd (%rsi,%rax,8), %xmm0
movhpd (%rdi,%rax,8), %xmm0    # xmm0 = xmm0[0],mem[0]
mulpd %xmm0, %xmm0
addpd %xmm0, %xmm4
cmpq $0x0, 0x18(%rbx)
je 0x2749d
xorl %esi, %esi
cmpq %rcx, %rsi
je 0x2749d
xorl %edi, %edi
cmpq %rdi, %r13
je 0x27498
movq 0x60(%rbx), %r8
movq 0x78(%rbx), %r9
movq (%r8,%rsi,8), %r8
movq (%r8,%rax,8), %r8
movq (%r9,%rsi,8), %r9
movq (%r9,%rax,8), %r9
movsd (%r8,%rdi,8), %xmm0
movhpd (%r9,%rdi,8), %xmm0     # xmm0 = xmm0[0],mem[0]
mulpd %xmm0, %xmm0
addpd %xmm0, %xmm4
incq %rdi
jmp 0x27462
incq %rsi
jmp 0x2745b
cmpq $0x0, 0x20(%rbx)
je 0x274d6
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x274d6
movq 0x68(%rbx), %rdi
movq 0x80(%rbx), %r8
movq (%rdi,%rax,8), %rdi
movq (%r8,%rax,8), %r8
movsd (%rdi,%rsi,8), %xmm0
movhpd (%r8,%rsi,8), %xmm0     # xmm0 = xmm0[0],mem[0]
mulpd %xmm0, %xmm0
addpd %xmm0, %xmm4
incq %rsi
jmp 0x274a6
incq %rax
jmp 0x27428
xorl %eax, %eax
testb %r15b, %r15b
cmovlel %eax, %r15d
movl $0xff, %esi
movl %r15d, %r13d
andl %esi, %r13d
testb %bpl, %bpl
cmovlel %eax, %ebp
testb %r14b, %r14b
cmovlel %eax, %r14d
movl %ebp, %ecx
andl %esi, %ecx
movl %r14d, %edx
andl %esi, %edx
xorpd %xmm4, %xmm4
movapd 0x542c(%rip), %xmm0     # 0x2c940
xorl %esi, %esi
cmpq %r13, %rax
je 0x27906
cmpq $0x0, 0x10(%rbx)
je 0x27559
movq 0x58(%rbx), %rdi
movq 0x70(%rbx), %r8
movsd (%rdi,%rax,8), %xmm1
movsd (%r8,%rax,8), %xmm2
subsd %xmm1, %xmm2
xorpd %xmm0, %xmm1
movq 0xb8(%rbx), %rdi
movhpd (%rdi,%rax,8), %xmm1    # xmm1 = xmm1[0],mem[0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
addpd %xmm2, %xmm4
cmpq $0x0, 0x18(%rbx)
je 0x275c8
xorl %edi, %edi
cmpq %rcx, %rdi
je 0x275c8
xorl %esi, %esi
cmpq %rsi, %r13
je 0x275c0
movq 0x60(%rbx), %r8
movq 0x78(%rbx), %r9
movq (%r8,%rdi,8), %r8
movq (%r8,%rax,8), %r8
movsd (%r8,%rsi,8), %xmm1
movq (%r9,%rdi,8), %r8
movq (%r8,%rax,8), %r8
movsd (%r8,%rsi,8), %xmm2
subsd %xmm1, %xmm2
xorpd %xmm0, %xmm1
movq 0xc0(%rbx), %r8
movq (%r8,%rdi,8), %r8
movq (%r8,%rax,8), %r8
movhpd (%r8,%rsi,8), %xmm1     # xmm1 = xmm1[0],mem[0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
addpd %xmm2, %xmm4
incq %rsi
jmp 0x27569
incq %rdi
movl %r15d, %esi
jmp 0x27562
cmpq $0x0, 0x20(%rbx)
je 0x27627
movzbl %sil, %edi
shll $0x3, %edi
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x27627
movq 0x68(%rbx), %r9
movq 0x80(%rbx), %r10
movq (%r9,%rax,8), %r9
movsd (%r9,%rdi), %xmm1
movq (%r10,%rax,8), %r9
movsd (%r9,%rdi), %xmm2
subsd %xmm1, %xmm2
xorpd %xmm0, %xmm1
movq 0xc8(%rbx), %r9
movq (%r9,%rax,8), %r9
movhpd (%r9,%r8,8), %xmm1      # xmm1 = xmm1[0],mem[0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
addpd %xmm2, %xmm4
incq %r8
jmp 0x275d9
incq %rax
jmp 0x27516
xorl %eax, %eax
testb %bpl, %bpl
cmovlel %eax, %ebp
testb %r15b, %r15b
cmovlel %eax, %r15d
movl $0xff, %esi
movl %r15d, %r13d
andl %esi, %r13d
testb %r14b, %r14b
cmovlel %eax, %r14d
movl %ebp, %ecx
andl %esi, %ecx
movl %r14d, %edx
andl %esi, %edx
xorpd %xmm4, %xmm4
movapd 0x52db(%rip), %xmm0     # 0x2c940
xorl %esi, %esi
cmpq %r13, %rax
je 0x27906
cmpq $0x0, 0x10(%rbx)
je 0x276ae
movq 0x58(%rbx), %rdi
movq 0x70(%rbx), %r8
movsd (%rdi,%rax,8), %xmm1
movapd %xmm1, %xmm2
xorpd %xmm0, %xmm2
movq 0xb8(%rbx), %rdi
movsd (%r8,%rax,8), %xmm3
movhpd (%rdi,%rax,8), %xmm2    # xmm2 = xmm2[0],mem[0]
subsd %xmm1, %xmm3
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
mulpd %xmm2, %xmm1
addpd %xmm1, %xmm4
cmpq $0x0, 0x18(%rbx)
je 0x27721
xorl %esi, %esi
cmpq %r13, %rsi
je 0x2771e
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x27719
movq 0x60(%rbx), %r8
movq 0x78(%rbx), %r9
movq (%r8,%rdi,8), %r8
movq (%r8,%rax,8), %r8
movsd (%r8,%rsi,8), %xmm1
movapd %xmm1, %xmm2
xorpd %xmm0, %xmm2
movq 0xc0(%rbx), %r8
movq (%r8,%rdi,8), %r8
movq (%r8,%rax,8), %r8
movq (%r9,%rdi,8), %r9
movq (%r9,%rax,8), %r9
movsd (%r9,%rsi,8), %xmm3
subsd %xmm1, %xmm3
movhpd (%r8,%rsi,8), %xmm2     # xmm2 = xmm2[0],mem[0]
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
mulpd %xmm2, %xmm1
addpd %xmm1, %xmm4
incq %rdi
jmp 0x276be
incq %rsi
jmp 0x276b7
movl %r15d, %esi
cmpq $0x0, 0x20(%rbx)
je 0x27786
movzbl %sil, %edi
shll $0x3, %edi
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x27786
movq 0x68(%rbx), %r9
movq 0x80(%rbx), %r10
movq (%r9,%rax,8), %r9
movsd (%r9,%r8,8), %xmm1
movapd %xmm1, %xmm2
xorpd %xmm0, %xmm2
movq 0xc8(%rbx), %r11
movq (%r11,%rax,8), %r11
movq (%r10,%rax,8), %r10
movsd (%r10,%rdi), %xmm3
subsd (%r9,%rdi), %xmm3
movhpd (%r11,%r8,8), %xmm2     # xmm2 = xmm2[0],mem[0]
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
mulpd %xmm2, %xmm1
addpd %xmm1, %xmm4
incq %r8
jmp 0x27732
incq %rax
jmp 0x27667
xorl %eax, %eax
testb %r15b, %r15b
cmovlel %eax, %r15d
movl $0xff, %esi
movl %r15d, %r13d
andl %esi, %r13d
testb %bpl, %bpl
cmovlel %eax, %ebp
testb %r14b, %r14b
cmovlel %eax, %r14d
movl %ebp, %ecx
andl %esi, %ecx
movl %r14d, %edx
andl %esi, %edx
xorpd %xmm4, %xmm4
movapd 0x517c(%rip), %xmm0     # 0x2c940
xorl %esi, %esi
cmpq %r13, %rax
je 0x27906
cmpq $0x0, 0x10(%rbx)
je 0x27805
movq 0x58(%rbx), %rdi
movq 0x70(%rbx), %r8
movsd (%rdi,%rax,8), %xmm1
movsd (%r8,%rax,8), %xmm2
movapd %xmm2, %xmm3
subsd %xmm1, %xmm3
xorpd %xmm0, %xmm1
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
mulpd %xmm1, %xmm3
addpd %xmm3, %xmm4
cmpq $0x0, 0x18(%rbx)
je 0x27867
xorl %edi, %edi
cmpq %rcx, %rdi
je 0x27867
xorl %esi, %esi
cmpq %rsi, %r13
je 0x2785f
movq 0x60(%rbx), %r8
movq 0x78(%rbx), %r9
movq (%r8,%rdi,8), %r8
movq (%r8,%rax,8), %r8
movsd (%r8,%rsi,8), %xmm1
movq (%r9,%rdi,8), %r8
movq (%r8,%rax,8), %r8
movsd (%r8,%rsi,8), %xmm2
movapd %xmm2, %xmm3
subsd %xmm1, %xmm3
xorpd %xmm0, %xmm1
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
mulpd %xmm1, %xmm3
addpd %xmm3, %xmm4
incq %rsi
jmp 0x27815
incq %rdi
movl %r15d, %esi
jmp 0x2780e
cmpq $0x0, 0x20(%rbx)
je 0x278bf
movzbl %sil, %edi
shll $0x3, %edi
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x278bf
movq 0x68(%rbx), %r9
movq 0x80(%rbx), %r10
movq (%r9,%rax,8), %r9
movsd (%r9,%rdi), %xmm1
movq (%r10,%rax,8), %r9
movsd (%r9,%rdi), %xmm2
subsd %xmm1, %xmm2
xorpd %xmm0, %xmm1
movsd (%r9,%r8,8), %xmm3
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
unpcklpd %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
mulpd %xmm1, %xmm2
addpd %xmm2, %xmm4
incq %r8
jmp 0x27878
incq %rax
jmp 0x277c6
movsbl %al, %edx
movq 0x11707(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x5f3a(%rip), %rsi      # 0x2d815
xorl %eax, %eax
callq 0x4350
testb %r15b, %r15b
movl $0x0, %eax
cmovlel %eax, %r15d
testb %bpl, %bpl
cmovlel %eax, %ebp
testb %r14b, %r14b
cmovgl %r14d, %eax
movl %eax, %r14d
movzbl %r15b, %r13d
xorpd %xmm4, %xmm4
movapd %xmm4, 0x10(%rsp)
movapd %xmm4, %xmm0
unpckhpd %xmm4, %xmm0            # xmm0 = xmm0[1],xmm4[1]
callq 0x67cb
movapd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
cmplesd %xmm1, %xmm0
andpd %xmm1, %xmm0
movzbl %bpl, %r15d
movzbl %r14b, %r14d
xorl %eax, %eax
cmpq %r13, %rax
je 0x279f6
cmpq $0x0, 0x10(%rbx)
je 0x27968
movq 0x58(%rbx), %rcx
movq 0xb8(%rbx), %rdx
movsd (%rdx,%rax,8), %xmm1
mulsd %xmm0, %xmm1
subsd (%rcx,%rax,8), %xmm1
movsd %xmm1, (%rdx,%rax,8)
cmpq $0x0, 0x18(%rbx)
je 0x279b5
xorl %ecx, %ecx
cmpq %r15, %rcx
je 0x279b5
xorl %edx, %edx
cmpq %rdx, %r13
je 0x279b0
movq 0x60(%rbx), %rsi
movq 0xc0(%rbx), %rdi
movq (%rsi,%rcx,8), %rsi
movq (%rsi,%rax,8), %rsi
movq (%rdi,%rcx,8), %rdi
movq (%rdi,%rax,8), %rdi
movsd (%rdi,%rdx,8), %xmm1
mulsd %xmm0, %xmm1
subsd (%rsi,%rdx,8), %xmm1
movsd %xmm1, (%rdi,%rdx,8)
incq %rdx
jmp 0x27978
incq %rcx
jmp 0x27971
cmpq $0x0, 0x20(%rbx)
je 0x279ee
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x279ee
movq 0x68(%rbx), %rdx
movq 0xc8(%rbx), %rsi
movq (%rdx,%rax,8), %rdx
movq (%rsi,%rax,8), %rsi
movsd (%rsi,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
subsd (%rdx,%rcx,8), %xmm1
movsd %xmm1, (%rsi,%rcx,8)
incq %rcx
jmp 0x279be
incq %rax
jmp 0x2793a
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x9d84
pushq $0x5
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x99dc
movq 0x8(%rsp), %rdi
movq 0x88(%rdi), %rax
movsd 0x968(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0xd0(%rbx), %esi
movq 0xd8(%rbx), %rdx
callq 0xe400
movsd %xmm0, 0x30(%rsp)
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x9b06
xorpd %xmm2, %xmm2
xorl %eax, %eax
cmpq %r13, %rax
je 0x27af4
cmpq $0x0, 0x10(%rbx)
je 0x27a78
movq 0x58(%rbx), %rcx
movq 0xb8(%rbx), %rdx
movsd (%rcx,%rax,8), %xmm2
mulsd (%rdx,%rax,8), %xmm2
cmpq $0x0, 0x18(%rbx)
je 0x27abc
xorl %ecx, %ecx
cmpq %r15, %rcx
je 0x27abc
xorl %edx, %edx
cmpq %rdx, %r13
je 0x27ab7
movq 0x60(%rbx), %rsi
movq 0xc0(%rbx), %rdi
movq (%rsi,%rcx,8), %rsi
movq (%rsi,%rax,8), %rsi
movsd (%rsi,%rdx,8), %xmm2
movq (%rdi,%rcx,8), %rsi
movq (%rsi,%rax,8), %rsi
mulsd (%rsi,%rdx,8), %xmm2
incq %rdx
jmp 0x27a88
incq %rcx
jmp 0x27a81
cmpq $0x0, 0x20(%rbx)
je 0x27aec
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x27aec
movq 0x68(%rbx), %rdx
movq 0xc8(%rbx), %rsi
movq (%rdx,%rax,8), %rdx
movsd (%rdx,%rcx,8), %xmm2
movq (%rsi,%rax,8), %rdx
mulsd (%rdx,%rcx,8), %xmm2
incq %rcx
jmp 0x27ac5
incq %rax
jmp 0x27a53
xorpd %xmm3, %xmm3
movsbl %r12b, %ebp
xorl %eax, %eax
movq %r14, 0x38(%rsp)
movsd 0x20(%rsp), %xmm1
movsd %xmm2, 0x28(%rsp)
testb $0x1, %al
jne 0x27e04
movq 0x8(%rsp), %rax
movq 0x88(%rax), %rax
ucomisd 0x970(%rax), %xmm1
jbe 0x27dea
xorl %eax, %eax
cmpq %r13, %rax
je 0x27c0b
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x27b66
movq 0x88(%rbx), %rdx
movq 0xb8(%rbx), %rsi
movsd (%rsi,%rax,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%rdx,%rax,8), %xmm0
movsd %xmm0, (%rcx,%rax,8)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x27bc1
xorl %edx, %edx
cmpq %r15, %rdx
je 0x27bc1
xorl %esi, %esi
cmpq %rsi, %r13
je 0x27bbc
movq 0x90(%rbx), %rdi
movq 0xc0(%rbx), %r8
movq (%rdi,%rdx,8), %rdi
movq (%rdi,%rax,8), %rdi
movq (%r8,%rdx,8), %r8
movq (%r8,%rax,8), %r8
movsd (%r8,%rsi,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%rdi,%rsi,8), %xmm0
movq (%rcx,%rdx,8), %rdi
movq (%rdi,%rax,8), %rdi
movsd %xmm0, (%rdi,%rsi,8)
incq %rsi
jmp 0x27b78
incq %rdx
jmp 0x27b71
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x27c03
xorl %edx, %edx
cmpq %rdx, %r14
je 0x27c03
movq 0x98(%rbx), %rsi
movq 0xc8(%rbx), %rdi
movq (%rsi,%rax,8), %rsi
movq (%rdi,%rax,8), %rdi
movsd (%rdi,%rdx,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%rsi,%rdx,8), %xmm0
movq (%rcx,%rax,8), %rsi
movsd %xmm0, (%rsi,%rdx,8)
incq %rdx
jmp 0x27bcc
incq %rax
jmp 0x27b33
movsd %xmm1, 0x20(%rsp)
movq 0x8(%rsp), %rdi
callq 0xe1de
movq 0x10(%rbx), %r12
testb %al, %al
je 0x27d10
testq %r12, %r12
je 0x27c58
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xe2a0
movq %rax, 0x10(%rsp)
movq %r14, %rdi
callq 0xe2d6
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x5d80
xorl %r14d, %r14d
cmpq %r13, %r14
je 0x27d67
cmpq $0x0, 0x18(%rbx)
je 0x27cc3
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x27cc3
movq 0x18(%rbx), %rax
movq 0x8(%rsp), %rdx
cmpb $0x0, 0x80(%rdx)
movq (%rax,%r12,8), %rax
movq 0x98(%rdx), %rcx
movl $0x0, %r8d
cmoveq %r8, %rcx
movq (%rax,%r14,8), %rdi
movq (%rcx,%r12,8), %rax
movq (%rax,%r14,8), %rsi
movq 0xa0(%rdx), %rax
cmoveq %r8, %rax
movq (%rax,%r12,8), %rax
movq (%rax,%r14,8), %rdx
movl %ebp, %ecx
callq 0x5d80
incq %r12
jmp 0x27c6e
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x27d08
movq (%rax,%r14,8), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xe2c4
movq (%rax,%r14,8), %rax
movq %rax, 0x40(%rsp)
movq %r12, %rdi
callq 0xe2fa
movq (%rax,%r14,8), %rdx
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rsi
movl %ebp, %ecx
callq 0x5d80
incq %r14
jmp 0x27c5b
testq %r12, %r12
je 0x27d1f
movq %r12, %rdi
movl %ebp, %esi
callq 0x5600
xorl %r14d, %r14d
cmpq %r13, %r14
je 0x27d67
cmpq $0x0, 0x18(%rbx)
je 0x27d4e
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x27d4e
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
movq (%rax,%r14,8), %rdi
movl %ebp, %esi
callq 0x5600
incq %r12
jmp 0x27d31
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x27d62
movq (%rax,%r14,8), %rdi
movl %ebp, %esi
callq 0x5600
incq %r14
jmp 0x27d22
movl 0xd0(%rbx), %esi
movq 0xd8(%rbx), %rdx
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x25848
movl 0xd0(%rbx), %esi
movq 0xd8(%rbx), %rdx
movq %r14, %rdi
callq 0xe400
movapd %xmm0, %xmm3
movq 0x88(%r14), %rcx
movsd 0x950(%rcx), %xmm0
movsd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x28(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd 0x30(%rsp), %xmm0
ucomisd %xmm3, %xmm0
setae %al
movsd 0x4b1e(%rip), %xmm0     # 0x2c8f0
jae 0x27ddc
movsd 0x960(%rcx), %xmm0
divsd %xmm0, %xmm1
movq 0x38(%rsp), %r14
jmp 0x27b0f
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
movsd %xmm3, 0x10(%rsp)
callq 0x9b06
movsd 0x10(%rsp), %xmm3
movsd %xmm3, 0x10(%rsp)
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x9a8c
movsd 0x10(%rsp), %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq