// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %r14d
movq %r8, -0x68(%rbp)
movq %rcx, -0x48(%rbp)
movq %rdx, -0x30(%rbp)
movl %esi, -0x34(%rbp)
movq %rdi, -0x40(%rbp)
testl %r9d, %r9d
jle 0x1e93
leal 0x1(%r14), %r13d
xorl %ebx, %ebx
movl $0x1, %r12d
movq -0x68(%rbp), %r15
movq (%r15,%r12,8), %rdi
callq 0x1050
cmpl %eax, %ebx
cmovgl %ebx, %eax
incq %r12
movl %eax, %ebx
cmpq %r12, %r13
jne 0x1e79
jmp 0x1e99
xorl %eax, %eax
movq -0x68(%rbp), %r15
leal (%r14,%r14), %ecx
subl 0x20(%rbp), %ecx
movq %rcx, -0x70(%rbp)
addl $-0x3, %ecx
testl %ecx, %ecx
movq %r15, %rbx
movq -0x30(%rbp), %r15
movl -0x34(%rbp), %r13d
jle 0x2206
movslq %r14d, %r14
leal -0x2(%rax), %ecx
movl %ecx, -0x5c(%rbp)
movq -0x70(%rbp), %rcx
addl $-0x2, %ecx
movq %rcx, -0x70(%rbp)
movl $0x1, %r12d
movq %rax, -0x58(%rbp)
movq %r14, -0x50(%rbp)
movq %r12, %rdx
shlq $0x4, %r12
movq -0x8(%r15,%r12), %rcx
testl %r13d, %r13d
je 0x1f6b
movq %rdx, -0x30(%rbp)
movq -0x10(%r15,%r12), %rax
cmpq %r14, %rcx
jle 0x1fa0
cmpq %r14, %rax
jle 0x2012
movq -0x40(%rbp), %r14
testq %r14, %r14
je 0x2120
movq %r14, %rdi
leaq 0x13520(%rip), %rsi     # 0x1543f
movq -0x30(%rbp), %r12
movl %r12d, %edx
movq %rax, %r8
xorl %eax, %eax
callq 0x1180
cmpl $0x3, -0x58(%rbp)
jl 0x1f4a
movl -0x5c(%rbp), %ebx
movl $0x20, %edi
movq %r14, %rsi
callq 0x1130
decl %ebx
jne 0x1f39
movq -0x48(%rbp), %rax
movsd -0x8(%rax,%r12,8), %xmm0
movq %r14, %rdi
leaq 0x134db(%rip), %rsi     # 0x1543a
movb $0x1, %al
callq 0x1180
jmp 0x216b
movq -0x10(%r15,%r12), %r8
movq -0x48(%rbp), %rax
movsd -0x8(%rax,%rdx,8), %xmm0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
movq %rdx, %r12
je 0x20a1
leaq 0x13486(%rip), %rsi     # 0x15417
movl %r12d, %edx
movb $0x1, %al
callq 0x1180
jmp 0x21f9
movq (%rbx,%rcx,8), %r8
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x20bd
leaq 0x13475(%rip), %rsi     # 0x1542d
movq -0x30(%rbp), %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1180
movq -0x8(%r15,%r12), %rax
movq (%rbx,%rax,8), %rdi
callq 0x1050
movq -0x58(%rbp), %r14
cmpl %eax, %r14d
movq %r15, %r13
movq %rbx, %r15
jle 0x207b
xorl %ebx, %ebx
movl $0x20, %edi
movq -0x40(%rbp), %rsi
callq 0x1130
incl %ebx
movq -0x8(%r13,%r12), %rax
movq (%r15,%rax,8), %rdi
callq 0x1050
movl %r14d, %ecx
subl %eax, %ecx
cmpl %ecx, %ebx
jl 0x1fe9
jmp 0x207b
movq (%rbx,%rax,8), %r8
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x2174
leaq 0x13403(%rip), %rsi     # 0x1542d
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x1180
movq -0x10(%r15,%r12), %rax
movq (%rbx,%rax,8), %rdi
callq 0x1050
movq -0x58(%rbp), %r14
cmpl %eax, %r14d
movq %r15, %r13
movq %rbx, %r15
jle 0x207b
xorl %ebx, %ebx
movl $0x20, %edi
movq -0x40(%rbp), %rsi
callq 0x1130
incl %ebx
movq -0x10(%r13,%r12), %rax
movq (%r15,%rax,8), %rdi
callq 0x1050
movl %r14d, %ecx
subl %eax, %ecx
cmpl %ecx, %ebx
jl 0x2054
movq -0x48(%rbp), %rax
movq -0x30(%rbp), %r12
movsd -0x8(%rax,%r12,8), %xmm0
movq -0x40(%rbp), %rdi
leaq 0x133a5(%rip), %rsi     # 0x1543a
movb $0x1, %al
callq 0x1180
jmp 0x21eb
leaq 0x1336f(%rip), %rdi     # 0x15417
movl %r12d, %esi
movq %rcx, %rdx
movq %r8, %rcx
movb $0x1, %al
callq 0x1030
jmp 0x21f9
leaq 0x13369(%rip), %rdi     # 0x1542d
movq -0x30(%rbp), %rsi
movq %rax, %rdx
movq %r8, %rcx
xorl %eax, %eax
callq 0x1030
movq -0x8(%r15,%r12), %rax
movq (%rbx,%rax,8), %rdi
callq 0x1050
movq -0x58(%rbp), %r14
cmpl %eax, %r14d
movq %r15, %r13
movq %rbx, %r15
jle 0x21ce
xorl %ebx, %ebx
movl $0x20, %edi
callq 0x1160
incl %ebx
movq -0x8(%r13,%r12), %rax
movq (%r15,%rax,8), %rdi
callq 0x1050
movl %r14d, %ecx
subl %eax, %ecx
cmpl %ecx, %ebx
jl 0x20f8
jmp 0x21ce
leaq 0x13318(%rip), %rdi     # 0x1543f
movq -0x30(%rbp), %r12
movl %r12d, %esi
movq %rcx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1030
cmpl $0x3, -0x58(%rbp)
jl 0x2152
movl -0x5c(%rbp), %ebx
movl $0x20, %edi
callq 0x1160
decl %ebx
jne 0x2144
movq -0x48(%rbp), %rax
movsd -0x8(%rax,%r12,8), %xmm0
leaq 0x132d6(%rip), %rdi     # 0x1543a
movb $0x1, %al
callq 0x1030
movq -0x68(%rbp), %rbx
jmp 0x21f5
leaq 0x132b2(%rip), %rdi     # 0x1542d
movq -0x30(%rbp), %rsi
movq %rcx, %rdx
movq %r8, %rcx
xorl %eax, %eax
callq 0x1030
movq -0x10(%r15,%r12), %rax
movq (%rbx,%rax,8), %rdi
callq 0x1050
movq -0x58(%rbp), %r14
cmpl %eax, %r14d
movq %r15, %r13
movq %rbx, %r15
jle 0x21ce
xorl %ebx, %ebx
movl $0x20, %edi
callq 0x1160
incl %ebx
movq -0x10(%r13,%r12), %rax
movq (%r15,%rax,8), %rdi
callq 0x1050
movl %r14d, %ecx
subl %eax, %ecx
cmpl %ecx, %ebx
jl 0x21ab
movq -0x48(%rbp), %rax
movq -0x30(%rbp), %r12
movsd -0x8(%rax,%r12,8), %xmm0
leaq 0x13256(%rip), %rdi     # 0x1543a
movb $0x1, %al
callq 0x1030
movq %r15, %rbx
movq %r13, %r15
movl -0x34(%rbp), %r13d
movq -0x50(%rbp), %r14
incq %r12
cmpq -0x70(%rbp), %r12
jne 0x1edc
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq