// File: /workspace/github_cpp_makefile_star2_O3/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 0x1bde7(%rip), %rbx     # 0x48908
movq %rbx, %rdi
callq 0x199ca
movq 0x20(%rbx), %rdi
movl %eax, 0xd4(%rsp)
movl %eax, %esi
callq 0x15c6e
movb %al, 0xf(%rsp)
leaq 0x108(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r14), %rsi
movq %r14, 0x80(%rsp)
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %rdi
callq 0xa9b2
movq 0x20(%rbx), %rdi
callq 0x15d1e
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 0xa9b2
leaq 0x258(%rsp), %rsi
movq %r14, %rdi
callq 0x15c3e
movq %rax, 0x118(%rsp)
movq 0x258(%rsp), %rdi
cmpq %r15, %rdi
je 0x2cbe0
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 0xa9b2
leaq 0x238(%rsp), %rsi
movq %r14, %rdi
callq 0x15c4a
movq %rax, 0xe0(%rsp)
movq 0x238(%rsp), %rdi
cmpq %r15, %rdi
je 0x2cc45
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 0xa9b2
leaq 0x218(%rsp), %rsi
movq %r14, %rdi
callq 0x15c56
movq %rax, 0x1a8(%rsp)
movq 0x218(%rsp), %rdi
cmpq %r15, %rdi
je 0x2ccaa
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 0xa9b2
leaq 0x1f8(%rsp), %rsi
movq %rbx, %rdi
callq 0x15c62
movq %rax, 0x1a0(%rsp)
movq 0x1f8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2cd0f
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x7390
movl $0x0, 0xa4(%rsp)
leaq 0x1b69b(%rip), %rax     # 0x483bc
cmpl $0x0, (%rax)
jle 0x2d3b5
movq 0x80(%rsp), %rax
leaq 0xb8(%rax), %rcx
movq %rcx, 0x18(%rsp)
leaq 0xc0(%rax), %rcx
movq %rcx, 0xc8(%rsp)
leaq 0xe8(%rax), %rcx
movq %rcx, 0x98(%rsp)
leaq 0xf0(%rax), %rcx
movq %rcx, 0xc0(%rsp)
leaq 0x118(%rax), %rbp
addq $0x120, %rax            # imm = 0x120
movq %rax, 0x90(%rsp)
leaq 0x60(%rsp), %r15
leaq 0x40(%rsp), %r14
leaq 0x20(%rsp), %rbx
movq 0xe8(%rsp), %rdi
leaq 0xa4(%rsp), %rsi
callq 0x1a7a0
movq %rax, %rdi
movq 0x80(%rsp), %rsi
callq 0x1a806
movq %rax, %rcx
movq (%rax), %rax
movq %rax, 0xb8(%rsp)
cmpq %rcx, %rax
leaq 0x1e0(%rsp), %r12
je 0x2d396
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 0x2024e
movq 0xb0(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x1c8(%rsp), %rdi
callq 0x2024e
movq 0xa8(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x1b0(%rsp), %rdi
callq 0x2024e
movq 0xb8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x1e0(%rsp), %r13
cmpq 0x1e8(%rsp), %r13
je 0x2cff5
movq 0x88(%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 0x901b(%rip), %rsi      # 0x35ed6
callq 0x7100
testl %eax, %eax
je 0x2cedb
movq %r14, %rdi
leaq 0x900c(%rip), %rsi      # 0x35eda
callq 0x7100
testl %eax, %eax
jne 0x2db1e
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x27446
cmpq 0xc8(%rsp), %rax
je 0x2da94
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x26884
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x9a6a(%rip), %rsi      # 0x36981
movq %r15, %rdx
callq 0x9a1b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b47a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2cf50
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x26884
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x9a18(%rip), %rsi      # 0x3698a
movq %r15, %rdx
callq 0x9a1b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b47a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2cfab
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2cfc7
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2cfe3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r13
cmpq 0x1e8(%rsp), %r13
jne 0x2ce88
movq 0x1c8(%rsp), %r13
cmpq 0x1d0(%rsp), %r13
je 0x2d18d
movq 0x88(%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 0x8e8c(%rip), %rsi      # 0x35ed6
callq 0x7100
testl %eax, %eax
je 0x2d06a
movq %r14, %rdi
leaq 0x8e7d(%rip), %rsi      # 0x35eda
callq 0x7100
testl %eax, %eax
jne 0x2db5b
movq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x27446
cmpq 0xc0(%rsp), %rax
je 0x2dac2
movq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x26884
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x9913(%rip), %rsi      # 0x369bf
movq %r15, %rdx
callq 0x9a1b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b47a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2d0e5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x26884
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x98c5(%rip), %rsi      # 0x369cf
movq %r15, %rdx
callq 0x9a1b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b47a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2d143
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2d15f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2d17b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r13
cmpq 0x1d0(%rsp), %r13
jne 0x2d017
movq 0x1b0(%rsp), %r13
cmpq 0x1b8(%rsp), %r13
movq 0x88(%rsp), %r12
je 0x2d316
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 0x8cf4(%rip), %rsi      # 0x35ed6
callq 0x7100
testl %eax, %eax
je 0x2d202
movq %r14, %rdi
leaq 0x8ce5(%rip), %rsi      # 0x35eda
callq 0x7100
testl %eax, %eax
jne 0x2db98
movq %rbp, %rdi
movq %r15, %rsi
callq 0x27446
cmpq 0x90(%rsp), %rax
je 0x2daf0
movq %rbp, %rdi
movq %r15, %rsi
callq 0x26884
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x97ce(%rip), %rsi      # 0x36a08
movq %r15, %rdx
callq 0x9a1b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b47a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2d273
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7390
movq %rbp, %rdi
movq %r15, %rsi
callq 0x26884
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x9785(%rip), %rsi      # 0x36a18
movq %r15, %rdx
callq 0x9a1b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b47a
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2d2cc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2d2e8
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2d304
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r13
cmpq 0x1b8(%rsp), %r13
jne 0x2d1af
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 0x1a6c6
leaq 0x1c8(%rsp), %rdi
callq 0x1a6c6
leaq 0x1e0(%rsp), %r12
movq %r12, %rdi
callq 0x1a6c6
movq 0xb8(%rsp), %rax
movq (%rax), %rax
movq 0xf0(%rsp), %rcx
movq %rax, 0xb8(%rsp)
cmpq %rcx, %rax
jne 0x2ce0c
movl 0xa4(%rsp), %eax
incl %eax
movl %eax, 0xa4(%rsp)
leaq 0x1b00f(%rip), %rcx     # 0x483bc
cmpl (%rcx), %eax
jl 0x2cd8f
movq 0x80(%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 0x2d6c3
cmpb $0x0, 0xf(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnel 0xd4(%rsp), %eax
movl %eax, 0xc0(%rsp)
movq 0xa8(%rsp), %rax
cmpq $0x1, %rax
adcq $0x0, %rax
movq %rax, 0x88(%rsp)
xorl %ecx, %ecx
leaq 0x60(%rsp), %rbp
leaq 0x180(%rsp), %rbx
movq 0x48(%r14), %rax
movq %rcx, 0x90(%rsp)
movq (%rax,%rcx,8), %r15
movl $0x0, 0x20(%rsp)
movq 0xe8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1a7a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x1a806
movq %rax, %rcx
movq (%rax), %r12
cmpq %rax, %r12
leaq 0x40(%rsp), %r14
je 0x2d6a2
movq 0x118(%rsp), %rax
movq (%rax), %r13
movq %rcx, 0xc8(%rsp)
movq %r13, 0x98(%rsp)
leaq 0x10(%r13), %rsi
movq %r14, %rdi
callq 0x2024e
movl 0xc0(%rsp), %eax
cmpl %eax, 0x18(%r12)
jne 0x2d632
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %r14
cmpq 0x48(%rsp), %r14
je 0x2d60e
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 0xa9b2
movq %r15, %rdi
leaq 0x140(%rsp), %rsi
callq 0x25634
movsd %xmm0, 0x18(%rsp)
movq %rbp, %rdi
leaq 0x7be4(%rip), %rsi      # 0x35118
movq %r14, %rdx
callq 0x9a1b
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1b47a
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2d56d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x2d592
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 0xa9b2
movq %r15, %rdi
movq %rbx, %rsi
callq 0x25634
movsd %xmm0, 0x18(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x9c1c
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x2d5ff
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r14
cmpq 0x48(%rsp), %r14
jne 0x2d4ed
leaq 0x1b42b(%rip), %rdi     # 0x48a40
callq 0xbba0
movsd %xmm0, 0x18(%rsp)
movq 0x10(%rsp), %rdi
callq 0x98bc
ucomisd 0x18(%rsp), %xmm0
jb 0x2d662
movq 0x98(%rsp), %r13
movq (%r13), %r13
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x1a6c6
movq (%r12), %r12
movq 0xc8(%rsp), %rcx
cmpq %rcx, %r12
jne 0x2d4a4
jmp 0x2d6a2
testq %r15, %r15
je 0x2d66f
movq %r15, %rdi
callq 0x21e10
movl $0x158, %esi            # imm = 0x158
movq %r15, %rdi
callq 0x7390
movq 0x80(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x90(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
leaq 0x40(%rsp), %rdi
callq 0x1a6c6
movq 0x90(%rsp), %rcx
incq %rcx
cmpq 0x88(%rsp), %rcx
movq 0x80(%rsp), %r14
jne 0x2d448
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 0x2d9a9
cmpb $0x0, 0xf(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnel 0xd4(%rsp), %eax
movl %eax, 0xc0(%rsp)
movq 0xd8(%rsp), %rax
cmpq $0x1, %rax
adcq $0x0, %rax
movq %rax, 0x88(%rsp)
xorl %ecx, %ecx
leaq 0x60(%rsp), %rbp
leaq 0x160(%rsp), %rbx
movq 0x60(%r14), %rax
movq %rcx, 0x90(%rsp)
movq (%rax,%rcx,8), %r15
movl $0x0, 0x20(%rsp)
movq 0xe8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1a7a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x1a806
movq %rax, %rcx
movq (%rax), %r12
cmpq %rax, %r12
leaq 0x40(%rsp), %r14
je 0x2d988
movq 0x118(%rsp), %rax
movq (%rax), %r13
movq %rcx, 0xc8(%rsp)
movq %r13, 0x98(%rsp)
leaq 0x10(%r13), %rsi
movq %r14, %rdi
callq 0x2024e
movl 0xc0(%rsp), %eax
cmpl %eax, 0x18(%r12)
jne 0x2d918
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %r14
cmpq 0x48(%rsp), %r14
je 0x2d8f4
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 0xa9b2
movq %r15, %rdi
leaq 0x120(%rsp), %rsi
callq 0x25634
movsd %xmm0, 0x18(%rsp)
movq %rbp, %rdi
leaq 0x78fe(%rip), %rsi      # 0x35118
movq %r14, %rdx
callq 0x9a1b
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1b47a
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2d853
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x2d878
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 0xa9b2
movq %r15, %rdi
movq %rbx, %rsi
callq 0x25634
movsd %xmm0, 0x18(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x9c1c
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x2d8e5
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r14
cmpq 0x48(%rsp), %r14
jne 0x2d7d3
leaq 0x1b145(%rip), %rdi     # 0x48a40
callq 0xbba0
movsd %xmm0, 0x18(%rsp)
movq 0x10(%rsp), %rdi
callq 0x98bc
ucomisd 0x18(%rsp), %xmm0
jb 0x2d948
movq 0x98(%rsp), %r13
movq (%r13), %r13
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x1a6c6
movq (%r12), %r12
movq 0xc8(%rsp), %rcx
cmpq %rcx, %r12
jne 0x2d78a
jmp 0x2d988
testq %r15, %r15
je 0x2d955
movq %r15, %rdi
callq 0x21e10
movl $0x158, %esi            # imm = 0x158
movq %r15, %rdi
callq 0x7390
movq 0x80(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x90(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
leaq 0x40(%rsp), %rdi
callq 0x1a6c6
movq 0x90(%rsp), %rcx
incq %rcx
cmpq 0x88(%rsp), %rcx
movq 0x80(%rsp), %r14
jne 0x2d72e
movq 0xe0(%rsp), %rax
cmpq 0xf0(%rsp), %rax
movq 0xa8(%rsp), %r15
je 0x2da03
xorl %ebx, %ebx
movq 0x48(%r14), %rax
cmpq $0x0, (%rax,%rbx,8)
jne 0x2d9fb
leaq (%rax,%rbx,8), %rdi
leaq 0x8(%rdi), %rsi
movq 0x50(%r14), %rdx
cmpq %rdx, %rsi
je 0x2d9ed
subq %rsi, %rdx
callq 0x75f0
movq 0x50(%r14), %rdx
addq $-0x8, %rdx
movq %rdx, 0x50(%r14)
decq %r15
decq %rbx
incq %rbx
cmpq %r15, %rbx
jb 0x2d9c5
movq 0xb0(%rsp), %rax
cmpq %rax, 0xb8(%rsp)
movq 0xd8(%rsp), %r15
je 0x2da5d
xorl %ebx, %ebx
movq 0x60(%r14), %rax
cmpq $0x0, (%rax,%rbx,8)
jne 0x2da55
leaq (%rax,%rbx,8), %rdi
leaq 0x8(%rdi), %rsi
movq 0x68(%r14), %rdx
cmpq %rdx, %rsi
je 0x2da47
subq %rsi, %rdx
callq 0x75f0
movq 0x68(%r14), %rdx
addq $-0x8, %rdx
movq %rdx, 0x68(%r14)
decq %r15
decq %rbx
incq %rbx
cmpq %r15, %rbx
jb 0x2da1f
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x2da82
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 0x8400(%rip), %rsi      # 0x35eb5
movq %rax, %rdi
callq 0xb5c8
jmp 0x2db47
movl $0x8, %edi
callq 0x7180
movq %rax, %r14
movl $0x1, %edi
callq 0x7380
movq %rax, %r15
leaq 0x8eb5(%rip), %rsi      # 0x36998
movq %rax, %rdi
callq 0xb5c8
jmp 0x2db84
movl $0x8, %edi
callq 0x7180
movq %rax, %r14
movl $0x1, %edi
callq 0x7380
movq %rax, %r15
leaq 0x8ece(%rip), %rsi      # 0x369df
movq %rax, %rdi
callq 0xb5c8
jmp 0x2dbc1
movl $0x8, %edi
callq 0x7180
movq %rax, %r14
movl $0x1, %edi
callq 0x7380
movq %rax, %r15
leaq 0x8e1f(%rip), %rsi      # 0x3695e
movq %rax, %rdi
callq 0xb5c8
movq %r15, (%r14)
leaq 0x1a167(%rip), %rsi     # 0x47cb8
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 0x8de2(%rip), %rsi      # 0x3695e
movq %rax, %rdi
callq 0xb5c8
movq %r15, (%r14)
leaq 0x1a12a(%rip), %rsi     # 0x47cb8
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 0x8da5(%rip), %rsi      # 0x3695e
movq %rax, %rdi
callq 0xb5c8
movq %r15, (%r14)
leaq 0x1a0ed(%rip), %rsi     # 0x47cb8
movq %r14, %rdi
xorl %edx, %edx
callq 0x7660
movq %rax, %rbx
movq 0x1f8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2de83
movq 0x208(%rsp), %rsi
jmp 0x2dc54
jmp 0x2dc79
movq %rax, %rbx
movq 0x218(%rsp), %rdi
cmpq %r15, %rdi
je 0x2de83
movq 0x228(%rsp), %rsi
jmp 0x2dc54
jmp 0x2dc79
movq %rax, %rbx
movq 0x238(%rsp), %rdi
cmpq %r15, %rdi
je 0x2de83
movq 0x248(%rsp), %rsi
jmp 0x2dc54
jmp 0x2dc79
movq %rax, %rbx
movq 0x258(%rsp), %rdi
cmpq %r15, %rdi
je 0x2de83
movq 0x268(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x2de83
jmp 0x2dc79
jmp 0x2dc79
jmp 0x2dc79
jmp 0x2dc79
jmp 0x2dc79
jmp 0x2ddc1
jmp 0x2dc79
jmp 0x2ddc1
jmp 0x2dc79
movq %rax, %rbx
jmp 0x2de83
movq %rax, %rbx
jmp 0x2de69
movq %rax, %rbx
jmp 0x2de76
jmp 0x2dc9b
jmp 0x2dc9b
jmp 0x2dc9b
jmp 0x2dc9b
jmp 0x2dc9b
movq %rax, %rbx
movl $0x1, %esi
movq %r15, %rdi
callq 0x7390
jmp 0x2dd66
jmp 0x2dd63
jmp 0x2dd63
jmp 0x2dd63
jmp 0x2dce2
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2dce5
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x2dce5
movq %rax, %rbx
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x2ddc4
movq 0x130(%rsp), %rsi
jmp 0x2ddb7
jmp 0x2dd2e
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2dd31
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x2dd31
movq %rax, %rbx
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x2ddc4
movq 0x150(%rsp), %rsi
jmp 0x2ddb7
jmp 0x2de21
jmp 0x2de21
jmp 0x2de21
jmp 0x2dd63
jmp 0x2dd63
movq %rax, %rbx
movq %r14, %rdi
callq 0x72a0
jmp 0x2de24
movq %rax, %rbx
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x2ddc4
movq 0x170(%rsp), %rsi
jmp 0x2ddb7
jmp 0x2ddc1
movq %rax, %rbx
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x2ddc4
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x2ddc4
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x2de7e
jmp 0x2ddef
jmp 0x2ddea
jmp 0x2ddfc
jmp 0x2de21
jmp 0x2de21
jmp 0x2ddfc
jmp 0x2de21
jmp 0x2ddea
jmp 0x2ddef
jmp 0x2de21
jmp 0x2ddfc
jmp 0x2ddfc
jmp 0x2de21
jmp 0x2de21
movq %rax, %rbx
jmp 0x2de40
movq %rax, %rbx
jmp 0x2de5c
jmp 0x2de21
jmp 0x2ddfc
jmp 0x2de21
jmp 0x2de21
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2de24
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x2de24
jmp 0x2de21
jmp 0x2de21
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2de40
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2de5c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
leaq 0x1b0(%rsp), %rdi
callq 0x1a6c6
leaq 0x1c8(%rsp), %rdi
callq 0x1a6c6
leaq 0x1e0(%rsp), %rdi
callq 0x1a6c6
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x2dea8
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x7390
movq %rbx, %rdi
callq 0x76a0