// File: dcarrey[P]hgt-detection/./fonctions.cpp
// Function: ReduceTree(InputTree, InputTree, InputTree*, InputTree*, ReduceTrace*, DescTree*, DescTree*, int, int)
void ReduceTree(struct InputTree SpeciesTree,struct InputTree GeneTree,struct InputTree *SpeciesTreeRed,struct InputTree *GeneTreeRed,struct ReduceTrace *aTrace,struct DescTree *DTSpecies,struct DescTree *DTGene,int binaireSpecies,int binaireGene){


	int i,j,l=1,tmp,pos; //k;
	struct CRITERIA aCrit;

	InitCriteria(&aCrit,SpeciesTree.size);

	aTrace->species  = (int *)malloc((2*SpeciesTree.size)*sizeof(int));
	aTrace->gene     = (int *)malloc((2*SpeciesTree.size)*sizeof(int));
	aTrace->map		 = (int *)malloc((2*SpeciesTree.size)*sizeof(int));
	//aTrace->speciesToGene = (int *)malloc((2*SpeciesTree.size-1)*sizeof(int));
	aTrace->size = 0;

	for(i=0;i<2*SpeciesTree.size;i++){
		aTrace->species[i] = 0;
		aTrace->gene[i] = 0;
	}
	
	for(i=1;i<2*(SpeciesTree.size)-2-SpeciesTree.kt;i++)
		for(j=1;j<2*(GeneTree.size)-2;j++){
		
			if(DTSpecies[i].nbSommet == DTGene[j].nbSommet && DTSpecies[i].nbSommet > 1 && i!= SpeciesTree.size && j!= GeneTree.size){
				if(vecteursEgaux(DTSpecies[i],DTGene[j]) == 1){
				
						computeCriteria(DTSpecies[i].Matrice,DTGene[j].Matrice,DTSpecies[i].nbSommet+1,&aCrit,NULL,NULL,NULL,NULL);
						if(aCrit.RF == 0){
							aTrace->species[i] = 1;
							aTrace->gene[j] = 1;
						}
				}
			}
			if(DTSpecies[i].nbSommet == 1 ){
				aTrace->species[i] = 1;
				aTrace->gene[i] =1;
				//aTrace->speciesToGene[i] = i;
			}
		}

		
		//== ici on test les sous-ensembles 2 par 2, si un est le sous-ensemble de l'autre, il n'est pas necessaire de consid�rer
		//== ce dernier.
		for(i=1;i<=2*SpeciesTree.size-2-SpeciesTree.kt;i++){
			for(j=1;j<=2*SpeciesTree.size-2-SpeciesTree.kt;j++){
				if(aTrace->species[i] != 0 && aTrace->species[j] != 0 && i!=j && i!=SpeciesTree.Root && j!=SpeciesTree.Root)
					if(DTSpecies[i].nbSommet > DTSpecies[j].nbSommet && isInside(DTSpecies[i],DTSpecies[j])==1){
						aTrace->species[j] = 0;
					}
			}
		}



		//== creer les matrices de distances
		tmp=0;
		pos=0;
		for(i=1;i<=2*SpeciesTree.size-2-SpeciesTree.kt;i++){
			if(aTrace->species[i] != 0){
				pos++;
				aTrace->map[pos] = i; //DTSpecies[i].Tableau[1];
	//			printf("<br> %d-%d",pos,i);
			}
		}
	/*	printf("\n");
		for(i=1;i<=pos;i++){
			printf("\n%d-->%d (%d)",i,aTrace->map[i],DTSpecies[aTrace->map[i]].Tableau[1]);
		}*/

		pos++; //= racine
		if(SpeciesTreeRed->ADD == NULL){
			SpeciesTreeRed->ADD = (double**)malloc((2*pos-1)*sizeof(double*));
			GeneTreeRed->ADD = (double**)malloc((2*pos-1)*sizeof(double*));
			SpeciesTreeRed->W = (double**)malloc((2*pos-1)*sizeof(double*));
			GeneTreeRed->W = (double**)malloc((2*pos-1)*sizeof(double*));
			for(i=0;i<2*pos-1;i++){
				SpeciesTreeRed->W[i] = (double*)malloc((2*pos-1)*sizeof(double));
				GeneTreeRed->W[i] = (double*)malloc((2*pos-1)*sizeof(double));
			}
			for(i=0;i<2*pos-1;i++){
				SpeciesTreeRed->ADD[i] = (double*)malloc((2*pos-1)*sizeof(double));
				GeneTreeRed->ADD[i] = (double*)malloc((2*pos-1)*sizeof(double));
			}
		}
		for(i=1;i<pos;i++)
			if(aTrace->map[i] != SpeciesTree.Root){
				for(j=1;j<pos;j++){
					if(aTrace->map[i] != SpeciesTree.Root){
						SpeciesTreeRed->ADD[i][j] = SpeciesTree.ADD[DTSpecies[aTrace->map[i]].Tableau[1]][DTSpecies[aTrace->map[j]].Tableau[1]];
						GeneTreeRed->ADD[i][j] = GeneTree.ADD[DTSpecies[aTrace->map[i]].Tableau[1]][DTSpecies[aTrace->map[j]].Tableau[1]];
					}
				}
			}
		
		aTrace->species[SpeciesTree.Root] = 1;
		aTrace->map[pos] = SpeciesTree.Root;
		for(i=1;i<pos;i++){
			SpeciesTreeRed->ADD[i][pos] = SpeciesTreeRed->ADD[pos][i] = SpeciesTree.ADD[aTrace->map[pos]][DTSpecies[aTrace->map[i]].Tableau[1]];
			GeneTreeRed->ADD[i][pos] = GeneTreeRed->ADD[pos][i] = GeneTree.ADD[aTrace->map[pos]][DTSpecies[aTrace->map[i]].Tableau[1]];
		}
		
		SpeciesTreeRed->size = GeneTreeRed->size = pos;
		SpeciesTreeRed->Root = GeneTreeRed->Root = pos;
		
		CreateSubStructures(SpeciesTreeRed,0,binaireSpecies);
		CreateSubStructures(GeneTreeRed,0,binaireGene);

		FreeCriteria(&aCrit,SpeciesTree.size);
	//	printf("\n");
	//	printMatrix(SpeciesTree.SpeciesName,SpeciesTreeRed->ADD,SpeciesTreeRed->size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl 0xc0(%rbp), %eax
leaq 0x68(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x1, -0x38(%rbp)
movl (%rax), %esi
leaq -0xa0(%rbp), %rdi
callq 0x14520
movq -0x108(%rbp), %rax
movl (%rax), %eax
shll %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x108(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rdx, 0x8(%rcx)
movl (%rax), %eax
shll %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x108(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rdx, 0x10(%rcx)
movl (%rax), %eax
shll %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x30(%rbp)
movq -0x108(%rbp), %rcx
movl -0x30(%rbp), %eax
movl (%rcx), %ecx
shll %ecx
cmpl %ecx, %eax
jge 0x1833e
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x30(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x182fb
movl $0x1, -0x30(%rbp)
movq -0x108(%rbp), %rdx
movl -0x30(%rbp), %eax
movl (%rdx), %ecx
shll %ecx
subl $0x2, %ecx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jge 0x1857b
movl $0x1, -0x34(%rbp)
movq -0x110(%rbp), %rcx
movl -0x34(%rbp), %eax
movl (%rcx), %ecx
shll %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x1856b
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x28(%rbp), %rcx
movslq -0x34(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x18521
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jle 0x18521
movq -0x108(%rbp), %rcx
movl -0x30(%rbp), %eax
cmpl (%rcx), %eax
je 0x18521
movq -0x110(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl (%rcx), %eax
je 0x18521
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xb8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xb0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xc0(%rbp)
leaq -0xb8(%rbp), %rcx
leaq -0xd0(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x27d0
cmpl $0x1, %eax
jne 0x1851f
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edx
addl $0x1, %edx
leaq -0xa0(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0xea10
cmpl $0x0, -0x70(%rbp)
jne 0x1851d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x34(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x1851f
jmp 0x18521
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x1855b
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x30(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x1855d
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x18368
jmp 0x1856d
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x18345
movl $0x1, -0x30(%rbp)
movq -0x108(%rbp), %rdx
movl -0x30(%rbp), %eax
movl (%rdx), %ecx
shll %ecx
subl $0x2, %ecx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jg 0x18725
movl $0x1, -0x34(%rbp)
movq -0x108(%rbp), %rdx
movl -0x34(%rbp), %eax
movl (%rdx), %ecx
shll %ecx
subl $0x2, %ecx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jg 0x18715
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x18705
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x34(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x18705
movl -0x30(%rbp), %eax
cmpl -0x34(%rbp), %eax
je 0x18705
movq -0x108(%rbp), %rcx
movl -0x30(%rbp), %eax
cmpl 0x20(%rcx), %eax
je 0x18705
movq -0x108(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0x20(%rcx), %eax
je 0x18705
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
movslq -0x34(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jle 0x18703
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xe8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xe0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x100(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xf8(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xf0(%rbp)
leaq -0xe8(%rbp), %rcx
leaq -0x100(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x17f90
cmpl $0x1, %eax
jne 0x18703
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x34(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0x18705
jmp 0x18707
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x185a5
jmp 0x18717
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x18582
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x1, -0x30(%rbp)
movq -0x108(%rbp), %rdx
movl -0x30(%rbp), %eax
movl (%rdx), %ecx
shll %ecx
subl $0x2, %ecx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jg 0x1878c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x1877f
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x30(%rbp), %edx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x40(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x18781
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1873a
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x18900
movl -0x40(%rbp), %eax
shll %eax
subl $0x1, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x40(%rbp), %eax
shll %eax
subl $0x1, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x40(%rbp), %eax
shll %eax
subl $0x1, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movl -0x40(%rbp), %eax
shll %eax
subl $0x1, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl -0x40(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1888f
movl -0x40(%rbp), %eax
shll %eax
subl $0x1, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
shll %eax
subl $0x1, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x18827
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl -0x40(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x188fe
movl -0x40(%rbp), %eax
shll %eax
subl $0x1, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
shll %eax
subl $0x1, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x18896
jmp 0x18900
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x18a6c
movq -0x108(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x30(%rbp), %rdx
movl (%rax,%rdx,4), %eax
cmpl 0x20(%rcx), %eax
je 0x18a5c
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x18a5a
movq -0x108(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x30(%rbp), %rdx
movl (%rax,%rdx,4), %eax
cmpl 0x20(%rcx), %eax
je 0x18a4a
movq -0x110(%rbp), %rax
movq -0x108(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rsi
movq 0x18(%rsi), %rsi
movslq -0x30(%rbp), %rdi
movslq (%rsi,%rdi,4), %rsi
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
movq 0x10(%rdx), %rdx
movslq 0x4(%rdx), %rdx
movq (%rcx,%rdx,8), %rcx
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rsi
movq 0x18(%rsi), %rsi
movslq -0x34(%rbp), %rdi
movslq (%rsi,%rdi,4), %rsi
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
movq 0x10(%rdx), %rdx
movslq 0x4(%rdx), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x34(%rbp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq 0x18(%rdx), %rdx
movslq -0x30(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
movslq 0x4(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq 0x18(%rdx), %rdx
movslq -0x34(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x18a4c
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x18939
jmp 0x18a5c
jmp 0x18a5e
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x18907
movq -0x108(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq 0x20(%rax), %rdx
movl $0x1, (%rcx,%rdx,4)
movl 0x20(%rax), %edx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x40(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x18bab
movq -0x110(%rbp), %rax
movq -0x108(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq 0x18(%rdx), %rdx
movslq -0x40(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
movq (%rcx,%rdx,8), %rcx
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rsi
movq 0x18(%rsi), %rsi
movslq -0x30(%rbp), %rdi
movslq (%rsi,%rdi,4), %rsi
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
movq 0x10(%rdx), %rdx
movslq 0x4(%rdx), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x40(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x30(%rbp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x40(%rbp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x40(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq 0x18(%rdx), %rdx
movslq -0x30(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x18a9f
movl -0x40(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x40(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %edx
xorl %esi, %esi
callq 0x18000
movq -0x10(%rbp), %rdi
movl 0xc0(%rbp), %edx
xorl %esi, %esi
callq 0x18000
movq -0x108(%rbp), %rax
movl (%rax), %esi
leaq -0xa0(%rbp), %rdi
callq 0x14650
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopl (%rax,%rax)