// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x6cc3(%rip), %rdi      # 0x961a
leaq 0x6e30(%rip), %rsi      # 0x978e
callq 0x1100
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2981
leaq 0x6cb2(%rip), %rdi      # 0x9627
movb $0x0, %al
callq 0x1080
jmp 0x2b88
jmp 0x2983
movq -0x18(%rbp), %rdi
callq 0x10c0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x299d
jmp 0x2b7f
movl $0x0, -0x28(%rbp)
cmpl $0x1e, -0x28(%rbp)
jge 0x2a4f
movl $0x0, -0x2c(%rbp)
cmpl $0x3c, -0x2c(%rbp)
jge 0x2a3f
movq -0x18(%rbp), %rdi
leaq 0x6d7c(%rip), %rsi      # 0x9746
leaq -0x19(%rbp), %rdx
movb $0x0, %al
callq 0x1050
movq -0x18(%rbp), %rdi
leaq 0x6b11(%rip), %rsi      # 0x94f1
leaq -0x20(%rbp), %rdx
movb $0x0, %al
callq 0x1050
movsbl -0x19(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rdx
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rdx, %rax
movslq -0x2c(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rdx
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rdx, %rax
movslq -0x2c(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x29b5
jmp 0x2a41
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x29a4
movq -0x18(%rbp), %rdi
leaq 0x66a9(%rip), %rsi      # 0x9103
leaq -0x24(%rbp), %rdx
movb $0x0, %al
callq 0x1050
movl -0x24(%rbp), %esi
leaq 0x6b3d(%rip), %rdi      # 0x95ac
movb $0x0, %al
callq 0x1080
movl -0x24(%rbp), %edi
callq 0x45a0
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x2b7a
movq -0x18(%rbp), %rdi
leaq 0x6667(%rip), %rsi      # 0x9103
leaq -0x19(%rbp), %rdx
movb $0x0, %al
callq 0x1050
movsbl -0x19(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rdi
leaq 0x663c(%rip), %rsi      # 0x9103
leaq -0x19(%rbp), %rdx
movb $0x0, %al
callq 0x1050
movsbl -0x19(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rdi
leaq 0x6610(%rip), %rsi      # 0x9103
leaq -0x19(%rbp), %rdx
movb $0x0, %al
callq 0x1050
movsbl -0x19(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rdi
leaq 0x65e4(%rip), %rsi      # 0x9103
leaq -0x19(%rbp), %rdx
movb $0x0, %al
callq 0x1050
movsbl -0x19(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rdi
leaq 0x65b8(%rip), %rsi      # 0x9103
leaq -0x19(%rbp), %rdx
movb $0x0, %al
callq 0x1050
movsbl -0x19(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2a85
jmp 0x2983
movq -0x18(%rbp), %rdi
callq 0x1060
addq $0x30, %rsp
popq %rbp
retq
nop