// File: 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
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movb $0x0, -0x15(%rbp)
movb $0x0, -0x16(%rbp)
movb $0x0, -0x17(%rbp)
movq 0x88(%rax), %rcx
movb 0x8b8(%rcx), %cl
movb %cl, -0x18(%rbp)
movq 0x88(%rax), %rax
movb 0x8b9(%rax), %al
movb %al, -0x19(%rbp)
movl $0x0, -0x20(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x239a0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x3, %esi
callq 0xef90
movq -0x70(%rbp), %rax
movq 0x88(%rax), %rax
movsbl 0x40(%rax), %eax
movl %eax, -0x74(%rbp)
subl $0x1, %eax
je 0x22c2a
jmp 0x22c0b
movl -0x74(%rbp), %eax
subl $0x2, %eax
je 0x22ecf
jmp 0x22c19
movl -0x74(%rbp), %eax
subl $0x3, %eax
je 0x23261
jmp 0x2369b
movb $0x0, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x22eca
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x10(%rax)
je 0x22ce1
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x70(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x70(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x18(%rax)
je 0x22dcb
movb $0x0, -0x16(%rbp)
movsbl -0x16(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x22dc9
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x60(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x60(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movb -0x16(%rbp), %al
addb $0x1, %al
movb %al, -0x16(%rbp)
jmp 0x22cfc
jmp 0x22dcb
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x20(%rax)
je 0x22ebb
movb $0x0, -0x17(%rbp)
movsbl -0x17(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jge 0x22eb9
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movb -0x17(%rbp), %al
addb $0x1, %al
movb %al, -0x17(%rbp)
jmp 0x22de6
jmp 0x22ebb
jmp 0x22ebd
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x22c2e
jmp 0x236c2
movb $0x0, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2325c
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x10(%rax)
je 0x22fce
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x70(%rax), %rax
movsbq -0x15(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x70(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x70(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x18(%rax)
je 0x23109
movb $0x0, -0x16(%rbp)
movsbl -0x16(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23107
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x60(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x60(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movb -0x16(%rbp), %al
addb $0x1, %al
movb %al, -0x16(%rbp)
jmp 0x22fe9
jmp 0x23109
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x20(%rax)
je 0x2324d
movb $0x0, -0x17(%rbp)
movsbl -0x17(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2324b
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movb -0x17(%rbp), %al
addb $0x1, %al
movb %al, -0x17(%rbp)
jmp 0x23124
jmp 0x2324d
jmp 0x2324f
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x22ed3
jmp 0x236c2
movb $0x0, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23699
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x10(%rax)
je 0x23394
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x70(%rax), %rax
movsbq -0x15(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x70(%rax), %rax
movsbq -0x15(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x18(%rax)
je 0x2350c
movb $0x0, -0x16(%rbp)
movsbl -0x16(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2350a
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x60(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x60(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd8(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x60(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movb -0x16(%rbp), %al
addb $0x1, %al
movb %al, -0x16(%rbp)
jmp 0x233af
jmp 0x2350c
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x20(%rax)
je 0x2368a
movb $0x0, -0x17(%rbp)
movsbl -0x17(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23688
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xe0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movb -0x17(%rbp), %al
addb $0x1, %al
movb %al, -0x17(%rbp)
jmp 0x23527
jmp 0x2368a
jmp 0x2368c
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x23265
jmp 0x236c2
movq -0x70(%rbp), %rax
movq 0x37932(%rip), %rcx     # 0x5afd8
movq (%rcx), %rdi
movq 0x88(%rax), %rax
movsbl 0x40(%rax), %edx
leaq 0x2d19e(%rip), %rsi     # 0x50859
movb $0x0, %al
callq 0x5440
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x38(%rbp), %xmm0
callq 0x9a40
movaps %xmm0, %xmm1
movsd -0x80(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x23704
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
jmp 0x23711
xorps %xmm0, %xmm0
movsd %xmm0, -0x88(%rbp)
jmp 0x23711
movsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movb $0x0, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23966
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x10(%rax)
je 0x237bd
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd -0x28(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x18(%rax)
je 0x2388a
movb $0x0, -0x16(%rbp)
movsbl -0x16(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23888
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x60(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd -0x28(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd8(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd8(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movb -0x16(%rbp), %al
addb $0x1, %al
movb %al, -0x16(%rbp)
jmp 0x237d8
jmp 0x2388a
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x20(%rax)
je 0x23957
movb $0x0, -0x17(%rbp)
movsbl -0x17(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23955
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd -0x28(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xe0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xe0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movb -0x17(%rbp), %al
addb $0x1, %al
movb %al, -0x17(%rbp)
jmp 0x238a5
jmp 0x23957
jmp 0x23959
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x23722
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x6, %esi
callq 0xef90
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x5, %esi
callq 0xdcb0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x22bd0
movq -0x70(%rbp), %rdi
movq 0x88(%rdi), %rax
movsd 0x968(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movb $0x0, -0x41(%rbp)
movq 0x88(%rdi), %rax
movl 0x8dc(%rax), %esi
movq 0x88(%rdi), %rax
movq 0x8f0(%rax), %rdx
callq 0x1a9f0
movsd %xmm0, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x23b9b
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0xe4d0
movb $0x0, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23b8b
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x10(%rax)
je 0x23a82
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x58(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd0(%rax), %rax
movsbq -0x15(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x18(%rax)
je 0x23aff
movb $0x0, -0x16(%rbp)
movsbl -0x16(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23afd
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x60(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd8(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
movb -0x16(%rbp), %al
addb $0x1, %al
movb %al, -0x16(%rbp)
jmp 0x23a99
jmp 0x23aff
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x20(%rax)
je 0x23b7c
movb $0x0, -0x17(%rbp)
movsbl -0x17(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23b7a
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xe0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
movb -0x17(%rbp), %al
addb $0x1, %al
movb %al, -0x17(%rbp)
jmp 0x23b16
jmp 0x23b7c
jmp 0x23b7e
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x23a23
jmp 0x23b8d
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x239f8
movl $0x0, -0x64(%rbp)
xorl %eax, %eax
testb $0x1, -0x41(%rbp)
movb %al, -0x89(%rbp)
jne 0x23bd1
movq -0x70(%rbp), %rax
movsd -0x40(%rbp), %xmm0
movq 0x88(%rax), %rax
ucomisd 0x970(%rax), %xmm0
seta %al
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x23be0
jmp 0x24136
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x24057
movb $0x0, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23df6
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x10(%rax)
je 0x23c7b
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xa0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd -0x40(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movsbq -0x15(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x18(%rax)
je 0x23d31
movb $0x0, -0x16(%rbp)
movsbl -0x16(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23d2f
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xa8(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd -0x40(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd8(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x16(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movb -0x16(%rbp), %al
addb $0x1, %al
movb %al, -0x16(%rbp)
jmp 0x23c96
jmp 0x23d31
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x20(%rax)
je 0x23de7
movb $0x0, -0x17(%rbp)
movsbl -0x17(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23de5
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xb0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd -0x40(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xe0(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x17(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movb -0x17(%rbp), %al
addb $0x1, %al
movb %al, -0x17(%rbp)
jmp 0x23d4c
jmp 0x23de7
jmp 0x23de9
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x23bf7
movq -0x70(%rbp), %rdi
callq 0x1a4e0
testb $0x1, %al
jne 0x23e05
jmp 0x23e21
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0xf9(%rax), %eax
cmpl $0x0, %eax
jne 0x23edb
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x10(%rax)
je 0x23e4d
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rdi
movsbl -0x18(%rbp), %esi
callq 0x7980
movb $0x0, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23ed6
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x18(%rax)
je 0x23e92
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movsbl -0x18(%rbp), %esi
callq 0x7980
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x20(%rax)
je 0x23ec7
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movsbl -0x19(%rbp), %esi
callq 0x7980
jmp 0x23ec9
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x23e51
jmp 0x24047
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x10(%rax)
je 0x23f38
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movq %rax, -0xa0(%rbp)
callq 0x1a6b0
movq -0x70(%rbp), %rdi
movq %rax, -0x98(%rbp)
callq 0x1a770
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq %rax, %rdx
movsbl -0x18(%rbp), %ecx
callq 0x87e0
movb $0x0, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
movsbl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x24045
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x18(%rax)
je 0x23fc1
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xb0(%rbp)
callq 0x1a6f0
movq -0x70(%rbp), %rdi
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa8(%rbp)
callq 0x1a7b0
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movsbl -0x18(%rbp), %ecx
callq 0x87e0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x20(%rax)
je 0x24036
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20(%rax), %rax
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xc0(%rbp)
callq 0x1a730
movq -0x70(%rbp), %rdi
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xb8(%rbp)
callq 0x1a7f0
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movsbq -0x15(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movsbl -0x19(%rbp), %ecx
callq 0x87e0
jmp 0x24038
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x23f3c
jmp 0x24047
jmp 0x24049
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x23be7
movq -0x70(%rbp), %rdi
movq 0x88(%rdi), %rax
movl 0x8dc(%rax), %esi
movq 0x88(%rdi), %rax
movq 0x8f0(%rax), %rdx
callq 0x1b0c0
movq -0x70(%rbp), %rdi
movq 0x88(%rdi), %rax
movl 0x8dc(%rax), %esi
movq 0x88(%rdi), %rax
movq 0x8f0(%rax), %rdx
callq 0x1a9f0
movq -0x70(%rbp), %rax
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm1
movsd -0x50(%rbp), %xmm2
movq 0x88(%rax), %rax
movsd 0x950(%rax), %xmm0
mulsd -0x40(%rbp), %xmm0
movsd -0x60(%rbp), %xmm3
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
setae %al
andb $0x1, %al
movb %al, -0x41(%rbp)
testb $0x1, -0x41(%rbp)
je 0x240f7
movsd 0x2b91b(%rip), %xmm0    # 0x4fa08
movsd %xmm0, -0xc8(%rbp)
jmp 0x24112
movq -0x70(%rbp), %rax
movq 0x88(%rax), %rax
movsd 0x960(%rax), %xmm0
movsd %xmm0, -0xc8(%rbp)
movsd -0xc8(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x23ba2
testb $0x1, -0x41(%rbp)
jne 0x2417b
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x24179
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x5, %esi
movl $0x1, %edx
callq 0xe4d0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2414b
jmp 0x2417b
movsd -0x58(%rbp), %xmm0
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)