// File: /workspace/github_c_makefile_star2_O0/j4r0g[P]Projet_Labyrinthe/fonctions/deplacement.c
// Function: decouvrir
void decouvrir(t_lab lab[X][Y]) {
	int i, j;
  for(i=0;i<X;i++) {
    for(j=0;j<Y;j++){
      if(lab[i][j].etat==insecte) {
          lab[i][j].decouvert=seen;
          /* Découverte suivant l'axe des x*/
          if(i+1<X)
            lab[i+1][j].decouvert=seen;
          if(i+2<X)
            lab[i+2][j].decouvert=seen;
          if(i-1>0)
            lab[i-1][j].decouvert=seen;
          if(i-2>0)
            lab[i-2][j].decouvert=seen;

          /*Découverte suivant l'axe des y*/
          if(j+1<Y)
            lab[i][j+1].decouvert=seen;
          if(j+2<Y)
            lab[i][j+2].decouvert=seen;
          if(i-1>0)
            lab[i][j-1].decouvert=seen;
          if(j-2>0)
            lab[i][j-2].decouvert=seen;

          /* Découverte dans les diagonales */
          if(i+1<X && j+1<Y)
            lab[i+1][j+1].decouvert=seen;
          if(i-1>0 && j-1>0)
            lab[i-1][j-1].decouvert=seen;
          if(i+1<X && j-1>0)
            lab[i+1][j-1].decouvert=seen;
          if(i-1>0 && j+1<Y)
            lab[i-1][j+1].decouvert=seen;
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x1e, -0xc(%rbp)
jge 0x345a
movl $0x0, -0x10(%rbp)
cmpl $0x3c, -0x10(%rbp)
jge 0x344a
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
cmpl $0x25, 0x4(%rax)
jne 0x343a
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
cmpl $0x1e, %eax
jge 0x31c7
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
addl $0x2, %eax
cmpl $0x1e, %eax
jge 0x31fa
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jle 0x322d
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
subl $0x2, %eax
cmpl $0x0, %eax
jle 0x3260
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
cmpl $0x3c, %eax
jge 0x3293
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0x10(%rbp), %eax
addl $0x2, %eax
cmpl $0x3c, %eax
jge 0x32c6
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movl -0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jle 0x32f9
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0x10(%rbp), %eax
subl $0x2, %eax
cmpl $0x0, %eax
jle 0x332c
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movl -0x10(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
cmpl $0x1e, %eax
jge 0x336f
movl -0x10(%rbp), %eax
addl $0x1, %eax
cmpl $0x3c, %eax
jge 0x336f
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jle 0x33b2
movl -0x10(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jle 0x33b2
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
cmpl $0x1e, %eax
jge 0x33f5
movl -0x10(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jle 0x33f5
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jle 0x3438
movl -0x10(%rbp), %eax
addl $0x1, %eax
cmpl $0x3c, %eax
jge 0x3438
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
jmp 0x343a
jmp 0x343c
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3140
jmp 0x344c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x312f
popq %rbp
retq
nopl (%rax)