// File: /workspace/github_cpp_makefile_star2_O2/melop[P]admixem/config.cpp
// Function: GeneConfigurations::LoadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void GeneConfigurations::LoadFromFile(string szConfigFile) {
	#ifdef _OPENMP
		int nTotalCPUCore =  omp_get_max_threads();//omp_get_num_threads();
		//printf("OpenMP enabled\n");
	#else
		int nTotalCPUCore = 1;
		//printf("OpenMP disabled \n");
	#endif

	this->_nHaploidChrNum = ((SimulationConfigurations *)this->_pParentConfig)->pMarkerConfig->GetHaploidChromosomeNum();

	//Initialize _mpGenes
	//this->_mpGenes = new map<double, GeneProperties>[_nHaploidChrNum];
	//this->_mpGeneIndex = new map<double, int>[_nHaploidChrNum];
	vector<int> vIndexCounters;
	vector< map<double , GeneProperties> > mpGenes;
	vector< map<double, int> > mpGeneIndex;

	for (int i=0;i<_nHaploidChrNum;i++) {
		map<double , GeneProperties> oPlaceHolderMap1;
		map<double, int> oPlaceHolderMap2;

		mpGenes.push_back(oPlaceHolderMap1);
		mpGeneIndex.push_back(oPlaceHolderMap2);

		vIndexCounters.push_back(0);
	}

	FILE *pConfigFile;
	char szBuffer[12048];
	char szGeneName[100];
	char szMode[20];
	int nChr;
	double  nPos, nDomVal, nRecesVal , nDominantFreqPop1, nDominantFreqPop2;
	char nDominantName, nRecessiveName;

	
	
	printf("Start loading gene file %s ...\n", szConfigFile.c_str());

	_szConfigFilename = szConfigFile; // save name of config file

	pConfigFile = fopen(szConfigFile.c_str(), "r");

	if (!pConfigFile) {
		printf("%s\n", "Cannot open phenotype file ...");
		throw "Cannot open gene file!";
	}

	if (fgets(szBuffer, 2048, pConfigFile) == NULL) { // skip the header line
		throw "Cannot read gene file!";
	}

	

	while(fgets(szBuffer, 12048, pConfigFile) != NULL) 
	{
		
		if (sscanf(szBuffer, "%[^\t\n]	%d	%lf	%c	%lf	%c	%lf	%s %lf %lf", szGeneName, &nChr ,&nPos, &nDominantName, &nDomVal, &nRecessiveName, &nRecesVal, szMode, &nDominantFreqPop1, &nDominantFreqPop2  ) != 10) {
			continue;//empty line
			
		};
		
		if (nChr > this->_nHaploidChrNum || nChr <=0) {
			throw "Chromosome number incorrect in the gene file!";
		}

		GeneProperties oGeneProp;
		oGeneProp.AlleleMode = strcmp(szMode,"Dominant")==0? GeneProperties::Dominant: strcmp(szMode,"Additive")==0? GeneProperties::Additive : GeneProperties::Hemizygous;
		oGeneProp.GeneName = szGeneName;
		oGeneProp.DominantLabel = nDominantName;
		oGeneProp.DominantValue = nDomVal;
		oGeneProp.RecessiveLabel = nRecessiveName;
		oGeneProp.RecessiveValue = nRecesVal;
		oGeneProp.DominantFreqPop1 = nDominantFreqPop1;
		oGeneProp.DominantFreqPop2 = nDominantFreqPop2;

		mpGenes[nChr-1][nPos] = oGeneProp;
		mpGeneIndex[nChr-1][nPos] = vIndexCounters.at(nChr-1);
		vIndexCounters.at(nChr-1) += 1;
		//nIndexCounter++;
		
	}

	
	//Try opening muation file too
	string szMutationFile = ((SimulationConfigurations *)this->_pParentConfig)->GetConfig("GeneMutationFile");
	if (szMutationFile=="") {
		std::printf("No mutation file specified for genes, no mutations will be carried out\n");
	}
	else {
		FILE *pMutationFile;
		char szBuffer[12048];
		char szFormula[12048];
		char szGeneName[100];
		char szPopName[1000];
		int nChr, nStartGen, nEndGen;
		double  nPos, nMuteRate, nLowerBound , nUpperBound;


		pMutationFile = fopen(szMutationFile.c_str(), "r");

		if (!pMutationFile) {
			printf("%s\n", "Cannot open gene mutation file ...");
			throw "Cannot open mutation file!";
		}

		if (fgets(szBuffer, 12048, pMutationFile) == NULL) { // skip the header line
			throw "Cannot read mutation file!";
		}

		while(fgets(szBuffer, 12048, pMutationFile) != NULL) 
		{
			bool bLongLineFormat = true;
			if (sscanf(szBuffer, "%[^\t\n]	%d	%lf	%[^\t\n]	%d	%d	%lf	%lf	%lf %s", szGeneName, &nChr ,&nPos, szPopName, &nStartGen, &nEndGen, &nMuteRate, &nLowerBound, &nUpperBound, szFormula  ) != 10) {
				
				//see if line in short format
				if (sscanf(szBuffer, "%[^\t\n]	%d	%lf	%lf	%lf	%lf %s", szGeneName, &nChr ,&nPos, &nMuteRate, &nLowerBound, &nUpperBound, szFormula  ) != 7) {
					continue;//empty line
				}
				else {
					bLongLineFormat = false;
				}
			}
			

			if (mpGenes.size() < nChr)
			{
				std::printf("Warning: Gene mutation definition applied to an undefined chromosome: %d", nChr);
			}
			else if (mpGenes[nChr-1].find(nPos) == mpGenes[nChr-1].end()) {//
				std::printf("Warning: Gene mutation definition applied to an undefined location: %f on chromosome %d", nPos, nChr);
			}
			else {
				mpGenes[nChr-1][nPos].MutationProb = nMuteRate;
				mpGenes[nChr-1][nPos].LowerBound = nLowerBound;
				mpGenes[nChr-1][nPos].UpperBound = nUpperBound;
				mpGenes[nChr-1][nPos].pFormula = new Parser(szFormula);
				mpGenes[nChr-1][nPos].sFormula = szFormula;
				string sPopName;
				if (bLongLineFormat) {
					mpGenes[nChr-1][nPos].Pops.insert( sPopName=szPopName );
					mpGenes[nChr-1][nPos].StartGen = nStartGen;
					mpGenes[nChr-1][nPos].EndGen = nEndGen;
				}
				else {
					//SHORT FORMAT DEFAULT TO ANY POP, ANY GEN
					mpGenes[nChr-1][nPos].Pops.insert( sPopName = "!ANYPOP" );
					mpGenes[nChr-1][nPos].StartGen = -1;
					mpGenes[nChr-1][nPos].EndGen = -1;
				}
				std::printf("Mutation rule %s (prob=%f) loaded for chr %d : %f, at Generations %d to %d in population %s\n", szFormula, nMuteRate, nChr, nPos, mpGenes[nChr-1][nPos].StartGen, mpGenes[nChr-1][nPos].EndGen, sPopName.c_str() );
			}

			
		};
		
	}

	for( int nCPU=0; nCPU<nTotalCPUCore ; nCPU++) {
		this->_mpmpGenes[nCPU] = mpGenes;
		this->_mpmpGeneIndex[nCPU] = mpGeneIndex;

	}

	//printf("%f \n", this->_mpGenes[23][100.0].DominantFreqPop1);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x9368, %rsp           # imm = 0x9368
movq %rsi, 0x20(%rsp)
movq 0x28(%rdi), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq %rdi, 0x48(%rsp)
movl %eax, 0x20(%rdi)
xorps %xmm0, %xmm0
leaq 0xa0(%rsp), %rcx
movaps %xmm0, (%rcx)
andq $0x0, 0x10(%rcx)
leaq 0x30(%rsp), %rcx
andq $0x0, 0x10(%rcx)
leaq 0xe0(%rsp), %r12
andq $0x0, 0x10(%r12)
movaps %xmm0, (%rcx)
movaps %xmm0, (%r12)
leaq 0x3548(%rsp), %rbx
xorl %r14d, %r14d
leaq 0x248(%rsp), %r15
leaq 0x3540(%rsp), %r13
leaq 0x240(%rsp), %rbp
cmpl %eax, %r14d
jge 0x153ec
andl $0x0, 0x3548(%rsp)
andq $0x0, 0x3550(%rsp)
movq %rbx, 0x3558(%rsp)
movq %rbx, 0x3560(%rsp)
andq $0x0, 0x3568(%rsp)
andl $0x0, 0x248(%rsp)
andq $0x0, 0x250(%rsp)
movq %r15, 0x258(%rsp)
movq %r15, 0x260(%rsp)
andq $0x0, 0x268(%rsp)
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x178a0
movq %r12, %rdi
movq %rbp, %rsi
callq 0x16ea4
andl $0x0, 0x6450(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x6450(%rsp), %rsi
callq 0x18e10
movq %rbp, %rdi
callq 0x17c40
movq %r13, %rdi
callq 0x18bc4
incl %r14d
movq 0x48(%rsp), %rax
movl 0x20(%rax), %eax
jmp 0x1533a
movq 0x20(%rsp), %rbx
movq (%rbx), %rsi
leaq 0x18ed3(%rip), %rdi     # 0x2e2ce
xorl %eax, %eax
callq 0x7050
movq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x7220
movq (%rbx), %rdi
leaq 0x1a881(%rip), %rsi     # 0x2fc9a
callq 0x74a0
testq %rax, %rax
je 0x15caa
movq %rax, %r15
leaq 0x3540(%rsp), %rdi
movl $0x800, %esi            # imm = 0x800
movq %rax, %rdx
callq 0x75e0
testq %rax, %rax
je 0x15cbf
leaq 0x3540(%rsp), %r12
leaq 0xc0(%rsp), %rbx
leaq 0xc8(%rsp), %r13
leaq 0x140(%rsp), %r14
leaq 0xd0(%rsp), %rbp
leaq 0x18ecc(%rip), %rax     # 0x2e343
movq %rax, 0x20(%rsp)
movq %r12, %rdi
movl $0x2f10, %esi           # imm = 0x2F10
movq %r15, %rdx
callq 0x75e0
testq %rax, %rax
je 0x156c9
movq %r12, %rdi
leaq 0x18e7d(%rip), %rsi     # 0x2e31c
leaq 0x1d0(%rsp), %rdx
leaq 0x14(%rsp), %rcx
leaq 0x78(%rsp), %r8
leaq 0x13(%rsp), %r9
xorl %eax, %eax
pushq %rbx
pushq %r13
pushq %r14
pushq %rbp
leaq 0x32(%rsp), %r10
pushq %r10
leaq 0x100(%rsp), %r10
pushq %r10
callq 0x73c0
addq $0x30, %rsp
cmpl $0xa, %eax
jne 0x1547c
movl 0x14(%rsp), %eax
testl %eax, %eax
jle 0x15ccb
movq 0x48(%rsp), %rcx
cmpl 0x20(%rcx), %eax
pushq $0x9
popq %r12
jg 0x15ccb
leaq 0x250(%rsp), %rax
movq %rax, 0x240(%rsp)
andq $0x0, 0x248(%rsp)
xorl %ecx, %ecx
movb %cl, 0x250(%rsp)
leaq 0x2c0(%rsp), %rax
movq %rax, 0x2b0(%rsp)
andq $0x0, 0x2b8(%rsp)
movb %cl, 0x2c0(%rsp)
andl $0x0, 0x2d8(%rsp)
andq $0x0, 0x2e0(%rsp)
leaq 0x2d8(%rsp), %rax
movq %rax, 0x2e8(%rsp)
movq %rax, 0x2f0(%rsp)
andq $0x0, 0x2f8(%rsp)
andq $0x0, 0x290(%rsp)
movq %r14, %rdi
leaq 0x18def(%rip), %rsi     # 0x2e371
movq %r12, %rdx
callq 0x7420
pushq $0x2
popq %rcx
testl %eax, %eax
je 0x155aa
movq %r14, %rdi
leaq 0x18ddf(%rip), %rsi     # 0x2e37a
movq %r12, %rdx
callq 0x7420
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movq %r14, %r12
movl %ecx, 0x288(%rsp)
leaq 0x240(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x7730
movb 0x13(%rsp), %al
movb %al, 0x260(%rsp)
movsd 0xd8(%rsp), %xmm0
movsd %xmm0, 0x268(%rsp)
movb 0x12(%rsp), %al
movb %al, 0x261(%rsp)
movsd 0xd0(%rsp), %xmm0
movsd %xmm0, 0x270(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x278(%rsp)
movsd 0xc0(%rsp), %xmm0
movsd %xmm0, 0x280(%rsp)
movslq 0x14(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
leaq 0x78(%rsp), %rsi
callq 0x17926
movq %rax, %rdi
leaq 0x240(%rsp), %rsi
callq 0x15dee
movslq 0x14(%rsp), %rsi
decq %rsi
leaq 0xa0(%rsp), %rdi
callq 0x16f22
movl (%rax), %r14d
movslq 0x14(%rsp), %rax
movq 0xe0(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
leaq 0x78(%rsp), %rsi
callq 0x16f44
movl %r14d, (%rax)
movslq 0x14(%rsp), %rsi
decq %rsi
leaq 0xa0(%rsp), %rdi
callq 0x16f22
incl (%rax)
leaq 0x240(%rsp), %rdi
callq 0x17978
movq %r12, %r14
leaq 0x3540(%rsp), %r12
jmp 0x1547c
movq 0x48(%rsp), %rax
movq 0x28(%rax), %rbx
leaq 0x18caa(%rip), %rsi     # 0x2e383
leaq 0x120(%rsp), %rdi
leaq 0x240(%rsp), %rdx
callq 0x9512
leaq 0x100(%rsp), %rdi
leaq 0x120(%rsp), %rdx
movq %rbx, %rsi
callq 0xf118
leaq 0x120(%rsp), %rdi
callq 0x71a0
leaq 0x188cf(%rip), %rsi     # 0x2dfe9
leaq 0x100(%rsp), %rdi
callq 0x954d
testb %al, %al
je 0x157e4
leaq 0x195b1(%rip), %rdi     # 0x2ece7
callq 0x75c0
movq 0x48(%rsp), %r13
leaq 0x30(%r13), %rbx
addq $0x60, %r13
xorl %eax, %eax
leaq 0x240(%rsp), %r14
leaq 0x30(%rsp), %r15
leaq 0xe0(%rsp), %r12
movl %eax, 0x240(%rsp)
testl %eax, %eax
jg 0x157a1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1799a
movq %rax, %rdi
movq %r15, %rsi
callq 0x179e8
movq %r13, %rdi
movq %r14, %rsi
callq 0x17ac6
movq %rax, %rdi
movq %r12, %rsi
callq 0x17b14
movl 0x240(%rsp), %eax
incl %eax
jmp 0x1575f
leaq 0x100(%rsp), %rdi
callq 0x71a0
leaq 0xe0(%rsp), %rdi
callq 0x17bf2
leaq 0x30(%rsp), %rdi
callq 0x17c14
leaq 0xa0(%rsp), %rdi
callq 0x18d86
addq $0x9368, %rsp           # imm = 0x9368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x100(%rsp), %rdi
leaq 0x1a4a7(%rip), %rsi     # 0x2fc9a
callq 0x74a0
testq %rax, %rax
je 0x15cec
leaq 0x240(%rsp), %rdi
movl $0x2f10, %esi           # imm = 0x2F10
movq %rax, 0x20(%rsp)
movq %rax, %rdx
callq 0x75e0
testq %rax, %rax
je 0x15d01
leaq 0x240(%rsp), %rbx
leaq 0x70(%rsp), %rbp
leaq 0x3150(%rsp), %r15
movq %rbx, %rdi
movl $0x2f10, %esi           # imm = 0x2F10
movq 0x20(%rsp), %rdx
callq 0x75e0
testq %rax, %rax
je 0x1573b
movq %rbx, %rdi
leaq 0x18b8f(%rip), %rsi     # 0x2e3ed
leaq 0x160(%rsp), %rdx
leaq 0xc(%rsp), %rcx
movq %rbp, %r8
movq %r15, %r9
xorl %eax, %eax
leaq 0x6450(%rsp), %r10
pushq %r10
leaq 0x68(%rsp), %r10
pushq %r10
leaq 0x78(%rsp), %r10
pushq %r10
leaq 0x68(%rsp), %r10
pushq %r10
leaq 0x78(%rsp), %r10
pushq %r10
leaq 0x84(%rsp), %r10
pushq %r10
callq 0x73c0
addq $0x30, %rsp
movl %eax, %r13d
cmpl $0xa, %eax
je 0x15906
subq $0x8, %rsp
movq %rbx, %rdi
leaq 0x18b55(%rip), %rsi     # 0x2e417
leaq 0x168(%rsp), %rdx
leaq 0x14(%rsp), %rcx
movq %rbp, %r8
leaq 0x58(%rsp), %r9
xorl %eax, %eax
leaq 0x6458(%rsp), %r10
pushq %r10
leaq 0x70(%rsp), %r10
pushq %r10
leaq 0x80(%rsp), %r10
pushq %r10
callq 0x73c0
addq $0x20, %rsp
cmpl $0x7, %eax
jne 0x15839
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
subq %rcx, %rax
cqto
pushq $0x30
popq %rsi
idivq %rsi
movslq 0xc(%rsp), %rsi
cmpq %rsi, %rax
jae 0x15940
leaq 0x18b08(%rip), %rdi     # 0x2e434
xorl %eax, %eax
callq 0x7050
leaq 0x240(%rsp), %rbx
jmp 0x15839
imulq $0x30, %rsi, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
movq %rbp, %rsi
callq 0x1e9f2
movslq 0xc(%rsp), %rsi
movq 0x30(%rsp), %rdi
imulq $0x30, %rsi, %rcx
leaq (%rdi,%rcx), %rdx
addq $-0x28, %rdx
cmpq %rdx, %rax
je 0x15b5d
addq %rcx, %rdi
addq $-0x30, %rdi
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %rbp, %rsi
callq 0x17926
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x50(%rax)
movsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movslq 0xc(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
movq %rbp, %rsi
callq 0x17926
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x58(%rax)
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movslq 0xc(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
movq %rbp, %rsi
callq 0x17926
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x60(%rax)
movl $0x98, %edi
callq 0x73f0
movq %rax, %r14
leaq 0x80(%rsp), %r12
movq %r12, %rdi
leaq 0x6450(%rsp), %rsi
leaq 0x2f(%rsp), %rdx
callq 0x9512
movb $0x1, %bl
movq %r14, %rdi
movq %r12, %rsi
callq 0x1714c
movslq 0xc(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
xorl %ebx, %ebx
movq %rbp, %rsi
callq 0x17926
movq %r14, 0x68(%rax)
leaq 0x80(%rsp), %rdi
callq 0x71a0
movslq 0xc(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
movq %rbp, %rsi
callq 0x17926
addq $0x70, %rax
movq %rax, %rdi
leaq 0x6450(%rsp), %rsi
callq 0x7730
andq $0x0, 0x88(%rsp)
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movb $0x0, 0x90(%rsp)
cmpl $0xa, %r13d
jne 0x15b7e
movq %rbp, %rsi
callq 0x17926
leaq 0x80(%rsp), %r13
movq %rax, %rbx
movq %r13, %rdi
movq %r15, %rsi
callq 0x7730
addq $0x90, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1ea2c
movl 0x5c(%rsp), %ebx
movslq 0xc(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
movq %rbp, %rsi
callq 0x17926
movl %ebx, 0xc0(%rax)
movl 0x58(%rsp), %ebx
movslq 0xc(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
movq %rbp, %rsi
callq 0x17926
jmp 0x15bf8
movsd 0x70(%rsp), %xmm0
leaq 0x18913(%rip), %rdi     # 0x2e47d
movb $0x1, %al
callq 0x7050
leaq 0x240(%rsp), %rbx
jmp 0x15839
movq %rbp, %rsi
callq 0x17926
leaq 0x80(%rsp), %r13
movq %rax, %rbx
movq %r13, %rdi
leaq 0x1893a(%rip), %rsi     # 0x2e4d5
callq 0x7730
addq $0x90, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1ea2c
movslq 0xc(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
movq %rbp, %rsi
callq 0x17926
orl $-0x1, 0xc0(%rax)
movslq 0xc(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
movq %rbp, %rsi
callq 0x17926
pushq $-0x1
popq %rbx
movl %ebx, 0xc4(%rax)
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movslq 0xc(%rsp), %rbx
movsd 0x70(%rsp), %xmm0
movsd %xmm0, 0xb8(%rsp)
movq 0x30(%rsp), %rax
imulq $0x30, %rbx, %rcx
leaq (%rax,%rcx), %rdi
addq $-0x30, %rdi
movq %rbp, %rsi
callq 0x17926
movl 0xc0(%rax), %r14d
movslq 0xc(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x30, %rdi
movq %rbp, %rsi
callq 0x17926
movl 0xc4(%rax), %r8d
movq 0x80(%rsp), %r9
leaq 0x1886b(%rip), %rdi     # 0x2e4dd
leaq 0x6450(%rsp), %rsi
movsd 0x18(%rsp), %xmm0
movl %ebx, %edx
movsd 0xb8(%rsp), %xmm1
movl %r14d, %ecx
movb $0x2, %al
callq 0x7050
movq %r13, %rdi
callq 0x71a0
leaq 0x240(%rsp), %rbx
jmp 0x15839
leaq 0x1814c(%rip), %rdi     # 0x2ddfd
callq 0x75c0
leaq 0x18631(%rip), %rax     # 0x2e2ee
jmp 0x15cc6
leaq 0x1863f(%rip), %rax     # 0x2e305
movq %rax, 0x20(%rsp)
pushq $0x8
popq %rdi
callq 0x71d0
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movq 0x2f26e(%rip), %rsi     # 0x44f50
movq %rax, %rdi
xorl %edx, %edx
callq 0x76a0
leaq 0x186a1(%rip), %rdi     # 0x2e394
callq 0x75c0
leaq 0x186b8(%rip), %rbx     # 0x2e3b7
jmp 0x15d08
leaq 0x186ca(%rip), %rbx     # 0x2e3d2
pushq $0x8
popq %rdi
callq 0x71d0
movq %rbx, (%rax)
movq 0x2f236(%rip), %rsi     # 0x44f50
movq %rax, %rdi
xorl %edx, %edx
callq 0x76a0
jmp 0x15db1
movq %rax, %r15
leaq 0x120(%rsp), %rdi
jmp 0x15dbc
jmp 0x15d65
movq %rax, %r15
jmp 0x15d56
jmp 0x15db1
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x71a0
testb %bl, %bl
je 0x15db4
movl $0x98, %esi
movq %r14, %rdi
callq 0x7400
jmp 0x15db4
movq %rax, %r15
jmp 0x15dc1
jmp 0x15db1
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x71a0
jmp 0x15db4
jmp 0x15d80
movq %rax, %r15
leaq 0x240(%rsp), %rdi
callq 0x17c40
leaq 0x3540(%rsp), %rdi
callq 0x18bc4
jmp 0x15dc1
movq %rax, %r15
leaq 0x240(%rsp), %rdi
callq 0x17978
jmp 0x15dc1
movq %rax, %r15
leaq 0x100(%rsp), %rdi
callq 0x71a0
leaq 0xe0(%rsp), %rdi
callq 0x17bf2
leaq 0x30(%rsp), %rdi
callq 0x17c14
leaq 0xa0(%rsp), %rdi
callq 0x18d86
movq %r15, %rdi
callq 0x76d0
nop