// File: melop[P]admixem/simulation.cpp
// Function: PerformExport(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, int, int, double)
void PerformExport(int nGen, int nRep, string sExportFolder, int nPop1Size, int nPop2Size, int nPop3Size, int nMarkerNum, double nRandSeed) {

	Random::Set(nRandSeed);
	string sOutFolder = SimulConfig.GetConfig("OutputFolder");
	sExportFolder = sExportFolder + "/Gen" + convertInt(nGen);
	fnMakeDir(sExportFolder.c_str());

	ofstream fPriorAlleleFreq, fOutcomeVars, fGenotypes, fEtaPriors, fLoci, fSampledMarkers;// Create priorallelefreqs.txt
	//fPriorAlleleFreq.open(sExportFolder + "/priorallelefreqs.txt");
	//fOutcomeVars.open(sExportFolder + "/outcomevars.txt");
	//fGenotypes.open(sExportFolder + "/genotypes.txt");
	//fEtaPriors.open(sExportFolder + "/etapriors.txt");
	fLoci.open((sExportFolder + "/lociChr.txt").c_str());
	fSampledMarkers.open("sampledmarkers.txt"); // this is an instruction to the php script regarding what markers to draw

	ifstream fMarkers, fPhenotypes;
	/*char szCurrGen[100];
	_itoa(nGen , szCurrGen, 10);
	*/
	string sGenHeader = sOutFolder;
	sGenHeader = (nRep==0)? sGenHeader : (sGenHeader + "_") + fnIntToString(nRep);
	sGenHeader = sGenHeader + "/Gen";
	sGenHeader = sGenHeader + fnIntToString(nGen);//szCurrGen;

	fMarkers.open((sGenHeader + "_markers.txt").c_str() , ios_base::in );

	fPhenotypes.open((sGenHeader + "_phenotypes.txt").c_str() , ios_base::in );
	//convert the phenotype file to outcomevars.txt
	string sCmd = "php export_phenotype.php -- -s \"" + sGenHeader + "_phenotypes.txt\" -o \"" + sExportFolder + "/outcomevars.txt\"";
	printf("Calling: %s ...\n", sCmd.c_str());
	system(sCmd.c_str());

	//write loci.txt file
	printf("Writing locus information...\n");
	fLoci << "\"LocusName\"\t\"NumberOfAlleles\"\t\"cM\"\t\"Chr\"" <<endl; // Header
	
	fLoci << fixed << showpoint; 
	fLoci << setprecision(6);
	

	//vector<vector<int>> vRandomMarkerSubset;
	vector<map<double, double> > * pvMarkerMapDistance = SimulConfig.pMarkerConfig->GetMpMarkerMapDistance(2); // use average map distance

	size_t nTotalChrSize = pvMarkerMapDistance->size();
	for( size_t nChr=0; nChr < nTotalChrSize ; nChr++) {
		map<double, double> * pmMarkerMapDistanceOnChr = & (pvMarkerMapDistance->at(nChr));
		size_t nCurrMarker = 1;
		size_t nSampledMarkerCount = 1;
		double nPrevMarkerPos=0.0;

		double nExpectedMarkerNumOnChr = (double)nMarkerNum * SimulConfig.pMarkerConfig->GetChrToGenomeRatio( nChr );
		double nProbToKeep = nExpectedMarkerNumOnChr / (double)pmMarkerMapDistanceOnChr->size();

		for (map<double,double>::iterator itMarker = pmMarkerMapDistanceOnChr->begin(); itMarker!=pmMarkerMapDistanceOnChr->end(); ++itMarker) {

			if (UniformGen.Next() <= nProbToKeep) {

				double nCurrPos = itMarker->second; // itMarker->first  * 10.0e-6;

				fLoci << "chr" << (nChr+1) << "_" << nCurrMarker << "\t2\t";
				fSampledMarkers << nChr << "\t" << ( nCurrMarker -1 ) << "\t" << nCurrPos << endl;
			
				if ((nSampledMarkerCount==1)) {
				
					fLoci << "NA\t"; 
				}
				else {
				
					fLoci <<  (nCurrPos - nPrevMarkerPos) << "\t";
					
				
				}
				nPrevMarkerPos = nCurrPos ;
				fLoci << (nChr+1) << endl;
				nSampledMarkerCount++;
			}
			else {
				//nPrevMarkerPos += itMarker->first; //accumulate distance
			}

			nCurrMarker++;
		}
	}

	fSampledMarkers.close();

	sCmd = "php export_genotype.php -- -s \"" + sGenHeader + "_markers.txt\" -o \"" + sExportFolder + "\" -i sampledmarkers.txt -pop1 100000 -pop2 100000 -pop3 999999";
	printf("Calling: %s ...\n", sCmd.c_str());
	system(sCmd.c_str());



	/*
	string sLn;
	int iLn = 0;
	if (std::getline(fPhenotypes, sLn)) {// Header

	}

	else {
		printf("Phenotype output error.\n");
		return;
	}

	while(std::getline(fPhenotypes, sLn)) {
		
		int nId, nPop, nSex, nFatherId, nMotherId;
		sscanf(sLn.c_str(), "%[^\t] %[^\t] %[^\t] %[^\t] %[^\t] %*[^\n]", &nId, &nPop, &nSex, &nFatherId, &nMotherId);
		string sPrelude
		iLn++;
	}
	*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1490, %rsp           # imm = 0x1490
movq %rdx, -0x13b8(%rbp)
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x132f0
leaq -0x69(%rbp), %rdi
movq %rdi, -0x13b0(%rbp)
callq 0x8870
movq -0x13b0(%rbp), %rdx
leaq 0x7d50(%rip), %rsi      # 0x78f37
leaq -0x68(%rbp), %rdi
callq 0xcb30
jmp 0x711f2
leaq 0x3985f(%rip), %rsi     # 0xaaa58
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rdx
callq 0x1c190
jmp 0x71208
leaq -0x68(%rbp), %rdi
callq 0x82e0
leaq -0x69(%rbp), %rdi
callq 0x8540
movq -0x13b8(%rbp), %rsi
leaq 0x8223(%rip), %rdx      # 0x7944b
leaq -0xc0(%rbp), %rdi
callq 0x5bbc0
jmp 0x71236
movl -0x4(%rbp), %esi
leaq -0xe0(%rbp), %rdi
callq 0x71fc0
jmp 0x71247
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x724d0
jmp 0x71263
movq -0x13b8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movq %rsi, -0x13c0(%rbp)
callq 0x8600
movq -0x13c0(%rbp), %rdi
callq 0x82e0
leaq -0xe0(%rbp), %rdi
callq 0x82e0
leaq -0xc0(%rbp), %rdi
callq 0x82e0
movq -0x13b8(%rbp), %rdi
callq 0x81d0
movq %rax, %rdi
callq 0x70df0
jmp 0x712b7
leaq -0x2e0(%rbp), %rdi
callq 0x8810
jmp 0x712c5
leaq -0x4e0(%rbp), %rdi
callq 0x8810
jmp 0x712d3
leaq -0x6e0(%rbp), %rdi
callq 0x8810
jmp 0x712e1
leaq -0x8e0(%rbp), %rdi
callq 0x8810
jmp 0x712ef
leaq -0xae0(%rbp), %rdi
callq 0x8810
jmp 0x712fd
leaq -0xce0(%rbp), %rdi
callq 0x8810
jmp 0x7130b
movq -0x13b8(%rbp), %rsi
leaq 0x8137(%rip), %rdx      # 0x79450
leaq -0xd00(%rbp), %rdi
callq 0x5bbc0
jmp 0x71327
leaq -0xd00(%rbp), %rdi
callq 0x81d0
movq %rax, %rsi
leaq -0xae0(%rbp), %rdi
movl $0x10, %edx
callq 0x8090
jmp 0x71349
leaq -0xd00(%rbp), %rdi
callq 0x82e0
leaq 0x8101(%rip), %rsi      # 0x7945d
leaq -0xce0(%rbp), %rdi
movl $0x10, %edx
callq 0x8090
jmp 0x7136f
leaq -0xf08(%rbp), %rdi
callq 0x8580
jmp 0x7137d
leaq -0x1110(%rbp), %rdi
callq 0x8580
jmp 0x7138b
leaq -0x1130(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x81f0
jmp 0x7139d
movl -0x8(%rbp), %eax
movb $0x0, -0x1171(%rbp)
movb $0x0, -0x1199(%rbp)
cmpl $0x0, %eax
jne 0x713ca
leaq -0x1150(%rbp), %rdi
leaq -0x1130(%rbp), %rsi
callq 0x81f0
jmp 0x713c8
jmp 0x71423
leaq 0x60da(%rip), %rdx      # 0x774ab
leaq -0x1170(%rbp), %rdi
leaq -0x1130(%rbp), %rsi
callq 0x5bbc0
jmp 0x713e6
movb $0x1, -0x1171(%rbp)
movl -0x8(%rbp), %esi
leaq -0x1198(%rbp), %rdi
callq 0x65f20
jmp 0x713fe
movb $0x1, -0x1199(%rbp)
leaq -0x1150(%rbp), %rdi
leaq -0x1170(%rbp), %rsi
leaq -0x1198(%rbp), %rdx
callq 0x724d0
jmp 0x71421
jmp 0x71423
leaq -0x1130(%rbp), %rdi
leaq -0x1150(%rbp), %rsi
callq 0x8600
leaq -0x1150(%rbp), %rdi
callq 0x82e0
testb $0x1, -0x1199(%rbp)
jne 0x7144d
jmp 0x71459
leaq -0x1198(%rbp), %rdi
callq 0x82e0
testb $0x1, -0x1171(%rbp)
jne 0x71464
jmp 0x71470
leaq -0x1170(%rbp), %rdi
callq 0x82e0
leaq 0x7fd4(%rip), %rdx      # 0x7944b
leaq -0x11c0(%rbp), %rdi
leaq -0x1130(%rbp), %rsi
callq 0x5bbc0
jmp 0x7148c
leaq -0x1130(%rbp), %rdi
leaq -0x11c0(%rbp), %rsi
movq %rsi, -0x13c8(%rbp)
callq 0x8600
movq -0x13c8(%rbp), %rdi
callq 0x82e0
movl -0x4(%rbp), %esi
leaq -0x1200(%rbp), %rdi
callq 0x65f20
jmp 0x714c3
leaq -0x11e0(%rbp), %rdi
leaq -0x1130(%rbp), %rsi
leaq -0x1200(%rbp), %rdx
callq 0x725a0
jmp 0x714df
leaq -0x1130(%rbp), %rdi
movq %rdi, -0x13d0(%rbp)
leaq -0x11e0(%rbp), %rsi
movq %rsi, -0x13d8(%rbp)
callq 0x8600
movq -0x13d8(%rbp), %rdi
callq 0x82e0
leaq -0x1200(%rbp), %rdi
callq 0x82e0
movq -0x13d0(%rbp), %rsi
leaq 0x7b7f(%rip), %rdx      # 0x790a5
leaq -0x1220(%rbp), %rdi
callq 0x5bbc0
jmp 0x71534
leaq -0x1220(%rbp), %rdi
callq 0x81d0
movq %rax, %rsi
leaq -0xf08(%rbp), %rdi
movl $0x8, %edx
callq 0x82f0
jmp 0x71556
leaq -0x1220(%rbp), %rdi
callq 0x82e0
leaq 0x7b54(%rip), %rdx      # 0x790bd
leaq -0x1240(%rbp), %rdi
leaq -0x1130(%rbp), %rsi
callq 0x5bbc0
jmp 0x7157e
leaq -0x1240(%rbp), %rdi
callq 0x81d0
movq %rax, %rsi
leaq -0x1110(%rbp), %rdi
movl $0x8, %edx
callq 0x82f0
jmp 0x715a0
leaq -0x1240(%rbp), %rdi
callq 0x82e0
leaq 0x7ebd(%rip), %rsi      # 0x79470
leaq -0x12c0(%rbp), %rdi
leaq -0x1130(%rbp), %rdx
callq 0xc3f0
jmp 0x715c8
leaq 0x7ec2(%rip), %rdx      # 0x79491
leaq -0x12a0(%rbp), %rdi
leaq -0x12c0(%rbp), %rsi
callq 0xca00
jmp 0x715e4
movq -0x13b8(%rbp), %rdx
leaq -0x1280(%rbp), %rdi
leaq -0x12a0(%rbp), %rsi
callq 0x5c2d0
jmp 0x71600
leaq 0x7ea0(%rip), %rdx      # 0x794a7
leaq -0x1260(%rbp), %rdi
leaq -0x1280(%rbp), %rsi
callq 0xca00
jmp 0x7161c
leaq -0x1280(%rbp), %rdi
callq 0x82e0
leaq -0x12a0(%rbp), %rdi
callq 0x82e0
leaq -0x12c0(%rbp), %rdi
callq 0x82e0
leaq -0x1260(%rbp), %rdi
callq 0x81d0
movq %rax, %rsi
leaq 0x7e63(%rip), %rdi      # 0x794b9
xorl %eax, %eax
callq 0x8080
jmp 0x7165f
leaq -0x1260(%rbp), %rdi
callq 0x81d0
movq %rax, %rdi
callq 0x83f0
jmp 0x71675
leaq 0x7e4e(%rip), %rdi      # 0x794ca
xorl %eax, %eax
callq 0x8080
jmp 0x71685
leaq 0x7e5c(%rip), %rsi      # 0x794e8
leaq -0xae0(%rbp), %rdi
callq 0x84a0
movq %rax, -0x13e0(%rbp)
jmp 0x716a1
movq -0x13e0(%rbp), %rdi
movq 0x38881(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x716b6
leaq 0xf93(%rip), %rsi       # 0x72650
leaq -0xae0(%rbp), %rdi
callq 0x8180
movq %rax, -0x13e8(%rbp)
jmp 0x716d2
movq -0x13e8(%rbp), %rdi
leaq 0xfa0(%rip), %rsi       # 0x72680
callq 0x8180
jmp 0x716e7
movl $0x6, %edi
callq 0x12980
movl %eax, -0x13ec(%rbp)
jmp 0x716f9
movl -0x13ec(%rbp), %eax
movl %eax, -0x12c4(%rbp)
movl -0x12c4(%rbp), %esi
leaq -0xae0(%rbp), %rdi
callq 0x8760
jmp 0x71719
leaq 0x39338(%rip), %rax     # 0xaaa58
movq (%rax), %rdi
movl $0x2, %esi
callq 0x1cde0
movq %rax, -0x13f8(%rbp)
jmp 0x71736
movq -0x13f8(%rbp), %rax
movq %rax, -0x12d0(%rbp)
movq -0x12d0(%rbp), %rdi
callq 0x3a680
movq %rax, -0x12d8(%rbp)
movq $0x0, -0x12e0(%rbp)
movq -0x12e0(%rbp), %rax
cmpq -0x12d8(%rbp), %rax
jae 0x71d4d
movq -0x12d0(%rbp), %rdi
movq -0x12e0(%rbp), %rsi
callq 0x726b0
movq %rax, -0x1400(%rbp)
jmp 0x71792
movq -0x1400(%rbp), %rax
movq %rax, -0x12e8(%rbp)
movq $0x1, -0x12f0(%rbp)
movq $0x1, -0x12f8(%rbp)
movq $0x0, -0x1300(%rbp)
cvtsi2sdl 0x10(%rbp), %xmm0
movsd %xmm0, -0x1410(%rbp)
leaq 0x39283(%rip), %rax     # 0xaaa58
movq (%rax), %rdi
movl -0x12e0(%rbp), %esi
callq 0x1ce40
movsd %xmm0, -0x1408(%rbp)
jmp 0x717ed
movsd -0x1408(%rbp), %xmm1
movsd -0x1410(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x1308(%rbp)
movsd -0x1308(%rbp), %xmm0
movsd %xmm0, -0x1418(%rbp)
movq -0x12e8(%rbp), %rdi
callq 0x726f0
movsd -0x1418(%rbp), %xmm0
movq %rax, %xmm1
movaps 0x6747(%rip), %xmm2     # 0x77f80
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x674b(%rip), %xmm2     # 0x77f90
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x1310(%rbp)
movq -0x12e8(%rbp), %rdi
callq 0x5b6d0
movq %rax, -0x1318(%rbp)
movq -0x12e8(%rbp), %rdi
callq 0x2a2d0
movq %rax, -0x1320(%rbp)
leaq -0x1318(%rbp), %rdi
leaq -0x1320(%rbp), %rsi
callq 0x5b700
testb $0x1, %al
jne 0x718a2
jmp 0x71d34
leaq 0x392e7(%rip), %rdi     # 0xaab90
callq 0x19e20
movsd %xmm0, -0x1420(%rbp)
jmp 0x718b8
movsd -0x1420(%rbp), %xmm1
movsd -0x1310(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x71d0f
leaq -0x1318(%rbp), %rdi
callq 0x5b730
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x1328(%rbp)
leaq 0x5900(%rip), %rsi      # 0x771f2
leaq -0xae0(%rbp), %rdi
callq 0x84a0
movq %rax, -0x1428(%rbp)
jmp 0x71907
movq -0x1428(%rbp), %rdi
movq -0x12e0(%rbp), %rsi
incq %rsi
callq 0x8110
movq %rax, -0x1430(%rbp)
jmp 0x71926
movq -0x1430(%rbp), %rdi
leaq 0x5b77(%rip), %rsi      # 0x774ab
callq 0x84a0
movq %rax, -0x1438(%rbp)
jmp 0x71942
movq -0x1438(%rbp), %rdi
movq -0x12f0(%rbp), %rsi
callq 0x8110
movq %rax, -0x1440(%rbp)
jmp 0x7195e
movq -0x1440(%rbp), %rdi
leaq 0x7ba5(%rip), %rsi      # 0x79511
callq 0x84a0
jmp 0x71973
movq -0x12e0(%rbp), %rsi
leaq -0xce0(%rbp), %rdi
callq 0x8110
movq %rax, -0x1448(%rbp)
jmp 0x7198f
movq -0x1448(%rbp), %rdi
leaq 0x5920(%rip), %rsi      # 0x772bd
callq 0x84a0
movq %rax, -0x1450(%rbp)
jmp 0x719ab
movq -0x1450(%rbp), %rdi
movq -0x12f0(%rbp), %rsi
decq %rsi
callq 0x8110
movq %rax, -0x1458(%rbp)
jmp 0x719ca
movq -0x1458(%rbp), %rdi
leaq 0x58e5(%rip), %rsi      # 0x772bd
callq 0x84a0
movq %rax, -0x1460(%rbp)
jmp 0x719e6
movq -0x1460(%rbp), %rdi
movsd -0x1328(%rbp), %xmm0
callq 0x88c0
movq %rax, -0x1468(%rbp)
jmp 0x71a03
movq -0x1468(%rbp), %rdi
movq 0x3851f(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x71a18
cmpq $0x1, -0x12f8(%rbp)
jne 0x71c77
leaq 0x7ae8(%rip), %rsi      # 0x79515
leaq -0xae0(%rbp), %rdi
callq 0x84a0
jmp 0x71a3b
jmp 0x71cb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71a63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x82e0
leaq -0x69(%rbp), %rdi
callq 0x8540
jmp 0x71fa8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71aa8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x82e0
leaq -0xc0(%rbp), %rdi
callq 0x82e0
jmp 0x71f9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xd00(%rbp), %rdi
callq 0x82e0
jmp 0x71f57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71ba2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
testb $0x1, -0x1199(%rbp)
jne 0x71b94
jmp 0x71ba0
leaq -0x1198(%rbp), %rdi
callq 0x82e0
jmp 0x71ba2
testb $0x1, -0x1171(%rbp)
jne 0x71bad
jmp 0x71bb9
leaq -0x1170(%rbp), %rdi
callq 0x82e0
jmp 0x71f33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1200(%rbp), %rdi
callq 0x82e0
jmp 0x71f33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1220(%rbp), %rdi
callq 0x82e0
jmp 0x71f33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1240(%rbp), %rdi
callq 0x82e0
jmp 0x71f33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71c55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71c49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1280(%rbp), %rdi
callq 0x82e0
leaq -0x12a0(%rbp), %rdi
callq 0x82e0
leaq -0x12c0(%rbp), %rdi
callq 0x82e0
jmp 0x71f33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f27
movsd -0x1328(%rbp), %xmm0
movsd -0x1300(%rbp), %xmm1
subsd %xmm1, %xmm0
leaq -0xae0(%rbp), %rdi
callq 0x88c0
movq %rax, -0x1470(%rbp)
jmp 0x71ca0
movq -0x1470(%rbp), %rdi
leaq 0x560f(%rip), %rsi      # 0x772bd
callq 0x84a0
jmp 0x71cb5
jmp 0x71cb7
movsd -0x1328(%rbp), %xmm0
movsd %xmm0, -0x1300(%rbp)
movq -0x12e0(%rbp), %rsi
incq %rsi
leaq -0xae0(%rbp), %rdi
callq 0x8110
movq %rax, -0x1478(%rbp)
jmp 0x71ce6
movq -0x1478(%rbp), %rdi
movq 0x3823c(%rip), %rsi     # 0xa9f30
callq 0x8520
jmp 0x71cfb
movq -0x12f8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x12f8(%rbp)
jmp 0x71d11
jmp 0x71d11
movq -0x12f0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x12f0(%rbp)
leaq -0x1318(%rbp), %rdi
callq 0x38650
jmp 0x71873
jmp 0x71d36
movq -0x12e0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x12e0(%rbp)
jmp 0x71762
leaq -0xce0(%rbp), %rdi
callq 0x86d0
jmp 0x71d5b
leaq 0x77b7(%rip), %rsi      # 0x79519
leaq -0x13a8(%rbp), %rdi
leaq -0x1130(%rbp), %rdx
callq 0xc3f0
jmp 0x71d77
leaq 0x77bb(%rip), %rdx      # 0x79539
leaq -0x1388(%rbp), %rdi
leaq -0x13a8(%rbp), %rsi
callq 0xca00
jmp 0x71d93
movq -0x13b8(%rbp), %rdx
leaq -0x1368(%rbp), %rdi
leaq -0x1388(%rbp), %rsi
callq 0x5c2d0
jmp 0x71daf
leaq 0x7796(%rip), %rdx      # 0x7954c
leaq -0x1348(%rbp), %rdi
leaq -0x1368(%rbp), %rsi
callq 0xca00
jmp 0x71dcb
leaq -0x1260(%rbp), %rdi
movq %rdi, -0x1480(%rbp)
leaq -0x1348(%rbp), %rsi
movq %rsi, -0x1488(%rbp)
callq 0x8600
movq -0x1488(%rbp), %rdi
callq 0x82e0
leaq -0x1368(%rbp), %rdi
callq 0x82e0
leaq -0x1388(%rbp), %rdi
callq 0x82e0
leaq -0x13a8(%rbp), %rdi
callq 0x82e0
movq -0x1480(%rbp), %rdi
callq 0x81d0
movq %rax, %rsi
leaq 0x7687(%rip), %rdi      # 0x794b9
xorl %eax, %eax
callq 0x8080
jmp 0x71e3b
leaq -0x1260(%rbp), %rdi
callq 0x81d0
movq %rax, %rdi
callq 0x83f0
jmp 0x71e51
leaq -0x1260(%rbp), %rdi
callq 0x82e0
leaq -0x1130(%rbp), %rdi
callq 0x82e0
leaq -0x1110(%rbp), %rdi
callq 0x8140
leaq -0xf08(%rbp), %rdi
callq 0x8140
leaq -0xce0(%rbp), %rdi
callq 0x8700
leaq -0xae0(%rbp), %rdi
callq 0x8700
leaq -0x8e0(%rbp), %rdi
callq 0x8700
leaq -0x6e0(%rbp), %rdi
callq 0x8700
leaq -0x4e0(%rbp), %rdi
callq 0x8700
leaq -0x2e0(%rbp), %rdi
callq 0x8700
leaq -0x48(%rbp), %rdi
callq 0x82e0
addq $0x1490, %rsp           # imm = 0x1490
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x71f0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1368(%rbp), %rdi
callq 0x82e0
leaq -0x1388(%rbp), %rdi
callq 0x82e0
leaq -0x13a8(%rbp), %rdi
callq 0x82e0
leaq -0x1260(%rbp), %rdi
callq 0x82e0
leaq -0x1130(%rbp), %rdi
callq 0x82e0
leaq -0x1110(%rbp), %rdi
callq 0x8140
leaq -0xf08(%rbp), %rdi
callq 0x8140
leaq -0xce0(%rbp), %rdi
callq 0x8700
leaq -0xae0(%rbp), %rdi
callq 0x8700
leaq -0x8e0(%rbp), %rdi
callq 0x8700
leaq -0x6e0(%rbp), %rdi
callq 0x8700
leaq -0x4e0(%rbp), %rdi
callq 0x8700
leaq -0x2e0(%rbp), %rdi
callq 0x8700
leaq -0x48(%rbp), %rdi
callq 0x82e0
movq -0x78(%rbp), %rdi
callq 0x8860
nopw %cs:(%rax,%rax)