// File: /workspace/github_c_makefile_star2_O1/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 0x20a2f(%rip), %rbp     # 0x2cf53
leaq 0x20671(%rip), %r15     # 0x2cb9c
leaq 0x4(%rsp), %r12
leaq 0x1cec1(%rip), %rdi     # 0x293f8
callq 0x2090
leaq 0x1ce0d(%rip), %rdi     # 0x29350
xorl %eax, %eax
callq 0x2110
movl 0x8(%rbx), %eax
cltd
idivl 0x10(%rbx)
testl %eax, %eax
jle 0xc57b
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 0xc558
leaq 0x1e75b(%rip), %rdi     # 0x2acdd
callq 0x2090
leaq 0x1ce83(%rip), %rdi     # 0x29411
callq 0x2090
leaq 0x1ce81(%rip), %rdi     # 0x2941b
callq 0x2090
leaq 0x1ce9c(%rip), %rdi     # 0x29442
callq 0x2090
leaq 0x1ceb6(%rip), %rdi     # 0x29468
callq 0x2090
leaq 0x1cecb(%rip), %rdi     # 0x29489
callq 0x2090
leaq 0x1cd95(%rip), %r13     # 0x2935f
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 0xc5ca
movl %eax, %eax
leaq 0x1cd20(%rip), %rcx     # 0x29318
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
movl 0xc(%rbx), %edx
callq 0x2e6a
leaq 0x1cd5a(%rip), %rdi     # 0x29370
xorl %eax, %eax
callq 0x2110
callq 0x2180
jmp 0xc530
xorl %r13d, %r13d
leaq 0x1cd6b(%rip), %rdi     # 0x2939c
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 0xc6ae
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 0xc66d
incl %r13d
jmp 0xc67b
leaq 0x1cd53(%rip), %rdi     # 0x293c7
xorl %eax, %eax
callq 0x2110
leaq 0x1cd1a(%rip), %rdi     # 0x2939c
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 0x208a7(%rip), %rbp     # 0x2cf53
jne 0xc654
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rdx
callq 0xbed5
jmp 0xc756
xorl %r13d, %r13d
leaq 0x1cd09(%rip), %rdi     # 0x293d4
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 0xc748
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 0xc707
incl %r13d
jmp 0xc715
leaq 0x1ccb9(%rip), %rdi     # 0x293c7
xorl %eax, %eax
callq 0x2110
leaq 0x1ccb8(%rip), %rdi     # 0x293d4
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 0x2080d(%rip), %rbp     # 0x2cf53
jne 0xc6ee
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rdx
callq 0xbb8a
movq %rax, %r13
movq %rax, %rdi
callq 0xc4f9
movq %r13, %rdi
callq 0xc453
jmp 0xc530
movq %r14, %rdi
callq 0x2030
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)