// File: dcarrey[P]hgt-detection/./fonctions.cpp
// Function: findBestHGTtab(InputTree, InputTree, Parameters, HGT*, int*, int*, int)
int findBestHGTtab(struct InputTree SpeciesTree,struct InputTree GeneTree,struct Parameters param,struct HGT *aHGT, int *nbHgtFound,int *initial,int bootstrap){

	struct InputTree tmpTree;
	struct InputTree tmpTree2;
	
	int i,j,k,l,first=1,ret=0,trouve;
	int size = SpeciesTree.size;
	int ktSpecies;
	struct CRITERIA aCrit,aCritRef,aCritRef2,aCrit_tmpTree2;
	struct DescTree *DTSpecies,*DTGene;
	int encore = 0;
  
	initInputTree(&tmpTree);
	initInputTree(&tmpTree2);
	
	(*nbHgtFound) = 0;

	printf("\n\n== NEW STEP OF DETECTION == [size of the trees (after reduction)=%d]",SpeciesTree.size);
  
	//== compute criteria
	InitCriteria(&aCrit,size);
	InitCriteria(&aCritRef,size);
	InitCriteria(&aCritRef2,size);
	InitCriteria(&aCrit_tmpTree2,size);
	computeCriteria(SpeciesTree.ADD,GeneTree.ADD,size,&aCrit,SpeciesTree.LONGUEUR,SpeciesTree.ARETE,GeneTree.LONGUEUR,GeneTree.ARETE);
	computeCriteria(SpeciesTree.ADD,GeneTree.ADD,size,&aCritRef,SpeciesTree.LONGUEUR,SpeciesTree.ARETE,GeneTree.LONGUEUR,GeneTree.ARETE);
	computeCriteria(SpeciesTree.ADD,GeneTree.ADD,size,&aCritRef2,SpeciesTree.LONGUEUR,SpeciesTree.ARETE,GeneTree.LONGUEUR,GeneTree.ARETE);
	loadCriteria(aCrit,&aHGT[0]);
  
	DTGene = (struct DescTree*)malloc((2*GeneTree.size-2-GeneTree.kt+1)*sizeof(struct DescTree));
	RechercherBipartition(GeneTree.ARETE,GeneTree.ADD,GeneTree.Root,GeneTree.Adjacence,DTGene,GeneTree.size,GeneTree.kt);	

	DTSpecies = (struct DescTree*)malloc((2*SpeciesTree.size-2-SpeciesTree.kt+1)*sizeof(struct DescTree));
	RechercherBipartition(SpeciesTree.ARETE,SpeciesTree.ADD,SpeciesTree.Root,SpeciesTree.Adjacence,DTSpecies,SpeciesTree.size,SpeciesTree.kt);

	int flag2 = 1;
	int flag3;   		//== pour tester les especes avec sur la branche au dessus
	int initial3=1;
	
	
	do{
		for(i=1;i<2*size-3-SpeciesTree.kt;i++)
			for(j=i+1;j<2*size-3-SpeciesTree.kt;j++){
				//== is it a valid hgt ?
				trouve=0;
				if(isAValidHGT(SpeciesTree,i,j)==1 && i!=j ){
					copyInputTree(&tmpTree,SpeciesTree,0,0);
				
					if(strcmp(param.subtree,"yes") == 0){
						if(TestSubTreeConstraint(SpeciesTree,i,j,DTSpecies,DTGene) == 0)  {
							continue;
							//FreeMemory_InputTree(&tmpTree);
							tmpTree.ADD = NULL;
							tmpTree.ARETE = NULL;
						}
						flag3=0;
						if(TestSubTreeLeafs(SpeciesTree,i,j,DTSpecies,DTGene) == 1){
							//printf("\nTestSubTreeLeafs => ok");
							flag3=1;
						}
					}
					
					applyHGT(GeneTree.ADD,&tmpTree,i,j);
					
					if(strcmp(param.criterion,"ls") == 0)
						AdjustBranchLength(&tmpTree,GeneTree,0,1);
					computeCriteria(tmpTree.ADD,GeneTree.ADD,size,&aCrit,tmpTree.LONGUEUR,tmpTree.ARETE,GeneTree.LONGUEUR,GeneTree.ARETE);
				
					first=1;
					loadCriteria(aCritRef,&aHGT[(*nbHgtFound)]);
					//printf("\ninitial = %d,initial3= %d",*initial,initial3);
					if(((aCritRef.RF-aCrit.RF) == 1) && (*initial==1) && (
					  (SpeciesTree.ARETE[2*i-1] == SpeciesTree.ARETE[2*j-1]) || 
					  (SpeciesTree.ARETE[2*i-1] == SpeciesTree.ARETE[2*j-2]) || 
					  (SpeciesTree.ARETE[2*i-2] == SpeciesTree.ARETE[2*j-2]) || 
					  (SpeciesTree.ARETE[2*i-2] == SpeciesTree.ARETE[2*j-2])
					  )) {
						UpdateCriterion(&first,param.criterion,aCrit,&aHGT[(*nbHgtFound)],i,j,0);
						//printf("\n===========> initial = %d",*initial);
						//printf("\tRF1=%d | RF2=%d | BD1=%2.1lf | BD2=%2.1lf",aHGT[(*nbHgtFound)].crit.RF,aCrit.RF,aHGT[(*nbHgtFound)].crit.BD,aCrit.BD);
						
						aHGT[(*nbHgtFound)].source_A = SpeciesTree.ARETE[2*i-1];
						aHGT[(*nbHgtFound)].source_B = SpeciesTree.ARETE[2*i-2];
						aHGT[(*nbHgtFound)].dest_A = SpeciesTree.ARETE[2*j-1];
						aHGT[(*nbHgtFound)].dest_B = SpeciesTree.ARETE[2*j-2];
						
						findListSpecies(&aHGT[(*nbHgtFound)],DTSpecies,SpeciesTree);
						trouve=1;
					}
					else  if((*initial==0) && ((flag3 == 1) || (initial3 == 0) )){
						if(TestCriterionAndUpdate(&first,param.criterion,aCrit,&aHGT[(*nbHgtFound)],i,j,0,0) == 1){		
							//printf("\n===========> flag3 = %d, initial3=%d",flag3,initial3);
							//printf("\tRF1=%d | RF2=%d | BD1=%2.1lf | BD2=%2.1lf",aHGT[(*nbHgtFound)].crit.RF,aCrit.RF,aHGT[(*nbHgtFound)].crit.BD,aCrit.BD);
							aHGT[(*nbHgtFound)].source_A = SpeciesTree.ARETE[2*i-1];
							aHGT[(*nbHgtFound)].source_B = SpeciesTree.ARETE[2*i-2];
							aHGT[(*nbHgtFound)].dest_A = SpeciesTree.ARETE[2*j-1];
							aHGT[(*nbHgtFound)].dest_B = SpeciesTree.ARETE[2*j-2];
							findListSpecies(&aHGT[(*nbHgtFound)],DTSpecies,SpeciesTree);
							trouve=1;
						}
					}
				}

				if(isAValidHGT(SpeciesTree,j,i)==1 && i!=j ){
					//initInputTree(&tmpTree2);
					copyInputTree(&tmpTree2,tmpTree,0,0);
					copyInputTree(&tmpTree,SpeciesTree,0,0);
					
					if(strcmp(param.subtree,"yes") == 0){
						if(TestSubTreeConstraint(SpeciesTree,j,i,DTSpecies,DTGene) == 0) {
							continue;
							//FreeMemory_InputTree(&tmpTree);
							tmpTree.ADD = NULL;
							tmpTree.ARETE = NULL;
						}
					
						if(TestSubTreeLeafs(SpeciesTree,j,i,DTSpecies,DTGene)==1){
							//printf("\nTestSubTreeLeafs (reverse) => ok");
							flag3=2;
						 }
					}
					
					//if(flag3 == 0){
						//initial3 = 0;
					//}
					
					applyHGT(GeneTree.ADD,&tmpTree,j,i);
					
					if(strcmp(param.criterion,"ls") == 0)
					  AdjustBranchLength(&tmpTree,GeneTree,0,1);
					computeCriteria(tmpTree.ADD,GeneTree.ADD,size,&aCrit,tmpTree.LONGUEUR,tmpTree.ARETE,GeneTree.LONGUEUR,GeneTree.ARETE);
					if(tmpTree2.ADD == NULL){
						printf("HOUSTON, we have a problem !");
						aCrit_tmpTree2.RF = (int) INFINI;
					}
					else{
						computeCriteria(tmpTree.ADD,tmpTree2.ADD,size,&aCrit_tmpTree2,tmpTree.LONGUEUR,tmpTree.ARETE,tmpTree2.LONGUEUR,tmpTree2.ARETE);
					}
					int flag=0;
					first=1;
					int flag_bootstrap = 0;
					if(trouve==0)
						loadCriteria(aCritRef,&aHGT[(*nbHgtFound)]);
					else{
						//printf("\n===========> rand_bootstrap : RF = %d",aCrit_tmpTree2.RF);
						if((bootstrap == 1) && (aCrit_tmpTree2.RF == 0) && /*(aCrit.BD == aHGT[(*nbHgtFound)].crit.BD) && */(aCrit.RF == aHGT[(*nbHgtFound)].crit.RF) ){
							flag_bootstrap = 1;
							//printf("\n==> rand_bootstrap1 : [%2d--%2d -> %2d--%2d]",aHGT[(*nbHgtFound)].source_A,aHGT[(*nbHgtFound)].source_B,aHGT[(*nbHgtFound)].dest_A,aHGT[(*nbHgtFound)].dest_B);
						}
						else{
							aHGT[(*nbHgtFound)].crit.diff_bd = fabs(aCrit.BD - aHGT[(*nbHgtFound)].crit.BD);
							if((flag2 == 1) && (fabs(aCrit.BD - aHGT[(*nbHgtFound)].crit.BD) <= 1)){
								if( (aHGT[(*nbHgtFound)].crit.RF - aCrit.RF) >= 1 ){
									trouve = 0;
									flag = 2;
								}      
								else{
									flag = 1;
									//printf("\n--> TEST FLAG : RF1=%d | RF2=%d | BD1=%2.1lf | BD2=%2.1lf",aHGT[(*nbHgtFound)].crit.RF,aCrit.RF,aHGT[(*nbHgtFound)].crit.BD,aCrit.BD);
								}
							}
							else{
								//printf("\n-->[%2d--%2d -> %2d--%2d]",aHGT[(*nbHgtFound)].source_A,aHGT[(*nbHgtFound)].source_B,aHGT[(*nbHgtFound)].dest_A,aHGT[(*nbHgtFound)].dest_B);
								//printf("\tRF1=%d | RF2=%d | BD1=%2.1lf | BD2=%2.1lf",aHGT[(*nbHgtFound)].crit.RF,aCrit.RF,aHGT[(*nbHgtFound)].crit.BD,aCrit.BD);
							}
						}
					}
					
					//flag_bootstrap = 0;
					if(flag != 1){
						if(((aCritRef.RF-aCrit.RF) == 1) && (*initial==1) && (
						  (SpeciesTree.ARETE[2*i-1] == SpeciesTree.ARETE[2*j-1]) || 
						  (SpeciesTree.ARETE[2*i-1] == SpeciesTree.ARETE[2*j-2]) || 
						  (SpeciesTree.ARETE[2*i-2] == SpeciesTree.ARETE[2*j-2]) || 
						  (SpeciesTree.ARETE[2*i-2] == SpeciesTree.ARETE[2*j-2])
						)) {
						
							if ((flag_bootstrap == 1) && (rand_bootstrap == 1)){
								
								//printf("\n===========>REVERSE : initial = %d",*initial);
								//printf("\tRF1=%d | RF2=%d | BD1=%2.1lf | BD2=%2.1lf",aHGT[(*nbHgtFound)].crit.RF,aCrit.RF,aHGT[(*nbHgtFound)].crit.BD,aCrit.BD);
								UpdateCriterion(&first,param.criterion,aCrit,&aHGT[(*nbHgtFound)],j,i,flag_bootstrap);
								aHGT[(*nbHgtFound)].source_A = SpeciesTree.ARETE[2*j-1];
								aHGT[(*nbHgtFound)].source_B = SpeciesTree.ARETE[2*j-2];
								aHGT[(*nbHgtFound)].dest_A = SpeciesTree.ARETE[2*i-1];
								aHGT[(*nbHgtFound)].dest_B = SpeciesTree.ARETE[2*i-2];
								findListSpecies(&aHGT[(*nbHgtFound)],DTSpecies,SpeciesTree);
								trouve=1;
								//printf("\n==> rand_bootstrap1.5 : [%2d--%2d -> %2d--%2d]",aHGT[(*nbHgtFound)].source_A,aHGT[(*nbHgtFound)].source_B,aHGT[(*nbHgtFound)].dest_A,aHGT[(*nbHgtFound)].dest_B);
							}
						}
						else if(((*initial==0) && ((flag3 == 2) || (initial3 == 0))) || (flag_bootstrap == 1)){
							if(TestCriterionAndUpdate(&first,param.criterion,aCrit,&aHGT[(*nbHgtFound)],j,i,flag,flag_bootstrap) == 1){	
								//printf("\n===========>REVERSE : flag3 = %d, initial3=%d",flag3,initial3);
								//printf("\tRF1=%d | RF2=%d | BD1=%2.1lf | BD2=%2.1lf",aHGT[(*nbHgtFound)].crit.RF,aCrit.RF,aHGT[(*nbHgtFound)].crit.BD,aCrit.BD);
								aHGT[(*nbHgtFound)].source_A = SpeciesTree.ARETE[2*j-1];
								aHGT[(*nbHgtFound)].source_B = SpeciesTree.ARETE[2*j-2];
								aHGT[(*nbHgtFound)].dest_A = SpeciesTree.ARETE[2*i-1];
								aHGT[(*nbHgtFound)].dest_B = SpeciesTree.ARETE[2*i-2];
								findListSpecies(&aHGT[(*nbHgtFound)],DTSpecies,SpeciesTree);
								trouve=1;
								//printf("\n==> rand_bootstrap2 : [%2d--%2d -> %2d--%2d]",aHGT[(*nbHgtFound)].source_A,aHGT[(*nbHgtFound)].source_B,aHGT[(*nbHgtFound)].dest_A,aHGT[(*nbHgtFound)].dest_B);
							}
						}
					}				
				}
				
				if (trouve == 1){
					(*nbHgtFound)++;
					//printf("\n===================> rand_bootstrap final : [%2d--%2d -> %2d--%2d]",aHGT[(*nbHgtFound)-1].source_A,aHGT[(*nbHgtFound)-1].source_B,aHGT[(*nbHgtFound)-1].dest_A,aHGT[(*nbHgtFound)-1].dest_B);			
				}

			}
			encore = 0;
		
		if((*nbHgtFound == 0) && (flag2==1)){
		  flag2 = 0;
		  encore = 1;
		}
		
		if((*nbHgtFound == 0) && (initial3==1) && (*initial==0) ){
		  initial3 = 0;
		  flag2=1;
		  encore = 1;
		}
		
		if((*nbHgtFound == 0) && (*initial==1)){
		  (*initial) = 0;
		  encore = 1;
		  flag2=1;
		}
		
		//initial3 = 0;

		
	 //   printf("On est rendu icit");
	}while(encore == 1);
	
	
	
	deleteBipartition(DTSpecies,SpeciesTree);
	deleteBipartition(DTGene,GeneTree);
	FreeCriteria(&aCrit,size);
	FreeCriteria(&aCritRef,size);
	FreeMemory_InputTree(&tmpTree,tmpTree.size);

	//printf("\n3)RF=%d",aHGT[0].crit.RF);	
	return (*nbHgtFound);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc10, %rsp            # imm = 0xC10
leaq 0xc0(%rbp), %rax
movq %rax, -0xb38(%rbp)
leaq 0x68(%rbp), %rax
movq %rax, -0xb30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0xb28(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x1, -0xe4(%rbp)
movl $0x0, -0xe8(%rbp)
movl (%rax), %eax
movl %eax, -0xf0(%rbp)
movl $0x0, -0x28c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xd040
leaq -0xd0(%rbp), %rdi
callq 0xd040
movq -0xb28(%rbp), %rax
movq -0x10(%rbp), %rcx
movl $0x0, (%rcx)
movl (%rax), %esi
leaq 0xfc9c(%rip), %rdi      # 0x259df
movb $0x0, %al
callq 0x1030
movl -0xf0(%rbp), %esi
leaq -0x158(%rbp), %rdi
callq 0x14520
movl -0xf0(%rbp), %esi
leaq -0x1b8(%rbp), %rdi
callq 0x14520
movl -0xf0(%rbp), %esi
leaq -0x218(%rbp), %rdi
callq 0x14520
movl -0xf0(%rbp), %esi
leaq -0x278(%rbp), %rdi
callq 0x14520
movq -0xb30(%rbp), %rax
movq -0xb28(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq 0x8(%rax), %rsi
movl -0xf0(%rbp), %edx
movq 0x38(%rcx), %r8
movq 0x30(%rcx), %r9
movq 0x38(%rax), %r10
movq 0x30(%rax), %rax
leaq -0x158(%rbp), %rcx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xea10
movq -0xb30(%rbp), %rax
movq -0xb28(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq 0x8(%rax), %rsi
movl -0xf0(%rbp), %edx
movq 0x38(%rcx), %r8
movq 0x30(%rcx), %r9
movq 0x38(%rax), %r10
movq 0x30(%rax), %rax
leaq -0x1b8(%rbp), %rcx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xea10
movq -0xb30(%rbp), %rax
movq -0xb28(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq 0x8(%rax), %rsi
movl -0xf0(%rbp), %edx
movq 0x38(%rcx), %r8
movq 0x30(%rcx), %r9
movq 0x38(%rax), %r10
movq 0x30(%rax), %rax
leaq -0x218(%rbp), %rcx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xea10
leaq -0x2f0(%rbp), %rdi
leaq -0x158(%rbp), %rsi
movl $0x60, %edx
callq 0x1070
movq -0x8(%rbp), %rdi
movups -0x2a0(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x50(%rax)
movups -0x2b0(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x2f0(%rbp), %xmm0
movups -0x2e0(%rbp), %xmm1
movups -0x2d0(%rbp), %xmm2
movups -0x2c0(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe9c0
movq -0xb30(%rbp), %rcx
movl (%rcx), %eax
shll %eax
subl $0x2, %eax
subl 0x48(%rcx), %eax
addl $0x1, %eax
cltq
imulq $0x18, %rax, %rdi
callq 0x1110
movq %rax, %rcx
movq -0xb30(%rbp), %rax
movq %rcx, -0x288(%rbp)
movq 0x30(%rax), %rdi
movq 0x8(%rax), %rsi
movl 0x20(%rax), %edx
movq 0x28(%rax), %rcx
movq -0x288(%rbp), %r8
movl (%rax), %r9d
movl 0x48(%rax), %eax
movl %eax, (%rsp)
callq 0x84e0
movq -0xb28(%rbp), %rcx
movl (%rcx), %eax
shll %eax
subl $0x2, %eax
subl 0x48(%rcx), %eax
addl $0x1, %eax
cltq
imulq $0x18, %rax, %rdi
callq 0x1110
movq %rax, %rcx
movq -0xb28(%rbp), %rax
movq %rcx, -0x280(%rbp)
movq 0x30(%rax), %rdi
movq 0x8(%rax), %rsi
movl 0x20(%rax), %edx
movq 0x28(%rax), %rcx
movq -0x280(%rbp), %r8
movl (%rax), %r9d
movl 0x48(%rax), %eax
movl %eax, (%rsp)
callq 0x84e0
movl $0x1, -0x2f4(%rbp)
movl $0x1, -0x2fc(%rbp)
movl $0x1, -0xd4(%rbp)
movq -0xb28(%rbp), %rdx
movl -0xd4(%rbp), %eax
movl -0xf0(%rbp), %ecx
shll %ecx
subl $0x3, %ecx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jge 0x1745a
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
movq -0xb28(%rbp), %rdx
movl -0xd8(%rbp), %eax
movl -0xf0(%rbp), %ecx
shll %ecx
subl $0x3, %ecx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jge 0x17444
movq -0xb28(%rbp), %rsi
movl $0x0, -0xec(%rbp)
leaq -0x358(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movl -0xd4(%rbp), %edi
movl -0xd8(%rbp), %esi
movq -0x308(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0x318(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x358(%rbp), %xmm0
movups -0x348(%rbp), %xmm1
movups -0x338(%rbp), %xmm2
movups -0x328(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x12050
cmpl $0x1, %eax
jne 0x168e5
movl -0xd4(%rbp), %eax
cmpl -0xd8(%rbp), %eax
je 0x168e5
movq -0xb28(%rbp), %rsi
leaq -0x3b0(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
xorl %eax, %eax
movq -0x360(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0x370(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x3b0(%rbp), %xmm0
movups -0x3a0(%rbp), %xmm1
movups -0x390(%rbp), %xmm2
movups -0x380(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x78(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x12530
movq -0xb38(%rbp), %rdi
addq $0xe9e, %rdi            # imm = 0xE9E
leaq 0xf8f4(%rip), %rsi      # 0x259db
callq 0x1130
cmpl $0x0, %eax
jne 0x16210
movq -0xb28(%rbp), %rsi
leaq -0x408(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movl -0xd4(%rbp), %edi
movl -0xd8(%rbp), %esi
movq -0x280(%rbp), %rdx
movq -0x288(%rbp), %rcx
movq -0x3b8(%rbp), %r8
movq %rsp, %rax
movq %r8, 0x50(%rax)
movups -0x3c8(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x408(%rbp), %xmm0
movups -0x3f8(%rbp), %xmm1
movups -0x3e8(%rbp), %xmm2
movups -0x3d8(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xd5f0
cmpl $0x0, %eax
jne 0x1617a
jmp 0x17430
movq -0xb28(%rbp), %rsi
movl $0x0, -0x2f8(%rbp)
leaq -0x460(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movl -0xd4(%rbp), %edi
movl -0xd8(%rbp), %esi
movq -0x280(%rbp), %rdx
movq -0x288(%rbp), %rcx
movq -0x410(%rbp), %r8
movq %rsp, %rax
movq %r8, 0x50(%rax)
movups -0x420(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x460(%rbp), %xmm0
movups -0x450(%rbp), %xmm1
movups -0x440(%rbp), %xmm2
movups -0x430(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xdf80
cmpl $0x1, %eax
jne 0x1620e
movl $0x1, -0x2f8(%rbp)
jmp 0x16210
movq -0xb30(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xd4(%rbp), %edx
movl -0xd8(%rbp), %ecx
leaq -0x78(%rbp), %rsi
callq 0xec00
movq -0xb38(%rbp), %rdi
addq $0x3fc, %rdi            # imm = 0x3FC
leaq 0x1031d(%rip), %rsi     # 0x26562
callq 0x1130
cmpl $0x0, %eax
jne 0x162bd
movq -0xb30(%rbp), %rsi
leaq -0x4b8(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
xorl %eax, %eax
movq -0x468(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0x478(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x4b8(%rbp), %xmm0
movups -0x4a8(%rbp), %xmm1
movups -0x498(%rbp), %xmm2
movups -0x488(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x14340
movq -0xb30(%rbp), %rax
movq -0x70(%rbp), %rdi
movq 0x8(%rax), %rsi
movl -0xf0(%rbp), %edx
movq -0x40(%rbp), %r8
movq -0x48(%rbp), %r9
movq 0x38(%rax), %r10
movq 0x30(%rax), %rax
leaq -0x158(%rbp), %rcx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xea10
movl $0x1, -0xe4(%rbp)
leaq -0x518(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
movl $0x60, %edx
callq 0x1070
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq (%rax), %rax
imulq $0xa8, %rax, %rax
addq %rax, %rdi
movups -0x4c8(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x50(%rax)
movups -0x4d8(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x518(%rbp), %xmm0
movups -0x508(%rbp), %xmm1
movups -0x4f8(%rbp), %xmm2
movups -0x4e8(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe9c0
movl -0x188(%rbp), %eax
subl -0x128(%rbp), %eax
cmpl $0x1, %eax
jne 0x16693
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x16693
movq -0xb28(%rbp), %rcx
movq 0x30(%rcx), %rax
movl -0xd4(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movq 0x30(%rcx), %rcx
movl -0xd8(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x16475
movq -0xb28(%rbp), %rcx
movq 0x30(%rcx), %rax
movl -0xd4(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movq 0x30(%rcx), %rcx
movl -0xd8(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x16475
movq -0xb28(%rbp), %rcx
movq 0x30(%rcx), %rax
movl -0xd4(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movq 0x30(%rcx), %rcx
movl -0xd8(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x16475
movq -0xb28(%rbp), %rcx
movq 0x30(%rcx), %rax
movl -0xd4(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movq 0x30(%rcx), %rcx
movl -0xd8(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
cmpq (%rcx,%rdx,8), %rax
jne 0x16693
movq -0xb38(%rbp), %rax
addq $0x3fc, %rax            # imm = 0x3FC
movq %rax, -0xb50(%rbp)
leaq -0x578(%rbp), %rdi
leaq -0x158(%rbp), %rsi
movl $0x60, %edx
callq 0x1070
movq -0xb50(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq (%rax), %rax
imulq $0xa8, %rax, %rax
addq %rax, %rdx
movl -0xd4(%rbp), %ecx
movl -0xd8(%rbp), %r8d
xorl %eax, %eax
movups -0x528(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x50(%rax)
movups -0x538(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x578(%rbp), %xmm0
movups -0x568(%rbp), %xmm1
movups -0x558(%rbp), %xmm2
movups -0x548(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0xe4(%rbp), %rdi
xorl %r9d, %r9d
callq 0x11fe0
movq -0xb28(%rbp), %rsi
movq 0x30(%rsi), %rax
movl -0xd4(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x80(%rax)
movq 0x30(%rsi), %rax
movl -0xd4(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x84(%rax)
movq 0x30(%rsi), %rax
movl -0xd8(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x88(%rax)
movq 0x30(%rsi), %rax
movl -0xd8(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8c(%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb48(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0xb40(%rbp)
leaq -0x5d0(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movq -0xb48(%rbp), %rdi
movq -0xb40(%rbp), %rsi
movq -0x580(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0x590(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x5d0(%rbp), %xmm0
movups -0x5c0(%rbp), %xmm1
movups -0x5b0(%rbp), %xmm2
movups -0x5a0(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x11b40
movl $0x1, -0xec(%rbp)
jmp 0x168e3
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x168e1
cmpl $0x1, -0x2f8(%rbp)
je 0x166b6
cmpl $0x0, -0x2fc(%rbp)
jne 0x168e1
movq -0xb38(%rbp), %rax
addq $0x3fc, %rax            # imm = 0x3FC
movq %rax, -0xb58(%rbp)
leaq -0x630(%rbp), %rdi
leaq -0x158(%rbp), %rsi
movl $0x60, %edx
callq 0x1070
movq -0xb58(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq (%rax), %rax
imulq $0xa8, %rax, %rax
addq %rax, %rdx
movl -0xd4(%rbp), %ecx
movl -0xd8(%rbp), %r8d
xorl %eax, %eax
movups -0x5e0(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x50(%rax)
movups -0x5f0(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x630(%rbp), %xmm0
movups -0x620(%rbp), %xmm1
movups -0x610(%rbp), %xmm2
movups -0x600(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x0, 0x60(%rax)
leaq -0xe4(%rbp), %rdi
xorl %r9d, %r9d
callq 0x11df0
cmpl $0x1, %eax
jne 0x168df
movq -0xb28(%rbp), %rsi
movq 0x30(%rsi), %rax
movl -0xd4(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x80(%rax)
movq 0x30(%rsi), %rax
movl -0xd4(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x84(%rax)
movq 0x30(%rsi), %rax
movl -0xd8(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x88(%rax)
movq 0x30(%rsi), %rax
movl -0xd8(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8c(%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb68(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0xb60(%rbp)
leaq -0x688(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movq -0xb68(%rbp), %rdi
movq -0xb60(%rbp), %rsi
movq -0x638(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0x648(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x688(%rbp), %xmm0
movups -0x678(%rbp), %xmm1
movups -0x668(%rbp), %xmm2
movups -0x658(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x11b40
movl $0x1, -0xec(%rbp)
jmp 0x168e1
jmp 0x168e3
jmp 0x168e5
movq -0xb28(%rbp), %rsi
leaq -0x6e0(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movl -0xd8(%rbp), %edi
movl -0xd4(%rbp), %esi
movq -0x690(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0x6a0(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x6e0(%rbp), %xmm0
movups -0x6d0(%rbp), %xmm1
movups -0x6c0(%rbp), %xmm2
movups -0x6b0(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x12050
cmpl $0x1, %eax
jne 0x1741a
movl -0xd4(%rbp), %eax
cmpl -0xd8(%rbp), %eax
je 0x1741a
leaq -0x738(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movl $0x58, %edx
callq 0x1070
xorl %eax, %eax
movq -0x6e8(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0x6f8(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x738(%rbp), %xmm0
movups -0x728(%rbp), %xmm1
movups -0x718(%rbp), %xmm2
movups -0x708(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0xd0(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x12530
movq -0xb28(%rbp), %rsi
leaq -0x790(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
xorl %eax, %eax
movq -0x740(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0x750(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x790(%rbp), %xmm0
movups -0x780(%rbp), %xmm1
movups -0x770(%rbp), %xmm2
movups -0x760(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x78(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x12530
movq -0xb38(%rbp), %rdi
addq $0xe9e, %rdi            # imm = 0xE9E
leaq 0xef83(%rip), %rsi      # 0x259db
callq 0x1130
cmpl $0x0, %eax
jne 0x16b77
movq -0xb28(%rbp), %rsi
leaq -0x7e8(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movl -0xd8(%rbp), %edi
movl -0xd4(%rbp), %esi
movq -0x280(%rbp), %rdx
movq -0x288(%rbp), %rcx
movq -0x798(%rbp), %r8
movq %rsp, %rax
movq %r8, 0x50(%rax)
movups -0x7a8(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x7e8(%rbp), %xmm0
movups -0x7d8(%rbp), %xmm1
movups -0x7c8(%rbp), %xmm2
movups -0x7b8(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xd5f0
cmpl $0x0, %eax
jne 0x16aeb
jmp 0x17430
movq -0xb28(%rbp), %rsi
leaq -0x840(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movl -0xd8(%rbp), %edi
movl -0xd4(%rbp), %esi
movq -0x280(%rbp), %rdx
movq -0x288(%rbp), %rcx
movq -0x7f0(%rbp), %r8
movq %rsp, %rax
movq %r8, 0x50(%rax)
movups -0x800(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x840(%rbp), %xmm0
movups -0x830(%rbp), %xmm1
movups -0x820(%rbp), %xmm2
movups -0x810(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xdf80
cmpl $0x1, %eax
jne 0x16b75
movl $0x2, -0x2f8(%rbp)
jmp 0x16b77
movq -0xb30(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xd8(%rbp), %edx
movl -0xd4(%rbp), %ecx
leaq -0x78(%rbp), %rsi
callq 0xec00
movq -0xb38(%rbp), %rdi
addq $0x3fc, %rdi            # imm = 0x3FC
leaq 0xf9b6(%rip), %rsi      # 0x26562
callq 0x1130
cmpl $0x0, %eax
jne 0x16c24
movq -0xb30(%rbp), %rsi
leaq -0x898(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
xorl %eax, %eax
movq -0x848(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0x858(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x898(%rbp), %xmm0
movups -0x888(%rbp), %xmm1
movups -0x878(%rbp), %xmm2
movups -0x868(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x14340
movq -0xb30(%rbp), %rax
movq -0x70(%rbp), %rdi
movq 0x8(%rax), %rsi
movl -0xf0(%rbp), %edx
movq -0x40(%rbp), %r8
movq -0x48(%rbp), %r9
movq 0x38(%rax), %r10
movq 0x30(%rax), %rax
leaq -0x158(%rbp), %rcx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xea10
cmpq $0x0, -0xc8(%rbp)
jne 0x16c82
leaq 0xedb7(%rip), %rdi      # 0x25a26
movb $0x0, %al
callq 0x1030
movl $0xf423f, -0x248(%rbp)  # imm = 0xF423F
jmp 0x16cbe
movq -0x70(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movl -0xf0(%rbp), %edx
movq -0x40(%rbp), %r8
movq -0x48(%rbp), %r9
movq -0x98(%rbp), %r10
movq -0xa0(%rbp), %rax
leaq -0x278(%rbp), %rcx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xea10
movl $0x0, -0x89c(%rbp)
movl $0x1, -0xe4(%rbp)
movl $0x0, -0x8a0(%rbp)
cmpl $0x0, -0xec(%rbp)
jne 0x16d60
leaq -0x900(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
movl $0x60, %edx
callq 0x1070
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq (%rax), %rax
imulq $0xa8, %rax, %rax
addq %rax, %rdi
movups -0x8b0(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x50(%rax)
movups -0x8c0(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x900(%rbp), %xmm0
movups -0x8f0(%rbp), %xmm1
movups -0x8e0(%rbp), %xmm2
movups -0x8d0(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe9c0
jmp 0x16e78
cmpl $0x1, -0x1c(%rbp)
jne 0x16d9e
cmpl $0x0, -0x248(%rbp)
jne 0x16d9e
movl -0x128(%rbp), %eax
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x50(%rcx), %eax
jne 0x16d9e
movl $0x1, -0x8a0(%rbp)
jmp 0x16e76
movsd -0x148(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
subsd 0x30(%rax), %xmm0
movaps 0xe2b9(%rip), %xmm1     # 0x25080
pand %xmm1, %xmm0
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x48(%rax)
cmpl $0x1, -0x2f4(%rbp)
jne 0x16e72
movsd -0x148(%rbp), %xmm1
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
subsd 0x30(%rax), %xmm1
movaps 0xe265(%rip), %xmm0     # 0x25080
pand %xmm0, %xmm1
movsd 0xe221(%rip), %xmm0     # 0x25048
ucomisd %xmm1, %xmm0
jb 0x16e72
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x50(%rax), %eax
subl -0x128(%rbp), %eax
cmpl $0x1, %eax
jl 0x16e66
movl $0x0, -0xec(%rbp)
movl $0x2, -0x89c(%rbp)
jmp 0x16e70
movl $0x1, -0x89c(%rbp)
jmp 0x16e74
jmp 0x16e74
jmp 0x16e76
jmp 0x16e78
cmpl $0x1, -0x89c(%rbp)
je 0x17418
movl -0x188(%rbp), %eax
subl -0x128(%rbp), %eax
cmpl $0x1, %eax
jne 0x171bd
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x171bd
movq -0xb28(%rbp), %rcx
movq 0x30(%rcx), %rax
movl -0xd4(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movq 0x30(%rcx), %rcx
movl -0xd8(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x16f83
movq -0xb28(%rbp), %rcx
movq 0x30(%rcx), %rax
movl -0xd4(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movq 0x30(%rcx), %rcx
movl -0xd8(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x16f83
movq -0xb28(%rbp), %rcx
movq 0x30(%rcx), %rax
movl -0xd4(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movq 0x30(%rcx), %rcx
movl -0xd8(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x16f83
movq -0xb28(%rbp), %rcx
movq 0x30(%rcx), %rax
movl -0xd4(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movq 0x30(%rcx), %rcx
movl -0xd8(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
cmpq (%rcx,%rdx,8), %rax
jne 0x171bd
cmpl $0x1, -0x8a0(%rbp)
jne 0x171b8
cmpl $0x1, 0x1318d(%rip)     # 0x2a124
jne 0x171b8
movq -0xb38(%rbp), %rax
addq $0x3fc, %rax            # imm = 0x3FC
movq %rax, -0xb80(%rbp)
leaq -0x960(%rbp), %rdi
leaq -0x158(%rbp), %rsi
movl $0x60, %edx
callq 0x1070
movq -0xb80(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq (%rax), %rax
imulq $0xa8, %rax, %rax
addq %rax, %rdx
movl -0xd8(%rbp), %ecx
movl -0xd4(%rbp), %r8d
movl -0x8a0(%rbp), %r9d
movups -0x910(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x50(%rax)
movups -0x920(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x960(%rbp), %xmm0
movups -0x950(%rbp), %xmm1
movups -0x940(%rbp), %xmm2
movups -0x930(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0xe4(%rbp), %rdi
callq 0x11fe0
movq -0xb28(%rbp), %rsi
movq 0x30(%rsi), %rax
movl -0xd8(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x80(%rax)
movq 0x30(%rsi), %rax
movl -0xd8(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x84(%rax)
movq 0x30(%rsi), %rax
movl -0xd4(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x88(%rax)
movq 0x30(%rsi), %rax
movl -0xd4(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8c(%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb78(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0xb70(%rbp)
leaq -0x9b8(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movq -0xb78(%rbp), %rdi
movq -0xb70(%rbp), %rsi
movq -0x968(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0x978(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x9b8(%rbp), %xmm0
movups -0x9a8(%rbp), %xmm1
movups -0x998(%rbp), %xmm2
movups -0x988(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x11b40
movl $0x1, -0xec(%rbp)
jmp 0x17416
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x171d8
cmpl $0x2, -0x2f8(%rbp)
je 0x171e5
cmpl $0x0, -0x2fc(%rbp)
je 0x171e5
cmpl $0x1, -0x8a0(%rbp)
jne 0x17414
movq -0xb38(%rbp), %rax
addq $0x3fc, %rax            # imm = 0x3FC
movq %rax, -0xb88(%rbp)
leaq -0xa18(%rbp), %rdi
leaq -0x158(%rbp), %rsi
movl $0x60, %edx
callq 0x1070
movq -0xb88(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq (%rax), %rax
imulq $0xa8, %rax, %rax
addq %rax, %rdx
movl -0xd8(%rbp), %ecx
movl -0xd4(%rbp), %r8d
movl -0x89c(%rbp), %r9d
movl -0x8a0(%rbp), %edi
movups -0x9c8(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x50(%rax)
movups -0x9d8(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0xa18(%rbp), %xmm0
movups -0xa08(%rbp), %xmm1
movups -0x9f8(%rbp), %xmm2
movups -0x9e8(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl %edi, 0x60(%rax)
leaq -0xe4(%rbp), %rdi
callq 0x11df0
cmpl $0x1, %eax
jne 0x17412
movq -0xb28(%rbp), %rsi
movq 0x30(%rsi), %rax
movl -0xd8(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x80(%rax)
movq 0x30(%rsi), %rax
movl -0xd8(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x84(%rax)
movq 0x30(%rsi), %rax
movl -0xd4(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x88(%rax)
movq 0x30(%rsi), %rax
movl -0xd4(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8c(%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb98(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0xb90(%rbp)
leaq -0xa70(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movq -0xb98(%rbp), %rdi
movq -0xb90(%rbp), %rsi
movq -0xa20(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0xa30(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0xa70(%rbp), %xmm0
movups -0xa60(%rbp), %xmm1
movups -0xa50(%rbp), %xmm2
movups -0xa40(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x11b40
movl $0x1, -0xec(%rbp)
jmp 0x17414
jmp 0x17416
jmp 0x17418
jmp 0x1741a
cmpl $0x1, -0xec(%rbp)
jne 0x1742e
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x17430
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0x15fb2
jmp 0x17446
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x15f80
movl $0x0, -0x28c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x1748a
cmpl $0x1, -0x2f4(%rbp)
jne 0x1748a
movl $0x0, -0x2f4(%rbp)
movl $0x1, -0x28c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x174c3
cmpl $0x1, -0x2fc(%rbp)
jne 0x174c3
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x174c3
movl $0x0, -0x2fc(%rbp)
movl $0x1, -0x2f4(%rbp)
movl $0x1, -0x28c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x174f3
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x174f3
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movl $0x1, -0x28c(%rbp)
movl $0x1, -0x2f4(%rbp)
jmp 0x174f5
cmpl $0x1, -0x28c(%rbp)
je 0x15f76
movq -0xb28(%rbp), %rsi
movq -0x280(%rbp), %rax
movq %rax, -0xba8(%rbp)
leaq -0xac8(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movq -0xba8(%rbp), %rdi
movq -0xa78(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0xa88(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0xac8(%rbp), %xmm0
movups -0xab8(%rbp), %xmm1
movups -0xaa8(%rbp), %xmm2
movups -0xa98(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xce00
movq -0xb30(%rbp), %rsi
movq -0x288(%rbp), %rax
movq %rax, -0xba0(%rbp)
leaq -0xb20(%rbp), %rdi
movl $0x58, %edx
callq 0x1070
movq -0xba0(%rbp), %rdi
movq -0xad0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x50(%rax)
movups -0xae0(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0xb20(%rbp), %xmm0
movups -0xb10(%rbp), %xmm1
movups -0xb00(%rbp), %xmm2
movups -0xaf0(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xce00
movl -0xf0(%rbp), %esi
leaq -0x158(%rbp), %rdi
callq 0x14650
movl -0xf0(%rbp), %esi
leaq -0x1b8(%rbp), %rdi
callq 0x14650
movl -0x78(%rbp), %esi
leaq -0x78(%rbp), %rdi
callq 0x13810
movq -0x10(%rbp), %rax
movl (%rax), %eax
addq $0xc10, %rsp            # imm = 0xC10
popq %rbp
retq
nopl (%rax)