	.file	"244.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%hhu"
	.text
	.globl	read2
	.type	read2, @function
read2:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	movzx	edx, BYTE PTR 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 26[rax], dl
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 25[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	imul	rax, rdx
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L5:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 26[rax]
	cmp	dl, al
	jnb	.L3
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 26[rax], dl
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 25[rax]
	cmp	dl, al
	jbe	.L4
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 25[rax], dl
.L4:
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	imul	eax, edx
	cmp	DWORD PTR -4[rbp], eax
	jl	.L5
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read2, .-read2
	.globl	read5
	.type	read5, @function
read5:
.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	movzx	edx, BYTE PTR 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 26[rax], dl
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 25[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	imul	rax, rdx
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	imul	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rcx, QWORD PTR -32[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L7
.L10:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 26[rax]
	cmp	dl, al
	jnb	.L8
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 26[rax], dl
.L8:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 25[rax]
	cmp	dl, al
	jbe	.L9
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 25[rax], dl
.L9:
	add	DWORD PTR -4[rbp], 1
.L7:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	imul	eax, edx
	cmp	DWORD PTR -4[rbp], eax
	jl	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read5, .-read5
	.globl	Op1
	.type	Op1, @function
Op1:
.LFB8:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 24[rax]
	movzx	eax, al
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, eax
	movsd	QWORD PTR -32[rbp], xmm2
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 25[rax]
	movzx	eax, al
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, eax
	movq	rax, xmm3
	movq	xmm0, rax
	call	log1p@PLT
	movapd	xmm1, xmm0
	movsd	xmm0, QWORD PTR -32[rbp]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L12
.L13:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	pxor	xmm4, xmm4
	cvtsi2sd	xmm4, eax
	movq	rax, xmm4
	movq	xmm0, rax
	call	log1p@PLT
	movq	rax, xmm0
	movq	xmm0, rax
	mulsd	xmm0, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	cvttsd2si	edx, xmm0
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -12[rbp], 1
.L12:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	imul	eax, edx
	cmp	DWORD PTR -12[rbp], eax
	jl	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Op1, .-Op1
	.globl	Op2
	.type	Op2, @function
Op2:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 24[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 25[rax]
	movzx	edx, al
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 26[rax]
	movzx	eax, al
	sub	edx, eax
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, edx
	divsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L15
.L16:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 26[rax]
	movzx	eax, al
	sub	edx, eax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, edx
	mulsd	xmm0, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	cvttsd2si	edx, xmm0
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -12[rbp], 1
.L15:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	imul	eax, edx
	cmp	DWORD PTR -12[rbp], eax
	jl	.L16
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Op2, .-Op2
	.globl	Op3
	.type	Op3, @function
Op3:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, -1
	je	.L19
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	cmp	DWORD PTR -16[rbp], eax
	je	.L19
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	mov	edx, DWORD PTR -16[rbp]
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -12[rbp]
	lea	ecx, 1[rax]
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	Op3
	mov	eax, DWORD PTR -12[rbp]
	lea	ecx, -1[rax]
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	Op3
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -12[rbp]
	lea	ecx, [rdx+rax]
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	Op3
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, edx
	mov	ecx, eax
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	Op3
.L19:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Op3, .-Op3
	.section	.rodata
.LC1:
	.string	"rb"
.LC2:
	.string	"P%d\n"
.LC3:
	.string	"%d %d\n%hhu\n"
	.text
	.globl	readImage
	.type	readImage, @function
readImage:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	edi, 100
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 100
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	r8, rsi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	jne	.L21
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read2
	jmp	.L22
.L21:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 5
	jne	.L22
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read5
.L22:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	readImage, .-readImage
	.section	.rodata
.LC4:
	.string	"%d\n%s"
	.align 8
.LC5:
	.string	"P2\n# CREATOR: Image Generator SCC-221 - ICC I\n%d %d\n%d\n"
.LC6:
	.string	"Operacao invalida"
.LC7:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -68[rbp], 0
	lea	rdx, -23[rbp]
	lea	rax, -68[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -23[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	readImage
	movzx	eax, BYTE PTR -40[rbp]
	movzx	ecx, al
	mov	edx, DWORD PTR -56[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, 3
	je	.L24
	cmp	eax, 3
	jg	.L25
	cmp	eax, 1
	je	.L26
	cmp	eax, 2
	je	.L27
	jmp	.L25
.L26:
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	Op1
	jmp	.L28
.L27:
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	Op2
	jmp	.L28
.L24:
	mov	eax, DWORD PTR -56[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -60[rbp]
	imul	edx, eax
	mov	eax, DWORD PTR -60[rbp]
	mov	ecx, eax
	shr	ecx, 31
	add	eax, ecx
	sar	eax
	lea	ecx, [rdx+rax]
	lea	rax, -64[rbp]
	mov	edx, 100
	mov	esi, ecx
	mov	rdi, rax
	call	Op3
	jmp	.L28
.L25:
	lea	rdi, .LC6[rip]
	call	puts@PLT
.L28:
	mov	DWORD PTR -68[rbp], 0
	jmp	.L29
.L30:
	mov	rdx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -68[rbp]
	add	eax, 1
	mov	DWORD PTR -68[rbp], eax
.L29:
	mov	edx, DWORD PTR -60[rbp]
	mov	eax, DWORD PTR -56[rbp]
	imul	edx, eax
	mov	eax, DWORD PTR -68[rbp]
	cmp	edx, eax
	jg	.L30
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	"244.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%hhu\000"
	.text
	.align	2
	.global	read2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read2, %function
read2:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldrb	r2, [r3, #16]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	strb	r2, [r3, #18]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3, #17]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mul	r3, r2, r3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L5:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L6
	ldr	r0, [fp, #-20]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #18]	@ zero_extendqisi2
	cmp	r2, r3
	bcs	.L3
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	strb	r2, [r3, #18]
.L3:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #17]	@ zero_extendqisi2
	cmp	r2, r3
	bls	.L4
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	strb	r2, [r3, #17]
.L4:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	ldr	r2, [r2, #8]
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L5
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.size	read2, .-read2
	.align	2
	.global	read5
	.syntax unified
	.arm
	.fpu softvfp
	.type	read5, %function
read5:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldrb	r2, [r3, #16]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	strb	r2, [r3, #18]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3, #17]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mul	r3, r2, r3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r0, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	ldr	r2, [r2, #8]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-20]
	mov	r1, #1
	bl	fread
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L9
.L12:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #18]	@ zero_extendqisi2
	cmp	r2, r3
	bcs	.L10
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	strb	r2, [r3, #18]
.L10:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #17]	@ zero_extendqisi2
	cmp	r2, r3
	bls	.L11
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	strb	r2, [r3, #17]
.L11:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L9:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	ldr	r2, [r2, #8]
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L12
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	read5, .-read5
	.global	__aeabi_i2d
	.global	__aeabi_ui2d
	.global	__aeabi_ddiv
	.global	__aeabi_dmul
	.global	__aeabi_d2uiz
	.align	2
	.global	Op1
	.syntax unified
	.arm
	.fpu softvfp
	.type	Op1, %function
Op1:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3, #16]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3, #17]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	log1p
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L14
.L15:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	log1p
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	add	r4, r2, r3
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [r4]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L14:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-32]
	ldr	r2, [r2, #8]
	mul	r3, r2, r3
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L15
	nop
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	Op1, .-Op1
	.align	2
	.global	Op2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Op2, %function
Op2:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3, #16]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3, #17]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3, #18]	@ zero_extendqisi2
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L17
.L18:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3, #18]	@ zero_extendqisi2
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	add	r4, r2, r3
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [r4]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L17:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-32]
	ldr	r2, [r2, #8]
	mul	r3, r2, r3
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L18
	nop
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	Op2, .-Op2
	.align	2
	.global	Op3
	.syntax unified
	.arm
	.fpu softvfp
	.type	Op3, %function
Op3:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #255
	beq	.L21
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	cmp	r3, r2
	beq	.L21
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	Op3
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	Op3
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	Op3
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	sub	r3, r2, r3
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	Op3
.L21:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	Op3, .-Op3
	.section	.rodata
	.align	2
.LC1:
	.ascii	"rb\000"
	.align	2
.LC2:
	.ascii	"P%d\012\000"
	.align	2
.LC3:
	.ascii	"%d %d\012%hhu\012\000"
	.text
	.align	2
	.global	readImage
	.syntax unified
	.arm
	.fpu softvfp
	.type	readImage, %function
readImage:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, .L25
	ldr	r0, [fp, #-20]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-16]
	mov	r2, r3
	ldr	r1, .L25+4
	ldr	r0, [fp, #-12]
	bl	__isoc99_fscanf
	mov	r0, #100
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	mov	r1, #100
	ldr	r0, [fp, #-8]
	bl	fgets
	ldr	r0, [fp, #-8]
	bl	free
	ldr	r3, [fp, #-16]
	add	r2, r3, #4
	ldr	r3, [fp, #-16]
	add	r1, r3, #8
	ldr	r3, [fp, #-16]
	add	r3, r3, #16
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L25+8
	ldr	r0, [fp, #-12]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L23
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	read2
	b	.L24
.L23:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #5
	bne	.L24
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	read5
.L24:
	ldr	r0, [fp, #-12]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	readImage, .-readImage
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%d\012%s\000"
	.align	2
.LC5:
	.ascii	"P2\012# CREATOR: Image Generator SCC-221 - ICC I\012"
	.ascii	"%d %d\012%d\012\000"
	.align	2
.LC6:
	.ascii	"Operacao invalida\000"
	.align	2
.LC7:
	.ascii	"%d\012\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
	ldr	r3, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-48]
	sub	r2, fp, #24
	sub	r3, fp, #48
	mov	r1, r3
	ldr	r0, .L37+4
	bl	__isoc99_scanf
	sub	r2, fp, #24
	sub	r3, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	readImage
	ldr	r1, [fp, #-40]
	ldr	r2, [fp, #-36]
	ldrb	r3, [fp, #-28]	@ zero_extendqisi2
	ldr	r0, .L37+8
	bl	printf
	ldr	r3, [fp, #-48]
	cmp	r3, #3
	beq	.L28
	cmp	r3, #3
	bgt	.L29
	cmp	r3, #1
	beq	.L30
	cmp	r3, #2
	beq	.L31
	b	.L29
.L30:
	sub	r3, fp, #44
	mov	r0, r3
	bl	Op1
	b	.L32
.L31:
	sub	r3, fp, #44
	mov	r0, r3
	bl	Op2
	b	.L32
.L28:
	ldr	r3, [fp, #-36]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-40]
	mul	r2, r3, r2
	ldr	r3, [fp, #-40]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	add	r1, r2, r3
	sub	r3, fp, #44
	mov	r2, #100
	mov	r0, r3
	bl	Op3
	b	.L32
.L29:
	ldr	r0, .L37+12
	bl	puts
.L32:
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L33
.L34:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-48]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L37+16
	bl	printf
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L33:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-36]
	mul	r2, r3, r2
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	bgt	.L34
	ldr	r3, [fp, #-32]
	mov	r0, r3
	bl	free
	mov	r3, #0
	ldr	r2, .L37
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L36
	bl	__stack_chk_fail
.L36:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC8
	.word	.LC4
	.word	.LC5
	.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
