// File: /workspace/github_c_makefile_star2_O0/cbouilla[P]AES-attacks-finder/EquationAES.c
// Function: VariablesKnownes
int * VariablesKnownes(int Tours, int Final, int Messages, int *N)
{
	int NombreCstRonde,*Known;
	int i,j,pos,taille,state;
	
	NombreCstRonde=Tours+Final;
	taille=32*Messages+NombreCstRonde;
	Known=malloc(2*taille*sizeof(int));
	state=(Tours+Final+1);
	pos=0;
	for (i = 0; i < Messages; i++)
	{
		for (j = 0; j < 16; j++) Known[pos++]=16*state+j;
		for (j = 0; j < Tours; j++)
		{
			state++;
			state++;
		}
		for (j = 0; j < Final; j++)
		{
			state++;
		}
		state++;
		for (j = 0; j < 16; j++) Known[pos++]=16*state+j;
		state++;
	}
	for (j = 0; j < NombreCstRonde; j++) Known[pos++]=16*state+j;
	printf("Variables Knownes : ");
	for (i = 0; i < pos; i++) printf("%u ",Known[i]);
	printf("\n");
	/*getchar();*/
	*N=taille;
	return Known;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movl -0x4(%rbp), %eax
addl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
shll $0x5, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
shll %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x21c0
movq %rax, -0x28(%rbp)
movl -0x4(%rbp), %eax
addl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x8cb0
movl $0x0, -0x30(%rbp)
cmpl $0x10, -0x30(%rbp)
jge 0x8c0b
movl -0x3c(%rbp), %edx
shll $0x4, %edx
addl -0x30(%rbp), %edx
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x34(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8bdc
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x8c37
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8c12
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x8c5a
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8c3e
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x30(%rbp)
cmpl $0x10, -0x30(%rbp)
jge 0x8c99
movl -0x3c(%rbp), %edx
shll $0x4, %edx
addl -0x30(%rbp), %edx
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x34(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8c6a
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8bc9
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8ce8
movl -0x3c(%rbp), %edx
shll $0x4, %edx
addl -0x30(%rbp), %edx
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x34(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8cb7
leaq 0x2c48f(%rip), %rdi     # 0x3517e
movb $0x0, %al
callq 0x2100
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x8d29
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x2c47c(%rip), %rdi     # 0x35193
movb $0x0, %al
callq 0x2100
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8cfd
leaq 0x2e1a7(%rip), %rdi     # 0x36ed7
movb $0x0, %al
callq 0x2100
movl -0x38(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)