	.file	"62276.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	" %d"
.LC1:
	.string	"O mapa eh balanceado "
.LC2:
	.string	"O jogador %d possui vantagem\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 400
	mov	DWORD PTR -388[rbp], edi
	mov	QWORD PTR -400[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -380[rbp], 0
	mov	DWORD PTR -376[rbp], 0
	jmp	.L2
.L6:
	mov	DWORD PTR -372[rbp], 0
	jmp	.L3
.L5:
	lea	rcx, -336[rbp]
	mov	eax, DWORD PTR -372[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -376[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	add	rax, rsi
	sal	rax, 2
	add	rax, rcx
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -372[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -376[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	add	rax, rcx
	mov	eax, DWORD PTR -336[rbp+rax*4]
	test	eax, eax
	jne	.L4
	add	DWORD PTR -380[rbp], 1
.L4:
	add	DWORD PTR -372[rbp], 1
.L3:
	cmp	DWORD PTR -372[rbp], 8
	jle	.L5
	add	DWORD PTR -376[rbp], 1
.L2:
	cmp	DWORD PTR -376[rbp], 8
	jle	.L6
	lea	rax, -352[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -352[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -344[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -344[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -384[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	QWORD PTR -360[rbp], 0
	mov	eax, DWORD PTR -384[rbp]
	mov	edi, eax
	call	allocateResourcePos
	mov	QWORD PTR -360[rbp], rax
	mov	DWORD PTR -368[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -368[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -360[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -368[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -360[rbp]
	add	rax, rdx
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -368[rbp], 1
.L7:
	mov	eax, DWORD PTR -384[rbp]
	cmp	DWORD PTR -368[rbp], eax
	jl	.L8
	mov	edi, DWORD PTR -384[rbp]
	mov	r8, QWORD PTR -360[rbp]
	mov	rcx, QWORD PTR -344[rbp]
	mov	rdx, QWORD PTR -352[rbp]
	mov	esi, DWORD PTR -380[rbp]
	lea	rax, -336[rbp]
	mov	r9, r8
	mov	r8d, edi
	mov	rdi, rax
	call	checkBalance
	mov	DWORD PTR -364[rbp], eax
	cmp	DWORD PTR -364[rbp], 0
	jne	.L9
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -364[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	mov	rax, QWORD PTR -360[rbp]
	mov	rdi, rax
	call	freeResourcePos
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	allocateResourcePos
	.type	allocateResourcePos, @function
allocateResourcePos:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	allocateResourcePos, .-allocateResourcePos
	.section	.rodata
.LC3:
	.string	"%f\n"
	.text
	.globl	checkBalance
	.type	checkBalance, @function
checkBalance:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 88
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	QWORD PTR -68[rbp], rdx
	mov	QWORD PTR -76[rbp], rcx
	mov	DWORD PTR -80[rbp], r8d
	mov	QWORD PTR -88[rbp], r9
	mov	edi, 72
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -40[rbp], 0
	jmp	.L16
.L17:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	lea	rbx, [rdx+rax]
	mov	edi, 36
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -40[rbp], 1
.L16:
	cmp	DWORD PTR -40[rbp], 8
	jle	.L17
	mov	r8, QWORD PTR -24[rbp]
	mov	rdi, QWORD PTR -88[rbp]
	mov	ecx, DWORD PTR -80[rbp]
	mov	rdx, QWORD PTR -68[rbp]
	mov	esi, DWORD PTR -60[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	rdi, rax
	call	calculateExploration
	movd	eax, xmm0
	mov	DWORD PTR -32[rbp], eax
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, DWORD PTR -32[rbp]
	movq	rax, xmm2
	movq	xmm0, rax
	lea	rdi, .LC3[rip]
	mov	eax, 1
	call	printf@PLT
	mov	r8, QWORD PTR -24[rbp]
	mov	rdi, QWORD PTR -88[rbp]
	mov	ecx, DWORD PTR -80[rbp]
	mov	rdx, QWORD PTR -76[rbp]
	mov	esi, DWORD PTR -60[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	rdi, rax
	call	calculateExploration
	movd	eax, xmm0
	mov	DWORD PTR -28[rbp], eax
	pxor	xmm3, xmm3
	cvtss2sd	xmm3, DWORD PTR -28[rbp]
	movq	rax, xmm3
	movq	xmm0, rax
	lea	rdi, .LC3[rip]
	mov	eax, 1
	call	printf@PLT
	mov	DWORD PTR -36[rbp], 0
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -36[rbp], 1
.L18:
	cmp	DWORD PTR -36[rbp], 8
	jle	.L19
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	movss	xmm0, DWORD PTR -32[rbp]
	subss	xmm0, DWORD PTR -28[rbp]
	movss	xmm1, DWORD PTR .LC4[rip]
	andps	xmm0, xmm1
	cvtss2sd	xmm0, xmm0
	comisd	xmm0, QWORD PTR .LC5[rip]
	jb	.L27
	movss	xmm0, DWORD PTR -28[rbp]
	comiss	xmm0, DWORD PTR -32[rbp]
	jbe	.L28
	mov	eax, 1
	jmp	.L24
.L28:
	mov	eax, 2
	jmp	.L24
.L27:
	mov	eax, 0
.L24:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	checkBalance, .-checkBalance
	.globl	calculateExploration
	.type	calculateExploration, @function
calculateExploration:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	QWORD PTR -52[rbp], rdx
	mov	DWORD PTR -56[rbp], ecx
	mov	QWORD PTR -64[rbp], r8
	mov	QWORD PTR -72[rbp], r9
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	pxor	xmm0, xmm0
	movss	DWORD PTR -24[rbp], xmm0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L30
.L35:
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L31
.L34:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L32
.L33:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -12[rbp], 1
.L32:
	cmp	DWORD PTR -12[rbp], 8
	jle	.L33
	add	DWORD PTR -16[rbp], 1
.L31:
	cmp	DWORD PTR -16[rbp], 8
	jle	.L34
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	lea	rdi, [rdx+rax]
	mov	r8, QWORD PTR -72[rbp]
	lea	rcx, -28[rbp]
	lea	rdx, -32[rbp]
	mov	rsi, QWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	r9, r8
	mov	r8, rcx
	mov	rcx, rdx
	mov	rdx, QWORD PTR [rdi]
	mov	rdi, rax
	call	floodFill
	mov	eax, DWORD PTR -32[rbp]
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, DWORD PTR -44[rbp]
	divss	xmm0, xmm1
	movss	xmm1, DWORD PTR -24[rbp]
	addss	xmm0, xmm1
	movss	DWORD PTR -24[rbp], xmm0
	add	DWORD PTR -20[rbp], 1
.L30:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -56[rbp]
	jl	.L35
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, DWORD PTR -56[rbp]
	movss	xmm0, DWORD PTR .LC7[rip]
	divss	xmm0, xmm1
	mulss	xmm0, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	calculateExploration, .-calculateExploration
	.globl	floodFill
	.type	floodFill, @function
floodFill:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -56[rbp], r8
	mov	QWORD PTR -64[rbp], r9
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L47
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 1
	mov	edx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -40[rbp]
	cmp	edx, eax
	jne	.L41
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -36[rbp]
	cmp	edx, eax
	jne	.L41
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L38
.L41:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, 8
	jg	.L42
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L42
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L42
	mov	r8, QWORD PTR -64[rbp]
	mov	rdi, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	rdi, rax
	call	floodFill
.L42:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	test	eax, eax
	js	.L43
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L43
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L43
	mov	r8, QWORD PTR -64[rbp]
	mov	rdi, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	rdi, rax
	call	floodFill
.L43:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	test	eax, eax
	js	.L44
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L44
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L44
	mov	r8, QWORD PTR -64[rbp]
	mov	rdi, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	rdi, rax
	call	floodFill
.L44:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, 8
	jg	.L38
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L38
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L38
	mov	r8, QWORD PTR -64[rbp]
	mov	rdi, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	rdi, rax
	call	floodFill
	jmp	.L38
.L47:
	nop
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	floodFill, .-floodFill
	.globl	freeResourcePos
	.type	freeResourcePos, @function
freeResourcePos:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	freeResourcePos, .-freeResourcePos
	.section	.rodata
	.align 16
.LC4:
	.long	2147483647
	.long	0
	.long	0
	.long	0
	.align 8
.LC5:
	.long	-755914244
	.long	1062232653
	.align 4
.LC7:
	.long	1065353216
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"62276.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	" %d\000"
	.align	2
.LC1:
	.ascii	"O mapa eh balanceado \000"
	.align	2
.LC2:
	.ascii	"O jogador %d possui vantagem\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 384
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #400
	str	r0, [fp, #-384]
	str	r1, [fp, #-388]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-372]
	mov	r3, #0
	str	r3, [fp, #-368]
	b	.L2
.L6:
	mov	r3, #0
	str	r3, [fp, #-364]
	b	.L3
.L5:
	sub	r1, fp, #332
	ldr	r2, [fp, #-368]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	ldr	r2, [fp, #-364]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r1, r3
	ldr	r0, .L13+4
	bl	__isoc99_scanf
	ldr	r2, [fp, #-368]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	ldr	r2, [fp, #-364]
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-328]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-372]
	add	r3, r3, #1
	str	r3, [fp, #-372]
.L4:
	ldr	r3, [fp, #-364]
	add	r3, r3, #1
	str	r3, [fp, #-364]
.L3:
	ldr	r3, [fp, #-364]
	cmp	r3, #8
	ble	.L5
	ldr	r3, [fp, #-368]
	add	r3, r3, #1
	str	r3, [fp, #-368]
.L2:
	ldr	r3, [fp, #-368]
	cmp	r3, #8
	ble	.L6
	sub	r3, fp, #348
	mov	r1, r3
	ldr	r0, .L13+4
	bl	__isoc99_scanf
	sub	r3, fp, #348
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L13+4
	bl	__isoc99_scanf
	sub	r3, fp, #340
	mov	r1, r3
	ldr	r0, .L13+4
	bl	__isoc99_scanf
	sub	r3, fp, #340
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L13+4
	bl	__isoc99_scanf
	sub	r3, fp, #376
	mov	r1, r3
	ldr	r0, .L13+4
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-356]
	ldr	r3, [fp, #-376]
	mov	r0, r3
	bl	allocateResourcePos
	str	r0, [fp, #-356]
	mov	r3, #0
	str	r3, [fp, #-360]
	b	.L7
.L8:
	ldr	r3, [fp, #-360]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-356]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L13+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-360]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-356]
	add	r3, r2, r3
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L13+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-360]
	add	r3, r3, #1
	str	r3, [fp, #-360]
.L7:
	ldr	r3, [fp, #-376]
	ldr	r2, [fp, #-360]
	cmp	r2, r3
	blt	.L8
	ldr	r3, [fp, #-376]
	sub	ip, fp, #332
	ldr	r2, [fp, #-356]
	str	r2, [sp, #12]
	str	r3, [sp, #8]
	mov	r2, sp
	sub	r3, fp, #340
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	sub	r3, fp, #348
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-372]
	mov	r0, ip
	bl	checkBalance
	str	r0, [fp, #-352]
	ldr	r3, [fp, #-352]
	cmp	r3, #0
	bne	.L9
	ldr	r0, .L13+8
	bl	puts
	b	.L10
.L9:
	ldr	r1, [fp, #-352]
	ldr	r0, .L13+12
	bl	printf
.L10:
	ldr	r0, [fp, #-356]
	bl	freeResourcePos
	mov	r3, #0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	allocateResourcePos
	.syntax unified
	.arm
	.fpu softvfp
	.type	allocateResourcePos, %function
allocateResourcePos:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	allocateResourcePos, .-allocateResourcePos
	.global	__aeabi_f2d
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%f\012\000"
	.global	__aeabi_fsub
	.global	__aeabi_dcmpge
	.global	__aeabi_fcmpgt
	.text
	.align	2
	.global	checkBalance
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkBalance, %function
checkBalance:
	@ args = 16, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #60
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	sub	r1, fp, #52
	stm	r1, {r2, r3}
	mov	r0, #36
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L18
.L19:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r4, r2, r3
	mov	r0, #36
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L18:
	ldr	r3, [fp, #-32]
	cmp	r3, #8
	ble	.L19
	ldr	r3, [fp, #-24]
	str	r3, [sp, #8]
	ldr	r3, [fp, #16]
	str	r3, [sp, #4]
	ldr	r3, [fp, #12]
	str	r3, [sp]
	sub	r3, fp, #52
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	calculateExploration
	str	r0, [fp, #-20]	@ float
	ldr	r0, [fp, #-20]	@ float
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L31
	bl	printf
	ldr	r3, [fp, #-24]
	str	r3, [sp, #8]
	ldr	r3, [fp, #16]
	str	r3, [sp, #4]
	ldr	r3, [fp, #12]
	str	r3, [sp]
	add	r3, fp, #4
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	calculateExploration
	str	r0, [fp, #-16]	@ float
	ldr	r0, [fp, #-16]	@ float
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L31
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L20
.L21:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L20:
	ldr	r3, [fp, #-28]
	cmp	r3, #8
	ble	.L21
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r1, [fp, #-16]	@ float
	ldr	r0, [fp, #-20]	@ float
	bl	__aeabi_fsub
	mov	r3, r0
	bic	r3, r3, #-2147483648
	mov	r0, r3
	bl	__aeabi_f2d
	ldr	r2, .L31+4
	ldr	r3, .L31+8
	bl	__aeabi_dcmpge
	mov	r3, r0
	cmp	r3, #0
	beq	.L29
	ldr	r1, [fp, #-20]	@ float
	ldr	r0, [fp, #-16]	@ float
	bl	__aeabi_fcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L30
	mov	r3, #1
	b	.L26
.L30:
	mov	r3, #2
	b	.L26
.L29:
	mov	r3, #0
.L26:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC4
	.word	-755914244
	.word	1062232653
	.size	checkBalance, .-checkBalance
	.global	__aeabi_i2f
	.global	__aeabi_fdiv
	.global	__aeabi_fadd
	.global	__aeabi_fmul
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	calculateExploration
	.syntax unified
	.arm
	.fpu softvfp
	.type	calculateExploration, %function
calculateExploration:
	@ args = 12, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #76
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	sub	r1, fp, #60
	stm	r1, {r2, r3}
	ldr	r3, [fp, #8]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #12]
	str	r3, [fp, #-68]
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-32]	@ float
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L34
.L39:
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L35
.L38:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L36
.L37:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L36:
	ldr	r3, [fp, #-20]
	cmp	r3, #8
	ble	.L37
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L35:
	ldr	r3, [fp, #-24]
	cmp	r3, #8
	ble	.L38
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [fp, #-68]
	str	r2, [sp, #12]
	sub	r2, fp, #36
	str	r2, [sp, #8]
	sub	r2, fp, #40
	str	r2, [sp, #4]
	ldr	r2, [r3, #4]
	str	r2, [sp]
	ldr	r3, [r3]
	sub	r2, fp, #60
	ldm	r2, {r1, r2}
	ldr	r0, [fp, #-48]
	bl	floodFill
	ldr	r3, [fp, #-40]
	mov	r0, r3
	bl	__aeabi_i2f
	mov	r4, r0
	ldr	r0, [fp, #-52]
	bl	__aeabi_i2f
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	__aeabi_fdiv
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-32]	@ float
	bl	__aeabi_fadd
	mov	r3, r0
	str	r3, [fp, #-32]	@ float
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L34:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	blt	.L39
	ldr	r0, [fp, #4]
	bl	__aeabi_i2f
	mov	r3, r0
	mov	r1, r3
	mov	r0, #1065353216
	bl	__aeabi_fdiv
	mov	r3, r0
	ldr	r1, [fp, #-32]	@ float
	mov	r0, r3
	bl	__aeabi_fmul
	mov	r3, r0
	ldr	r2, .L42
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC5
	.size	calculateExploration, .-calculateExploration
	.align	2
	.global	floodFill
	.syntax unified
	.arm
	.fpu softvfp
	.type	floodFill, %function
floodFill:
	@ args = 24, pretend = 8, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #8
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-16]
	sub	r0, fp, #24
	stm	r0, {r1, r2}
	str	r3, [fp, #8]
	ldr	r3, [fp, #20]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L53
	ldr	r3, [fp, #16]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #16]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #1
	str	r2, [r3]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #8]
	cmp	r2, r3
	bne	.L47
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #12]
	cmp	r2, r3
	bne	.L47
	ldr	r3, [fp, #20]
	mov	r2, #1
	str	r2, [r3]
	b	.L44
.L47:
	sub	r3, fp, #12
	sub	r2, fp, #24
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #8
	bgt	.L48
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L48
	ldr	r3, [fp, #-12]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L48
	ldr	r3, [fp, #24]
	str	r3, [sp, #12]
	ldr	r3, [fp, #20]
	str	r3, [sp, #8]
	ldr	r3, [fp, #16]
	str	r3, [sp, #4]
	ldr	r3, [fp, #12]
	str	r3, [sp]
	ldr	r3, [fp, #8]
	sub	r2, fp, #12
	ldm	r2, {r1, r2}
	ldr	r0, [fp, #-16]
	bl	floodFill
.L48:
	sub	r3, fp, #12
	sub	r2, fp, #24
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L49
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L49
	ldr	r3, [fp, #-12]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L49
	ldr	r3, [fp, #24]
	str	r3, [sp, #12]
	ldr	r3, [fp, #20]
	str	r3, [sp, #8]
	ldr	r3, [fp, #16]
	str	r3, [sp, #4]
	ldr	r3, [fp, #12]
	str	r3, [sp]
	ldr	r3, [fp, #8]
	sub	r2, fp, #12
	ldm	r2, {r1, r2}
	ldr	r0, [fp, #-16]
	bl	floodFill
.L49:
	sub	r3, fp, #12
	sub	r2, fp, #24
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L50
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L50
	ldr	r3, [fp, #-12]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L50
	ldr	r3, [fp, #24]
	str	r3, [sp, #12]
	ldr	r3, [fp, #20]
	str	r3, [sp, #8]
	ldr	r3, [fp, #16]
	str	r3, [sp, #4]
	ldr	r3, [fp, #12]
	str	r3, [sp]
	ldr	r3, [fp, #8]
	sub	r2, fp, #12
	ldm	r2, {r1, r2}
	ldr	r0, [fp, #-16]
	bl	floodFill
.L50:
	sub	r3, fp, #12
	sub	r2, fp, #24
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #8
	bgt	.L44
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L44
	ldr	r3, [fp, #-12]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L44
	ldr	r3, [fp, #24]
	str	r3, [sp, #12]
	ldr	r3, [fp, #20]
	str	r3, [sp, #8]
	ldr	r3, [fp, #16]
	str	r3, [sp, #4]
	ldr	r3, [fp, #12]
	str	r3, [sp]
	ldr	r3, [fp, #8]
	sub	r2, fp, #12
	ldm	r2, {r1, r2}
	ldr	r0, [fp, #-16]
	bl	floodFill
	b	.L44
.L53:
	nop
.L44:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #8
	bx	lr
	.size	floodFill, .-floodFill
	.align	2
	.global	freeResourcePos
	.syntax unified
	.arm
	.fpu softvfp
	.type	freeResourcePos, %function
freeResourcePos:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	freeResourcePos, .-freeResourcePos
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
