// File: /workspace/github_c_makefile_star2_O1/cbouilla[P]AES-attacks-finder/Search.c
// Function: SearchAlgoLowMem
Solver SearchAlgoLowMem(SysEqLin E, const int T)
{
	const int nb_variables = E->a/E->gen;
	int Alloue=T*nb_variables;
	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++;
				}
			}
			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]);
	
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %r12
movl 0x8(%rdi), %eax
cltd
idivl 0x10(%rdi)
movl %eax, %r13d
movq %rsi, 0xc0(%rsp)
imull %esi, %eax
movq %rax, 0x88(%rsp)
movslq %eax, %r15
leaq (,%r15,8), %rbx
movq %rbx, %rdi
callq 0x21d0
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
callq 0x21d0
movq %rax, 0x30(%rsp)
leaq (,%r15,4), %r14
movq %r14, %rdi
callq 0x21d0
movq %rax, 0x50(%rsp)
movq %r14, %rdi
callq 0x21d0
movq %rax, 0x38(%rsp)
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rbp
movl %r13d, 0x58(%rsp)
movslq %r13d, %r13
testl %r15d, %r15d
jle 0x13c5f
leaq (,%r13,8), %r14
movl 0x88(%rsp), %ebx
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x21d0
movq %rax, (%rbp,%r15,8)
incq %r15
cmpq %r15, %rbx
jne 0x13c4a
movl %r13d, %ebx
shlq $0x3, %r13
xorl %r14d, %r14d
movq %r13, %rdi
callq 0x21d0
movq %rax, 0x60(%rsp,%r14,8)
incq %r14
cmpq $0x3, %r14
jne 0x13c69
movq %r13, 0xc8(%rsp)
movl 0x58(%rsp), %eax
testl %eax, %eax
jle 0x13cb6
movl %eax, %r14d
xorl %r15d, %r15d
movq 0x20(%r12), %rax
movl (%rax,%r15,4), %edi
movq %r12, %rsi
callq 0x754c
movq (%rbp), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x13c95
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
xorl %edi, %edi
xorl %esi, %esi
movq %r12, %rdx
callq 0xbed5
movq 0x30(%rsp), %rcx
movq %rax, (%rcx)
movq 0x50(%rsp), %rax
movl %ebx, (%rax)
movq 0x38(%rsp), %rdx
movl %ebx, (%rdx)
movq 0xc0(%rsp), %rax
decl %eax
movl %eax, 0x9c(%rsp)
movl $0x1, %ebx
movq $0x0, 0xb0(%rsp)
movq $0x0, 0xa8(%rsp)
movq %rbp, %r12
movslq %ebx, %rcx
leaq -0x1(%rcx), %r8
movq 0x30(%rsp), %rax
movq -0x8(%rax,%rcx,8), %rax
movq %rax, 0x58(%rsp)
movq 0x18(%rsp), %rax
movq -0x8(%rax,%rcx,8), %rax
movq %rax, 0x80(%rsp)
movq 0x50(%rsp), %rax
movslq -0x4(%rax,%rcx,4), %rax
movl %eax, 0xc(%rsp)
movq %rdx, 0x38(%rsp)
movl -0x4(%rdx,%rcx,4), %ecx
subl %eax, %ecx
movl %ecx, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
testq %rax, %rax
jle 0x13d82
movq 0x60(%rsp), %rdx
xorl %esi, %esi
movq (%r12,%r8,8), %rdi
movq (%rdi,%rsi,8), %rdi
movq %rdi, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x13d6e
testl %ecx, %ecx
jle 0x13daa
movq 0x68(%rsp), %rdx
movl %ecx, %ecx
shlq $0x3, %rax
xorl %esi, %esi
movq (%r12,%r8,8), %rdi
addq %rax, %rdi
movq (%rdi,%rsi,8), %rdi
movq %rdi, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x13d93
movq %r8, 0x28(%rsp)
movq %r12, 0x20(%rsp)
movq %rbx, 0xd0(%rsp)
leal -0x1(%rbx), %eax
movl %eax, 0x48(%rsp)
xorl %ecx, %ecx
movl 0xc(%rsp,%rcx,4), %eax
movl %eax, (%rsp)
testl %eax, %eax
jle 0x13e6d
xorl %r12d, %r12d
movq %rcx, 0x40(%rsp)
leal -0x1(%r12), %r15d
testl %r15d, %r15d
js 0x13e60
movq 0x60(%rsp,%rcx,8), %rbx
movslq %r12d, %r13
movq (%rbx,%r13,8), %rdi
movl %r15d, %ebp
movq (%rbx,%rbp,8), %rsi
movl 0x14(%rdi), %eax
movl 0x14(%rsi), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movq 0x58(%rsp), %rdx
callq 0x7cbb
movq %rax, %r14
testq %rax, %rax
je 0x13e53
movq (%rbx,%r13,8), %rdi
callq 0x7060
movq (%rbx,%rbp,8), %rdi
callq 0x7060
movl (%rsp), %ecx
movslq %ecx, %rax
decl %ecx
movl %ecx, (%rsp)
movq -0x8(%rbx,%rax,8), %rax
movq %rax, (%rbx,%r13,8)
movq -0x8(%rbx,%r13,8), %rax
movq %rax, (%rbx,%rbp,8)
movq %r14, -0x8(%rbx,%r13,8)
addl $-0x2, %r13d
movl %r13d, %r12d
jmp 0x13e56
decl %r15d
testq %r14, %r14
movq 0x40(%rsp), %rcx
je 0x13de1
incl %r12d
cmpl (%rsp), %r12d
jl 0x13ddc
movl (%rsp), %eax
movl %eax, 0xc(%rsp,%rcx,4)
leaq 0x1(%rcx), %rax
testq %rcx, %rcx
movq %rax, %rcx
je 0x13dc5
movl 0xc(%rsp), %ecx
movl 0x10(%rsp), %edx
movl 0x14(%rsp), %eax
movl %eax, 0x90(%rsp)
movl %ecx, (%rsp)
testl %ecx, %ecx
jle 0x13f89
movq 0x60(%rsp), %r14
movq 0x68(%rsp), %r12
xorl %ebx, %ebx
movq 0x70(%rsp), %rcx
movq %rcx, 0xb8(%rsp)
xorl %r15d, %r15d
movq %r14, 0xa0(%rsp)
cmpl %edx, %r15d
jge 0x13f78
movl %edx, 0x40(%rsp)
movslq %ebx, %r13
movq (%r14,%r13,8), %rdi
movslq %r15d, %rbp
movq (%r12,%rbp,8), %rsi
movl 0x14(%rdi), %eax
movl 0x14(%rsi), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movq 0x58(%rsp), %rdx
callq 0x7cbb
testq %rax, %rax
je 0x13f60
movq (%r14,%r13,8), %rdi
movq %rax, %rbx
callq 0x7060
movl (%rsp), %ecx
movslq %ecx, %rax
decl %ecx
movl %ecx, (%rsp)
movq -0x8(%r14,%rax,8), %rax
movq %rax, (%r14,%r13,8)
movq (%r12,%rbp,8), %rdi
callq 0x7060
movl 0x40(%rsp), %edx
movslq %edx, %rax
decl %edx
movq -0x8(%r12,%rax,8), %rax
movq %rax, (%r12,%rbp,8)
movl 0x90(%rsp), %ecx
movslq %ecx, %rax
incl %ecx
movl %ecx, 0x90(%rsp)
movq 0xb8(%rsp), %rcx
movq %rbx, (%rcx,%rax,8)
movq %rbx, %rax
decl %r13d
movl %r13d, %ebx
jmp 0x13f67
incl %r15d
movl 0x40(%rsp), %edx
testq %rax, %rax
movq 0xa0(%rsp), %r14
je 0x13ec6
incl %ebx
movl $0x0, %r15d
cmpl (%rsp), %ebx
jl 0x13ec6
movl (%rsp), %eax
movl %eax, 0xc(%rsp)
movl %edx, 0x10(%rsp)
movl 0x90(%rsp), %r8d
movl %r8d, 0x14(%rsp)
testl %r8d, %r8d
jle 0x14107
xorl %ebx, %ebx
movq 0x70(%rsp), %r12
leal -0x1(%rbx), %r15d
movl 0x14(%rsp), %ecx
movl %ecx, (%rsp)
testl %r15d, %r15d
js 0x14038
movslq %ebx, %r13
movq (%r12,%r13,8), %rdi
movl %r15d, %ebp
movq (%r12,%rbp,8), %rsi
movl 0x14(%rdi), %eax
movl 0x14(%rsi), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movq 0x58(%rsp), %rdx
callq 0x7cbb
movq %rax, %r14
testq %rax, %rax
je 0x14024
movq (%r12,%r13,8), %rdi
callq 0x7060
movq (%r12,%rbp,8), %rdi
callq 0x7060
decl %ebx
movq -0x8(%r12,%r13,8), %rax
movq %rax, (%r12,%rbp,8)
movq %r14, -0x8(%r12,%r13,8)
movl (%rsp), %ecx
movslq %ecx, %rax
decl %ecx
movl %ecx, (%rsp)
movq -0x8(%r12,%rax,8), %rax
movq %rax, (%r12,%r13,8)
jmp 0x14027
decl %r15d
testq %r14, %r14
je 0x13fbc
movl (%rsp), %ecx
movl %ecx, 0x14(%rsp)
jmp 0x13fb1
movl (%rsp), %ecx
movl %ecx, 0x14(%rsp)
movq %rbx, 0x90(%rsp)
movslq %ebx, %rbp
xorl %ecx, %ecx
movl 0xc(%rsp,%rcx,4), %edx
xorl %r13d, %r13d
movq %rcx, 0x40(%rsp)
cmpl %edx, %r13d
jge 0x140c8
movl %edx, (%rsp)
movq (%r12,%rbp,8), %rdi
movq 0x60(%rsp,%rcx,8), %r15
movslq %r13d, %rbx
movq (%r15,%rbx,8), %rsi
movl 0x14(%rdi), %eax
movl 0x14(%rsi), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movq 0x58(%rsp), %rdx
callq 0x7cbb
movq %rax, %r14
testq %rax, %rax
je 0x140b6
movq (%r12,%rbp,8), %rdi
callq 0x7060
movq (%r15,%rbx,8), %rdi
callq 0x7060
movl (%rsp), %edx
movslq %edx, %rax
decl %edx
movq -0x8(%r15,%rax,8), %rax
movq %rax, (%r15,%rbx,8)
movq %r14, (%r12,%rbp,8)
jmp 0x140bc
incl %r13d
movl (%rsp), %edx
testq %r14, %r14
movq 0x40(%rsp), %rcx
je 0x14058
jmp 0x140f6
movl %edx, 0xc(%rsp,%rcx,4)
leaq 0x1(%rcx), %rax
testq %rcx, %rcx
movq %rax, %rcx
je 0x1404c
movq 0x90(%rsp), %rbx
incl %ebx
movl 0x14(%rsp), %r8d
cmpl %r8d, %ebx
jl 0x13fb1
jmp 0x14107
movl %edx, 0xc(%rsp,%rcx,4)
movq 0x90(%rsp), %rbx
jmp 0x13fb1
movslq 0xc(%rsp), %r13
addl %r13d, %r8d
addl 0x10(%rsp), %r8d
cmpl $0x1, %r8d
jne 0x141c9
xorl %ebx, %ebx
cmpl $0x0, 0xc(%rsp,%rbx)
leaq 0x4(%rbx), %rbx
je 0x14120
movq 0x80(%rsp), %r13
testq %r13, %r13
movq 0x20(%rsp), %r12
je 0x146ec
callq 0x6fb4
movq %rax, %r14
movq 0x58(%rsp,%rbx,2), %rbx
movq (%rbx), %rax
movl 0x14(%rax), %ecx
addl 0x14(%r13), %ecx
testl %ecx, %ecx
movl $0x0, %r15d
cmovlel %r15d, %ecx
movl %ecx, 0x14(%r14)
movq (%r13), %rdi
movl 0x8(%r13), %esi
movq (%rax), %rdx
movl 0x8(%rax), %ecx
leaq 0x8(%r14), %r8
callq 0x2544
movq %rax, (%r14)
movl 0xc(%r13), %eax
movl 0x14(%r13), %ecx
testl %ecx, %ecx
cmovlel %r15d, %ecx
movq (%rbx), %rdx
addl 0xc(%rdx), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, 0xc(%r14)
movl 0x10(%r13), %eax
movl 0x10(%rdx), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, 0x10(%r14)
movq %rdx, 0x20(%r14)
movq %r13, 0x28(%r14)
movq %r14, 0xa8(%rsp)
movb $0x2, 0x18(%r14)
jmp 0x146fc
xorl %eax, %eax
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0x28(%rsp), %r15
movslq 0xc(%rsp,%rax,4), %rcx
testq %rcx, %rcx
jle 0x141f8
movq 0x60(%rsp,%rax,8), %rsi
xorl %edx, %edx
movq (%rsi,%rdx,8), %rdi
cmpl $0x0, 0x14(%rdi)
jle 0x141fc
incq %rdx
cmpq %rdx, %rcx
jne 0x141e6
xorl %ecx, %ecx
jmp 0x14206
movl $0x36, %ecx
movl %eax, %r12d
movl %edx, %ebp
testl %ecx, %ecx
jne 0x145ea
incq %rax
cmpq $0x3, %rax
jne 0x141d5
movq 0xc0(%rsp), %rcx
cmpl $0x2, %ecx
movq 0x80(%rsp), %rdi
jl 0x14231
testq %rdi, %rdi
je 0x14241
movl 0x9c(%rsp), %eax
cmpl %eax, 0x14(%rdi)
jge 0x145b2
movl %ecx, %eax
testq %rdi, %rdi
je 0x1424d
movl %ecx, %eax
subl 0x14(%rdi), %eax
cmpl %eax, %r13d
jl 0x145b2
decl %r8d
movl %r8d, 0x90(%rsp)
cltq
movq %rax, 0x48(%rsp)
leal -0x1(%r13), %ebp
movq 0x88(%rsp), %rax
cmpl %r15d, %eax
movq 0x20(%rsp), %r12
movq %r15, 0x28(%rsp)
movq %r13, 0x40(%rsp)
jne 0x14346
addl %eax, %eax
movl %eax, (%rsp)
movslq %eax, %r15
leaq (,%r15,8), %r14
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x2200
movq %rax, 0x18(%rsp)
leaq (,%r15,4), %rbx
movq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0x2200
movq %rax, 0x50(%rsp)
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x2200
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x2200
movq %rax, 0x30(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x2200
movq %rax, %r12
movq 0x88(%rsp), %rax
cmpl %r15d, %eax
jge 0x1433e
movl (%rsp), %ebx
movq %r12, %r13
movslq %eax, %r12
movq 0xc8(%rsp), %r14
movq %r14, %rdi
callq 0x21d0
movq %rax, (%r13,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x14318
movl %ebx, %eax
movq %r13, %r12
movq 0x28(%rsp), %r15
movq 0x40(%rsp), %r13
jmp 0x14346
movl (%rsp), %eax
movq 0x28(%rsp), %r15
movq %rax, 0x88(%rsp)
leaq -0x1(%r13), %rbx
movq 0x80(%rsp), %r13
testq %r13, %r13
movq %rbx, 0xb8(%rsp)
je 0x14428
callq 0x6fb4
movq 0x18(%rsp), %r14
movq %rax, (%r14,%r15,8)
movq 0x60(%rsp), %rcx
movq %rcx, (%rsp)
movq (%rcx,%rbx,8), %rcx
movl 0x14(%rcx), %edx
addl 0x14(%r13), %edx
testl %edx, %edx
movq %rbp, 0xa0(%rsp)
movq %r15, %rbp
movl $0x0, %r15d
cmovlel %r15d, %edx
movl %edx, 0x14(%rax)
movq (%r13), %rdi
movl 0x8(%r13), %esi
movq (%rcx), %rdx
movl 0x8(%rcx), %ecx
leaq 0x8(%rax), %r8
callq 0x2544
movq (%r14,%rbp,8), %rcx
movq %rax, (%rcx)
movl 0x14(%r13), %eax
testl %eax, %eax
cmovlel %r15d, %eax
movq (%rsp), %rcx
movq (%rcx,%rbx,8), %rdi
addl 0xc(%rdi), %eax
movl 0xc(%r13), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movq (%r14,%rbp,8), %rcx
movl %eax, 0xc(%rcx)
movl 0x10(%r13), %eax
movl 0x10(%rdi), %edx
cmpl %edx, %eax
cmovgl %eax, %edx
movl %edx, 0x10(%rcx)
callq 0x7054
movq (%r14,%rbp,8), %rcx
movq %rax, 0x20(%rcx)
movq %r13, %rdi
callq 0x7054
movq (%r14,%rbp,8), %rcx
movq %rax, 0x28(%rcx)
movq (%r14,%rbp,8), %rax
movq 0xa0(%rsp), %rbp
movb $0x2, 0x18(%rax)
jmp 0x1443f
movq 0x60(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x7054
movq 0x18(%rsp), %rcx
movq %rax, (%rcx,%r15,8)
movl %ebp, %ebp
xorl %ebx, %ebx
movq 0x40(%rsp), %r13
cmpq $0x2, %r13
jl 0x14473
movq 0x60(%rsp), %r15
xorl %ebx, %ebx
movq 0x28(%rsp), %r14
movq (%r15,%rbx,8), %rdi
callq 0x7054
movq (%r12,%r14,8), %rcx
movq %rax, (%rcx,%rbx,8)
incq %rbx
cmpq %rbx, %rbp
jne 0x1445a
movslq 0xc(%rsp), %r15
cmpq %r15, %r13
movq %r12, 0x20(%rsp)
movq %rbp, 0xa0(%rsp)
jge 0x144b6
movq %r12, %rbp
movq 0x60(%rsp), %r12
movl %ebx, %ebx
movq 0x28(%rsp), %r14
movq (%r12,%r13,8), %rdi
callq 0x7054
movq (%rbp,%r14,8), %rcx
movq %rax, (%rcx,%rbx,8)
incq %rbx
incq %r13
cmpq %r15, %r13
jl 0x14499
movslq 0x10(%rsp), %r12
testq %r12, %r12
jle 0x14503
movq 0x68(%rsp), %rcx
movq %rcx, (%rsp)
movl %ebx, %ebx
leaq (,%rbx,8), %rbp
xorl %r13d, %r13d
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %r15
movq (%rsp), %rcx
movq (%rcx,%r13,8), %rdi
callq 0x7054
movq (%r14,%r15,8), %rcx
addq %rbp, %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x144e0
addl %r13d, %ebx
movslq 0x14(%rsp), %r15
testq %r15, %r15
movq 0x20(%rsp), %rbp
movq 0x28(%rsp), %r14
jle 0x14542
movq 0x70(%rsp), %r12
movl %ebx, %ebx
shlq $0x3, %rbx
xorl %r13d, %r13d
movq (%r12,%r13,8), %rdi
callq 0x7054
movq (%rbp,%r14,8), %rcx
addq %rbx, %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
cmpq %r13, %r15
jne 0x14525
movq 0x38(%rsp), %rax
movl 0x90(%rsp), %ecx
movl %ecx, (%rax,%r14,4)
movq 0x50(%rsp), %rax
movq 0xb8(%rsp), %r13
movl %r13d, (%rax,%r14,4)
movq 0x60(%rsp), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rdi
movl 0x8(%rax), %esi
movq 0x58(%rsp), %rdx
callq 0xbed5
movq 0x30(%rsp), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
movq 0xa0(%rsp), %rbp
decl %ebp
movq 0x48(%rsp), %rax
cmpq %rax, 0x40(%rsp)
movq %r14, %r15
jg 0x1426c
movl %r15d, 0x48(%rsp)
movq 0x80(%rsp), %rdi
callq 0x7060
xorl %ebx, %ebx
movslq 0xc(%rsp,%rbx,4), %r14
testq %r14, %r14
jle 0x145dc
movq 0x60(%rsp,%rbx,8), %r15
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
callq 0x7060
incq %r12
cmpq %r12, %r14
jne 0x145cb
incq %rbx
cmpq $0x3, %rbx
jne 0x145b9
jmp 0x14973
cmpl $0x36, %ecx
jne 0x14973
testl %r12d, %r12d
je 0x14629
cmpl $0x2, %r12d
jne 0x14762
cmpq $0x0, 0x80(%rsp)
je 0x14762
movl 0x9c(%rsp), %eax
movq 0x80(%rsp), %rcx
cmpl %eax, 0x14(%rcx)
jne 0x14762
movq 0x88(%rsp), %rax
cmpl %eax, 0x48(%rsp)
jne 0x147a9
leal (%rax,%rax), %ebx
movslq %ebx, %r15
leaq (,%r15,8), %r13
movq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x2200
movq %rax, 0x18(%rsp)
leaq (,%r15,4), %r14
movq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x2200
movq %rax, 0x50(%rsp)
movq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x2200
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x2200
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x2200
movq %rax, 0x20(%rsp)
movq 0x88(%rsp), %rax
cmpl %r15d, %eax
jge 0x147a2
movl %ebx, (%rsp)
movslq %eax, %r14
movq 0x20(%rsp), %r13
movq 0xc8(%rsp), %rbx
movq %rbx, %rdi
callq 0x21d0
movq %rax, (%r13,%r14,8)
incq %r14
cmpq %r14, %r15
jne 0x146cf
movl (%rsp), %eax
jmp 0x147a4
movq 0x58(%rsp,%rbx,2), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
cmpl $0x2, 0xd0(%rsp)
jl 0x1475b
movl 0x48(%rsp), %ebx
xorl %r14d, %r14d
movq 0x18(%rsp), %rax
movq (%rax,%r14,8), %rdi
callq 0x7060
movq 0x38(%rsp), %r13
cmpl $0x0, (%r13,%r14,4)
jle 0x14745
xorl %r15d, %r15d
movq (%r12,%r14,8), %rax
movq (%rax,%r15,8), %rdi
callq 0x7060
incq %r15
movslq (%r13,%r14,4), %rax
cmpq %rax, %r15
jl 0x1472b
movq 0x30(%rsp), %rax
movq (%rax,%r14,8), %rdi
callq 0xc453
incq %r14
cmpq %rbx, %r14
jne 0x1470d
xorl %ebx, %ebx
jmp 0x1497e
xorl %ebx, %ebx
movslq 0xc(%rsp,%rbx,4), %r14
testq %r14, %r14
jle 0x14787
movq 0x60(%rsp,%rbx,8), %r15
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
callq 0x7060
incq %r12
cmpq %r12, %r14
jne 0x14776
incq %rbx
cmpq $0x3, %rbx
jne 0x14764
movq 0x80(%rsp), %rdi
callq 0x7060
jmp 0x14973
movl %ebx, %eax
movq 0x28(%rsp), %r15
movq %rax, 0x88(%rsp)
movslq %r12d, %r14
movslq %ebp, %rbx
movq 0x80(%rsp), %rbp
testq %rbp, %rbp
je 0x1485e
callq 0x6fb4
movq 0x18(%rsp), %r12
movq %rax, (%r12,%r15,8)
movq 0x60(%rsp,%r14,8), %r15
movq (%r15,%rbx,8), %rcx
movl 0x14(%rcx), %edx
addl 0x14(%rbp), %edx
testl %edx, %edx
movl $0x0, %r13d
cmovlel %r13d, %edx
movl %edx, 0x14(%rax)
movq (%rbp), %rdi
movl 0x8(%rbp), %esi
movq (%rcx), %rdx
movl 0x8(%rcx), %ecx
leaq 0x8(%rax), %r8
callq 0x2544
movq 0x28(%rsp), %rcx
movq (%r12,%rcx,8), %rcx
movq %rax, (%rcx)
movl 0x14(%rbp), %eax
testl %eax, %eax
cmovlel %r13d, %eax
movl 0xc(%rbp), %ecx
movq (%r15,%rbx,8), %rdx
movq 0x28(%rsp), %r15
addl 0xc(%rdx), %eax
cmpl %eax, %ecx
cmovgl %ecx, %eax
movq (%r12,%r15,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 (%r12,%r15,8), %rax
movq %rbp, 0x28(%rax)
movq (%r12,%r15,8), %rax
movb $0x2, 0x18(%rax)
jmp 0x14870
movq 0x60(%rsp,%r14,8), %rax
movq (%rax,%rbx,8), %rax
movq 0x18(%rsp), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x20(%rsp), %r12
movq 0x60(%rsp,%r14,8), %rax
movslq 0xc(%rsp,%r14,4), %rcx
leaq -0x1(%rcx), %rdx
movl %edx, 0xc(%rsp,%r14,4)
movq -0x8(%rax,%rcx,8), %rcx
movq %rcx, (%rax,%rbx,8)
movl 0x10(%rsp), %eax
addl 0xc(%rsp), %eax
addl 0x14(%rsp), %eax
movq 0x38(%rsp), %rcx
movl %eax, (%rcx,%r15,4)
testq %rbp, %rbp
je 0x148b7
movl 0x9c(%rsp), %ecx
cmpl %ecx, 0x14(%rbp)
je 0x148bb
movl 0xc(%rsp), %eax
movq 0x50(%rsp), %rcx
movl %eax, (%rcx,%r15,4)
testl %eax, %eax
je 0x14934
xorl %eax, %eax
xorl %ecx, %ecx
movslq 0xc(%rsp,%rax,4), %rdx
testq %rdx, %rdx
jle 0x148ff
movq 0x60(%rsp,%rax,8), %rsi
movslq %ecx, %rdi
shlq $0x3, %rdi
xorl %r8d, %r8d
movq (%rsi,%r8,8), %r9
movq (%r12,%r15,8), %r10
addq %rdi, %r10
movq %r9, (%r10,%r8,8)
incq %r8
cmpq %r8, %rdx
jne 0x148e5
addl %r8d, %ecx
incq %rax
cmpq $0x3, %rax
jne 0x148cc
movq 0x18(%rsp), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rdi
movl 0x8(%rax), %esi
movq 0x58(%rsp), %rdx
callq 0xbed5
movq 0x30(%rsp), %rcx
movq %rax, (%rcx,%r15,8)
movq 0xd0(%rsp), %rbx
jmp 0x1497e
movq 0x18(%rsp), %rax
movq (%rax,%r15,8), %rdi
callq 0x7060
movl $0x1, %ebx
movslq 0xc(%rsp,%rbx,4), %r14
testq %r14, %r14
jle 0x1496a
movq 0x60(%rsp,%rbx,8), %r15
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
callq 0x7060
incq %r12
cmpq %r12, %r14
jne 0x14959
incq %rbx
cmpq $0x3, %rbx
jne 0x14947
movl 0x48(%rsp), %eax
movl %eax, %ebx
movq 0x20(%rsp), %r12
movq 0x58(%rsp), %rdi
callq 0xc453
movq 0xb0(%rsp), %rax
incq %rax
movq %rax, 0xb0(%rsp)
testb %al, %al
jne 0x149e9
testl %ebx, %ebx
jle 0x149c2
movl %ebx, %eax
xorl %edx, %edx
movq 0x18(%rsp), %rcx
movq (%rcx,%rdx,8), %rcx
cmpl $0x1, 0xc(%rcx)
jne 0x149c4
incq %rdx
cmpq %rdx, %rax
jne 0x149a7
movl %eax, %edx
jmp 0x149c4
xorl %edx, %edx
leaq 0x18165(%rip), %rdi     # 0x2cb30
movq 0xb0(%rsp), %rsi
xorl %eax, %eax
callq 0x2110
movq 0x1d5df(%rip), %rax     # 0x31fc0
movq (%rax), %rdi
callq 0x21e0
testl %ebx, %ebx
movq 0x38(%rsp), %rdx
jne 0x13d15
movl $0xa, %edi
movq %rdx, %rbx
callq 0x2040
movq 0x18(%rsp), %rdi
callq 0x2030
movq 0x30(%rsp), %rdi
callq 0x2030
movq 0x50(%rsp), %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2030
movq 0x88(%rsp), %rax
testl %eax, %eax
jle 0x14a4b
movl %eax, %ebx
xorl %r14d, %r14d
movq (%r12,%r14,8), %rdi
callq 0x2030
incq %r14
cmpq %r14, %rbx
jne 0x14a3a
movq %r12, %rdi
callq 0x2030
xorl %ebx, %ebx
movq 0x60(%rsp,%rbx,8), %rdi
callq 0x2030
incq %rbx
cmpq $0x3, %rbx
jne 0x14a55
movq 0xa8(%rsp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq