// File: /workspace/github_c_makefile_star2_O1/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: ExtraireEX2Special
SysEqLin ExtraireEX2Special(int *var, int N, SysEqLin E) // Calcul E(X) mais supprime les equations entre les variables connues.
{
	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;
	unsigned char **m=malloc(E->gen*VARIABLES*sizeof(unsigned char *));
	for (i = 0; i < E->gen*VARIABLES; i++) m[i]=malloc(F->b*sizeof(unsigned char));
	F->b=BaseSpeciale(m,F->mat,E->gen*VARIABLES,F->b,F->a);
	for (i = 0; i < E->gen*VARIABLES; i++) free(F->mat[i]);
	free(F->mat);
	F->mat=m;
	F->initialise=0;
	return F;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movl %esi, 0xc(%rsp)
movq %rdi, %r12
movl $0x40, %edi
callq 0x21d0
movq %rax, %rbx
movq %r14, 0x10(%rsp)
movslq 0x10(%r14), %rbp
leaq 0x265b8(%rip), %rax     # 0x322b8
movslq (%rax), %r14
imulq %r14, %rbp
movq %rbp, %rdi
shlq $0x3, %rdi
callq 0x21d0
movq %rax, %r15
movq %rbx, 0x20(%rsp)
movq %rax, (%rbx)
testl %ebp, %ebp
jle 0xbd43
movq 0x10(%rsp), %rax
movslq 0xc(%rax), %r13
movl %ebp, %ebx
xorl %ebp, %ebp
movq %r13, %rdi
callq 0x21d0
movq %rax, (%r15,%rbp,8)
incq %rbp
cmpq %rbp, %rbx
jne 0xbd2f
movq %r15, %rdi
movq %r12, 0x30(%rsp)
movq %r12, %rsi
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %r12
movq %r12, %rcx
callq 0xb3e2
movq 0x20(%rsp), %rbx
movl %eax, 0x1c(%rsp)
movl %eax, 0xc(%rbx)
movl 0x10(%r12), %eax
movl %eax, 0x10(%rbx)
leaq (,%r14,4), %r13
movq %r13, %rdi
callq 0x21d0
movq %rax, %rbp
movq %rax, 0x18(%rbx)
movq %r13, %rdi
callq 0x21d0
movq %rax, %r13
movq %rax, 0x20(%rbx)
testl %r14d, %r14d
jle 0xbdb8
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl %edx, (%rbp,%rcx,4)
incq %rcx
cmpq %rcx, %r14
jne 0xbda9
movq %r15, 0x28(%rsp)
testl %r14d, %r14d
jle 0xbddd
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl %edx, (%r13,%rcx,4)
incq %rcx
cmpq %rcx, %r14
jne 0xbdcd
cmpl $0x0, 0xc(%rsp)
movq 0x20(%rsp), %r12
movq 0x30(%rsp), %r15
jle 0xbe0d
movl 0xc(%rsp), %ebp
xorl %ebx, %ebx
movl (%r15,%rbx,4), %edi
movl (%r13,%rbx,4), %esi
movq %r12, %rdx
callq 0xb0e6
incq %rbx
cmpq %rbx, %rbp
jne 0xbdf4
movq 0x10(%rsp), %rax
movl 0x10(%rax), %eax
movl 0xc(%rsp), %ecx
imull %eax, %ecx
movl %ecx, 0xc(%rsp)
movl %ecx, 0x8(%r12)
movl %r14d, %r15d
imull %eax, %r15d
movslq %r15d, %rbx
leaq (,%rbx,8), %rdi
callq 0x21d0
movq %rax, %r12
testl %ebx, %ebx
jle 0xbe62
movslq 0x1c(%rsp), %rbp
movl %r15d, %ebx
xorl %r13d, %r13d
movq %rbp, %rdi
callq 0x21d0
movq %rax, (%r12,%r13,8)
incq %r13
cmpq %r13, %rbx
jne 0xbe4e
movq %r12, %rdi
movl %r15d, %edx
movq 0x28(%rsp), %r15
movq %r15, %rsi
movl 0x1c(%rsp), %ecx
movl 0xc(%rsp), %r8d
callq 0x34c3
movq 0x20(%rsp), %r13
movl %eax, 0xc(%r13)
movq 0x10(%rsp), %rbp
movl 0x10(%rbp), %eax
imull %r14d, %eax
testl %eax, %eax
jle 0xbeb2
xorl %ebx, %ebx
movq (%r15,%rbx,8), %rdi
callq 0x2030
incq %rbx
movslq 0x10(%rbp), %rax
imulq %r14, %rax
cmpq %rax, %rbx
jl 0xbe99
movq %r15, %rdi
callq 0x2030
movq %r12, (%r13)
movb $0x0, 0x28(%r13)
movq %r13, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq