// File: /workspace/github_cpp_makefile_star2_O2/melop[P]admixem/config.cpp
// Function: SexualSelectionConfigurations::LoadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void SexualSelectionConfigurations::LoadFromFile(string szConfigFile)
{
	ifstream fsConfigFile;
	string sBuffer;
	char szPopName[MAXLINE];
	char szFormula[MAXLINE];
	
	#ifdef _OPENMP
		int nTotalCPUCore = omp_get_max_threads();//omp_get_num_threads();
	#else
		int nTotalCPUCore = 1;
	#endif
	
	printf("Start loading sexual selection file %s ...\n", szConfigFile.c_str());

	_szConfigFilename = szConfigFile; // save name of config file

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

	if (!fsConfigFile.is_open()) {
		printf("%s\n", "Cannot open sexual selection file ...");
		throw "Cannot open sexual selection file!";
	}

	getline(fsConfigFile,sBuffer);
	if (sBuffer == "") { // skip the header line
		throw "Cannot read sexual selection file!";
	}


	while(fsConfigFile.good()) 
	{
		getline(fsConfigFile,sBuffer);
		string sPopName, sFormula;
		int nGen = -1;
		sBuffer.erase(sBuffer.find_last_not_of(" \n\r\t")+1);//trim
		if (sBuffer == "") {
			continue;
		}
		sscanf(sBuffer.c_str(), "%[^\t\n]	%d	%[^\t\n]", szPopName, &nGen, szFormula);
		sPopName = szPopName; //make it string so that it saves lots of trouble of fuddling with c strings... i hate c strings.
		sFormula = szFormula;
		printf("Parsing sexual rule for Pop %s : %s for gen %d\n", sPopName.c_str(), sFormula.c_str(), nGen);
		if (sPopName.length() != 0 && sFormula.length() !=0) {
			
			

			if (this->_mpRules.find(sPopName) == this->_mpRules.end()) { // if this pop is not in the map yet
				list< string > vsFormulae;
				list< pair< Parser * , int > > vpFormulae;
				list< vector<string> > vvsSymbols;
				list< vector<string> > vvsSymbols2;
				list< vector<string> > vvsSymbols3;
				list< vector<string> > vvsSymbols4;
				list< vector<string> > vvsSymbols5;
				list< vector<string> > vvsSymbols6;
				list< vector<string> > vvsSymbols7;
				list< vector<string> > vvsSymbols8;
				list< vector<string> > vvsSymbols9;
				list< vector<string> > vvsSymbols10;
				list< vector<string> > vvsSymbols11;
				list< vector<string> > vvsSymbols12;
				list< vector<string> > vvsSymbols13;
				list< vector<string> > vvsSymbols14;

				this->_mpRules[sPopName] = vsFormulae;
				for(int nCPU=0;nCPU<nTotalCPUCore;nCPU++) {
					printf("%d CPU cores found, putting sexual selection parser on CPU %d\n",nTotalCPUCore, nCPU );
					if (this->_mpmpRuleFormulae.find(nCPU) == this->_mpmpRuleFormulae.end()) {
						 map<string , list< pair<Parser *, int> > > mpRuleFormulae;
						this->_mpmpRuleFormulae[nCPU] =  mpRuleFormulae;
					}
					this->_mpmpRuleFormulae[nCPU][sPopName] = vpFormulae;
				}
				this->_mpRuleFormulaSymbolStrings[sPopName] = vvsSymbols;
				this->_mpRuleFormulaSymbolStringsCourter[sPopName] = vvsSymbols2;
				this->_mpRuleFormulaSymbolStringsChooser[sPopName] = vvsSymbols3;
				this->_mpRuleFormulaSymbolStringsPopWide[sPopName] = vvsSymbols4;
				this->_mpRuleFormulaSymbolStringsPopWideChooser[sPopName] = vvsSymbols5;
				this->_mpRuleFormulaSymbolStringsPopWideCourter[sPopName] = vvsSymbols6;
				this->_mpRuleFormulaSymbolStringsDad[sPopName] = vvsSymbols7;
				this->_mpRuleFormulaSymbolStringsMom[sPopName] = vvsSymbols8;
				
				this->_mpRuleFormulaSymbolStringsCurrPopWidePrevGen[sPopName] = vvsSymbols9; // Symbols that are population-wide values from prev gen. of current pop
				this->_mpRuleFormulaSymbolStringsCurrPopWidePrevGenCourter[sPopName] = vvsSymbols10; // Symbols that are population-wide courter values from prev gen. of current pop
				this->_mpRuleFormulaSymbolStringsCurrPopWidePrevGenChooser[sPopName] = vvsSymbols11; // Symbols that are population-wide chooser values from prev gen. of current pop
				this->_mpRuleFormulaSymbolStringsPrevPopWidePrevGen[sPopName] = vvsSymbols12; // Symbols that are population-wide values from prev gen. of previous pop, if the individual did not migrate, previous pop = current pop
				this->_mpRuleFormulaSymbolStringsPrevPopWidePrevGenCourter[sPopName] = vvsSymbols13; // Symbols that are population-wide courter values from prev gen. of previous pop, if the individual did not migrate, previous pop = current pop
				this->_mpRuleFormulaSymbolStringsPrevPopWidePrevGenChooser[sPopName] = vvsSymbols14; // Symbols that are population-wide chooser values from prev gen. of previous pop, if the individual did not migrate, previous pop = current pop

			
			}

			
			
			Parser * pF = new Parser("");
			try {
				pF->Evaluate(sFormula);
			}
			catch(std::runtime_error e) {
				if ( string(e.what()) == "Divide by zero" ) {
					
					printf("Warning in formula: %s \nErrMsg:%s\nThis could simply be caused by uninitialized values", sFormula.c_str(), e.what());
					
					
				}
				else {
					printf("Error occured when trying to parse formula: %s \nErrMsg:%s\nPlease check formulae grammar!", sFormula.c_str(), e.what());
					exit(100);
				}
			}

			vector<string> vSymbolStrings; // all symbols
			vector<string> vSymbolStringsCourter; // only symbols referring to an individual courter's trait prefixed with Courter_
			vector<string> vSymbolStringsPopWideCourter; // symbols referring to population-level variables prefixed with PopCourter_
			vector<string> vSymbolStringsChooser; //symbols referring to individual chooser trait prefixed with My_
			vector<string> vSymbolStringsPopWideChooser;//symbols referring to population-level variables prefixed with PopChooser_
			vector<string> vSymbolStringsPopWide; // symbols referring to population-level variables prefixed with Pop_
			vector<string> vSymbolStringsDad; // symbols referring to population-level variables prefixed with Dad_
			vector<string> vSymbolStringsMom; // symbols referring to population-level variables prefixed with Mom_

			vector<string> vSymbolStringsCurrPopWidePrevGen; //PrevGenCurrPop_
			vector<string> vSymbolStringsCurrPopWidePrevGenCourter; //PrevGenCurrPopCourter_
			vector<string> vSymbolStringsCurrPopWidePrevGenChooser; //PrevGenCurrPopChooser_
			vector<string> vSymbolStringsPrevPopWidePrevGen; //PrevGenPrevPop_
			vector<string> vSymbolStringsPrevPopWidePrevGenCourter;  //PrevGenPrevPopCourter_
			vector<string> vSymbolStringsPrevPopWidePrevGenChooser; //PrevGenPrevPopChooser_

			//list all the symbols used in this formula
			for(map<string,double>::iterator it = pF->symbols_.begin(); it != pF->symbols_.end(); ++it) 
			{	
				//Parse chromosome number and position from the symbol
				//cout << (it->first) << "\n"; //list all keys

				
				if (strlen(it->first.c_str()) < 3) { // no need to add symbol
					continue;
				}

				vSymbolStrings.push_back(it->first); // save label too

				//Look at prefixes:
				string sSymbol = it->first;
				
				if (sSymbol.find("Courter_") == 0) {
					//throw(new Exception("Courter_ not yet implemented in natural selection."));
					sSymbol.replace(0, 8, "");
					vSymbolStringsCourter.push_back(sSymbol);
				}
				else if (sSymbol.find("PopCourter_") == 0) {
					//throw(new Exception("PopCourter_ not yet implemented in natural selection."));
					sSymbol.replace(0, 11, "");
					vSymbolStringsPopWideCourter.push_back(sSymbol );
				}
				else if (sSymbol.find("My_") == 0) {
					sSymbol.replace(0, 3, "");
					vSymbolStringsChooser.push_back(sSymbol);
				}
				else if (sSymbol.find("PopChooser_") == 0) {
					//throw(new Exception("PopChooser_ not yet implemented in natural selection."));
					sSymbol.replace(0, 11, "");
					vSymbolStringsPopWideChooser.push_back(sSymbol);
				}
				else if (sSymbol.find("Pop_") == 0) {
					//throw(new Exception("Pop_ not yet implemented in natural selection."));
					sSymbol.replace(0, 4, "");
					vSymbolStringsPopWide.push_back(sSymbol);
				}
				else if (sSymbol.find("Dad_") == 0) {
					//throw(new Exception("Pop_ not yet implemented in natural selection."));
					sSymbol.replace(0, 4, "");
					vSymbolStringsDad.push_back(sSymbol);
				}
				else if (sSymbol.find("Mom_") == 0) {
					//throw(new Exception("Pop_ not yet implemented in natural selection."));
					sSymbol.replace(0, 4, "");
					vSymbolStringsMom.push_back(sSymbol);
				}
				else if (sSymbol.find("PrevGenCurrPop_") == 0) {
					//throw(new Exception("Pop_ not yet implemented in natural selection."));
					sSymbol.replace(0, 15, "");
					vSymbolStringsCurrPopWidePrevGen.push_back(sSymbol);
				}
				else if (sSymbol.find("PrevGenCurrPopCourter_") == 0) {
					//throw(new Exception("Pop_ not yet implemented in natural selection."));
					sSymbol.replace(0, 22, "");
					vSymbolStringsCurrPopWidePrevGenCourter.push_back(sSymbol);
				}
				else if (sSymbol.find("PrevGenCurrPopChooser_") == 0) {
					//throw(new Exception("Pop_ not yet implemented in natural selection."));
					sSymbol.replace(0, 22, "");
					vSymbolStringsCurrPopWidePrevGenChooser.push_back(sSymbol);
				}
				else if (sSymbol.find("PrevGenPrevPop_") == 0) {
					//throw(new Exception("Pop_ not yet implemented in natural selection."));
					sSymbol.replace(0, 15, "");
					vSymbolStringsPrevPopWidePrevGen.push_back(sSymbol);
				}
				else if (sSymbol.find("PrevGenPrevPopCourter_") == 0) {
					//throw(new Exception("Pop_ not yet implemented in natural selection."));
					sSymbol.replace(0, 22, "");
					vSymbolStringsPrevPopWidePrevGenCourter.push_back(sSymbol);
				}
				else if (sSymbol.find("PrevGenPrevPopChooser_") == 0) {
					//throw(new Exception("Pop_ not yet implemented in natural selection."));
					sSymbol.replace(0, 22, "");
					vSymbolStringsPrevPopWidePrevGenChooser.push_back(sSymbol);
				}
				else { //default to be self
					vSymbolStringsChooser.push_back(sSymbol);
				}

			}
			
			delete pF;

			this->_mpRules[sPopName].push_back(sFormula); // save the formula string for further reference.
			for(int nCPU=0;nCPU<nTotalCPUCore;nCPU++) {
				if (nCPU == 0) {
					printf("Inserting %s to gen %d\n", sFormula.c_str(), nGen);
				}
				this->_mpmpRuleFormulae[nCPU][sPopName].push_back( pair< Parser *, int> ( new Parser(sFormula), nGen) ); //literally copy the pF object, so that there are nTotalCPUCore numbers of copies in the RAM! ;-)
			}
			this->_mpRuleFormulaSymbolStrings[sPopName].push_back(vSymbolStrings);
			this->_mpRuleFormulaSymbolStringsCourter[sPopName].push_back(vSymbolStringsCourter);
			this->_mpRuleFormulaSymbolStringsChooser[sPopName].push_back(vSymbolStringsChooser);
			this->_mpRuleFormulaSymbolStringsPopWide[sPopName].push_back(vSymbolStringsPopWide);
			this->_mpRuleFormulaSymbolStringsPopWideChooser[sPopName].push_back(vSymbolStringsPopWideChooser);
			this->_mpRuleFormulaSymbolStringsPopWideCourter[sPopName].push_back(vSymbolStringsPopWideCourter);
			this->_mpRuleFormulaSymbolStringsDad[sPopName].push_back(vSymbolStringsDad);
			this->_mpRuleFormulaSymbolStringsMom[sPopName].push_back(vSymbolStringsMom);

			this->_mpRuleFormulaSymbolStringsCurrPopWidePrevGen[sPopName].push_back(vSymbolStringsCurrPopWidePrevGen); //PrevGenCurrPop_
			this->_mpRuleFormulaSymbolStringsCurrPopWidePrevGenCourter[sPopName].push_back(vSymbolStringsCurrPopWidePrevGenCourter); //PrevGenCurrPopCourter_
			this->_mpRuleFormulaSymbolStringsCurrPopWidePrevGenChooser[sPopName].push_back(vSymbolStringsCurrPopWidePrevGenChooser); //PrevGenCurrPopChooser_
			this->_mpRuleFormulaSymbolStringsPrevPopWidePrevGen[sPopName].push_back(vSymbolStringsPrevPopWidePrevGen); //PrevGenPrevPop_
			this->_mpRuleFormulaSymbolStringsPrevPopWidePrevGenCourter[sPopName].push_back(vSymbolStringsPrevPopWidePrevGenCourter);  //PrevGenPrevPopCourter_
			this->_mpRuleFormulaSymbolStringsPrevPopWidePrevGenChooser[sPopName].push_back(vSymbolStringsPrevPopWidePrevGenChooser); //PrevGenPrevPopChooser_

			if (nGen > -1) {
				printf("Sexual selection special generation: %d\n", nGen);
				this->_vSpecialGens.insert(nGen);
			}
		}
	}

	printf("Sexual Selection rules for %d populations loaded. \n", this->_mpRules.size());

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a658, %rsp          # imm = 0x7A658
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x328(%rsp), %rdi
callq 0x7450
leaq 0x2a8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rbx), %rsi
leaq 0x1a326(%rip), %rdi     # 0x2e0cc
xorl %eax, %eax
callq 0x7050
movq %r14, 0x208(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7220
movq (%rbx), %rsi
leaq 0x328(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x7260
leaq 0x3a0(%rsp), %rdi
callq 0x70d0
testb %al, %al
je 0x14eaa
leaq 0x328(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x70b0
leaq 0x1a1e5(%rip), %rsi     # 0x2dfe9
leaq 0x298(%rsp), %rdi
callq 0x954d
testb %al, %al
jne 0x14ebf
movq 0x208(%rsp), %rax
leaq 0x28(%rax), %rcx
movq %rcx, 0x1c8(%rsp)
leaq 0x30(%rax), %rcx
movq %rcx, 0x2c0(%rsp)
leaq 0x58(%rax), %r15
leaq 0x60(%rax), %rcx
movq %rcx, 0x2d0(%rsp)
leaq 0x88(%rax), %rcx
movq %rcx, 0x278(%rsp)
leaq 0xb8(%rax), %rcx
movq %rcx, 0x270(%rsp)
leaq 0xe8(%rax), %rcx
movq %rcx, 0x268(%rsp)
leaq 0x118(%rax), %rcx
movq %rcx, 0x260(%rsp)
leaq 0x178(%rax), %rcx
movq %rcx, 0x258(%rsp)
leaq 0x148(%rax), %rcx
movq %rcx, 0x250(%rsp)
leaq 0x1a8(%rax), %rcx
movq %rcx, 0x248(%rsp)
leaq 0x1d8(%rax), %rcx
movq %rcx, 0x240(%rsp)
leaq 0x208(%rax), %rcx
movq %rcx, 0x238(%rsp)
leaq 0x238(%rax), %rcx
movq %rcx, 0x230(%rsp)
leaq 0x268(%rax), %rcx
movq %rcx, 0x228(%rsp)
leaq 0x298(%rax), %rcx
movq %rcx, 0x220(%rsp)
leaq 0x2c8(%rax), %rcx
movq %rcx, 0x218(%rsp)
leaq 0x2f8(%rax), %rcx
movq %rcx, 0x210(%rsp)
addq $0x328, %rax            # imm = 0x328
movq %rax, 0x2b8(%rsp)
leaq 0x298(%rsp), %r14
leaq 0x308(%rsp), %rbx
leaq 0x2d8(%rsp), %r12
movq 0x328(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x348(%rsp,%rax)
jne 0x14e64
leaq 0x328(%rsp), %rdi
movq %r14, %rsi
callq 0x70b0
leaq 0x318(%rsp), %rax
movq %rax, 0x308(%rsp)
andq $0x0, 0x310(%rsp)
xorl %ecx, %ecx
movb %cl, 0x318(%rsp)
leaq 0x1e0(%rsp), %rax
movq %rax, 0x1d0(%rsp)
andq $0x0, 0x1d8(%rsp)
movb %cl, 0x1e0(%rsp)
orl $-0x1, 0x8(%rsp)
movq %r14, %rdi
leaq 0x1a029(%rip), %rsi     # 0x2dfe5
pushq $-0x1
popq %r13
movq %r13, %rdx
callq 0x76f0
leaq 0x1(%rax), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x70c0
leaq 0x298(%rsp), %rdi
leaq 0x1a003(%rip), %rsi     # 0x2dfe9
callq 0x954d
testb %al, %al
jne 0x14da1
movq 0x298(%rsp), %rdi
leaq 0x19fe8(%rip), %rsi     # 0x2dfea
leaq 0x3d5c0(%rsp), %r14
movq %r14, %rdx
leaq 0x8(%rsp), %rcx
leaq 0x530(%rsp), %r8
xorl %eax, %eax
callq 0x73c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7730
leaq 0x1d0(%rsp), %rdi
leaq 0x530(%rsp), %rsi
callq 0x7730
movq 0x308(%rsp), %rsi
movq 0x1d0(%rsp), %rdx
movl 0x8(%rsp), %ecx
leaq 0x1a108(%rip), %rdi     # 0x2e164
xorl %eax, %eax
callq 0x7050
cmpq $0x0, 0x310(%rsp)
je 0x14da1
cmpq $0x0, 0x1d8(%rsp)
je 0x14da1
movq 0x1c8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1c798
cmpq 0x2c0(%rsp), %rax
jne 0x145d5
leaq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %rax, 0x50(%rsp)
andq $0x0, 0x60(%rsp)
leaq 0x1b0(%rsp), %rax
movq %rax, 0x1b8(%rsp)
movq %rax, 0x1b0(%rsp)
andq $0x0, 0x1c0(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %rax, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
leaq 0x190(%rsp), %rax
movq %rax, 0x198(%rsp)
movq %rax, 0x190(%rsp)
andq $0x0, 0x1a0(%rsp)
leaq 0x170(%rsp), %rax
movq %rax, 0x178(%rsp)
movq %rax, 0x170(%rsp)
andq $0x0, 0x180(%rsp)
leaq 0x150(%rsp), %rax
movq %rax, 0x158(%rsp)
movq %rax, 0x150(%rsp)
andq $0x0, 0x160(%rsp)
leaq 0x130(%rsp), %rax
movq %rax, 0x138(%rsp)
movq %rax, 0x130(%rsp)
andq $0x0, 0x140(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x118(%rsp)
movq %rax, 0x110(%rsp)
andq $0x0, 0x120(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq %rax, 0xf0(%rsp)
andq $0x0, 0x100(%rsp)
leaq 0xd0(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq %rax, 0xd0(%rsp)
andq $0x0, 0xe0(%rsp)
leaq 0xb0(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq %rax, 0xb0(%rsp)
andq $0x0, 0xc0(%rsp)
leaq 0x90(%rsp), %rax
movq %rax, 0x98(%rsp)
movq %rax, 0x90(%rsp)
andq $0x0, 0xa0(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rax, 0x70(%rsp)
andq $0x0, 0x80(%rsp)
leaq 0x1f0(%rsp), %rax
movq %rax, 0x1f8(%rsp)
movq %rax, 0x1f0(%rsp)
andq $0x0, 0x200(%rsp)
leaq 0x280(%rsp), %rax
movq %rax, 0x288(%rsp)
movq %rax, 0x280(%rsp)
andq $0x0, 0x290(%rsp)
movq 0x1c8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1767c
movq %rax, %rdi
leaq 0x10(%rsp), %rsi
callq 0x176e2
xorl %edx, %edx
movl %edx, 0xc(%rsp)
testl %edx, %edx
jg 0x14357
leaq 0x19ee0(%rip), %rdi     # 0x2e194
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x7050
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x1ce68
cmpq 0x2d0(%rsp), %rax
jne 0x14327
andl $0x0, 0x2e0(%rsp)
andq $0x0, 0x2e8(%rsp)
leaq 0x2e0(%rsp), %rax
movq %rax, 0x2f0(%rsp)
movq %rax, 0x2f8(%rsp)
andq $0x0, 0x300(%rsp)
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x176fe
movq %rax, %rdi
movq %r12, %rsi
callq 0x185e0
movq %r12, %rdi
callq 0x18b30
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x176fe
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1774c
movq %rax, %rdi
leaq 0x50(%rsp), %rsi
callq 0x177b2
movl 0xc(%rsp), %edx
incl %edx
jmp 0x142a1
movq 0x278(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x17834
movq 0x270(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x17834
movq 0x268(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x190(%rsp), %rsi
callq 0x17834
movq 0x260(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x170(%rsp), %rsi
callq 0x17834
movq 0x258(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x150(%rsp), %rsi
callq 0x17834
movq 0x250(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x130(%rsp), %rsi
callq 0x17834
movq 0x248(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x110(%rsp), %rsi
callq 0x17834
movq 0x240(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0xf0(%rsp), %rsi
callq 0x17834
movq 0x238(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x17834
movq 0x230(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x17834
movq 0x228(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x90(%rsp), %rsi
callq 0x17834
movq 0x220(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x70(%rsp), %rsi
callq 0x17834
movq 0x218(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x17834
movq 0x210(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x280(%rsp), %rsi
callq 0x17834
leaq 0x280(%rsp), %rdi
callq 0x18b44
leaq 0x1f0(%rsp), %rdi
callq 0x18b44
leaq 0x70(%rsp), %rdi
callq 0x18b44
leaq 0x90(%rsp), %rdi
callq 0x18b44
leaq 0xb0(%rsp), %rdi
callq 0x18b44
leaq 0xd0(%rsp), %rdi
callq 0x18b44
leaq 0xf0(%rsp), %rdi
callq 0x18b44
leaq 0x110(%rsp), %rdi
callq 0x18b44
leaq 0x130(%rsp), %rdi
callq 0x18b44
leaq 0x150(%rsp), %rdi
callq 0x18b44
leaq 0x170(%rsp), %rdi
callq 0x18b44
leaq 0x190(%rsp), %rdi
callq 0x18b44
leaq 0x30(%rsp), %rdi
callq 0x18b44
leaq 0x1b0(%rsp), %rdi
callq 0x18b44
leaq 0x50(%rsp), %rdi
callq 0x18a8c
leaq 0x10(%rsp), %rdi
callq 0x18b84
movl $0x98, %edi
callq 0x73f0
movq %rax, %r13
movq %r12, %rdi
leaq 0x199fd(%rip), %rsi     # 0x2dfe9
leaq 0x10(%rsp), %rdx
callq 0x9512
movq %r13, %rdi
movq %r12, %rsi
callq 0x1714c
movq %r12, %rdi
callq 0x71a0
movq %r13, %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x92d0
andq $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
andq $0x0, 0x1c0(%rsp)
movaps %xmm0, 0x1b0(%rsp)
andq $0x0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x1a0(%rsp)
movaps %xmm0, 0x190(%rsp)
andq $0x0, 0x180(%rsp)
movaps %xmm0, 0x170(%rsp)
andq $0x0, 0x160(%rsp)
movaps %xmm0, 0x150(%rsp)
andq $0x0, 0x140(%rsp)
movaps %xmm0, 0x130(%rsp)
andq $0x0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
andq $0x0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
andq $0x0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
andq $0x0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
andq $0x0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
andq $0x0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movq 0x80(%r13), %rbp
movq %r13, 0x2c8(%rsp)
addq $0x70, %r13
cmpq %r13, %rbp
je 0x14a4a
movq 0x20(%rbp), %rdi
callq 0x7180
cmpq $0x3, %rax
jb 0x14a3a
leaq 0x20(%rbp), %r14
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x17278
movq %r12, %rdi
movq %r14, %rsi
callq 0x7550
movq %r12, %rdi
leaq 0x19ab1(%rip), %rsi     # 0x2e1fb
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x148b5
movq %r12, %rdi
leaq 0x19a94(%rip), %rsi     # 0x2e1f8
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x148d3
movq %r12, %rdi
leaq 0x1994a(%rip), %rsi     # 0x2e0c8
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x148f4
movq %r12, %rdi
leaq 0x19a77(%rip), %rsi     # 0x2e20f
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x14912
movq %r12, %rdi
leaq 0x19a36(%rip), %rsi     # 0x2e1e8
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x14933
movq %r12, %rdi
leaq 0x19a07(%rip), %rsi     # 0x2e1d3
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x14954
movq %r12, %rdi
leaq 0x199f2(%rip), %rsi     # 0x2e1d8
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x14975
movq %r12, %rdi
leaq 0x199dd(%rip), %rsi     # 0x2e1dd
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x14996
movq %r12, %rdi
leaq 0x199d3(%rip), %rsi     # 0x2e1ed
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x149b4
movq %r12, %rdi
leaq 0x199d0(%rip), %rsi     # 0x2e204
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x149d2
movq %r12, %rdi
leaq 0x199cd(%rip), %rsi     # 0x2e21b
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x149f0
movq %r12, %rdi
leaq 0x199c3(%rip), %rsi     # 0x2e22b
xorl %edx, %edx
callq 0x7750
testq %rax, %rax
je 0x14a0e
movq %r12, %rdi
leaq 0x199c0(%rip), %rsi     # 0x2e242
xorl %edx, %edx
callq 0x7750
leaq 0x30(%rsp), %rdi
testq %rax, %rax
jne 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0x16
popq %rdx
leaq 0x19743(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0x70(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0x8
popq %rdx
leaq 0x19725(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0x50(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0xb
popq %rdx
leaq 0x19707(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0x1b0(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0x3
popq %rdx
leaq 0x196e6(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0x30(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0xb
popq %rdx
leaq 0x196c8(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0x190(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0x4
popq %rdx
leaq 0x196a7(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0x170(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0x4
popq %rdx
leaq 0x19686(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0x150(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0x4
popq %rdx
leaq 0x19665(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0x130(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0xf
popq %rdx
leaq 0x19644(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0x110(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0x16
popq %rdx
leaq 0x19626(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0xf0(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0x16
popq %rdx
leaq 0x19608(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0xd0(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0xf
popq %rdx
leaq 0x195ea(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0xb0(%rsp), %rdi
jmp 0x14a2a
movq %r12, %rdi
xorl %esi, %esi
pushq $0x16
popq %rdx
leaq 0x195cc(%rip), %rcx     # 0x2dfe9
callq 0x7240
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x17278
movq %r12, %rdi
callq 0x71a0
movq %rbp, %rdi
callq 0x72d0
movq %rax, %rbp
jmp 0x14708
movq 0x2c8(%rsp), %r14
movq %r14, %rdi
callq 0x17850
movl $0x98, %esi
movq %r14, %rdi
callq 0x7400
movq 0x1c8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1767c
movq %rax, %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x17870
xorl %eax, %eax
movl %eax, 0x1f0(%rsp)
testl %eax, %eax
jg 0x14b1b
jne 0x14ab4
movq 0x1d0(%rsp), %rsi
movl 0x8(%rsp), %edx
leaq 0x197ac(%rip), %rdi     # 0x2e259
xorl %eax, %eax
callq 0x7050
movq %r15, %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x176fe
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1774c
movq %rax, %r13
movl $0x98, %edi
callq 0x73f0
movq %rax, %rbp
movq %rax, %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x1714c
movq %rbp, 0x2d8(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0x2e0(%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x17888
movl 0x1f0(%rsp), %eax
incl %eax
jmp 0x14a89
movq 0x278(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x10(%rsp), %rsi
callq 0x17894
movq 0x270(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x50(%rsp), %rsi
callq 0x17894
movq 0x268(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x17894
movq 0x260(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x170(%rsp), %rsi
callq 0x17894
movq 0x258(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x190(%rsp), %rsi
callq 0x17894
movq 0x250(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x17894
movq 0x248(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x150(%rsp), %rsi
callq 0x17894
movq 0x240(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x130(%rsp), %rsi
callq 0x17894
movq 0x238(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x110(%rsp), %rsi
callq 0x17894
movq 0x230(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0xf0(%rsp), %rsi
callq 0x17894
movq 0x228(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x17894
movq 0x220(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x17894
movq 0x218(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x90(%rsp), %rsi
callq 0x17894
movq 0x210(%rsp), %rdi
movq %rbx, %rsi
callq 0x177ce
movq %rax, %rdi
leaq 0x70(%rsp), %rsi
callq 0x17894
movl 0x8(%rsp), %esi
testl %esi, %esi
js 0x14cf7
leaq 0x19593(%rip), %rdi     # 0x2e271
xorl %eax, %eax
callq 0x7050
movq 0x2b8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1ddf0
leaq 0x70(%rsp), %rdi
callq 0x17632
leaq 0x90(%rsp), %rdi
callq 0x17632
leaq 0xb0(%rsp), %rdi
callq 0x17632
leaq 0xd0(%rsp), %rdi
callq 0x17632
leaq 0xf0(%rsp), %rdi
callq 0x17632
leaq 0x110(%rsp), %rdi
callq 0x17632
leaq 0x130(%rsp), %rdi
callq 0x17632
leaq 0x150(%rsp), %rdi
callq 0x17632
leaq 0x170(%rsp), %rdi
callq 0x17632
leaq 0x190(%rsp), %rdi
callq 0x17632
leaq 0x30(%rsp), %rdi
callq 0x17632
leaq 0x1b0(%rsp), %rdi
callq 0x17632
leaq 0x50(%rsp), %rdi
callq 0x17632
leaq 0x10(%rsp), %rdi
callq 0x17632
leaq 0x1d0(%rsp), %rdi
callq 0x71a0
movq %rbx, %rdi
callq 0x71a0
leaq 0x298(%rsp), %r14
jmp 0x13f41
cmpl $0x1, %edx
jne 0x14f54
movq %rax, %rbp
movq %rax, %rdi
callq 0x74d0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x7170
movq %rbp, %rdi
callq 0x7160
movq %r14, %rdi
callq 0x7540
movq %r12, %rdi
movq %rax, %rsi
leaq 0x50(%rsp), %rdx
callq 0x9512
movq %r12, %rdi
leaq 0x18341(%rip), %rsi     # 0x2d152
callq 0x954d
movl %eax, %r14d
movq %r12, %rdi
callq 0x71a0
movq 0x1d0(%rsp), %rbp
leaq 0x10(%rsp), %rdi
callq 0x7540
testb %r14b, %r14b
je 0x14ee2
leaq 0x1901f(%rip), %rdi     # 0x2de62
movq %rbp, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x7050
leaq 0x10(%rsp), %rdi
callq 0x7788
callq 0x7660
jmp 0x14619
movq 0x208(%rsp), %rax
movq 0x50(%rax), %rsi
leaq 0x19423(%rip), %rdi     # 0x2e29a
xorl %eax, %eax
callq 0x7050
leaq 0x298(%rsp), %rdi
callq 0x71a0
leaq 0x328(%rsp), %rdi
callq 0x7100
addq $0x7a658, %rsp          # imm = 0x7A658
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19247(%rip), %rdi     # 0x2e0f8
callq 0x75c0
leaq 0x19261(%rip), %rbx     # 0x2e11e
jmp 0x14ec6
leaq 0x1927b(%rip), %rbx     # 0x2e141
pushq $0x8
popq %rdi
callq 0x71d0
movq %rbx, (%rax)
movq 0x30078(%rip), %rsi     # 0x44f50
movq %rax, %rdi
xorl %edx, %edx
callq 0x76a0
leaq 0x18fcf(%rip), %rdi     # 0x2deb8
movq %rbp, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x7050
pushq $0x64
popq %rdi
callq 0x74b0
jmp 0x14f54
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7788
callq 0x7660
jmp 0x15126
movq %rax, %rdi
callq 0x955a
jmp 0x14f4c
movq %rax, %rbx
jmp 0x14f36
movq %rax, %rbx
leaq 0x2d8(%rsp), %rdi
callq 0x71a0
movl $0x98, %esi
movq %r13, %rdi
callq 0x7400
jmp 0x15126
jmp 0x14f54
jmp 0x14f54
movq %rax, %rbx
jmp 0x15140
movq %rax, %rbx
jmp 0x15126
movq %rax, %rbx
leaq 0x2d8(%rsp), %rdi
callq 0x18b30
jmp 0x14fae
jmp 0x14fab
jmp 0x14fab
jmp 0x15079
jmp 0x15079
jmp 0x15079
movq %rax, %rbx
leaq 0x2d8(%rsp), %rdi
callq 0x71a0
jmp 0x1507c
movq %rax, %rbx
movl $0x98, %esi
movq %rbp, %rdi
callq 0x7400
jmp 0x1507c
movq %rax, %rbx
leaq 0x280(%rsp), %rdi
callq 0x18b44
leaq 0x1f0(%rsp), %rdi
callq 0x18b44
leaq 0x70(%rsp), %rdi
callq 0x18b44
leaq 0x90(%rsp), %rdi
callq 0x18b44
leaq 0xb0(%rsp), %rdi
callq 0x18b44
leaq 0xd0(%rsp), %rdi
callq 0x18b44
leaq 0xf0(%rsp), %rdi
callq 0x18b44
leaq 0x110(%rsp), %rdi
callq 0x18b44
leaq 0x130(%rsp), %rdi
callq 0x18b44
leaq 0x150(%rsp), %rdi
callq 0x18b44
leaq 0x170(%rsp), %rdi
callq 0x18b44
leaq 0x190(%rsp), %rdi
callq 0x18b44
leaq 0x30(%rsp), %rdi
callq 0x18b44
leaq 0x1b0(%rsp), %rdi
callq 0x18b44
leaq 0x50(%rsp), %rdi
callq 0x18a8c
leaq 0x10(%rsp), %rdi
callq 0x18b84
jmp 0x15126
jmp 0x15079
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x17632
leaq 0x90(%rsp), %rdi
callq 0x17632
leaq 0xb0(%rsp), %rdi
callq 0x17632
leaq 0xd0(%rsp), %rdi
callq 0x17632
leaq 0xf0(%rsp), %rdi
callq 0x17632
leaq 0x110(%rsp), %rdi
callq 0x17632
leaq 0x130(%rsp), %rdi
callq 0x17632
leaq 0x150(%rsp), %rdi
callq 0x17632
leaq 0x170(%rsp), %rdi
callq 0x17632
leaq 0x190(%rsp), %rdi
callq 0x17632
leaq 0x30(%rsp), %rdi
callq 0x17632
leaq 0x1b0(%rsp), %rdi
callq 0x17632
leaq 0x50(%rsp), %rdi
callq 0x17632
leaq 0x10(%rsp), %rdi
callq 0x17632
leaq 0x1d0(%rsp), %rdi
callq 0x71a0
leaq 0x308(%rsp), %rdi
callq 0x71a0
leaq 0x298(%rsp), %rdi
callq 0x71a0
leaq 0x328(%rsp), %rdi
callq 0x7100
movq %rbx, %rdi
callq 0x76d0