// File: /workspace/github_cpp_makefile_star2_O3/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 $0x398, %rsp            # imm = 0x398
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, 0xd0(%rsp)
leaq 0x24586(%rip), %r14     # 0x48908
movq %r14, %rdi
callq 0x199ca
movl %eax, 0x4c(%rsp)
cmpb $0x1, 0x2d(%rbx)
je 0x25217
cmpl $0x0, 0x40(%r15)
je 0x25181
movl %ebp, 0x28(%rsp)
movq %r15, 0x38(%rsp)
movq 0x18(%r15), %rsi
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x2bf56
movq 0x28(%r14), %rbx
leaq 0x2f8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x2e8(%rsp), %rdi
callq 0xa9b2
leaq 0x2e8(%rsp), %rsi
movq %rbx, %rdi
callq 0x179f6
movq %rax, 0x30(%rsp)
movq 0x2e8(%rsp), %rdi
cmpq %r12, %rdi
je 0x24417
movq 0x2f8(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x2d8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x2c8(%rsp), %rdi
callq 0xa9b2
leaq 0x2c8(%rsp), %rsi
movq %rbx, %rdi
callq 0x17a02
movq %rax, %r12
movq 0x2c8(%rsp), %rdi
cmpq %r15, %rdi
je 0x24471
movq 0x2d8(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x2b8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x2a8(%rsp), %rdi
callq 0xa9b2
leaq 0x2a8(%rsp), %rsi
movq %rbx, %rdi
callq 0x17a32
movq %rax, 0xc8(%rsp)
movq 0x2a8(%rsp), %rdi
cmpq %r15, %rdi
je 0x244d0
movq 0x2b8(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x298(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x288(%rsp), %rdi
callq 0xa9b2
leaq 0x288(%rsp), %rsi
movq %rbx, %rdi
callq 0x17a3e
movq %rax, 0x88(%rsp)
movq 0x288(%rsp), %rdi
cmpq %r15, %rdi
je 0x2452f
movq 0x298(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x278(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x268(%rsp), %rdi
callq 0xa9b2
leaq 0x268(%rsp), %rsi
movq %rbx, %rdi
callq 0x17a4a
movq %rax, 0x80(%rsp)
movq 0x268(%rsp), %rdi
cmpq %r15, %rdi
je 0x2458e
movq 0x278(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x258(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x248(%rsp), %rdi
callq 0xa9b2
leaq 0x248(%rsp), %rsi
movq %rbx, %rdi
callq 0x17a56
movq %rax, 0x78(%rsp)
movq 0x248(%rsp), %rdi
cmpq %r15, %rdi
je 0x245ea
movq 0x258(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x238(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x228(%rsp), %rdi
callq 0xa9b2
leaq 0x228(%rsp), %rsi
movq %rbx, %rdi
callq 0x17a62
movq %rax, 0x70(%rsp)
movq 0x228(%rsp), %rdi
cmpq %r15, %rdi
je 0x24646
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x218(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x208(%rsp), %rdi
callq 0xa9b2
leaq 0x208(%rsp), %rsi
movq %rbx, %rdi
callq 0x17a6e
movq %rax, %r13
movq 0x208(%rsp), %rdi
cmpq %r15, %rdi
je 0x246a0
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x1f8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1e8(%rsp), %rdi
callq 0xa9b2
leaq 0x1e8(%rsp), %rsi
movq %rbx, %rdi
callq 0x17a7a
movq %rax, %rbp
movq 0x1e8(%rsp), %rdi
cmpq %r15, %rdi
je 0x246fa
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x28(%r14), %rbx
leaq 0x1d8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1c8(%rsp), %rdi
callq 0xa9b2
leaq 0x1c8(%rsp), %rsi
movq %rbx, %rdi
callq 0x17a86
movq %rax, %rbx
movq 0x1c8(%rsp), %rdi
cmpq %r15, %rdi
je 0x24754
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x7390
movq (%r12), %r12
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xc0(%rsp)
movq 0xc8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0x88(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x70(%rsp)
movq (%r13), %rax
movq %rax, 0xa8(%rsp)
movq (%rbp), %rax
movq %rax, 0xa0(%rsp)
movq (%rbx), %rax
movq %rax, 0x98(%rsp)
movq 0x28(%r14), %rbx
leaq 0x1b8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1a8(%rsp), %rdi
callq 0xa9b2
movq 0x38(%rsp), %r15
leaq 0x1a8(%rsp), %rsi
movq %rbx, %rdi
callq 0x179c2
movq %rax, %rbx
movq 0x1a8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2483d
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x7390
movq (%rbx), %rcx
cmpq %rbx, %rcx
je 0x25185
cmpb $0x0, 0x28(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnel 0x4c(%rsp), %eax
movl %eax, 0xdc(%rsp)
leaq 0x130(%rsp), %r14
movq %r15, %rax
addq $0x50, %r15
leaq 0xb0(%rax), %rdx
movq %rdx, 0x140(%rsp)
addq $0xe0, %rax
movq %rax, 0xc8(%rsp)
movb $0x1, %al
movl %eax, 0x48(%rsp)
leaq 0x8(%rsp), %rbp
movq %rbx, 0x40(%rsp)
movq %rcx, 0x88(%rsp)
leaq 0x10(%r12), %rsi
leaq 0x190(%rsp), %rdi
callq 0x2024e
movq 0xc0(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x178(%rsp), %rdi
callq 0x2024e
movq 0xb8(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x160(%rsp), %rdi
callq 0x2024e
movq 0xb0(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x148(%rsp), %rdi
callq 0x2024e
movq 0x80(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x380(%rsp), %rdi
callq 0x2024e
movq 0x78(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x368(%rsp), %rdi
callq 0x2024e
movq 0x70(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x350(%rsp), %rdi
callq 0x2024e
movq 0xa8(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x338(%rsp), %rdi
callq 0x2024e
movq 0xa0(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x320(%rsp), %rdi
callq 0x2024e
movq 0x98(%rsp), %rax
leaq 0x10(%rax), %rsi
leaq 0x308(%rsp), %rdi
callq 0x2024e
movq 0x88(%rsp), %rax
movl 0xdc(%rsp), %ecx
cmpl %ecx, 0x18(%rax)
jne 0x25020
movq %r12, 0x90(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x190(%rsp), %r12
cmpq 0x198(%rsp), %r12
je 0x24b02
movq 0x28(%rsp), %rax
leaq 0x68(%rax), %rbx
movq %r14, 0x120(%rsp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x120(%rsp), %rdi
callq 0xa9b2
movq %r15, %rdi
leaq 0x120(%rsp), %rsi
callq 0x9c1c
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %rbp, %rdi
leaq 0x106fb(%rip), %rsi     # 0x35118
movq %r12, %rdx
callq 0x9a1b
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1b47a
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24a56
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x120(%rsp), %rdi
cmpq %r14, %rdi
je 0x24a73
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x7390
leaq 0xf0(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0xe0(%rsp), %rdi
callq 0xa9b2
movq %r15, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x9c1c
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9c1c
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x24af0
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %r12
cmpq 0x198(%rsp), %r12
jne 0x249d8
movq 0x178(%rsp), %rbx
cmpq 0x180(%rsp), %rbx
je 0x24be6
movq 0x28(%rsp), %rax
leaq 0x68(%rax), %r12
movq 0xd0(%rsp), %r14
addq $0x50, %r14
leaq 0x110(%rsp), %rax
movq %rax, 0x100(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x100(%rsp), %r13
movq %r13, %rdi
callq 0xa9b2
movq %r14, %rdi
movq %r13, %rsi
callq 0x9c1c
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %rbp, %rdi
leaq 0x106d5(%rip), %rsi     # 0x3524b
movq %rbx, %rdx
callq 0x9a1b
movq %r12, %rdi
movq %rbp, %rsi
callq 0x1b47a
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24baf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x24bd4
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %rbx
cmpq 0x180(%rsp), %rbx
jne 0x24b2d
cmpl $0x0, 0x4c(%rsp)
sete %al
movq 0x160(%rsp), %rbx
cmpq 0x168(%rsp), %rbx
sete %r12b
orb %r12b, %al
jne 0x24c81
movq 0x28(%rsp), %rax
leaq 0x68(%rax), %r14
movq 0x140(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9c1c
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %rbp, %rdi
leaq 0x105ec(%rip), %rsi     # 0x35223
movq %rbx, %rdx
callq 0x9a1b
movq %r14, %rdi
movq %rbp, %rsi
callq 0x1b47a
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24c70
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %rbx
cmpq 0x168(%rsp), %rbx
jne 0x24c18
movb $0x1, %r12b
movq 0x148(%rsp), %rbx
cmpq 0x150(%rsp), %rbx
je 0x24d12
cmpl $0x0, 0x4c(%rsp)
je 0x250c8
movq 0x28(%rsp), %rax
leaq 0x68(%rax), %r14
movq 0xc8(%rsp), %rdi
movq %rbx, %rsi
callq 0x9c1c
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %rbp, %rdi
leaq 0x1055d(%rip), %rsi     # 0x35228
movq %rbx, %rdx
callq 0x9a1b
movq %r14, %rdi
movq %rbp, %rsi
callq 0x1b47a
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24d04
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
addq $0x20, %rbx
cmpq 0x150(%rsp), %rbx
jne 0x24ca7
movl $0x4, %r14d
testb %r12b, %r12b
je 0x250ce
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x1110a(%rip), %rsi     # 0x35e3f
leaq 0x11111(%rip), %rdx     # 0x35e4d
callq 0xa91c
movq 0x90(%rsp), %r12
movq 0x38(%rsp), %rax
movq 0x18(%rax), %r8
movl $0x148, %eax            # imm = 0x148
addq %rax, %r8
movq 0x28(%rsp), %rsi
leaq 0x380(%rsp), %rdx
movq %rbp, %rcx
callq 0x25644
movl %eax, %ebx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24d8d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
testb %bl, %bl
jne 0x250d6
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x110a5(%rip), %rsi     # 0x35e4e
leaq 0x110b3(%rip), %rdx     # 0x35e63
callq 0xa91c
movq 0x38(%rsp), %rax
movq 0x18(%rax), %r8
movl $0x178, %eax            # imm = 0x178
addq %rax, %r8
movq 0x28(%rsp), %rsi
leaq 0x368(%rsp), %rdx
movq %rbp, %rcx
callq 0x25644
movl %eax, %ebx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24df9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
testb %bl, %bl
jne 0x250d6
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x1104f(%rip), %rsi     # 0x35e64
leaq 0x1105d(%rip), %rdx     # 0x35e79
callq 0xa91c
movq 0x38(%rsp), %rax
movq 0x18(%rax), %r8
movl $0x1a8, %eax            # imm = 0x1A8
addq %rax, %r8
movq 0x28(%rsp), %rsi
leaq 0x350(%rsp), %rdx
movq %rbp, %rcx
callq 0x25644
movl %eax, %ebx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24e65
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
testb %bl, %bl
jne 0x250d6
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x10ff9(%rip), %rsi     # 0x35e7a
leaq 0x11000(%rip), %rdx     # 0x35e88
callq 0xa91c
movq 0x38(%rsp), %rax
movq 0x20(%rax), %r8
testq %r8, %r8
jne 0x24ea4
movq 0x38(%rsp), %rax
movq 0x18(%rax), %r8
addq $0x148, %r8             # imm = 0x148
movq 0x28(%rsp), %rsi
leaq 0x338(%rsp), %rdx
movq %rbp, %rcx
callq 0x25644
movl %eax, %ebx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24ede
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
testb %bl, %bl
jne 0x250d6
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x10f8f(%rip), %rsi     # 0x35e89
leaq 0x10f9d(%rip), %rdx     # 0x35e9e
callq 0xa91c
movq 0x38(%rsp), %rax
movq 0x20(%rax), %r8
testq %r8, %r8
jne 0x24f1d
movq 0x38(%rsp), %rax
movq 0x18(%rax), %r8
addq $0x178, %r8             # imm = 0x178
movq 0x28(%rsp), %rsi
leaq 0x320(%rsp), %rdx
movq %rbp, %rcx
callq 0x25644
movl %eax, %ebx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24f57
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
testb %bl, %bl
jne 0x250d6
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x10f2c(%rip), %rsi     # 0x35e9f
leaq 0x10f3a(%rip), %rdx     # 0x35eb4
callq 0xa91c
movq 0x38(%rsp), %rax
movq 0x20(%rax), %r8
testq %r8, %r8
jne 0x24f96
movq 0x38(%rsp), %rax
movq 0x18(%rax), %r8
addq $0x1a8, %r8             # imm = 0x1A8
movq 0x28(%rsp), %rsi
leaq 0x308(%rsp), %rdx
movq %rbp, %rcx
callq 0x25644
movl %eax, %ebx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24fd0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
testb %bl, %bl
jne 0x250d6
leaq 0x23ab1(%rip), %rax     # 0x48a90
movq (%rax), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *(%rax)
movsd %xmm0, 0x30(%rsp)
movq 0x40(%rsp), %rbx
movq 0x28(%rsp), %rdi
callq 0x98bc
movb $0x1, %al
movl %eax, 0x48(%rsp)
ucomisd 0x30(%rsp), %xmm0
jae 0x25020
movl $0x1, %r14d
movl $0x0, 0x48(%rsp)
jmp 0x250db
movq (%r12), %r12
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xc0(%rsp)
movq 0xb8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xb0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x70(%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)
xorl %r14d, %r14d
jmp 0x250db
movl $0x4, %r14d
movq 0x90(%rsp), %r12
movq 0x40(%rsp), %rbx
leaq 0x308(%rsp), %rdi
callq 0x1a6c6
leaq 0x320(%rsp), %rdi
callq 0x1a6c6
leaq 0x338(%rsp), %rdi
callq 0x1a6c6
leaq 0x350(%rsp), %rdi
callq 0x1a6c6
leaq 0x368(%rsp), %rdi
callq 0x1a6c6
leaq 0x380(%rsp), %rdi
callq 0x1a6c6
leaq 0x148(%rsp), %rdi
callq 0x1a6c6
leaq 0x160(%rsp), %rdi
callq 0x1a6c6
leaq 0x178(%rsp), %rdi
callq 0x1a6c6
leaq 0x190(%rsp), %rdi
callq 0x1a6c6
testb $0x3, %r14b
jne 0x251cb
movq 0x88(%rsp), %rcx
movq (%rcx), %rcx
cmpq %rbx, %rcx
leaq 0x130(%rsp), %r14
jne 0x2489b
jmp 0x2518b
xorl %ebx, %ebx
jmp 0x25203
movb $0x1, %al
movl %eax, 0x48(%rsp)
movq 0xd0(%rsp), %rax
testq %rax, %rax
setne %cl
andb 0x48(%rsp), %cl
xorl %ebx, %ebx
cmpb $0x1, %cl
jne 0x251e8
movq 0x38(%rsp), %rdi
movq 0x148(%rdi), %rsi
cmpq 0x150(%rdi), %rsi
je 0x251cf
movq %rax, (%rsi)
addq $0x8, 0x148(%rdi)
movl $0x1, %ebx
jmp 0x251e8
xorl %ebx, %ebx
jmp 0x251e8
addq $0x140, %rdi            # imm = 0x140
movl $0x1, %ebx
leaq 0xd0(%rsp), %rdx
callq 0x2730a
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25203
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x7390
movl %ebx, %eax
addq $0x398, %rsp            # imm = 0x398
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 0x10bd2(%rip), %rsi     # 0x35e0a
movq %rax, %rdi
callq 0xb5c8
movq %r15, (%r14)
leaq 0x22a6e(%rip), %rsi     # 0x47cb8
movq %r14, %rdi
xorl %edx, %edx
callq 0x7660
jmp 0x2555e
jmp 0x254b5
jmp 0x2555e
jmp 0x2549c
jmp 0x254b5
jmp 0x2555e
jmp 0x254b5
jmp 0x2555e
movq %rax, %rbx
movl $0x1, %esi
movq %r15, %rdi
callq 0x7390
jmp 0x2529b
jmp 0x254b5
jmp 0x2555e
movq %rax, %rbx
movq %r14, %rdi
callq 0x72a0
jmp 0x25628
movq %rax, %rbx
movq 0x1a8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2560d
movq 0x1b8(%rsp), %rsi
jmp 0x25437
jmp 0x2549c
movq %rax, %rbx
movq 0x1c8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2560d
movq 0x1d8(%rsp), %rsi
jmp 0x25437
jmp 0x2549c
movq %rax, %rbx
movq 0x1e8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2560d
movq 0x1f8(%rsp), %rsi
jmp 0x25437
jmp 0x2549c
movq %rax, %rbx
movq 0x208(%rsp), %rdi
cmpq %r15, %rdi
je 0x2560d
movq 0x218(%rsp), %rsi
jmp 0x25437
jmp 0x2549c
movq %rax, %rbx
movq 0x228(%rsp), %rdi
cmpq %r15, %rdi
je 0x2560d
movq 0x238(%rsp), %rsi
jmp 0x25437
jmp 0x2549c
movq %rax, %rbx
movq 0x248(%rsp), %rdi
cmpq %r15, %rdi
je 0x2560d
movq 0x258(%rsp), %rsi
jmp 0x25437
jmp 0x2549c
movq %rax, %rbx
movq 0x268(%rsp), %rdi
cmpq %r15, %rdi
je 0x2560d
movq 0x278(%rsp), %rsi
jmp 0x25437
jmp 0x2549c
movq %rax, %rbx
movq 0x288(%rsp), %rdi
cmpq %r15, %rdi
je 0x2560d
movq 0x298(%rsp), %rsi
jmp 0x25437
jmp 0x2549c
movq %rax, %rbx
movq 0x2a8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2560d
movq 0x2b8(%rsp), %rsi
jmp 0x25437
jmp 0x2549c
movq %rax, %rbx
movq 0x2c8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2560d
movq 0x2d8(%rsp), %rsi
jmp 0x25437
jmp 0x2549c
movq %rax, %rbx
movq 0x2e8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2560d
movq 0x2f8(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x2560d
jmp 0x2549c
jmp 0x254b5
jmp 0x2555e
jmp 0x254b5
jmp 0x2555e
movq %rax, %rbx
jmp 0x25600
movq %rax, %rbx
jmp 0x255f3
movq %rax, %rbx
jmp 0x255e6
movq %rax, %rbx
jmp 0x255d9
movq %rax, %rbx
jmp 0x255cc
movq %rax, %rbx
jmp 0x255bf
movq %rax, %rbx
jmp 0x255b2
movq %rax, %rbx
jmp 0x255a5
movq %rax, %rbx
jmp 0x25598
movq %rax, %rbx
jmp 0x2560d
jmp 0x254b5
jmp 0x2555e
jmp 0x2555e
jmp 0x2555e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2558b
movq 0x18(%rsp), %rsi
jmp 0x25583
jmp 0x2555e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x25500
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x25500
jmp 0x254fd
movq %rax, %rbx
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x2558b
movq 0x110(%rsp), %rsi
jmp 0x25583
jmp 0x2555e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x25547
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7390
jmp 0x25547
jmp 0x25544
movq %rax, %rbx
movq 0x120(%rsp), %rdi
cmpq %r14, %rdi
je 0x2558b
movq 0x130(%rsp), %rsi
jmp 0x25583
movq %rax, %rbx
jmp 0x2558b
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x2558b
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x7390
leaq 0x308(%rsp), %rdi
callq 0x1a6c6
leaq 0x320(%rsp), %rdi
callq 0x1a6c6
leaq 0x338(%rsp), %rdi
callq 0x1a6c6
leaq 0x350(%rsp), %rdi
callq 0x1a6c6
leaq 0x368(%rsp), %rdi
callq 0x1a6c6
leaq 0x380(%rsp), %rdi
callq 0x1a6c6
leaq 0x148(%rsp), %rdi
callq 0x1a6c6
leaq 0x160(%rsp), %rdi
callq 0x1a6c6
leaq 0x178(%rsp), %rdi
callq 0x1a6c6
leaq 0x190(%rsp), %rdi
callq 0x1a6c6
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25628
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x7390
movq %rbx, %rdi
callq 0x76a0