// File: melop[P]admixem/makemarkerfile.cpp
// Function: UIGenerateRecombinationFreqMap(int, double, double*, double*)
void UIGenerateRecombinationFreqMap(int nChromosomes, double nLargestChromSize, double * pChromosomeSizes, double * pCentromerePos) { //UI generating recombination map
		
		//double nLogMaxAvgRecombRate; // Log(Max(recombination rate));
		char nRate; //1 - uniform, 2 - parabola
		double nTotalExpectedRecombPerMeiosis; // The total expected recombination events per meiosis in the whole genome
		double nParabolaA; // shape of male parabola
		double nParabolaAFemale; //shape of female parabola
		//double nFemCorrA ; // linear function to correct for female rates: y=ax + b; negative values make rates higher near centromere and lower at telomere and vice versa
		//double nFemCorrB ; // This should be larger than one b/c females have higher recombination rate in general. usually 3 
		double nFemFold; //Fold factor compared to max
		double nTotalSamplePoint; //How often to put a point. 
		double nSumLens = fnSum(pChromosomeSizes , nChromosomes); // get sum of chromosome lengths
		
		while(true) { //  Get std. dev of the more abundant allele in pop 2
		
			//std::cout << "\nThe logarithm of the max average recombination rate at the telomere of the longest chromosome per chromosome length unit per gamete (< 0) : ";
			
			std::cout << "\nThe total expected recombination event in the whole genome per meiosis (>= 0), set this to be 4n should be fine : ";
			std::cin >> nTotalExpectedRecombPerMeiosis;
			
			if (nTotalExpectedRecombPerMeiosis < 0 ) {
				std::cout << "Input out of bound, retry." <<endl;
				continue; // 
			}
			
			break;
		}
		/*
		while(true) { //  Get std. dev of the more abundant allele in pop 2
		
			std::cout << "\nDistribution of recombination frequencies 1 - Uniform, 2 - Parabola ... ";
			std::cin >> nRate;
			
			if (nRate < '1' || nRate > '2' ) {
				std::cout << "Input out of bound, retry." <<endl;
				continue; // 
			}
			
			break;
		}
		*/
		nRate = '1';
		
		if (nRate == '2') { 
				while(true) { //  Get std. dev of the more abundant allele in pop 2
		
					std::cout << "\nShape of the male parabola (0, 5] : ";
					std::cin >> nParabolaA;
			
					if (nParabolaA <= 0 || nParabolaA > 5 ) {
						std::cout << "Input out of bound, retry." <<endl;
						continue; // 
					}
			
					break;
				}
		
	
				while(true) { //  Get std. dev of the more abundant allele in pop 2
		
					std::cout << "\nShape of the female parabola (0, 5] : ";
					std::cin >> nParabolaAFemale;
			
					if (nParabolaAFemale <= 0 || nParabolaAFemale > 5 ) {
						std::cout << "Input out of bound, retry." <<endl;
						continue; // 
					}
			
					break;
				}
		}
		
		if (nRate == '1') { // if uniform, just put two since users can specify Use UseUniformRec = yes
			std::cout << "===========================================" <<endl;
			std::cout  <<endl;
			std::cout << "By default Admixem uses the uniform rate" <<endl;
			std::cout << "In addition to files generated here," <<endl;
			std::cout << "Please make sure you ADD THE FOLLOWING OPTION" <<endl;
			std::cout << "in your MAIN CONFIGURATION file:" <<endl;
			std::cout << endl << "        UseUniformRec  =  yes" <<endl;
			std::cout  <<endl;
			std::cout  <<"In case you really want to use the candidate ";
			std::cout  <<"break point approach, refer to the manual. ";
			std::cout << "===========================================" <<endl;

			nTotalSamplePoint = 20 * nChromosomes;
		}
		else {
			while(true) { //  Get std. dev of the more abundant allele in pop 2
		
				std::cout << "\nHow many sample points to put in total?: ";
				std::cin >> nTotalSamplePoint;
			
				if (nTotalSamplePoint <= 0  ) {
					std::cout << "Input out of bound, retry." <<endl;
					continue; // 
				}
			
				break;
			}
		}
		
		while(true) { //  Get std. dev of the more abundant allele in pop 2
		
			std::cout << "\nFold difference between female:male [0.1,10]: ";
			std::cin >> nFemFold;
			
			if (nFemFold < 0.1 || nFemFold > 10 ) {
				std::cout << "Input out of bound, retry." <<endl;
				continue; // 
			}
			
			break;
		}
		
		/*
		while(true) { //  Get std. dev of the more abundant allele in pop 2
		
			std::cout << "\n A linear model y=a*prob(male)+b will be used to generate the female recomb. rate from the male rates. "<<endl;
			std::cout << "A -b < a < 10:"<<endl;
			std::cin >> nFemCorrA;
			std::cout << "B [1,10]:"<<endl;
			std::cin >> nFemCorrB;
			

			
			if (nFemCorrB < 1 || nFemCorrB > 10 ) {
				std::cout << "Parameter B out of bound, retry." <<endl;
				continue; // 
			}
			
				if (nFemCorrA < -nFemCorrB || nFemCorrA > 10 ) {
				std::cout << "Parameter A out of bound, retry." <<endl;
				continue; // 
			}
			
			break;
		}
		*/
		
		
	cout << "Output File name : ";
	string sOutFile;
		
		while(true) { //  Get std. dev of the more abundant allele in pop 2
		
			
		
			
			getline(cin, sOutFile) ;
			
			
			if (sOutFile.size() > 3 ) {
				break;
			}
			
			
			continue;
		}
		
		
		// now prepare file:
		//Figure out how to distribute the markers
		
		ofstream fOutFile;
		fOutFile.open(sOutFile.c_str());
		
		
		for (int i=0;i< nChromosomes;i++) {
			

			
			int nChrIndex =i;
			double nChrLen = pChromosomeSizes[nChrIndex];
			double nCentromerePos =  pCentromerePos[nChrIndex];	
			//double nMaxAvgRecombRate = pow(10, nLogMaxAvgRecombRate);	
			//nLongestArmExpectedRecombPerMeiosis
			
			int	   nNumSamplePoints = (int) ceil( ((double) nTotalSamplePoint) * (nChrLen / nSumLens));

			double nArm1Len =  nCentromerePos;
			double nArm2Len =  nChrLen - nCentromerePos;
				
			fOutFile << ":chr " << (nChrIndex+1) << endl;
			
			double nExpectedMaleRecPerMeiosisArm1 = nTotalExpectedRecombPerMeiosis * ( nArm1Len/nSumLens) / 2;
			double nExpectedMaleRecPerMeiosisArm2 = nTotalExpectedRecombPerMeiosis * ( nArm2Len/nSumLens) / 2;
			double nExpectedFemaleRecPerMeiosisArm1 = nTotalExpectedRecombPerMeiosis * nFemFold * ( nArm1Len/nSumLens) / 2;
			double nExpectedFemaleRecPerMeiosisArm2 = nTotalExpectedRecombPerMeiosis * nFemFold * ( nArm2Len/nSumLens) / 2;
			double nExpectedRecPerMeiosisArm1 = ( nExpectedMaleRecPerMeiosisArm1 + nExpectedFemaleRecPerMeiosisArm1 ) / 2;
			double nExpectedRecPerMeiosisArm2 = ( nExpectedMaleRecPerMeiosisArm2 + nExpectedFemaleRecPerMeiosisArm2 ) / 2;
			
			//fOutFile << "\tmale"<<"\tmale_accumulative\tmale*max\tmale*max_accumulative" << "\tfemale\tfemale_accumulative\tfemale*max\tfemale*max_accumulative" << endl;
			fOutFile << ":ExpectedMaleRecPerMeiosisArm1 = " << nExpectedMaleRecPerMeiosisArm1 << endl;
			fOutFile << ":ExpectedMaleRecPerMeiosisArm2 = " << nExpectedMaleRecPerMeiosisArm2 << endl;
			fOutFile << ":ExpectedFemaleRecPerMeiosisArm1 = " << nExpectedFemaleRecPerMeiosisArm1 << endl;
			fOutFile << ":ExpectedFemaleRecPerMeiosisArm2 = " << nExpectedFemaleRecPerMeiosisArm2 << endl;
			fOutFile << "\tmale"<<"\tmale_accumulative" << "\tfemale\tfemale_accumulative\tMale_recombination_fraction\tFemale_recombination_fraction\tAvg_recombination_fraction\tKosambi_male_interval\tKosambi_male_pos\tKosambi_female_interval\tKosambi_female_pos\tKosambi_both_interval\tKosambi_both_pos" << endl;
		
			std::map<double, double *>  mSamplePoints;

			
			for (int j=0; j < nNumSamplePoints; j++) {
			
				double nPos = nChrLen * UniformGen.Next(); // random position
				
				double nDistanceFromCentromere = ( nPos - nCentromerePos ) / nLargestChromSize; //  distance from centromere standarized by the longest chromosome
				nDistanceFromCentromere = (nDistanceFromCentromere >= 0 )? nDistanceFromCentromere: -nDistanceFromCentromere;
				
				double nArmLen = (nPos > nCentromerePos)? nChrLen - nCentromerePos : nCentromerePos;
				double nDistanceFromCentromereOnArm = (nPos > nCentromerePos)? (nPos - nCentromerePos)/nArmLen : (nCentromerePos - nPos)/nArmLen ;
				
				double nProbAtPosMale =  (nRate=='1')? 0.1 : pow(nParabolaA * nDistanceFromCentromere, 2);
				//double nProbAtPosFemale = nProbAtPosMale * nFemCorrA  + nFemCorrB;
				
				double nProbAtPosFemale = (nRate=='1')? 0.1 * nFemFold : pow(nParabolaAFemale * nDistanceFromCentromere, 2) * nFemFold ; 
				
				double * pProbs = new double[4];
				
				pProbs[0] = NormalExt(nProbAtPosMale , nProbAtPosMale / 2, 0, 1);
				//pProbs[1] = nMaxAvgRecombRate * pProbs[0] ;
				pProbs[2] = NormalExt(nProbAtPosFemale , nProbAtPosFemale / 2, 0, 1);
				//pProbs[3] = nMaxAvgRecombRate * pProbs[2] ;
				
				if (mSamplePoints.find(nPos) == mSamplePoints.end()) {
					mSamplePoints[nPos] = pProbs ;
				}
				else {
					j--;
					continue; // won't work because same position already exists.
				}
				
			}
			
			double nMaleArm1Accum = 0;
			double nFemaleArm1Accum = 0;
			double nMaleArm2Accum = 0;
			double nFemaleArm2Accum = 0;


			
			for (std::map<double,double *>::iterator it = mSamplePoints.begin(); it != mSamplePoints.end(); ++it) {
			
				double nMaleAccum, nFemaleAccum;
				if (it->first < nCentromerePos) { //on arm 1
					/*
					nMaleAccum = nMaleArm1Accum += (it->second)[0];
					nFemaleAccum = nFemaleArm1Accum += (it->second)[2];
					*/
					nMaleArm1Accum += (it->second)[0];
					nFemaleArm1Accum += (it->second)[2];
				}
				else {
					/*
					nMaleAccum = nMaleArm2Accum += (it->second)[0];
					nFemaleAccum = nFemaleArm2Accum += (it->second)[2];
					*/
					 nMaleArm2Accum += (it->second)[0];
					 nFemaleArm2Accum += (it->second)[2];
				}
				
				//fOutFile << setprecision (10) << it->first << '\t' << (it->second)[0] << '\t' << nMaleAccum << '\t' << (it->second)[1] << '\t' << nMaleAccum * nMaxAvgRecombRate  << '\t' << (it->second)[2] << '\t' << nFemaleAccum << '\t' << (it->second)[3] << '\t' << nFemaleAccum * nMaxAvgRecombRate << endl;
			}


			double nScaledMaleArm1Accum = 0;
			double nScaledFemaleArm1Accum = 0;
			double nScaledMaleArm2Accum = 0;
			double nScaledFemaleArm2Accum = 0;

			double nScaledMaleProb = 0;
			double nScaledFemaleProb = 0;
			
			double nPrevScaledMaleArm1Accum =0;
			double nPrevScaledFemaleArm1Accum =0;
			double nPrevScaledMaleArm2Accum =0;
			double nPrevScaledFemaleArm2Accum =0;
			
			double nKosambiMapDistance_male = 0;
			double nKosambiMapDistance_female = 0;
			double nKosambiMapDistance_both = 0;			
			
			double nKosambiMapPos_male = 0;
			double nKosambiMapPos_female = 0;
			double nKosambiMapPos_both = 0;
			
			double nRecombFraction_male = 0;
			double nRecombFraction_female = 0;
			double nRecombFraction_both = 0;
			
	
			for (std::map<double,double *>::iterator it = mSamplePoints.begin(); it != mSamplePoints.end(); ++it) {
			
				double nMaleAccum, nFemaleAccum;
				if (it->first < nCentromerePos) { //on arm 1
					nScaledMaleProb = (it->second)[0] / nMaleArm1Accum;
					nScaledFemaleProb = (it->second)[2] / nFemaleArm1Accum;
					nMaleAccum = nScaledMaleArm1Accum += nScaledMaleProb;
					nFemaleAccum = nScaledFemaleArm1Accum += nScaledFemaleProb;
					
					 nRecombFraction_male = nExpectedMaleRecPerMeiosisArm1 * nScaledMaleProb  ;
					 nKosambiMapPos_male += nKosambiMapDistance_male = 0.25 * log( (1+2 * nRecombFraction_male)/(1-2 * nRecombFraction_male) ) ;
					 nRecombFraction_female = nExpectedFemaleRecPerMeiosisArm1 * nScaledFemaleProb ;
					 nKosambiMapPos_female += nKosambiMapDistance_female = 0.25 * log( (1+2 * nRecombFraction_female)/(1-2 * nRecombFraction_female) ) ;
		
					
					
				}
				else {
					nScaledMaleProb = (it->second)[0] / nMaleArm2Accum;
					nScaledFemaleProb = (it->second)[2] / nFemaleArm2Accum;
					nMaleAccum = nScaledMaleArm2Accum += nScaledMaleProb;
					nFemaleAccum = nScaledFemaleArm2Accum += nScaledFemaleProb;
					
					nRecombFraction_male = nExpectedMaleRecPerMeiosisArm2 * nScaledMaleProb  ;
					 nKosambiMapPos_male += nKosambiMapDistance_male = 0.25 * log( (1+2 * nRecombFraction_male)/(1-2 * nRecombFraction_male) ) ;
					 nRecombFraction_female = nExpectedFemaleRecPerMeiosisArm2 * nScaledFemaleProb  ;
					 nKosambiMapPos_female += nKosambiMapDistance_female = 0.25 * log( (1+2 * nRecombFraction_female)/(1-2 * nRecombFraction_female) ) ;
					 
					
				}
				
				nRecombFraction_both = (nRecombFraction_male + nRecombFraction_female)/2;
				nKosambiMapPos_both += nKosambiMapDistance_both = 0.25 * log( (1+2 * nRecombFraction_both)/(1-2 * nRecombFraction_both) ) ;
					 

				
				fOutFile << setprecision (10) << it->first << '\t' << nScaledMaleProb << '\t' << nMaleAccum << '\t' << nScaledFemaleProb << '\t' << nFemaleAccum;
				fOutFile << setprecision (10) << '\t' << nRecombFraction_male << '\t' << nRecombFraction_female << '\t' << nRecombFraction_both << '\t' << nKosambiMapDistance_male << '\t' << nKosambiMapPos_male << '\t' << nKosambiMapDistance_female << '\t' << nKosambiMapPos_female << '\t' << nKosambiMapDistance_both << '\t' << nKosambiMapPos_both << endl;
			
				double nPrevScaledMaleArm1Accum = nScaledMaleArm1Accum;
				double nPrevScaledFemaleArm1Accum = nScaledFemaleArm1Accum;
				double nPrevScaledMaleArm2Accum = nScaledMaleArm2Accum;
				double nPrevScaledFemaleArm2Accum = nScaledFemaleArm2Accum;
				
			
			}
		
		
		
		}
		
		fOutFile.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x660, %rsp            # imm = 0x660
movl %edi, -0x4(%rbp)
movsd %xmm0, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x65da0
movsd %xmm0, -0x58(%rbp)
movq 0x46bc5(%rip), %rdi     # 0xa9f88
leaq 0x1533a(%rip), %rsi     # 0x78704
callq 0x84a0
movq 0x46bfa(%rip), %rdi     # 0xa9fd0
leaq -0x30(%rbp), %rsi
callq 0x83c0
xorps %xmm0, %xmm0
ucomisd -0x30(%rbp), %xmm0
jbe 0x6340d
movq 0x46b98(%rip), %rdi     # 0xa9f88
leaq 0x15381(%rip), %rsi     # 0x78778
callq 0x84a0
movq %rax, %rdi
movq 0x46b2a(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x633bc
jmp 0x6340f
movb $0x31, -0x21(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x32, %eax
jne 0x634f2
jmp 0x63422
movq 0x46b5f(%rip), %rdi     # 0xa9f88
leaq 0x15363(%rip), %rsi     # 0x78793
callq 0x84a0
movq 0x46b94(%rip), %rdi     # 0xa9fd0
leaq -0x38(%rbp), %rsi
callq 0x83c0
xorps %xmm0, %xmm0
ucomisd -0x38(%rbp), %xmm0
jae 0x63462
movsd -0x38(%rbp), %xmm0
movsd 0x14e0c(%rip), %xmm1    # 0x78268
ucomisd %xmm1, %xmm0
jbe 0x63486
movq 0x46b1f(%rip), %rdi     # 0xa9f88
leaq 0x15308(%rip), %rsi     # 0x78778
callq 0x84a0
movq %rax, %rdi
movq 0x46ab1(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x63422
jmp 0x63488
jmp 0x6348a
movq 0x46af7(%rip), %rdi     # 0xa9f88
leaq 0x15321(%rip), %rsi     # 0x787b9
callq 0x84a0
movq 0x46b2c(%rip), %rdi     # 0xa9fd0
leaq -0x40(%rbp), %rsi
callq 0x83c0
xorps %xmm0, %xmm0
ucomisd -0x40(%rbp), %xmm0
jae 0x634ca
movsd -0x40(%rbp), %xmm0
movsd 0x14da4(%rip), %xmm1    # 0x78268
ucomisd %xmm1, %xmm0
jbe 0x634ee
movq 0x46ab7(%rip), %rdi     # 0xa9f88
leaq 0x152a0(%rip), %rsi     # 0x78778
callq 0x84a0
movq %rax, %rdi
movq 0x46a49(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x6348a
jmp 0x634f0
jmp 0x634f2
movsbl -0x21(%rbp), %eax
cmpl $0x31, %eax
jne 0x63657
movq 0x46a82(%rip), %rdi     # 0xa9f88
leaq 0x152d4(%rip), %rsi     # 0x787e1
callq 0x84a0
movq %rax, %rdi
movq 0x46a14(%rip), %rsi     # 0xa9f30
callq 0x8520
movq 0x46a60(%rip), %rdi     # 0xa9f88
movq 0x46a01(%rip), %rsi     # 0xa9f30
callq 0x8520
movq 0x46a4d(%rip), %rdi     # 0xa9f88
leaq 0x152cb(%rip), %rsi     # 0x7880d
callq 0x84a0
movq %rax, %rdi
movq 0x469df(%rip), %rsi     # 0xa9f30
callq 0x8520
movq 0x46a2b(%rip), %rdi     # 0xa9f88
leaq 0x152d2(%rip), %rsi     # 0x78836
callq 0x84a0
movq %rax, %rdi
movq 0x469bd(%rip), %rsi     # 0xa9f30
callq 0x8520
movq 0x46a09(%rip), %rdi     # 0xa9f88
leaq 0x152d5(%rip), %rsi     # 0x7885b
callq 0x84a0
movq %rax, %rdi
movq 0x4699b(%rip), %rsi     # 0xa9f30
callq 0x8520
movq 0x469e7(%rip), %rdi     # 0xa9f88
leaq 0x152e1(%rip), %rsi     # 0x78889
callq 0x84a0
movq %rax, %rdi
movq 0x46979(%rip), %rsi     # 0xa9f30
callq 0x8520
movq 0x469c5(%rip), %rdi     # 0xa9f88
movq 0x46966(%rip), %rsi     # 0xa9f30
callq 0x8520
movq %rax, %rdi
leaq 0x152d1(%rip), %rsi     # 0x788aa
callq 0x84a0
movq %rax, %rdi
movq 0x46948(%rip), %rsi     # 0xa9f30
callq 0x8520
movq 0x46994(%rip), %rdi     # 0xa9f88
movq 0x46935(%rip), %rsi     # 0xa9f30
callq 0x8520
movq 0x46981(%rip), %rdi     # 0xa9f88
leaq 0x152ba(%rip), %rsi     # 0x788c8
callq 0x84a0
movq 0x4696e(%rip), %rdi     # 0xa9f88
leaq 0x152d5(%rip), %rsi     # 0x788f6
callq 0x84a0
movq 0x4695b(%rip), %rdi     # 0xa9f88
leaq 0x151ad(%rip), %rsi     # 0x787e1
callq 0x84a0
movq %rax, %rdi
movq 0x468ed(%rip), %rsi     # 0xa9f30
callq 0x8520
imull $0x14, -0x4(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x636ae
jmp 0x63659
movq 0x46928(%rip), %rdi     # 0xa9f88
leaq 0x152bb(%rip), %rsi     # 0x78922
callq 0x84a0
movq 0x4695d(%rip), %rdi     # 0xa9fd0
leaq -0x50(%rbp), %rsi
callq 0x83c0
xorps %xmm0, %xmm0
ucomisd -0x50(%rbp), %xmm0
jb 0x636aa
movq 0x468fb(%rip), %rdi     # 0xa9f88
leaq 0x150e4(%rip), %rsi     # 0x78778
callq 0x84a0
movq %rax, %rdi
movq 0x4688d(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x63659
jmp 0x636ac
jmp 0x636ae
jmp 0x636b0
movq 0x468d1(%rip), %rdi     # 0xa9f88
leaq 0x1528f(%rip), %rsi     # 0x7894d
callq 0x84a0
movq 0x46906(%rip), %rdi     # 0xa9fd0
leaq -0x48(%rbp), %rsi
callq 0x83c0
movsd 0x14b95(%rip), %xmm0    # 0x78270
ucomisd -0x48(%rbp), %xmm0
ja 0x636f5
movsd -0x48(%rbp), %xmm0
movsd 0x13031(%rip), %xmm1    # 0x76720
ucomisd %xmm1, %xmm0
jbe 0x63719
movq 0x4688c(%rip), %rdi     # 0xa9f88
leaq 0x15075(%rip), %rsi     # 0x78778
callq 0x84a0
movq %rax, %rdi
movq 0x4681e(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x636b0
jmp 0x6371b
movq 0x46866(%rip), %rdi     # 0xa9f88
leaq 0x14e7e(%rip), %rsi     # 0x785a7
callq 0x84a0
leaq -0x78(%rbp), %rdi
callq 0x86b0
jmp 0x63739
movq 0x46890(%rip), %rdi     # 0xa9fd0
leaq -0x78(%rbp), %rsi
callq 0x80f0
jmp 0x6374b
leaq -0x78(%rbp), %rdi
callq 0x8340
cmpq $0x3, %rax
jbe 0x63770
jmp 0x63772
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x64912
jmp 0x63737
leaq -0x288(%rbp), %rdi
callq 0x8810
jmp 0x63780
leaq -0x78(%rbp), %rdi
callq 0x81d0
movq %rax, %rsi
leaq -0x288(%rbp), %rdi
movl $0x10, %edx
callq 0x8090
jmp 0x6379f
movl $0x0, -0x28c(%rbp)
movl -0x28c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x648da
movl -0x28c(%rbp), %eax
movl %eax, -0x290(%rbp)
movq -0x18(%rbp), %rax
movslq -0x290(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x298(%rbp)
movq -0x20(%rbp), %rax
movslq -0x290(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x2a0(%rbp)
movsd -0x50(%rbp), %xmm0
movsd -0x298(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x8920
cvttsd2si %xmm0, %eax
movl %eax, -0x2a4(%rbp)
movsd -0x2a0(%rbp), %xmm0
movsd %xmm0, -0x2b0(%rbp)
movsd -0x298(%rbp), %xmm0
movsd -0x2a0(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x2b8(%rbp)
leaq 0x14def(%rip), %rsi     # 0x7863f
leaq -0x288(%rbp), %rdi
callq 0x84a0
movq %rax, -0x490(%rbp)
jmp 0x63865
movq -0x490(%rbp), %rdi
movl -0x290(%rbp), %esi
incl %esi
callq 0x8840
movq %rax, -0x498(%rbp)
jmp 0x63882
movq -0x498(%rbp), %rdi
movq 0x466a0(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x63897
movsd -0x30(%rbp), %xmm0
movsd -0x2b0(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x12dd7(%rip), %xmm1    # 0x76690
mulsd %xmm1, %xmm0
movsd %xmm0, -0x2c0(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x2b8(%rbp), %xmm2
movsd -0x58(%rbp), %xmm3
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x2c8(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x48(%rbp), %xmm2
mulsd %xmm2, %xmm0
movsd -0x2b0(%rbp), %xmm2
movsd -0x58(%rbp), %xmm3
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x2d0(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x48(%rbp), %xmm2
mulsd %xmm2, %xmm0
movsd -0x2b8(%rbp), %xmm2
movsd -0x58(%rbp), %xmm3
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x2d8(%rbp)
movsd -0x2c0(%rbp), %xmm0
movsd -0x2d0(%rbp), %xmm2
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x2e0(%rbp)
movsd -0x2c8(%rbp), %xmm0
movsd -0x2d8(%rbp), %xmm2
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x2e8(%rbp)
leaq 0x14fed(%rip), %rsi     # 0x7897d
leaq -0x288(%rbp), %rdi
callq 0x84a0
movq %rax, -0x4a0(%rbp)
jmp 0x639a5
movq -0x4a0(%rbp), %rdi
movsd -0x2c0(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x4a8(%rbp)
jmp 0x639c2
movq -0x4a8(%rbp), %rdi
movq 0x46560(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x639d7
leaq 0x14fc1(%rip), %rsi     # 0x7899f
leaq -0x288(%rbp), %rdi
callq 0x84a0
movq %rax, -0x4b0(%rbp)
jmp 0x639f3
movq -0x4b0(%rbp), %rdi
movsd -0x2c8(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x4b8(%rbp)
jmp 0x63a10
movq -0x4b8(%rbp), %rdi
movq 0x46512(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x63a25
leaq 0x14f95(%rip), %rsi     # 0x789c1
leaq -0x288(%rbp), %rdi
callq 0x84a0
movq %rax, -0x4c0(%rbp)
jmp 0x63a41
movq -0x4c0(%rbp), %rdi
movsd -0x2d0(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x4c8(%rbp)
jmp 0x63a5e
movq -0x4c8(%rbp), %rdi
movq 0x464c4(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x63a73
leaq 0x14f6b(%rip), %rsi     # 0x789e5
leaq -0x288(%rbp), %rdi
callq 0x84a0
movq %rax, -0x4d0(%rbp)
jmp 0x63a8f
movq -0x4d0(%rbp), %rdi
movsd -0x2d8(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x4d8(%rbp)
jmp 0x63aac
movq -0x4d8(%rbp), %rdi
movq 0x46476(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x63ac1
leaq 0x14f41(%rip), %rsi     # 0x78a09
leaq -0x288(%rbp), %rdi
callq 0x84a0
movq %rax, -0x4e0(%rbp)
jmp 0x63add
movq -0x4e0(%rbp), %rdi
leaq 0x14f24(%rip), %rsi     # 0x78a0f
callq 0x84a0
movq %rax, -0x4e8(%rbp)
jmp 0x63af9
movq -0x4e8(%rbp), %rdi
leaq 0x14f1b(%rip), %rsi     # 0x78a22
callq 0x84a0
movq %rax, -0x4f0(%rbp)
jmp 0x63b15
movq -0x4f0(%rbp), %rdi
movq 0x4640d(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x63b2a
leaq -0x318(%rbp), %rdi
callq 0x64930
movl $0x0, -0x31c(%rbp)
movl -0x31c(%rbp), %eax
cmpl -0x2a4(%rbp), %eax
jge 0x63f1f
movsd -0x298(%rbp), %xmm0
movsd %xmm0, -0x500(%rbp)
leaq 0x47027(%rip), %rdi     # 0xaab90
callq 0x19e20
movsd %xmm0, -0x4f8(%rbp)
jmp 0x63b78
movsd -0x4f8(%rbp), %xmm1
movsd -0x500(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x328(%rbp)
movsd -0x328(%rbp), %xmm0
subsd -0x2a0(%rbp), %xmm0
divsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x330(%rbp)
movsd -0x330(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x63bd4
movsd -0x330(%rbp), %xmm0
movsd %xmm0, -0x508(%rbp)
jmp 0x63bfb
movsd -0x330(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x508(%rbp)
movsd -0x508(%rbp), %xmm0
movsd %xmm0, -0x330(%rbp)
movsd -0x328(%rbp), %xmm0
ucomisd -0x2a0(%rbp), %xmm0
jbe 0x63c37
movsd -0x298(%rbp), %xmm0
subsd -0x2a0(%rbp), %xmm0
movsd %xmm0, -0x510(%rbp)
jmp 0x63c47
movsd -0x2a0(%rbp), %xmm0
movsd %xmm0, -0x510(%rbp)
movsd -0x510(%rbp), %xmm0
movsd %xmm0, -0x338(%rbp)
movsd -0x328(%rbp), %xmm0
ucomisd -0x2a0(%rbp), %xmm0
jbe 0x63c8b
movsd -0x328(%rbp), %xmm0
subsd -0x2a0(%rbp), %xmm0
divsd -0x338(%rbp), %xmm0
movsd %xmm0, -0x518(%rbp)
jmp 0x63cab
movsd -0x2a0(%rbp), %xmm0
subsd -0x328(%rbp), %xmm0
divsd -0x338(%rbp), %xmm0
movsd %xmm0, -0x518(%rbp)
movsd -0x518(%rbp), %xmm0
movsd %xmm0, -0x340(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x31, %eax
jne 0x63cd6
movsd 0x145a4(%rip), %xmm0    # 0x78270
movsd %xmm0, -0x520(%rbp)
jmp 0x63d0d
movsd -0x38(%rbp), %xmm0
movsd -0x330(%rbp), %xmm1
mulsd %xmm1, %xmm0
movl $0x2, %edi
callq 0x19e60
movsd %xmm0, -0x528(%rbp)
jmp 0x63cfb
movsd -0x528(%rbp), %xmm0
movsd %xmm0, -0x520(%rbp)
jmp 0x63d0d
movsd -0x520(%rbp), %xmm0
movsd %xmm0, -0x348(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x31, %eax
jne 0x63d3d
movsd 0x14542(%rip), %xmm0    # 0x78270
mulsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x530(%rbp)
jmp 0x63d77
movsd -0x40(%rbp), %xmm0
movsd -0x330(%rbp), %xmm1
mulsd %xmm1, %xmm0
movl $0x2, %edi
callq 0x19e60
movsd %xmm0, -0x538(%rbp)
jmp 0x63d62
movsd -0x538(%rbp), %xmm0
mulsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x530(%rbp)
movsd -0x530(%rbp), %xmm0
movsd %xmm0, -0x350(%rbp)
movl $0x20, %edi
callq 0x8040
movq %rax, -0x540(%rbp)
jmp 0x63d9a
movq -0x540(%rbp), %rax
movq %rax, -0x358(%rbp)
movsd -0x348(%rbp), %xmm0
movsd 0x128d8(%rip), %xmm2    # 0x76690
movaps %xmm0, %xmm1
mulsd %xmm2, %xmm1
xorps %xmm2, %xmm2
movsd 0x12246(%rip), %xmm3    # 0x76010
callq 0x65d00
movsd %xmm0, -0x548(%rbp)
jmp 0x63dd9
movsd -0x548(%rbp), %xmm0
movq -0x358(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x350(%rbp), %xmm0
movsd 0x12894(%rip), %xmm2    # 0x76690
movaps %xmm0, %xmm1
mulsd %xmm2, %xmm1
xorps %xmm2, %xmm2
movsd 0x12202(%rip), %xmm3    # 0x76010
callq 0x65d00
movsd %xmm0, -0x550(%rbp)
jmp 0x63e1d
movsd -0x550(%rbp), %xmm0
movq -0x358(%rbp), %rax
movsd %xmm0, 0x10(%rax)
leaq -0x318(%rbp), %rdi
leaq -0x328(%rbp), %rsi
callq 0x64980
movq %rax, -0x558(%rbp)
jmp 0x63e4d
movq -0x558(%rbp), %rax
movq %rax, -0x360(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x649b0
movq %rax, -0x368(%rbp)
leaq -0x360(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0x64950
testb $0x1, %al
jne 0x63e87
jmp 0x63ef8
movq -0x358(%rbp), %rax
movq %rax, -0x568(%rbp)
leaq -0x318(%rbp), %rdi
leaq -0x328(%rbp), %rsi
callq 0x649e0
movq %rax, -0x560(%rbp)
jmp 0x63eb1
movq -0x560(%rbp), %rax
movq -0x568(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x63f09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x64906
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x64b70
jmp 0x64906
movl -0x31c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x31c(%rbp)
jmp 0x63f0b
jmp 0x63f0b
movl -0x31c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x31c(%rbp)
jmp 0x63b40
xorps %xmm0, %xmm0
movsd %xmm0, -0x370(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x378(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x380(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x388(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x64ac0
movq %rax, -0x390(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x649b0
movq %rax, -0x398(%rbp)
leaq -0x390(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0x64af0
testb $0x1, %al
jne 0x63f8d
jmp 0x64052
leaq -0x390(%rbp), %rdi
callq 0x64b20
movsd (%rax), %xmm1
movsd -0x2a0(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x63ff6
leaq -0x390(%rbp), %rdi
callq 0x64b20
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
addsd -0x370(%rbp), %xmm0
movsd %xmm0, -0x370(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x64b20
movq 0x8(%rax), %rax
movsd 0x10(%rax), %xmm0
addsd -0x378(%rbp), %xmm0
movsd %xmm0, -0x378(%rbp)
jmp 0x6403f
leaq -0x390(%rbp), %rdi
callq 0x64b20
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
addsd -0x380(%rbp), %xmm0
movsd %xmm0, -0x380(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x64b20
movq 0x8(%rax), %rax
movsd 0x10(%rax), %xmm0
addsd -0x388(%rbp), %xmm0
movsd %xmm0, -0x388(%rbp)
jmp 0x64041
leaq -0x390(%rbp), %rdi
callq 0x64b40
jmp 0x63f5e
xorps %xmm0, %xmm0
movsd %xmm0, -0x3b0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x3b8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x3c0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x3c8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x3d0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x3d8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x3e0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x3e8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x3f0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x3f8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x400(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x408(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x410(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x418(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x420(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x428(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x430(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x438(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x440(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x64ac0
movq %rax, -0x448(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x649b0
movq %rax, -0x450(%rbp)
leaq -0x448(%rbp), %rdi
leaq -0x450(%rbp), %rsi
callq 0x64af0
testb $0x1, %al
jne 0x64165
jmp 0x648ba
leaq -0x448(%rbp), %rdi
callq 0x64b20
movsd (%rax), %xmm1
movsd -0x2a0(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x64305
leaq -0x448(%rbp), %rdi
callq 0x64b20
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
divsd -0x370(%rbp), %xmm0
movsd %xmm0, -0x3d0(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x64b20
movq 0x8(%rax), %rax
movsd 0x10(%rax), %xmm0
divsd -0x378(%rbp), %xmm0
movsd %xmm0, -0x3d8(%rbp)
movsd -0x3d0(%rbp), %xmm0
addsd -0x3b0(%rbp), %xmm0
movsd %xmm0, -0x3b0(%rbp)
movsd %xmm0, -0x458(%rbp)
movsd -0x3d8(%rbp), %xmm0
addsd -0x3b8(%rbp), %xmm0
movsd %xmm0, -0x3b8(%rbp)
movsd %xmm0, -0x460(%rbp)
movsd -0x2c0(%rbp), %xmm0
mulsd -0x3d0(%rbp), %xmm0
movsd %xmm0, -0x430(%rbp)
movsd -0x430(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd 0x11dd4(%rip), %xmm1    # 0x76010
addsd %xmm1, %xmm0
movsd -0x430(%rbp), %xmm2
addsd %xmm2, %xmm2
movsd 0x11dbc(%rip), %xmm1    # 0x76010
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x8940
movaps %xmm0, %xmm1
movsd 0x1400c(%rip), %xmm0    # 0x78278
mulsd %xmm1, %xmm0
movsd %xmm0, -0x400(%rbp)
addsd -0x418(%rbp), %xmm0
movsd %xmm0, -0x418(%rbp)
movsd -0x2d0(%rbp), %xmm0
mulsd -0x3d8(%rbp), %xmm0
movsd %xmm0, -0x438(%rbp)
movsd -0x438(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd 0x11d5c(%rip), %xmm1    # 0x76010
addsd %xmm1, %xmm0
movsd -0x438(%rbp), %xmm2
addsd %xmm2, %xmm2
movsd 0x11d44(%rip), %xmm1    # 0x76010
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x8940
movaps %xmm0, %xmm1
movsd 0x13f94(%rip), %xmm0    # 0x78278
mulsd %xmm1, %xmm0
movsd %xmm0, -0x408(%rbp)
addsd -0x420(%rbp), %xmm0
movsd %xmm0, -0x420(%rbp)
jmp 0x6447e
leaq -0x448(%rbp), %rdi
callq 0x64b20
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
divsd -0x380(%rbp), %xmm0
movsd %xmm0, -0x3d0(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x64b20
movq 0x8(%rax), %rax
movsd 0x10(%rax), %xmm0
divsd -0x388(%rbp), %xmm0
movsd %xmm0, -0x3d8(%rbp)
movsd -0x3d0(%rbp), %xmm0
addsd -0x3c0(%rbp), %xmm0
movsd %xmm0, -0x3c0(%rbp)
movsd %xmm0, -0x458(%rbp)
movsd -0x3d8(%rbp), %xmm0
addsd -0x3c8(%rbp), %xmm0
movsd %xmm0, -0x3c8(%rbp)
movsd %xmm0, -0x460(%rbp)
movsd -0x2c8(%rbp), %xmm0
mulsd -0x3d0(%rbp), %xmm0
movsd %xmm0, -0x430(%rbp)
movsd -0x430(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd 0x11c56(%rip), %xmm1    # 0x76010
addsd %xmm1, %xmm0
movsd -0x430(%rbp), %xmm2
addsd %xmm2, %xmm2
movsd 0x11c3e(%rip), %xmm1    # 0x76010
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x8940
movaps %xmm0, %xmm1
movsd 0x13e8e(%rip), %xmm0    # 0x78278
mulsd %xmm1, %xmm0
movsd %xmm0, -0x400(%rbp)
addsd -0x418(%rbp), %xmm0
movsd %xmm0, -0x418(%rbp)
movsd -0x2d8(%rbp), %xmm0
mulsd -0x3d8(%rbp), %xmm0
movsd %xmm0, -0x438(%rbp)
movsd -0x438(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd 0x11bde(%rip), %xmm1    # 0x76010
addsd %xmm1, %xmm0
movsd -0x438(%rbp), %xmm2
addsd %xmm2, %xmm2
movsd 0x11bc6(%rip), %xmm1    # 0x76010
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x8940
movaps %xmm0, %xmm1
movsd 0x13e16(%rip), %xmm0    # 0x78278
mulsd %xmm1, %xmm0
movsd %xmm0, -0x408(%rbp)
addsd -0x420(%rbp), %xmm0
movsd %xmm0, -0x420(%rbp)
movsd -0x430(%rbp), %xmm0
movsd -0x438(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd 0x121f6(%rip), %xmm1    # 0x76690
mulsd %xmm1, %xmm0
movsd %xmm0, -0x440(%rbp)
movsd -0x440(%rbp), %xmm2
addsd %xmm2, %xmm2
movsd 0x11b56(%rip), %xmm1    # 0x76010
movaps %xmm2, %xmm0
addsd %xmm1, %xmm0
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x8940
movaps %xmm0, %xmm1
movsd 0x13d9f(%rip), %xmm0    # 0x78278
mulsd %xmm0, %xmm1
movsd %xmm1, -0x410(%rbp)
movsd -0x428(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x428(%rbp)
movl $0xa, %edi
callq 0x12980
movl %eax, -0x56c(%rbp)
jmp 0x6450b
movl -0x56c(%rbp), %eax
movl %eax, -0x464(%rbp)
movl -0x464(%rbp), %esi
leaq -0x288(%rbp), %rdi
callq 0x8760
movq %rax, -0x578(%rbp)
jmp 0x64532
leaq -0x448(%rbp), %rdi
callq 0x64b20
movq -0x578(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x88c0
movq %rax, -0x580(%rbp)
jmp 0x64557
movq -0x580(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x588(%rbp)
jmp 0x64571
movq -0x588(%rbp), %rdi
movsd -0x3d0(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x590(%rbp)
jmp 0x6458e
movq -0x590(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x598(%rbp)
jmp 0x645a8
movq -0x598(%rbp), %rdi
movsd -0x458(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x5a0(%rbp)
jmp 0x645c5
movq -0x5a0(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x5a8(%rbp)
jmp 0x645df
movq -0x5a8(%rbp), %rdi
movsd -0x3d8(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x5b0(%rbp)
jmp 0x645fc
movq -0x5b0(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x5b8(%rbp)
jmp 0x64616
movq -0x5b8(%rbp), %rdi
movsd -0x460(%rbp), %xmm0
callq 0x88c0
jmp 0x6462c
movl $0xa, %edi
callq 0x12980
movl %eax, -0x5bc(%rbp)
jmp 0x6463e
movl -0x5bc(%rbp), %eax
movl %eax, -0x468(%rbp)
movl -0x468(%rbp), %esi
leaq -0x288(%rbp), %rdi
callq 0x8760
movq %rax, -0x5c8(%rbp)
jmp 0x64665
movq -0x5c8(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x5d0(%rbp)
jmp 0x6467f
movq -0x5d0(%rbp), %rdi
movsd -0x430(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x5d8(%rbp)
jmp 0x6469c
movq -0x5d8(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x5e0(%rbp)
jmp 0x646b6
movq -0x5e0(%rbp), %rdi
movsd -0x438(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x5e8(%rbp)
jmp 0x646d3
movq -0x5e8(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x5f0(%rbp)
jmp 0x646ed
movq -0x5f0(%rbp), %rdi
movsd -0x440(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x5f8(%rbp)
jmp 0x6470a
movq -0x5f8(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x600(%rbp)
jmp 0x64724
movq -0x600(%rbp), %rdi
movsd -0x400(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x608(%rbp)
jmp 0x64741
movq -0x608(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x610(%rbp)
jmp 0x6475b
movq -0x610(%rbp), %rdi
movsd -0x418(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x618(%rbp)
jmp 0x64778
movq -0x618(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x620(%rbp)
jmp 0x64792
movq -0x620(%rbp), %rdi
movsd -0x408(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x628(%rbp)
jmp 0x647af
movq -0x628(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x630(%rbp)
jmp 0x647c9
movq -0x630(%rbp), %rdi
movsd -0x420(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x638(%rbp)
jmp 0x647e6
movq -0x638(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x640(%rbp)
jmp 0x64800
movq -0x640(%rbp), %rdi
movsd -0x410(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x648(%rbp)
jmp 0x6481d
movq -0x648(%rbp), %rdi
movl $0x9, %esi
callq 0x85d0
movq %rax, -0x650(%rbp)
jmp 0x64837
movq -0x650(%rbp), %rdi
movsd -0x428(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x658(%rbp)
jmp 0x64854
movq -0x658(%rbp), %rdi
movq 0x456ce(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x64869
movsd -0x3b0(%rbp), %xmm0
movsd %xmm0, -0x470(%rbp)
movsd -0x3b8(%rbp), %xmm0
movsd %xmm0, -0x478(%rbp)
movsd -0x3c0(%rbp), %xmm0
movsd %xmm0, -0x480(%rbp)
movsd -0x3c8(%rbp), %xmm0
movsd %xmm0, -0x488(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x64b40
jmp 0x64136
leaq -0x318(%rbp), %rdi
callq 0x64b70
movl -0x28c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28c(%rbp)
jmp 0x637a9
leaq -0x288(%rbp), %rdi
callq 0x86d0
jmp 0x648e8
leaq -0x288(%rbp), %rdi
callq 0x8700
leaq -0x78(%rbp), %rdi
callq 0x82e0
addq $0x660, %rsp            # imm = 0x660
popq %rbp
retq
leaq -0x288(%rbp), %rdi
callq 0x8700
leaq -0x78(%rbp), %rdi
callq 0x82e0
movq -0x80(%rbp), %rdi
callq 0x8860
nopw %cs:(%rax,%rax)
nop