// File: /workspace/github_cpp_makefile_star2_O1/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, -0x40(%rbp)
movq %rdi, %rbx
movl 0x88(%rbp), %r14d
movq 0x78(%rbp), %rax
movq %rax, -0x98(%rbp)
movl 0x70(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq 0x68(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x7b07(%rip), %rsi      # 0x161dd
xorl %r15d, %r15d
movq %r8, %rdx
xorl %eax, %eax
callq 0x1180
cmpl $0x0, 0x38(%r12)
jle 0xeca1
leaq 0x10(%rbp), %rax
cvtsi2sd %r14d, %xmm0
movsd %xmm0, -0x88(%rbp)
movq 0x18(%rax), %r14
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movl $0x1, %eax
movq %rax, -0x78(%rbp)
movl $0x1, %r13d
xorl %r15d, %r15d
movl $0x1, -0x2c(%rbp)
movq %r12, -0x70(%rbp)
leaq (,%r13,2), %rax
addq %r13, %rax
shlq $0x5, %rax
movl 0x3c(%r12,%rax), %edx
testl %edx, %edx
je 0xec8c
addq %r12, %rax
movq %rax, -0x48(%rbp)
movq %rbx, %rdi
leaq 0x7a87(%rip), %rsi      # 0x161da
xorl %eax, %eax
callq 0x1180
movl 0x38(%r12), %eax
cmpq %rax, %r13
jne 0xe778
movq -0x38(%rbp), %rdi
leaq 0x7220(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xe78c
movq -0x38(%rbp), %rdi
leaq 0x720c(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xe7a5
movq -0x48(%rbp), %rax
movl 0x3c(%rax), %edx
movq -0x40(%rbp), %rdi
leaq 0x7a3c(%rip), %rsi      # 0x161da
xorl %eax, %eax
callq 0x1180
movq -0x48(%rbp), %rsi
movl 0x3c(%rsi), %ecx
testl %ecx, %ecx
jle 0xec15
movl $0x1, %edi
movl -0x2c(%rbp), %edx
movq %r13, -0x58(%rbp)
movl %r15d, -0x68(%rbp)
movl %edx, -0x2c(%rbp)
movslq %edx, %rdx
movq %rdx, -0x60(%rbp)
imulq $0xa8, %rdx, %rax
movq -0x90(%rbp), %rsi
leaq (%rsi,%rax), %r15
movl (%rsi,%rax), %edx
cmpl $0x1, 0x90(%rsi,%rax)
leaq 0x8684(%rip), %r11      # 0x16e76
movq %r11, %r8
leaq 0x7a00(%rip), %rax      # 0x161fc
cmoveq %rax, %r8
movl %edx, %eax
andl $-0x5, %eax
cmpl $0x2, %eax
movq %r11, %r9
leaq 0x79f3(%rip), %rax      # 0x16205
cmoveq %rax, %r9
cmpl $0x3, %edx
movq %r11, %r10
leaq 0x79eb(%rip), %rax      # 0x1620e
cmoveq %rax, %r10
cmpl $0x5, %edx
leaq 0x79e7(%rip), %rax      # 0x16218
cmoveq %rax, %r11
movq %rdi, %rdx
movq %rbx, %rdi
leaq 0x79a4(%rip), %rsi      # 0x161e6
movq %rdx, -0x80(%rbp)
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1180
addq $0x10, %rsp
movl 0x38(%r12), %eax
cmpq %rax, %r13
jne 0xe873
movq -0x38(%rbp), %rdi
leaq 0x7125(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xe88b
movq -0x38(%rbp), %rdi
leaq 0x7111(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xe986
movq -0x48(%rbp), %rax
movl 0x3c(%rax), %ecx
movl (%r15), %eax
cmpl $0x1, 0x90(%r15)
leaq 0x85d2(%rip), %r12      # 0x16e76
movq %r12, %r8
leaq 0x794e(%rip), %rdx      # 0x161fc
cmoveq %rdx, %r8
movl %eax, %edx
andl $-0x5, %edx
cmpl $0x2, %edx
movq %r12, %r9
leaq 0x7941(%rip), %rdx      # 0x16205
cmoveq %rdx, %r9
cmpl $0x3, %eax
movq %r12, %r10
leaq 0x7939(%rip), %rdx      # 0x1620e
cmoveq %rdx, %r10
cmpl $0x5, %eax
movq %r12, %r11
leaq 0x7932(%rip), %rax      # 0x16218
cmoveq %rax, %r11
movq -0x40(%rbp), %r13
movq %r13, %rdi
leaq 0x78ee(%rip), %rsi      # 0x161e6
movq -0x80(%rbp), %rdx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1180
addq $0x10, %rsp
movq -0x78(%rbp), %rdx
leal 0x1(%rdx), %eax
movl %eax, -0x64(%rbp)
movl (%r15), %eax
cmpl $0x1, 0x90(%r15)
movq %r12, %r8
leaq 0x78d2(%rip), %rcx      # 0x161fc
cmoveq %rcx, %r8
movl %eax, %ecx
andl $-0x5, %ecx
cmpl $0x2, %ecx
movq %r12, %r9
leaq 0x78c5(%rip), %rcx      # 0x16205
cmoveq %rcx, %r9
cmpl $0x3, %eax
movq %r12, %r10
leaq 0x78bd(%rip), %rcx      # 0x1620e
cmoveq %rcx, %r10
cmpl $0x5, %eax
leaq 0x78b9(%rip), %rax      # 0x16218
cmoveq %rax, %r12
movq %r13, %rdi
leaq 0x7879(%rip), %rsi      # 0x161e6
movl -0x4c(%rbp), %ecx
xorl %eax, %eax
pushq %r12
pushq %r10
callq 0x1180
addq $0x10, %rsp
movl -0x64(%rbp), %eax
movq %rax, -0x78(%rbp)
xorl %ecx, %ecx
cmpl $0x1, 0x90(%r15)
sete %sil
movq -0x98(%rbp), %rax
testq %rax, %rax
je 0xe9c3
movq -0x60(%rbp), %rdx
movsd (%rax,%rdx,8), %xmm0
ucomisd -0x88(%rbp), %xmm0
jae 0xe9c3
movq -0x70(%rbp), %r12
movq -0x58(%rbp), %r13
movl -0x2c(%rbp), %edx
jmp 0xebf1
movb %sil, -0x60(%rbp)
movl $0xa, %edi
movq %rbx, %rsi
callq 0x1130
movq 0x10(%r15), %rax
movl (%rax), %ecx
testl %ecx, %ecx
movq -0x70(%rbp), %r12
jle 0xea28
movl $0x1, %r13d
movl %ecx, %ecx
movslq (%rax,%r13,4), %rax
movq (%r14,%rax,8), %rdx
cmpq %rcx, %r13
jne 0xea04
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x10c0
jmp 0xea15
movq %rbx, %rdi
leaq 0x7813(%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 0xe9e8
movl $0xa, %edi
movq %rbx, %rsi
callq 0x1130
movq 0x18(%r15), %rax
movl (%rax), %ecx
testl %ecx, %ecx
jle 0xea85
movl $0x1, %r13d
movl %ecx, %ecx
movslq (%rax,%r13,4), %rax
movq (%r14,%rax,8), %rdx
cmpq %rcx, %r13
jne 0xea61
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x10c0
jmp 0xea72
movq %rbx, %rdi
leaq 0x77b6(%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 0xea45
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 0xe41e
addq $0x10, %rsp
movl 0x38(%r12), %eax
movq -0x58(%rbp), %r13
cmpq %rax, %r13
jne 0xeadd
movq -0x38(%rbp), %rdi
leaq 0x6ebb(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xeaf1
movq -0x38(%rbp), %rdi
leaq 0x6ea7(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xeb28
movl 0x80(%r15), %r8d
movl 0x84(%r15), %r9d
movl 0x88(%r15), %eax
movl 0x8c(%r15), %r10d
movq -0x40(%rbp), %rdi
movl $0x1, %esi
movq %r14, %rdx
movl -0x50(%rbp), %ecx
pushq %r10
pushq %rax
callq 0xe41e
addq $0x10, %rsp
movl 0x50(%r15), %edx
movsd 0x20(%r15), %xmm0
movsd 0x30(%r15), %xmm1
movq %rbx, %rdi
leaq 0x76e4(%rip), %rsi      # 0x16226
movb $0x2, %al
callq 0x1180
movl 0x40(%r15), %edx
movsd 0x28(%r15), %xmm0
movsd 0x38(%r15), %xmm1
movq %rbx, %rdi
leaq 0x76e8(%rip), %rsi      # 0x1624b
movb $0x2, %al
callq 0x1180
movl 0x38(%r12), %eax
cmpq %rax, %r13
jne 0xeb88
movq -0x38(%rbp), %rdi
leaq 0x6e10(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xeb9c
movq -0x38(%rbp), %rdi
leaq 0x6dfc(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xebe6
movl 0x50(%r15), %edx
movsd 0x20(%r15), %xmm0
movsd 0x30(%r15), %xmm1
movq -0x40(%rbp), %r13
movq %r13, %rdi
leaq 0x76b9(%rip), %rsi      # 0x16273
movb $0x2, %al
callq 0x1180
movl 0x40(%r15), %edx
movsd 0x28(%r15), %xmm0
movsd 0x38(%r15), %xmm1
movq %r13, %rdi
movq -0x58(%rbp), %r13
leaq 0x76c2(%rip), %rsi      # 0x162a1
movb $0x2, %al
callq 0x1180
movl -0x2c(%rbp), %edx
incl %edx
xorl %ecx, %ecx
movb -0x60(%rbp), %sil
movb %sil, %cl
movl -0x68(%rbp), %r15d
addl %ecx, %r15d
movq -0x80(%rbp), %rdi
leal 0x1(%rdi), %eax
movq -0x48(%rbp), %rsi
movl 0x3c(%rsi), %ecx
cmpl %ecx, %edi
movl %eax, %edi
jl 0xe7c0
jmp 0xec18
movl -0x2c(%rbp), %edx
movl %edx, -0x2c(%rbp)
movl 0x30(%rsi), %edx
movsd (%rsi), %xmm0
movsd 0x10(%rsi), %xmm1
movq %rbx, %rdi
leaq 0x769e(%rip), %rsi      # 0x162cf
movb $0x2, %al
callq 0x1180
movl 0x38(%r12), %eax
cmpq %rax, %r13
jne 0xec56
movq -0x38(%rbp), %rdi
leaq 0x6d42(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xec6a
movq -0x38(%rbp), %rdi
leaq 0x6d2e(%rip), %rsi      # 0x1598f
callq 0x1170
testl %eax, %eax
je 0xec8c
movq -0x48(%rbp), %rax
movl 0x30(%rax), %edx
movsd (%rax), %xmm0
movsd 0x10(%rax), %xmm1
movq -0x40(%rbp), %rdi
leaq 0x764a(%rip), %rsi      # 0x162cf
movb $0x2, %al
callq 0x1180
leaq 0x1(%r13), %rax
movslq 0x38(%r12), %rcx
cmpq %rcx, %r13
movq %rax, %r13
jl 0xe726
leaq 0x764d(%rip), %rsi      # 0x162f5
movq %rbx, %rdi
movl -0x4c(%rbp), %edx
movl %r15d, %ecx
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1180