// File: /workspace/github_cpp_makefile_star2_O1/melop[P]admixem/Individual.cpp
// Function: Individual::HandleCourter(Individual*, bool)
int Individual::HandleCourter(Individual * pCourter , bool bIgnoreGlobalRules) {

	
		#ifdef _OPENMP
		int nCPU = omp_get_thread_num();
		//int nTotalCPUs = omp_get_max_threads();
			#ifdef DEBUG
			printf("CPU %d: %s : %d\n", nCPU, "SexSelFormulae # ", nCPU);
			#endif
		#else
			int nCPU = 0;
		#endif

	int nCurrGen = SimulConfig.GetCurrGen();

	if (pCourter->IsDead()) {
		throw(new Exception("Cannot mate with dead courter. Something went wrong."));
	}

	if (this->_nAvailableGametes == 0) {
		//no more gametes, byebye.
		return  0;
	}
	//entry point for sexual selection.

	string sPop = ((Population*)(this->_pPop))->GetPopName();
	
	list< vector<string> > * pqvCourterSymbols = SimulConfig.pSexualSelConfig->GetFormulaSymbolStringsCourter( sPop);
	list< vector<string> > * pqvSelfSymbols = SimulConfig.pSexualSelConfig->GetFormulaSymbolStringsSelf( sPop);
	list< vector<string> > * pqvDadSymbols = SimulConfig.pSexualSelConfig->GetFormulaSymbolStringsDad( sPop);
	list< vector<string> > * pqvMomSymbols = SimulConfig.pSexualSelConfig->GetFormulaSymbolStringsMom( sPop);

	//Traits for oblique imprinting; note that things for peer imprinting has already been set at the pop level. see Population::Breed()
	list< vector<string> > * pqvPrevGenCurrPopSymbols = SimulConfig.pSexualSelConfig->GetFormulaSymbolStringsPrevGenCurrPop(sPop);
	list< vector<string> > * pqvPrevGenCurrPopCourterSymbols = SimulConfig.pSexualSelConfig->GetFormulaSymbolStringsPrevGenCurrPopCourter(sPop);
	list< vector<string> > * pqvPrevGenCurrPopChooserSymbols = SimulConfig.pSexualSelConfig->GetFormulaSymbolStringsPrevGenCurrPopChooser(sPop);

	list< vector<string> > * pqvPrevGenPrevPopSymbols = SimulConfig.pSexualSelConfig->GetFormulaSymbolStringsPrevGenPrevPop(sPop);
	list< vector<string> > * pqvPrevGenPrevPopCourterSymbols = SimulConfig.pSexualSelConfig->GetFormulaSymbolStringsPrevGenPrevPopCourter(sPop);
	list< vector<string> > * pqvPrevGenPrevPopChooserSymbols = SimulConfig.pSexualSelConfig->GetFormulaSymbolStringsPrevGenPrevPopChooser(sPop);

	list< vector<string> >::iterator itSelfSymbols= pqvSelfSymbols->begin();
	list< vector<string> >::iterator itCourterSymbols= pqvCourterSymbols->begin();
	list< vector<string> >::iterator itDadSymbols= pqvDadSymbols->begin();
	list< vector<string> >::iterator itMomSymbols= pqvMomSymbols->begin();

	list< vector<string> >::iterator itPrevGenCurrPopSymbols		=        pqvPrevGenCurrPopSymbols->begin();
	list< vector<string> >::iterator itPrevGenCurrPopCourterSymbols = 		 pqvPrevGenCurrPopCourterSymbols->begin();
	list< vector<string> >::iterator itPrevGenCurrPopChooserSymbols =		 pqvPrevGenCurrPopChooserSymbols->begin();
	
	list< vector<string> >::iterator itPrevGenPrevPopSymbols		= 				 pqvPrevGenPrevPopSymbols->begin();
	list< vector<string> >::iterator itPrevGenPrevPopCourterSymbols =  		 pqvPrevGenPrevPopCourterSymbols->begin();
	list< vector<string> >::iterator itPrevGenPrevPopChooserSymbols =		 pqvPrevGenPrevPopChooserSymbols->begin();

	bool bAccept = true;

	//#pragma omp critical 
	//{
		list< pair< Parser *, int > > * pqParsers = SimulConfig.pSexualSelConfig->GetFormulae(sPop);
		for (list< pair< Parser *, int > > ::iterator itParser= pqParsers->begin(); itParser != pqParsers->end() ; ++itParser) {
			vector<string> vSymbolsSelf = *itSelfSymbols;
			vector<string> vSymbolsCourter = *itCourterSymbols;
			vector<string> vSymbolsDad = *itDadSymbols;
			vector<string> vSymbolsMom = *itMomSymbols;

			vector<string> vSymbolsPrevGenCurrPop		=	*itPrevGenCurrPopSymbols	;	
			vector<string> vSymbolsPrevGenCurrPopCourter = *itPrevGenCurrPopCourterSymbols;
			vector<string> vSymbolsPrevGenCurrPopChooser = *itPrevGenCurrPopChooserSymbols;
			 
			vector<string> vSymbolsPrevGenPrevPop		 =	*itPrevGenPrevPopSymbols		;
			vector<string> vSymbolsPrevGenPrevPopCourter = *itPrevGenPrevPopCourterSymbols;
			vector<string> vSymbolsPrevGenPrevPopChooser = *itPrevGenPrevPopChooserSymbols;

			Parser * pParser = itParser->first;
			int nGen = itParser->second;

			if ((nGen ==-1 && !bIgnoreGlobalRules) || (bIgnoreGlobalRules && nGen == nCurrGen) ) { // two scenarios: apply global rule or apply generation-specific rule
				

				//Set self symbol values
				for(vector<string>::iterator itSymbol=vSymbolsSelf.begin();itSymbol!=vSymbolsSelf.end();++itSymbol)
				{
					pParser->symbols_[string("My_"+(*itSymbol))] = this->GetPhenotype(*itSymbol);
					pParser->symbols_[*itSymbol] = this->GetPhenotype(*itSymbol); //set both variables
				}

				//Set courter symbol values
				for(vector<string>::iterator itSymbol=vSymbolsCourter.begin();itSymbol!=vSymbolsCourter.end();++itSymbol)
				{
					pParser->symbols_[string("Courter_"+(*itSymbol))] = pCourter->GetPhenotype(*itSymbol);				
				}

				//Set dad symbol values
				bool bSkipRule = false; // rules containing references to parental phenotypes will be skipped in generation 0
				for(vector<string>::iterator itSymbol=vSymbolsDad.begin();itSymbol!=vSymbolsDad.end();++itSymbol)
				{
					if (nCurrGen == 0) {
						bSkipRule = true;
						break;
					}

					pParser->symbols_[string("Dad_"+(*itSymbol))] = this->_mpDadPhenotypes[*itSymbol];				
				}

				//Set mom symbol values
				for(vector<string>::iterator itSymbol=vSymbolsMom.begin();itSymbol!=vSymbolsMom.end();++itSymbol)
				{
					if (nCurrGen == 0) {
						bSkipRule = true;
						break;
					}

					pParser->symbols_[string("Mom_"+(*itSymbol))] = this->_mpMomPhenotypes[*itSymbol];				
				}

				//Set PrevGenCurrPop symbol values
				bSkipRule = bSkipRule || this->fnSetParserPopWide(pParser , vSymbolsPrevGenCurrPop, string("PrevGenCurrPop"), ((Population*)this->GetPop())->_mpPrevGenSumPhenotype);
				//Set PrevGenCurrPopCourter symbol values
				bSkipRule = bSkipRule || this->fnSetParserPopWide(pParser , vSymbolsPrevGenCurrPopCourter , string("PrevGenCurrPopCourter"), ((Population*)this->GetPop())->_mpPrevGenSumPhenotypeMale);
				//Set PrevGenCurrPopChooser
				bSkipRule = bSkipRule || this->fnSetParserPopWide(pParser , vSymbolsPrevGenCurrPopChooser, string("PrevGenCurrPopChooser"), ((Population*)this->GetPop())->_mpPrevGenSumPhenotypeFemale);
				
				//set PrevGenPrevPop
				bSkipRule = bSkipRule || this->fnSetParserPopWide(pParser , vSymbolsPrevGenPrevPop, string("PrevGenPrevPop"), ((Population*)this->GetPrevPop())->_mpPrevGenSumPhenotype);
				// set PrevGenPrevPopCourter
				bSkipRule = bSkipRule || this->fnSetParserPopWide(pParser , vSymbolsPrevGenPrevPopCourter, string("PrevGenPrevPopCourter"), ((Population*)this->GetPrevPop())->_mpPrevGenSumPhenotypeMale);
				//set PrevGenPrevPopChooser
				bSkipRule = bSkipRule || this->fnSetParserPopWide(pParser , vSymbolsPrevGenPrevPopChooser, string("PrevGenPrevPopChooser"), ((Population*)this->GetPrevPop())->_mpPrevGenSumPhenotypeFemale);
				


				if (bSkipRule) continue;
				

				bAccept = (vUniformGen[nCPU]->Next() <= pParser->Evaluate())? true : false;

				if (!bAccept) {
					return 0; //reject mate
				}

			}

			/*
			if (!bAccept) {
				break;
			}
			*/
			++itSelfSymbols;
			++itCourterSymbols;
			++itDadSymbols;
			++itMomSymbols;

			++itPrevGenCurrPopSymbols;	
			++itPrevGenCurrPopCourterSymbols;
			++itPrevGenCurrPopChooserSymbols;
			
			++itPrevGenPrevPopSymbols;
			++itPrevGenPrevPopCourterSymbols;
			++itPrevGenPrevPopChooserSymbols;

		}
	
	//}//end critical

	if (!bAccept) {
		return 0;
	}

	int nSuccess;
	#pragma omp critical 
	{
		if (pCourter) {
			this->_arrOtherParentsForOffsprings.push_back(pCourter);
			nSuccess = 1;
		}
		else {
			nSuccess = 0;
		}
	}//end critical

	return nSuccess;
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x468, %rsp            # imm = 0x468
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, 0x58(%rsp)
leaq 0x254c8(%rip), %r14     # 0x49908
movq %r14, %rdi
callq 0x198ee
movl %eax, 0x24(%rsp)
movq 0x58(%rsp), %rax
cmpb $0x1, 0x2d(%rax)
je 0x253b1
cmpl $0x0, 0x40(%rbx)
je 0x25327
movl %ebp, 0x80(%rsp)
movq %rbx, 0x28(%rsp)
movq 0x18(%rbx), %rsi
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x2c3c8
movq 0x28(%r14), %rbx
leaq 0x3c8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x3b8(%rsp), %rdi
callq 0xa916
leaq 0x3b8(%rsp), %rsi
movq %rbx, %rdi
callq 0x178be
movq %rax, %rbp
movq 0x3b8(%rsp), %rdi
cmpq %r12, %rdi
je 0x244da
movq 0x3c8(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x3a8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x398(%rsp), %rdi
callq 0xa916
leaq 0x398(%rsp), %rsi
movq %rbx, %rdi
callq 0x178ca
movq %rax, %r12
movq 0x398(%rsp), %rdi
cmpq %r15, %rdi
je 0x24534
movq 0x3a8(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x388(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x378(%rsp), %rdi
callq 0xa916
leaq 0x378(%rsp), %rsi
movq %rbx, %rdi
callq 0x178fa
movq %rax, 0x18(%rsp)
movq 0x378(%rsp), %rdi
cmpq %r15, %rdi
je 0x24590
movq 0x388(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x368(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x358(%rsp), %rdi
callq 0xa916
leaq 0x358(%rsp), %rsi
movq %rbx, %rdi
callq 0x17906
movq %rax, 0xd0(%rsp)
movq 0x358(%rsp), %rdi
cmpq %r15, %rdi
je 0x245ef
movq 0x368(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x348(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x338(%rsp), %rdi
callq 0xa916
leaq 0x338(%rsp), %rsi
movq %rbx, %rdi
callq 0x17912
movq %rax, 0xc8(%rsp)
movq 0x338(%rsp), %rdi
cmpq %r15, %rdi
je 0x2464e
movq 0x348(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x328(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x318(%rsp), %rdi
callq 0xa916
leaq 0x318(%rsp), %rsi
movq %rbx, %rdi
callq 0x1791e
movq %rax, 0xc0(%rsp)
movq 0x318(%rsp), %rdi
cmpq %r15, %rdi
je 0x246ad
movq 0x328(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x308(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x2f8(%rsp), %rdi
callq 0xa916
leaq 0x2f8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1792a
movq %rax, 0x10(%rsp)
movq 0x2f8(%rsp), %rdi
cmpq %r15, %rdi
je 0x24709
movq 0x308(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x2e8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x2d8(%rsp), %rdi
callq 0xa916
leaq 0x2d8(%rsp), %rsi
movq %rbx, %rdi
callq 0x17936
movq %rax, 0x50(%rsp)
movq %r12, %rbx
movq 0x2d8(%rsp), %rdi
cmpq %r15, %rdi
je 0x24768
movq 0x2e8(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %r15
leaq 0x2c8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x2b8(%rsp), %rdi
callq 0xa916
leaq 0x2b8(%rsp), %rsi
movq %r15, %rdi
callq 0x17942
movq %rax, %r13
movq %rbp, %r15
movq 0x2b8(%rsp), %rdi
cmpq %r12, %rdi
je 0x247c6
movq 0x2c8(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %r12
leaq 0x2a8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x298(%rsp), %rdi
callq 0xa916
leaq 0x298(%rsp), %rsi
movq %r12, %rdi
callq 0x1794e
movq %rax, %r12
movq 0x298(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24820
movq 0x2a8(%rsp), %rsi
incq %rsi
callq 0x7390
movq (%rbx), %rbp
movq (%r15), %r15
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xd0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xc8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x98(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
movq (%r13), %rax
movq %rax, 0x90(%rsp)
movq (%r12), %rax
movq %rax, 0x88(%rsp)
movq 0x28(%r14), %rbx
leaq 0x288(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x278(%rsp), %rdi
callq 0xa916
leaq 0x278(%rsp), %rsi
movq %rbx, %rdi
callq 0x1788a
movq %rax, 0xe8(%rsp)
movq 0x278(%rsp), %rdi
cmpq %r14, %rdi
movq %rbp, %r13
movq %r15, %r12
je 0x24909
movq 0x288(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0xe8(%rsp), %rax
movq (%rax), %r14
cmpq %rax, %r14
sete %al
je 0x2532b
movb %al, 0xf(%rsp)
cmpb $0x0, 0x80(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnel 0x24(%rsp), %eax
movl %eax, 0xdc(%rsp)
movq 0x28(%rsp), %rax
leaq 0x50(%rax), %r15
leaq 0x70(%rsp), %rbp
leaq 0xb0(%rax), %rcx
movq %rcx, 0xc8(%rsp)
addq $0xe0, %rax
movq %rax, 0xc0(%rsp)
movb $0x1, 0xe(%rsp)
leaq 0x60(%rsp), %rbx
leaq 0x10(%r13), %rsi
leaq 0x260(%rsp), %rdi
callq 0x2021c
leaq 0x10(%r12), %rsi
leaq 0x248(%rsp), %rdi
callq 0x2021c
movq 0xb8(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x230(%rsp), %rdi
callq 0x2021c
movq 0xb0(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x218(%rsp), %rdi
callq 0x2021c
movq 0xa8(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x450(%rsp), %rdi
callq 0x2021c
movq 0xa0(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x438(%rsp), %rdi
callq 0x2021c
movq 0x98(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x420(%rsp), %rdi
callq 0x2021c
movq 0x50(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x408(%rsp), %rdi
callq 0x2021c
movq 0x90(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x3f0(%rsp), %rdi
callq 0x2021c
movq 0x88(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x3d8(%rsp), %rdi
callq 0x2021c
movl 0xdc(%rsp), %eax
cmpl %eax, 0x18(%r14)
movq %r14, 0x80(%rsp)
jne 0x251da
movq %r12, 0xe0(%rsp)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x260(%rsp), %r14
cmpq 0x268(%rsp), %r14
je 0x24bd4
movq 0x10(%rsp), %rax
leaq 0x68(%rax), %r12
leaq 0x180(%rsp), %rax
movq %rax, 0x170(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x170(%rsp), %rdi
callq 0xa916
movq %r15, %rdi
leaq 0x170(%rsp), %rsi
callq 0x9b86
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x1160a(%rip), %rsi     # 0x360f8
movq %r14, %rdx
callq 0x9981
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b39a
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24b22
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x24b47
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x7390
leaq 0x160(%rsp), %rax
movq %rax, 0x150(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x150(%rsp), %rdi
callq 0xa916
movq %r15, %rdi
leaq 0x150(%rsp), %rsi
callq 0x9b86
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x9b86
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0x24bc2
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r14
cmpq 0x268(%rsp), %r14
jne 0x24aa3
movq %r13, 0x210(%rsp)
movq 0x248(%rsp), %r14
cmpq 0x250(%rsp), %r14
je 0x24cda
movq 0x10(%rsp), %rax
addq $0x68, %rax
movq %rax, 0xd0(%rsp)
movq %rbx, %r12
movq %r15, %rbx
movq %rbp, %r15
movq 0x58(%rsp), %r13
leaq 0x200(%rsp), %rax
movq %rax, 0x1f0(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x1f0(%rsp), %rbp
movq %rbp, %rdi
callq 0xa916
addq $0x50, %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x9b86
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r12, %r13
movq %r12, %rdi
leaq 0x115ca(%rip), %rsi     # 0x3622b
movq %r14, %rdx
callq 0x9981
movq %r15, %rbp
movq 0xd0(%rsp), %rdi
movq %r13, %rsi
callq 0x1b39a
movq %rbx, %r15
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24ca0
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x1f0(%rsp), %rdi
leaq 0x200(%rsp), %rax
cmpq %rax, %rdi
movq %r12, %rbx
je 0x24cc8
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r14
cmpq 0x250(%rsp), %r14
jne 0x24c03
cmpl $0x0, 0x24(%rsp)
sete %al
movq 0x230(%rsp), %r14
cmpq 0x238(%rsp), %r14
sete %r13b
orb %r13b, %al
jne 0x24d7f
movq 0x10(%rsp), %rax
leaq 0x68(%rax), %r12
movq 0xc8(%rsp), %rdi
movq %r14, %rsi
callq 0x9b86
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x114d7(%rip), %rsi     # 0x36203
movq %r14, %rdx
callq 0x9981
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b39a
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24d60
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r14
movq 0x238(%rsp), %rax
cmpq %rax, %r14
sete %r13b
cmpl $0x0, 0x24(%rsp)
je 0x24d7f
cmpq %rax, %r14
jne 0x24d08
cmpl $0x0, 0x24(%rsp)
sete %cl
movq 0x218(%rsp), %r14
cmpq 0x220(%rsp), %r14
sete %al
orb %al, %cl
jne 0x24e1d
movq 0x10(%rsp), %rax
leaq 0x68(%rax), %r12
movq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x9b86
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x1143d(%rip), %rsi     # 0x36208
movq %r14, %rdx
callq 0x9981
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b39a
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24dff
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r14
movq 0x220(%rsp), %rcx
cmpq %rcx, %r14
sete %al
cmpl $0x0, 0x24(%rsp)
je 0x24e1d
cmpq %rcx, %r14
jne 0x24da7
andb %al, %r13b
movb $0x1, %r14b
cmpb $0x1, %r13b
jne 0x24e80
leaq 0x1e0(%rsp), %rax
movq %rax, 0x1d0(%rsp)
leaq 0x1d0(%rsp), %r14
movq %r14, %rdi
leaq 0x12054(%rip), %rsi     # 0x36e9f
leaq 0x1205b(%rip), %rdx     # 0x36ead
callq 0xa886
movq 0x28(%rsp), %rax
movq 0x18(%rax), %r8
movl $0x148, %eax            # imm = 0x148
addq %rax, %r8
movq 0x10(%rsp), %rsi
leaq 0x450(%rsp), %rdx
movq %r14, %rcx
callq 0x258b8
movl %eax, %r14d
testb %r13b, %r13b
movq 0x210(%rsp), %r13
je 0x24eb2
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x24eb2
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x7390
movb $0x1, %r12b
testb %r14b, %r14b
jne 0x24f11
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
leaq 0x1b0(%rsp), %r12
movq %r12, %rdi
leaq 0x11fd2(%rip), %rsi     # 0x36eae
leaq 0x11fe0(%rip), %rdx     # 0x36ec3
callq 0xa886
movq 0x28(%rsp), %rax
movq 0x18(%rax), %r8
movl $0x178, %eax            # imm = 0x178
addq %rax, %r8
movq 0x10(%rsp), %rsi
leaq 0x438(%rsp), %rdx
movq %r12, %rcx
callq 0x258b8
movl %eax, %r12d
testb %r14b, %r14b
jne 0x24f3b
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x24f3b
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x7390
movb $0x1, %r14b
testb %r12b, %r12b
jne 0x24f9a
leaq 0x1a0(%rsp), %rax
movq %rax, 0x190(%rsp)
leaq 0x190(%rsp), %r14
movq %r14, %rdi
leaq 0x11f5f(%rip), %rsi     # 0x36ec4
leaq 0x11f6d(%rip), %rdx     # 0x36ed9
callq 0xa886
movq 0x28(%rsp), %rax
movq 0x18(%rax), %r8
movl $0x1a8, %eax            # imm = 0x1A8
addq %rax, %r8
movq 0x10(%rsp), %rsi
leaq 0x420(%rsp), %rdx
movq %r14, %rcx
callq 0x258b8
movl %eax, %r14d
testb %r12b, %r12b
jne 0x24fc4
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x24fc4
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x7390
movb $0x1, %r12b
testb %r14b, %r14b
jne 0x2502d
leaq 0x140(%rsp), %rax
movq %rax, 0x130(%rsp)
leaq 0x130(%rsp), %rdi
leaq 0x11eef(%rip), %rsi     # 0x36eda
leaq 0x11ef6(%rip), %rdx     # 0x36ee8
callq 0xa886
movq 0x28(%rsp), %rax
movq 0x20(%rax), %r8
testq %r8, %r8
jne 0x25009
movq 0x18(%rax), %r8
addq $0x148, %r8             # imm = 0x148
movq 0x10(%rsp), %rsi
leaq 0x408(%rsp), %rdx
leaq 0x130(%rsp), %rcx
callq 0x258b8
movl %eax, %r12d
testb %r14b, %r14b
jne 0x25057
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0x25057
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x7390
movb $0x1, %r14b
testb %r12b, %r12b
jne 0x250c0
leaq 0x120(%rsp), %rax
movq %rax, 0x110(%rsp)
leaq 0x110(%rsp), %rdi
leaq 0x11e6b(%rip), %rsi     # 0x36ee9
leaq 0x11e79(%rip), %rdx     # 0x36efe
callq 0xa886
movq 0x28(%rsp), %rax
movq 0x20(%rax), %r8
testq %r8, %r8
jne 0x2509c
movq 0x18(%rax), %r8
addq $0x178, %r8             # imm = 0x178
movq 0x10(%rsp), %rsi
leaq 0x3f0(%rsp), %rdx
leaq 0x110(%rsp), %rcx
callq 0x258b8
movl %eax, %r14d
testb %r12b, %r12b
jne 0x250ea
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x250ea
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x7390
movb $0x1, %r12b
testb %r14b, %r14b
jne 0x25153
leaq 0x100(%rsp), %rax
movq %rax, 0xf0(%rsp)
leaq 0xf0(%rsp), %rdi
leaq 0x11dee(%rip), %rsi     # 0x36eff
leaq 0x11dfc(%rip), %rdx     # 0x36f14
callq 0xa886
movq 0x28(%rsp), %rax
movq 0x20(%rax), %r8
testq %r8, %r8
jne 0x2512f
movq 0x18(%rax), %r8
addq $0x1a8, %r8             # imm = 0x1A8
movq 0x10(%rsp), %rsi
leaq 0x3d8(%rsp), %rdx
leaq 0xf0(%rsp), %rcx
callq 0x258b8
movl %eax, %r12d
testb %r14b, %r14b
jne 0x2517d
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x2517d
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x7390
testb %r12b, %r12b
je 0x25194
movl $0x4, %r14d
xorl %eax, %eax
movq 0xe0(%rsp), %r12
jmp 0x251d2
leaq 0x248f5(%rip), %rax     # 0x49a90
movq (%rax), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *(%rax)
movsd %xmm0, 0x18(%rsp)
movq 0xe0(%rsp), %r12
movq 0x10(%rsp), %rdi
callq 0x9836
xorl %r14d, %r14d
ucomisd 0x18(%rsp), %xmm0
setae %al
setb %r14b
movb %al, 0xe(%rsp)
testb %al, %al
je 0x25277
movq (%r13), %r13
movq (%r12), %r12
movq 0xb8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xb0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x98(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x88(%rsp)
xorl %r14d, %r14d
leaq 0x3d8(%rsp), %rdi
callq 0x1a61a
leaq 0x3f0(%rsp), %rdi
callq 0x1a61a
leaq 0x408(%rsp), %rdi
callq 0x1a61a
leaq 0x420(%rsp), %rdi
callq 0x1a61a
leaq 0x438(%rsp), %rdi
callq 0x1a61a
leaq 0x450(%rsp), %rdi
callq 0x1a61a
leaq 0x218(%rsp), %rdi
callq 0x1a61a
leaq 0x230(%rsp), %rdi
callq 0x1a61a
leaq 0x248(%rsp), %rdi
callq 0x1a61a
leaq 0x260(%rsp), %rdi
callq 0x1a61a
testb $0x3, %r14b
movq 0x80(%rsp), %r14
jne 0x2531d
movq (%r14), %r14
cmpq 0xe8(%rsp), %r14
sete 0xf(%rsp)
jne 0x24972
movb 0xf(%rsp), %al
movb 0xe(%rsp), %dl
jmp 0x2532d
xorl %ebx, %ebx
jmp 0x2539d
movb $0x1, %dl
xorl %ebx, %ebx
testb $0x1, %al
je 0x25382
movq 0x58(%rsp), %rax
testq %rax, %rax
setne %cl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x25382
movq 0x28(%rsp), %rdi
movq 0x148(%rdi), %rsi
cmpq 0x150(%rdi), %rsi
je 0x2536c
movq %rax, (%rsi)
addq $0x8, 0x148(%rdi)
movl $0x1, %ebx
jmp 0x25382
addq $0x140, %rdi            # imm = 0x140
movl $0x1, %ebx
leaq 0x58(%rsp), %rdx
callq 0x275b2
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2539d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7390
movl %ebx, %eax
addq $0x468, %rsp            # imm = 0x468
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 0x11a98(%rip), %rsi     # 0x36e6a
movq %rax, %rdi
callq 0xb4d0
movq %r15, (%r14)
leaq 0x238d4(%rip), %rsi     # 0x48cb8
movq %r14, %rdi
xorl %edx, %edx
callq 0x7660
jmp 0x2570f
movq %rax, %rbx
movl $0x1, %esi
movq %r15, %rdi
callq 0x7390
jmp 0x25408
movq %rax, %rbx
movq %r14, %rdi
callq 0x72a0
jmp 0x2589c
movq %rax, %rbx
movq 0x278(%rsp), %rdi
cmpq %r14, %rdi
je 0x25881
movq 0x288(%rsp), %rsi
jmp 0x255a4
jmp 0x2570f
movq %rax, %rbx
movq 0x298(%rsp), %rdi
cmpq %rbp, %rdi
je 0x25881
movq 0x2a8(%rsp), %rsi
jmp 0x255a4
jmp 0x2570f
movq %rax, %rbx
movq 0x2b8(%rsp), %rdi
cmpq %r12, %rdi
je 0x25881
movq 0x2c8(%rsp), %rsi
jmp 0x255a4
jmp 0x2570f
movq %rax, %rbx
movq 0x2d8(%rsp), %rdi
cmpq %r15, %rdi
je 0x25881
movq 0x2e8(%rsp), %rsi
jmp 0x255a4
jmp 0x2570f
movq %rax, %rbx
movq 0x2f8(%rsp), %rdi
cmpq %r15, %rdi
je 0x25881
movq 0x308(%rsp), %rsi
jmp 0x255a4
jmp 0x2570f
movq %rax, %rbx
movq 0x318(%rsp), %rdi
cmpq %r15, %rdi
je 0x25881
movq 0x328(%rsp), %rsi
jmp 0x255a4
jmp 0x2570f
movq %rax, %rbx
movq 0x338(%rsp), %rdi
cmpq %r15, %rdi
je 0x25881
movq 0x348(%rsp), %rsi
jmp 0x255a4
jmp 0x2570f
movq %rax, %rbx
movq 0x358(%rsp), %rdi
cmpq %r15, %rdi
je 0x25881
movq 0x368(%rsp), %rsi
jmp 0x255a4
jmp 0x2570f
movq %rax, %rbx
movq 0x378(%rsp), %rdi
cmpq %r15, %rdi
je 0x25881
movq 0x388(%rsp), %rsi
jmp 0x255a4
jmp 0x2570f
movq %rax, %rbx
movq 0x398(%rsp), %rdi
cmpq %r15, %rdi
je 0x25881
movq 0x3a8(%rsp), %rsi
jmp 0x255a4
jmp 0x2570f
movq %rax, %rbx
movq 0x3b8(%rsp), %rdi
cmpq %r12, %rdi
je 0x25881
movq 0x3c8(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x25881
jmp 0x2570f
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x257ff
movq 0x100(%rsp), %rsi
jmp 0x257f2
jmp 0x257fc
movq %rax, %rbx
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x257ff
movq 0x120(%rsp), %rsi
jmp 0x257f2
jmp 0x257fc
movq %rax, %rbx
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0x257ff
movq 0x140(%rsp), %rsi
jmp 0x257f2
jmp 0x257fc
movq %rax, %rbx
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x257ff
movq 0x1a0(%rsp), %rsi
jmp 0x257f2
jmp 0x257fc
movq %rax, %rbx
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x257ff
movq 0x1c0(%rsp), %rsi
jmp 0x257f2
jmp 0x257fc
movq %rax, %rbx
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x257ff
movq 0x1e0(%rsp), %rsi
jmp 0x257f2
jmp 0x257fc
jmp 0x257fc
movq %rax, %rbx
jmp 0x25867
movq %rax, %rbx
jmp 0x2585a
movq %rax, %rbx
jmp 0x2584d
movq %rax, %rbx
jmp 0x25840
movq %rax, %rbx
jmp 0x25833
movq %rax, %rbx
jmp 0x25826
movq %rax, %rbx
jmp 0x25819
movq %rax, %rbx
jmp 0x2580c
movq %rax, %rbx
jmp 0x25881
movq %rax, %rbx
jmp 0x25874
jmp 0x257fc
jmp 0x257fc
jmp 0x25735
jmp 0x257fc
jmp 0x257fc
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x257ff
movq 0x70(%rsp), %rsi
jmp 0x257f2
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x25771
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x25771
jmp 0x2576e
movq %rax, %rbx
movq 0x1f0(%rsp), %rdi
leaq 0x200(%rsp), %rax
cmpq %rax, %rdi
je 0x257ff
movq 0x200(%rsp), %rsi
jmp 0x257f2
jmp 0x257fc
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x257b3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x257b3
jmp 0x257b0
movq %rax, %rbx
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x257ff
movq 0x180(%rsp), %rsi
jmp 0x257f2
movq %rax, %rbx
movq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0x257ff
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x257ff
movq %rax, %rbx
leaq 0x3d8(%rsp), %rdi
callq 0x1a61a
leaq 0x3f0(%rsp), %rdi
callq 0x1a61a
leaq 0x408(%rsp), %rdi
callq 0x1a61a
leaq 0x420(%rsp), %rdi
callq 0x1a61a
leaq 0x438(%rsp), %rdi
callq 0x1a61a
leaq 0x450(%rsp), %rdi
callq 0x1a61a
leaq 0x218(%rsp), %rdi
callq 0x1a61a
leaq 0x230(%rsp), %rdi
callq 0x1a61a
leaq 0x248(%rsp), %rdi
callq 0x1a61a
leaq 0x260(%rsp), %rdi
callq 0x1a61a
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2589c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7390
movq %rbx, %rdi
callq 0x76a0