// File: /workspace/github_cpp_makefile_star2_O3/dcarrey[P]hgt-detection/./fonctions.cpp
// Function: printHGT(_IO_FILE*, _IO_FILE*, char*, CRITERIA*, char*, int, InputTree, HGT*, int, double*, char*, int)
void printHGT(FILE * res,FILE * res2,char *stepbystep,struct CRITERIA * multicheckTab,char *mode,int RFref,/*FILE *out,*/struct InputTree SpeciesTree,struct HGT *tabHGT, int nbHGT, double *tabBoot,char *subtree,int bootmin){
	int i,j,k;
	int diffHGT=0;
	FILE * res1 = res; //fopen ("result2.txt","w+");
	int nbTrivial=0;
	
	fprintf(res,"mode=%s\n",mode);
	
/*   if(strcmp(mode,"monocheck") == 0 || multicheckTab == NULL){
		for(i=1;i<=nbHGT;i++){
			if(i==1)
				diffHGT = RFref - tabHGT[i].crit.RF;
			else
				diffHGT = tabHGT[i-1].crit.RF - tabHGT[i].crit.RF;
		//	fprintf(out,"\n\n================ \n= HGT #%d %s \n==============",i,(diffHGT==1)?" (Trivial transfer: RF distance decreased by 1)":"");
			fprintf(res,"1");
            fprintf(res,"\nHGT %d %s",i,(diffHGT==1)?" Trivial":"");
			nbTrivial += tabHGT[i].trivial; //(diffHGT==1)?1:0;
	//		if(tabBoot != NULL)
	//			fprintf(out,"\nBootstrap value : %3.1lf%%",(double)tabBoot[i]);
			fprintf(res,"\n");
			for(int m=1;m<=tabHGT[i].listSource[0];m++){
				if(m == tabHGT[i].listSource[0])
					fprintf(res,"%s",SpeciesTree.SpeciesName[tabHGT[i].listSource[m]]);
				else
					fprintf(res,"%s, ",SpeciesTree.SpeciesName[tabHGT[i].listSource[m]]);
			}
			//fprintf(res,"\n%d",tabHGT[i].listDestination[0]);
			fprintf(res,"\n");
			for(int m=1;m<=tabHGT[i].listDestination[0];m++){
				if(m == tabHGT[i].listDestination[0])
					fprintf(res,"%s",SpeciesTree.SpeciesName[tabHGT[i].listDestination[m]]);
				else
					fprintf(res,"%s, ",SpeciesTree.SpeciesName[tabHGT[i].listDestination[m]]);
			}
	//		printTransfer(out,1,SpeciesTree.SpeciesName, SpeciesTree.size,tabHGT[i].source_A,tabHGT[i].source_B,tabHGT[i].dest_A,tabHGT[i].dest_B);
			printTransfer(res,1,SpeciesTree.SpeciesName, SpeciesTree.size,tabHGT[i].source_A,tabHGT[i].source_B,tabHGT[i].dest_A,tabHGT[i].dest_B);
	//		fprintf(out,"\nRF = %d \nLS = %lf \nBD = %lf",tabHGT[i].crit.RF,tabHGT[i].crit.LS,tabHGT[i].crit.BD,tabHGT[i].crit.QD);
			fprintf(res,"\nRF = %d , LS = %1.3lf , BD = %1.1lf\n",tabHGT[i].crit.RF,tabHGT[i].crit.LS,tabHGT[i].crit.BD,tabHGT[i].crit.QD);
		}
		if(nbHGT == 0){
	//		fprintf(out,"\n\nNo more HGT have been detected due to evolutionary constraints");
	//		fprintf(res,"\nNo more HGT have been detected due to evolutionary constraints\n");
		}
		else
			if(tabHGT[nbHGT].crit.RF != 0){
	//			fprintf(out,"\n\nNo more HGT have been detected due to evolutionary constraints ");
	//			fprintf(res,"\nNo more HGT have been detected due to evolutionary constraints\n");
			}
    
	} */
	// else{
		
		i=1;
		int lastRF=0;
		int trivial;
		int k1=1;
		for(j=1;j<=multicheckTab[0].m;j++){
		
			if(multicheckTab[j].nbHgtFound == 0) continue;
			//	fprintf(out,"\n\n=======> %d %s been found for this iteration",multicheckTab[j].nbHgtFound,(multicheckTab[j].nbHgtFound==1)?"hgt has":"hgts have");
				fprintf(res,"%d",multicheckTab[j].nbHgtFound);
				if(((j == multicheckTab[0].m) && (strcmp(stepbystep,"yes") == 0)) || (strcmp(stepbystep,"yes") != 0) ){
					fprintf(res2,"%d",multicheckTab[j].nbHgtFound);
				}
			for(k=1;k<=multicheckTab[j].nbHgtFound;k++){
				if(j==1)
					diffHGT = RFref - tabHGT[i].crit.RF;
				else
					diffHGT = multicheckTab[j-1].RF - tabHGT[i].crit.RF;
				trivial=0;
				if(
				  (tabHGT[i].source_A == tabHGT[i].dest_A ) ||
				  (tabHGT[i].source_A == tabHGT[i].dest_B ) ||
				  (tabHGT[i].source_B == tabHGT[i].dest_A ) ||
				  (tabHGT[i].source_B == tabHGT[i].dest_B ) 
				){
					trivial=1;
				}
			//			fprintf(out,"\n================ \n= HGT #%d/%d %s\n================",k,multicheckTab[j].nbHgtFound,(tabHGT[i].trivial == 1 )?" (Trivial transfer: RF distance decreased by 1)":"");//((trivial==1) && (diffHGT==1) )?" (Trivial transfer: RF distance decreased by 1)":"");
				fprintf(res,"\nHGT %d / %d %s%s%s%s",k,multicheckTab[j].nbHgtFound,(tabHGT[i].trivial == 1 )?" Trivial":"",((tabHGT[i].valide == 2 ) || (tabHGT[i].valide == 6))?" Reverse":"",(tabHGT[i].valide == 3 )?" Canceled":"",(tabHGT[i].valide == 5 )?" Initial":"");
				// fprintf(res,"\nHGT %d / %d %s",k,multicheckTab[j].nbHgtFound,(tabHGT[i].valide == 2 )?" Reverse":"");
				// fprintf(res,"\nHGT %d / %d %s",k,multicheckTab[j].nbHgtFound,(tabHGT[i].valide == 3 )?" Canceled":"");
				// fprintf(res,"\nHGT %d / %d %s",k,multicheckTab[j].nbHgtFound,(tabHGT[i].valide == 5 )?" Initial":"");
				// fprintf(res,"\nHGT %d / %d %s",k,multicheckTab[j].nbHgtFound,(tabHGT[i].trivial == 6 )?" Reverse":"");
				
				if(((j == multicheckTab[0].m) && (strcmp(stepbystep,"yes") == 0)) || (strcmp(stepbystep,"yes") != 0) ){
					fprintf(res2,"\nHGT %d / %d %s%s%s%s",k,multicheckTab[j].nbHgtFound,(tabHGT[i].trivial == 1 )?" Trivial":"",((tabHGT[i].valide == 2 ) || (tabHGT[i].valide == 6))?" Reverse":"",(tabHGT[i].valide == 3 )?" Canceled":"",(tabHGT[i].valide == 5 )?" Initial":"");
					// fprintf(res2,"\nHGT %d / %d %s",k,multicheckTab[j].nbHgtFound,(tabHGT[i].valide == 2 )?" Reverse":"");
					// fprintf(res2,"\nHGT %d / %d %s",k,multicheckTab[j].nbHgtFound,(tabHGT[i].valide == 3 )?" Canceled":"");
					// fprintf(res2,"\nHGT %d / %d %s",k,multicheckTab[j].nbHgtFound,(tabHGT[i].valide == 5 )?" Initial":"");
					// fprintf(res2,"\nHGT %d / %d %s",k,multicheckTab[j].nbHgtFound,(tabHGT[i].trivial == 6 )?" Reverse":"");
					fprintf(res2,"\nHGT %d / %d %s%s%s%s",k1++,nbHGT,(tabHGT[i].trivial == 1 )?" Trivial":"", ((tabHGT[i].valide == 2 ) || (tabHGT[i].valide == 6))?" Reverse":"",(tabHGT[i].valide == 3 )?" Canceled":"",(tabHGT[i].valide == 5 )?" Initial":"");
					
				}
				if(tabHGT[i].trivial == 1)
					nbTrivial ++;
			  //fprintf(out,"\n%s(%d)",(tabHGT[i].trivial == 1)?"TOTO":"TATA",tabHGT[i].trivial);
		//      if(tabBoot != NULL)
			//				fprintf(out,"\nBootstrap value : %3.1lf%%",(double)tabBoot[i]);

				if((tabBoot != NULL && tabBoot[i] >= bootmin) || (tabBoot == NULL)){
					//fprintf(res,"\n%d",tabHGT[i].listSource[0]);
					fprintf(res,"\n");
					for(int m=1;m<=tabHGT[i].listSource[0];m++){
						//fprintf(res,"%s ",SpeciesTree.SpeciesName[tabHGT[i].listSource[m]]);
						if(m == tabHGT[i].listSource[0])
							fprintf(res,"%s",SpeciesTree.SpeciesName[tabHGT[i].listSource[m]]);
						else
							fprintf(res,"%s, ",SpeciesTree.SpeciesName[tabHGT[i].listSource[m]]);
					}
					//fprintf(res,"\n%d",tabHGT[i].listDestination[0]);
					fprintf(res,"\n");
					for(int m=1;m<=tabHGT[i].listDestination[0];m++){
						//	fprintf(res,"%s ",SpeciesTree.SpeciesName[tabHGT[i].listDestination[m]]);
						if(m == tabHGT[i].listDestination[0])
							fprintf(res,"%s",SpeciesTree.SpeciesName[tabHGT[i].listDestination[m]]);	
						else
							fprintf(res,"%s, ",SpeciesTree.SpeciesName[tabHGT[i].listDestination[m]]);
								
					}
			//			printTransfer(out,1,SpeciesTree.SpeciesName, SpeciesTree.size,tabHGT[i].source_A,tabHGT[i].source_B,tabHGT[i].dest_A,tabHGT[i].dest_B);
					printTransfer(res1,1,SpeciesTree.SpeciesName, SpeciesTree.size,tabHGT[i].source_A,tabHGT[i].source_B,tabHGT[i].dest_A,tabHGT[i].dest_B);
					if(((j == multicheckTab[0].m) && (strcmp(stepbystep,"yes") == 0)) || (strcmp(stepbystep,"yes") != 0) ){
						//fprintf(res2,"\n%d--%d %d--%d",tabHGT[i].source_A,tabHGT[i].source_B,tabHGT[i].dest_A,tabHGT[i].dest_B);
						printTransfer(res2,1,SpeciesTree.SpeciesName, SpeciesTree.size,tabHGT[i].source_A,tabHGT[i].source_B,tabHGT[i].dest_A,tabHGT[i].dest_B);
					}
			//		  fprintf(out,"\nRF = %d \nLS = %lf \nBD = %lf",tabHGT[i].crit.RF,tabHGT[i].crit.LS,tabHGT[i].crit.BD,tabHGT[i].crit.QD);
					fprintf(res1,"\nRF = %d , LS = %1.3lf , BD = %1.1lf",tabHGT[i].crit.RF,tabHGT[i].crit.LS,tabHGT[i].crit.BD);
					fprintf(res1,"\nrRF = %d , rLS = %1.3lf , rBD = %1.1lf",tabHGT[i].crit.rRF,tabHGT[i].crit.rLS,tabHGT[i].crit.rBD);
					if(((j == multicheckTab[0].m) && (strcmp(stepbystep,"yes") == 0)) || (strcmp(stepbystep,"yes") != 0) ){
						fprintf(res2,"\nDIRECT : RF = %d , LS = %1.3lf , BD = %1.1lf",tabHGT[i].crit.RF,tabHGT[i].crit.LS,tabHGT[i].crit.BD);
						fprintf(res2,"\nREVERSE: RF = %d , LS = %1.3lf , BD = %1.1lf",tabHGT[i].crit.rRF,tabHGT[i].crit.rLS,tabHGT[i].crit.rBD);
					}
					i++;
				//	}
				}
			}
			//	fprintf(out,"\n\n=======> After this iteration the criteria are :");
		//		fprintf(out,"\nRF = %d \nLS = %lf \nBD = %lf",multicheckTab[j].RF,multicheckTab[j].LS,multicheckTab[j].BD,multicheckTab[j].QD);
			fprintf(res1,"\nRF = %d , LS = %1.3lf , BD = %1.1lf\n",multicheckTab[j].RF,multicheckTab[j].LS,multicheckTab[j].BD);
			if(((j == multicheckTab[0].m) && (strcmp(stepbystep,"yes") == 0)) || (strcmp(stepbystep,"yes") != 0) ){
				fprintf(res2,"\nRF = %d , LS = %1.3lf , BD = %1.1lf\n",multicheckTab[j].RF,multicheckTab[j].LS,multicheckTab[j].BD);
			}
			lastRF = multicheckTab[j].RF;
		}
	//		fprintf(out,"\n\nTotal number of HGTs : %d",nbHGT);
			
		if(lastRF != 0){
			//	fprintf(out,"\n\nNo more HGT have been detected due to evolutionary constraints");
		//		fprintf(res,"\nNo more HGT have been detected due to evolutionary constraints\n");
		}
		
	// }
	fprintf(res1,"Stat= %d %d",nbHGT,nbTrivial);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r12
movq %rdx, -0x38(%rbp)
movq %rsi, -0x48(%rbp)
movq %rdi, %rbx
movl 0x88(%rbp), %r14d
movq 0x78(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl 0x70(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq 0x68(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq 0x7c15(%rip), %rsi      # 0x161dd
movl $0x0, -0x3c(%rbp)
movq %r8, %rdx
xorl %eax, %eax
callq 0x1180
movl 0x38(%r12), %esi
testl %esi, %esi
jle 0xebac
leaq 0x10(%rbp), %rax
cvtsi2sd %r14d, %xmm0
movsd %xmm0, -0x90(%rbp)
movq 0x18(%rax), %r14
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movl $0x1, %eax
movq %rax, -0x80(%rbp)
movl $0x1, %r13d
movl $0x0, -0x3c(%rbp)
movl $0x1, -0x2c(%rbp)
movq %r12, -0x78(%rbp)
leaq (,%r13,2), %r15
addq %r13, %r15
shlq $0x5, %r15
movl 0x3c(%r12,%r15), %edx
testl %edx, %edx
je 0xeb99
addq %r12, %r15
movq %rbx, %rdi
leaq 0x7b90(%rip), %rsi      # 0x161da
xorl %eax, %eax
callq 0x1180
movl 0x38(%r12), %eax
movq %r13, -0x68(%rbp)
cmpq %rax, %r13
jne 0xe673
movq -0x38(%rbp), %rdi
leaq 0x7325(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xe687
movq -0x38(%rbp), %rdi
leaq 0x7311(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xe69d
movl 0x3c(%r15), %edx
movq -0x48(%rbp), %rdi
leaq 0x7b44(%rip), %rsi      # 0x161da
xorl %eax, %eax
callq 0x1180
movq %r12, %r13
movl 0x3c(%r15), %ecx
testl %ecx, %ecx
movq %r15, -0x60(%rbp)
jle 0xeb0c
movl $0x1, %r12d
movl -0x2c(%rbp), %edx
movl %edx, -0x2c(%rbp)
movslq %edx, %rdx
movq %rdx, -0x58(%rbp)
imulq $0xa8, %rdx, %rax
movq -0x98(%rbp), %rsi
leaq (%rsi,%rax), %r15
movl (%rsi,%rax), %edx
cmpl $0x1, 0x90(%rsi,%rax)
leaq 0x878f(%rip), %r11      # 0x16e76
movq %r11, %r8
leaq 0x7b0b(%rip), %rax      # 0x161fc
cmoveq %rax, %r8
movl %edx, %eax
andl $-0x5, %eax
cmpl $0x2, %eax
movq %r11, %r9
leaq 0x7afe(%rip), %rax      # 0x16205
cmoveq %rax, %r9
cmpl $0x3, %edx
movq %r11, %r10
leaq 0x7af6(%rip), %rax      # 0x1620e
cmoveq %rax, %r10
cmpl $0x5, %edx
leaq 0x7af2(%rip), %rax      # 0x16218
cmoveq %rax, %r11
movq %rbx, %rdi
leaq 0x7ab2(%rip), %rsi      # 0x161e6
movq %r12, -0x88(%rbp)
movl %r12d, %edx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1180
addq $0x10, %rsp
movl 0x38(%r13), %eax
cmpq %rax, -0x68(%rbp)
jne 0xe76b
movq -0x38(%rbp), %rdi
leaq 0x722d(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xe783
movq -0x38(%rbp), %rdi
leaq 0x7219(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xe881
movq -0x60(%rbp), %rax
movl 0x3c(%rax), %ecx
movl (%r15), %eax
cmpl $0x1, 0x90(%r15)
leaq 0x86da(%rip), %r12      # 0x16e76
movq %r12, %r8
leaq 0x7a56(%rip), %rdx      # 0x161fc
cmoveq %rdx, %r8
movl %eax, %edx
andl $-0x5, %edx
cmpl $0x2, %edx
movq %r12, %r9
leaq 0x7a49(%rip), %rdx      # 0x16205
cmoveq %rdx, %r9
cmpl $0x3, %eax
movq %r12, %r10
leaq 0x7a41(%rip), %rdx      # 0x1620e
cmoveq %rdx, %r10
cmpl $0x5, %eax
movq %r12, %r11
leaq 0x7a3a(%rip), %rax      # 0x16218
cmoveq %rax, %r11
movq -0x48(%rbp), %r13
movq %r13, %rdi
leaq 0x79f6(%rip), %rsi      # 0x161e6
movq -0x88(%rbp), %rdx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1180
addq $0x10, %rsp
movq -0x80(%rbp), %rdx
leal 0x1(%rdx), %eax
movl %eax, -0x6c(%rbp)
movl (%r15), %eax
cmpl $0x1, 0x90(%r15)
movq %r12, %r8
leaq 0x79d7(%rip), %rcx      # 0x161fc
cmoveq %rcx, %r8
movl %eax, %ecx
andl $-0x5, %ecx
cmpl $0x2, %ecx
movq %r12, %r9
leaq 0x79ca(%rip), %rcx      # 0x16205
cmoveq %rcx, %r9
cmpl $0x3, %eax
movq %r12, %r10
leaq 0x79c2(%rip), %rcx      # 0x1620e
cmoveq %rcx, %r10
cmpl $0x5, %eax
leaq 0x79be(%rip), %rax      # 0x16218
cmoveq %rax, %r12
movq %r13, %rdi
leaq 0x797e(%rip), %rsi      # 0x161e6
movl -0x4c(%rbp), %ecx
xorl %eax, %eax
pushq %r12
pushq %r10
callq 0x1180
addq $0x10, %rsp
movl -0x6c(%rbp), %eax
movq %rax, -0x80(%rbp)
xorl %ecx, %ecx
cmpl $0x1, 0x90(%r15)
sete %sil
movq -0xa0(%rbp), %rax
testq %rax, %rax
je 0xe8ba
movq -0x58(%rbp), %rdx
movsd (%rax,%rdx,8), %xmm0
ucomisd -0x90(%rbp), %xmm0
jae 0xe8ba
movq -0x78(%rbp), %r13
movl -0x2c(%rbp), %edx
jmp 0xeae7
movb %sil, -0x58(%rbp)
movl $0xa, %edi
movq %rbx, %rsi
callq 0x1130
movq 0x10(%r15), %rax
movl (%rax), %ecx
testl %ecx, %ecx
movq -0x78(%rbp), %r12
jle 0xe91f
movl $0x1, %r13d
movl %ecx, %ecx
movslq (%rax,%r13,4), %rax
movq (%r14,%rax,8), %rdx
cmpq %rcx, %r13
jne 0xe8fb
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x10c0
jmp 0xe90c
movq %rbx, %rdi
leaq 0x791c(%rip), %rsi      # 0x16221
xorl %eax, %eax
callq 0x1180
leaq 0x1(%r13), %rdx
movq 0x10(%r15), %rax
movslq (%rax), %rcx
cmpq %rcx, %r13
movq %rdx, %r13
jl 0xe8df
movl $0xa, %edi
movq %rbx, %rsi
callq 0x1130
movq 0x18(%r15), %rax
movl (%rax), %ecx
testl %ecx, %ecx
jle 0xe97c
movl $0x1, %r13d
movl %ecx, %ecx
movslq (%rax,%r13,4), %rax
movq (%r14,%rax,8), %rdx
cmpq %rcx, %r13
jne 0xe958
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x10c0
jmp 0xe969
movq %rbx, %rdi
leaq 0x78bf(%rip), %rsi      # 0x16221
xorl %eax, %eax
callq 0x1180
leaq 0x1(%r13), %rdx
movq 0x18(%r15), %rax
movslq (%rax), %rcx
cmpq %rcx, %r13
movq %rdx, %r13
jl 0xe93c
movl 0x80(%r15), %r8d
movl 0x84(%r15), %r9d
movl 0x88(%r15), %eax
movl 0x8c(%r15), %r10d
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
movl -0x50(%rbp), %ecx
pushq %r10
pushq %rax
callq 0xe310
addq $0x10, %rsp
movl 0x38(%r12), %eax
movq -0x68(%rbp), %r13
cmpq %rax, %r13
jne 0xe9d4
movq -0x38(%rbp), %rdi
leaq 0x6fc4(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xe9e8
movq -0x38(%rbp), %rdi
leaq 0x6fb0(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xea1f
movl 0x80(%r15), %r8d
movl 0x84(%r15), %r9d
movl 0x88(%r15), %eax
movl 0x8c(%r15), %r10d
movq -0x48(%rbp), %rdi
movl $0x1, %esi
movq %r14, %rdx
movl -0x50(%rbp), %ecx
pushq %r10
pushq %rax
callq 0xe310
addq $0x10, %rsp
movl 0x50(%r15), %edx
movsd 0x20(%r15), %xmm0
movsd 0x30(%r15), %xmm1
movq %rbx, %rdi
leaq 0x77ed(%rip), %rsi      # 0x16226
movb $0x2, %al
callq 0x1180
movl 0x40(%r15), %edx
movsd 0x28(%r15), %xmm0
movsd 0x38(%r15), %xmm1
movq %rbx, %rdi
leaq 0x77f1(%rip), %rsi      # 0x1624b
movb $0x2, %al
callq 0x1180
movl 0x38(%r12), %eax
cmpq %rax, %r13
jne 0xea7f
movq -0x38(%rbp), %rdi
leaq 0x6f19(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xea93
movq -0x38(%rbp), %rdi
leaq 0x6f05(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xead9
movl 0x50(%r15), %edx
movsd 0x20(%r15), %xmm0
movsd 0x30(%r15), %xmm1
movq -0x48(%rbp), %r13
movq %r13, %rdi
leaq 0x77c2(%rip), %rsi      # 0x16273
movb $0x2, %al
callq 0x1180
movl 0x40(%r15), %edx
movsd 0x28(%r15), %xmm0
movsd 0x38(%r15), %xmm1
movq %r13, %rdi
leaq 0x77cf(%rip), %rsi      # 0x162a1
movb $0x2, %al
callq 0x1180
movq %r12, %r13
movl -0x2c(%rbp), %edx
incl %edx
xorl %ecx, %ecx
movb -0x58(%rbp), %sil
movb %sil, %cl
addl %ecx, -0x3c(%rbp)
movq -0x88(%rbp), %rsi
leal 0x1(%rsi), %eax
movq -0x60(%rbp), %r15
movl 0x3c(%r15), %ecx
cmpl %ecx, %esi
movl %eax, %r12d
jl 0xe6b9
jmp 0xeb0f
movl -0x2c(%rbp), %edx
movl %edx, -0x2c(%rbp)
movl 0x30(%r15), %edx
movsd (%r15), %xmm0
movsd 0x10(%r15), %xmm1
movq %rbx, %rdi
leaq 0x77a4(%rip), %rsi      # 0x162cf
movb $0x2, %al
callq 0x1180
movq %r13, %r12
movl 0x38(%r13), %eax
movq -0x68(%rbp), %r13
movq %rax, %r15
cmpq %rax, %r13
jne 0xeb59
movq -0x38(%rbp), %rdi
leaq 0x6e3f(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xeb6d
movq -0x38(%rbp), %rdi
leaq 0x6e2b(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xeb96
movq -0x60(%rbp), %rax
movl 0x30(%rax), %edx
movsd (%rax), %xmm0
movsd 0x10(%rax), %xmm1
movq -0x48(%rbp), %rdi
leaq 0x7747(%rip), %rsi      # 0x162cf
movb $0x2, %al
callq 0x1180
movl 0x38(%r12), %esi
jmp 0xeb99
movq %r15, %rsi
leaq 0x1(%r13), %rax
movslq %esi, %rcx
cmpq %rcx, %r13
movq %rax, %r13
jl 0xe621
leaq 0x7742(%rip), %rsi      # 0x162f5
movq %rbx, %rdi
movl -0x4c(%rbp), %edx
movl -0x3c(%rbp), %ecx
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1180