	.file	"106607.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Abrindo arquivo..."
	.align 8
.LC1:
	.string	"ERRO: nao foi possivel abrir o arquivo %s\n"
.LC2:
	.string	"clear"
	.align 8
.LC3:
	.string	"Selecione uma opcao ou 0 para encerrar\n[1] - Salvar\n[2] - Limiarizar\n[3] - Inverter\n[4] - Media 3x3\n[5] - Mediana 3x3\n[6] - Numero de brancos\n======> "
.LC4:
	.string	"%d"
	.align 8
.LC5:
	.string	"\nNome do novo arquivo (enter para sobrescrever): "
.LC6:
	.string	"\nNumero de brancos: %d\n"
.LC7:
	.string	"Opcao nao reconhecida"
	.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L2
	mov	eax, 0
	call	mostraUso@PLT
	mov	eax, 0
	jmp	.L17
.L2:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -48[rbp]
	lea	rcx, -52[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	carregaArquivo@PLT
	cdqe
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L17
.L4:
	lea	rdi, .LC2[rip]
	call	system@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, 6
	ja	.L5
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L7[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L7[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L7:
	.long	.L19-.L7
	.long	.L12-.L7
	.long	.L11-.L7
	.long	.L10-.L7
	.long	.L9-.L7
	.long	.L8-.L7
	.long	.L6-.L7
	.text
.L12:
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	call	getchar@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -32[rbp]
	mov	esi, 20
	mov	rdi, rax
	call	fgets@PLT
	mov	ecx, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -52[rbp]
	mov	rsi, QWORD PTR -40[rbp]
	lea	rax, -32[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	salvaArquivo@PLT
	mov	eax, 0
	call	teclaEnter@PLT
	jmp	.L14
.L11:
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	limiarizar@PLT
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	mostraMatriz@PLT
	jmp	.L14
.L10:
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	inverter@PLT
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	mostraMatriz@PLT
	jmp	.L14
.L9:
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	media3x3@PLT
	test	eax, eax
	je	.L20
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	mostraMatriz@PLT
	jmp	.L20
.L8:
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	mediana3x3@PLT
	test	eax, eax
	je	.L21
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	mostraMatriz@PLT
	jmp	.L21
.L6:
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	nroBrancos@PLT
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	teclaEnter@PLT
	jmp	.L14
.L5:
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	teclaEnter@PLT
	jmp	.L14
.L19:
	nop
	jmp	.L14
.L20:
	nop
	jmp	.L14
.L21:
	nop
.L14:
	mov	eax, DWORD PTR -44[rbp]
	test	eax, eax
	jne	.L4
	mov	edx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	mov	eax, 0
	call	desalocaMatriz@PLT
	mov	eax, 0
.L17:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.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	"106607.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Abrindo arquivo...\000"
	.align	2
.LC1:
	.ascii	"ERRO: nao foi possivel abrir o arquivo %s\012\000"
	.align	2
.LC2:
	.ascii	"clear\000"
	.align	2
.LC3:
	.ascii	"Selecione uma opcao ou 0 para encerrar\012[1] - Sal"
	.ascii	"var\012[2] - Limiarizar\012[3] - Inverter\012[4] - "
	.ascii	"Media 3x3\012[5] - Mediana 3x3\012[6] - Numero de b"
	.ascii	"rancos\012======> \000"
	.align	2
.LC4:
	.ascii	"%d\000"
	.align	2
.LC5:
	.ascii	"\012Nome do novo arquivo (enter para sobrescrever):"
	.ascii	" \000"
	.align	2
.LC6:
	.ascii	"\012Numero de brancos: %d\012\000"
	.align	2
.LC7:
	.ascii	"Opcao nao reconhecida\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	bl	mostraUso
	mov	r3, #0
	b	.L17
.L2:
	ldr	r0, .L22+4
	bl	puts
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #40
	sub	r1, fp, #44
	mov	r0, r3
	bl	carregaArquivo
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L22+8
	bl	printf
	mov	r3, #0
	b	.L17
.L4:
	ldr	r0, .L22+12
	bl	system
	ldr	r0, .L22+16
	bl	printf
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L22+20
	bl	__isoc99_scanf
	ldr	r3, [fp, #-36]
	cmp	r3, #6
	ldrls	pc, [pc, r3, asl #2]
	b	.L5
.L7:
	.word	.L19
	.word	.L12
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L6
.L12:
	ldr	r0, .L22+24
	bl	printf
	bl	getchar
	ldr	r3, .L22+28
	ldr	r2, [r3]
	sub	r3, fp, #28
	mov	r1, #20
	mov	r0, r3
	bl	fgets
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	sub	r0, fp, #28
	ldr	r1, [fp, #-32]
	bl	salvaArquivo
	bl	teclaEnter
	b	.L14
.L11:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	limiarizar
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	mostraMatriz
	b	.L14
.L10:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	inverter
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	mostraMatriz
	b	.L14
.L9:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	media3x3
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	mostraMatriz
	b	.L20
.L8:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	mediana3x3
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	mostraMatriz
	b	.L21
.L6:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	nroBrancos
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L22+32
	bl	printf
	bl	teclaEnter
	b	.L14
.L5:
	ldr	r0, .L22+36
	bl	printf
	bl	teclaEnter
	b	.L14
.L19:
	nop
	b	.L14
.L20:
	nop
	b	.L14
.L21:
	nop
.L14:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-44]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	desalocaMatriz
	mov	r3, #0
.L17:
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	stdin
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
