LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsLightingPreRender
void hpsLightingPreRender(void *data){
    SceneLighting *sLighting = (SceneLighting *) data;
    hpsCurrentAmbientLight[0] = sLighting->ambient.r;
    hpsCurrentAmbientLight[1] = sLighting->ambient.g;
    hpsCurrentAmbientLight[2] = sLighting->ambient.b;

    currentLights = lightQueue.size;
    currentLights = (currentLights > hpsMaxLights) ? hpsMaxLights : currentLights;
    int i;
    for (i = 0; i < currentLights; i++){
        HPSnode *node = (HPSnode *) lightQueue.data[i];
        Light *l = (Light *) hpsNodeData(node);
        float *bs = hpsNodeBoundingSphere(node);
        hpsCurrentLightIntensities[i] = l->intensity;
        hpsCurrentLightPositions[i*3]   = bs[0];
        hpsCurrentLightPositions[i*3+1] = bs[1];
        hpsCurrentLightPositions[i*3+2] = bs[2];
        hpsCurrentLightColors[i*3]   = l->color.r;
        hpsCurrentLightColors[i*3+1] = l->color.g;
        hpsCurrentLightColors[i*3+2] = l->color.b;
        hpsCurrentLightDirections[i*3]   = l->worldDirection.x;
        hpsCurrentLightDirections[i*3+1] = l->worldDirection.y;
        hpsCurrentLightDirections[i*3+2] = l->worldDirection.z;
        hpsCurrentLightDirections[i*3+3] = l->spotAngle;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movss (%rdi), %xmm0
movq 0x4918(%rip), %rax      # 0xef90
movq (%rax), %rax
movss %xmm0, (%rax)
movss 0x4(%rdi), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x8(%rdi), %xmm0
movss %xmm0, 0x8(%rax)
movl 0x4f2f(%rip), %eax      # 0xf5c8
movq 0x4900(%rip), %rbp      # 0xefa0
movq 0x48f1(%rip), %rcx      # 0xef98
movl (%rcx), %ecx
cmpl %eax, %ecx
cmovbl %ecx, %eax
movl %eax, (%rbp)
testl %eax, %eax
je 0xa7a1
movl $0x2, %r12d
xorl %r13d, %r13d
movq 0x48af(%rip), %r15      # 0xef78
movq 0x4ef0(%rip), %rax      # 0xf5c0
movq (%rax,%r13,8), %rbx
movq %rbx, %rdi
callq 0x4360
movq %rax, %r14
movq %rbx, %rdi
callq 0x4170
movss 0x28(%r14), %xmm0
movq 0x48cc(%rip), %rcx      # 0xefc0
movq (%rcx), %rcx
movss %xmm0, (%rcx,%r13,4)
movss (%rax), %xmm0
movq 0x4860(%rip), %rcx      # 0xef68
movq (%rcx), %rcx
movss %xmm0, -0x8(%rcx,%r12,4)
movss 0x4(%rax), %xmm0
movss %xmm0, -0x4(%rcx,%r12,4)
movss 0x8(%rax), %xmm0
movss %xmm0, (%rcx,%r12,4)
movss (%r14), %xmm0
movq 0x4893(%rip), %rax      # 0xefc8
movq (%rax), %rax
movss %xmm0, -0x8(%rax,%r12,4)
movss 0x4(%r14), %xmm0
movss %xmm0, -0x4(%rax,%r12,4)
movss 0x8(%r14), %xmm0
movss %xmm0, (%rax,%r12,4)
movss 0x18(%r14), %xmm0
movq (%r15), %rax
movss %xmm0, -0x8(%rax,%r12,4)
movss 0x1c(%r14), %xmm0
movss %xmm0, -0x4(%rax,%r12,4)
movss 0x20(%r14), %xmm0
movss %xmm0, (%rax,%r12,4)
movss 0x24(%r14), %xmm0
movss %xmm0, 0x4(%rax,%r12,4)
incq %r13
movl (%rbp), %eax
addq $0x3, %r12
cmpq %rax, %r13
jb 0xa6c9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsLightingUpdateNode
void hpsLightingUpdateNode(void *data, HPSnode *node){
    Light *l = (Light *) hpsNodeData(node);
    if (!l->spotAngle) return;

    HPMmat4 *trans = (HPMmat4 *) hpsNodeTransform(node);
    HPMmat4 rot;
    rot._11 = trans->_11;
    rot._12 = trans->_12;
    rot._13 = trans->_13;
    rot._21 = trans->_21;
    rot._22 = trans->_22;
    rot._23 = trans->_23;
    rot._31 = trans->_31;
    rot._32 = trans->_32;
    rot._33 = trans->_33;

    rot._14 = 0;
    rot._24 = 0;
    rot._34 = 0;
    rot._41 = 0;
    rot._42 = 0;
    rot._43 = 0;
    rot._44 = 1;

    l->worldDirection.x = l->direction.x;
    l->worldDirection.y = l->direction.y;
    l->worldDirection.z = l->direction.z;
    hpmMat4VecMult((float *) &rot, (float *) &l->worldDirection);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rsi, %rdi
callq 0x4360
movss 0x24(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0xa7ed
jnp 0xa889
movq %rax, %rbx
movq %r14, %rdi
callq 0x40d0
movss (%rax), %xmm0
leaq 0x8(%rsp), %rdi
movss %xmm0, (%rdi)
movss 0x10(%rax), %xmm0
movss %xmm0, 0x10(%rdi)
movss 0x20(%rax), %xmm0
movss %xmm0, 0x20(%rdi)
movss 0x4(%rax), %xmm0
movss %xmm0, 0x4(%rdi)
movss 0x14(%rax), %xmm0
movss %xmm0, 0x14(%rdi)
movss 0x24(%rax), %xmm0
movss %xmm0, 0x24(%rdi)
movss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%rdi)
movss 0x18(%rax), %xmm0
movss %xmm0, 0x18(%rdi)
movss 0x28(%rax), %xmm0
movss %xmm0, 0x28(%rdi)
xorl %eax, %eax
movl %eax, 0xc(%rdi)
movl %eax, 0x1c(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x2c(%rdi)
movl $0x3f800000, 0x3c(%rdi) # imm = 0x3F800000
movss 0xc(%rbx), %xmm0
movq %rbx, %rsi
addq $0x18, %rsi
movss %xmm0, 0x18(%rbx)
movq 0x10(%rbx), %rax
movq %rax, 0x1c(%rbx)
callq 0x41c0
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsAddLight
HPSnode *hpsAddLight(HPSnode *parent, float* color, float i, float *direction, float spotAngle){
    HPSnode *node;
    SceneLighting *sLighting =
        (SceneLighting *) hpsExtensionData(hpsGetScene(parent), &lighting);
    Light *light = hpsAllocateFrom(sLighting->lightPool);
    light->pool = sLighting->lightPool;
    light->color.r = color[0];
    light->color.g = color[1];
    light->color.b = color[2];
    light->intensity = i;
    light->direction.x = direction[0];
    light->direction.y = direction[1];
    light->direction.z = direction[2];
    light->spotAngle = spotAngle;
    node = hpsAddNode(parent, (void *) light, NULL, hpsDeleteLight);
    hpsSetNodeExtension(node, hpsLighting);
    return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movss %xmm1, 0x4(%rsp)
movq %rdx, %r14
movss %xmm0, (%rsp)
movq %rsi, %r15
movq %rdi, %rbx
callq 0x41d0
movq 0x46e6(%rip), %rsi      # 0xefa8
movq %rax, %rdi
callq 0x4330
movq %rax, %r12
movq 0x10(%rax), %rdi
callq 0x43a0
movq 0x10(%r12), %rcx
movq %rcx, 0x30(%rax)
movss (%r15), %xmm0
movss %xmm0, (%rax)
movss 0x4(%r15), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x8(%r15), %xmm0
movss %xmm0, 0x8(%rax)
movss (%rsp), %xmm0
movss %xmm0, 0x28(%rax)
movss (%r14), %xmm0
movss %xmm0, 0xc(%rax)
movss 0x4(%r14), %xmm0
movss %xmm0, 0x10(%rax)
movss 0x8(%r14), %xmm0
movss %xmm0, 0x14(%rax)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x24(%rax)
movq 0x46ae(%rip), %rcx      # 0xefe8
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x43f0
movq %rax, %rbx
movq 0x460f(%rip), %rax      # 0xef60
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x4240
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsSetLightColor
void hpsSetLightColor(HPSnode *node, float* color){
    Light *l = (Light *) hpsNodeData(node);
    l->color.r = color[0];
    l->color.g = color[1];
    l->color.b = color[2];
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x4360
movss (%rbx), %xmm0
movss %xmm0, (%rax)
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsSetLightDirection
void hpsSetLightDirection(HPSnode *node, float* dir){
    Light *l = (Light *) hpsNodeData(node);
    l->direction.x = dir[0];
    l->direction.y = dir[1];
    l->direction.z = dir[2];
    hpsNodeNeedsUpdate(node);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4360
movss (%rbx), %xmm0
movss %xmm0, 0xc(%rax)
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x10(%rax)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x14(%rax)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4100
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsSetAmbientLight
void hpsSetAmbientLight(HPSscene *scene, float* color){
    SceneLighting *sLighting = (SceneLighting *) hpsExtensionData(scene, &lighting);
    sLighting->ambient.r = color[0];
    sLighting->ambient.g = color[1];
    sLighting->ambient.b = color[2];
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq 0x4573(%rip), %rsi      # 0xefa8
callq 0x4330
movss (%rbx), %xmm0
movss %xmm0, (%rax)
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler.c
// Function: newNode
node* newNode(int id, pid_t pid, char* name) {
  node* Node = (node*) malloc(sizeof(node));
  Node->id = id;
  Node->pid = pid;
  Node->name = strdup(name);
  return Node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
movl $0x20, %edi
callq 0x1160
movq %rax, %r15
movl %r14d, (%rax)
movl %ebp, 0x4(%rax)
movq %rbx, %rdi
callq 0x11d0
movq %rax, 0x8(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler.c
// Function: addNode
node* addNode(node* list, int id, pid_t pid, char* name) {
  node* head = list;
  if (head == NULL) {
    head = newNode(id, pid, name);
    head->next = head;
    head->prev = head;
  } else {
    while (list->next != head) {
      list = list->next;
    }
    list->next = newNode(id, pid, name);
    list->next->next = head;
    list->next->prev = list;
    head->prev = list->next;
  }
  return head;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
testq %rdi, %rdi
je 0x14e5
movq %rdi, %rbx
movq %rdi, %rax
movq %rax, %r13
movq 0x10(%rax), %rax
cmpq %rbx, %rax
jne 0x14a6
movl $0x20, %edi
callq 0x1160
movq %rax, %r12
movl %r15d, (%rax)
movl %ebp, 0x4(%rax)
movq %r14, %rdi
callq 0x11d0
movq %rax, 0x8(%r12)
movq %r12, 0x10(%r13)
movq %rbx, 0x10(%r12)
movq 0x10(%r13), %rax
movq %r13, 0x18(%rax)
jmp 0x150b
movl $0x20, %edi
callq 0x1160
movq %rax, %rbx
movl %r15d, (%rax)
movl %ebp, 0x4(%rax)
movq %r14, %rdi
callq 0x11d0
movq %rax, 0x8(%rbx)
movq %rbx, 0x10(%rbx)
movq %rbx, %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler.c
// Function: printList
void printList(node* list) {
  node* head = list;
  printf("%d ", list->id);
  while (list->next != head) {
    list = list->next;
    printf("%d ", list->id);
  }
  printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %esi
leaq 0xad2(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x10c0
movq 0x10(%rbx), %r15
cmpq %rbx, %r15
je 0x155f
leaq 0xabb(%rip), %r14       # 0x2004
movl (%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r15), %r15
cmpq %rbx, %r15
jne 0x1549
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler.c
// Function: deleteNode
node* deleteNode(node* list, pid_t pid) {
  node* head = list;
  if (list->pid == pid) {
    list->next->prev = head->prev;
    head->prev->next = list->next;
    head = list->next;
    free(list);
    return head;
  }
  list = list->next;
  while (list != head) {
    if (list->pid == pid) {
      list->prev->next = list->next;
      list->next->prev = list->prev;
      free(list);
      break;
    }
    list = list->next;
  }
  return head;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0x4(%rdi)
jne 0x1594
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
movq %rcx, 0x18(%rax)
movq 0x18(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq %rbx, %rdi
movq 0x10(%rbx), %rbx
jmp 0x15b9
movq %rbx, %rdi
movq 0x10(%rdi), %rdi
cmpq %rbx, %rdi
je 0x15be
cmpl %esi, 0x4(%rdi)
jne 0x1597
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
movq %rax, 0x10(%rcx)
movq 0x10(%rdi), %rax
movq %rcx, 0x18(%rax)
callq 0x1050
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/scheduler.c
// Function: accessNode
node* accessNode(node* list, pid_t pid) {
  node* head = list;
  do {
    if (list->pid == pid) {
      return list;
    }
    list = list->next;
  } while (list != head);
  printf("Error: The node with id: %d, doesn't exist!\n", pid);
  return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0x4(%rbx)
je 0x15e5
movq 0x10(%rbx), %rbx
cmpq %rdi, %rbx
jne 0x15c7
leaq 0xa2c(%rip), %rdi       # 0x2008
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x10c0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: afficher_stats
void afficher_stats(t_lab lab[X][Y], t_fourmi fourmi[]) {
	int nb_ins=nb_insecte();
	int i;
	char male[10] = "male";
	char femelle[10] = "femelle";
	char sexe[10];
	printf("\nIl y a actuellement %i insecte dans le labyrinthe\n", nb_ins);
	for(i=0;i<nb_ins;i++){
		if(fourmi[i].sexe==0){
			strcpy(sexe, male);
		}
		else {
			strcpy(sexe, femelle);
		}
		int nourriture=fourmi[i].nourriture;
		int age = fourmi[i].age;
		int x=fourmi[i].x;
		int y=fourmi[i].y;
		printf("La fourmi %i est de sexe %s à encore pour %i tours de nourriture et %i tours de vie, elle est en x=%i et y=%i.\n", i, sexe, nourriture+1, age+1, x, y);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
xorl %eax, %eax
callq 0x2e54
movl %eax, %ebp
leaq 0x4d61(%rip), %rdi      # 0x600e
movl %eax, %esi
xorl %eax, %eax
callq 0x10a0
testl %ebp, %ebp
jle 0x1325
movl %ebp, %r13d
addq $0x10, %rbx
leaq 0x4d7a(%rip), %r14      # 0x6042
leaq 0x8(%rsp), %r15
movabsq $0x656c6c656d6566, %rbp # imm = 0x656C6C656D6566
xorl %r12d, %r12d
cmpl $0x0, -0x10(%rbx)
je 0x12e7
movq %rbp, 0x8(%rsp)
jmp 0x12f4
movb $0x0, 0xc(%rsp)
movl $0x656c616d, 0x8(%rsp)  # imm = 0x656C616D
movl -0xc(%rbx), %ecx
movl -0x8(%rbx), %r8d
movl -0x4(%rbx), %r9d
movl (%rbx), %eax
incl %ecx
incl %r8d
movl %eax, (%rsp)
movq %r14, %rdi
movl %r12d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10a0
incq %r12
addq $0x14, %rbx
cmpq %r12, %r13
jne 0x12da
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: init_lab
void init_lab(t_lab lab[X][Y]){
	int tmp;
	int i,j;
	FILE * fic1;
	fic1 = fopen("../doc/lab_test.txt", "r");

	while(!feof(fic1))
	{
		for(i =0; i<X; i++){
			for(j =0; j<Y; j++){
				fscanf(fic1, "%d ", &tmp);
				lab[i][j].etat = tmp;
				lab[i][j].decouvert = unseen;
			}
		}
	}
	fclose(fic1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
leaq 0x4d40(%rip), %rdi      # 0x60b3
leaq 0x53de(%rip), %rsi      # 0x6758
callq 0x1120
movq %rax, %r14
movq %rax, %rdi
callq 0x10f0
testl %eax, %eax
jne 0x13f6
leaq 0x4d32(%rip), %r15      # 0x60c7
leaq 0xc(%rsp), %r12
xorl %r13d, %r13d
imulq $0x2d0, %r13, %rbp      # imm = 0x2D0
addq 0x10(%rsp), %rbp
movl $0x4, %ebx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1060
movl 0xc(%rsp), %eax
movl %eax, (%rbp,%rbx)
movl $0x0, -0x4(%rbp,%rbx)
addq $0xc, %rbx
cmpq $0x2d4, %rbx            # imm = 0x2D4
jne 0x13ae
incq %r13
cmpq $0x1e, %r13
jne 0x139d
movq %r14, %rdi
callq 0x10f0
movl $0x0, %r13d
testl %eax, %eax
je 0x139d
movq %r14, %rdi
callq 0x1080
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: nbr_cases_vide
int nbr_cases_vide(t_lab lab[X][Y]){
	int i, j;
	int nbr_cases_vide = 0;
	for (i=0; i<X; i++){
		for (j=0; j<Y; j++){
			if(lab[i][j].etat == vide){
				nbr_cases_vide++;
			}
		}
	}
	return nbr_cases_vide;
}

// Assembly:
xorl %ecx, %ecx
xorl %eax, %eax
movl $0x4, %edx
xorl %esi, %esi
cmpl $0x20, (%rdi,%rdx)
sete %sil
addl %esi, %eax
addq $0xc, %rdx
cmpq $0x2d4, %rdx            # imm = 0x2D4
jne 0x1416
incq %rcx
addq $0x2d0, %rdi            # imm = 0x2D0
cmpq $0x1e, %rcx
jne 0x1411
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: lissage_lab
int lissage_lab(t_lab lab[X][Y]){
	int i, j;
	int mur_adj=0;
	int a_lisse=0;
	for (i=0; i<X; i++){
		for (j=0; j<Y; j++){
			if(lab[i][j].etat == mur){
				mur_adj=0;

				if(lab[i][j-1].etat == vide){
					mur_adj++;
				}
				if(lab[i][j+1].etat == vide){
					mur_adj++;
				}
				if(lab[i-1][j].etat == vide){
					mur_adj++;
				}
				if(lab[i+1][j].etat == vide){
					mur_adj++;
				}
				if(mur_adj >= 3 ){
					lab[i][j].etat = vide;
					a_lisse=1;
				}

			}
		}
	}
	return a_lisse;
}

// Assembly:
addq $0x2d4, %rdi            # imm = 0x2D4
xorl %ecx, %ecx
xorl %eax, %eax
movq $-0x2d0, %rdx           # imm = 0xFD30
cmpl $0x23, (%rdi,%rdx)
jne 0x14a5
xorl %esi, %esi
cmpl $0x20, -0xc(%rdi,%rdx)
sete %sil
leal 0x1(%rsi), %r8d
cmpl $0x20, 0xc(%rdi,%rdx)
cmovnel %esi, %r8d
xorl %esi, %esi
cmpl $0x20, -0x2d0(%rdi,%rdx)
sete %sil
xorl %r9d, %r9d
cmpl $0x20, 0x2d0(%rdi,%rdx)
sete %r9b
addl %esi, %r9d
addl %r8d, %r9d
cmpl $0x3, %r9d
jb 0x14a5
movl $0x20, (%rdi,%rdx)
movl $0x1, %eax
addq $0xc, %rdx
jne 0x1452
incq %rcx
addq $0x2d0, %rdi            # imm = 0x2D0
cmpq $0x1e, %rcx
jne 0x144b
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: gene_nour
void gene_nour(t_lab lab[X][Y]) {
	int nombrex, nombrey;
	srand(time(NULL));
	int i, nb_nourr=10;
	for(i=0; i<nb_nourr; i++) {
		nombrex = rand()%X;
		nombrey = rand()%Y;
		while(lab[nombrex][nombrey].etat!=vide || !coord_correctes(nombrex, nombrey)){
			nombrex = rand()%X;
			nombrey = rand()%Y;
		}
		lab[nombrex][nombrey].etat=food;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x1100
movl %eax, %edi
callq 0x10d0
callq 0x1170
movl %eax, %ebp
callq 0x1170
movslq %ebp, %rdx
imulq $-0x77777777, %rdx, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %edx, %ecx
movl %ecx, %esi
shrl $0x1f, %esi
sarl $0x4, %ecx
addl %esi, %ecx
movl %ecx, %esi
shll $0x5, %esi
addl %ecx, %ecx
subl %esi, %ecx
addl %edx, %ecx
cltq
imulq $-0x77777777, %rax, %rdx # imm = 0x88888889
shrq $0x20, %rdx
addl %eax, %edx
movl %edx, %esi
shrl $0x1f, %esi
sarl $0x5, %edx
addl %esi, %edx
imull $0x3c, %edx, %edx
subl %edx, %eax
movslq %ecx, %rdx
movslq %eax, %rsi
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rbx, %rdx
leaq (%rsi,%rsi,2), %rsi
cmpl $0x20, 0x4(%rdx,%rsi,4)
jne 0x1a45
addl $-0x1d, %ecx
cmpl $-0x1c, %ecx
setb %cl
addl $-0x3b, %eax
cmpl $-0x3a, %eax
setb %al
orb %cl, %al
jne 0x1a45
leaq (%rdx,%rsi,4), %rax
addq $0x4, %rax
movl $0x2a, (%rax)
incl %r14d
cmpl $0xa, %r14d
jne 0x1a45
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: decouvrir_lab
void decouvrir_lab(t_lab lab[X][Y]) {
	int i, j;
	for(i=0; i<X; i++) {
		for(j=0; j<Y; j++) {
			lab[i][j].decouvert=seen;
		}
	}
}

// Assembly:
xorl %eax, %eax
movq $-0x2d0, %rcx           # imm = 0xFD30
movl $0x1, 0x2d0(%rdi,%rcx)
addq $0xc, %rcx
jne 0x1aee
incq %rax
addq $0x2d0, %rdi            # imm = 0x2D0
cmpq $0x1e, %rax
jne 0x1ae7
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/./main.c
// Function: verif_victoire
int verif_victoire (t_lab lab[X][Y]) {
	int i, j;
	int victoire = 1;
	int defaite = 1;
	for(i=0;i<X;i++) {
	for(j=0;j<Y;j++) {
	  if(victoire && lab[i][j].decouvert==unseen && lab[i][j].etat!=mur){
		victoire=0;
	  }
	  if(defaite && lab[i][j].etat==insecte){
		defaite=0;
	  }
	  if(!defaite && !victoire)
		return 0;
	}
	}
	if(victoire)
	return 1;
	else if(defaite)
	return 2;
	else
	return 4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %ecx
xorl %eax, %eax
movl $0x1, %edx
movl $0x4, %esi
xorl %r8d, %r8d
testl %edx, %edx
je 0x1b3d
cmpl $0x0, -0x4(%rdi,%rsi)
je 0x1b44
movl $0x1, %edx
movb $0x1, %r9b
jmp 0x1b52
xorl %r9d, %r9d
xorl %edx, %edx
jmp 0x1b52
xorl %r9d, %r9d
cmpl $0x23, (%rdi,%rsi)
sete %r9b
movl %r9d, %edx
testl %ecx, %ecx
je 0x1b66
xorl %r8d, %r8d
cmpl $0x25, (%rdi,%rsi)
setne %r8b
movl %r8d, %ecx
jmp 0x1b68
xorl %ecx, %ecx
orb %r8b, %r9b
je 0x1ba3
addq $0xc, %rsi
cmpq $0x2d4, %rsi            # imm = 0x2D4
jne 0x1b25
incq %rax
addq $0x2d0, %rdi            # imm = 0x2D0
cmpq $0x1e, %rax
jne 0x1b20
movl $0x1, %eax
testl %edx, %edx
jne 0x1ba5
xorl %eax, %eax
testl %ecx, %ecx
sete %al
leal 0x2(,%rax,2), %eax
jmp 0x1ba5
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/./main.c
// Function: regles
int regles() {
	printf("\n Les règles sont les suivantes :\n\n");
	printf("A chaque tour vous pouvez choisir de :\n");
	printf("- Placer soit 0 ou 1 insecte (géré aléatoirement)\n");
	printf("- Placer entre 1 et 3 de nourriture (géré aléatoirement)\n\n");
	printf("Vous gagnez si vous découvrez tout le labyrinthe.\n");
	printf("Vous perdez si tout vos insectes sont morts.\n");
	printf("Vous avez un certain nombre de tour de réserve de nourriture, il en va de même pour la durée de vie.\n");
	printf("Deux insectes sur des cases adjacentes se battent ou se reproduisent.\n");
	printf("Lorsqu'ils vont mourrir de faim, les insectes devienent vert.\n");
	printf("Ils deviennent rouge lorsqu'ils vont mourir de vieillesse\n");
	printf("Ils devienent noirs lorsqu'ils meurent au prochain tour.\n");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x461e(%rip), %rdi      # 0x61d0
callq 0x1070
leaq 0x4636(%rip), %rdi      # 0x61f4
callq 0x1070
leaq 0x4651(%rip), %rdi      # 0x621b
callq 0x1070
leaq 0x467a(%rip), %rdi      # 0x6250
callq 0x1070
leaq 0x46ab(%rip), %rdi      # 0x628d
callq 0x1070
leaq 0x46d2(%rip), %rdi      # 0x62c0
callq 0x1070
leaq 0x46f3(%rip), %rdi      # 0x62ed
callq 0x1070
leaq 0x474f(%rip), %rdi      # 0x6355
callq 0x1070
leaq 0x4789(%rip), %rdi      # 0x639b
callq 0x1070
leaq 0x47bb(%rip), %rdi      # 0x63d9
callq 0x1070
leaq 0x47e9(%rip), %rdi      # 0x6413
callq 0x1070
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/./main.c
// Function: lancement
int lancement() {
	int i, vic, res=5;
	int bouffe=10;
	int dureevie=30;
	int nb_ins;
	int posx;
	int posy;


	init_lab_rand(lab);							//Initialise le labyrinthe

	gene_ins_deb(bouffe, dureevie, lab, fourmi);//Génération des insectes de départ

	gene_nour(lab); 							//Génération de chaque case de nourriture

	decouvrir(lab);								//Cette fonction actualise la découverte du labyrinthe

	afficher_stats(lab, fourmi);
	afficher_lab(lab, fourmi);					//Cette fonction affiche le labyrinthe


	vic=verif_victoire(lab);						//Cette fonction vérifie si on est en situation de victoire (labyrinthe découvert)

	while(vic==0){
		res=action_user(lab, bouffe, dureevie, fourmi);
		if(res==0) return 1;
		nb_ins=nb_insecte();

		for(i=nb_ins-1; i>=0; i--) {					//Cette boucle gère le déplacement des insectes
			posx=fourmi[i].x;
			posy=fourmi[i].y;
			if(posx>=0 && posx<X && posy>=0 && posy<Y && lab[posx][posy].etat==insecte) {
				deplacement(lab, posx, posy, fourmi, bouffe, dureevie);
				decouvrir(lab);
			}
		}
		afficher_stats(lab, fourmi);
		afficher_lab(lab, fourmi);
		vic=verif_victoire(lab);
	}

	if(vic==1)
	printf("Vous avez gagné\n");
	else if(vic==2)
	printf("Vous avez perdu\n");
	else
	printf("Erreur au niveau du lancement\n");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x94ab(%rip), %rbx      # 0xb0f0
movq %rbx, %rdi
callq 0x14bc
leaq 0xe8fc(%rip), %r14      # 0x10550
movl $0xa, %edi
movl $0x1e, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x2fb3
movq %rbx, %rdi
callq 0x1a2d
movq %rbx, %rdi
callq 0x2427
movq %rbx, %rdi
movq %r14, %rsi
callq 0x128c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1712
movq %rbx, %rdi
callq 0x1b10
testl %eax, %eax
jne 0x1d3e
movq %rbx, %rdi
movl $0xa, %esi
movl $0x1e, %edx
movq %r14, %rcx
callq 0x21fb
testl %eax, %eax
je 0x1d6a
xorl %eax, %eax
callq 0x2e54
testl %eax, %eax
jle 0x1c79
movl %eax, %r15d
leaq (%r15,%r15,4), %rax
incq %r15
leaq (%r14,%rax,4), %r12
addq $-0x4, %r12
movl -0x4(%r12), %esi
movl (%r12), %eax
cmpq $0x1e, %rsi
setb %cl
cmpl $0x3c, %eax
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1d2c
movl %eax, %edx
imulq $0x2d0, %rsi, %rax      # imm = 0x2D0
addq %rbx, %rax
leaq (%rdx,%rdx,2), %rcx
cmpl $0x25, 0x4(%rax,%rcx,4)
jne 0x1d2c
movq %rbx, %rdi
movq %r14, %rcx
movl $0xa, %r8d
movl $0x1e, %r9d
callq 0x2830
movq %rbx, %rdi
callq 0x2427
decq %r15
addq $-0x14, %r12
cmpq $0x1, %r15
jg 0x1cd9
jmp 0x1c79
cmpl $0x1, %eax
je 0x1d51
cmpl $0x2, %eax
jne 0x1d5a
leaq 0x471b(%rip), %rdi      # 0x646a
jmp 0x1d61
leaq 0x4722(%rip), %rdi      # 0x647a
jmp 0x1d61
leaq 0x46eb(%rip), %rdi      # 0x644c
callq 0x1070
xorl %eax, %eax
jmp 0x1d6f
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/./main.c
// Function: main
int main() {
	int choix;
	// Affichage du menu
	do {
	printf("\nMenu : \n");
	printf(" 1 - Voir les règles du jeu\n");
	printf(" 2 - Lancer la partie\n");
	printf(" 3 - Quitter\n");
	printf("Votre choix : ");
	scanf("%d", &choix);

	switch(choix) {
	  case 1 : regles() ; break;
	  case 2 : { 	lancement();
								//Réinitialisation des paramètres
								chang_nb_ins(0);
								break;
							}
	  case 3 : break;
	  default : printf("\nErreur de saisie\n\n"); break;

	}
	}
	while(choix!=3);
	printf("Au revoir !\n");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x4724(%rip), %r15      # 0x64b1
leaq 0x4733(%rip), %r12      # 0x64c7
leaq 0x4423(%rip), %r13      # 0x61be
leaq 0x442b(%rip), %rbx      # 0x61cd
leaq -0x2c(%rbp), %r14
leaq 0x46de(%rip), %rdi      # 0x648b
callq 0x1070
leaq 0x46db(%rip), %rdi      # 0x6494
callq 0x1070
movq %r15, %rdi
callq 0x1070
movq %r12, %rdi
callq 0x1070
movq %r13, %rdi
xorl %eax, %eax
callq 0x10a0
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1130
movl -0x2c(%rbp), %eax
cmpl $0x3, %eax
je 0x1e18
cmpl $0x2, %eax
je 0x1dfe
cmpl $0x1, %eax
jne 0x1e0c
callq 0x1ba7
jmp 0x1e18
callq 0x1c33
xorl %edi, %edi
callq 0x2e5b
jmp 0x1e18
leaq 0x46c1(%rip), %rdi      # 0x64d4
callq 0x1070
cmpl $0x3, -0x2c(%rbp)
jne 0x1da6
leaq 0x46c2(%rip), %rdi      # 0x64e7
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/utilisateur.c
// Function: ajout_nourriture
int ajout_nourriture (t_lab lab[X][Y]) {
  int a, b, i;
  srand(time(NULL));
  int nombre = rand()%3 + 1;
  printf("Vous avez le droit à %i cases de nourriture\n", nombre);
  for(i=0;i<nombre;i++) {
    printf("Entrez les coordonnées x et y de la nourriture %i séparées par un espace (doit être découvert) : ", i+1);
    scanf("%i%i", &a, &b);
    while(a<=0 || a>=X || b<=0 || b>=Y || lab[a][b].etat!=vide || lab[a][b].decouvert!=seen){
      printf("Erreur, shame, recommencez\n");
      printf("Entrez les coordonnées x et y de la nourriture %i séparées par un espace : ", i+1);
      scanf("%i%i", &a, &b);
    }
    lab[a][b].etat=food;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
xorl %edi, %edi
callq 0x1100
movl %eax, %edi
callq 0x10d0
callq 0x1170
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
movl %eax, %ebx
subl %ecx, %ebx
negl %ecx
leal (%rax,%rcx), %esi
incl %esi
leaq 0x467f(%rip), %rdi      # 0x650c
xorl %eax, %eax
callq 0x10a0
movl %ebx, 0xc(%rsp)
testl %ebx, %ebx
js 0x1f50
leaq 0x46fa(%rip), %r14      # 0x65a1
leaq 0x14(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x478e(%rip), %r13      # 0x6646
leaq 0x46e7(%rip), %rbx      # 0x65a6
xorl %eax, %eax
movq %rax, 0x18(%rsp)
leal 0x1(%rax), %ebp
leaq 0x466a(%rip), %rdi      # 0x653a
movl %ebp, %esi
xorl %eax, %eax
callq 0x10a0
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1130
movl 0x14(%rsp), %eax
leal -0x1e(%rax), %ecx
cmpl $-0x1d, %ecx
setb %dl
movl 0x10(%rsp), %ecx
leal -0x3c(%rcx), %esi
cmpl $-0x3b, %esi
setb %sil
orb %dl, %sil
jne 0x1f2b
movl %ecx, %ecx
imulq $0x2d0, %rax, %rax      # imm = 0x2D0
addq 0x20(%rsp), %rax
leaq (%rcx,%rcx,2), %rcx
cmpl $0x20, 0x4(%rax,%rcx,4)
jne 0x1f2b
leaq (%rax,%rcx,4), %rax
cmpl $0x1, (%rax)
je 0x1f38
movq %r13, %rdi
callq 0x1070
movq %rbx, %rdi
jmp 0x1ed0
movl $0x2a, 0x4(%rax)
movq 0x18(%rsp), %rax
cmpl 0xc(%rsp), %eax
movl %ebp, %eax
jne 0x1ec1
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/utilisateur.c
// Function: sauver_lab
void sauver_lab(t_lab lab[X][Y], t_fourmi fourmi[]){
	FILE * fic1;
	int tmp;
	int seen;
	int i,j;
	fic1 = fopen("SAVED_GAME", "w");
	for(i =0; i<X; i++){
		for(j =0; j<Y; j++){
			tmp = lab[i][j].etat;
			seen = lab[i][j].decouvert;
			fprintf(fic1, "%c", tmp);
			fprintf(fic1, "%d", seen);
		}
	}
	int nb_ins = nb_insecte();
	fprintf(fic1, "%d ", nb_ins);
	/*for(i=0; i<nb_ins; i++){
		fprintf(fic1, "%d ", fourmi[i].sexe);
		fprintf(fic1, "%d ", fourmi[i].nourriture);
		fprintf(fic1, "%d ", fourmi[i].age);
		fprintf(fic1, "%d ", fourmi[i].x);
		fprintf(fic1, "%d ", fourmi[i].y);
	}*/

	fclose(fic1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x467f(%rip), %rdi      # 0x65f5
leaq 0x4683(%rip), %rsi      # 0x6600
callq 0x1120
movq %rax, %rbx
leaq 0x4241(%rip), %r15      # 0x61cd
xorl %r12d, %r12d
movl $0x4, %r13d
movl -0x4(%r14,%r13), %ebp
movl (%r14,%r13), %edi
movq %rbx, %rsi
callq 0x10c0
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10e0
addq $0xc, %r13
cmpq $0x2d4, %r13            # imm = 0x2D4
jne 0x1f95
incq %r12
addq $0x2d0, %r14            # imm = 0x2D0
cmpq $0x1e, %r12
jne 0x1f8f
xorl %eax, %eax
callq 0x2e54
leaq 0x40e7(%rip), %rsi      # 0x60c7
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x10e0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/utilisateur.c
// Function: action_user
int action_user(t_lab lab[X][Y], int bouffe, int dureevie, t_fourmi fourmi[]){
  int choix, i, j;
  char reponse='\0';
  do {
    printf(" 1 - Ajouter de la nourriture\n");
    printf(" 2 - Ajouter un insecte\n");
    printf(" 3 - Passer\n");
    printf(" 4 - Abandonner la partie\n");
    printf(" 5 - Sauvegarder la partie\n");
    printf(" 6 - Charger la partie\n");
    printf("Votre choix : ");
    scanf("%i%*c", &choix);

    switch(choix) {
		case 1 : ajout_nourriture(lab) ; break;
		case 2 : ajout_insecte(lab, bouffe, dureevie, fourmi) ; break;
		case 3 : break;
		case 4 : {  printf("Souhaitez vous vraiment abandonner la partie ? (y/n) : ");
					scanf("%c%*c", &reponse);
					if(reponse!='y' || reponse!='n') {
						while(reponse!='y' && reponse!='n') {
							printf("Souhaitez vous vraiment abandonner la partie ? (y/n) : ");
							scanf("%c%*c", &reponse);
						}
						if(reponse=='n')
							choix=7;
						}
				 } ; break;
		case 5 :{
					sauver_lab(lab, fourmi);
				}  ; break;
		case 6 :{
					charger_lab(lab, fourmi);
				} ; break;
		case 666 : decouvrir_lab(lab); break;
    default : printf("\nErreur retentez\n\n"); choix=7; break;

    }
  }
  while(choix==7);
  if(choix==4)
    return 0;
  else
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl %esi, 0x8(%rsp)
movq %rdi, %r15
leaq 0x3(%rsp), %r12
movb $0x0, (%r12)
leaq 0x4(%rsp), %r13
leaq 0x42c5(%rip), %rbx      # 0x64f4
leaq 0x43d2(%rip), %rbp      # 0x6608
leaq 0x4403(%rip), %r14      # 0x6640
leaq 0x4439(%rip), %rdi      # 0x667d
callq 0x1070
leaq 0x444b(%rip), %rdi      # 0x669b
callq 0x1070
leaq 0x4457(%rip), %rdi      # 0x66b3
callq 0x1070
leaq 0x4457(%rip), %rdi      # 0x66bf
callq 0x1070
leaq 0x4465(%rip), %rdi      # 0x66d9
callq 0x1070
leaq 0x4474(%rip), %rdi      # 0x66f4
callq 0x1070
leaq 0x3f32(%rip), %rdi      # 0x61be
xorl %eax, %eax
callq 0x10a0
leaq 0x4368(%rip), %rdi      # 0x6602
movq %r13, %rsi
xorl %eax, %eax
callq 0x1130
movl 0x4(%rsp), %eax
leal -0x1(%rax), %ecx
cmpl $0x5, %ecx
ja 0x22eb
movslq (%rbx,%rcx,4), %rax
addq %rbx, %rax
jmpq *%rax
movq %r15, %rdi
callq 0x1e3c
jmp 0x2340
movq %rbp, %rdi
xorl %eax, %eax
callq 0x10a0
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1130
movzbl 0x3(%rsp), %eax
cmpl $0x79, %eax
je 0x2340
cmpl $0x6e, %eax
jne 0x22c3
jmp 0x2329
cmpl $0x29a, %eax            # imm = 0x29A
jne 0x231d
movq %r15, %rdi
callq 0x1ae5
jmp 0x2340
movq %r15, %rdi
callq 0x1f61
jmp 0x2340
movq %r15, %rdi
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rcx
callq 0x317e
jmp 0x2340
leaq 0x43e7(%rip), %rdi      # 0x670b
callq 0x1070
movl $0x7, 0x4(%rsp)
jmp 0x2340
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x2002
movl 0x4(%rsp), %eax
cmpl $0x7, %eax
je 0x223d
cmpl $0x4, %eax
jne 0x2356
xorl %eax, %eax
jmp 0x235b
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/deplacement.c
// Function: combat
int combat(int x, int y, int a, int b, int bouffe, int dureevie, t_lab lab[X][Y], t_fourmi fourmi[]) {
	if(fourmi[lab[x][y].insecte].sexe!=fourmi[lab[a][b].insecte].sexe){
		bebe(bouffe, dureevie, lab, fourmi);
		return 1;
	}
	else {
		if(fourmi[lab[x][y].insecte].age<fourmi[lab[a][b].insecte].age)
			delete_insecte(lab, fourmi, x, y);
		else if(fourmi[lab[x][y].insecte].age>fourmi[lab[a][b].insecte].age)
			delete_insecte(lab, fourmi, a, b);
		else if(fourmi[lab[x][y].insecte].age==fourmi[lab[a][b].insecte].age && fourmi[lab[x][y].insecte].nourriture>fourmi[lab[a][b].insecte].nourriture)
			delete_insecte(lab, fourmi, a, b);
		else if(fourmi[lab[x][y].insecte].age==fourmi[lab[a][b].insecte].age && fourmi[lab[x][y].insecte].nourriture<fourmi[lab[a][b].insecte].nourriture)
			delete_insecte(lab, fourmi, x, y);
		else
			delete_insecte(lab, fourmi, x, y);
		return 0;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %r11d
movl %esi, %eax
movl %edi, %ebx
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r10
movslq %edi, %rsi
movslq %eax, %rdi
imulq $0x2d0, %rsi, %rsi      # imm = 0x2D0
addq %r10, %rsi
leaq (%rdi,%rdi,2), %rdi
movslq 0x8(%rsi,%rdi,4), %rsi
leaq (%rsi,%rsi,4), %rsi
movl (%rcx,%rsi,4), %ebp
movslq %edx, %rdi
movslq %r11d, %r14
imulq $0x2d0, %rdi, %rdi      # imm = 0x2D0
addq %r10, %rdi
leaq (%r14,%r14,2), %r14
movslq 0x8(%rdi,%r14,4), %rdi
leaq (%rdi,%rdi,4), %rdi
cmpl (%rcx,%rdi,4), %ebp
jne 0x23e4
leaq (%rcx,%rsi,4), %rsi
leaq (%rcx,%rdi,4), %rdi
movl 0x8(%rsi), %r8d
movl 0x8(%rdi), %r9d
cmpl %r9d, %r8d
jge 0x23f9
movq %r10, %rdi
movq %rcx, %rsi
movl %ebx, %edx
movl %eax, %ecx
jmp 0x2404
movl %r8d, %edi
movl %r9d, %esi
movq %r10, %rdx
callq 0x30be
movl $0x1, %eax
jmp 0x240b
jle 0x2410
movq %r10, %rdi
movq %rcx, %rsi
movl %r11d, %ecx
callq 0x32ae
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
jne 0x23d8
movl 0x4(%rsi), %ebp
cmpl 0x4(%rdi), %ebp
jg 0x23fb
cmpl %r9d, %r8d
jne 0x23d8
movl 0x4(%rsi), %edx
cmpl 0x4(%rdi), %edx
jmp 0x23d8
// File: /workspace/github_c_makefile_star2_O1/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:
xorl %eax, %eax
leaq 0x1(%rax), %rcx
cmpq $0x1d, %rax
setne %dl
cmpq $0x2, %rax
setb %sil
xorb $0x1, %dl
movq %rdi, %r8
xorl %r9d, %r9d
cmpl $0x25, 0x4(%r8)
jne 0x2543
movl $0x1, (%r8)
cmpq $0x1d, %rax
je 0x2468
movl $0x1, 0x2d0(%r8)
cmpq $0x1b, %rax
ja 0x2479
movl $0x1, 0x5a0(%r8)
cmpq $0x2, %rax
jb 0x248a
movl $0x1, -0x2d0(%r8)
cmpq $0x3, %rax
jb 0x249b
movl $0x1, -0x5a0(%r8)
cmpq $0x3b, %r9
je 0x24a9
movl $0x1, 0xc(%r8)
cmpq $0x39, %r9
ja 0x24b7
movl $0x1, 0x18(%r8)
cmpq $0x2, %rax
jb 0x24c5
movl $0x1, -0xc(%r8)
cmpq $0x3, %r9
jb 0x24d3
movl $0x1, -0x18(%r8)
cmpq $0x3b, %r9
sete %r10b
cmpq $0x1d, %rax
sete %r11b
orb %r10b, %r11b
jne 0x24f3
movl $0x1, 0x2dc(%r8)
cmpq $0x2, %rax
setb %r10b
cmpq $0x2, %r9
setb %r11b
orb %r10b, %r11b
jne 0x2513
movl $0x1, -0x2dc(%r8)
cmpq $0x2, %r9
setb %r10b
orb %dl, %r10b
jne 0x252b
movl $0x1, 0x2c4(%r8)
cmpq $0x3b, %r9
sete %r10b
orb %sil, %r10b
jne 0x2543
movl $0x1, -0x2c4(%r8)
incq %r9
addq $0xc, %r8
cmpq $0x3c, %r9
jne 0x2445
addq $0x2d0, %rdi            # imm = 0x2D0
movq %rcx, %rax
cmpq $0x1e, %rcx
jne 0x2429
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/deplacement.c
// Function: insecte_adjacent
int insecte_adjacent(int px, int py, t_lab lab[X][Y], int bouffe, int dureevie, t_fourmi fourmi[]) {
	if (lab[px-1][py].etat == insecte) {
		combat(px, py, px-1, py, bouffe, dureevie, lab, fourmi);
	} else if (lab[px][py-1].etat == insecte) {
	   combat(px, py, px, py-1, bouffe, dureevie, lab, fourmi);
	} else if (lab[px][py+1].etat == insecte) {
	   combat(px, py, px, py+1, bouffe, dureevie, lab, fourmi);
	} else if (lab[px+1][py].etat == insecte){
		combat(px, py, px+1, py, bouffe, dureevie, lab, fourmi);
	}
	else {
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbx
movq %r9, %r10
movl %r8d, %r9d
movl %ecx, %r8d
movq %rdx, %r11
leal -0x1(%rdi), %edx
movslq %edx, %rax
movslq %esi, %rcx
imulq $0x2d0, %rax, %rax      # imm = 0x2D0
addq %r11, %rax
leaq (%rcx,%rcx,2), %rbx
cmpl $0x25, 0x4(%rax,%rbx,4)
jne 0x2598
movl %esi, %ecx
jmp 0x25c9
movslq %edi, %rax
leal -0x1(%rsi), %ecx
movslq %ecx, %rdx
imulq $0x2d0, %rax, %rax      # imm = 0x2D0
addq %r11, %rax
leaq (%rdx,%rdx,2), %rdx
cmpl $0x25, 0x4(%rax,%rdx,4)
je 0x25c7
leal 0x1(%rsi), %ecx
movslq %ecx, %rdx
leaq (%rdx,%rdx,2), %rdx
cmpl $0x25, 0x4(%rax,%rdx,4)
jne 0x25dd
movl %edi, %edx
pushq %r10
pushq %r11
callq 0x236c
addq $0x10, %rsp
movl $0x1, %eax
popq %rbx
retq
leal 0x1(%rdi), %edx
movslq %edx, %rax
imulq $0x2d0, %rax, %rcx      # imm = 0x2D0
addq %r11, %rcx
xorl %eax, %eax
cmpl $0x25, 0x4(%rcx,%rbx,4)
je 0x2594
jmp 0x25db
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/deplacement.c
// Function: nourriture_pres
int nourriture_pres(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==food)
				return 1;
		}
	}
	return 0;
}

// Assembly:
xorl %eax, %eax
movl $0x4, %ecx
cmpl $0x2a, (%rdi,%rcx)
je 0x282a
addq $0xc, %rcx
cmpq $0x2d4, %rcx            # imm = 0x2D4
jne 0x2804
incq %rax
addq $0x2d0, %rdi            # imm = 0x2D0
cmpq $0x1e, %rax
jne 0x27ff
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/deplacement.c
// Function: matrice
void matrice (int matr_dist[X][Y]){
	int i,j;
	for(i = 0; i<X; i++){			//affichage de la matrice de distance
		for(j = 0; j<Y; j++){
			if(matr_dist[i][j] >9 || matr_dist[i][j] <0){
				printf(" %c", (matr_dist[i][j])+48);
			}
			else{
				printf(" %c", (matr_dist[i][j])+48);
			}
		}
		printf("\n");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x391d(%rip), %r14      # 0x671d
xorl %r15d, %r15d
xorl %r12d, %r12d
movl (%rbx,%r12,4), %eax
leal 0x30(%rax), %ecx
movl %eax, %esi
orl $0x30, %esi
cmpl $0xa, %eax
cmovael %ecx, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10a0
incq %r12
cmpq $0x3c, %r12
jne 0x2e06
movl $0xa, %edi
callq 0x1040
incq %r15
addq $0xf0, %rbx
cmpq $0x1e, %r15
jne 0x2e03
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/insecte.c
// Function: gene_ins
int gene_ins(int bouffe, int dureevie, t_lab lab[X][Y], int a, int b, t_fourmi fourmi[], int choixsexe) {
	srand(time(NULL));
  if(a<=0 || a>=X || b<=0 || b>=Y || lab[a][b].etat!=vide)
    return 1;
	else if(nb_ins>Z){
		printf("\nNombre maximum d'insecte atteint\n");
	}
  else {
    lab[a][b].etat=insecte;
  	lab[a][b].insecte=nb_ins;
		nb_ins++;
		int indice=lab[a][b].insecte;
		//Si on veut un choix aléatoire du sexe
		if(choixsexe==0) {
			int sexe=rand()%100;
	  	if(sexe<50)
	  		fourmi[indice].sexe = MALE;
	  	else
	  		fourmi[indice].sexe = FEMELLE;
		}
		// Si on veut un male
		else if(choixsexe==1) {
			fourmi[indice].sexe = MALE;
		}
		// Si on veut une femelle
		else {
			fourmi[indice].sexe = FEMELLE;
		}

  	fourmi[indice].nourriture = bouffe;
  	fourmi[indice].age = dureevie;
		fourmi[indice].x=a;
		fourmi[indice].y=b;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %r14d
movl %ecx, %r15d
movq %rdx, %r13
movl %esi, %ebp
movl %edi, %r12d
xorl %edi, %edi
callq 0x1100
movl %eax, %edi
callq 0x10d0
leal -0x1e(%r15), %eax
cmpl $-0x1d, %eax
setb %al
leal -0x3c(%r14), %ecx
cmpl $-0x3b, %ecx
setb %cl
orb %al, %cl
movl $0x1, %eax
jne 0x2fa4
movl %r15d, %ecx
movl %r14d, %edx
imulq $0x2d0, %rcx, %rcx      # imm = 0x2D0
addq %rcx, %r13
leaq (%rdx,%rdx,2), %rcx
cmpl $0x20, 0x4(%r13,%rcx,4)
jne 0x2fa4
cmpl $0x29, 0xd99c(%rip)     # 0x10870
jl 0x2ee7
leaq 0x38c5(%rip), %rdi      # 0x67a2
callq 0x1070
jmp 0x2fa2
leaq (,%rcx,4), %rcx
addq %r13, %rcx
movl $0x25, 0x4(%rcx)
movl 0xd971(%rip), %eax      # 0x10870
movl %eax, 0x8(%rcx)
incl 0xd968(%rip)            # 0x10870
movl 0x40(%rsp), %eax
movslq 0x8(%rcx), %r13
cmpl $0x1, %eax
je 0x2f56
testl %eax, %eax
jne 0x2f6a
callq 0x1170
movslq %eax, %rcx
imulq $0x51eb851f, %rcx, %rax # imm = 0x51EB851F
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rax
addl %edx, %eax
imull $0x64, %eax, %eax
subl %eax, %ecx
leaq (,%r13,4), %rax
addq %r13, %rax
leaq (%rbx,%rax,4), %rax
cmpl $0x31, %ecx
jg 0x2f7e
movl $0x0, (%rax)
jmp 0x2f84
leaq (,%r13,4), %rax
addq %r13, %rax
movl $0x0, (%rbx,%rax,4)
jmp 0x2f84
leaq (,%r13,4), %rax
addq %r13, %rax
movl $0x1, (%rbx,%rax,4)
jmp 0x2f84
movl $0x1, (%rax)
leaq (,%r13,4), %rax
addq %r13, %rax
movl %r12d, 0x4(%rbx,%rax,4)
movl %ebp, 0x8(%rbx,%rax,4)
movl %r15d, 0xc(%rbx,%rax,4)
movl %r14d, 0x10(%rbx,%rax,4)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/insecte.c
// Function: gene_ins_deb
void gene_ins_deb(int bouffe, int dureevie, t_lab lab[X][Y], t_fourmi fourmi[]) {
	int i;
	int nbr_ins_deb = 5;
	srand(time(NULL));
	int sexemaj = rand()%2+1;
	int sexe;
	for(i=0;i<nbr_ins_deb;i++) {
		int nombrex, nombrey, sexe;
		nombrex = rand()%X;
		nombrey = rand()%Y;
		while(lab[nombrex][nombrey].etat!=vide){
			nombrex = rand()%X;
			nombrey = rand()%Y;
		}
		if(i%2==1){ //Sexe des insectes impairs (donc sexe minoritaire)
			if(sexemaj==1)
				sexe=2;
			else if(sexemaj==2)
				sexe=1;
		}
		else { // Sexe des insectes pairs (donc sexe majoritaire)
			sexe=sexemaj;
		}
		gene_ins(bouffe, dureevie, lab, nombrex, nombrey, fourmi, sexe);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
movl %esi, 0xc(%rsp)
movl %edi, 0x8(%rsp)
xorl %r13d, %r13d
xorl %edi, %edi
callq 0x1100
movl %eax, %edi
callq 0x10d0
callq 0x1170
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
andl $-0x2, %ecx
movl %eax, %ebx
subl %ecx, %ebx
negl %ecx
leal (%rax,%rcx), %ebp
incl %ebp
callq 0x1170
movl %eax, %r12d
callq 0x1170
movslq %eax, %r8
imulq $-0x77777777, %r8, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %r8d, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x5, %eax
addl %ecx, %eax
imull $0x3c, %eax, %eax
subl %eax, %r8d
movslq %r12d, %rax
imulq $-0x77777777, %rax, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x4, %ecx
addl %edx, %ecx
movl %ecx, %edx
shll $0x5, %edx
addl %ecx, %ecx
subl %edx, %ecx
addl %eax, %ecx
movslq %ecx, %rax
movslq %r8d, %rdx
imulq $0x2d0, %rax, %rax      # imm = 0x2D0
addq %r14, %rax
leaq (%rdx,%rdx,2), %rdx
cmpl $0x20, 0x4(%rax,%rdx,4)
jne 0x2ffc
cmpl $0x2, %ebp
movl $0x1, %eax
cmovel %eax, %r15d
testl %ebx, %ebx
movl $0x2, %eax
cmovel %eax, %r15d
testb $0x1, %r13b
cmovel %ebp, %r15d
movl %r15d, (%rsp)
movl 0x8(%rsp), %edi
movl 0xc(%rsp), %esi
movq %r14, %rdx
movq 0x10(%rsp), %r9
callq 0x2e62
incl %r13d
cmpl $0x5, %r13d
jne 0x2ffc
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j4r0g[P]Projet_Labyrinthe/fonctions/insecte.c
// Function: bebe
void bebe(int bouffe, int dureevie, t_lab lab[X][Y], t_fourmi fourmi[]) {
	srand(time(NULL));
	int nombrex, nombrey;
	nombrex = rand()%X;
	nombrey = rand()%Y;
	while(lab[nombrex][nombrey].etat!=vide && lab[nombrex][nombrey].decouvert!=seen){
		nombrex = rand()%X;
		nombrey = rand()%Y;
	}
	gene_ins(bouffe, dureevie, lab, nombrex, nombrey, fourmi, 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movl %edi, %r15d
xorl %edi, %edi
callq 0x1100
movl %eax, %edi
callq 0x10d0
callq 0x1170
movl %eax, %r12d
callq 0x1170
movslq %eax, %r8
imulq $-0x77777777, %r8, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %r8d, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x5, %eax
addl %ecx, %eax
imull $0x3c, %eax, %eax
subl %eax, %r8d
movslq %r12d, %rax
imulq $-0x77777777, %rax, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x4, %ecx
addl %edx, %ecx
movl %ecx, %edx
shll $0x5, %edx
addl %ecx, %ecx
subl %edx, %ecx
addl %eax, %ecx
movslq %ecx, %rax
movslq %r8d, %rdx
imulq $0x2d0, %rax, %rax      # imm = 0x2D0
addq %r14, %rax
leaq (%rdx,%rdx,2), %rdx
cmpl $0x20, 0x4(%rax,%rdx,4)
je 0x315a
leaq (%rax,%rdx,4), %rax
cmpl $0x1, (%rax)
jne 0x30e3
movl $0x0, (%rsp)
movl %r15d, %edi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %r9
callq 0x2e62
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq