// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/SysEqLin.c
// Function: PrintSysEqLinManual
void PrintSysEqLinManual(SysEqLin E)
{
	int * __restrict X = malloc(E->a/E->gen*sizeof(int));
	int N;
	int choix;
	SysEqLin F;
	while (1)
	{
		printf("Système d'équations : \n");
		printf("	- Variables :");
		int i;
		for (i = 0; i < E->a/E->gen; i++) printf("%d ",E->varligne[i]);
		printf("\n\n");
		printf("Actions :\n");
		printf("	- Printr le système d'équations : 1\n");
		printf("	- Supposer des variables connues : 2\n");
		printf("	- Extraire un sous-système : 3\n");
		printf("	- Exit : 0\n");
		do
		{
			printf("\r Votre choix : ");
			scanf(" %d",&choix);
			getchar();
		} while (choix<0 || choix>3);
		switch (choix)
		{
			case 1: 
				PrintMat(E->mat,E->a,E->b);
				printf("\n Appuyez sur une touche pour continuer ...");
				getchar();
				break;
			case 2:
				N=0;
				while (1)
				{
					printf("\rNouvelle variable connue (0 pour stop) : ");
					scanf(" %d",X+N);
					getchar();
					if (X[N])
					{
						if (E->lignevar[X[N]]>=E->a/E->gen) printf("Impossible!!");
						else N++;
					}
					else break;
				}
				F = EsachantX(X,N,E);
				PrintSysEqLinManual(F);
				freeSysEq(F);
				break;	
			case 3:
				N=0;
				while (1)
				{
					printf("\rNouvelle variable (0 pour stop) : ");
					scanf(" %d",X+N);
					getchar();
					if (X[N])
					{
						if (E->lignevar[X[N]]>=E->a/E->gen) printf("Impossible!!");
						else N++;
					}
					else break;
				}
				F = ExtraireEX2(X,N,E);
				PrintSysEqLinManual(F);
				freeSysEq(F);
				break;	
			default:
				goto fin;
				break;	
		}
	}
	fin :
	free(X);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cltd
idivl 0x10(%rdi)
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x21d0
movq %rax, %r14
leaq 0x206b5(%rip), %rbp     # 0x2cfb3
leaq 0x202f7(%rip), %r15     # 0x2cbfc
leaq 0x4(%rsp), %r12
leaq 0x1cb47(%rip), %rdi     # 0x29458
callq 0x2090
leaq 0x1ca93(%rip), %rdi     # 0x293b0
xorl %eax, %eax
callq 0x2110
movl 0x8(%rbx), %eax
cltd
idivl 0x10(%rbx)
testl %eax, %eax
jle 0xc955
xorl %r13d, %r13d
movq 0x20(%rbx), %rax
movl (%rax,%r13,4), %esi
movq %rbp, %rdi
xorl %eax, %eax
callq 0x2110
movl 0x8(%rbx), %eax
cltd
idivl 0x10(%rbx)
incq %r13
cltq
cmpq %rax, %r13
jl 0xc932
leaq 0x1e3e1(%rip), %rdi     # 0x2ad3d
callq 0x2090
leaq 0x1cb09(%rip), %rdi     # 0x29471
callq 0x2090
leaq 0x1cb07(%rip), %rdi     # 0x2947b
callq 0x2090
leaq 0x1cb22(%rip), %rdi     # 0x294a2
callq 0x2090
leaq 0x1cb3c(%rip), %rdi     # 0x294c8
callq 0x2090
leaq 0x1cb51(%rip), %rdi     # 0x294e9
callq 0x2090
leaq 0x1ca1b(%rip), %r13     # 0x293bf
movq %r13, %rdi
xorl %eax, %eax
callq 0x2110
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x2230
callq 0x2180
movl 0x4(%rsp), %eax
cmpl $0x3, %eax
ja 0xc9a4
movl %eax, %eax
leaq 0x1c9a6(%rip), %rcx     # 0x29378
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
movl 0xc(%rbx), %edx
callq 0x31a6
leaq 0x1c9e0(%rip), %rdi     # 0x293d0
xorl %eax, %eax
callq 0x2110
callq 0x2180
jmp 0xc90a
xorl %r13d, %r13d
leaq 0x1c9f1(%rip), %rdi     # 0x293fc
xorl %eax, %eax
callq 0x2110
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2230
callq 0x2180
movl (%r14), %eax
testl %eax, %eax
je 0xca88
xorl %r13d, %r13d
movq 0x18(%rbx), %rcx
cltq
movl (%rcx,%rax,4), %ecx
movl 0x8(%rbx), %eax
cltd
idivl 0x10(%rbx)
cmpl %eax, %ecx
jge 0xca47
incl %r13d
jmp 0xca55
leaq 0x1c9d9(%rip), %rdi     # 0x29427
xorl %eax, %eax
callq 0x2110
leaq 0x1c9a0(%rip), %rdi     # 0x293fc
xorl %eax, %eax
callq 0x2110
movslq %r13d, %rbp
leaq (%r14,%rbp,4), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2230
callq 0x2180
movl (%r14,%rbp,4), %eax
testl %eax, %eax
leaq 0x2052d(%rip), %rbp     # 0x2cfb3
jne 0xca2e
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rdx
callq 0xc29a
jmp 0xcb30
xorl %r13d, %r13d
leaq 0x1c98f(%rip), %rdi     # 0x29434
xorl %eax, %eax
callq 0x2110
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2230
callq 0x2180
movl (%r14), %eax
testl %eax, %eax
je 0xcb22
xorl %r13d, %r13d
movq 0x18(%rbx), %rcx
cltq
movl (%rcx,%rax,4), %ecx
movl 0x8(%rbx), %eax
cltd
idivl 0x10(%rbx)
cmpl %eax, %ecx
jge 0xcae1
incl %r13d
jmp 0xcaef
leaq 0x1c93f(%rip), %rdi     # 0x29427
xorl %eax, %eax
callq 0x2110
leaq 0x1c93e(%rip), %rdi     # 0x29434
xorl %eax, %eax
callq 0x2110
movslq %r13d, %rbp
leaq (%r14,%rbp,4), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2230
callq 0x2180
movl (%r14,%rbp,4), %eax
testl %eax, %eax
leaq 0x20493(%rip), %rbp     # 0x2cfb3
jne 0xcac8
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rdx
callq 0xbf32
movq %rax, %r13
movq %rax, %rdi
callq 0xc8d3
movq %r13, %rdi
callq 0xc82d
jmp 0xc90a
movq %r14, %rdi
callq 0x2030
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop