LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Solver.c
// Function: ReduireSolvers_tmp
int ReduireSolvers_tmp(Solver *B, int Nsolvers, SysEqLin E, int DejaTester)  // Comme ci-dessous mais la liste restreinte au "DejaTester" premiers éléments est dejà réduite.
{
	int i=DejaTester;
	while (i<Nsolvers)
	{
		int j=i-1;
		while (j>=0)
		{
			//Solver tmp=UnionSolver(B[i],B[j],E);
			Solver tmp=UnionSolverBorne(B[i],B[j],E,min(B[i]->sortie,B[j]->sortie));
			//if (PlusInteressant(tmp,B[i]) && PlusInteressant(tmp,B[j]))
			if (tmp!=NULL && PlusInteressant_NoVars(tmp,B[i]) && PlusInteressant_NoVars(tmp,B[j]))
			{
				freeSolver(B[i]);
				Nsolvers--;
				B[i]=B[Nsolvers];
				freeSolver(B[j]);
				i--;
				B[j]=B[i];
				B[i]=tmp;
				j=i-1;
			}
			else
			{
				freeSolver(tmp);
				j--;
			}
		}
		i++;
	}
	return Nsolvers;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
cmpl %esi, %ecx
jge 0x832f
movl %ecx, %r12d
movq %rdx, %r14
movq %rdi, %r15
testl %r12d, %r12d
jle 0x8321
leal -0x1(%r12), %ebp
movslq %r12d, %rbx
movq (%r15,%rbx,8), %rdi
movl %ebp, %ebp
movq (%r15,%rbp,8), %rsi
movl 0x14(%rdi), %eax
movl 0x14(%rsi), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movq %r14, %rdx
callq 0x7ff0
movq %rax, %r13
testq %rax, %rax
je 0x830f
movl 0x14(%r13), %eax
movq (%r15,%rbx,8), %rdi
cmpl 0x14(%rdi), %eax
jg 0x830f
movl 0xc(%r13), %ecx
cmpl 0xc(%rdi), %ecx
jge 0x82f7
movq (%r15,%rbp,8), %rdx
cmpl 0x14(%rdx), %eax
jg 0x830f
cmpl 0xc(%rdx), %ecx
jge 0x8304
callq 0x7447
movl 0x4(%rsp), %ecx
movslq %ecx, %rax
decl %ecx
movl %ecx, 0x4(%rsp)
movq -0x8(%r15,%rax,8), %rax
movq %rax, (%r15,%rbx,8)
movq (%r15,%rbp,8), %rdi
callq 0x7447
leal -0x1(%rbx), %r12d
movq -0x8(%r15,%rbx,8), %rax
movq %rax, (%r15,%rbp,8)
movq %r13, -0x8(%r15,%rbx,8)
leal -0x2(%rbx), %ebp
jmp 0x8319
jne 0x830f
movl 0x10(%r13), %edx
cmpl 0x10(%rdi), %edx
jle 0x82ae
jmp 0x830f
jne 0x830f
movl 0x10(%r13), %eax
cmpl 0x10(%rdx), %eax
jle 0x82bc
movq %r13, %rdi
callq 0x7447
decl %ebp
testl %ebp, %ebp
jns 0x8270
incl %r12d
cmpl 0x4(%rsp), %r12d
jl 0x8262
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Solver.c
// Function: PropagateSolver
Solver PropagateSolver(Solver B, SysEqLin E, Solver *B1, int N1) // Renvoi la solver B augmentée gratuitement avec le maximum de solvers de la liste B1
{
	Solver B2=copySolver(B);
	int i=0;
	while (i < N1)
	{
		Solver tmp=UnionSolverBorne(B2,B1[i],E,B2->sortie);
		if (tmp==NULL || !PlusInteressant_NoVars(tmp,B2)) // cas où la solver n'est pas améliorée "gratuitement" (cas le plus fréquent)
		{
			freeSolver(tmp);
			i++;
		}
		else
		{
			Solver tmp2=B1[i];
			N1--;
			B1[i]=B1[N1];
			B1[N1]=tmp2;
			if (tmp->Nvar==B2->Nvar) freeSolver(tmp); // cas B1[i] contenue dans B2
			else // cas où l'on améliore "gratuitement" la solver B2
			{
				freeSolver(B2);
				B2=tmp;
				i=0;
			}
			
		}
	}
	return B2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, (%rsp)
movq %rdi, %r12
testq %rdi, %rdi
je 0x840d
incl 0x1c(%r12)
testl %ebx, %ebx
jle 0x84a7
xorl %ebp, %ebp
movslq %ebp, %r15
movq (%r14,%r15,8), %rsi
movl 0x14(%r12), %ecx
movq %r12, %rdi
movq (%rsp), %rdx
callq 0x7ff0
movq %rax, %r13
testq %rax, %rax
je 0x8442
movl 0x14(%r13), %eax
cmpl 0x14(%r12), %eax
jle 0x8452
movq %r13, %rdi
callq 0x7447
incl %ebp
cmpl %ebx, %ebp
jl 0x8417
jmp 0x84a7
movl 0xc(%r12), %eax
cmpl %eax, 0xc(%r13)
jge 0x8489
movq (%r14,%r15,8), %rax
movslq %ebx, %rcx
decl %ebx
movq -0x8(%r14,%rcx,8), %rdx
movq %rdx, (%r14,%r15,8)
movq %rax, -0x8(%r14,%rcx,8)
movl 0x8(%r13), %eax
cmpl 0x8(%r12), %eax
jne 0x8498
movq %r13, %rdi
callq 0x7447
jmp 0x844c
jne 0x8442
movl 0x10(%r13), %eax
cmpl 0x10(%r12), %eax
jg 0x8442
jmp 0x845d
movq %r12, %rdi
callq 0x7447
xorl %ebp, %ebp
movq %r13, %r12
jmp 0x844c
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Solver.c
// Function: PropagateSolver2
Solver PropagateSolver2(Solver B, SysEqLin E, Solver *B1, int N1) // Pareil que PropagateSolver mais la mémoire ne compte pas
{
	Solver B2=copySolver(B);
	int i=0;
	while (i < N1)
	{
		Solver tmp=UnionSolverBorne(B2,B1[i],E,B2->sortie);
		if (tmp==NULL) i++;
		else
		{
			if (!PlusInteressant_NoVarsNoMem(tmp,B2)) // cas où la solver n'est pas améliorée "gratuitement" (cas le plus fréquent)
			{
				freeSolver(tmp);
				i++;
			}
			else
			{
				Solver tmp2=B1[i];
				N1--;
				B1[i]=B1[N1];
				B1[N1]=tmp2;
				if (tmp->Nvar==B2->Nvar) freeSolver(tmp); // cas B1[i] contenue dans B2
				else // cas où l'on améliore "gratuitement" la solver B2
				{
					freeSolver(B2);
					B2=tmp;
					i=0;
				}
			}
		}
	}
	return B2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, (%rsp)
movq %rdi, %r12
testq %rdi, %rdi
je 0x84da
incl 0x1c(%r12)
testl %ebx, %ebx
jle 0x8564
xorl %ebp, %ebp
movslq %ebp, %r15
movq (%r14,%r15,8), %rsi
movl 0x14(%r12), %ecx
movq %r12, %rdi
movq (%rsp), %rdx
callq 0x7ff0
testq %rax, %rax
je 0x8521
movq %rax, %r13
movl 0x14(%rax), %eax
cmpl 0x14(%r12), %eax
jg 0x8519
movl 0xc(%r13), %eax
cmpl 0xc(%r12), %eax
jle 0x8529
movq %r13, %rdi
callq 0x7447
incl %ebp
cmpl %ebx, %ebp
jl 0x84e4
jmp 0x8564
movq (%r14,%r15,8), %rax
movslq %ebx, %rcx
decl %ebx
movq -0x8(%r14,%rcx,8), %rdx
movq %rdx, (%r14,%r15,8)
movq %rax, -0x8(%r14,%rcx,8)
movl 0x8(%r13), %eax
cmpl 0x8(%r12), %eax
jne 0x8555
movq %r13, %rdi
callq 0x7447
jmp 0x8523
movq %r12, %rdi
callq 0x7447
xorl %ebp, %ebp
movq %r13, %r12
jmp 0x8523
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Solver.c
// Function: DeleteVariable
Solver DeleteVariable(int x, Solver B, SysEqLin E)
{
	if (B==NULL) return NULL;
	if (SearchElement(x,B->var,B->Nvar)==-1) return copySolver(B);
	if (B->type == 0) return NULL;
	Solver f2 = DeleteVariable(x,B->fils2,E);
	if (f2==NULL) return DeleteVariable(x,B->fils1,E);
	Solver f1;
	if (B->type==1) f1 = DeleteVariable(x,B->fils1,E);
	else
	{
		SysEqLin F = EsachantX(B->fils2->var,B->fils2->Nvar,E);
		f1 = DeleteVariable(x,B->fils1,F);
		freeSysEq(F);
	}
	if (f1 == NULL) return f2;
	if (B->type==2)
	{
		Solver result = NewSolver();
		result->var=DifferenceListesTriees(B->var,B->Nvar,&x,1,&result->Nvar);
		result->temps=max(f2->temps,max(0,f2->sortie)+f1->temps);
		result->memoire=max(f1->memoire,f2->memoire);
		result->sortie=max(0,f2->sortie)+max(0,f1->sortie);
		result->type=2;
		result->fils1 = f1;
		result->fils2 = f2;
		return result;
	}
	else
	{
		Solver result = UnionSolver(f1,f2,E);
		freeSolver(f1);
		freeSolver(f2);
		return result;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x85c4
movq %rdx, %r15
movq %rsi, %r14
movl %edi, %ebp
movq (%r14), %rsi
movl 0x8(%r14), %edx
movl %ebp, %edi
callq 0x2af1
cmpl $-0x1, %eax
je 0x85d9
cmpb $0x0, 0x18(%r14)
je 0x85c4
movq 0x28(%r14), %rsi
movl %ebp, %edi
movq %r15, %rdx
callq 0x8576
testq %rax, %rax
jne 0x85df
movq 0x20(%r14), %r14
testq %r14, %r14
jne 0x858e
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl 0x1c(%r14)
jmp 0x85c7
movq %rax, %rbx
movl %ebp, 0x4(%rsp)
cmpb $0x1, 0x18(%r14)
jne 0x8600
movq 0x20(%r14), %rsi
movl %ebp, %edi
movq %r15, %rdx
callq 0x8576
movq %rax, %r12
jmp 0x862e
movq 0x28(%r14), %rax
movq (%rax), %rdi
movl 0x8(%rax), %esi
movq %r15, %rdx
callq 0xc29a
movq %rax, %r13
movq 0x20(%r14), %rsi
movl %ebp, %edi
movq %rax, %rdx
callq 0x8576
movq %rax, %r12
movq %r13, %rdi
callq 0xc82d
testq %r12, %r12
je 0x86ba
cmpb $0x2, 0x18(%r14)
jne 0x86c2
callq 0x7394
movq %rax, %r15
movq (%r14), %rdi
movl 0x8(%r14), %esi
leaq 0x8(%rax), %r8
leaq 0x4(%rsp), %rdx
movl $0x1, %ecx
callq 0x298a
movq %rax, (%r15)
movl 0x14(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movl 0xc(%rbx), %edx
movl 0xc(%r12), %esi
addl %eax, %esi
cmpl %esi, %edx
cmovgl %edx, %esi
movl %esi, 0xc(%r15)
movl 0x10(%r12), %edx
movl 0x10(%rbx), %esi
cmpl %esi, %edx
cmovgl %edx, %esi
movl %esi, 0x10(%r15)
movl 0x14(%r12), %edx
testl %edx, %edx
cmovgl %edx, %ecx
addl %eax, %ecx
movl %ecx, 0x14(%r15)
movb $0x2, 0x18(%r15)
movq %r12, 0x20(%r15)
movq %rbx, 0x28(%r15)
movq %r15, %r14
jmp 0x85c7
movq %rbx, %r14
jmp 0x85c7
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x7f14
movq %rax, %r14
movq %r12, %rdi
callq 0x7447
movq %rbx, %rdi
callq 0x7447
jmp 0x85c7
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: NouvelleLigneCreuse
LigneCreuse NouvelleLigneCreuse(void) // Renvoi l'adresse d'une SOLVER disponible
{
	static int Initialiser_Espace = 1;
		
	if (Nombre_de_LigneCreuse_disponible_pour_allocation) return Espace_LigneCreuse_pour_allocation[--Nombre_de_LigneCreuse_disponible_pour_allocation];
	else
	{
		if (Initialiser_Espace)
		{
			Initialiser_Espace = 0;
			Espace_LigneCreuse_pour_allocation = malloc(TAILLE_BLOC_POUR_ALLOCATION_Espace*sizeof(LigneCreuse));
			Taille_Espace_LigneCreuse_pour_allocation = TAILLE_BLOC_POUR_ALLOCATION_Espace;
		}
		LIGNECREUSE * __restrict tmp = malloc(TAILLE_BLOC_POUR_ALLOCATION_Espace*sizeof(LIGNECREUSE));
		int i;
		for (i = 0; i < TAILLE_BLOC_POUR_ALLOCATION_Espace; i++)
		{
			Espace_LigneCreuse_pour_allocation[i]=tmp++;
			Espace_LigneCreuse_pour_allocation[i]->parents=1;
		}
		Nombre_de_LigneCreuse_disponible_pour_allocation = TAILLE_BLOC_POUR_ALLOCATION_Espace;
		return Espace_LigneCreuse_pour_allocation[--Nombre_de_LigneCreuse_disponible_pour_allocation];
	}
}

// Assembly:
pushq %rbx
movslq 0x286a0(%rip), %rax     # 0x322d8
testq %rax, %rax
je 0x9c58
leaq -0x1(%rax), %rcx
movl %ecx, 0x28691(%rip)     # 0x322d8
leaq -0x8(,%rax,8), %rbx
addq 0x2868a(%rip), %rbx     # 0x322e0
jmp 0x9cd2
cmpb $0x1, 0x28689(%rip)     # 0x322e8
jne 0x9c6a
movq 0x28678(%rip), %rbx     # 0x322e0
jmp 0x9c8f
movb $0x1, 0x28677(%rip)     # 0x322e8
movl $0x13880, %edi          # imm = 0x13880
callq 0x21d0
movq %rax, %rbx
movq %rax, 0x2865b(%rip)     # 0x322e0
movl $0x2710, 0x2864d(%rip)  # imm = 0x2710
movl $0x3a980, %edi          # imm = 0x3A980
callq 0x21d0
xorl %ecx, %ecx
movq %rax, (%rbx,%rcx,8)
addq $0x18, %rax
movq 0x28636(%rip), %rbx     # 0x322e0
movq (%rbx,%rcx,8), %rdx
movl $0x1, 0x10(%rdx)
incq %rcx
cmpq $0x2710, %rcx           # imm = 0x2710
jne 0x9c9b
movl $0x270f, 0x2860d(%rip)  # imm = 0x270F
addq $0x13878, %rbx          # imm = 0x13878
movq (%rbx), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: freeLigneCreuse
void freeLigneCreuse(LigneCreuse a) // libère la mémoire associée à une LigneCreuse
{
	if (a!=NULL)
	{
		(a->parents)--;
		if (!a->parents) // elle n'est plus utilisée
		{
			free(a->elements);
			a->parents=1;
			if (Taille_Espace_LigneCreuse_pour_allocation == Nombre_de_LigneCreuse_disponible_pour_allocation)
			{
				Taille_Espace_LigneCreuse_pour_allocation+= TAILLE_BLOC_POUR_ALLOCATION_Espace;
				Espace_LigneCreuse_pour_allocation = realloc(Espace_LigneCreuse_pour_allocation, Taille_Espace_LigneCreuse_pour_allocation*sizeof(LigneCreuse));
			}
			Espace_LigneCreuse_pour_allocation[Nombre_de_LigneCreuse_disponible_pour_allocation++]=a;
		}
	}
}

// Assembly:
testq %rdi, %rdi
je 0x9d54
pushq %rbx
movq %rdi, %rbx
decl 0x10(%rdi)
jne 0x9d53
movq 0x8(%rbx), %rdi
callq 0x2030
movl $0x1, 0x10(%rbx)
movslq 0x285d4(%rip), %rdx     # 0x322dc
movl 0x285ca(%rip), %ecx     # 0x322d8
movq 0x285cb(%rip), %rax     # 0x322e0
cmpl %ecx, %edx
jne 0x9d43
leaq 0x2710(%rdx), %rcx
movl %ecx, 0x285b6(%rip)     # 0x322dc
leaq 0x13880(,%rdx,8), %rsi
movq %rax, %rdi
callq 0x2200
movq %rax, 0x285a3(%rip)     # 0x322e0
movl 0x28595(%rip), %ecx     # 0x322d8
leal 0x1(%rcx), %edx
movl %edx, 0x2858c(%rip)     # 0x322d8
movslq %ecx, %rcx
movq %rbx, (%rax,%rcx,8)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: NouvelleMatriceCreuse
MatriceCreuse NouvelleMatriceCreuse(void) // Renvoi l'adresse d'une SOLVER disponible
{
	static int Initialiser_Espace = 1;
		
	if (Nombre_de_MatriceCreuse_disponible_pour_allocation) return Espace_MatriceCreuse_pour_allocation[--Nombre_de_MatriceCreuse_disponible_pour_allocation];
	else
	{
		if (Initialiser_Espace)
		{
			Initialiser_Espace = 0;
			Espace_MatriceCreuse_pour_allocation = malloc(TAILLE_BLOC_POUR_ALLOCATION_Espace*sizeof(MatriceCreuse));
			Taille_Espace_MatriceCreuse_pour_allocation = TAILLE_BLOC_POUR_ALLOCATION_Espace;
		}
		MATRICECREUSE * __restrict tmp = malloc(TAILLE_BLOC_POUR_ALLOCATION_Espace*sizeof(MATRICECREUSE));
		int i;
		for (i = 0; i < TAILLE_BLOC_POUR_ALLOCATION_Espace; i++)
		{
			Espace_MatriceCreuse_pour_allocation[i]=tmp++;
			Espace_MatriceCreuse_pour_allocation[i]->parents=1;
		}
		Nombre_de_MatriceCreuse_disponible_pour_allocation = TAILLE_BLOC_POUR_ALLOCATION_Espace;
		return Espace_MatriceCreuse_pour_allocation[--Nombre_de_MatriceCreuse_disponible_pour_allocation];
	}
}

// Assembly:
pushq %rbx
movslq 0x2858f(%rip), %rax     # 0x322ec
testq %rax, %rax
je 0x9d7d
leaq -0x1(%rax), %rcx
movl %ecx, 0x28580(%rip)     # 0x322ec
leaq -0x8(,%rax,8), %rbx
addq 0x2857d(%rip), %rbx     # 0x322f8
jmp 0x9df7
cmpb $0x1, 0x2857c(%rip)     # 0x32300
jne 0x9d8f
movq 0x2856b(%rip), %rbx     # 0x322f8
jmp 0x9db4
movb $0x1, 0x2856a(%rip)     # 0x32300
movl $0x13880, %edi          # imm = 0x13880
callq 0x21d0
movq %rax, %rbx
movq %rax, 0x2854e(%rip)     # 0x322f8
movl $0x2710, 0x2853c(%rip)  # imm = 0x2710
movl $0x3a980, %edi          # imm = 0x3A980
callq 0x21d0
xorl %ecx, %ecx
movq %rax, (%rbx,%rcx,8)
addq $0x18, %rax
movq 0x28529(%rip), %rbx     # 0x322f8
movq (%rbx,%rcx,8), %rdx
movl $0x1, 0x10(%rdx)
incq %rcx
cmpq $0x2710, %rcx           # imm = 0x2710
jne 0x9dc0
movl $0x270f, 0x284fc(%rip)  # imm = 0x270F
addq $0x13878, %rbx          # imm = 0x13878
movq (%rbx), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: freeMatriceCreuse
void freeMatriceCreuse(MatriceCreuse a) // libère la mémoire associée à une MatriceCreuse
{
	if (a!=NULL)
	{
		(a->parents)--;
		if (!a->parents) // elle n'est plus utilisée
		{
			int i;
			for (i = 0; i < a->nombre_de_lignes; i++) freeLigneCreuse(a->ligne[i]);
			free(a->ligne);
			a->parents=1;
			if (Taille_Espace_MatriceCreuse_pour_allocation == Nombre_de_MatriceCreuse_disponible_pour_allocation)
			{
				Taille_Espace_MatriceCreuse_pour_allocation+= TAILLE_BLOC_POUR_ALLOCATION_Espace;
				Espace_MatriceCreuse_pour_allocation = realloc(Espace_MatriceCreuse_pour_allocation, Taille_Espace_MatriceCreuse_pour_allocation*sizeof(MatriceCreuse));
			}
			Espace_MatriceCreuse_pour_allocation[Nombre_de_MatriceCreuse_disponible_pour_allocation++]=a;
		}
	}
}

// Assembly:
testq %rdi, %rdi
je 0x9eaa
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
decl 0x10(%rdi)
jne 0x9ea3
cmpl $0x0, (%rbx)
jle 0x9e41
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x9ce3
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x9e29
movq 0x8(%rbx), %rdi
callq 0x2030
movl $0x1, 0x10(%rbx)
movslq 0x28498(%rip), %rdx     # 0x322f0
movl 0x2848e(%rip), %ecx     # 0x322ec
movq 0x28493(%rip), %rax     # 0x322f8
cmpl %ecx, %edx
jne 0x9e93
leaq 0x2710(%rdx), %rcx
movl %ecx, 0x2847a(%rip)     # 0x322f0
leaq 0x13880(,%rdx,8), %rsi
movq %rax, %rdi
callq 0x2200
movq %rax, 0x2846b(%rip)     # 0x322f8
movl 0x28459(%rip), %ecx     # 0x322ec
leal 0x1(%rcx), %edx
movl %edx, 0x28450(%rip)     # 0x322ec
movslq %ecx, %rcx
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: TriLignesCreusesByNNZ
void TriLignesCreusesByNNZ(LigneCreuse * __restrict tableau, const int longueur)
{
	const int gap[8]={1, 4, 10, 23, 57, 132, 301, 701};
	int i=2;
	while (i<8 && gap[i]<longueur) i++;
    while(i>0)
    {
         i--;
         int j;
         for (j=gap[i];j<longueur;j++)
         {
             LigneCreuse valeur=tableau[j];
             int k=j;
             while((k>(gap[i]-1)) && (tableau[k-gap[i]]->nnz>valeur->nnz))
             {
				 tableau[k]=tableau[k-gap[i]];
				 k=k-gap[i];
             }
             tableau[k]=valeur;
         }
	 }
}

// Assembly:
movl $0x2, %ecx
leaq 0x1eed1(%rip), %rax     # 0x29390
cmpl %esi, (%rax,%rcx,4)
jge 0xa4d2
incq %rcx
cmpq $0x8, %rcx
jne 0xa4bf
movl $0x8, %ecx
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %ecx
movslq %esi, %rdx
movslq -0x4(%rax,%rcx,4), %r8
cmpl %esi, %r8d
jge 0xa530
xorl %r9d, %r9d
movq %r8, %r10
movq (%rdi,%r10,8), %r11
movl %r10d, %ebx
cmpq %r8, %r10
jl 0xa51e
movl (%r11), %ebp
movl %r9d, %ebx
movslq %ebx, %r14
movq (%rdi,%r14,8), %r14
cmpl %ebp, (%r14)
jle 0xa51b
leal (%r8,%rbx), %r15d
movslq %r15d, %r15
movq %r14, (%rdi,%r15,8)
subl %r8d, %ebx
jge 0xa4ff
addl %r8d, %ebx
movslq %ebx, %rbx
movq %r11, (%rdi,%rbx,8)
incq %r10
incl %r9d
cmpq %rdx, %r10
jne 0xa4ed
leaq -0x1(%rcx), %r8
cmpq $0x2, %rcx
movq %r8, %rcx
jge 0xa4dd
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: PermuterVar
void PermuterVar(int a, int b, SysEqLin E) // Permute les variables a et b dans E
{
	int la=E->lignevar[a];
	int lb=E->lignevar[b];
	int i;
	for (i = 0; i < E->gen; i++) echangeligne(E->gen*la+i,E->gen*lb+i,E->mat,E->gen*VARIABLES,E->b);
	E->lignevar[a]=lb;
	E->lignevar[b]=la;
	E->varligne[la]=b;
	E->varligne[lb]=a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq 0x18(%rdx), %rax
movslq %edi, %rcx
movl (%rax,%rcx,4), %ebp
movslq %ebp, %rdx
movslq %esi, %r12
movl (%rax,%r12,4), %r15d
movslq %r15d, %rdi
movl 0x10(%rbx), %esi
testl %esi, %esi
jle 0xb479
movq %rdi, (%rsp)
movq %rdx, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
leaq 0x26e83(%rip), %rax     # 0x322b8
movl (%rax), %r13d
xorl %r14d, %r14d
movl %esi, %edi
imull %ebp, %edi
addl %r14d, %edi
movl %r13d, %ecx
imull %esi, %ecx
imull %r15d, %esi
addl %r14d, %esi
movq (%rbx), %rdx
movl 0xc(%rbx), %r8d
callq 0x313c
incl %r14d
movl 0x10(%rbx), %esi
cmpl %esi, %r14d
jl 0xb43b
movq 0x18(%rbx), %rax
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rdx
movq (%rsp), %rdi
movl %edi, (%rax,%rcx,4)
movl %edx, (%rax,%r12,4)
movq 0x20(%rbx), %rax
movl %r12d, (%rax,%rdx,4)
movl %ecx, (%rax,%rdi,4)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: ExtraireEX2
SysEqLin ExtraireEX2(int *var, int N, SysEqLin E) // Calcul E(X) (sous forme de SysEqLin)
{
	SysEqLin F=malloc(sizeof(SYSEQLIN));
	F->mat=malloc(E->gen*VARIABLES*sizeof(unsigned char *));
	int i;
	for (i = 0; i < E->gen*VARIABLES; i++) F->mat[i]=malloc(E->b*sizeof(unsigned char));
	F->b=ExtraireEX(F->mat,var,N,E);
	F->gen=E->gen;
	F->lignevar=malloc(VARIABLES*sizeof(int));
	F->varligne=malloc(VARIABLES*sizeof(int));
	for (i = 0; i < VARIABLES; i++) F->lignevar[i]=E->lignevar[i];
	for (i = 0; i < VARIABLES; i++) F->varligne[i]=E->varligne[i];
	for (i = 0; i < N; i++) PermuterVar(var[i],F->varligne[i],F);
	F->a=N*E->gen;
	F->initialise=0;
	return F;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, 0xc(%rsp)
movq %rdi, 0x10(%rsp)
movl $0x40, %edi
callq 0x21d0
movq %rax, %r14
movq %rbx, (%rsp)
movslq 0x10(%rbx), %r15
leaq 0x26350(%rip), %rax     # 0x322b8
movslq (%rax), %rbx
imulq %rbx, %r15
movq %r15, %rdi
shlq $0x3, %rdi
callq 0x21d0
movq %rax, %r13
movq %rax, (%r14)
testl %r15d, %r15d
jle 0xbfa9
movq (%rsp), %rax
movslq 0xc(%rax), %rbp
movl %r15d, %r15d
xorl %r12d, %r12d
movq %rbp, %rdi
callq 0x21d0
movq %rax, (%r13,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0xbf94
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %r12d
movl %r12d, %edx
movq (%rsp), %r15
movq %r15, %rcx
callq 0xb7c5
movl %eax, 0xc(%r14)
movl 0x10(%r15), %r15d
movl %r15d, 0x10(%r14)
leaq (,%rbx,4), %r13
movq %r13, %rdi
callq 0x21d0
movq %rax, %rbp
movq %rax, 0x18(%r14)
movq %r13, %rdi
callq 0x21d0
movq %rax, %r13
movq %rax, 0x20(%r14)
testl %ebx, %ebx
jle 0xc032
movq (%rsp), %rax
movq 0x18(%rax), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl %edx, (%rbp,%rcx,4)
incq %rcx
cmpq %rcx, %rbx
jne 0xc005
testl %ebx, %ebx
jle 0xc032
movq (%rsp), %rax
movq 0x20(%rax), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl %edx, (%r13,%rcx,4)
incq %rcx
cmpq %rcx, %rbx
jne 0xc022
testl %r12d, %r12d
jle 0xc064
movl %r12d, %ebx
xorl %r15d, %r15d
movq 0x10(%rsp), %rbp
movl (%rbp,%r15,4), %edi
movl (%r13,%r15,4), %esi
movq %r14, %rdx
callq 0xb3f1
incq %r15
cmpq %r15, %rbx
jne 0xc042
movq (%rsp), %rax
movl 0x10(%rax), %r15d
imull %r12d, %r15d
movl %r15d, 0x8(%r14)
movb $0x0, 0x28(%r14)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: ConversionSys
Equation * ConversionSys(SysEqLin E) // Convertit un SysEqLin en système d'équations, le résulat contient E->b équations.
{
	Equation * __restrict Eq=malloc(E->b*sizeof(Equation));
	int i;
	for (i = 0; i < E->b; i++)
	{
		Eq[i]=NulEq();
		int j;
		for (j = 0; j < VARIABLES; j++)
		{
			int k;
			for (k = 0; k < E->gen; k++)
			{
				Equation tmp=varEq(E->varligne[j]);
				if (k!=0)
				{
					Equation tmp1=appliqueS(tmp,k-1);
					freeEq(tmp);
					tmp=tmp1;
				}
				Equation tmp1=mulEq(E->mat[E->gen*j+k][i],tmp);
				freeEq(tmp);
				tmp=addEq(tmp1,Eq[i]);
				freeEq(Eq[i]);
				freeEq(tmp1);
				Eq[i]=tmp;
			}
		}
	}
	return Eq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq 0xc(%rdi), %r14
leaq (,%r14,8), %rdi
callq 0x21d0
movq %rax, 0x10(%rsp)
testq %r14, %r14
jle 0xc61c
leaq 0x25dac(%rip), %rax     # 0x322b8
movl (%rax), %eax
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
callq 0x4aa0
movq %rax, %r15
movq 0x10(%rsp), %rax
movq %r15, (%rax,%rbp,8)
cmpl $0x0, 0x18(%rsp)
jle 0xc60c
movl 0x10(%rbx), %eax
movq $0x0, 0x8(%rsp)
testl %eax, %eax
jle 0xc5ee
movslq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq 0x8(%rsp), %rcx
movl (%rax,%rcx,4), %edi
callq 0x4d63
movq %rax, %r12
testl %r14d, %r14d
je 0xc588
leal -0x1(%r14), %eax
movzbl %al, %esi
movq %r12, %rdi
callq 0x57d7
movq %rax, %r13
movq %r12, %rdi
callq 0x4ad9
movq %r13, %r12
movq (%rbx), %rax
movslq 0x10(%rbx), %rcx
imulq 0x20(%rsp), %rcx
addq %r14, %rcx
movq (%rax,%rcx,8), %rax
movzbl (%rax,%rbp), %edi
movq %r12, %rsi
callq 0x4e14
movq %rax, %r13
movq %r12, %rdi
callq 0x4ad9
movq %r13, %rdi
movq %r15, %rsi
callq 0x557f
movq %rax, %r12
movq %r15, %rdi
callq 0x4ad9
movq %r13, %rdi
callq 0x4ad9
movq 0x10(%rsp), %rax
movq %r12, (%rax,%rbp,8)
movl 0x10(%rbx), %eax
incq %r14
movq %r12, %r15
cmpl %eax, %r14d
jl 0xc552
jmp 0xc5f1
movq %r15, %r12
movq 0x8(%rsp), %rdx
incq %rdx
movq %r12, %r15
movq %rdx, 0x8(%rsp)
cmpq 0x18(%rsp), %rdx
jne 0xc53d
incq %rbp
movslq 0xc(%rbx), %rax
cmpq %rax, %rbp
jl 0xc515
movq 0x10(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: ConversionSys2
Equation * ConversionSys2(int *X, int n, SysEqLin E) // Convertit un SysEqLin en système d'équations
{
	/* Propriété speciale :
	 *		- le resulat a 2*E->b Equation
	 * 		- le resultat est à lire Eq[i] = Eq[ i + E->b], Eq[i] est en les variables X, 0 <= i < E->b
	 */
	 
	Tri(X,n);
	Equation * __restrict Eq=malloc(2*E->b*sizeof(Equation));
	int i;
	for (i = 0; i < E->b; i++)
	{
		Eq[i]=NulEq();
		Eq[i+E->b]=NulEq();
		int pos=0,j;
		for (j = 0; j < VARIABLES; j++)
		{
			int l;
			if (pos<n && j==X[pos])
			{
				l=i;
				pos++;
			}
			else l=i+E->b;
			int k;
			for (k = 0; k < E->gen; k++)
			{
				Equation tmp=varEq(j);
				if (k!=0)
				{
					Equation tmp1=appliqueS(tmp,k-1);
					freeEq(tmp);
					tmp=tmp1;
				}
				Equation tmp1=mulEq(E->mat[E->gen*E->lignevar[j]+k][i],tmp);
				freeEq(tmp);
				tmp=addEq(tmp1,Eq[l]);
				freeEq(Eq[l]);
				freeEq(tmp1);
				Eq[l]=tmp;
			}
		}
	}
	return Eq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rdi, 0x28(%rsp)
movl %esi, 0x1c(%rsp)
callq 0x2bf3
movq %r14, %rbx
movslq 0xc(%r14), %r14
movq %r14, %rdi
shlq $0x4, %rdi
callq 0x21d0
movq %rax, 0x8(%rsp)
testq %r14, %r14
jle 0xc7db
leaq 0x25c41(%rip), %rax     # 0x322b8
movl (%rax), %eax
movq %rax, 0x20(%rsp)
xorl %r15d, %r15d
movq %rbx, 0x30(%rsp)
callq 0x4aa0
movq 0x8(%rsp), %r14
movq %rax, (%r14,%r15,8)
callq 0x4aa0
movl 0xc(%rbx), %ecx
leal (%rcx,%r15), %edx
movslq %edx, %rdx
movq %rax, (%r14,%rdx,8)
cmpl $0x0, 0x20(%rsp)
jle 0xc7cc
xorl %ebp, %ebp
xorl %edx, %edx
movq %r15, 0x10(%rsp)
cmpl 0x1c(%rsp), %edx
jge 0xc6dc
movslq %edx, %rax
movq 0x28(%rsp), %rcx
movl (%rcx,%rax,4), %eax
cmpq %rax, %rbp
jne 0xc6dc
incl %edx
movl %edx, 0x4(%rsp)
movl %r15d, %eax
jmp 0xc6e6
movl %edx, 0x4(%rsp)
movl 0xc(%rbx), %eax
addl %r15d, %eax
cmpl $0x0, 0x10(%rbx)
jle 0xc7ac
cltq
movq %rax, 0x40(%rsp)
xorl %r12d, %r12d
movq %rbp, 0x38(%rsp)
movl %ebp, %edi
callq 0x4d63
movq %rax, %r13
testl %r12d, %r12d
je 0xc72c
leal -0x1(%r12), %eax
movzbl %al, %esi
movq %r13, %rdi
callq 0x57d7
movq %rax, %r14
movq %r13, %rdi
callq 0x4ad9
movq %r14, %r13
movq 0x10(%rsp), %rsi
movslq 0x10(%rbx), %rax
movq (%rbx), %rcx
movq 0x18(%rbx), %rdx
movslq (%rdx,%rbp,4), %rdx
imulq %rax, %rdx
addq %r12, %rdx
movq (%rcx,%rdx,8), %rax
movzbl (%rax,%rsi), %edi
movq %r13, %rsi
callq 0x4e14
movq %rax, %r14
movq %r13, %rdi
callq 0x4ad9
movq 0x8(%rsp), %r15
movq 0x40(%rsp), %rbp
movq (%r15,%rbp,8), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x557f
movq %rax, %rbx
movq %r13, %rdi
callq 0x4ad9
movq %r14, %rdi
callq 0x4ad9
movq %rbx, (%r15,%rbp,8)
movq 0x38(%rsp), %rbp
movq 0x30(%rsp), %rax
incq %r12
movq %rax, %rbx
cmpl 0x10(%rax), %r12d
jl 0xc6ff
movq %rbp, %rax
incq %rax
movq %rax, %rbp
cmpq 0x20(%rsp), %rax
movq 0x10(%rsp), %r15
movl 0x4(%rsp), %edx
jne 0xc6bb
movl 0xc(%rbx), %ecx
incq %r15
movslq %ecx, %rax
cmpq %rax, %r15
jl 0xc686
movq 0x8(%rsp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: freeSysEq
void freeSysEq(SysEqLin E) // Libère la mémoire occupée par E
{
	int i;
	for (i = 0; i < VARIABLES*E->gen; i++) free(E->mat[i]);
	free(E->mat);
	if (E->initialise)
	{
		for (i = 0; i < E->a/E->gen; i++)
		{
			freeMatriceCreuse(E->sousmat[E->varligne[i]]);
		}
		free(E->sousmat);
	}
	free(E->lignevar);
	free(E->varligne);
	free(E);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x25a7c(%rip), %rax     # 0x322b8
movslq (%rax), %r14
movl 0x10(%rdi), %eax
imull %r14d, %eax
testl %eax, %eax
jle 0xc869
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x2030
incq %r15
movslq 0x10(%rbx), %rax
imulq %r14, %rax
cmpq %rax, %r15
jl 0xc84d
movq (%rbx), %rdi
callq 0x2030
cmpb $0x0, 0x28(%rbx)
je 0xc8b4
movl 0x8(%rbx), %eax
cltd
idivl 0x10(%rbx)
testl %eax, %eax
jle 0xc8ab
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq 0x30(%rbx), %rcx
movslq (%rax,%r14,4), %rax
movq (%rcx,%rax,8), %rdi
callq 0x9e08
movl 0x8(%rbx), %eax
cltd
idivl 0x10(%rbx)
incq %r14
cltq
cmpq %rax, %r14
jl 0xc885
movq 0x30(%rbx), %rdi
callq 0x2030
movq 0x18(%rbx), %rdi
callq 0x2030
movq 0x20(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/main.c
// Function: display_usage
void display_usage(char *s) {
 	printf("Usage: %s -e <equations> -t <time> [-m <memory>] [-r <type>] [-X|-x] [-C|-c] [-h]\n", s); 
  printf("Options:\n");
  printf("\t-e, --equations\t   File of the system of equations to solve\n");
  printf("\t-t, --time\t   Max time complexity\n");
  printf("\t-m, --memory\t   Memory complexity (default: time = memory)\n");
  printf("\t-r, --type\t   Type of the search. See below (default: 3)\n");
  printf("\t-X, --xml\t   Generate the XML tree of the attack\n");
  printf("\t-x, --noxml\t   Do not generate the XML tree of the attack\n");
  printf("\t-C, --code\t   Do not generate the code of the attack\n");
  printf("\t-c, --nocode\t   Generate the code of the attack\n");
  /*printf("\t-M, --reducemem\t   Try to decrease the memory complexity\n");*/
  printf("\t-h, --help\t   Display this help menu\n");
  printf("\n");
  printf("Algorithms :\n"
         "\t0 : Randomized Search (default) \n"
         "\t1 : Exhaustive Search (Balanced Solver)\n"
         "\t2 : Exhaustive Search for Guess-and-Determine Solver\n"
         "\t3 : Randomized Search (Symetric) \n"
         "\t4 : Manual Search\n"
         );
}

// Assembly:
pushq %rax
movq %rdi, %rsi
leaq 0x1c98a(%rip), %rdi     # 0x294f5
xorl %eax, %eax
callq 0x2110
leaq 0x1cbb6(%rip), %rdi     # 0x2972f
callq 0x2090
leaq 0x1cbb3(%rip), %rdi     # 0x29738
callq 0x2090
leaq 0x1cbe4(%rip), %rdi     # 0x29775
callq 0x2090
leaq 0x1cbfb(%rip), %rdi     # 0x29798
callq 0x2090
leaq 0x1cc2b(%rip), %rdi     # 0x297d4
callq 0x2090
leaq 0x1cc59(%rip), %rdi     # 0x2980e
callq 0x2090
leaq 0x1cc7f(%rip), %rdi     # 0x29840
callq 0x2090
leaq 0x1ccae(%rip), %rdi     # 0x2987b
callq 0x2090
leaq 0x1ccd8(%rip), %rdi     # 0x298b1
callq 0x2090
leaq 0x1ccfd(%rip), %rdi     # 0x298e2
callq 0x2090
movl $0xa, %edi
callq 0x2040
leaq 0x1cd0d(%rip), %rdi     # 0x29908
popq %rax
jmp 0x2090
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/main.c
// Function: getXML
char* getXML(int t, int m, int r) {
  int 	len;
  char 	*sz;  
  char 	*sz2; 
  char 	*res;
  char  *tmp;
  
  len=strlen(eq_file);
  sz=eq_file;
  sz+=len-1;
	while(*--sz!='/');
  sz2=++sz;  
	while(*sz2++!='.');
  
  tmp=(char *)calloc(sz2-sz, sizeof(*res));
  strncpy(tmp, sz, sz2-sz-1);
  
  res=(char *)calloc(3+1+sz2-sz-1+1+2+1+2+1+2+4+1, sizeof(*res));
	sprintf(res, "xml/%s_%d-%d_%d.xml", tmp, t, m, r);
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
movq 0x25747(%rip), %r15     # 0x32380
movq %r15, %rdi
callq 0x20f0
decl %eax
cltq
addq %rax, %r15
incq %r15
cmpb $0x2f, -0x2(%r15)
leaq -0x1(%r15), %r15
jne 0xcc4b
xorl %r12d, %r12d
cmpb $0x2e, (%r15,%r12)
leaq 0x1(%r12), %r12
jne 0xcc59
movl $0x1, %esi
movq %r12, %rdi
callq 0x2160
movq %rax, %r13
leaq -0x1(%r12), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2060
addq $0x11, %r12
movl $0x1, %esi
movq %r12, %rdi
callq 0x2160
movq %rax, %r15
leaq 0x1c8c8(%rip), %rsi     # 0x29568
movq %rax, %rdi
movq %r13, %rdx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
xorl %eax, %eax
callq 0x2240
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/main.c
// Function: getCFile
char* getCFile(int t, int m, int r) {
  int 	len;
  char 	*sz;  
  char 	*sz2; 
  char 	*res;
  char  *tmp;
  
  len=strlen(eq_file);
  sz=eq_file;
  sz+=len-1;
	while(*--sz!='/');
  sz2=++sz;  
	while(*sz2++!='.');
  
  tmp=(char *)calloc(sz2-sz, sizeof(*res));
  strncpy(tmp, sz, sz2-sz-1);
  
  res=(char *)calloc(sz2-sz-1+1+2+1+2+1+2+1, sizeof(*res));
	sprintf(res, "%s_%d-%d_%d", tmp, t, m, r);
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
movq 0x2569f(%rip), %r15     # 0x32380
movq %r15, %rdi
callq 0x20f0
decl %eax
cltq
addq %rax, %r15
incq %r15
cmpb $0x2f, -0x2(%r15)
leaq -0x1(%r15), %r15
jne 0xccf3
xorl %r12d, %r12d
cmpb $0x2e, (%r15,%r12)
leaq 0x1(%r12), %r12
jne 0xcd01
movl $0x1, %esi
movq %r12, %rdi
callq 0x2160
movq %rax, %r13
leaq -0x1(%r12), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2060
addq $0x9, %r12
movl $0x1, %esi
movq %r12, %rdi
callq 0x2160
movq %rax, %r15
leaq 0x1c834(%rip), %rsi     # 0x2957c
movq %rax, %rdi
movq %r13, %rdx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
xorl %eax, %eax
callq 0x2240
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/parser_machinery.c
// Function: register_string
int register_string(string_list_t **list, char *name) {
  string_list_t *head = list[0];

  while (head != NULL) {
    if (strcmp(head->name, name) == 0) return head->number;
    head = head->next;
  }
  int last_number = -1;
  if (list[0] != NULL) last_number = list[0]->number;

  head = malloc(sizeof(string_list_t));
  head->name = name;
  head->number = last_number + 1;
  head->next = *list;
  list[0] = head;
  return head->number;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %r12
xorl %ebx, %ebx
testq %r12, %r12
je 0xd245
movq %r12, %r13
movq (%r13), %rdi
movq %r15, %rsi
callq 0x2170
testl %eax, %eax
je 0xd25e
movq 0x10(%r13), %r13
testq %r13, %r13
jne 0xd220
testq %r12, %r12
je 0xd245
movl 0x8(%r12), %ebx
incl %ebx
movl $0x18, %edi
callq 0x21d0
movq %r15, (%rax)
movl %ebx, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %rax, (%r14)
jmp 0xd262
movl 0x8(%r13), %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/parser_machinery.c
// Function: find_string
int find_string(string_list_t *list, char *name) {
  string_list_t *head = list;

  while (head != NULL) {
    if (strcmp(head->name, name) == 0) return head->number;
    head = head->next;
  }
  return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0xd2a1
movq %rsi, %r15
movq %rdi, %r14
movq (%r14), %rdi
movq %r15, %rsi
callq 0x2170
testl %eax, %eax
je 0xd29d
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0xd283
jmp 0xd2a1
movl 0x8(%r14), %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/parser_machinery.c
// Function: find_var_name
char * find_var_name(string_list_t *list, int n) {
  string_list_t *head = list;

  while (head != NULL) {
    if (head->number == n) return head->name;
    head = head->next;
  }
  return NULL;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0xd2be
cmpl %esi, 0x8(%rdi)
je 0xd2bb
movq 0x10(%rdi), %rdi
jmp 0xd2ab
movq (%rdi), %rax
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Algo.c
// Function: EcrireEq
void EcrireEq(FILE *out, Equation a) // Ecrit une équation en C dans un fichier
{
	/* On pourrait peut-être factoriser ? */
	
	if (a==NULL || EstNulEq(a))
	{
		fprintf(out,"0");
	}
	else
	{
		int i;
		for (i = 0; i < a->nV; i++)
		{
			if (i!=0) fprintf(out," ^ ");
			if (a->coefV[i] != 0x01) fprintf(out,"Multiply(0x%02x,",a->coefV[i]);
			fprintf(out,"x%u",a->var[i]);
			if (a->coefV[i]!=0x01) fprintf(out,")");
		}
		if (a->nV!=0 && a->nS!=0) fprintf(out," ^ ");
		for (i = 0; i < a->nS; i++)
		{
			if (i!=0) fprintf(out," ^ ");
			if (a->coefS[i]!=0x01) fprintf(out,"Multiply(0x%02x,",a->coefS[i]);
			if (a->sbox[i]) fprintf(out,"R(");
			else fprintf(out,"S(");
			EcrireEq(out,a->S[i]);
			fprintf(out,")");
			if (a->coefS[i]!=0x01) fprintf(out,")");
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0xef7e
movq %rsi, %r14
movq %rsi, %rdi
callq 0x4ac7
testl %eax, %eax
je 0xef99
movl $0x30, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2140
movl (%r14), %eax
testl %eax, %eax
jle 0xf025
leaq 0x1b375(%rip), %r15     # 0x2a320
leaq 0x1b35d(%rip), %r12     # 0x2a30f
leaq 0x1b352(%rip), %r13     # 0x2a30b
xorl %ebp, %ebp
testq %rbp, %rbp
je 0xefd5
movl $0x3, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %rbx, %rcx
callq 0x2260
movq 0x10(%r14), %rax
movzbl (%rax,%rbp), %edx
cmpl $0x1, %edx
je 0xefef
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x2190
movq 0x8(%r14), %rax
movl (%rax,%rbp,4), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2190
movq 0x10(%r14), %rax
cmpb $0x1, (%rax,%rbp)
je 0xf01a
movl $0x29, %edi
movq %rbx, %rsi
callq 0x2140
incq %rbp
movslq (%r14), %rax
cmpq %rax, %rbp
jl 0xefbb
testl %eax, %eax
je 0xf049
cmpl $0x0, 0x18(%r14)
je 0xf049
leaq 0x1b2d4(%rip), %rdi     # 0x2a30b
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2260
cmpl $0x0, 0x18(%r14)
jle 0xf109
leaq 0x1a130(%rip), %r13     # 0x2918b
leaq 0x1b2ad(%rip), %r15     # 0x2a30f
leaq 0x1b2a2(%rip), %r12     # 0x2a30b
xorl %ebp, %ebp
testq %rbp, %rbp
je 0xf085
movl $0x3, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x2260
movq 0x28(%r14), %rax
movzbl (%rax,%rbp), %edx
cmpl $0x1, %edx
je 0xf09f
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2190
movq 0x30(%r14), %rax
cmpb $0x0, (%rax,%rbp)
movq %r13, %rdi
je 0xf0b3
leaq 0x1a0d5(%rip), %rdi     # 0x29188
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2260
movq 0x20(%r14), %rax
movq (%rax,%rbp,8), %rsi
movq %rbx, %rdi
callq 0xef5c
movl $0x29, %edi
movq %rbx, %rsi
callq 0x2140
movq 0x28(%r14), %rax
cmpb $0x1, (%rax,%rbp)
je 0xf0f9
movl $0x29, %edi
movq %rbx, %rsi
callq 0x2140
incq %rbp
movslq 0x18(%r14), %rax
cmpq %rax, %rbp
jl 0xf06b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Algo.c
// Function: copyAlgo
void copyAlgo(FILE *dst, char *name_src, int tab) // Copie un fichier avec indentation
{
	FILE *src = fopen(name_src,"r");
	int j=1;
	char c;
	while ((c = fgetc(src)) != EOF)
	{
		if (j)
		{
			int i;
			for (i = 0; i < tab; i++) fprintf(dst,"	");
			j=0;
		}
		fputc(c, dst);
		if (c=='\n') j=1;
	}
	fclose(src);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %rax
movq %rdi, %r14
leaq 0x1da23(%rip), %rsi     # 0x2cb52
movq %rax, %rdi
callq 0x2210
movq %rax, %r15
movq %rax, %rdi
callq 0x2130
movl %eax, %ebp
shll $0x18, %ebp
cmpl $0xff000000, %ebp       # imm = 0xFF000000
je 0xf1a8
movl $0x1, %r12d
testl %ebx, %ebx
setle %al
testl %r12d, %r12d
sete %cl
orb %al, %cl
jne 0xf179
movl %ebx, %r12d
movl $0x9, %edi
movq %r14, %rsi
callq 0x2140
decl %r12d
jne 0xf167
movl %ebp, %edi
sarl $0x18, %edi
movq %r14, %rsi
callq 0x2140
xorl %r12d, %r12d
cmpl $0xa000000, %ebp        # imm = 0xA000000
sete %r12b
movq %r15, %rdi
callq 0x2130
movl %eax, %ebp
shll $0x18, %ebp
cmpl $0xff000000, %ebp       # imm = 0xFF000000
jne 0xf155
movq %r15, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Search.c
// Function: GenerateSolver
Solver GenerateSolver(const int T, Solver *B1, const int N1, SysEqLin E) 
{
	int i=rand()%N1;
	int N=N1-1;
	Solver B=B1[i]; // On prend une solver au hasard
	B1[i]=B1[N];
	B1[N]=B;
	B=copySolver(B);
	while (B->sortie<T && N>0) // Tant que l'on peux guesser des solvers
	{
		while (B->sortie<T && N>0) // Tant que l'on peux guesser des solvers
		{
			i=rand()%N;
			Solver tmp=B1[i];
			N--;
			B1[i]=B1[N];
			B1[N]=tmp;
			tmp=UnionSolver(B,B1[N],E);
			freeSolver(B);
			B=tmp;
		}
		Solver tmp=PropagateSolver2(B,E,B1,N); // On l'augmente gratuitement
		freeSolver(B);
		B=tmp;
	}
	return B;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movl %edx, %ebp
movq %rsi, %r14
movl %edi, %ebx
callq 0x2290
cltd
idivl %ebp
movslq %edx, %rax
movq (%r14,%rax,8), %rdi
movslq %ebp, %rcx
movq -0x8(%r14,%rcx,8), %rdx
movq %rdx, (%r14,%rax,8)
movq %rdi, -0x8(%r14,%rcx,8)
callq 0x743b
movq %rax, %r12
movl 0x14(%rax), %eax
movl %ebx, 0xc(%rsp)
cmpl %ebx, %eax
setge %cl
cmpl $0x2, %ebp
setl %dl
orb %cl, %dl
jne 0x16bd1
decl %ebp
cmpl 0xc(%rsp), %eax
jge 0x16b9e
leal -0x1(%rbp), %eax
leaq (%r14,%rax,8), %rbx
movl %ebp, %r15d
movq %r12, %r13
callq 0x2290
cltd
idivl %r15d
movslq %edx, %rax
movq (%r14,%rax,8), %rsi
leal -0x1(%r15), %ebp
movq (%rbx), %rcx
movq %rcx, (%r14,%rax,8)
movq %rsi, (%rbx)
movq %r12, %rdi
movq 0x10(%rsp), %rdx
callq 0x7f14
movq %rax, %r12
movq %r13, %rdi
callq 0x7447
movl 0xc(%rsp), %eax
cmpl %eax, 0x14(%r12)
jge 0x16b9e
addq $-0x8, %rbx
cmpl $0x1, %r15d
movl %ebp, %r15d
jne 0x16b4d
movq %r12, %r13
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x84b9
movq %rax, %r12
movq %r13, %rdi
callq 0x7447
movl 0x14(%r12), %eax
cmpl 0xc(%rsp), %eax
jge 0x16bd1
testl %ebp, %ebp
jg 0x16b3d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Search.c
// Function: SearchAlgo
Solver SearchAlgo(SysEqLin E, int temps, int memoire, int *Known, int NKnown, int r, string_list_t *variable_names, Symetric_structure S) // 1° partie de la recherche d'algo
{
	int N1;
	Solver * __restrict B1=MakeSolver1(E,&N1);

	/* Ajustement du système d'équations pour prendre en compte que x = y est équivalent à S(x) = S(y) */
	while (EnleveFaussesEq(B1,N1,E)==1)
	{
		int i;
		for (i = 0; i < N1; i++) freeSolver(B1[i]);
		free(B1);
		B1=MakeSolver1(E,&N1);
	}
	
	Solver B;
	
	if (N1==1) // Si il y a une seule solver de complexité 1 on a gagné
	{
		B=B1[0];
		free(B1);
	}
	else
	{
		int i;
		for (i = 0; i < N1; i++) freeSolver(B1[i]);
		free(B1);

		/* On rentre dans le vif */
		SysEqLin F=EsachantX(Known,NKnown,E);
		B=SearchAlgo_tmp(F,temps,memoire,r,variable_names,S);
		
		freeSysEq(F);
	}
	
	return B;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x14(%rsp)
movl %r8d, %r15d
movq %rcx, %r12
movl %edx, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq %rdi, %r13
leaq 0x8(%rsp), %rbp
movq %rbp, %rsi
callq 0x834c
movq %rax, %rbx
movl (%rbp), %esi
movq %rax, %rdi
movq %r13, %rdx
callq 0x9803
cmpl $0x1, %eax
jne 0x17f95
leaq 0x8(%rsp), %rbp
cmpl $0x0, 0x8(%rsp)
jle 0x17f6b
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x7447
incq %r14
movslq 0x8(%rsp), %rax
cmpq %rax, %r14
jl 0x17f55
movq %rbx, %rdi
callq 0x2030
movq %r13, %rdi
movq %rbp, %rsi
callq 0x834c
movq %rax, %rbx
movl 0x8(%rsp), %esi
movq %rax, %rdi
movq %r13, %rdx
callq 0x9803
cmpl $0x1, %eax
je 0x17f4b
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
jne 0x17fab
movq (%rbx), %r14
movq %rbx, %rdi
callq 0x2030
jmp 0x1800a
movq 0x58(%rsp), %r14
jl 0x17fca
xorl %ebp, %ebp
movq (%rbx,%rbp,8), %rdi
callq 0x7447
incq %rbp
movslq 0x8(%rsp), %rax
cmpq %rax, %rbp
jl 0x17fb4
movq %rbx, %rdi
callq 0x2030
movq %r12, %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0xc29a
movq %rax, %rbx
movq %rax, %rdi
movl 0xc(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0x14(%rsp), %ecx
movq 0x50(%rsp), %r8
movq %r14, %r9
callq 0x179d4
movq %rax, %r14
movq %rbx, %rdi
callq 0xc82d
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Search.c
// Function: GuessMinimumLight_tmp
int * GuessMinimumLight_tmp(int *X, int N, SysEqLin E, int *taille)
{
	if (N>0)
	{
		int i;
		for (i = 0; i < N; i++)
		{
			int l=E->lignevar[X[i]]*E->gen;
			int dim=Dimension(E->mat+l,E->gen,E->b,1);
			if (dim==1)
			{
				N--;
				X[i]=X[N];
				SysEqLin F = ExtraireEX2(X,N,E);
				int * result = GuessMinimumLight_tmp(X,N,F,taille);
				freeSysEq(F);
				return result;
			}
			if (dim==0)
			{
				int tmp = X[i];
				X[i]=X[--N];
				int * result_tmp = GuessMinimumLight_tmp(X,N,E,taille);
				int * result = UnionListesTriees(result_tmp,*taille,&tmp,1,taille);
				free(result_tmp);
				return result;
			}
		}
		SysEqLin F = ExtraireEX2(X,--N,E);
		int * result = GuessMinimumLight_tmp(X,N,F,taille);
		freeSysEq(F);
		return result;
	}
	else
	{
		*taille=0;
		return NULL;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
testl %esi, %esi
jle 0x1807a
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %r12d
xorl %r13d, %r13d
movq 0x18(%r15), %rax
movslq (%r14,%r13,4), %rcx
movslq (%rax,%rcx,4), %rdi
movslq 0x10(%r15), %rsi
imulq %rsi, %rdi
shlq $0x3, %rdi
addq (%r15), %rdi
movl 0xc(%r15), %edx
movl $0x1, %ecx
callq 0x34b3
testl %eax, %eax
je 0x180c2
cmpl $0x1, %eax
je 0x18087
incq %r13
cmpq %r13, %r12
jne 0x1803c
decl %ebp
jmp 0x18095
movl $0x0, (%rbx)
xorl %ebx, %ebx
jmp 0x18110
movslq %ebp, %rax
decl %ebp
movl -0x4(%r14,%rax,4), %eax
movl %eax, (%r14,%r13,4)
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xbf32
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x1801c
movq %rax, %rbx
movq %r15, %rdi
callq 0xc82d
jmp 0x18110
movl (%r14,%r13,4), %eax
leaq 0x4(%rsp), %r12
movl %eax, (%r12)
movslq %ebp, %rax
decl %ebp
movl -0x4(%r14,%rax,4), %eax
movl %eax, (%r14,%r13,4)
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1801c
movq %rax, %r14
movl (%rbx), %esi
movq %rax, %rdi
movq %r12, %rdx
movl $0x1, %ecx
movq %rbx, %r8
callq 0x2544
movq %rax, %rbx
movq %r14, %rdi
callq 0x2030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Search.c
// Function: GuessMinimumLight
int * GuessMinimumLight(int *X, int N, SysEqLin E, int *taille)
{
	int * __restrict X_tmp = malloc(N*sizeof(int));
	int i;
	for (i = 0; i < N; i++) X_tmp[i]=X[i];
	int * result = GuessMinimumLight_tmp(X_tmp,N,E,taille);
	free(X_tmp);
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r12
movslq %esi, %r13
leaq (,%r13,4), %rdi
callq 0x21d0
movq %rax, %r15
testl %r13d, %r13d
jle 0x18161
movl %ebp, %edx
shlq $0x2, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21b0
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1801c
movq %rax, %rbx
movq %r15, %rdi
callq 0x2030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Symetric.c
// Function: InitialiseSymetricStrucure
Symetric_structure InitialiseSymetricStrucure(int **var_by_message,	int n_var_by_message, int n_message)
{
	Symetric_structure S = malloc(sizeof(SYMETRIC_STUCTURE));
	S->var_by_message = var_by_message;
	S->n_var_by_message = n_var_by_message;
	S->n_message = n_message;
	S->message_by_var=malloc(VARIABLES*sizeof(int));
	S->position_by_var=malloc(VARIABLES*sizeof(int));
	
	int i;
	for (i = n_message-1; i>=0 ; i--)
	{
		int j;
		for (j = 0; j < n_var_by_message; j++)
		{
			S->message_by_var[var_by_message[i][j]]=i;
			S->position_by_var[var_by_message[i][j]]=j;
		}
	}
	return S;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movl $0x20, %edi
callq 0x21d0
movq %rax, %r15
movq %r14, (%rax)
movl %ebx, 0x8(%rax)
movl %ebp, 0xc(%rax)
leaq 0x1a0f9(%rip), %rax     # 0x322b8
movslq (%rax), %r13
shlq $0x2, %r13
movq %r13, %rdi
callq 0x21d0
movq %rax, %r12
movq %rax, 0x10(%r15)
movq %r13, %rdi
callq 0x21d0
movq %rax, 0x18(%r15)
testl %ebp, %ebp
jle 0x18218
movl %ebp, %ecx
movl %ebx, %edx
movq %rcx, %rsi
decq %rcx
testl %ebx, %ebx
jle 0x18212
movq (%r14,%rcx,8), %rdi
xorl %r8d, %r8d
movslq (%rdi,%r8,4), %r9
movl %ecx, (%r12,%r9,4)
movslq (%rdi,%r8,4), %r9
movl %r8d, (%rax,%r9,4)
incq %r8
cmpq %r8, %rdx
jne 0x181fa
cmpq $0x2, %rsi
jge 0x181e9
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq