// File: dcarrey[P]hgt-detection/./fonctions.cpp
// Function: applyHGT(double**, InputTree*, int, int)
void applyHGT(double**ref,struct InputTree * aTree,int i,int j){
	
	int nodeToDel,otherNode,neighbor1=0,neighbor2=0,p,q,branch1=0,branch2=0,newNode;
	int nouveauNoeud;
	double tailleBrancheSource,tailleTransfert;
	int Ssup,Sinf,Sdestination;
	int kt = aTree->kt;
	int iternumber=100;

	if(i==0 || j==0) { printf("\ntransfert impossible"); exit(-1);}
	double ** DIST = (double**)malloc(2*aTree->size*(sizeof(double*)));
	for(p=0;p<2*aTree->size;p++)
		DIST[p] = (double *)malloc(2*aTree->size*(sizeof(double)));

  //= copie du contenue de ADD dans DIST
	for(p=1;p<=2*aTree->size-2-kt;p++)	
		for(q=1;q<=2*aTree->size-2-kt;q++)
			DIST[p][q] = aTree->ADD[p][q];
	
	//= recherche des sommets superieurs et inferieurs sources
	tailleBrancheSource = aTree->LONGUEUR[i];
	if ( aTree->ADD[aTree->ARETE[2*i-1]][aTree->Root] < aTree->ADD[aTree->ARETE[2*i-2]][aTree->Root]){
			Ssup = aTree->ARETE[2*i-1];
			Sinf = aTree->ARETE[2*i-2];
	}
	else{
			Ssup = aTree->ARETE[2*i-2];
			Sinf = aTree->ARETE[2*i-1];
	}
	
	//= recherche des sommets superieurs et inferieurs destinations
	if(aTree->ADD[aTree->ARETE[2*j-1]][aTree->Root] < aTree->ADD[aTree->ARETE[2*j-2]][aTree->Root])
	{nodeToDel = aTree->ARETE[2*j-1]; otherNode = Sdestination = aTree->ARETE[2*j-2];}
	else
	{nodeToDel = aTree->ARETE[2*j-2]; otherNode = Sdestination = aTree->ARETE[2*j-1];}

	//= cas d'un noeud binaire, on va deplacer le noeud superieur (nodeToDel)
	if(aTree->degre[nodeToDel] == 3){
		//== 1. recherche des voisins du noeud a supprimer
		for(p=1;p<=2*(aTree->size)-3-aTree->kt;p++){
			if(aTree->ARETE[2*p-1] == nodeToDel && aTree->ARETE[2*p-2] != otherNode){
				if(neighbor1==0){neighbor1 = aTree->ARETE[2*p-2]; branch1=p;}
				else {neighbor2 = aTree->ARETE[2*p-2]; branch2=p;}
			} 
			if(aTree->ARETE[2*p-2] == nodeToDel && aTree->ARETE[2*p-1] != otherNode){
				if(neighbor1==0){neighbor1 = aTree->ARETE[2*p-1]; branch1=p;}
				else {neighbor2 = aTree->ARETE[2*p-1]; branch2=p;}
			} 
		}
		if(aTree->LONGUEUR[i-1] <= 2*5*epsilon){
		//printf("icit");
			for(p=1;p<=2*aTree->size-2-aTree->kt;p++)
				for(q=p+1;q<=2*aTree->size-2-aTree->kt;q++){
					if((fabs(DIST[p][q] - DIST[p][aTree->ARETE[2*i-1]] - aTree->LONGUEUR[i-1] - DIST[aTree->ARETE[2*i-2]][q]) < 2*epsilon) ||
					   (fabs(DIST[p][q] - DIST[p][aTree->ARETE[2*i-2]] - aTree->LONGUEUR[i-1] - DIST[aTree->ARETE[2*i-1]][q]) < 2*epsilon) )
					{
					  if((DIST[p][aTree->ARETE[2*i-1]]+DIST[aTree->ARETE[2*i-2]][q]) <(DIST[p][aTree->ARETE[2*i-2]]+DIST[aTree->ARETE[2*i-1]][q])){ 
						  aTree->ADD[p][q] = aTree->ADD[q][p] = DIST[p][q] = DIST[q][p] = DIST[p][aTree->ARETE[2*i-1]]+DIST[aTree->ARETE[2*i-2]][q] + 2*5*epsilon;
						}
						else{
               aTree->ADD[p][q] = aTree->ADD[q][p] = DIST[p][q] = DIST[q][p] = DIST[p][aTree->ARETE[2*i-2]]+DIST[aTree->ARETE[2*i-1]][q] + 2*5*epsilon;
            }
					}
				}
		}
		
		//== 3. branch1 is used to connect the two neighbors
		aTree->ARETE[2*branch1-1] = neighbor1;
		aTree->ARETE[2*branch1-2] = neighbor2;
		aTree->LONGUEUR[branch1-1]= aTree->LONGUEUR[branch1-1] + aTree->LONGUEUR[branch2-1];

		//== 4. branch2 is used to connect one of the source node (i)
		aTree->ARETE[2*branch2-1] = aTree->ARETE[2*i-1];
		aTree->ARETE[2*branch2-2] = nodeToDel;
		aTree->LONGUEUR[branch2-1]= (aTree->LONGUEUR[i-1]/2.0 > 5*epsilon)?aTree->LONGUEUR[i-1]/2.0:5*epsilon;

		//== 5. branch i is used to connect the other source node (i)
		aTree->ARETE[2*i-1] = aTree->ARETE[2*i-2];
		aTree->ARETE[2*i-2] = nodeToDel;
		aTree->LONGUEUR[i-1]= (aTree->LONGUEUR[i-1]/2.0 > 5*epsilon)?aTree->LONGUEUR[i-1]/2.0:5*epsilon;
		nouveauNoeud = nodeToDel;

		for(p=1;p<=2*aTree->size-2-aTree->kt;p++){
			
			if (fabs(DIST[p][aTree->Root] - DIST[p][Sdestination] - DIST[Sdestination][aTree->Root]) < 3*epsilon	){
			 //printf("\n==%d,%d,%d",p,Sdestination,nodeToDel);
      	aTree->ADD[nodeToDel][p] = aTree->ADD[p][nodeToDel] = 1.0 + DIST[Sdestination][p];
			}
			else	{
			  if(DIST[p][Ssup] < DIST[p][Sinf]){
				  aTree->ADD[nodeToDel][p] = aTree->ADD[p][nodeToDel] = DIST[p][Ssup] + aTree->LONGUEUR[i-1];
				}
				else{
          aTree->ADD[nodeToDel][p] = aTree->ADD[p][nodeToDel] = DIST[p][Sinf] + aTree->LONGUEUR[i-1];
        }
			}
		}
		
		aTree->ADD[nodeToDel][nodeToDel] = 0.0;
		tailleBrancheSource = aTree->LONGUEUR[i-1];
		tailleTransfert = 1.0; 
		aTree->LONGUEUR[j-1]=1.0;
		nouveauNoeud=nodeToDel;
	}
	//= noeud de degre > a 3
	else{
		if(aTree->LONGUEUR[i-1] <= 2*5*epsilon){
			for(p=1;p<=2*aTree->size-2-aTree->kt;p++)
				for(q=p+1;q<=2*aTree->size-2-aTree->kt;q++){
					if((fabs(DIST[p][q] - DIST[p][aTree->ARETE[2*i-1]] - aTree->LONGUEUR[i-1] - DIST[aTree->ARETE[2*i-2]][q]) < 2*epsilon) ||
					   (fabs(DIST[p][q] - DIST[p][aTree->ARETE[2*i-2]] - aTree->LONGUEUR[i-1] - DIST[aTree->ARETE[2*i-1]][q]) < 2*epsilon) )
					{
					   if((DIST[p][aTree->ARETE[2*i-1]]+DIST[aTree->ARETE[2*i-2]][q]) < (DIST[p][aTree->ARETE[2*i-2]]+DIST[aTree->ARETE[2*i-1]][q])){
						    aTree->ADD[p][q] = aTree->ADD[q][p] = DIST[p][q] = DIST[q][p] = DIST[p][aTree->ARETE[2*i-1]]+DIST[aTree->ARETE[2*i-2]][q] + 2*5*epsilon;
						 }
						 else{
                aTree->ADD[p][q] = aTree->ADD[q][p] = DIST[p][q] = DIST[q][p] = DIST[p][aTree->ARETE[2*i-2]]+DIST[aTree->ARETE[2*i-1]][q] + 2*5*epsilon;
             }
					}
				}
		}
		
		//== 2. Ajouter un nouveau noeud sur la branche i (ajout d'une nouvelle arete)
		newNode = nouveauNoeud = 2*aTree->size-2-aTree->kt+1;

		double lt = (aTree->LONGUEUR[i-1]/2.0 >= 5*epsilon)?aTree->LONGUEUR[i-1]/2.0:5*epsilon;
		//== 4. connecter le nouveau noeud
		aTree->ARETE[2*j-1]=newNode;
		aTree->ARETE[2*j-2]=otherNode;
		aTree->LONGUEUR[j-1]= 1.0;

		//== 5. connecter la nouvelle arete
		aTree->ARETE[2*(2*aTree->size-3-aTree->kt+1)-1] = aTree->ARETE[2*i-1];
		aTree->ARETE[2*(2*aTree->size-3-aTree->kt+1)-2] = newNode;
		aTree->LONGUEUR[(2*aTree->size-3-aTree->kt+1)-1]= lt; //1.0;

		aTree->ARETE[2*i-1] = aTree->ARETE[2*i-2];
		aTree->ARETE[2*i-2] = newNode;
		aTree->LONGUEUR[i-1]= lt; //1.0;

		aTree->degre[newNode] = 3;
		aTree->degre[nodeToDel]--;
		aTree->kt--;
		
		for(p=1;p<=newNode;p++){
			if (fabs(DIST[p][aTree->Root] - DIST[p][Sdestination] - DIST[Sdestination][aTree->Root]) < 3*epsilon	){
				aTree->ADD[newNode][p] = aTree->ADD[p][newNode] = 1.0 + DIST[Sdestination][p];
			}
			else	{
				if((DIST[p][Ssup] + lt) < (DIST[p][Sinf] + lt)){
          aTree->ADD[newNode][p] = aTree->ADD[p][newNode] = DIST[p][Ssup] + lt;
        }
        else{
          aTree->ADD[newNode][p] = aTree->ADD[p][newNode] = DIST[p][Sinf] + lt;
        }
			}
		}	
	
		
		
		aTree->ADD[newNode][newNode] = 0.0;
		tailleBrancheSource = lt;
		tailleTransfert=1.0;
	}
	
	//== Mise a jour des distances
	/*int tab_noeud1[2*aTree->size];
	int tab_noeud2[2*aTree->size];*/
	
	int nbNoeud1=0;
	int nbNoeud2=0;
	int * tab_noeud1 = (int*)malloc((2*aTree->size+1)*sizeof(int));
	int * tab_noeud2 = (int*)malloc((2*aTree->size+1)*sizeof(int));
	
  //== liste des noeuds sous sDestination
  
	for(int i=1;i<2*aTree->size-2-aTree->kt;i++){
      if( fabs(DIST[i][aTree->size]-DIST[i][Sdestination] - DIST[Sdestination][aTree->size]) < 5*epsilon ){
        tab_noeud1[nbNoeud1++] = i;
        //printf("\n1--%d",i);
      }
      else{
        tab_noeud2[nbNoeud2++] = i;
       // printf("\n2--%d",i);
      }
  }  
    //== mise a jour des distances
  	for(int i=0;i<nbNoeud1;i++){
      for(int j=0;j<nbNoeud2;j++){
        aTree->ADD[tab_noeud1[i]][tab_noeud2[j]] =  aTree->ADD[tab_noeud2[j]][tab_noeud1[i]] = aTree->ADD[tab_noeud2[j]][nouveauNoeud] + tailleTransfert + aTree->ADD[Sdestination ][tab_noeud1[i]];
      }
    }
  	
	kt = aTree->kt;
	
  loadAdjacenceMatrix(aTree->Adjacence,aTree->ARETE, aTree->LONGUEUR,aTree->size, aTree->kt);

	for(p=0;p<2*aTree->size;p++)
		free(DIST[p]);
	free(DIST);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x60(%rbp)
movl $0x64, -0x64(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0xec52
cmpl $0x0, -0x18(%rbp)
jne 0xec6a
leaq 0x16d29(%rip), %rdi     # 0x25982
movb $0x0, %al
callq 0x1030
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10f0
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, -0x70(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
cmpl %ecx, %eax
jge 0xecc6
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xec89
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x2, %ecx
subl -0x60(%rbp), %ecx
cmpl %ecx, %eax
jg 0xed44
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x2, %ecx
subl -0x60(%rbp), %ecx
cmpl %ecx, %eax
jg 0xed37
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xece9
jmp 0xed39
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xeccd
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x14(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movslq 0x20(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movslq 0x20(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xedf6
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x58(%rbp)
jmp 0xee2a
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x18(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movslq 0x20(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x18(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movslq 0x20(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xeec9
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x18(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x18(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x5c(%rbp)
movl %eax, -0x20(%rbp)
jmp 0xef00
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x18(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x18(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x5c(%rbp)
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movslq -0x1c(%rbp), %rcx
cmpl $0x3, (%rax,%rcx,4)
jne 0xf8aa
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x3, %ecx
movq -0x10(%rbp), %rdx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jg 0xf05e
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
jne 0xefc4
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
cmpq %rcx, %rax
je 0xefc4
cmpl $0x0, -0x24(%rbp)
jne 0xefa2
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xefc2
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0xefc4
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
jne 0xf04e
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
cmpq %rcx, %rax
je 0xf04e
cmpl $0x0, -0x24(%rbp)
jne 0xf02c
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xf04c
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0xf04e
jmp 0xf050
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xef1d
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd 0x15ff1(%rip), %xmm0    # 0x25068
ucomisd (%rax,%rcx,8), %xmm0
jb 0xf43f
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x2, %ecx
movq -0x10(%rbp), %rdx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jg 0xf43d
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x2, %ecx
movq -0x10(%rbp), %rdx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jg 0xf42d
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm1
movaps 0x15f32(%rip), %xmm0    # 0x25080
pand %xmm0, %xmm1
movsd 0x15eb6(%rip), %xmm0    # 0x25010
ucomisd %xmm1, %xmm0
ja 0xf1fc
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm1
movaps 0x15e9a(%rip), %xmm0    # 0x25080
pand %xmm0, %xmm1
movsd 0x15e1e(%rip), %xmm0    # 0x25010
ucomisd %xmm1, %xmm0
jbe 0xf41d
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf363
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd 0x15d6a(%rip), %xmm1    # 0x25068
addsd %xmm1, %xmm0
movq -0x70(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x70(%rbp), %rax
movslq -0x2c(%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 -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xf41b
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd 0x15cad(%rip), %xmm1    # 0x25068
addsd %xmm1, %xmm0
movq -0x70(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x70(%rbp), %rax
movslq -0x2c(%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 -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xf41d
jmp 0xf41f
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xf0af
jmp 0xf42f
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xf089
jmp 0xf43f
movslq -0x24(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x34(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movslq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x34(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x38(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movslq -0x1c(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x38(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x15aea(%rip), %xmm1    # 0x25008
divsd %xmm1, %xmm0
movsd 0x15b16(%rip), %xmm1    # 0x25040
ucomisd %xmm1, %xmm0
jbe 0xf55c
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x15aba(%rip), %xmm1    # 0x25008
divsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
jmp 0xf56e
movsd 0x15adc(%rip), %xmm0    # 0x25040
movsd %xmm0, -0xa8(%rbp)
jmp 0xf56e
movsd -0xa8(%rbp), %xmm0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movslq -0x1c(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x15a15(%rip), %xmm1    # 0x25008
divsd %xmm1, %xmm0
movsd 0x15a41(%rip), %xmm1    # 0x25040
ucomisd %xmm1, %xmm0
jbe 0xf631
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x159e5(%rip), %xmm1    # 0x25008
divsd %xmm1, %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0xf643
movsd 0x15a07(%rip), %xmm0    # 0x25040
movsd %xmm0, -0xb0(%rbp)
jmp 0xf643
movsd -0xb0(%rbp), %xmm0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
movl %eax, -0x40(%rbp)
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x2, %ecx
movq -0x10(%rbp), %rdx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jg 0xf83d
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movslq 0x20(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x5c(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movslq 0x20(%rcx), %rcx
subsd (%rax,%rcx,8), %xmm1
movaps 0x159a7(%rip), %xmm0    # 0x25080
pand %xmm0, %xmm1
movsd 0x1598b(%rip), %xmm0    # 0x25070
ucomisd %xmm1, %xmm0
jbe 0xf73f
movq -0x70(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd 0x15945(%rip), %xmm0    # 0x25048
addsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xf82d
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x54(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x58(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf7ce
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x54(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xf82b
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x58(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xf82d
jmp 0xf82f
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xf66e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd 0x157cc(%rip), %xmm0    # 0x25048
movsd %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x18(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd 0x157ae(%rip), %xmm0    # 0x25048
movsd %xmm0, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
movl %eax, -0x40(%rbp)
jmp 0x10088
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd 0x157a5(%rip), %xmm0    # 0x25068
ucomisd (%rax,%rcx,8), %xmm0
jb 0xfc8b
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x2, %ecx
movq -0x10(%rbp), %rdx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jg 0xfc89
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x2, %ecx
movq -0x10(%rbp), %rdx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jg 0xfc79
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm1
movaps 0x156e6(%rip), %xmm0    # 0x25080
pand %xmm0, %xmm1
movsd 0x1566a(%rip), %xmm0    # 0x25010
ucomisd %xmm1, %xmm0
ja 0xfa48
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm1
movaps 0x1564e(%rip), %xmm0    # 0x25080
pand %xmm0, %xmm1
movsd 0x155d2(%rip), %xmm0    # 0x25010
ucomisd %xmm1, %xmm0
jbe 0xfc69
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xfbaf
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd 0x1551e(%rip), %xmm1    # 0x25068
addsd %xmm1, %xmm0
movq -0x70(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x70(%rbp), %rax
movslq -0x2c(%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 -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xfc67
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
shll %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd 0x15461(%rip), %xmm1    # 0x25068
addsd %xmm1, %xmm0
movq -0x70(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x70(%rbp), %rax
movslq -0x2c(%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 -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xfc69
jmp 0xfc6b
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xf8fb
jmp 0xfc7b
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xf8d5
jmp 0xfc8b
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll %eax
subl $0x2, %eax
movq -0x10(%rbp), %rcx
subl 0x48(%rcx), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x15344(%rip), %xmm1    # 0x25008
divsd %xmm1, %xmm0
movsd 0x15370(%rip), %xmm1    # 0x25040
ucomisd %xmm1, %xmm0
jb 0xfd02
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x15314(%rip), %xmm1    # 0x25008
divsd %xmm1, %xmm0
movsd %xmm0, -0xb8(%rbp)
jmp 0xfd14
movsd 0x15336(%rip), %xmm0    # 0x25040
movsd %xmm0, -0xb8(%rbp)
jmp 0xfd14
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movslq -0x3c(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x18(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movslq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x18(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x18(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd 0x152d8(%rip), %xmm0    # 0x25048
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x3, %ecx
movq -0x10(%rbp), %rsi
subl 0x48(%rsi), %ecx
addl $0x1, %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movslq -0x3c(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x3, %ecx
movq -0x10(%rbp), %rsi
subl 0x48(%rsi), %ecx
addl $0x1, %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movsd -0x78(%rbp), %xmm0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x3, %ecx
movq -0x10(%rbp), %rdx
subl 0x48(%rdx), %ecx
addl $0x1, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movslq -0x3c(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movsd -0x78(%rbp), %xmm0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movslq -0x3c(%rbp), %rcx
movl $0x3, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl 0x48(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x48(%rax)
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jg 0x10055
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movslq 0x20(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x5c(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movslq 0x20(%rcx), %rcx
subsd (%rax,%rcx,8), %xmm1
movaps 0x15177(%rip), %xmm0    # 0x25080
pand %xmm0, %xmm1
movsd 0x1515b(%rip), %xmm0    # 0x25070
ucomisd %xmm1, %xmm0
jbe 0xff6f
movq -0x70(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd 0x15115(%rip), %xmm0    # 0x25048
addsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x3c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x10045
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x54(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
addsd -0x78(%rbp), %xmm1
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x58(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x78(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xfff7
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x54(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x78(%rbp), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x3c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x10043
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x58(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x78(%rbp), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x3c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x10045
jmp 0x10047
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xfeaf
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x3c(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd 0x14fc5(%rip), %xmm0    # 0x25048
movsd %xmm0, -0x50(%rbp)
movl $0x0, -0x7c(%rbp)
movl $0x0, -0x80(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, -0x90(%rbp)
movl $0x1, -0x94(%rbp)
movl -0x94(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
subl $0x2, %ecx
movq -0x10(%rbp), %rdx
subl 0x48(%rdx), %ecx
cmpl %ecx, %eax
jge 0x101b4
movq -0x70(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x5c(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm1
movq -0x70(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
subsd (%rax,%rcx,8), %xmm1
movaps 0x14f32(%rip), %xmm0    # 0x25080
pand %xmm0, %xmm1
movsd 0x14ee6(%rip), %xmm0    # 0x25040
ucomisd %xmm1, %xmm0
jbe 0x10180
movl -0x94(%rbp), %edx
movq -0x88(%rbp), %rax
movl -0x7c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x7c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x1019e
movl -0x94(%rbp), %edx
movq -0x90(%rbp), %rax
movl -0x80(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x80(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x101a0
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x100dc
movl $0x0, -0x98(%rbp)
movl -0x98(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jge 0x102cd
movl $0x0, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
cmpl -0x80(%rbp), %eax
jge 0x102b7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x90(%rbp), %rcx
movslq -0x9c(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x50(%rbp), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x88(%rbp), %rcx
movslq -0x98(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
addsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x90(%rbp), %rcx
movslq -0x9c(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movq -0x88(%rbp), %rcx
movslq -0x98(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x88(%rbp), %rcx
movslq -0x98(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movq -0x90(%rbp), %rcx
movslq -0x9c(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x101d7
jmp 0x102b9
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x101be
movq -0x10(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x48(%rax), %r8d
callq 0x3230
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shll %ecx
cmpl %ecx, %eax
jge 0x10334
movq -0x70(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x10e0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x10309
movq -0x70(%rbp), %rdi
callq 0x10e0
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)