// File: /workspace/github_cpp_makefile_star2_O1/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, -0x40(%rbp)
movq %rdx, -0x30(%rbp)
movl %esi, -0x34(%rbp)
movq %rdi, -0x48(%rbp)
testl %r9d, %r9d
jle 0x1f14
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 0x1efa
jmp 0x1f1a
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 0x2295
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, -0x30(%rbp)
shlq $0x4, %r12
movq -0x8(%r15,%r12), %rcx
testl %r13d, %r13d
je 0x1fe9
movq -0x10(%r15,%r12), %rax
cmpq %r14, %rcx
jle 0x2020
cmpq %r14, %rax
jle 0x2092
movq -0x48(%rbp), %r14
testq %r14, %r14
je 0x21af
movq %r14, %rdi
leaq 0x134a2(%rip), %rsi     # 0x1543f
movq -0x30(%rbp), %r12
movl %r12d, %edx
movq %rax, %r8
xorl %eax, %eax
callq 0x1180
cmpl $0x3, -0x58(%rbp)
jl 0x1fc8
movl -0x5c(%rbp), %ebx
movl $0x20, %edi
movq %r14, %rsi
callq 0x1130
decl %ebx
jne 0x1fb7
movq -0x40(%rbp), %rax
movsd -0x8(%rax,%r12,8), %xmm0
movq %r14, %rdi
leaq 0x1345d(%rip), %rsi     # 0x1543a
movb $0x1, %al
callq 0x1180
jmp 0x21fa
movq -0x10(%r15,%r12), %r8
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x2121
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %r12
movsd -0x8(%rax,%r12,8), %xmm0
leaq 0x13406(%rip), %rsi     # 0x15417
movl %r12d, %edx
movb $0x1, %al
callq 0x1180
jmp 0x2288
movq (%rbx,%rcx,8), %r8
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x214c
leaq 0x133f5(%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 0x20fb
xorl %ebx, %ebx
movl $0x20, %edi
movq -0x48(%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 0x2069
jmp 0x20fb
movq (%rbx,%rax,8), %r8
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x2203
leaq 0x13383(%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 0x20fb
xorl %ebx, %ebx
movl $0x20, %edi
movq -0x48(%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 0x20d4
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %r12
movsd -0x8(%rax,%r12,8), %xmm0
movq -0x48(%rbp), %rdi
leaq 0x13325(%rip), %rsi     # 0x1543a
movb $0x1, %al
callq 0x1180
jmp 0x227a
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %r12
movsd -0x8(%rax,%r12,8), %xmm0
leaq 0x132e0(%rip), %rdi     # 0x15417
movl %r12d, %esi
movq %rcx, %rdx
movq %r8, %rcx
movb $0x1, %al
callq 0x1030
jmp 0x2288
leaq 0x132da(%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 0x225d
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 0x2187
jmp 0x225d
leaq 0x13289(%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 0x21e1
movl -0x5c(%rbp), %ebx
movl $0x20, %edi
callq 0x1160
decl %ebx
jne 0x21d3
movq -0x40(%rbp), %rax
movsd -0x8(%rax,%r12,8), %xmm0
leaq 0x13247(%rip), %rdi     # 0x1543a
movb $0x1, %al
callq 0x1030
movq -0x68(%rbp), %rbx
jmp 0x2284
leaq 0x13223(%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 0x225d
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 0x223a
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %r12
movsd -0x8(%rax,%r12,8), %xmm0
leaq 0x131c7(%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 0x1f5d
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq