// File: melop[P]admixem/Individual.cpp
// Function: Individual::fnDeterminePhenotypes()
void Individual::fnDeterminePhenotypes() { // Calculate the phenotypic values from genotypes

	for(std::map<string, double >::iterator it=this->_mpPhenotypes.begin(); it!=this->_mpPhenotypes.end(); ++it) {

		//Go over all phenotypes
		string sPhenoName = it->first;
		Parser *pFormula = SimulConfig.pPhenotypeConfig->GetFormula(sPhenoName);
		vector< pair<int, double> > * pvSymbols = SimulConfig.pPhenotypeConfig->GetFormulaSymbols(sPhenoName);
		vector<string> * pvSymbolStrings = SimulConfig.pPhenotypeConfig->GetFormulaSymbolStrings(sPhenoName);

		vector<string>::iterator oSymbolString = pvSymbolStrings->begin();

		for (vector< pair<int, double> >::iterator oSymbol = pvSymbols->begin(); oSymbol != pvSymbols->end(); ++oSymbol) 
		{
			
			int nChr = oSymbol->first; // Chromosome num
			double nPos = oSymbol->second; // Position of gene
			map<double, GeneProperties>  oGeneList = SimulConfig.pGeneConfig->GetMpGenes()->at(nChr-1);
			map<double, int> oGeneIndexList = SimulConfig.pGeneConfig->GetMpGeneIndex()->at(nChr-1);
			//look up information of this gene
			int nIndex2 = nChr  * 2 - 1;
			int nIndex1 = nIndex2 - 1;
			Gene oAllele1 = this->_arrGenes.at(nIndex1).at(oGeneIndexList[nPos]); 
			Gene oAllele2 = this->_arrGenes.at(nIndex2).at(oGeneIndexList[nPos]);
			GeneProperties oGeneProp = oGeneList[nPos];

			double nVal=0.0;
			/*
			if (sPhenoName == "ComplexEpi2") {
				printf("break");
			}
			*/

			if (oGeneProp.AlleleMode==GeneProperties::Hemizygous || oGeneProp.AlleleMode==GeneProperties::Dominant) { // if this gene is hemizygous or dominant
				if (oAllele1.Allele  != oAllele2.Allele) { // if one of the alleles is dominant
					nVal = (oAllele1.Allele == oGeneProp.DominantLabel )? oAllele1.Value : oAllele2.Value;//oGeneProp.DominantValue;
				}
				/*else if (oAllele1.Allele == oGeneProp.DominantLabel && oAllele2.Allele == oGeneProp.DominantLabel){ // both dominant
					nVal = ( oAllele1.Value + oAllele2.Value)/2;//oGeneProp.RecessiveValue; take the mean. 
				}*/
				else {//both recessive or dominant
					nVal = ( oAllele1.Value + oAllele2.Value)/2;
				}


			}
			else { //this gene is additive
				/*nVal  = oAllele1.Allele == oGeneProp.DominantLabel? oGeneProp.DominantValue:oGeneProp.RecessiveValue;
				  nVal += oAllele2.Allele == oGeneProp.DominantLabel? oGeneProp.DominantValue:oGeneProp.RecessiveValue;*/
				nVal = ( oAllele1.Value + oAllele2.Value);
			}
			
			
			pFormula->symbols_[*oSymbolString] = nVal; // put value to symbol;
			pFormula->symbols_[(*oSymbolString)+"_a1"] = oAllele1.Value;
			pFormula->symbols_[(*oSymbolString)+"_a2"] = oAllele2.Value;
			oSymbolString++;
		}

		//next see if need to add references to parent's phenotypes
		if (SimulConfig.pPhenotypeConfig->IsReferToParentPhe(sPhenoName)) { // fill in reference to parents' phenotypes

			for(int nParentSym=0;nParentSym<=1;nParentSym++) {
				vector<string> * pvParentSymbols = SimulConfig.pPhenotypeConfig->GetFormulaParentSymbols(sPhenoName , nParentSym);
				map< string, double > *mpParentPhes = (nParentSym ==0 )? &this->_mpDadPhenotypes : &this->_mpMomPhenotypes;
				string sSymPrefix = "Phe_";
				sSymPrefix = sSymPrefix + ((nParentSym==0)? "Mom" : "Dad") + "_";
				for (vector< string >::iterator oSymbol = pvParentSymbols->begin(); oSymbol != pvParentSymbols->end(); ++oSymbol) 
				{
					if (mpParentPhes->find(oSymbol->c_str()) != mpParentPhes->end() ) {
						if (mpParentPhes->find(*oSymbol ) != mpParentPhes->end()) {
							pFormula->symbols_[sSymPrefix + *oSymbol ] = mpParentPhes->at(*oSymbol );
						} else {
							pFormula->symbols_[sSymPrefix + *oSymbol ] = 0; //for gen 0, parent phenotypes are all 0.
						}
					}
				}
			}
		}

		this->_mpPhenotypes[sPhenoName] = pFormula->Evaluate(); // re-evaluate.
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x590, %rsp            # imm = 0x590
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
addq $0x50, %rdi
callq 0x2b540
movq %rax, -0x10(%rbp)
movq -0x3e8(%rbp), %rdi
addq $0x50, %rdi
callq 0x107a0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x2b570
testb $0x1, %al
jne 0x55b11
jmp 0x567e6
leaq -0x10(%rbp), %rdi
callq 0x2b5a0
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0x81f0
movq -0x3f8(%rbp), %rsi
leaq 0x54f1d(%rip), %rax     # 0xaaa58
movq 0x10(%rax), %rax
movq %rax, -0x3f0(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x81f0
jmp 0x55b51
movq -0x3f0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x21c50
movq %rax, -0x400(%rbp)
jmp 0x55b6a
leaq -0x60(%rbp), %rdi
callq 0x82e0
movq -0x400(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x54ed3(%rip), %rax     # 0xaaa58
movq 0x10(%rax), %rax
movq %rax, -0x408(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x81f0
jmp 0x55ba2
movq -0x408(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x21b80
movq %rax, -0x410(%rbp)
jmp 0x55bbe
leaq -0x98(%rbp), %rdi
callq 0x82e0
movq -0x410(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq 0x54e7c(%rip), %rax     # 0xaaa58
movq 0x10(%rax), %rax
movq %rax, -0x418(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x81f0
jmp 0x55bf9
movq -0x418(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x21c20
movq %rax, -0x420(%rbp)
jmp 0x55c15
leaq -0xc0(%rbp), %rdi
callq 0x82e0
movq -0x420(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x3f3c0
movq %rax, -0xc8(%rbp)
movq -0x78(%rbp), %rdi
callq 0x40b60
movq %rax, -0xd0(%rbp)
movq -0x78(%rbp), %rdi
callq 0x409e0
movq %rax, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x5bae0
testb $0x1, %al
jne 0x55c7e
jmp 0x561c7
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x430(%rbp)
callq 0x5bb20
movq -0x430(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xdc(%rbp)
callq 0x5bb20
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0xe8(%rbp)
leaq 0x54d9f(%rip), %rax     # 0xaaa58
movq 0x18(%rax), %rdi
callq 0x26ce0
movq %rax, -0x428(%rbp)
jmp 0x55ccb
movq -0x428(%rbp), %rdi
movl -0xdc(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x5b860
movq %rax, -0x438(%rbp)
jmp 0x55ceb
movq -0x438(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0x4df60
jmp 0x55d00
leaq 0x54d51(%rip), %rax     # 0xaaa58
movq 0x18(%rax), %rdi
callq 0x26d10
movq %rax, -0x440(%rbp)
jmp 0x55d19
movq -0x440(%rbp), %rdi
movl -0xdc(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x2a5a0
movq %rax, -0x448(%rbp)
jmp 0x55d39
movq -0x448(%rbp), %rsi
leaq -0x148(%rbp), %rdi
callq 0x35c20
jmp 0x55d4e
movq -0x3e8(%rbp), %rdi
movl -0xdc(%rbp), %ecx
movl %ecx, %eax
leal -0x1(%rax,%rax), %eax
movl %eax, -0x14c(%rbp)
movl -0x14c(%rbp), %eax
decl %eax
movl %eax, -0x150(%rbp)
addq $0x128, %rdi            # imm = 0x128
movslq -0x150(%rbp), %rsi
callq 0x5bb40
movq %rax, -0x450(%rbp)
jmp 0x55d91
leaq -0x148(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2a440
movq %rax, -0x458(%rbp)
jmp 0x55dad
movq -0x450(%rbp), %rdi
movq -0x458(%rbp), %rax
movslq (%rax), %rsi
callq 0x5bb80
movq %rax, -0x460(%rbp)
jmp 0x55dcc
movq -0x3e8(%rbp), %rdi
movq -0x460(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x160(%rbp)
addq $0x128, %rdi            # imm = 0x128
movslq -0x14c(%rbp), %rsi
callq 0x5bb40
movq %rax, -0x468(%rbp)
jmp 0x55e00
leaq -0x148(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2a440
movq %rax, -0x470(%rbp)
jmp 0x55e1c
movq -0x468(%rbp), %rdi
movq -0x470(%rbp), %rax
movslq (%rax), %rsi
callq 0x5bb80
movq %rax, -0x478(%rbp)
jmp 0x55e3b
movq -0x478(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x170(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2cd90
movq %rax, -0x480(%rbp)
jmp 0x55e68
movq -0x480(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x4e7b0
jmp 0x55e7d
xorps %xmm0, %xmm0
movsd %xmm0, -0x240(%rbp)
cmpl $0x0, -0x1f0(%rbp)
je 0x55e9e
cmpl $0x2, -0x1f0(%rbp)
jne 0x55faa
movsbl -0x15f(%rbp), %eax
movsbl -0x16f(%rbp), %ecx
cmpl %ecx, %eax
je 0x55f84
movsbl -0x15f(%rbp), %eax
movsbl -0x218(%rbp), %ecx
cmpl %ecx, %eax
jne 0x55ed8
movsd -0x158(%rbp), %xmm0
movsd %xmm0, -0x488(%rbp)
jmp 0x55ee8
movsd -0x168(%rbp), %xmm0
movsd %xmm0, -0x488(%rbp)
movsd -0x488(%rbp), %xmm0
movsd %xmm0, -0x240(%rbp)
jmp 0x55fa8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x567db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x82e0
jmp 0x567db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x82e0
jmp 0x567db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x82e0
jmp 0x567db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x561b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x561aa
movsd -0x158(%rbp), %xmm0
addsd -0x168(%rbp), %xmm0
movsd 0x20714(%rip), %xmm1    # 0x766b0
divsd %xmm1, %xmm0
movsd %xmm0, -0x240(%rbp)
jmp 0x55fc2
movsd -0x158(%rbp), %xmm0
addsd -0x168(%rbp), %xmm0
movsd %xmm0, -0x240(%rbp)
movsd -0x240(%rbp), %xmm0
movsd %xmm0, -0x4a0(%rbp)
movq -0x40(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x498(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x462a0
movq -0x498(%rbp), %rdi
movq %rax, %rsi
callq 0xca50
movq %rax, -0x490(%rbp)
jmp 0x56005
movq -0x490(%rbp), %rax
movsd -0x4a0(%rbp), %xmm0
movsd %xmm0, (%rax)
movsd -0x158(%rbp), %xmm0
movsd %xmm0, -0x4b0(%rbp)
movq -0x40(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x4a8(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x462a0
movq %rax, %rsi
leaq 0x21fa7(%rip), %rdx     # 0x77ff4
leaq -0x260(%rbp), %rdi
callq 0x5bbc0
jmp 0x5605b
movq -0x4a8(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x31840
movq %rax, -0x4b8(%rbp)
jmp 0x56077
movq -0x4b8(%rbp), %rax
movsd -0x4b0(%rbp), %xmm0
movsd %xmm0, (%rax)
leaq -0x260(%rbp), %rdi
callq 0x82e0
movsd -0x168(%rbp), %xmm0
movsd %xmm0, -0x4c8(%rbp)
movq -0x40(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x4c0(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x462a0
movq %rax, %rsi
leaq 0x21f2d(%rip), %rdx     # 0x77ff8
leaq -0x280(%rbp), %rdi
callq 0x5bbc0
jmp 0x560d9
movq -0x4c0(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x31840
movq %rax, -0x4d0(%rbp)
jmp 0x560f5
movq -0x4d0(%rbp), %rax
movsd -0x4c8(%rbp), %xmm0
movsd %xmm0, (%rax)
leaq -0x280(%rbp), %rdi
callq 0x82e0
leaq -0xc8(%rbp), %rdi
xorl %esi, %esi
callq 0x5bc40
movq %rax, -0x288(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x2ce70
leaq -0x148(%rbp), %rdi
callq 0x2a160
leaq -0x118(%rbp), %rdi
callq 0x2cd00
leaq -0xd0(%rbp), %rdi
callq 0x5bc80
jmp 0x55c52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x5619e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x82e0
jmp 0x5619e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x82e0
leaq -0x238(%rbp), %rdi
callq 0x2ce70
leaq -0x148(%rbp), %rdi
callq 0x2a160
leaq -0x118(%rbp), %rdi
callq 0x2cd00
jmp 0x567db
leaq 0x5488a(%rip), %rax     # 0xaaa58
movq 0x10(%rax), %rax
movq %rax, -0x4d8(%rbp)
leaq -0x2a8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x81f0
jmp 0x561eb
movq -0x4d8(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x21ca0
movb %al, -0x4d9(%rbp)
jmp 0x56206
leaq -0x2a8(%rbp), %rdi
callq 0x82e0
movb -0x4d9(%rbp), %al
testb $0x1, %al
jne 0x56221
jmp 0x56781
movl $0x0, -0x2ac(%rbp)
cmpl $0x1, -0x2ac(%rbp)
jg 0x5677f
leaq 0x54819(%rip), %rax     # 0xaaa58
movq 0x10(%rax), %rax
movq %rax, -0x4e8(%rbp)
leaq -0x2d8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x81f0
jmp 0x5625c
movq -0x4e8(%rbp), %rdi
movl -0x2ac(%rbp), %edx
leaq -0x2d8(%rbp), %rsi
callq 0x21bb0
movq %rax, -0x4f0(%rbp)
jmp 0x5627e
leaq -0x2d8(%rbp), %rdi
callq 0x82e0
movq -0x4f0(%rbp), %rax
movq %rax, -0x2b8(%rbp)
cmpl $0x0, -0x2ac(%rbp)
jne 0x562b7
movq -0x3e8(%rbp), %rax
addq $0xb0, %rax
movq %rax, -0x4f8(%rbp)
jmp 0x562cb
movq -0x3e8(%rbp), %rax
addq $0xe0, %rax
movq %rax, -0x4f8(%rbp)
movq -0x4f8(%rbp), %rax
movq %rax, -0x2e0(%rbp)
leaq -0x301(%rbp), %rdi
movq %rdi, -0x500(%rbp)
callq 0x8870
movq -0x500(%rbp), %rdx
leaq 0x21d02(%rip), %rsi     # 0x77ffc
leaq -0x300(%rbp), %rdi
callq 0xcb30
jmp 0x56308
leaq -0x301(%rbp), %rdi
callq 0x8540
cmpl $0x0, -0x2ac(%rbp)
jne 0x5632d
leaq 0x20eca(%rip), %rax     # 0x771ee
movq %rax, -0x508(%rbp)
jmp 0x5633d
leaq 0x20eb6(%rip), %rax     # 0x771ea
movq %rax, -0x508(%rbp)
jmp 0x5633d
movq -0x508(%rbp), %rdx
leaq -0x348(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x5bbc0
jmp 0x56359
leaq 0x2114b(%rip), %rdx     # 0x774ab
leaq -0x328(%rbp), %rdi
leaq -0x348(%rbp), %rsi
callq 0xca00
jmp 0x56375
leaq -0x300(%rbp), %rdi
leaq -0x328(%rbp), %rsi
callq 0x8600
leaq -0x328(%rbp), %rdi
callq 0x82e0
leaq -0x348(%rbp), %rdi
callq 0x82e0
movq -0x2b8(%rbp), %rdi
callq 0x3f3c0
movq %rax, -0x350(%rbp)
movq -0x2b8(%rbp), %rdi
callq 0x3f240
movq %rax, -0x358(%rbp)
leaq -0x350(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x46260
testb $0x1, %al
jne 0x563e2
jmp 0x56751
movq -0x2e0(%rbp), %rax
movq %rax, -0x520(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x5bca0
movq %rax, %rdi
callq 0x81d0
movq %rax, -0x518(%rbp)
leaq -0x381(%rbp), %rdi
movq %rdi, -0x510(%rbp)
callq 0x8870
movq -0x518(%rbp), %rsi
movq -0x510(%rbp), %rdx
leaq -0x380(%rbp), %rdi
callq 0xcb30
jmp 0x5643a
movq -0x520(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0x2da90
movq %rax, -0x528(%rbp)
jmp 0x56456
movq -0x528(%rbp), %rax
movq %rax, -0x360(%rbp)
movq -0x2e0(%rbp), %rdi
callq 0x107a0
movq %rax, -0x390(%rbp)
leaq -0x360(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x2b570
movb %al, -0x529(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x82e0
leaq -0x381(%rbp), %rdi
callq 0x8540
movb -0x529(%rbp), %al
testb $0x1, %al
jne 0x564b7
jmp 0x5673e
movq -0x2e0(%rbp), %rax
movq %rax, -0x540(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x462a0
movq -0x540(%rbp), %rdi
movq %rax, %rsi
callq 0x2da90
movq %rax, -0x538(%rbp)
jmp 0x564e9
movq -0x538(%rbp), %rax
movq %rax, -0x398(%rbp)
movq -0x2e0(%rbp), %rdi
callq 0x107a0
movq %rax, -0x3a0(%rbp)
leaq -0x398(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x2b570
testb $0x1, %al
jne 0x56526
jmp 0x566b7
movq -0x2e0(%rbp), %rax
movq %rax, -0x550(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x462a0
movq -0x550(%rbp), %rdi
movq %rax, %rsi
callq 0x5bcc0
movq %rax, -0x548(%rbp)
jmp 0x56558
movq -0x548(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x560(%rbp)
movq -0x40(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x558(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x462a0
movq %rax, %rdx
leaq -0x3c0(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x5bd60
jmp 0x5659e
movq -0x558(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x31840
movq %rax, -0x568(%rbp)
jmp 0x565ba
movq -0x568(%rbp), %rax
movsd -0x560(%rbp), %xmm0
movsd %xmm0, (%rax)
leaq -0x3c0(%rbp), %rdi
callq 0x82e0
jmp 0x5673c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x82e0
jmp 0x567db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x82e0
jmp 0x567db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x301(%rbp), %rdi
callq 0x8540
jmp 0x567db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x56771
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x348(%rbp), %rdi
callq 0x82e0
jmp 0x56771
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x56689
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x82e0
leaq -0x381(%rbp), %rdi
callq 0x8540
jmp 0x56771
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x82e0
jmp 0x56771
movq -0x40(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x570(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x462a0
movq %rax, %rdx
leaq -0x3e0(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x5bd60
jmp 0x566ea
movq -0x570(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0x31840
movq %rax, -0x578(%rbp)
jmp 0x56706
movq -0x578(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
leaq -0x3e0(%rbp), %rdi
callq 0x82e0
jmp 0x5673c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x3e0(%rbp), %rdi
callq 0x82e0
jmp 0x56771
jmp 0x5673e
jmp 0x56740
leaq -0x350(%rbp), %rdi
callq 0x462c0
jmp 0x563b3
leaq -0x300(%rbp), %rdi
callq 0x82e0
movl -0x2ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2ac(%rbp)
jmp 0x5622b
leaq -0x300(%rbp), %rdi
callq 0x82e0
jmp 0x567db
jmp 0x56781
movq -0x40(%rbp), %rdi
callq 0xc170
movsd %xmm0, -0x580(%rbp)
jmp 0x56794
movq -0x3e8(%rbp), %rdi
addq $0x50, %rdi
leaq -0x38(%rbp), %rsi
callq 0xca50
movq %rax, -0x588(%rbp)
jmp 0x567b1
movq -0x588(%rbp), %rax
movsd -0x580(%rbp), %xmm0
movsd %xmm0, (%rax)
leaq -0x38(%rbp), %rdi
callq 0x82e0
leaq -0x10(%rbp), %rdi
callq 0x11700
jmp 0x55ae7
leaq -0x38(%rbp), %rdi
callq 0x82e0
jmp 0x567ef
addq $0x590, %rsp            # imm = 0x590
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x8860
nopl (%rax,%rax)