// File: /workspace/github_c_makefile_star2_O3/j4r0g[P]Projet_Labyrinthe/fonctions/utilisateur.c
// Function: charger_lab
void charger_lab(t_lab lab[X][Y], t_fourmi fourmi[]){
	FILE * fic2;
	char tmp;
	int seen;
	int nb_ins;
	int i,j;
	fic2 = fopen("SAVED_GAME", "r");
	if(fic2 == 0){
		printf("Pas de partie sauvegardee.\n\n");
	}
	else{
		while(!feof(fic2))
		{
			for(i =0; i<X; i++){
				for(j =0; j<Y; j++){
					fscanf(fic2, "%c", &tmp);
					fscanf(fic2, "%d", &seen);
					lab[i][j].etat = tmp;
					lab[i][j].decouvert = seen;

				}
			}
			fscanf(fic2, "%i ", &nb_ins);
			printf("%i", nb_ins);
			chang_nb_ins(nb_ins);
			for(i = 0; i<nb_ins; i++){
				fscanf(fic2, "%i ", &tmp);
				fourmi[i].sexe = tmp;
				fscanf(fic2, "%i ", &tmp);
				fourmi[i].nourriture = tmp;
				fscanf(fic2, "%i ", &tmp);
				fourmi[i].age = tmp;
				fscanf(fic2, "%i ", &tmp);
				fourmi[i].x = tmp;
				fscanf(fic2, "%i ", &tmp);
				fourmi[i].y = tmp;
			}
		}
		fclose(fic2);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
leaq 0x4580(%rip), %rdi      # 0x6611
leaq 0x46f3(%rip), %rsi      # 0x678b
callq 0x1120
testq %rax, %rax
je 0x2251
movq %rax, %r15
movq %rax, %rdi
callq 0x10f0
testl %eax, %eax
jne 0x223a
addq $0x10, 0x10(%rsp)
leaq 0x468b(%rip), %rcx      # 0x6751
xorl %edx, %edx
movq %rdx, 0x20(%rsp)
imulq $0x2d0, %rdx, %rbp      # imm = 0x2D0
addq 0x18(%rsp), %rbp
movl $0x4, %r12d
leaq 0xc(%rsp), %r13
leaq 0x7(%rsp), %r14
movq %r15, %rdi
movq %rcx, %rbx
movq %rcx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1060
movq %r15, %rdi
leaq 0x40e3(%rip), %rsi      # 0x61e9
movq %r13, %rdx
xorl %eax, %eax
callq 0x1060
movq %rbx, %rcx
movsbl 0x7(%rsp), %eax
movl %eax, (%rbp,%r12)
movl 0xc(%rsp), %eax
movl %eax, -0x4(%rbp,%r12)
addq $0xc, %r12
cmpq $0x2d4, %r12            # imm = 0x2D4
jne 0x20e9
movq 0x20(%rsp), %rdx
incq %rdx
cmpq $0x1e, %rdx
jne 0x20c8
movq %r15, %rdi
leaq 0x3fca(%rip), %r13      # 0x6115
movq %r13, %rsi
leaq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x1060
movl 0x8(%rsp), %esi
leaq 0x445a(%rip), %rdi      # 0x65bf
xorl %eax, %eax
callq 0x10a0
movl 0x8(%rsp), %edi
callq 0x2fb3
cmpl $0x0, 0x8(%rsp)
leaq 0x7(%rsp), %r14
jle 0x2222
movq 0x10(%rsp), %r12
xorl %ebp, %ebp
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1060
movsbl 0x7(%rsp), %eax
movl %eax, -0x10(%r12)
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1060
movsbl 0x7(%rsp), %eax
movl %eax, -0xc(%r12)
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1060
movsbl 0x7(%rsp), %eax
movl %eax, -0x8(%r12)
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1060
movsbl 0x7(%rsp), %eax
movl %eax, -0x4(%r12)
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1060
movsbl 0x7(%rsp), %eax
movl %eax, (%r12)
incq %rbp
movslq 0x8(%rsp), %rax
addq $0x14, %r12
cmpq %rax, %rbp
jl 0x218c
movq %r15, %rdi
callq 0x10f0
movl $0x0, %edx
testl %eax, %eax
movq %rbx, %rcx
je 0x20c8
movq %r15, %rdi
callq 0x1080
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4425(%rip), %rdi      # 0x667d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1070