// File: /workspace/github_c_makefile_star2_O0/cbouilla[P]AES-attacks-finder/Search.c
// Function: ExhaustiveSearch
Solver * ExhaustiveSearch(Solver * __restrict const B1, const int N1, const int t, int m, int * __restrict taille, SysEqLin E) // Construit toutes les boites de temps <= t et de memoire <= m, ne garde que les plus interessante.
{
	if (m>t) m=t;
	int Alloue=2*N1;
	Solver * __restrict B=malloc(Alloue*sizeof(Solver));
	int Max=0,i;
	for (i = 0; i < N1; i++) /*if (B1[i]->temps<=t && B1[i]->memoire<=m)*/ B[Max++]=copySolver(B1[i]);
	int N=0;
	printf("Search exhaustive : \n");

	/* Partie en test pour les cas surdéterminés */
	Solver Sol = NULL;
	int temps_sol = t, memoire_sol = m+1;
	for (i = 0; i < Max; i++)
	{
		if (B[i]->sortie<=0 && (B[i]->temps<temps_sol || (B[i]->temps=temps_sol && B[i]->memoire<memoire_sol)))
		{
			freeSolver(Sol);
			Sol=copySolver(B[i]);
			temps_sol=B[i]->temps;
			memoire_sol=B[i]->memoire;
		}
	}
	i=0;
	/* La recherche */
	while (Max!=N)
	{
		TriFusion1(B+N,Max-N); // On favorise les boites les plus interessantes
		N=Max;
		while (i<N)
		{
			int j=i-1;
			while (j>=0) // On fait l'union de B[i] avec B[j], 0 <= j < i
			{
				// Un première passe pour voir si ça vaut le coup		
				if ((B[i]->sortie<=m || B[j]->sortie<=m) && !ContenuListesTriees(B[i]->var,B[i]->Nvar,B[j]->var,B[j]->Nvar) && !ContenuListesTriees(B[j]->var,B[j]->Nvar,B[i]->var,B[i]->Nvar))
				{
					//Solver tmp=UnionSolver(B[i],B[j],E);
					Solver tmp=UnionSolverBorne(B[i],B[j],E,t);
					// Une seconde passe pour voir si ça vaut le coup
					if (tmp!=NULL && tmp->temps<=t && (tmp->temps<temps_sol || (tmp->temps==temps_sol && tmp->memoire<memoire_sol)))
					{
						int k;
						for (k = 0; k < Max; k++) if (PlusInteressant(B[k],tmp) && ContenuListesTriees(tmp->var,tmp->Nvar,B[k]->var,B[k]->Nvar)) break;
						if (k==Max) // ça vaut le coup
						{
							Solver tmp2=PropagateSolver(tmp,E,B1,N1); // On l'augmente gratuitement avec les boites de "base"
							freeSolver(tmp);
							tmp=tmp2;
							k=0;
							
							/* On supprime celle qui sont moins interessante
							 * Le but est de toujours avoir j < i < N <= Max
							 * Les unions entre les i premières boites ont déjà été faite
							 */
							while (k<N)
							{
								if (PlusInteressant(tmp,B[k]) && ContenuListesTriees(B[k]->var,B[k]->Nvar,tmp->var,tmp->Nvar))
								{
									freeSolver(B[k]);
									if (k<j)
									{
										N--;
										B[k]=B[j-1];
										B[j-1]=B[j];
										B[j]=B[i-1];
										B[i-1]=B[i];
										B[i]=B[N];
										j--;
										i--;
										Max--;
										B[N]=B[Max];
									}
									else
									{
										if (k<i)
										{
											N--;
											B[k]=B[i-1];
											B[i-1]=B[i];
											B[i]=B[N];
											i--;
											Max--;
											B[N]=B[Max];
										}
										else
										{
											if (k==i)
											{
												N--;
												B[i]=B[N];
												i--;
												j=0;
												Max--;
												B[N]=B[Max];
											}
											else
											{
												N--;
												B[k]=B[N];
												Max--;
												B[N]=B[Max];
											}
										}
									}					
								}
								else k++;
							}
							while (k<Max)
							{
								if (PlusInteressant(tmp,B[k]) && ContenuListesTriees(B[k]->var,B[k]->Nvar,tmp->var,tmp->Nvar))
								{
									freeSolver(B[k]);
									Max--;
									B[k]=B[Max];
								}
								else k++;
							}
							if (tmp->sortie<=0) // En test
							{
								freeSolver(Sol);
								Sol=tmp;
								temps_sol=tmp->temps;
								memoire_sol=tmp->memoire;
							}
							else
							{
								/* On ajoute la boite à la liste et on continue */
								if (Max==Alloue)
								{
									Alloue=2*Alloue;
									B=realloc(B,Alloue*sizeof(Solver));					
								}
								/*printf(" Solver union :");
								PrintVarSolver(tmp);
								getchar();*/
								B[Max]=tmp;
								Max++;
							}
						}
						else freeSolver(tmp);
					}
					else freeSolver(tmp);
				}
				j--;
			}
			i++;
			if (i%0x10==0)
			{
				printf("\ri=%d, N=%d, Max=%d",i,N,Max);
				fflush(stdout);
			}
		}
	}
	printf("\ri=%d, N=%d, Max=%d\n",i,N,Max);
	fflush(stdout);
	if (Sol!=NULL) // En test
	{
		Solver * __restrict B1_tmp=malloc(N1*sizeof(Solver));
		int N1_tmp = 0;
		SysEqLin F = EsachantX(Sol->var,Sol->Nvar,E);
		for (i = 0; i < N1; i++)
		{
			B1_tmp[N1_tmp]=AjusteSolver(B1[i],F);
			if (B1_tmp[N1_tmp]!=NULL) N1_tmp++;
		}
		if (N1_tmp!=0)
		{
			int N_tmp;
			Solver * __restrict B_tmp = ExhaustiveSearch(B1_tmp,N1_tmp,t,m,&N_tmp,F);
			B=realloc(B,(N+N_tmp)*sizeof(Solver));
			for (i = 0; i < N_tmp; i++)
			{
				B[N++]=UnionSolver2(B_tmp[i],Sol,E);
				freeSolver(B_tmp[i]);
			}
			free(B_tmp);
			freeSolver(Sol);
		}
		else
		{
			B=realloc(B,(N+1)*sizeof(Solver));
			B[N++]=Sol;
		}
		freeSysEq(F);
		for (i = 0; i < N1_tmp; i++) freeSolver(B1_tmp[i]);
		free(B1_tmp);
	}
	else B=realloc(B,N*sizeof(Solver));
	*taille=N;
	return B;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x10(%rbp), %eax
jle 0x208fe
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
shll %eax
movl %eax, -0x2c(%rbp)
movslq -0x2c(%rbp), %rdi
shlq $0x3, %rdi
callq 0x21c0
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x20962
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x9380
movq %rax, %rdx
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x3c(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x20925
movl $0x0, -0x44(%rbp)
leaq 0x18376(%rip), %rdi     # 0x38ce6
movb $0x0, %al
callq 0x2100
movq $0x0, -0x50(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x20a69
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x0, 0x14(%rax)
jg 0x20a59
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
cmpl -0x54(%rbp), %eax
jl 0x20a17
xorl %eax, %eax
cmpl $0x0, -0x54(%rbp)
movb %al, -0xa1(%rbp)
je 0x209f4
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x10(%rax), %eax
cmpl -0x58(%rbp), %eax
setl %al
movb %al, -0xa1(%rbp)
movb -0xa1(%rbp), %al
movb %al, %cl
andb $0x1, %cl
movzbl %cl, %edx
movq -0x38(%rbp), %rcx
movslq -0x40(%rbp), %rsi
movq (%rcx,%rsi,8), %rcx
movl %edx, 0xc(%rcx)
testb $0x1, %al
jne 0x20a17
jmp 0x20a59
movq -0x50(%rbp), %rdi
callq 0x93b0
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x9380
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x10(%rax), %eax
movl %eax, -0x58(%rbp)
jmp 0x20a5b
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x20995
movl $0x0, -0x40(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
je 0x211e9
movq -0x38(%rbp), %rdi
movslq -0x44(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movl -0x3c(%rbp), %esi
subl -0x44(%rbp), %esi
callq 0x9f60
movl -0x3c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x211e4
movl -0x40(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jl 0x211a0
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x14(%rax), %eax
cmpl -0x14(%rbp), %eax
jle 0x20ae7
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x14(%rax), %eax
cmpl -0x14(%rbp), %eax
jg 0x21192
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %esi
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rdx
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %ecx
callq 0x3360
cmpl $0x0, %eax
jne 0x21192
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %esi
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rdx
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %ecx
callq 0x3360
cmpl $0x0, %eax
jne 0x21192
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x28(%rbp), %rdx
movl -0x10(%rbp), %ecx
callq 0xac00
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x21187
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0x10(%rbp), %eax
jg 0x21187
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0x54(%rbp), %eax
jl 0x20bea
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0x54(%rbp), %eax
jne 0x21187
movq -0x68(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x58(%rbp), %eax
jge 0x21187
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x20cc5
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %eax
movq -0x68(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jl 0x20cb5
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x14(%rax), %eax
movq -0x68(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jg 0x20cb5
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
movq -0x68(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0x20c7d
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
movq -0x68(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0x20cb5
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x10(%rax), %eax
movq -0x68(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jg 0x20cb5
movq -0x68(%rbp), %rax
movq (%rax), %rdi
movq -0x68(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rdx
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %ecx
callq 0x3360
cmpl $0x0, %eax
je 0x20cb5
jmp 0x20cc5
jmp 0x20cb7
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x20bf1
movl -0x6c(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jne 0x2117c
movq -0x68(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x8(%rbp), %rdx
movl -0xc(%rbp), %ecx
callq 0xb440
movq %rax, -0x78(%rbp)
movq -0x68(%rbp), %rdi
callq 0x93b0
movq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x21001
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0x8(%rcx), %eax
jl 0x20ff3
movq -0x68(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0x14(%rcx), %eax
jg 0x20ff3
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0xc(%rcx), %eax
jl 0x20d95
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0xc(%rcx), %eax
jne 0x20ff3
movq -0x68(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0x10(%rcx), %eax
jg 0x20ff3
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %esi
movq -0x68(%rbp), %rax
movq (%rax), %rdx
movq -0x68(%rbp), %rax
movl 0x8(%rax), %ecx
callq 0x3360
cmpl $0x0, %eax
je 0x20ff3
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x93b0
movl -0x6c(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0x20eb9
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movl -0x5c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movl -0x5c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x5c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x20ff1
movl -0x6c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x20f4f
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x20fef
movl -0x6c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x20fab
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x20fed
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x20fef
jmp 0x20ff1
jmp 0x20ffc
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x20d01
jmp 0x21003
movl -0x6c(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x2110b
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0x8(%rcx), %eax
jl 0x210fd
movq -0x68(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0x14(%rcx), %eax
jg 0x210fd
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0xc(%rcx), %eax
jl 0x21093
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0xc(%rcx), %eax
jne 0x210fd
movq -0x68(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0x10(%rcx), %eax
jg 0x210fd
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %esi
movq -0x68(%rbp), %rax
movq (%rax), %rdx
movq -0x68(%rbp), %rax
movl 0x8(%rax), %ecx
callq 0x3360
cmpl $0x0, %eax
je 0x210fd
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x93b0
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x38(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x21106
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x21003
movq -0x68(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jg 0x2113c
movq -0x50(%rbp), %rdi
callq 0x93b0
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x68(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x58(%rbp)
jmp 0x2117a
movl -0x3c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jne 0x21161
movl -0x2c(%rbp), %eax
shll %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
shlq $0x3, %rsi
callq 0x21f0
movq %rax, -0x38(%rbp)
movq -0x68(%rbp), %rdx
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x21185
movq -0x68(%rbp), %rdi
callq 0x93b0
jmp 0x21190
movq -0x68(%rbp), %rdi
callq 0x93b0
jmp 0x21192
movl -0x5c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x20ab1
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x211df
movl -0x40(%rbp), %esi
movl -0x44(%rbp), %edx
movl -0x3c(%rbp), %ecx
leaq 0x17b33(%rip), %rdi     # 0x38cfc
movb $0x0, %al
callq 0x2100
movq 0x1bdf1(%rip), %rax     # 0x3cfc8
movq (%rax), %rdi
callq 0x21d0
jmp 0x20a9c
jmp 0x20a70
movl -0x40(%rbp), %esi
movl -0x44(%rbp), %edx
movl -0x3c(%rbp), %ecx
leaq 0x17b17(%rip), %rdi     # 0x38d10
movb $0x0, %al
callq 0x2100
movq 0x1bdc1(%rip), %rax     # 0x3cfc8
movq (%rax), %rdi
callq 0x21d0
cmpq $0x0, -0x50(%rbp)
je 0x21404
movslq -0xc(%rbp), %rdi
shlq $0x3, %rdi
callq 0x21c0
movq %rax, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq -0x50(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x28(%rbp), %rdx
callq 0x11aa0
movq %rax, -0x90(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x212ba
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x90(%rbp), %rsi
callq 0xd300
movq %rax, %rdx
movq -0x80(%rbp), %rax
movslq -0x84(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x80(%rbp), %rax
movslq -0x84(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x212ad
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x212af
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x2125a
cmpl $0x0, -0x84(%rbp)
je 0x2138b
movq -0x80(%rbp), %rdi
movl -0x84(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movq -0x90(%rbp), %r9
leaq -0x94(%rbp), %r8
callq 0x208d0
movq %rax, -0xa0(%rbp)
movq -0x38(%rbp), %rdi
movl -0x44(%rbp), %eax
addl -0x94(%rbp), %eax
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x21f0
movq %rax, -0x38(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x94(%rbp), %eax
jge 0x21374
movq -0xa0(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x50(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xaf70
movq %rax, %rdx
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x44(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0xa0(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x93b0
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x21315
movq -0xa0(%rbp), %rdi
callq 0x2030
movq -0x50(%rbp), %rdi
callq 0x93b0
jmp 0x213bf
movq -0x38(%rbp), %rdi
movl -0x44(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x21f0
movq %rax, -0x38(%rbp)
movq -0x50(%rbp), %rdx
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x44(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x90(%rbp), %rdi
callq 0x12220
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x84(%rbp), %eax
jge 0x213f9
movq -0x80(%rbp), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x93b0
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x213d2
movq -0x80(%rbp), %rdi
callq 0x2030
jmp 0x21419
movq -0x38(%rbp), %rdi
movslq -0x44(%rbp), %rsi
shlq $0x3, %rsi
callq 0x21f0
movq %rax, -0x38(%rbp)
movl -0x44(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nop