// File: dcarrey[P]hgt-detection/./utils_tree.cpp
// Function: printEdges(_IO_FILE*, int, long*, double*, char**, int, int*, int, int)
void printEdges(FILE *out,int ShowName, long int * ARETES,double * LONGUEUR,char ** NAMES,int size,int *BSARETE,int nbTree,int kt){

	int i,j,fichier=1,boot=1,longChaine=0;
//	double bsvalue;

	//if(nbTree==0)
	//	boot=0;
	for(i=1;i<=size;i++){
		if ((int)strlen(NAMES[i]) > longChaine)
			longChaine = (int)strlen(NAMES[i]);
	}
	if(out == NULL)
		fichier =0;
	//printf("\n");
	for(i=1;i<=2*size-3-kt;i++){
		//if(boot==1)
			//bsvalue = BSARETE[i]*100.0 / nbTree;
		if(ShowName == 0){
			if(fichier==1){
				fprintf(out,"\n%d. %ld--%ld \t: %lf ",i,ARETES[2*i-1],ARETES[2*i-2],LONGUEUR[i-1]);
			}
			else{
				printf("\n%d. %ld--%ld \t: %lf ",i,ARETES[2*i-1],ARETES[2*i-2],LONGUEUR[i-1]);
			}
		}
		else{
			if(ARETES[2*i-1] <= size){
				if(fichier==1){
					fprintf(out,"\n%d. %ld--%s",i,ARETES[2*i-2],NAMES[ARETES[2*i-1]]);
					for(j=0;j<longChaine - (int)strlen(NAMES[ARETES[2*i-1]]);j++) fprintf(out," ");
					fprintf(out,"\t%lf",LONGUEUR[i-1]);
				}
				else{
					printf("\n%d. %ld--%s",i,ARETES[2*i-2],NAMES[ARETES[2*i-1]]);
					for(j=0;j<longChaine - (int)strlen(NAMES[ARETES[2*i-1]]);j++) printf(" ");
					printf("\t%lf",LONGUEUR[i-1]);
				}
			}
			else if(ARETES[2*i-2] <= size){
				if (fichier==1){
					fprintf(out,"\n%d. %ld--%s",i,ARETES[2*i-1],NAMES[ARETES[2*i-2]]);
					for(j=0;j<longChaine - (int)strlen(NAMES[ARETES[2*i-2]]);j++) fprintf(out," ");
					fprintf(out,"\t%lf",LONGUEUR[i-1]);
				}
				else{
					printf("\n%d. %ld--%s",i,ARETES[2*i-1],NAMES[ARETES[2*i-2]]);
					for(j=0;j<longChaine - (int)strlen(NAMES[ARETES[2*i-2]]);j++) printf(" ");
					printf("\t%lf",LONGUEUR[i-1]);
				}
			}
			else{
				if(fichier==1){
					fprintf(out,"\n%d. %ld--%ld",i,ARETES[2*i-1],ARETES[2*i-2]);
					for(j=0;j<longChaine - 2;j++) fprintf(out," ");
					fprintf(out,"\t%lf",LONGUEUR[i-1]);
				}
				else{
					printf("\n%d. %ld--%ld",i,ARETES[2*i-1],ARETES[2*i-2]);
					for(j=0;j<longChaine - 2;j++) printf(" ");
					printf("\t%lf",LONGUEUR[i-1]);
				}
			}
		}

	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x1, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jg 0x2ca4
movq -0x28(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1050
cmpl -0x40(%rbp), %eax
jle 0x2c97
movq -0x28(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1050
movl %eax, -0x40(%rbp)
jmp 0x2c99
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x2c65
cmpq $0x0, -0x8(%rbp)
jne 0x2cb2
movl $0x0, -0x38(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl -0x2c(%rbp), %ecx
shll %ecx
subl $0x3, %ecx
subl 0x20(%rbp), %ecx
cmpl %ecx, %eax
jg 0x3223
cmpl $0x0, -0xc(%rbp)
jne 0x2d7c
cmpl $0x1, -0x38(%rbp)
jne 0x2d2e
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %esi
shll %esi
subl $0x2, %esi
movslq %esi, %rsi
movq (%rax,%rsi,8), %r8
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %esi
subl $0x1, %esi
movslq %esi, %rsi
movsd (%rax,%rsi,8), %xmm0
leaq 0x226d2(%rip), %rsi     # 0x253f7
movb $0x1, %al
callq 0x1140
jmp 0x2d77
movl -0x30(%rbp), %esi
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %edi
subl $0x1, %edi
movslq %edi, %rdi
movsd (%rax,%rdi,8), %xmm0
leaq 0x22687(%rip), %rdi     # 0x253f7
movb $0x1, %al
callq 0x1030
jmp 0x3213
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
cmpq %rcx, %rax
jg 0x2f33
cmpl $0x1, -0x38(%rbp)
jne 0x2e74
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rsi
movl -0x30(%rbp), %r8d
shll %r8d
subl $0x1, %r8d
movslq %r8d, %r8
movq (%rsi,%r8,8), %rsi
movq (%rax,%rsi,8), %r8
leaq 0x22628(%rip), %rsi     # 0x2540d
movb $0x0, %al
callq 0x1140
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x30(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1050
movl -0x48(%rbp), %ecx
movq %rax, %rdx
movl -0x44(%rbp), %eax
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x2e4b
movq -0x8(%rbp), %rdi
leaq 0x225a3(%rip), %rsi     # 0x253dc
movb $0x0, %al
callq 0x1140
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2df3
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x225b2(%rip), %rsi     # 0x2541a
movb $0x1, %al
callq 0x1140
jmp 0x2f2e
movl -0x30(%rbp), %esi
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x30(%rbp), %edi
shll %edi
subl $0x1, %edi
movslq %edi, %rdi
movq (%rcx,%rdi,8), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x22561(%rip), %rdi     # 0x2540d
movb $0x0, %al
callq 0x1030
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x30(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1050
movl -0x50(%rbp), %ecx
movq %rax, %rdx
movl -0x4c(%rbp), %eax
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x2f0e
leaq 0x224e0(%rip), %rdi     # 0x253dc
movb $0x0, %al
callq 0x1030
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2eba
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x224f3(%rip), %rdi     # 0x2541a
movb $0x1, %al
callq 0x1030
jmp 0x3211
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
cmpq %rcx, %rax
jg 0x30ea
cmpl $0x1, -0x38(%rbp)
jne 0x302b
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rsi
movl -0x30(%rbp), %r8d
shll %r8d
subl $0x2, %r8d
movslq %r8d, %r8
movq (%rsi,%r8,8), %rsi
movq (%rax,%rsi,8), %r8
leaq 0x22471(%rip), %rsi     # 0x2540d
movb $0x0, %al
callq 0x1140
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x30(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1050
movl -0x58(%rbp), %ecx
movq %rax, %rdx
movl -0x54(%rbp), %eax
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x3002
movq -0x8(%rbp), %rdi
leaq 0x223ec(%rip), %rsi     # 0x253dc
movb $0x0, %al
callq 0x1140
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2faa
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x223fb(%rip), %rsi     # 0x2541a
movb $0x1, %al
callq 0x1140
jmp 0x30e5
movl -0x30(%rbp), %esi
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x30(%rbp), %edi
shll %edi
subl $0x2, %edi
movslq %edi, %rdi
movq (%rcx,%rdi,8), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x223aa(%rip), %rdi     # 0x2540d
movb $0x0, %al
callq 0x1030
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x30(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1050
movl -0x60(%rbp), %ecx
movq %rax, %rdx
movl -0x5c(%rbp), %eax
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x30c5
leaq 0x22329(%rip), %rdi     # 0x253dc
movb $0x0, %al
callq 0x1030
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3071
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x2233c(%rip), %rdi     # 0x2541a
movb $0x1, %al
callq 0x1030
jmp 0x320f
cmpl $0x1, -0x38(%rbp)
jne 0x3189
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %esi
shll %esi
subl $0x2, %esi
movslq %esi, %rsi
movq (%rax,%rsi,8), %r8
leaq 0x222f7(%rip), %rsi     # 0x2541f
movb $0x0, %al
callq 0x1140
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl -0x40(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x3160
movq -0x8(%rbp), %rdi
leaq 0x2228e(%rip), %rsi     # 0x253dc
movb $0x0, %al
callq 0x1140
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3136
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x2229d(%rip), %rsi     # 0x2541a
movb $0x1, %al
callq 0x1140
jmp 0x320d
movl -0x30(%rbp), %esi
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x22266(%rip), %rdi     # 0x2541f
movb $0x0, %al
callq 0x1030
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl -0x40(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x31ed
leaq 0x22201(%rip), %rdi     # 0x253dc
movb $0x0, %al
callq 0x1030
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x31c7
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x22214(%rip), %rdi     # 0x2541a
movb $0x1, %al
callq 0x1030
jmp 0x320f
jmp 0x3211
jmp 0x3213
jmp 0x3215
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x2cb9
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)