// File: /workspace/github_cpp_makefile_star2_O1/melop[P]admixem/Population.cpp
// Function: Population::FreqDependentNaturalSelection()
void Population::FreqDependentNaturalSelection() {

	int nCurrGen = SimulConfig.GetCurrGen();
	bool bIgnoreGlobalRules = SimulConfig.pNaturalSelConfig->IgnoreGlobalRules(nCurrGen);
	string sPop = this->_sPopName;

	map< int, map<string , list< pair<Parser *, int> > > > * mppqParsers = SimulConfig.pNaturalSelConfig->GetFreqDependentFormulaeAllCPUs();


	//list< vector<string> > * pqvCourterSymbols = SimulConfig.pNaturalSelConfig->GetFormulaSymbolStringsCourter( sPop);
	list< vector<string> > * pqvSelfSymbols = SimulConfig.pNaturalSelConfig->GetFormulaSymbolStringsSelf( sPop);
	list< vector<string> > * pqvPopSymbols = SimulConfig.pNaturalSelConfig->GetFormulaSymbolStringsPop( sPop);
	list< vector<string> > * pqvPopCourterSymbols = SimulConfig.pNaturalSelConfig->GetFormulaSymbolStringsPopCourter( sPop);
	list< vector<string> > * pqvPopChooserSymbols = SimulConfig.pNaturalSelConfig->GetFormulaSymbolStringsPopChooser( sPop);

	//set population level parameters


	for(int nCPU=0;nCPU<nTotalCPUCore;nCPU++) { //set global current population parameters for all the CPUs

		list< pair< Parser *, int > > * pqParsers = &(*mppqParsers)[nCPU][this->_sPopName];
		list< vector<string> >::iterator itPopSymbols = pqvPopSymbols->begin();
		list< vector<string> >::iterator itPopCourterSymbols = pqvPopCourterSymbols->begin();
		list< vector<string> >::iterator itPopChooserSymbols = pqvPopChooserSymbols->begin();

		for (list< pair< Parser *, int> >::iterator itParser= pqParsers->begin(); itParser != pqParsers->end() ; ++itParser) {
			vector<string> vSymbolsPop = *itPopSymbols;
			vector<string> vSymbolsPopCourter = *itPopCourterSymbols;
			vector<string> vSymbolsPopChooser = *itPopChooserSymbols;

			Parser * pParser = itParser->first;
			//set population level symbols

			for(vector<string>::iterator itSymbol=vSymbolsPop.begin();itSymbol!=vSymbolsPop.end();++itSymbol)
			{
				string sSymbol = (*itSymbol).substr(4);
				string sType = (*itSymbol).substr(0, 3); //either Avg or Std
				if (sType != "Avg" && sType != "Std") {
					throw new Exception("Population parameter type unknown!");
				}
				if (this->_mpSumPhenotype.find(sSymbol) == _mpSumPhenotype.end()) {
					throw new Exception("Unable to find population symbol");
				}
			
				pParser->symbols_[string("Pop_Avg_"+sSymbol)] = this->_mpSumPhenotype[sSymbol].first;
				pParser->symbols_[string("Pop_Std_"+sSymbol)] = this->_mpSumPhenotype[sSymbol].second;

			}

			for(vector<string>::iterator itSymbol=vSymbolsPopCourter.begin();itSymbol!=vSymbolsPopCourter.end();++itSymbol)
			{
				string sSymbol = (*itSymbol).substr(4);
				string sType = (*itSymbol).substr(0, 3); //either Avg or Std
				if (sType != "Avg" && sType != "Std") {
					throw new Exception("Population parameter type unknown!");
				}
				if (this->_mpSumPhenotypeMale.find(sSymbol) == _mpSumPhenotypeMale.end()) {
					throw new Exception("Unable to find population symbol: male");
				}
			
				pParser->symbols_[string("PopCourter_Avg_"+sSymbol)] = this->_mpSumPhenotypeMale[sSymbol].first;
				pParser->symbols_[string("PopCourter_Std_"+sSymbol)] = this->_mpSumPhenotypeMale[sSymbol].second;

			}

			for(vector<string>::iterator itSymbol=vSymbolsPopChooser.begin();itSymbol!=vSymbolsPopChooser.end();++itSymbol)
			{
				string sSymbol = (*itSymbol).substr(4);
				string sType = (*itSymbol).substr(0, 3); //either Avg or Std
				if (sType != "Avg" && sType != "Std") {
					throw new Exception("Population parameter type unknown!");
				}
				if (this->_mpSumPhenotypeFemale.find(sSymbol) == _mpSumPhenotypeFemale.end()) {
					throw new Exception("Unable to find population symbol: female");
				}
			
				pParser->symbols_[string("PopChooser_Avg_"+sSymbol)] = this->_mpSumPhenotypeFemale[sSymbol].first;
				pParser->symbols_[string("PopChooser_Std_"+sSymbol)] = this->_mpSumPhenotypeFemale[sSymbol].second;

			}

		
			++itPopSymbols;
			++itPopCourterSymbols;
			++itPopChooserSymbols;
		}

	}
	//now go through each individual 
	vector<int>::size_type nMale = this->_mpMales.size();
	vector<int>::size_type nFemale = this->_mpFemales.size();

	#pragma omp parallel 
	{

	#pragma omp for
	//for (vector< Individual * >::size_type i=0; i< nMale; i++ ) {
	for (signed long i=0; i< nMale; i++ ) {
		Individual * pInd = _mpMales[i];

		#ifdef _OPENMP
		int nCPU = omp_get_thread_num();
		#else
		int nCPU = 0;
		#endif

		list< pair< Parser *, int > > * pqParsers = &(*mppqParsers)[nCPU][this->_sPopName];
		list< vector<string> >::iterator itSelfSymbols = pqvSelfSymbols->begin();
		for (list< pair< Parser *, int> >::iterator itParser= pqParsers->begin(); itParser != pqParsers->end() ; ++itParser) {
			vector<string> vSymbolsSelf = *itSelfSymbols;
			Parser * pParser = itParser->first;
			int nGen = itParser->second;

			if ((nGen ==-1 && !bIgnoreGlobalRules) || (bIgnoreGlobalRules && nGen == nCurrGen) ) {

				for(vector<string>::iterator itSymbol=vSymbolsSelf.begin();itSymbol!=vSymbolsSelf.end();++itSymbol)
				{
					//#pragma omp critical
					//{
						pParser->symbols_[string("My_"+(*itSymbol))] = pInd->GetPhenotype(*itSymbol);
						pParser->symbols_[*itSymbol] = pInd->GetPhenotype(*itSymbol); //set both variables
					//}
				}

				bool bLive = true;
				//#pragma omp critical 
				//{
					bLive = (UniformGen.Next() <= pParser->Evaluate())? true : false;
				//}

				if (!bLive) {

					#pragma omp critical 
					{
						delete pInd; // uhoh, dead!!
						_mpMales[i] = NULL; //mark it
						//_mpMales.erase(_mpMales.begin() + i);
					}
					break;
				}
			}
		
			++itSelfSymbols;
		}


	}

	#pragma omp for
	//for (vector< Individual * >::size_type i=0; i< nFemale; i++ ) {
	for (signed long i=0; i< nFemale; i++ ) {
		Individual * pInd = _mpFemales[i];

		#ifdef _OPENMP
		int nCPU = omp_get_thread_num();
		#else
		int nCPU = 0;
		#endif

		list< pair< Parser *, int > > * pqParsers = &(*mppqParsers)[nCPU][this->_sPopName];

		list< vector<string> >::iterator itSelfSymbols = pqvSelfSymbols->begin();
		for (list< pair< Parser *, int> >::iterator itParser= pqParsers->begin(); itParser != pqParsers->end() ; ++itParser) {
			vector<string> vSymbolsSelf = *itSelfSymbols;
			Parser * pParser = itParser->first;
			int nGen = itParser->second;

			if ((nGen ==-1 && !bIgnoreGlobalRules) || (bIgnoreGlobalRules && nGen == nCurrGen) ) {

				for(vector<string>::iterator itSymbol=vSymbolsSelf.begin();itSymbol!=vSymbolsSelf.end();++itSymbol)
				{
					//#pragma omp critical 
					//{
						pParser->symbols_[string("My_"+(*itSymbol))] = pInd->GetPhenotype(*itSymbol);
						pParser->symbols_[*itSymbol] = pInd->GetPhenotype(*itSymbol); //set both variables
					//}
				}

				bool bLive = true;
				//#pragma omp critical 
				//{
					bLive = (UniformGen.Next() <= pParser->Evaluate())? true : false;
				//}

				if (!bLive) {
					#pragma omp critical 
					{
						delete pInd; // uhoh, dead!!
						_mpFemales[i] = NULL;
						//_mpFemales.erase(_mpFemales.begin() + i);
					}
					break;
				}
			}
		
			++itSelfSymbols;
		}


	}

	} //end parallel block

	//clear NULL pointers from the arrays:

	for (vector< Individual * >::size_type i=0; i< nMale; i++ ) {
		if (! _mpMales[i]) {
			_mpMales.erase(_mpMales.begin() + i);
			nMale--; // readjust upper bound
			i--;
		}
	}
	
	for (vector< Individual * >::size_type i=0; i< nFemale; i++ ) {
		if (! _mpFemales[i]) {
			_mpFemales.erase(_mpFemales.begin() + i);
			nFemale--; // readjust upper bound
			i--;
		}
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %r14
leaq 0x1c95d(%rip), %rbx     # 0x49908
movq %rbx, %rdi
callq 0x198ee
movq 0x20(%rbx), %rdi
movl %eax, 0xd4(%rsp)
movl %eax, %esi
callq 0x15b1c
movb %al, 0xf(%rsp)
leaq 0x108(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r14), %rsi
movq %r14, 0x68(%rsp)
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %rdi
callq 0xa916
movq 0x20(%rbx), %rdi
callq 0x15bcc
movq %rax, 0xe8(%rsp)
movq 0x20(%rbx), %r14
leaq 0x268(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
addq %rsi, %rdx
leaq 0x258(%rsp), %rdi
callq 0xa916
leaq 0x258(%rsp), %rsi
movq %r14, %rdi
callq 0x15aec
movq %rax, 0x118(%rsp)
movq 0x258(%rsp), %rdi
cmpq %r15, %rdi
je 0x2d067
movq 0x268(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x20(%rbx), %r14
leaq 0x248(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
addq %rsi, %rdx
leaq 0x238(%rsp), %rdi
callq 0xa916
leaq 0x238(%rsp), %rsi
movq %r14, %rdi
callq 0x15af8
movq %rax, 0xe0(%rsp)
movq 0x238(%rsp), %rdi
cmpq %r15, %rdi
je 0x2d0cc
movq 0x248(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x20(%rbx), %r14
leaq 0x228(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
addq %rsi, %rdx
leaq 0x218(%rsp), %rdi
callq 0xa916
leaq 0x218(%rsp), %rsi
movq %r14, %rdi
callq 0x15b04
movq %rax, 0x1a8(%rsp)
movq 0x218(%rsp), %rdi
cmpq %r15, %rdi
je 0x2d131
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x20(%rbx), %rbx
leaq 0x208(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1f8(%rsp), %rdi
callq 0xa916
leaq 0x1f8(%rsp), %rsi
movq %rbx, %rdi
callq 0x15b10
movq %rax, 0x1a0(%rsp)
movq 0x1f8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2d196
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x7390
movl $0x0, 0x84(%rsp)
leaq 0x1c214(%rip), %rax     # 0x493bc
cmpl $0x0, (%rax)
jle 0x2d836
movq 0x68(%rsp), %rax
leaq 0xb8(%rax), %rcx
movq %rcx, 0x18(%rsp)
leaq 0xc0(%rax), %rcx
movq %rcx, 0xc8(%rsp)
leaq 0xe8(%rax), %rcx
movq %rcx, 0x20(%rsp)
leaq 0xf0(%rax), %rcx
movq %rcx, 0xc0(%rsp)
leaq 0x118(%rax), %rbp
addq $0x120, %rax            # imm = 0x120
movq %rax, 0x78(%rsp)
leaq 0x48(%rsp), %r15
leaq 0x88(%rsp), %r14
leaq 0x28(%rsp), %rbx
movq 0xe8(%rsp), %rdi
leaq 0x84(%rsp), %rsi
callq 0x1a6f2
movq %rax, %rdi
movq 0x68(%rsp), %rsi
callq 0x1a756
movq %rax, %rcx
movq (%rax), %rax
movq %rax, 0xb8(%rsp)
cmpq %rcx, %rax
leaq 0x1e0(%rsp), %r12
je 0x2d817
movq 0x1a0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0x1a8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xe0(%rsp), %rax
movq (%rax), %r13
movq %rcx, 0xf0(%rsp)
movq %r13, 0xd8(%rsp)
leaq 0x10(%r13), %rsi
movq %r12, %rdi
callq 0x2021c
movq 0xb0(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x1c8(%rsp), %rdi
callq 0x2021c
movq 0xa8(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x2021c
movq 0xb8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x1e0(%rsp), %r13
cmpq 0x1e8(%rsp), %r13
je 0x2d476
movq 0x70(%rsp), %rax
leaq 0x68(%rax), %r12
movl $0x4, %edx
movq %r15, %rdi
movq %r13, %rsi
movq $-0x1, %rcx
callq 0x73c0
movl $0x3, %ecx
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x73c0
movq %r14, %rdi
leaq 0x9c03(%rip), %rsi      # 0x36f36
callq 0x7100
testl %eax, %eax
je 0x2d353
movq %r14, %rdi
leaq 0x9bf4(%rip), %rsi      # 0x36f3a
callq 0x7100
testl %eax, %eax
jne 0x2dfac
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x276ee
cmpq 0xc8(%rsp), %rax
je 0x2df22
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x26b00
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0xa5ea(%rip), %rsi      # 0x37979
movq %r15, %rdx
callq 0x9981
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b39a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2d3c8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x26b00
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0xa598(%rip), %rsi      # 0x37982
movq %r15, %rdx
callq 0x9981
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b39a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2d423
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2d448
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2d464
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r13
cmpq 0x1e8(%rsp), %r13
jne 0x2d300
movq 0x1c8(%rsp), %r13
cmpq 0x1d0(%rsp), %r13
je 0x2d60b
movq 0x70(%rsp), %rax
leaq 0x68(%rax), %r12
movl $0x4, %edx
movq %r15, %rdi
movq %r13, %rsi
movq $-0x1, %rcx
callq 0x73c0
movl $0x3, %ecx
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x73c0
movq %r14, %rdi
leaq 0x9a6e(%rip), %rsi      # 0x36f36
callq 0x7100
testl %eax, %eax
je 0x2d4e8
movq %r14, %rdi
leaq 0x9a5f(%rip), %rsi      # 0x36f3a
callq 0x7100
testl %eax, %eax
jne 0x2dfe9
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x276ee
cmpq 0xc0(%rsp), %rax
je 0x2df50
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x26b00
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0xa493(%rip), %rsi      # 0x379b7
movq %r15, %rdx
callq 0x9981
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b39a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2d55d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x26b00
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0xa448(%rip), %rsi      # 0x379c7
movq %r15, %rdx
callq 0x9981
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b39a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2d5b8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2d5dd
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2d5f9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r13
cmpq 0x1d0(%rsp), %r13
jne 0x2d495
movq 0x1b0(%rsp), %r13
cmpq 0x1b8(%rsp), %r13
movq 0x70(%rsp), %r12
je 0x2d797
addq $0x68, %r12
movl $0x4, %edx
movq %r15, %rdi
movq %r13, %rsi
movq $-0x1, %rcx
callq 0x73c0
movl $0x3, %ecx
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x73c0
movq %r14, %rdi
leaq 0x98d9(%rip), %rsi      # 0x36f36
callq 0x7100
testl %eax, %eax
je 0x2d67d
movq %r14, %rdi
leaq 0x98ca(%rip), %rsi      # 0x36f3a
callq 0x7100
testl %eax, %eax
jne 0x2e026
movq %rbp, %rdi
movq %r15, %rsi
callq 0x276ee
cmpq 0x78(%rsp), %rax
je 0x2df7e
movq %rbp, %rdi
movq %r15, %rsi
callq 0x26b00
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0xa34e(%rip), %rsi      # 0x37a00
movq %r15, %rdx
callq 0x9981
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b39a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2d6eb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7390
movq %rbp, %rdi
movq %r15, %rsi
callq 0x26b00
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0xa305(%rip), %rsi      # 0x37a10
movq %r15, %rdx
callq 0x9981
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b39a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2d744
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2d769
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2d785
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r13
cmpq 0x1b8(%rsp), %r13
jne 0x2d62a
movq 0xd8(%rsp), %r13
movq (%r13), %r13
movq 0xb0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x1a61a
leaq 0x1c8(%rsp), %rdi
callq 0x1a61a
leaq 0x1e0(%rsp), %r12
movq %r12, %rdi
callq 0x1a61a
movq 0xb8(%rsp), %rax
movq (%rax), %rax
movq 0xf0(%rsp), %rcx
movq %rax, 0xb8(%rsp)
cmpq %rcx, %rax
jne 0x2d28a
movl 0x84(%rsp), %eax
incl %eax
movl %eax, 0x84(%rsp)
leaq 0x1bb8e(%rip), %rcx     # 0x493bc
cmpl (%rcx), %eax
jl 0x2d210
movq 0x68(%rsp), %r14
movq 0x48(%r14), %rcx
movq 0x50(%r14), %rdx
movq %rdx, %rax
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, 0xa8(%rsp)
movq 0x68(%r14), %rax
movq %rax, 0xb8(%rsp)
movq 0x60(%r14), %rax
movq %rax, 0xb0(%rsp)
movq %rcx, 0xf0(%rsp)
movq %rdx, 0xe0(%rsp)
cmpq %rcx, %rdx
je 0x2db50
cmpb $0x0, 0xf(%rsp)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmovnel 0xd4(%rsp), %r13d
movq 0xa8(%rsp), %rax
cmpq $0x1, %rax
adcq $0x0, %rax
movq %rax, 0x70(%rsp)
xorl %ecx, %ecx
leaq 0x48(%rsp), %rbp
leaq 0x180(%rsp), %rbx
movl %r13d, 0xc0(%rsp)
movq 0x48(%r14), %rax
movq %rcx, 0x78(%rsp)
movq (%rax,%rcx,8), %r15
movl $0x0, 0x28(%rsp)
movq 0xe8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1a6f2
movq %rax, %rdi
movq %r14, %rsi
callq 0x1a756
movq %rax, %r14
movq 0x118(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq %r14, %r12
movq %r14, 0xc8(%rsp)
movq (%r12), %r12
cmpq %r14, %r12
je 0x2db38
movq 0x20(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x88(%rsp), %rdi
callq 0x2021c
cmpl %r13d, 0x18(%r12)
jne 0x2db0a
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %r14
cmpq 0x90(%rsp), %r14
je 0x2da91
movq 0x10(%rsp), %rax
leaq 0x68(%rax), %r13
leaq 0x150(%rsp), %rax
movq %rax, 0x140(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x140(%rsp), %rdi
callq 0xa916
movq %r15, %rdi
leaq 0x140(%rsp), %rsi
callq 0x258a8
movsd %xmm0, 0x18(%rsp)
movq %rbp, %rdi
leaq 0x8744(%rip), %rsi      # 0x360f8
movq %r14, %rdx
callq 0x9981
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1b39a
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2d9ed
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x2da12
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x7390
leaq 0x190(%rsp), %rax
movq %rax, 0x180(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xa916
movq %r15, %rdi
movq %rbx, %rsi
callq 0x258a8
movsd %xmm0, 0x18(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x9b86
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x2da7f
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r14
cmpq 0x90(%rsp), %r14
jne 0x2d96d
leaq 0x1bfa8(%rip), %rdi     # 0x49a40
callq 0xbaa8
movsd %xmm0, 0x18(%rsp)
movq 0x10(%rsp), %rdi
callq 0x9836
xorl %r14d, %r14d
ucomisd 0x18(%rsp), %xmm0
movl 0xc0(%rsp), %r13d
jae 0x2db02
testq %r15, %r15
je 0x2dae6
movq %r15, %rdi
movsd %xmm0, 0x10(%rsp)
callq 0x21dfc
movl $0x158, %esi            # imm = 0x158
movq %r15, %rdi
callq 0x7390
movsd 0x10(%rsp), %xmm0
movq 0x68(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x78(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movl $0x14, %r14d
ucomisd 0x18(%rsp), %xmm0
jb 0x2db1a
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
xorl %r14d, %r14d
leaq 0x88(%rsp), %rdi
callq 0x1a61a
testl %r14d, %r14d
movq 0xc8(%rsp), %r14
je 0x2d916
movq 0x78(%rsp), %rcx
incq %rcx
cmpq 0x70(%rsp), %rcx
movq 0x68(%rsp), %r14
jne 0x2d8c6
movq 0xb8(%rsp), %rax
movq %rax, %rdx
movq 0xb0(%rsp), %rcx
subq %rcx, %rdx
sarq $0x3, %rdx
movq %rdx, 0xd8(%rsp)
cmpq %rcx, %rax
je 0x2de45
cmpb $0x0, 0xf(%rsp)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmovnel 0xd4(%rsp), %r13d
movq 0xd8(%rsp), %rax
cmpq $0x1, %rax
adcq $0x0, %rax
movq %rax, 0x70(%rsp)
xorl %ecx, %ecx
leaq 0x48(%rsp), %rbp
leaq 0x160(%rsp), %rbx
movl %r13d, 0xc0(%rsp)
movq 0x60(%r14), %rax
movq %rcx, 0x78(%rsp)
movq (%rax,%rcx,8), %r15
movl $0x0, 0x28(%rsp)
movq 0xe8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1a6f2
movq %rax, %rdi
movq %r14, %rsi
callq 0x1a756
movq %rax, %r14
movq 0x118(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq %r14, %r12
movq %r14, 0xc8(%rsp)
movq (%r12), %r12
cmpq %r14, %r12
je 0x2de2d
movq 0x20(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x88(%rsp), %rdi
callq 0x2021c
cmpl %r13d, 0x18(%r12)
jne 0x2ddff
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %r14
cmpq 0x90(%rsp), %r14
je 0x2dd86
movq 0x10(%rsp), %rax
leaq 0x68(%rax), %r13
leaq 0x130(%rsp), %rax
movq %rax, 0x120(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x120(%rsp), %rdi
callq 0xa916
movq %r15, %rdi
leaq 0x120(%rsp), %rsi
callq 0x258a8
movsd %xmm0, 0x18(%rsp)
movq %rbp, %rdi
leaq 0x844f(%rip), %rsi      # 0x360f8
movq %r14, %rdx
callq 0x9981
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1b39a
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2dce2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x2dd07
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x7390
leaq 0x170(%rsp), %rax
movq %rax, 0x160(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xa916
movq %r15, %rdi
movq %rbx, %rsi
callq 0x258a8
movsd %xmm0, 0x18(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x9b86
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x2dd74
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r14
cmpq 0x90(%rsp), %r14
jne 0x2dc62
leaq 0x1bcb3(%rip), %rdi     # 0x49a40
callq 0xbaa8
movsd %xmm0, 0x18(%rsp)
movq 0x10(%rsp), %rdi
callq 0x9836
xorl %r14d, %r14d
ucomisd 0x18(%rsp), %xmm0
movl 0xc0(%rsp), %r13d
jae 0x2ddf7
testq %r15, %r15
je 0x2dddb
movq %r15, %rdi
movsd %xmm0, 0x10(%rsp)
callq 0x21dfc
movl $0x158, %esi            # imm = 0x158
movq %r15, %rdi
callq 0x7390
movsd 0x10(%rsp), %xmm0
movq 0x68(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x78(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movl $0x1d, %r14d
ucomisd 0x18(%rsp), %xmm0
jb 0x2de0f
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
xorl %r14d, %r14d
leaq 0x88(%rsp), %rdi
callq 0x1a61a
testl %r14d, %r14d
movq 0xc8(%rsp), %r14
je 0x2dc0b
movq 0x78(%rsp), %rcx
incq %rcx
cmpq 0x70(%rsp), %rcx
movq 0x68(%rsp), %r14
jne 0x2dbbb
movq 0xe0(%rsp), %rax
cmpq 0xf0(%rsp), %rax
movq 0xa8(%rsp), %r15
je 0x2de98
xorl %ebx, %ebx
movq 0x48(%r14), %rax
cmpq $0x0, (%rax,%rbx,8)
jne 0x2de90
leaq (%rax,%rbx,8), %rdi
leaq 0x8(%rdi), %rsi
movq 0x50(%r14), %rdx
cmpq %rdx, %rsi
je 0x2de85
subq %rsi, %rdx
callq 0x75f0
addq $-0x8, 0x50(%r14)
decq %r15
decq %rbx
incq %rbx
cmpq %r15, %rbx
jb 0x2de61
movq 0xb0(%rsp), %rax
cmpq %rax, 0xb8(%rsp)
movq 0xd8(%rsp), %r15
je 0x2deeb
xorl %ebx, %ebx
movq 0x60(%r14), %rax
cmpq $0x0, (%rax,%rbx,8)
jne 0x2dee3
leaq (%rax,%rbx,8), %rdi
leaq 0x8(%rdi), %rsi
movq 0x68(%r14), %rdx
cmpq %rdx, %rsi
je 0x2ded8
subq %rsi, %rdx
callq 0x75f0
addq $-0x8, 0x68(%r14)
decq %r15
decq %rbx
incq %rbx
cmpq %r15, %rbx
jb 0x2deb4
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x2df10
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x7180
movq %rax, %r14
movl $0x1, %edi
callq 0x7380
movq %rax, %r15
leaq 0x8fd2(%rip), %rsi      # 0x36f15
movq %rax, %rdi
callq 0xb4d0
jmp 0x2dfd5
movl $0x8, %edi
callq 0x7180
movq %rax, %r14
movl $0x1, %edi
callq 0x7380
movq %rax, %r15
leaq 0x9a1f(%rip), %rsi      # 0x37990
movq %rax, %rdi
callq 0xb4d0
jmp 0x2e012
movl $0x8, %edi
callq 0x7180
movq %rax, %r14
movl $0x1, %edi
callq 0x7380
movq %rax, %r15
leaq 0x9a38(%rip), %rsi      # 0x379d7
movq %rax, %rdi
callq 0xb4d0
jmp 0x2e04f
movl $0x8, %edi
callq 0x7180
movq %rax, %r14
movl $0x1, %edi
callq 0x7380
movq %rax, %r15
leaq 0x9989(%rip), %rsi      # 0x37956
movq %rax, %rdi
callq 0xb4d0
movq %r15, (%r14)
leaq 0x1acd9(%rip), %rsi     # 0x48cb8
movq %r14, %rdi
xorl %edx, %edx
callq 0x7660
movl $0x8, %edi
callq 0x7180
movq %rax, %r14
movl $0x1, %edi
callq 0x7380
movq %rax, %r15
leaq 0x994c(%rip), %rsi      # 0x37956
movq %rax, %rdi
callq 0xb4d0
movq %r15, (%r14)
leaq 0x1ac9c(%rip), %rsi     # 0x48cb8
movq %r14, %rdi
xorl %edx, %edx
callq 0x7660
movl $0x8, %edi
callq 0x7180
movq %rax, %r14
movl $0x1, %edi
callq 0x7380
movq %rax, %r15
leaq 0x990f(%rip), %rsi      # 0x37956
movq %rax, %rdi
callq 0xb4d0
movq %r15, (%r14)
leaq 0x1ac5f(%rip), %rsi     # 0x48cb8
movq %r14, %rdi
xorl %edx, %edx
callq 0x7660
movq %rax, %rbx
movq 0x1f8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2e31d
movq 0x208(%rsp), %rsi
jmp 0x2e0e2
jmp 0x2e107
movq %rax, %rbx
movq 0x218(%rsp), %rdi
cmpq %r15, %rdi
je 0x2e31d
movq 0x228(%rsp), %rsi
jmp 0x2e0e2
jmp 0x2e107
movq %rax, %rbx
movq 0x238(%rsp), %rdi
cmpq %r15, %rdi
je 0x2e31d
movq 0x248(%rsp), %rsi
jmp 0x2e0e2
jmp 0x2e107
movq %rax, %rbx
movq 0x258(%rsp), %rdi
cmpq %r15, %rdi
je 0x2e31d
movq 0x268(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x2e31d
jmp 0x2e107
jmp 0x2e107
jmp 0x2e107
jmp 0x2e107
jmp 0x2e107
jmp 0x2e225
jmp 0x2e107
jmp 0x2e225
jmp 0x2e107
movq %rax, %rbx
jmp 0x2e31d
movq %rax, %rbx
jmp 0x2e303
movq %rax, %rbx
jmp 0x2e310
jmp 0x2e129
jmp 0x2e129
jmp 0x2e129
jmp 0x2e129
jmp 0x2e129
movq %rax, %rbx
movl $0x1, %esi
movq %r15, %rdi
callq 0x7390
jmp 0x2e1f4
jmp 0x2e1f1
jmp 0x2e1f1
jmp 0x2e1f1
jmp 0x2e2b2
jmp 0x2e2b2
jmp 0x2e2b2
jmp 0x2e17f
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2e182
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x2e182
movq %rax, %rbx
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x2e252
movq 0x130(%rsp), %rsi
jmp 0x2e24a
jmp 0x2e1cb
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2e1ce
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x2e1ce
movq %rax, %rbx
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x2e252
movq 0x150(%rsp), %rsi
jmp 0x2e24a
jmp 0x2e1f1
jmp 0x2e1f1
movq %rax, %rbx
movq %r14, %rdi
callq 0x72a0
jmp 0x2e2b5
jmp 0x2e225
movq %rax, %rbx
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x2e252
movq 0x170(%rsp), %rsi
jmp 0x2e24a
movq %rax, %rbx
jmp 0x2e252
movq %rax, %rbx
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x2e252
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x7390
leaq 0x88(%rsp), %rdi
jmp 0x2e318
jmp 0x2e280
jmp 0x2e27b
jmp 0x2e28d
jmp 0x2e2b2
jmp 0x2e2b2
jmp 0x2e28d
jmp 0x2e2b2
jmp 0x2e27b
jmp 0x2e280
jmp 0x2e2b2
jmp 0x2e28d
jmp 0x2e28d
jmp 0x2e2b2
jmp 0x2e2b2
movq %rax, %rbx
jmp 0x2e2da
movq %rax, %rbx
jmp 0x2e2f6
jmp 0x2e2b2
jmp 0x2e28d
jmp 0x2e2b2
jmp 0x2e2b2
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2e2b5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x2e2b5
jmp 0x2e2b2
jmp 0x2e2b2
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2e2da
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2e2f6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7390
leaq 0x1b0(%rsp), %rdi
callq 0x1a61a
leaq 0x1c8(%rsp), %rdi
callq 0x1a61a
leaq 0x1e0(%rsp), %rdi
callq 0x1a61a
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x2e342
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x7390
movq %rbx, %rdi
callq 0x76a0