// File: dcarrey[P]hgt-detection/./utils_tree.cpp
// Function: Bipartition_Table(double**, int**, int*, int)
int Bipartition_Table (double **D, int **B, int *PLACE, int n)
{
	int i,j,k,l,l1,*MaxCol,*X,EdgeNumberPath,m,uv,PlaceNumber,edge,*Path,M,F;
	double S,DIS,DIS1,*LengthPath;
	double EPS=1.e-5;
	double EPS1=1.e-2;

	/* Memory allocation */

	MaxCol=(int *)malloc((2*n)*sizeof(int));
	X=(int *)malloc((2*n+1)*sizeof(int));
	LengthPath=(double *)malloc((2*n)*sizeof(double));
	Path=(int *)malloc((2*n)*sizeof(int));

	/* Computation of a circular order X for D */     

	i=1; j=n; odp1(D,X,&i,&j,n);

	/* Initialization */ 
	for (i=1; i<=2*n-3; i++)
	{
		MaxCol[i]=0;
		PLACE[i]=0;
		for (j=1;j<=n;j++)
			B[i][j]=0;  
	}
	B[1][X[2]]=1; MaxCol[1]=X[2]; Path[1]=1; PlaceNumber=1;
	PLACE[1]=1; LengthPath[1]=D[X[1]][X[2]]; EdgeNumberPath=1; m=1;

	/* The main loop */

	for(k=2;k<=n-1;k++)
	{  
		/* Point 2.1 of the algorithm (see the referenced article by Makarenkov and Leclerc) */

		DIS=(D[X[1]][X[k]]+D[X[k]][X[k+1]]-D[X[1]][X[k+1]])/2; 
		DIS1=(D[X[1]][X[k+1]]+D[X[k]][X[k+1]]-D[X[1]][X[k]])/2;
		
		//printf("\n\n%d,%d,%d\n\n",X[1],X[k],X[k+1]);
		if ((DIS<=-EPS1)||(DIS1<=-EPS1)) { printf("\n This is not an additive distance \n");
		free(MaxCol);free(X);free(LengthPath);free(Path);exit(1);return 0; }
		if (DIS<=EPS) DIS=0.0; if (DIS1<=EPS) DIS1=0.0;

		S=0.0; i=EdgeNumberPath; if (LengthPath[i]==0.0) i--;
		while (S<=DIS-EPS)
		{
			if (i==0) { S=DIS; break; }  /* checking the limit */  
			S=S+LengthPath[i];
			i--;
		}

		/* Point 2.2 of the algorithm */

		if (fabs(S-DIS)<=EPS) 
		{ 
			M=m+2; DIS=S;      
			if (i==0) F=1; 
			else if (i==EdgeNumberPath) F=2;
			else { M--; F=3; }   
		}    
		else {M=m+2; F=0;}


		if (M==m+2)
		{
			if (F==0) { uv=Path[i+1]; EdgeNumberPath=i+2; LengthPath[i+1]=S-DIS; LengthPath[i+2]=DIS1; 
			Path[i+1]=m+2; Path[i+2]=m+1;}
			else if (F==1) { uv=Path[1]; EdgeNumberPath=2; LengthPath[1]=0.0; LengthPath[2]=DIS1; 
			Path[1]=m+2; Path[2]=m+1;}
			else if (F==2) { uv=Path[EdgeNumberPath]; EdgeNumberPath=EdgeNumberPath+1;LengthPath[EdgeNumberPath]=DIS1; 
			Path[EdgeNumberPath-1]=m+2; Path[EdgeNumberPath]=m+1; } 

			for (j=1;j<=n;j++)
				B[m+2][j]=B[uv][j];   
			MaxCol[m+2]=MaxCol[uv];      
		}

		else 
		{
			EdgeNumberPath=i+1; LengthPath[i+1]=DIS1; Path[i+1]=m+1;
		}

		/* Point 2.3 of the algorithm */

		for (j=1;j<=EdgeNumberPath;j++)
			B[Path[j]][X[k+1]]=1;

		/* Point 2.4 of the algorithm */

		for (j=1;j<=EdgeNumberPath;j++)
			if (MaxCol[Path[j]]<X[k+1]) MaxCol[Path[j]]=X[k+1];  

		/* Point 2.5 of the algorithm */

		for (j=PlaceNumber;j>=1;j--) 
			PLACE[j+1]=PLACE[j];
		PLACE[1]=m+1; PlaceNumber++;

		if (M==m+2) {
			i=2; 
			while (PLACE[i]!=uv)
				i++;          
			for (j=PlaceNumber;j>=i+1;j--) 
				PLACE[j+1]=PLACE[j];
			PLACE[i+1]=m+2; PlaceNumber++;}

		i=M-1; edge=2;
		do 
		{
			if (PLACE[i]==Path[edge]) 
			{
				edge++; j=i+1; 
				while (X[k+1]>MaxCol[PLACE[j]]) 
					j++; 
				if (j>i+1) 
				{            
					l1=PLACE[i];
					for (l=i+1;l<=j-1;l++) 
						PLACE[l-1]=PLACE[l];              
					PLACE[j-1]=l1;

				} 
			}
			i--;
		} while (i!=0); 

		m=M;
	}


	/* memeory liberation */

	free(MaxCol);
	free(X);
	free(LengthPath);
	free(Path);

	return m;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movsd 0x20f6e(%rip), %xmm0    # 0x25030
movsd %xmm0, -0x90(%rbp)
movsd 0x20f66(%rip), %xmm0    # 0x25038
movsd %xmm0, -0x98(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, -0x40(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %rax, -0x88(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, -0x60(%rbp)
movl $0x1, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl -0x1c(%rbp), %r8d
leaq -0x20(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0x3380
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
shll %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jg 0x41cc
movq -0x38(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x41bf
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4195
jmp 0x41c1
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4161
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x40(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
movq -0x40(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x60(%rbp), %rax
movl $0x1, 0x4(%rax)
movl $0x1, -0x50(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x88(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movl $0x1, -0x44(%rbp)
movl $0x1, -0x48(%rbp)
movl $0x2, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x498d
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movl -0x28(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
addsd (%rax,%rcx,8), %xmm0
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movl -0x28(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd 0x20d32(%rip), %xmm1    # 0x25008
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movl -0x28(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movl -0x28(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
addsd (%rax,%rcx,8), %xmm0
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd 0x20cb0(%rip), %xmm1    # 0x25008
divsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x78(%rbp), %xmm1
movsd -0x98(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
ucomisd %xmm1, %xmm0
jae 0x43b5
movsd -0x80(%rbp), %xmm1
movsd -0x98(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
ucomisd %xmm1, %xmm0
jb 0x43f4
leaq 0x21071(%rip), %rdi     # 0x2542d
movb $0x0, %al
callq 0x1030
movq -0x38(%rbp), %rdi
callq 0x10e0
movq -0x40(%rbp), %rdi
callq 0x10e0
movq -0x88(%rbp), %rdi
callq 0x10e0
movq -0x60(%rbp), %rdi
callq 0x10e0
movl $0x1, %edi
callq 0x10f0
movsd -0x78(%rbp), %xmm1
movsd -0x90(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x440f
xorps %xmm0, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x80(%rbp), %xmm1
movsd -0x90(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x442a
xorps %xmm0, %xmm0
movsd %xmm0, -0x80(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x70(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x88(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x445c
jp 0x445c
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x445e
movsd -0x70(%rbp), %xmm1
movsd -0x78(%rbp), %xmm0
subsd -0x90(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x44ad
cmpl $0x0, -0x20(%rbp)
jne 0x4488
movsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
jmp 0x44ad
movsd -0x70(%rbp), %xmm0
movq -0x88(%rbp), %rax
movslq -0x20(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x445e
movsd -0x70(%rbp), %xmm1
subsd -0x78(%rbp), %xmm1
movaps 0x20bc2(%rip), %xmm0    # 0x25080
pand %xmm0, %xmm1
movsd -0x90(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x4517
movl -0x48(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x64(%rbp)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x44f2
movl $0x1, -0x68(%rbp)
jmp 0x4515
movl -0x20(%rbp), %eax
cmpl -0x44(%rbp), %eax
jne 0x4503
movl $0x2, -0x68(%rbp)
jmp 0x4513
movl -0x64(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x64(%rbp)
movl $0x3, -0x68(%rbp)
jmp 0x4515
jmp 0x4527
movl -0x48(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x64(%rbp)
movl $0x0, -0x68(%rbp)
movl -0x64(%rbp), %eax
movl -0x48(%rbp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jne 0x46da
cmpl $0x0, -0x68(%rbp)
jne 0x45c8
movq -0x60(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
movl -0x20(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x44(%rbp)
movsd -0x70(%rbp), %xmm0
subsd -0x78(%rbp), %xmm0
movq -0x88(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x80(%rbp), %xmm0
movq -0x88(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x48(%rbp), %edx
addl $0x2, %edx
movq -0x60(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x48(%rbp), %edx
addl $0x1, %edx
movq -0x60(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x4678
cmpl $0x1, -0x68(%rbp)
jne 0x461b
movq -0x60(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x4c(%rbp)
movl $0x2, -0x44(%rbp)
movq -0x88(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rax)
movsd -0x80(%rbp), %xmm0
movq -0x88(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movl -0x48(%rbp), %ecx
addl $0x2, %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x48(%rbp), %ecx
addl $0x1, %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x4676
cmpl $0x2, -0x68(%rbp)
jne 0x4674
movq -0x60(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movsd -0x80(%rbp), %xmm0
movq -0x88(%rbp), %rax
movslq -0x44(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x48(%rbp), %edx
addl $0x2, %edx
movq -0x60(%rbp), %rax
movl -0x44(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x48(%rbp), %edx
addl $0x1, %edx
movq -0x60(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x4676
jmp 0x4678
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x46bd
movq -0x10(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movl -0x48(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x467f
movq -0x38(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x38(%rbp), %rax
movl -0x48(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x4713
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movsd -0x80(%rbp), %xmm0
movq -0x88(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x48(%rbp), %edx
addl $0x1, %edx
movq -0x60(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x44(%rbp), %eax
jg 0x4759
movq -0x10(%rbp), %rax
movq -0x60(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movl -0x28(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
movl $0x1, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x471a
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x44(%rbp), %eax
jg 0x47bd
movq -0x38(%rbp), %rax
movq -0x60(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movq -0x40(%rbp), %rcx
movl -0x28(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x47b0
movq -0x40(%rbp), %rax
movl -0x28(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x38(%rbp), %rax
movq -0x60(%rbp), %rcx
movslq -0x24(%rbp), %rsi
movslq (%rcx,%rsi,4), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x47b2
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4760
movl -0x50(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
jl 0x47ef
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x47c3
movl -0x48(%rbp), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
movl -0x64(%rbp), %eax
movl -0x48(%rbp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jne 0x488c
movl $0x2, -0x20(%rbp)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x4c(%rbp), %eax
je 0x4834
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4819
movl -0x50(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jl 0x486d
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x483a
movl -0x48(%rbp), %edx
addl $0x2, %edx
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
movl -0x64(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl $0x2, -0x54(%rbp)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x60(%rbp), %rcx
movslq -0x54(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x4966
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x40(%rbp), %rax
movl -0x28(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rdx
movslq -0x24(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
cmpl (%rcx,%rdx,4), %eax
jle 0x48fa
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x48ca
movl -0x24(%rbp), %eax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x4964
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x4951
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x491e
movl -0x30(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x4966
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x489c
movl -0x64(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x424c
movq -0x38(%rbp), %rdi
callq 0x10e0
movq -0x40(%rbp), %rdi
callq 0x10e0
movq -0x88(%rbp), %rdi
callq 0x10e0
movq -0x60(%rbp), %rdi
callq 0x10e0
movl -0x48(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq