// File: /workspace/github_cpp_makefile_star2_O3/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::doConjugateLinearStepBig(FitBit**, int)
NUMBER HMMProblem::doConjugateLinearStepBig(FitBit **fbs, NCAT nfbs) {
	NPAR i=0, j=0, m=0;
    NPAR nS = this->p->nS, nO = this->p->nO;
    NCAT q=0;
    
    // compute beta_gradient_direction
    NUMBER beta_grad = 0, beta_grad_num = 0, beta_grad_den = 0;

    for(q=0;q<nfbs;q++) {
	// first scale down gradients
        fbs[q]->doLog10ScaleGentleByRow(FBS_GRAD);
    
        
        switch (this->p->solver_setting) {
            case 1: // Fletcher-Reeves
                for(i=0; i<nS; i++)
                {
                    if(fbs[q]->pi != NULL) {
                        beta_grad_num += fbs[q]->gradPI  [i]*fbs[q]->gradPI  [i];
                        beta_grad_den += fbs[q]->gradPIm1[i]*fbs[q]->gradPIm1[i];
                    }
                    if(fbs[q]->A  != NULL)
                        for(j=0; j<nS; j++) {
                            beta_grad_num += fbs[q]->gradA  [i][j]*fbs[q]->gradA  [i][j];
                            beta_grad_den += fbs[q]->gradAm1[i][j]*fbs[q]->gradAm1[i][j];
                        }
                    if(fbs[q]->B  != NULL)
                        for(m=0; m<nO; m++) {
                            beta_grad_num += fbs[q]->gradB  [i][m]*fbs[q]->gradB  [i][m];
                            beta_grad_den += fbs[q]->gradBm1[i][m]*fbs[q]->gradBm1[i][m];
                        }
                }
                break;
            case 2: // Polak–Ribiere
                for(i=0; i<nS; i++)
                {
                    if(fbs[q]->pi != NULL) {
                        beta_grad_num += -fbs[q]->gradPI[i]*(-fbs[q]->gradPI[i] + fbs[q]->gradPIm1[i]);
                        beta_grad_den +=  fbs[q]->gradPIm1[i]*fbs[q]->gradPIm1[i];
                    }
                    if(fbs[q]->A != NULL)
                        for(j=0; j<nS; j++) {
                            beta_grad_num += -fbs[q]->gradA[i][j]*(-fbs[q]->gradA[i][j] + fbs[q]->gradAm1[i][j]);
                            beta_grad_den +=  fbs[q]->gradAm1[i][j]*fbs[q]->gradAm1[i][j];
                        }
                    if(fbs[q]->B  != NULL)
                        for(m=0; m<nO; m++) {
                            beta_grad_num += -fbs[q]->gradB[i][j]*(-fbs[q]->gradB[i][j] + fbs[q]->gradBm1[i][j]);
                            beta_grad_den +=  fbs[q]->gradBm1[i][m]*fbs[q]->gradBm1[i][m];
                        }
                }
                break;
            case 3: // Hestenes-Stiefel
                for(i=0; i<nS; i++)
                {
                    if(fbs[q]->pi != NULL) {
                        beta_grad_num += -fbs[q]->gradPI[i]*( -fbs[q]->gradPI[i] + fbs[q]->gradPIm1[i]);
                        beta_grad_den +=  fbs[q]->dirPIm1[i]*(-fbs[q]->gradPI[i] + fbs[q]->gradPIm1[i]);
                    }
                    if(fbs[q]->A  != NULL)
                        for(j=0; j<nS; j++) {
                            beta_grad_num += -fbs[q]->gradA[i][j]*( -fbs[q]->gradA[i][j] + fbs[q]->gradAm1[i][j]);
                            beta_grad_den +=  fbs[q]->dirAm1[i][j]*(-fbs[q]->gradA[i][j] + fbs[q]->gradAm1[i][j]);
                        }
                    if(fbs[q]->B  != NULL)
                        for(m=0; m<nO; m++) {
                            beta_grad_num += -fbs[q]->gradB[i][j]*( -fbs[q]->gradB[i][j] + fbs[q]->gradBm1[i][j]);
                            beta_grad_den +=  fbs[q]->dirBm1[i][m]*(-fbs[q]->gradB[i][j] + fbs[q]->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(fbs[q]->pi != NULL) fbs[q]->dirPIm1[i] = -fbs[q]->gradPI[i] + beta_grad * fbs[q]->dirPIm1[i];
            if(fbs[q]->A  != NULL) for(j=0; j<nS; j++) fbs[q]->dirAm1[i][j] = -fbs[q]->gradA[i][j] + beta_grad * fbs[q]->dirAm1[i][j];
            if(fbs[q]->B  != NULL) for(m=0; m<nO; m++) fbs[q]->dirBm1[i][m] = -fbs[q]->gradB[i][m] + beta_grad * fbs[q]->dirBm1[i][m];
        }
        // scale down direction
        fbs[q]->doLog10ScaleGentleByRow(FBS_DIRm1);
        
        fbs[q]->init(FBS_PARcopy);
    }// all fbs
        
	NUMBER e = this->p->ArmijoSeed; // step seed
	bool compliesArmijo = false;
	NUMBER f_xk = HMMProblem::getSumLogPOPara(this->p->nSeq, this->p->k_data);
	NUMBER f_xkplus1 = 0;
	
	NUMBER p_k_by_neg_p_k = 0;
    for(q=0;q<nfbs;q++) {
        fbs[q]->copy(FBS_PAR, FBS_PARcopy);
        // compute p_k * -p_k >>>> now current gradient by current direction
        for(i=0; i<nS; i++)
        {
            if(fbs[q]->pi != NULL) p_k_by_neg_p_k = fbs[q]->gradPI[i]*fbs[q]->dirPIm1[i];
            if(fbs[q]->A  != NULL) for(j=0; j<nS; j++) p_k_by_neg_p_k = fbs[q]->gradA[i][j]*fbs[q]->dirAm1[i][j];
            if(fbs[q]->B  != NULL) for(m=0; m<nO; m++) p_k_by_neg_p_k = fbs[q]->gradB[i][m]*fbs[q]->dirBm1[i][m];
        }
    }
    
	int iter = 0; // limit iter steps to 20, actually now 10, via ArmijoMinStep
	while( !compliesArmijo && e > this->p->ArmijoMinStep) {
        for(q=0;q<nfbs;q++) {
            // update
            for(i=0; i<nS; i++) {
                if(fbs[q]->pi != NULL) fbs[q]->pi[i] = fbs[q]->PIcopy[i] + e * fbs[q]->dirPIm1[i];
                if(fbs[q]->A  != NULL)
                    for(j=0; j<nS; j++)
                        fbs[q]->A[i][j] = fbs[q]->Acopy[i][j] + e * fbs[q]->dirAm1[i][j];
                if(fbs[q]->B  != NULL)
                    for(m=0; m<nO; m++)
                        fbs[q]->B[i][m] = fbs[q]->Bcopy[i][m] + e * fbs[q]->dirBm1[i][m];
            }
            // scale
            if( !this->hasNon01Constraints() || fbs[q]->observe_non01_boundaries==0 ) {
                if(fbs[q]->pi != NULL) projectsimplex(fbs[q]->pi, nS);
                for(i=0; i<nS; i++) {
                    if(fbs[q]->A != NULL) projectsimplex(fbs[q]->A[i], nS);
                    if(fbs[q]->B != NULL) projectsimplex(fbs[q]->B[i], nO);
                }
            } else {
                if(fbs[q]->pi != NULL) projectsimplexbounded(fbs[q]->pi, this->getLbPI(), this->getUbPI(), nS);
                for(i=0; i<nS; i++) {
                    if(fbs[q]->A != NULL) projectsimplexbounded(fbs[q]->A[i], this->getLbA()[i], this->getUbA()[i], nS);
                    if(fbs[q]->B != NULL) projectsimplexbounded(fbs[q]->B[i], this->getLbB()[i], this->getUbB()[i], nO);
                }
            }
        }
		// recompute alpha and p(O|param)
		computeAlphaAndPOParam(this->p->nSeq, this->p->k_data);
		// compute f(x_{k+1})
		f_xkplus1 = HMMProblem::getSumLogPOPara(this->p->nSeq, this->p->k_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;
        for(q=0;q<nfbs;q++) fbs[q]->copy(FBS_PARcopy, FBS_PAR);
    }
    //    RecycleFitData(xndat, x_data, this->p);
    return f_xkplus1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, 0x18(%rsp)
movq 0x88(%rdi), %rax
movb 0x8b8(%rax), %r14b
movzbl %r14b, %ebp
movzbl 0x8b9(%rax), %r12d
movl %edx, %ecx
movq %rcx, 0x40(%rsp)
movl %edx, 0x24(%rsp)
testl %edx, %edx
jle 0x16e55
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
xorl %r15d, %r15d
xorl %r13d, %r13d
movq (%rbx,%r15,8), %rdi
movl $0x3, %esi
callq 0xb70e
movq 0x18(%rsp), %rax
movq 0x88(%rax), %rax
movzbl 0x40(%rax), %eax
cmpl $0x1, %eax
je 0x16b1f
cmpl $0x2, %eax
je 0x16bee
cmpl $0x3, %eax
movapd (%rsp), %xmm5
movapd 0x1cf4c(%rip), %xmm3    # 0x33940
jne 0x16d0c
testb %r14b, %r14b
jle 0x16d2c
testb %r12b, %r12b
setle %dil
movq (%rbx,%r15,8), %rax
movq 0x10(%rax), %rcx
cmpq $0x0, 0x20(%rax)
movq 0x18(%rax), %rdx
sete %sil
orb %dil, %sil
xorl %edi, %edi
testq %rcx, %rcx
je 0x16a5e
movq 0x58(%rax), %r8
movq 0x70(%rax), %r9
movsd (%r8,%rdi,8), %xmm0
movsd (%r9,%rdi,8), %xmm1
subsd %xmm0, %xmm1
xorpd %xmm3, %xmm0
movq 0xd0(%rax), %r8
movhpd (%r8,%rdi,8), %xmm0     # xmm0 = xmm0[0],mem[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
addpd %xmm1, %xmm5
testq %rdx, %rdx
je 0x16ab2
movq 0x60(%rax), %r8
movq 0x78(%rax), %r9
movq (%r8,%rdi,8), %r8
movq (%r9,%rdi,8), %r9
movq 0xd8(%rax), %r10
movq (%r10,%rdi,8), %r10
xorl %r11d, %r11d
movsd (%r8,%r11,8), %xmm0
movsd (%r9,%r11,8), %xmm1
subsd %xmm0, %xmm1
xorpd %xmm3, %xmm0
movhpd (%r10,%r11,8), %xmm0    # xmm0 = xmm0[0],mem[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
addpd %xmm1, %xmm5
incq %r11
cmpq %r11, %rbp
jne 0x16a81
movl %r14d, %r13d
testb %sil, %sil
jne 0x16b0e
movq 0x68(%rax), %r8
movq 0x80(%rax), %r9
movq (%r8,%rdi,8), %r8
movsbq %r13b, %r10
movsd (%r8,%r10,8), %xmm0
movq (%r9,%rdi,8), %r8
movsd (%r8,%r10,8), %xmm1
subsd %xmm0, %xmm1
xorpd %xmm3, %xmm0
movq 0xe0(%rax), %r8
movq (%r8,%rdi,8), %r8
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
xorl %r9d, %r9d
movapd %xmm0, %xmm2
movhpd (%r8,%r9,8), %xmm2      # xmm2 = xmm2[0],mem[0]
mulpd %xmm1, %xmm2
addpd %xmm2, %xmm5
incq %r9
cmpq %r9, %r12
jne 0x16af4
incq %rdi
cmpq %rbp, %rdi
jne 0x16a24
jmp 0x16d2c
testb %r14b, %r14b
jle 0x16d27
testb %r12b, %r12b
setle %dil
movq (%rbx,%r15,8), %rax
movq 0x10(%rax), %rcx
cmpq $0x0, 0x20(%rax)
movq 0x18(%rax), %rdx
sete %sil
orb %dil, %sil
xorl %edi, %edi
movapd (%rsp), %xmm5
testq %rcx, %rcx
je 0x16b6f
movq 0x58(%rax), %r8
movq 0x70(%rax), %r9
movsd (%r8,%rdi,8), %xmm0
movhpd (%r9,%rdi,8), %xmm0     # xmm0 = xmm0[0],mem[0]
mulpd %xmm0, %xmm0
addpd %xmm0, %xmm5
testq %rdx, %rdx
je 0x16ba6
movq 0x60(%rax), %r8
movq 0x78(%rax), %r9
movq (%r8,%rdi,8), %r8
movq (%r9,%rdi,8), %r9
xorl %r10d, %r10d
movsd (%r8,%r10,8), %xmm0
movhpd (%r9,%r10,8), %xmm0     # xmm0 = xmm0[0],mem[0]
mulpd %xmm0, %xmm0
addpd %xmm0, %xmm5
incq %r10
cmpq %r10, %rbp
jne 0x16b87
movl %r14d, %r13d
testb %sil, %sil
jne 0x16bdd
movq 0x68(%rax), %r8
movq 0x80(%rax), %r9
movq (%r8,%rdi,8), %r8
movq (%r9,%rdi,8), %r9
xorl %r10d, %r10d
movsd (%r8,%r10,8), %xmm0
movhpd (%r9,%r10,8), %xmm0     # xmm0 = xmm0[0],mem[0]
mulpd %xmm0, %xmm0
addpd %xmm0, %xmm5
incq %r10
cmpq %r10, %r12
jne 0x16bc1
incq %rdi
cmpq %rbp, %rdi
jne 0x16b4e
jmp 0x16d2c
testb %r14b, %r14b
movapd (%rsp), %xmm5
movapd 0x1cd42(%rip), %xmm6    # 0x33940
jle 0x16d2c
testb %r12b, %r12b
setle %dil
movq (%rbx,%r15,8), %rax
movq 0x10(%rax), %rcx
cmpq $0x0, 0x20(%rax)
movq 0x18(%rax), %rdx
sete %sil
orb %dil, %sil
xorl %edi, %edi
testq %rcx, %rcx
je 0x16c5a
movq 0x58(%rax), %r8
movq 0x70(%rax), %r9
movsd (%r8,%rdi,8), %xmm0
movsd (%r9,%rdi,8), %xmm1
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
xorpd %xmm6, %xmm0
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
mulpd %xmm0, %xmm2
addpd %xmm2, %xmm5
testq %rdx, %rdx
je 0x16ca5
movq 0x60(%rax), %r8
movq 0x78(%rax), %r9
movq (%r8,%rdi,8), %r8
movq (%r9,%rdi,8), %r9
xorl %r10d, %r10d
movsd (%r8,%r10,8), %xmm0
movsd (%r9,%r10,8), %xmm1
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
xorpd %xmm6, %xmm0
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
mulpd %xmm0, %xmm2
addpd %xmm2, %xmm5
incq %r10
cmpq %r10, %rbp
jne 0x16c72
movl %r14d, %r13d
testb %sil, %sil
jne 0x16cfe
movq 0x68(%rax), %r8
movq 0x80(%rax), %r9
movq (%r8,%rdi,8), %r8
movsbq %r13b, %r10
movsd (%r8,%r10,8), %xmm0
movq (%r9,%rdi,8), %r8
movsd (%r8,%r10,8), %xmm1
subsd %xmm0, %xmm1
xorpd %xmm6, %xmm0
xorl %r9d, %r9d
movsd (%r8,%r9,8), %xmm2
movapd %xmm0, %xmm3
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
movapd %xmm1, %xmm4
unpcklpd %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0]
mulpd %xmm3, %xmm4
addpd %xmm4, %xmm5
incq %r9
cmpq %r9, %r12
jne 0x16cd8
incq %rdi
cmpq %rbp, %rdi
jne 0x16c25
jmp 0x16d2c
movsbl %al, %edx
movq 0x282c2(%rip), %rax     # 0x3efd8
movq (%rax), %rdi
leaq 0x1daf5(%rip), %rsi     # 0x34815
xorl %eax, %eax
callq 0x4330
movapd (%rsp), %xmm5
movapd %xmm5, (%rsp)
movapd %xmm5, %xmm0
unpckhpd %xmm5, %xmm0            # xmm0 = xmm0[1],xmm5[1]
callq 0x8df8
movq (%rbx,%r15,8), %rdi
testb %r14b, %r14b
jle 0x16e23
movapd (%rsp), %xmm1
divsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
cmplesd %xmm1, %xmm0
andpd %xmm1, %xmm0
testb %r12b, %r12b
setle %sil
movq 0x10(%rdi), %rax
cmpq $0x0, 0x20(%rdi)
movq 0x18(%rdi), %rcx
sete %dl
orb %sil, %dl
xorl %esi, %esi
testq %rax, %rax
je 0x16da3
movq 0x58(%rdi), %r8
movq 0xd0(%rdi), %r9
movsd (%r9,%rsi,8), %xmm1
mulsd %xmm0, %xmm1
subsd (%r8,%rsi,8), %xmm1
movsd %xmm1, (%r9,%rsi,8)
testq %rcx, %rcx
je 0x16ddf
movq 0x60(%rdi), %r8
movq 0xd8(%rdi), %r9
movq (%r8,%rsi,8), %r8
movq (%r9,%rsi,8), %r9
xorl %r10d, %r10d
movsd (%r9,%r10,8), %xmm1
mulsd %xmm0, %xmm1
subsd (%r8,%r10,8), %xmm1
movsd %xmm1, (%r9,%r10,8)
incq %r10
cmpq %r10, %rbp
jne 0x16dbe
movl %r14d, %r13d
testb %dl, %dl
jne 0x16e17
movq 0x68(%rdi), %r8
movq 0xe0(%rdi), %r9
movq (%r8,%rsi,8), %r8
movq (%r9,%rsi,8), %r9
xorl %r10d, %r10d
movsd (%r9,%r10,8), %xmm1
mulsd %xmm0, %xmm1
subsd (%r8,%r10,8), %xmm1
movsd %xmm1, (%r9,%r10,8)
incq %r10
cmpq %r10, %r12
jne 0x16df9
incq %rsi
cmpq %rbp, %rsi
jne 0x16d7d
movl $0x6, %esi
callq 0xb70e
movq (%rbx,%r15,8), %rdi
movl $0x5, %esi
callq 0xaf10
incq %r15
cmpq 0x40(%rsp), %r15
jne 0x169b4
movq 0x18(%rsp), %rax
movq 0x88(%rax), %rax
movslq 0x8dc(%rax), %rcx
xorpd %xmm2, %xmm2
xorpd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
testq %rcx, %rcx
jle 0x16ea9
movq 0x8f0(%rax), %rdx
movsd %xmm0, 0x38(%rsp)
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
cmpl $0x0, 0x4(%rdi)
xorpd %xmm0, %xmm0
jne 0x16e91
movsd 0x50(%rdi), %xmm0
movsd 0x38(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsp)
incq %rsi
cmpq %rsi, %rcx
jne 0x16e7e
movsd 0x968(%rax), %xmm0
movsd %xmm0, (%rsp)
cmpl $0x0, 0x24(%rsp)
movq %r14, 0x30(%rsp)
jle 0x16fbf
leal -0x1(%r14), %eax
leal -0x1(%r12), %ecx
movzbl %al, %r14d
movzbl %cl, %r15d
xorpd %xmm2, %xmm2
xorl %r13d, %r13d
shll $0x3, %r15d
shll $0x3, %r14d
movsd %xmm2, 0x28(%rsp)
movq (%rbx,%r13,8), %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0xb03a
cmpb $0x0, 0x30(%rsp)
jle 0x16f9f
testb %r12b, %r12b
setle %dil
movq (%rbx,%r13,8), %rax
movq 0x10(%rax), %rcx
cmpq $0x0, 0x20(%rax)
movq 0x18(%rax), %rdx
sete %sil
orb %dil, %sil
xorl %edi, %edi
movsd 0x28(%rsp), %xmm2
testq %rcx, %rcx
je 0x16f4d
movq 0x58(%rax), %r8
movq 0xd0(%rax), %r9
movsd (%r8,%rdi,8), %xmm2
mulsd (%r9,%rdi,8), %xmm2
testq %rdx, %rdx
je 0x16f71
movq 0x60(%rax), %r8
movq 0xd8(%rax), %r9
movq (%r8,%rdi,8), %r8
movsd (%r8,%r14), %xmm2
movq (%r9,%rdi,8), %r8
mulsd (%r8,%r14), %xmm2
testb %sil, %sil
jne 0x16f95
movq 0x68(%rax), %r8
movq 0xe0(%rax), %r9
movq (%r8,%rdi,8), %r8
movsd (%r8,%r15), %xmm2
movq (%r9,%rdi,8), %r8
mulsd (%r8,%r15), %xmm2
incq %rdi
cmpq %rdi, %rbp
jne 0x16f31
jmp 0x16fa5
movsd 0x28(%rsp), %xmm2
incq %r13
cmpq 0x40(%rsp), %r13
jne 0x16ee6
movq 0x18(%rsp), %rax
movq 0x88(%rax), %rax
xorpd %xmm3, %xmm3
movsd (%rsp), %xmm0
ucomisd 0x970(%rax), %xmm0
jbe 0x172f0
movsd %xmm2, 0x28(%rsp)
cmpl $0x0, 0x24(%rsp)
jle 0x17249
xorl %r14d, %r14d
movsd (%rsp), %xmm1
cmpb $0x0, 0x30(%rsp)
jle 0x170d3
testb %r12b, %r12b
setle %r8b
movq (%rbx,%r14,8), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rsi
testq %rsi, %rsi
sete %dil
orb %r8b, %dil
xorl %r8d, %r8d
testq %rcx, %rcx
je 0x17047
movq 0xa0(%rax), %r9
movq 0xd0(%rax), %r10
movsd (%r10,%r8,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%r9,%r8,8), %xmm0
movsd %xmm0, (%rcx,%r8,8)
testq %rdx, %rdx
je 0x17087
movq 0xa8(%rax), %r9
movq 0xd8(%rax), %r10
movq (%r9,%r8,8), %r9
movq (%r10,%r8,8), %r10
movq (%rdx,%r8,8), %r11
xorl %r15d, %r15d
movsd (%r10,%r15,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%r9,%r15,8), %xmm0
movsd %xmm0, (%r11,%r15,8)
incq %r15
cmpq %r15, %rbp
jne 0x17069
testb %dil, %dil
jne 0x170c7
movq 0xb0(%rax), %r9
movq 0xe0(%rax), %r10
movq (%r9,%r8,8), %r9
movq (%r10,%r8,8), %r10
movq (%rsi,%r8,8), %r11
xorl %r15d, %r15d
movsd (%r10,%r15,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%r9,%r15,8), %xmm0
movsd %xmm0, (%r11,%r15,8)
incq %r15
cmpq %r15, %r12
jne 0x170a9
incq %r8
cmpq %rbp, %r8
jne 0x1701e
movq (%rbx,%r14,8), %rax
movq 0x18(%rsp), %rcx
cmpb $0x1, 0x80(%rcx)
movsbl 0x30(%rsp), %r15d
jne 0x171ca
cmpb $0x0, 0xf9(%rax)
je 0x171ca
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x1711f
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rsi
movq 0x68(%rax), %rdx
movl %r15d, %ecx
callq 0x7997
movsd (%rsp), %xmm1
cmpb $0x0, 0x30(%rsp)
jle 0x1722f
xorl %r13d, %r13d
movq (%rbx,%r14,8), %rax
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x17178
movq (%rcx,%r13,8), %rdi
movq 0x18(%rsp), %rcx
cmpb $0x0, 0x80(%rcx)
movq 0x58(%rcx), %rax
movl $0x0, %edx
cmoveq %rdx, %rax
movq (%rax,%r13,8), %rsi
movq 0x70(%rcx), %rax
cmoveq %rdx, %rax
movq (%rax,%r13,8), %rdx
movl %r15d, %ecx
callq 0x7997
movsd (%rsp), %xmm1
movq (%rbx,%r14,8), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x171bc
movq (%rax,%r13,8), %rdi
movq 0x18(%rsp), %rcx
cmpb $0x0, 0x80(%rcx)
movq 0x60(%rcx), %rax
movl $0x0, %edx
cmoveq %rdx, %rax
movq (%rax,%r13,8), %rsi
movq 0x78(%rcx), %rax
cmoveq %rdx, %rax
movq (%rax,%r13,8), %rdx
movsbl %r12b, %ecx
callq 0x7997
movsd (%rsp), %xmm1
incq %r13
cmpq %r13, %rbp
jne 0x1712d
jmp 0x1722f
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x171e0
movl %r15d, %esi
callq 0x6836
movsd (%rsp), %xmm1
cmpb $0x0, 0x30(%rsp)
jle 0x1722f
xorl %r13d, %r13d
movq (%rbx,%r14,8), %rax
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x1720c
movq (%rcx,%r13,8), %rdi
movl %r15d, %esi
callq 0x6836
movsd (%rsp), %xmm1
movq (%rbx,%r14,8), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x17227
movq (%rax,%r13,8), %rdi
movsbl %r12b, %esi
callq 0x6836
movsd (%rsp), %xmm1
incq %r13
cmpq %r13, %rbp
jne 0x171ea
incq %r14
cmpq 0x40(%rsp), %r14
jne 0x16fef
movq 0x18(%rsp), %rax
movq 0x88(%rax), %rax
movl 0x8dc(%rax), %esi
movq 0x8f0(%rax), %rdx
movq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x11908
movq 0x88(%r14), %rax
movslq 0x8dc(%rax), %rcx
testq %rcx, %rcx
jle 0x172aa
movq 0x8f0(%rax), %rdx
xorpd %xmm3, %xmm3
xorl %esi, %esi
movsd 0x28(%rsp), %xmm2
movq (%rdx,%rsi,8), %rdi
cmpl $0x0, 0x4(%rdi)
xorpd %xmm0, %xmm0
jne 0x1729c
movsd 0x50(%rdi), %xmm0
addsd %xmm0, %xmm3
incq %rsi
cmpq %rsi, %rcx
jne 0x17289
jmp 0x172b4
xorpd %xmm3, %xmm3
movsd 0x28(%rsp), %xmm2
movsd 0x950(%rax), %xmm0
movsd (%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
addsd 0x38(%rsp), %xmm0
ucomisd %xmm3, %xmm0
jae 0x17324
divsd 0x960(%rax), %xmm1
movsd %xmm1, (%rsp)
ucomisd 0x970(%rax), %xmm1
ja 0x16fdc
cmpl $0x0, 0x24(%rsp)
jle 0x17324
movsd %xmm3, (%rsp)
xorl %r14d, %r14d
movq 0x40(%rsp), %r15
movq (%rbx,%r14,8), %rdi
movl $0x5, %esi
movl $0x1, %edx
callq 0xb03a
incq %r14
cmpq %r14, %r15
jne 0x17304
movsd (%rsp), %xmm3
movapd %xmm3, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop