// File: /workspace/github_c_makefile_star2_O2/cbouilla[P]AES-attacks-finder/Search.c
// Function: SearchAlgoLowMem_All
Solver * SearchAlgoLowMem_All(SysEqLin E, const int T, int *taille)
{
	const int nb_variables = E->a/E->gen;
	int Alloue=T*nb_variables;
	int Alloue_all_algo = Alloue;
	Solver * __restrict all_algo = malloc(Alloue_all_algo*sizeof(Solver));
	int nb_all_algo = 0;
	Solver * __restrict R = malloc(Alloue*sizeof(Solver));
	SysEqLin * __restrict Eq = malloc(Alloue*sizeof(SysEqLin));
	int * __restrict nb_guess = malloc(Alloue*sizeof(int));
	int * __restrict nb_total = malloc(Alloue*sizeof(int));
	Solver ** __restrict variables = malloc(Alloue*sizeof(Solver *));
	int i;
	for (i = 0; i < Alloue; i++) variables[i]=malloc(nb_variables*sizeof(Solver));
	Solver * tab[3];
	for (i = 0; i < 3; i++) tab[i]=malloc(nb_variables*sizeof(Solver));
	
	for (i = 0; i < nb_variables; i++) variables[0][i]=BaseSolver(E->varligne[i],E);
	R[0]=NULL;
	Eq[0]=EsachantX(NULL,0,E);
	nb_guess[0]=nb_variables;
	nb_total[0]=nb_variables;
	int nb_state = 1;
	
	Solver result = NULL;
	
	unsigned long int nb_round = 0;
	while (nb_state)
	{		
		nb_state--;
		
		SysEqLin F = Eq[nb_state];
		Solver r = R[nb_state];
		int n[3];
		n[0]=nb_guess[nb_state];
		n[1]=nb_total[nb_state]-n[0];
		n[2]=0;
			
			
		for (i = 0; i < n[0]; i++) tab[0][i]=variables[nb_state][i];
		for (i = 0; i < n[1]; i++) tab[1][i]=variables[nb_state][i+n[0]];
		
		int k;
		for (k = 0; k < 2; k++)
		{
			i=0;
			while (i<n[k])
			{
				int j=i-1;
				while (j>=0)
				{
					Solver tmp = UnionSolverBorne(tab[k][i],tab[k][j],F,min(tab[k][i]->sortie,tab[k][j]->sortie));
					if (tmp)
					{
						freeSolver(tab[k][i]);
						freeSolver(tab[k][j]);
						tab[k][i]=tab[k][--n[k]];
						i--;
						tab[k][j]=tab[k][i];
						tab[k][i]=tmp;							
						i--;
						break;
					}
					j--;
				}
				i++;
			}	
		}
		
		int i=0;
		while (i<n[0])
		{
			int j=0;
			while (j<n[1])
			{
				Solver tmp = UnionSolverBorne(tab[0][i],tab[1][j],F,min(tab[0][i]->sortie,tab[1][j]->sortie));
				if (tmp)
				{
					freeSolver(tab[0][i]);
					tab[0][i]=tab[0][--n[0]];
					freeSolver(tab[1][j]);
					tab[1][j]=tab[1][--n[1]];
					tab[2][n[2]++]=tmp;
					i--;
					break;
				}
				j++;
			}
			i++;
		}
		
		i=0;
		while (i<n[2])
		{
			int j;
			debut:
			j=i-1;
			while (j>=0)
			{
				Solver tmp = UnionSolverBorne(tab[2][i],tab[2][j],F,min(tab[2][i]->sortie,tab[2][j]->sortie));
				if (tmp)
				{
					freeSolver(tab[2][i]);
					freeSolver(tab[2][j]);
					tab[2][j]=tab[2][i-1];
					tab[2][i-1]=tmp;
					tab[2][i]=tab[2][--n[2]];
					i--;
					goto debut;
				}
				j--;
			}
			for (k = 0; k < 2; k++)
			{
				j=0;
				while (j < n[k])
				{
					Solver tmp = UnionSolverBorne(tab[2][i],tab[k][j],F,min(tab[2][i]->sortie,tab[k][j]->sortie));
					if (tmp)
					{
						freeSolver(tab[2][i]);
						freeSolver(tab[k][j]);
						tab[k][j]=tab[k][--n[k]];
						tab[2][i]=tmp;
						goto debut;
					}
					j++;
				}
			}
			i++;
		}		
		
		if (n[0]+n[1]+n[2]==1)
		{
			i=0;
			while (!n[i]) i++;
			if (r!=NULL)
			{
				result=NewSolver();
				result->sortie=max(r->sortie+tab[i][0]->sortie,0);
				result->var=UnionListesTriees(r->var,r->Nvar,tab[i][0]->var,tab[i][0]->Nvar,&result->Nvar);
				result->temps=max(r->temps,max(r->sortie,0)+tab[i][0]->temps);
				result->memoire=max(r->memoire,tab[i][0]->memoire);
				result->fils1=tab[i][0];
				result->fils2=r;
				result->type=2;
			}
			else result=tab[i][0];
						
			for (i = 0; i < nb_state; i++)
			{
				freeSolver(R[i]);
				int j;
				for (j = 0; j < nb_total[i]; j++) freeSolver(variables[i][j]);
				freeSysEq(Eq[i]);
			}
			nb_state=0;
		}
		else
		{
			int one_solution=0;
			int one_solution_i=0;
			int one_solution_j=0;
		
			for (i = 0; i < 3; i++)
			{
				int j;
				for (j = 0; j < n[i]; j++)
				{
					if (tab[i][j]->sortie<=0)
					{
						one_solution=1;
						one_solution_i=i;
						one_solution_j=j;
						goto suite;
					}
				}
			}
			
			if ((r==NULL && T>1) || r->sortie<T-1)
			{
				const int m = (r==NULL ? T : T-r->sortie);
				int g = n[0];
				const int new_nb_total = n[0]+n[1]+n[2]-1;
				while (g>=m)
				{
					if (nb_state==Alloue)
					{
						Alloue=2*Alloue;
						R=realloc(R,Alloue*sizeof(Solver));
						nb_guess=realloc(nb_guess,Alloue*sizeof(int));
						nb_total=realloc(nb_total,Alloue*sizeof(int));
						Eq=realloc(Eq,Alloue*sizeof(SysEqLin));
						variables=realloc(variables,Alloue*sizeof(Solver *));
						for (i = Alloue/2; i < Alloue; i++) variables[i]=malloc(nb_variables*sizeof(Solver));
					}
					g--;
					if (r!=NULL)
					{
						R[nb_state]=NewSolver();
						R[nb_state]->sortie=max(r->sortie+tab[0][g]->sortie,0);
						R[nb_state]->var=UnionListesTriees(r->var,r->Nvar,tab[0][g]->var,tab[0][g]->Nvar,&R[nb_state]->Nvar);
						R[nb_state]->temps=max(r->temps,max(r->sortie,0)+tab[0][g]->temps);
						R[nb_state]->memoire=max(r->memoire,tab[0][g]->memoire);
						R[nb_state]->fils1=copySolver(tab[0][g]);
						R[nb_state]->fils2=copySolver(r);
						R[nb_state]->type=2;
					}
					else R[nb_state]=copySolver(tab[0][g]);
					
					int pos=0;
					for (i = 0; i < g; i++) variables[nb_state][pos++]=copySolver(tab[0][i]);
					for (i = g+1; i < n[0]; i++) variables[nb_state][pos++]=copySolver(tab[0][i]);
					for (i = 0; i < n[1]; i++) variables[nb_state][pos++]=copySolver(tab[1][i]);
					for (i = 0; i < n[2]; i++) variables[nb_state][pos++]=copySolver(tab[2][i]);
					
					nb_total[nb_state]=new_nb_total;
					nb_guess[nb_state]=g;
					Eq[nb_state]=EsachantX(tab[0][g]->var,tab[0][g]->Nvar,F);
					nb_state++;
				}
			}
			else
			{
				for (i = 0; i < n[0]; i++)
				{
					{
						if (nb_all_algo==Alloue_all_algo)
						{
							Alloue_all_algo=2*Alloue_all_algo;
							all_algo=realloc(all_algo,Alloue_all_algo*sizeof(Solver));
						}
						if (r!=NULL)
						{
							all_algo[nb_all_algo]=NewSolver();
							all_algo[nb_all_algo]->sortie=max(r->sortie+tab[0][i]->sortie,0);
							all_algo[nb_all_algo]->var=UnionListesTriees(r->var,r->Nvar,tab[0][i]->var,tab[0][i]->Nvar,&all_algo[nb_all_algo]->Nvar);
							all_algo[nb_all_algo]->temps=max(r->temps,max(r->sortie,0)+tab[0][i]->temps);
							all_algo[nb_all_algo]->memoire=max(r->memoire,tab[0][i]->memoire);
							all_algo[nb_all_algo]->fils1=copySolver(tab[0][i]);
							all_algo[nb_all_algo]->fils2=copySolver(r);
							all_algo[nb_all_algo]->type=2;
						}
						else all_algo[nb_all_algo]=copySolver(tab[0][i]);
						nb_all_algo++;
					}
				}
			}
			freeSolver(r);
			for (i = 0; i < 3; i++)
			{
				int j;
				for (j = 0; j < n[i]; j++) freeSolver(tab[i][j]);					
			}
			
			goto fin;
			suite :
			
			if (one_solution_i==0 || (one_solution_i==2 && r!=NULL && r->sortie==T-1))
			{
				if (nb_state==Alloue)
				{
					Alloue=2*Alloue;
					R=realloc(R,Alloue*sizeof(Solver));
					nb_guess=realloc(nb_guess,Alloue*sizeof(int));
					nb_total=realloc(nb_total,Alloue*sizeof(int));
					Eq=realloc(Eq,Alloue*sizeof(SysEqLin));
					variables=realloc(variables,Alloue*sizeof(Solver *));
					for (i = Alloue/2; i < Alloue; i++) variables[i]=malloc(nb_variables*sizeof(Solver));
				}
				if (r!=NULL)
				{
					R[nb_state]=NewSolver();
					R[nb_state]->sortie=max(r->sortie+tab[one_solution_i][one_solution_j]->sortie,0);
					R[nb_state]->var=UnionListesTriees(r->var,r->Nvar,tab[one_solution_i][one_solution_j]->var,tab[one_solution_i][one_solution_j]->Nvar,&R[nb_state]->Nvar);
					R[nb_state]->temps=max(r->temps,max(r->sortie,0)+tab[one_solution_i][one_solution_j]->temps);
					R[nb_state]->memoire=max(r->memoire,tab[one_solution_i][one_solution_j]->memoire);
					R[nb_state]->fils1=tab[one_solution_i][one_solution_j];
					R[nb_state]->fils2=r;
					R[nb_state]->type=2;
				}
				else R[nb_state]=tab[one_solution_i][one_solution_j];
				tab[one_solution_i][one_solution_j]=tab[one_solution_i][--n[one_solution_i]];
				
				nb_total[nb_state]=n[0]+n[1]+n[2];
				if (r==NULL || r->sortie!=T-1) nb_guess[nb_state]=n[0];
				else nb_guess[nb_state]=nb_total[nb_state];
				
				if (nb_guess[nb_state]==0)
				{
					freeSolver(R[nb_state]);
					for (i = 1; i < 3; i++)
					{
						int j;
						for (j = 0; j < n[i]; j++) freeSolver(tab[i][j]);
					}
				}
				else
				{
					int pos=0;
					for (i = 0; i < 3; i++)
					{
						int j;
						for (j = 0; j < n[i]; j++) variables[nb_state][pos++]=tab[i][j];
					}
					Eq[nb_state]=EsachantX(R[nb_state]->var,R[nb_state]->Nvar,F);
					nb_state++;
				}
			}
			else
			{
				for (i = 0; i < 3; i++)
				{
					int j;
					for (j = 0; j < n[i]; j++) freeSolver(tab[i][j]);
				}
				freeSolver(r);
			}	
		}
		fin :
		freeSysEq(F);
		nb_round++;
		if (nb_round%0x100 == 0)
		{
			i=0;
			while (i<nb_state && R[i]->temps==1) i++;
			printf("\r %lu - %d - ",nb_round,i);
			fflush(stdout);
		}	
	}
	printf("\n");
	free(R);
	free(Eq);
	free(nb_guess);
	free(nb_total);
	for (i = 0; i < Alloue; i++) free(variables[i]);
	free(variables);
	for (i = 0; i < 3; i++) free(tab[i]);
	
	if (result==NULL)
	{
		*taille = nb_all_algo;
		return all_algo;
	}
	else
	{
		for (i = 0; i < nb_all_algo; i++) freeSolver(all_algo[i]);
		free(all_algo);
		all_algo=malloc(1*sizeof(Solver));
		all_algo[0]=result;
		*taille=1;
		return all_algo;
	}
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, 0xf0(%rsp)
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cltd
idivl 0x10(%rdi)
movl %eax, %ebp
movq %rsi, 0xd0(%rsp)
imull %esi, %eax
movl %eax, 0x54(%rsp)
movslq %eax, %r12
leaq (,%r12,8), %r14
movq %r14, %rdi
callq 0x21c0
movq %rax, 0x88(%rsp)
movq %r14, %rdi
callq 0x21c0
movq %rax, 0x30(%rsp)
movq %r14, %rdi
callq 0x21c0
movq %rax, 0x20(%rsp)
leaq (,%r12,4), %r15
movq %r15, %rdi
callq 0x21c0
movq %rax, 0x60(%rsp)
movq %r15, %rdi
callq 0x21c0
movq %rax, 0x58(%rsp)
movq %r14, %rdi
callq 0x21c0
movq %rax, %r15
movl %ebp, %r13d
movslq %ebp, %rax
shlq $0x3, %rax
movq %rax, 0xc8(%rsp)
xorl %r14d, %r14d
testl %r12d, %r12d
cmovlel %r14d, %r12d
cmpq %r14, %r12
je 0x13295
movq 0xc8(%rsp), %rdi
callq 0x21c0
movq %rax, (%r15,%r14,8)
incq %r14
jmp 0x1327a
xorl %r14d, %r14d
movq %r15, %r12
cmpq $0x3, %r14
je 0x132b8
movq 0xc8(%rsp), %rdi
callq 0x21c0
movq %rax, 0x70(%rsp,%r14,8)
incq %r14
jmp 0x1329b
xorl %r14d, %r14d
testl %r13d, %r13d
movl %r13d, %r15d
cmovlel %r14d, %r15d
cmpq %r14, %r15
je 0x132e7
movq 0x20(%rbx), %rax
movl (%rax,%r14,4), %edi
movq %rbx, %rsi
callq 0x6d1e
movq (%r12), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
jmp 0x132c5
movq 0x30(%rsp), %rax
andq $0x0, (%rax)
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xb021
movq 0x20(%rsp), %r15
movq %rax, (%r15)
movq 0x60(%rsp), %rax
movl %r13d, (%rax)
movq 0x58(%rsp), %rax
movl %r13d, (%rax)
movq 0xd0(%rsp), %rcx
decl %ecx
movl %ecx, 0x9c(%rsp)
pushq $0x1
popq %rdx
movq $0x0, 0xd8(%rsp)
movq $0x0, 0xe0(%rsp)
movq $0x0, 0xc0(%rsp)
movl 0x54(%rsp), %ebp
movl %ebp, %ecx
movq %rcx, 0xb0(%rsp)
movq %rax, %r13
testl %edx, %edx
je 0x141af
movl %ebp, 0x54(%rsp)
leal -0x1(%rdx), %eax
movq %rax, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movslq %edx, %rdx
leaq -0x1(%rdx), %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rax
movslq -0x4(%rax,%rdx,4), %rax
movl %eax, 0x14(%rsp)
movl -0x4(%r13,%rdx,4), %ecx
subl %eax, %ecx
movl %ecx, 0x18(%rsp)
andl $0x0, 0x1c(%rsp)
movq -0x8(%r15,%rdx,8), %rsi
movq %rsi, 0x90(%rsp)
movq 0x30(%rsp), %rsi
movq -0x8(%rsi,%rdx,8), %rdx
movq %rdx, 0x38(%rsp)
movq 0x70(%rsp), %rdx
movq %rdx, 0xe8(%rsp)
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x133fe
movq 0x28(%rsp), %rdi
movq (%r12,%rdi,8), %rdi
movq (%rdi,%rsi,8), %rdi
movq 0xe8(%rsp), %r8
movq %rdi, (%r8,%rsi,8)
incq %rsi
jmp 0x133db
movq 0x78(%rsp), %rdx
movq %rdx, 0x48(%rsp)
testl %ecx, %ecx
movl $0x0, %edx
cmovlel %edx, %ecx
shlq $0x3, %rax
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x1343b
movq 0x28(%rsp), %rsi
movq (%r12,%rsi,8), %rsi
addq %rax, %rsi
movq (%rsi,%rdx,8), %rsi
movq 0x48(%rsp), %rdi
movq %rsi, (%rdi,%rdx,8)
incq %rdx
jmp 0x13418
movq %r15, 0x20(%rsp)
xorl %r15d, %r15d
movq %r12, 0x40(%rsp)
movq %r13, 0x58(%rsp)
cmpq $0x2, %r15
je 0x134f7
movl 0x14(%rsp,%r15,4), %eax
movl %eax, 0x8(%rsp)
xorl %ebp, %ebp
cmpl 0x8(%rsp), %ebp
jge 0x134e1
movslq %ebp, %r12
movl %ebp, %r13d
testl %r13d, %r13d
jle 0x134dd
movq 0x70(%rsp,%r15,8), %rbx
movq (%rbx,%r12,8), %rdi
movq -0x8(%rbx,%r13,8), %rsi
decq %r13
movl 0x14(%rdi), %eax
movl 0x14(%rsi), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movq 0x90(%rsp), %rdx
callq 0x73be
testq %rax, %rax
je 0x1346e
movq %rax, %r14
movq (%rbx,%r12,8), %rdi
callq 0x6852
movq (%rbx,%r13,8), %rdi
callq 0x6852
movl 0x8(%rsp), %ecx
movslq %ecx, %rax
decl %ecx
movl %ecx, 0x8(%rsp)
movq -0x8(%rbx,%rax,8), %rax
movq %rax, (%rbx,%r12,8)
movq -0x8(%rbx,%r12,8), %rax
movq %rax, (%rbx,%r13,8)
movq %r14, -0x8(%rbx,%r12,8)
addl $-0x2, %ebp
incl %ebp
jmp 0x13462
movl 0x8(%rsp), %eax
movl %eax, 0x14(%rsp,%r15,4)
incq %r15
movq 0x40(%rsp), %r12
jmp 0x1344d
movl 0x14(%rsp), %eax
movl %eax, 0x68(%rsp)
movl 0x18(%rsp), %edx
movl 0x1c(%rsp), %r13d
xorl %ecx, %ecx
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xe8(%rsp), %r15
testl %edx, %edx
movl $0x0, %ebx
cmovgl %edx, %ebx
movl %edx, 0xb8(%rsp)
cmpl 0x68(%rsp), %ecx
jge 0x135f9
movl %ecx, 0xbc(%rsp)
movslq %ecx, %rbp
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x1357b
movq (%r15,%rbp,8), %rdi
movq 0x48(%rsp), %rax
movq (%rax,%r12,8), %rsi
movl 0x14(%rdi), %eax
movl 0x14(%rsi), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movq 0x90(%rsp), %rdx
callq 0x73be
incq %r12
testq %rax, %rax
je 0x13547
jmp 0x13592
movl 0xbc(%rsp), %ecx
incl %ecx
movq 0x40(%rsp), %r12
movl 0xb8(%rsp), %edx
jmp 0x13530
movq %rax, %r14
movq (%r15,%rbp,8), %rdi
callq 0x6852
movl 0x68(%rsp), %ecx
movslq %ecx, %rax
decl %ecx
movl %ecx, 0x68(%rsp)
movq -0x8(%r15,%rax,8), %rax
movq %rax, (%r15,%rbp,8)
movq 0x48(%rsp), %rbx
movq -0x8(%rbx,%r12,8), %rdi
callq 0x6852
movl 0xb8(%rsp), %edx
movslq %edx, %rax
decl %edx
movq -0x8(%rbx,%rax,8), %rax
movq %rax, -0x8(%rbx,%r12,8)
movslq %r13d, %rax
incl %r13d
movq 0x8(%rsp), %rcx
movq %r14, (%rcx,%rax,8)
movq 0x40(%rsp), %r12
movl 0xbc(%rsp), %ecx
jmp 0x1351f
movl 0x68(%rsp), %eax
movl %eax, 0x14(%rsp)
movl %edx, 0x18(%rsp)
movl %r13d, 0x1c(%rsp)
xorl %ebp, %ebp
cmpl %r13d, %ebp
jge 0x13754
movslq %ebp, %r12
movl %ebp, %ebx
testl %ebx, %ebx
jle 0x1364f
decl %ebx
movq 0x8(%rsp), %rax
movq (%rax,%r12,8), %rdi
movq (%rax,%rbx,8), %rsi
movl 0x14(%rdi), %eax
movl 0x14(%rsi), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movq 0x90(%rsp), %rdx
callq 0x73be
testq %rax, %rax
je 0x1361a
jmp 0x13700
movl %r13d, 0x1c(%rsp)
xorl %r13d, %r13d
movl %ebp, 0x48(%rsp)
cmpq $0x2, %r13
je 0x13743
movl 0x14(%rsp,%r13,4), %r15d
movslq %r15d, %rax
movq %rax, 0x68(%rsp)
xorl %ebx, %ebx
cmpl %r15d, %ebx
jge 0x136ae
movq 0x8(%rsp), %rax
movq (%rax,%r12,8), %rdi
movq 0x70(%rsp,%r13,8), %rbp
movq (%rbp,%rbx,8), %rsi
movl 0x14(%rdi), %eax
movl 0x14(%rsi), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movq 0x90(%rsp), %rdx
callq 0x73be
incq %rbx
testq %rax, %rax
je 0x13674
jmp 0x136bc
movl %r15d, 0x14(%rsp,%r13,4)
incq %r13
movl 0x48(%rsp), %ebp
jmp 0x1365b
movq %rax, %r14
movq 0x8(%rsp), %r15
movq (%r15,%r12,8), %rdi
callq 0x6852
movq -0x8(%rbp,%rbx,8), %rdi
callq 0x6852
movq 0x68(%rsp), %rcx
movq -0x8(%rbp,%rcx,8), %rax
decq %rcx
movq %rax, -0x8(%rbp,%rbx,8)
movq %r14, (%r15,%r12,8)
movl %ecx, 0x14(%rsp,%r13,4)
movl 0x1c(%rsp), %r13d
movl 0x48(%rsp), %ebp
jmp 0x13618
movq %rax, %r14
movq 0x8(%rsp), %r15
movq (%r15,%r12,8), %rdi
callq 0x6852
movq (%r15,%rbx,8), %rdi
callq 0x6852
decl %ebp
movq -0x8(%r15,%r12,8), %rax
movq %rax, (%r15,%rbx,8)
movq %r14, -0x8(%r15,%r12,8)
movslq %r13d, %rax
decl %r13d
movq -0x8(%r15,%rax,8), %rax
movq %rax, (%r15,%r12,8)
movl %r13d, 0x1c(%rsp)
jmp 0x13615
incl %ebp
movl 0x1c(%rsp), %r13d
movq 0x40(%rsp), %r12
jmp 0x1360c
movslq 0x14(%rsp), %r14
addl %r14d, %r13d
addl 0x18(%rsp), %r13d
cmpl $0x1, %r13d
jne 0x1381a
xorl %ebx, %ebx
movq 0x20(%rsp), %r15
cmpl $0x0, 0x14(%rsp,%rbx)
leaq 0x4(%rbx), %rbx
je 0x13772
movq 0x38(%rsp), %rbp
testq %rbp, %rbp
movq 0x58(%rsp), %r13
je 0x1399b
callq 0x67a4
movq %rax, %r14
movq 0x68(%rsp,%rbx,2), %rax
movq %rax, 0x8(%rsp)
movq (%rax), %rax
movl 0x14(%rax), %ecx
addl 0x14(%rbp), %ecx
testl %ecx, %ecx
movl $0x0, %ebx
cmovlel %ebx, %ecx
movl %ecx, 0x14(%r14)
movq (%rbp), %rdi
movl 0x8(%rbp), %esi
movq (%rax), %rdx
movl 0x8(%rax), %ecx
leaq 0x8(%r14), %r8
callq 0x2440
movq %rax, (%r14)
movl 0xc(%rbp), %eax
movl 0x14(%rbp), %ecx
testl %ecx, %ecx
cmovlel %ebx, %ecx
movq 0x8(%rsp), %rdx
movq (%rdx), %rdx
addl 0xc(%rdx), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, 0xc(%r14)
movl 0x10(%rbp), %eax
movl 0x10(%rdx), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, 0x10(%r14)
movq %rdx, 0x20(%r14)
movq %rbp, 0x28(%r14)
movq %r14, 0xd8(%rsp)
movb $0x2, 0x18(%r14)
jmp 0x139ad
xorl %r12d, %r12d
cmpq $0x3, %r12
je 0x13c94
movl 0x14(%rsp,%r12,4), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
xorl %r15d, %r15d
cmpq %r15, %rax
je 0x13852
movq 0x70(%rsp,%r12,8), %rcx
movq (%rcx,%r15,8), %rcx
cmpl $0x0, 0x14(%rcx)
jle 0x13857
incq %r15
jmp 0x13839
incq %r12
jmp 0x1381d
testq %r12, %r12
je 0x13887
cmpq $0x2, %r12
jne 0x13935
cmpq $0x0, 0x38(%rsp)
je 0x13935
movl 0x9c(%rsp), %eax
movq 0x38(%rsp), %rcx
cmpl %eax, 0x14(%rcx)
jne 0x13935
movq 0xb0(%rsp), %rbx
cmpl %ebx, 0xa0(%rsp)
jne 0x13a0d
leal (%rbx,%rbx), %eax
movl %eax, 0x8(%rsp)
movslq %eax, %r13
leaq (,%r13,8), %rbp
movq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x21f0
movq %rax, 0x30(%rsp)
leaq (,%r13,4), %r14
movq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x21f0
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x21f0
movq %rax, %r14
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x21f0
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movq %rbp, %rsi
callq 0x21f0
movq %rax, 0x40(%rsp)
movslq %ebx, %rbx
cmpq %r13, %rbx
jge 0x13a14
movq 0xc8(%rsp), %rdi
callq 0x21c0
movq 0x40(%rsp), %rcx
movq %rax, (%rcx,%rbx,8)
incq %rbx
jmp 0x13911
xorl %ebx, %ebx
movq 0x40(%rsp), %r12
movq 0x58(%rsp), %r13
xorl %eax, %eax
cmpq $0x3, %rbx
je 0x13977
movl 0x14(%rsp,%rbx,4), %r14d
testl %r14d, %r14d
cmovlel %eax, %r14d
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x13972
movq 0x70(%rsp,%rbx,8), %rax
movq (%rax,%r15,8), %rdi
callq 0x6852
xorl %eax, %eax
incq %r15
jmp 0x13958
incq %rbx
jmp 0x13943
movq 0x38(%rsp), %rdi
callq 0x6852
movq 0xa0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x20(%rsp), %r15
jmp 0x13bc0
movq 0x68(%rsp,%rbx,2), %rax
movq (%rax), %rax
movq %rax, 0xd8(%rsp)
xorl %ebx, %ebx
movq 0xa0(%rsp), %rbp
testl %ebp, %ebp
cmovlel %ebx, %ebp
xorl %ebx, %ebx
cmpq %rbp, %rbx
je 0x139fc
movq 0x30(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x6852
xorl %r14d, %r14d
movslq (%r13,%rbx,4), %rax
cmpq %rax, %r14
jge 0x139ee
movq (%r12,%rbx,8), %rax
movq (%rax,%r14,8), %rdi
callq 0x6852
incq %r14
jmp 0x139d2
movq (%r15,%rbx,8), %rdi
callq 0xb562
incq %rbx
jmp 0x139bc
movq $0x0, 0xa8(%rsp)
jmp 0x13bc0
movq 0x58(%rsp), %r13
jmp 0x13a23
movl 0x8(%rsp), %eax
movq %rax, 0xb0(%rsp)
movq %r14, %r13
movq 0x38(%rsp), %rbp
testq %rbp, %rbp
je 0x13ad1
callq 0x67a4
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %r14
movq %rax, (%rbx,%r14,8)
movl %r12d, %ecx
movq %rcx, 0x8(%rsp)
movq 0x70(%rsp,%rcx,8), %r12
movq (%r12,%r15,8), %rcx
movl 0x14(%rcx), %edx
addl 0x14(%rbp), %edx
testl %edx, %edx
movl $0x0, %esi
cmovlel %esi, %edx
movl %edx, 0x14(%rax)
movq (%rbp), %rdi
movl 0x8(%rbp), %esi
movq (%rcx), %rdx
movl 0x8(%rcx), %ecx
leaq 0x8(%rax), %r8
callq 0x2440
movq (%rbx,%r14,8), %rcx
movq %rax, (%rcx)
movl 0x14(%rbp), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
movl 0xc(%rbp), %ecx
movq (%r12,%r15,8), %rdx
addl 0xc(%rdx), %eax
cmpl %eax, %ecx
cmovgl %ecx, %eax
movq (%rbx,%r14,8), %rcx
movl %eax, 0xc(%rcx)
movl 0x10(%rbp), %eax
movl 0x10(%rdx), %esi
cmpl %esi, %eax
cmovgl %eax, %esi
movl %esi, 0x10(%rcx)
movq %rdx, 0x20(%rcx)
movq 0x8(%rsp), %rdx
movq (%rbx,%r14,8), %rax
movq %rbp, 0x28(%rax)
movq (%rbx,%r14,8), %rax
movb $0x2, 0x18(%rax)
jmp 0x13af0
movl %r12d, %edx
movq 0x70(%rsp,%rdx,8), %rax
movq (%rax,%r15,8), %rax
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %r14
movq %rax, (%rcx,%r14,8)
movq 0x70(%rsp,%rdx,8), %r12
movslq 0x14(%rsp,%rdx,4), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0x14(%rsp,%rdx,4)
movq -0x8(%r12,%rax,8), %rax
movq %rax, (%r12,%r15,8)
movl 0x18(%rsp), %eax
addl 0x14(%rsp), %eax
addl 0x1c(%rsp), %eax
movl %eax, (%r13,%r14,4)
testq %rbp, %rbp
je 0x13b28
movl 0x9c(%rsp), %ecx
cmpl %ecx, 0x14(%rbp)
je 0x13b2c
movl 0x14(%rsp), %eax
movq 0x60(%rsp), %rcx
movq 0x28(%rsp), %rdx
movl %eax, (%rcx,%rdx,4)
testl %eax, %eax
movq 0x40(%rsp), %r12
movq 0x20(%rsp), %r15
je 0x13c49
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0x3, %rax
je 0x13b9b
movl 0x14(%rsp,%rax,4), %edx
movslq %ecx, %rcx
testl %edx, %edx
movl $0x0, %esi
cmovlel %esi, %edx
leaq (,%rcx,8), %rdi
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x13b93
movq 0x70(%rsp,%rax,8), %r8
movq (%r8,%rsi,8), %r8
movq 0x28(%rsp), %r9
movq (%r12,%r9,8), %r9
addq %rdi, %r9
movq %r8, (%r9,%rsi,8)
incq %rsi
jmp 0x13b70
incq %rax
addq %rsi, %rcx
jmp 0x13b4f
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rbx
movq (%rax,%rbx,8), %rax
movq (%rax), %rdi
movl 0x8(%rax), %esi
movq 0x90(%rsp), %rdx
callq 0xb021
movq %rax, (%r15,%rbx,8)
movq 0x90(%rsp), %rdi
callq 0xb562
movq 0xe0(%rsp), %rax
incq %rax
movq %rax, 0xe0(%rsp)
testb %al, %al
jne 0x13c38
movq 0xa8(%rsp), %rax
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
xorl %eax, %eax
cmpq %rax, %rdx
je 0x13c13
movq 0x30(%rsp), %rcx
movq (%rcx,%rax,8), %rcx
cmpl $0x1, 0xc(%rcx)
jne 0x13c11
incq %rax
jmp 0x13bf8
movl %eax, %edx
leaq 0x16f16(%rip), %rdi     # 0x2ab30
movq 0xe0(%rsp), %rsi
xorl %eax, %eax
callq 0x2110
movq 0x1c390(%rip), %rax     # 0x2ffc0
movq (%rax), %rdi
callq 0x21d0
movl 0x54(%rsp), %ebp
movq 0xa8(%rsp), %rdx
jmp 0x1335d
movq 0x30(%rsp), %rax
movq (%rax,%rdx,8), %rdi
callq 0x6852
pushq $0x1
popq %rbx
xorl %eax, %eax
cmpq $0x3, %rbx
je 0x13981
movl 0x14(%rsp,%rbx,4), %r14d
testl %r14d, %r14d
cmovlel %eax, %r14d
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x13c8f
movq 0x70(%rsp,%rbx,8), %rax
movq (%rax,%r15,8), %rdi
callq 0x6852
xorl %eax, %eax
incq %r15
jmp 0x13c75
incq %rbx
jmp 0x13c5c
movq 0xd0(%rsp), %rax
cmpl $0x2, %eax
movq 0x40(%rsp), %r12
movq 0x20(%rsp), %rbx
jl 0x13cb3
cmpq $0x0, 0x38(%rsp)
je 0x13cd2
movq 0x38(%rsp), %rax
movl 0x14(%rax), %ecx
cmpl 0x9c(%rsp), %ecx
jge 0x13ff6
movq 0xd0(%rsp), %rax
subl %ecx, %eax
decl %r13d
cltq
movq %rax, 0x68(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x68(%rsp), %r14
jl 0x13fe4
movq 0xb0(%rsp), %rbp
cmpl %eax, %ebp
movq %rax, 0x28(%rsp)
jne 0x13db0
leal (,%rbp,2), %eax
movq %rbx, 0x20(%rsp)
movl %eax, 0x8(%rsp)
movslq %eax, %r15
leaq (,%r15,8), %rsi
movq %rsi, 0x48(%rsp)
movq 0x30(%rsp), %rdi
callq 0x21f0
movq %rax, 0x30(%rsp)
leaq (,%r15,4), %rbx
movq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0x21f0
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0x21f0
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rbx
movq %rbx, %rsi
callq 0x21f0
movq %rax, 0x20(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x21f0
movq %rax, %r12
movslq %ebp, %rbx
cmpq %r15, %rbx
jge 0x13d9f
movq 0xc8(%rsp), %rdi
callq 0x21c0
movq %rax, (%r12,%rbx,8)
incq %rbx
jmp 0x13d84
movl 0x8(%rsp), %eax
movq %rax, 0xb0(%rsp)
movq 0x20(%rsp), %rbx
leaq -0x1(%r14), %r15
movq 0x38(%rsp), %rbp
testq %rbp, %rbp
movq %rbx, 0x20(%rsp)
movq %r15, 0x48(%rsp)
je 0x13e87
callq 0x67a4
movq 0x30(%rsp), %rbx
movq %r15, %rcx
movq 0x28(%rsp), %r15
movq %rax, (%rbx,%r15,8)
movq 0x70(%rsp), %rdx
movq %rdx, 0x8(%rsp)
movq (%rdx,%rcx,8), %rcx
movl 0x14(%rcx), %edx
addl 0x14(%rbp), %edx
testl %edx, %edx
movl $0x0, %esi
cmovlel %esi, %edx
movl %edx, 0x14(%rax)
movq (%rbp), %rdi
movl 0x8(%rbp), %esi
movq (%rcx), %rdx
movl 0x8(%rcx), %ecx
leaq 0x8(%rax), %r8
callq 0x2440
movq (%rbx,%r15,8), %rcx
movq %rax, (%rcx)
movl 0x14(%rbp), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
movq 0x48(%rsp), %rcx
movq 0x8(%rsp), %rdx
movq (%rdx,%rcx,8), %rdi
addl 0xc(%rdi), %eax
movl 0xc(%rbp), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movq (%rbx,%r15,8), %rcx
movl %eax, 0xc(%rcx)
movl 0x10(%rbp), %eax
movl 0x10(%rdi), %edx
cmpl %edx, %eax
cmovgl %eax, %edx
movl %edx, 0x10(%rcx)
callq 0x6846
movq (%rbx,%r15,8), %rcx
movq %rax, 0x20(%rcx)
movq %rbp, %rdi
callq 0x6846
movq (%rbx,%r15,8), %rcx
movq %rax, 0x28(%rcx)
movq (%rbx,%r15,8), %rax
movb $0x2, 0x18(%rax)
movq 0x48(%rsp), %rbx
jmp 0x13eb0
movq 0x70(%rsp), %rax
movq (%rax,%r15,8), %rdi
callq 0x6846
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rbx
xorl %ebp, %ebp
xorl %r15d, %r15d
cmpq %rbx, %r15
jge 0x13ede
movq 0x8(%rsp), %rax
movq (%rax,%r15,8), %rdi
callq 0x6846
movq 0x28(%rsp), %rcx
movq (%r12,%rcx,8), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
addq $0x8, %rbp
jmp 0x13eb5
movslq 0x14(%rsp), %rbx
cmpq %rbx, %r14
jge 0x13f0f
movq 0x8(%rsp), %rax
movq (%rax,%r14,8), %rdi
callq 0x6846
movq 0x28(%rsp), %rcx
movq (%r12,%rcx,8), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
incq %r14
addq $0x8, %rbp
jmp 0x13ee3
movq %r12, 0x40(%rsp)
movl 0x18(%rsp), %ebx
movq 0x78(%rsp), %r14
testl %ebx, %ebx
movl $0x0, %eax
cmovlel %eax, %ebx
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x13f58
movq (%r14,%r12,8), %rdi
callq 0x6846
movq 0x40(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rax, (%rcx,%r15,8)
xorl %eax, %eax
incq %r15
incq %r12
addq $0x8, %rbp
jmp 0x13f2a
movl 0x1c(%rsp), %ebx
movq 0x80(%rsp), %r14
testl %ebx, %ebx
cmovlel %eax, %ebx
xorl %r15d, %r15d
movq 0x40(%rsp), %r12
cmpq %r15, %rbx
je 0x13f95
movq (%r14,%r15,8), %rdi
callq 0x6846
movq 0x28(%rsp), %rcx
movq (%r12,%rcx,8), %rcx
movq %rax, (%rcx,%rbp)
incq %r15
addq $0x8, %rbp
jmp 0x13f71
movq 0x58(%rsp), %rax
movq 0x28(%rsp), %r14
movl %r13d, (%rax,%r14,4)
movq 0x60(%rsp), %rax
movq 0x48(%rsp), %r15
movl %r15d, (%rax,%r14,4)
movq 0x8(%rsp), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rdi
movl 0x8(%rax), %esi
movq 0x90(%rsp), %rdx
callq 0xb021
movq 0x20(%rsp), %rbx
movq %rax, (%rbx,%r14,8)
movq %r14, %rax
incq %rax
movq %r15, %r14
jmp 0x13ce1
movq %rbx, 0x20(%rsp)
movq %rax, 0xa0(%rsp)
jmp 0x14164
testl %r14d, %r14d
movl $0x0, %eax
cmovlel %eax, %r14d
movslq 0xc0(%rsp), %r15
movl %r15d, %eax
movq %rax, 0x8(%rsp)
shlq $0x3, %r15
xorl %r13d, %r13d
movq 0x38(%rsp), %r12
cmpq %r13, %r14
je 0x1414c
movq 0x8(%rsp), %rax
addq %r13, %rax
movl 0x54(%rsp), %ecx
cmpl %ecx, %eax
jne 0x1405b
movl %ecx, %eax
addl %ecx, %eax
movl %eax, 0x54(%rsp)
movslq %eax, %rsi
shlq $0x3, %rsi
movq 0x88(%rsp), %rdi
callq 0x21f0
movq %rax, 0x88(%rsp)
testq %r12, %r12
je 0x14127
callq 0x67a4
movq 0x88(%rsp), %rcx
leaq (%rcx,%r15), %rbp
movq %rax, (%rbp,%r13,8)
movq 0x70(%rsp), %rbx
movq (%rbx,%r13,8), %rcx
movl 0x14(%rcx), %edx
addl 0x14(%r12), %edx
testl %edx, %edx
movl $0x0, %r12d
cmovlel %r12d, %edx
movl %edx, 0x14(%rax)
movq 0x38(%rsp), %rdx
movq (%rdx), %rdi
movq 0x38(%rsp), %rdx
movl 0x8(%rdx), %esi
movq (%rcx), %rdx
movl 0x8(%rcx), %ecx
leaq 0x8(%rax), %r8
callq 0x2440
movq (%rbp,%r13,8), %rcx
movq %rax, (%rcx)
movq 0x38(%rsp), %rax
movl 0x14(%rax), %eax
testl %eax, %eax
cmovlel %r12d, %eax
movq 0x38(%rsp), %r12
movq (%rbx,%r13,8), %rdi
addl 0xc(%rdi), %eax
movl 0xc(%r12), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movq (%rbp,%r13,8), %rcx
movl %eax, 0xc(%rcx)
movl 0x10(%r12), %eax
movl 0x10(%rdi), %edx
cmpl %edx, %eax
cmovgl %eax, %edx
movl %edx, 0x10(%rcx)
callq 0x6846
movq (%rbp,%r13,8), %rcx
movq %rax, 0x20(%rcx)
movq %r12, %rdi
callq 0x6846
movq (%rbp,%r13,8), %rcx
movq %rax, 0x28(%rcx)
movq (%rbp,%r13,8), %rax
movb $0x2, 0x18(%rax)
jmp 0x14144
movq 0x70(%rsp), %rax
movq (%rax,%r13,8), %rdi
callq 0x6846
movq 0x88(%rsp), %rcx
addq %r15, %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
jmp 0x1401e
movq 0xc0(%rsp), %rax
addl %r13d, %eax
movq %rax, 0xc0(%rsp)
movq 0x40(%rsp), %r12
movq 0x38(%rsp), %rdi
callq 0x6852
xorl %ebx, %ebx
movq 0x58(%rsp), %r13
xorl %eax, %eax
cmpq $0x3, %rbx
je 0x13981
movl 0x14(%rsp,%rbx,4), %r14d
testl %r14d, %r14d
cmovlel %eax, %r14d
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x141aa
movq 0x70(%rsp,%rbx,8), %rax
movq (%rax,%r15,8), %rdi
callq 0x6852
xorl %eax, %eax
incq %r15
jmp 0x14190
incq %rbx
jmp 0x14177
pushq $0xa
popq %rdi
callq 0x2040
movq 0x30(%rsp), %rdi
callq 0x2030
movq %r15, %rdi
callq 0x2030
movq 0x60(%rsp), %rdi
callq 0x2030
movq %r13, %rdi
callq 0x2030
xorl %ebx, %ebx
movq 0xb0(%rsp), %r14
testl %r14d, %r14d
cmovlel %ebx, %r14d
movq 0xd8(%rsp), %r15
cmpq %rbx, %r14
je 0x14207
movq (%r12,%rbx,8), %rdi
callq 0x2030
incq %rbx
jmp 0x141f4
movq %r12, %rdi
callq 0x2030
xorl %ebx, %ebx
movq 0xc0(%rsp), %r14
cmpq $0x3, %rbx
je 0x1422e
movq 0x70(%rsp,%rbx,8), %rdi
callq 0x2030
incq %rbx
jmp 0x14219
testq %r15, %r15
je 0x14278
xorl %ebx, %ebx
testl %r14d, %r14d
cmovlel %ebx, %r14d
movq 0x88(%rsp), %rdi
cmpq %rbx, %r14
je 0x1425f
movq (%rdi,%rbx,8), %rdi
callq 0x6852
movq 0x88(%rsp), %rdi
incq %rbx
jmp 0x14244
callq 0x2030
pushq $0x8
popq %rdi
callq 0x21c0
movq %rax, %rcx
movq %r15, (%rax)
pushq $0x1
popq %r14
jmp 0x14280
movq 0x88(%rsp), %rcx
movq 0xf0(%rsp), %rax
movl %r14d, (%rax)
movq %rcx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq