// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq -0x8(%rbp), %rdx
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rdx, %rcx
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movslq 0x8(%rcx), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq 0x18(%rbp), %rcx
movq 0x10(%rbp), %rdx
movslq -0x10(%rbp), %rsi
imulq $0x2d0, %rsi, %rsi      # imm = 0x2D0
addq %rsi, %rdx
movslq -0x14(%rbp), %rsi
imulq $0xc, %rsi, %rsi
addq %rsi, %rdx
movslq 0x8(%rdx), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
je 0x2e51
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
movq 0x10(%rbp), %rdx
movq 0x18(%rbp), %rcx
callq 0x48f0
movl $0x1, -0x4(%rbp)
jmp 0x310e
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq -0x8(%rbp), %rdx
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rdx, %rcx
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movslq 0x8(%rcx), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x18(%rbp), %rcx
movq 0x10(%rbp), %rdx
movslq -0x10(%rbp), %rsi
imulq $0x2d0, %rsi, %rsi      # imm = 0x2D0
addq %rsi, %rdx
movslq -0x14(%rbp), %rsi
imulq $0xc, %rsi, %rsi
addq %rsi, %rdx
movslq 0x8(%rdx), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jge 0x2ec9
movq 0x10(%rbp), %rdi
movq 0x18(%rbp), %rsi
movl -0x8(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x4b60
jmp 0x3107
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq -0x8(%rbp), %rdx
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rdx, %rcx
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movslq 0x8(%rcx), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x18(%rbp), %rcx
movq 0x10(%rbp), %rdx
movslq -0x10(%rbp), %rsi
imulq $0x2d0, %rsi, %rsi      # imm = 0x2D0
addq %rsi, %rdx
movslq -0x14(%rbp), %rsi
imulq $0xc, %rsi, %rsi
addq %rsi, %rdx
movslq 0x8(%rdx), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jle 0x2f41
movq 0x10(%rbp), %rdi
movq 0x18(%rbp), %rsi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x4b60
jmp 0x3105
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq -0x8(%rbp), %rdx
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rdx, %rcx
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movslq 0x8(%rcx), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x18(%rbp), %rcx
movq 0x10(%rbp), %rdx
movslq -0x10(%rbp), %rsi
imulq $0x2d0, %rsi, %rsi      # imm = 0x2D0
addq %rsi, %rdx
movslq -0x14(%rbp), %rsi
imulq $0xc, %rsi, %rsi
addq %rsi, %rdx
movslq 0x8(%rdx), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jne 0x3019
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq -0x8(%rbp), %rdx
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rdx, %rcx
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movslq 0x8(%rcx), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq 0x18(%rbp), %rcx
movq 0x10(%rbp), %rdx
movslq -0x10(%rbp), %rsi
imulq $0x2d0, %rsi, %rsi      # imm = 0x2D0
addq %rsi, %rdx
movslq -0x14(%rbp), %rsi
imulq $0xc, %rsi, %rsi
addq %rsi, %rdx
movslq 0x8(%rdx), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jle 0x3019
movq 0x10(%rbp), %rdi
movq 0x18(%rbp), %rsi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x4b60
jmp 0x3103
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq -0x8(%rbp), %rdx
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rdx, %rcx
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movslq 0x8(%rcx), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x18(%rbp), %rcx
movq 0x10(%rbp), %rdx
movslq -0x10(%rbp), %rsi
imulq $0x2d0, %rsi, %rsi      # imm = 0x2D0
addq %rsi, %rdx
movslq -0x14(%rbp), %rsi
imulq $0xc, %rsi, %rsi
addq %rsi, %rdx
movslq 0x8(%rdx), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jne 0x30ee
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq -0x8(%rbp), %rdx
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rdx, %rcx
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movslq 0x8(%rcx), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq 0x18(%rbp), %rcx
movq 0x10(%rbp), %rdx
movslq -0x10(%rbp), %rsi
imulq $0x2d0, %rsi, %rsi      # imm = 0x2D0
addq %rsi, %rdx
movslq -0x14(%rbp), %rsi
imulq $0xc, %rsi, %rsi
addq %rsi, %rdx
movslq 0x8(%rdx), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jge 0x30ee
movq 0x10(%rbp), %rdi
movq 0x18(%rbp), %rsi
movl -0x8(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x4b60
jmp 0x3101
movq 0x10(%rbp), %rdi
movq 0x18(%rbp), %rsi
movl -0x8(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x4b60
jmp 0x3103
jmp 0x3105
jmp 0x3107
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)