// File: /workspace/github_cpp_makefile_star2_O3/dcarrey[P]hgt-detection/./utils_tree.cpp
// Function: TrierMatrices(double**, char**, char**, int)
void TrierMatrices(double **DISS,char **NomsDISS,char **NomsADD,int n)
{
	int trouve, ligne,colonne,i,j;
	double ** DISS_;
	char   ** NomsDISS_;
	char noms[50];
	int * table;
	

	table = (int *) malloc((n+1)*sizeof(int));
	DISS_ = (double **) malloc((n+1)*sizeof(double*));
	NomsDISS_ = (char **) malloc((n+1)*sizeof(char*));

	for (i=0;i<=n;i++)
	{
		DISS_[i]=(double*)malloc((n+1)*sizeof(double));
		NomsDISS_[i] = (char*) malloc((n+1)*sizeof(15));
	}

	for(ligne = 1;ligne<=n;ligne++)
	{
		strcpy(noms,NomsADD[ligne]);
		trouve = 0;
		for(colonne = 1;colonne<=n;colonne++)
		{
			if(strcmp(noms,NomsDISS[colonne])==0)
			{
				trouve = 1;
				table[ligne] = colonne;
				strcpy(NomsDISS_[ligne],noms);
			}
		}
		if(trouve==0)
		{
			printf("\n%s %s",noms,"is not in the gene matrix.This program must stop");
			exit (-1);	
		}
	}

	for(i=1;i<=n;i++)
		for(j=1;j<=i;j++) DISS_[i][j] = DISS_[j][i] = DISS[table[i]][table[j]];

	for(i=1;i<=n;i++)
	{
		strcpy(NomsDISS[i],NomsDISS_[i]);
		for(j=1;j<=n;j++) DISS[i][j] = DISS_[i][j];
	}
//exit(0);
	for (i=0;i<=n;i++)
	{
		free(DISS_[i]);
		free(NomsDISS_[i]);
	}

	free(DISS_);
    free(NomsDISS_);
	free(table);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %ebx
movq %rdx, -0x68(%rbp)
movq %rsi, %r13
movq %rdi, -0x58(%rbp)
leal 0x1(%rbx), %eax
movl %eax, -0x30(%rbp)
movslq %eax, %r12
leaq (,%r12,4), %rdi
movq %rdi, -0x40(%rbp)
callq 0x1140
movq %rax, %r14
shlq $0x3, %r12
movq %r12, %rdi
callq 0x1140
movq %rax, %r15
movq %r12, -0x50(%rbp)
movq %r12, %rdi
callq 0x1140
movq %rax, %r12
movq %rbx, -0x38(%rbp)
testl %ebx, %ebx
js 0x681e
movl -0x30(%rbp), %ecx
xorl %ebx, %ebx
movq %r12, -0x48(%rbp)
movq -0x40(%rbp), %r12
movq %rcx, -0x30(%rbp)
movq -0x50(%rbp), %rdi
callq 0x1140
movq %rax, (%r15,%rbx,8)
movq %r12, %rdi
callq 0x1140
movq -0x30(%rbp), %rcx
movq -0x48(%rbp), %rdx
movq %rax, (%rdx,%rbx,8)
incq %rbx
cmpq %rbx, %rcx
jne 0x668d
cmpl $0x0, -0x38(%rbp)
movq -0x48(%rbp), %r12
je 0x67fb
movq %r15, -0x60(%rbp)
movq %r14, -0x40(%rbp)
movq %rcx, %r15
negq %r15
movl $0x1, %ebx
leaq -0xa0(%rbp), %r12
movq -0x68(%rbp), %rax
movq (%rax,%rbx,8), %rsi
movq %r12, %rdi
callq 0x1090
movb $0x1, %cl
movl $0x1, %r14d
movl %ecx, -0x50(%rbp)
incq %r14
movq -0x8(%r13,%r14,8), %rsi
movq %r12, %rdi
callq 0x1170
testl %eax, %eax
je 0x671f
leaq (%r15,%r14), %rax
incq %rax
incq %r14
cmpq $0x1, %rax
jne 0x66fc
jmp 0x6746
leal -0x1(%r14), %eax
movq -0x40(%rbp), %rcx
movl %eax, (%rcx,%rbx,4)
movq -0x48(%rbp), %rax
movq (%rax,%rbx,8), %rdi
movq %r12, %rsi
callq 0x1090
xorl %ecx, %ecx
movq %r15, %rax
addq %r14, %rax
jne 0x66f6
jmp 0x6750
testb $0x1, -0x50(%rbp)
jne 0x6845
incq %rbx
movq -0x30(%rbp), %r9
cmpq %r9, %rbx
jne 0x66de
cmpl $0x0, -0x38(%rbp)
movq -0x40(%rbp), %r14
movq -0x60(%rbp), %r15
movq -0x48(%rbp), %r12
je 0x67fb
movl $0x1, %eax
movq -0x58(%rbp), %r8
movslq (%r14,%rax,4), %rcx
movq (%r8,%rcx,8), %rcx
movq (%r15,%rax,8), %rdx
xorl %esi, %esi
movslq 0x4(%r14,%rsi,4), %rdi
movsd (%rcx,%rdi,8), %xmm0
movq 0x8(%r15,%rsi,8), %rdi
movsd %xmm0, (%rdi,%rax,8)
movsd %xmm0, 0x8(%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x6789
incq %rax
cmpq %r9, %rax
jne 0x677b
cmpl $0x0, -0x38(%rbp)
je 0x67fb
movl $0x1, %ebx
movq (%r13,%rbx,8), %rdi
movq (%r12,%rbx,8), %rsi
callq 0x1090
movq -0x30(%rbp), %rsi
movq (%r15,%rbx,8), %rax
movq -0x58(%rbp), %rcx
movq (%rcx,%rbx,8), %rcx
movl $0x1, %edx
movsd (%rax,%rdx,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rsi
jne 0x67e1
incq %rbx
cmpq %rsi, %rbx
jne 0x67be
cmpl $0x0, -0x38(%rbp)
js 0x681e
xorl %ebx, %ebx
movq (%r15,%rbx,8), %rdi
callq 0x1100
movq (%r12,%rbx,8), %rdi
callq 0x1100
incq %rbx
cmpq %rbx, -0x30(%rbp)
jne 0x6803
movq %r15, %rdi
callq 0x1100
movq %r12, %rdi
callq 0x1100
movq %r14, %rdi
callq 0x1100
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xef85(%rip), %rdi      # 0x157d1
leaq 0xef85(%rip), %rdx      # 0x157d8
leaq -0xa0(%rbp), %rsi
xorl %eax, %eax
callq 0x1030
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110