// File: dcarrey[P]hgt-detection/./utils_tree.cpp
// Function: CalculerBootARETE(int*, double**, double**, int)
void CalculerBootARETE(int *BSARETE,double **DISTG,double **DISS,int n){

	int m,mI,i,j,val;
	int **B=(int **) malloc((2*n-1)*sizeof(int*));
	int **BI=(int **) malloc((2*n-1)*sizeof(int*));
	int *PLACE=(int *) malloc((2*n-2)*sizeof(int));
	int *PLACEI=(int *) malloc((2*n-2)*sizeof(int));

	for (i=0;i<=2*n-2;i++){
		B[i]=(int *) malloc((2*n-2)*sizeof(int));
		BI[i]=(int *) malloc((2*n-2)*sizeof(int));
	}

	//TrierMatrices(DISS,NomsGene,NomsG,n);

	m=Bipartition_Table(DISTG,B,PLACE,n);
	mI=Bipartition_Table(DISS,BI,PLACEI,n);

	for(i=1;i<=2*n-3;i++){
		for(j=1;j<=2*n-3;j++){
			val = 0;
			val = compare(B[i],BI[j],n);

			if(val == n){
				BSARETE[i] = BSARETE[i] + 1;
			}	
		}
	}

	/*	printf("\n");
	for(i=1;i<=2*n-3;i++){
	printf("\n%d :",i );
	for(j=1;j<=n;j++){
	printf("%d",B[i][j]);		
	}
	}*/
	for(i=0;i<=2*n-2;i++){
		free(B[i]); free(BI[i]);
	}
	free(B);free(BI);free(PLACE);free(PLACEI);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
subl $0x1, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
subl $0x1, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, -0x40(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
subl $0x2, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, -0x48(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
subl $0x2, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, -0x50(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0x1c(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jg 0xb0fe
movl -0x1c(%rbp), %eax
shll %eax
subl $0x2, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x38(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
shll %eax
subl $0x2, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xb09e
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x40a0
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x40a0
movl %eax, -0x24(%rbp)
movl $0x1, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0x1c(%rbp), %ecx
shll %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jg 0xb1c0
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl -0x1c(%rbp), %ecx
shll %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jg 0xb1b0
movl $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x1c(%rbp), %edx
callq 0xaf50
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0xb1a3
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0xb1a5
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xb149
jmp 0xb1b2
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xb133
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0x1c(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jg 0xb203
movq -0x38(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x10e0
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x10e0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xb1c7
movq -0x38(%rbp), %rdi
callq 0x10e0
movq -0x40(%rbp), %rdi
callq 0x10e0
movq -0x48(%rbp), %rdi
callq 0x10e0
movq -0x50(%rbp), %rdi
callq 0x10e0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)