	.file	"226716.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"%d %d\n255\n"
	.text
	.globl	imread
	.type	imread, @function
imread:
.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, 320
	mov	QWORD PTR -312[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -312[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -296[rbp], rax
	mov	rdx, QWORD PTR -296[rbp]
	lea	rax, -272[rbp]
	mov	esi, 256
	mov	rdi, rax
	call	fgets@PLT
	mov	rdx, QWORD PTR -296[rbp]
	lea	rax, -272[rbp]
	mov	esi, 256
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -288[rbp]
	lea	rcx, 4[rax]
	lea	rdx, -288[rbp]
	mov	rax, QWORD PTR -296[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	edx, DWORD PTR -288[rbp]
	mov	eax, DWORD PTR -284[rbp]
	imul	edx, eax
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	mov	DWORD PTR -300[rbp], eax
	mov	eax, DWORD PTR -300[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -280[rbp], rax
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -280[rbp]
	mov	rdx, QWORD PTR -296[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -288[rbp]
	mov	rdx, QWORD PTR -280[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	imread, .-imread
	.section	.rodata
.LC2:
	.string	"wb"
	.align 8
.LC3:
	.string	"P6\n# Generated by zhaipro\n%d %d\n255\n"
	.text
	.globl	imwrite
	.type	imwrite, @function
imwrite:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	rcx, rdx
	mov	rax, rsi
	mov	rdx, rdi
	mov	rdx, rcx
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	ecx, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -48[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -44[rbp]
	imul	edx, eax
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	esi, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	imwrite, .-imwrite
	.globl	max
	.type	max, @function
max:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	ecx, esi
	mov	eax, edx
	mov	edx, edi
	mov	BYTE PTR -4[rbp], dl
	mov	edx, ecx
	mov	BYTE PTR -8[rbp], dl
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -8[rbp]
	cmp	al, BYTE PTR -4[rbp]
	jbe	.L6
	movzx	eax, BYTE PTR -8[rbp]
	mov	BYTE PTR -4[rbp], al
.L6:
	movzx	eax, BYTE PTR -12[rbp]
	cmp	al, BYTE PTR -4[rbp]
	jbe	.L7
	movzx	eax, BYTE PTR -12[rbp]
	mov	BYTE PTR -4[rbp], al
.L7:
	movzx	eax, BYTE PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	max, .-max
	.globl	rgb2gray
	.type	rgb2gray, @function
rgb2gray:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	ecx, esi
	mov	eax, edx
	mov	edx, edi
	mov	BYTE PTR -4[rbp], dl
	mov	edx, ecx
	mov	BYTE PTR -8[rbp], dl
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -4[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movsd	xmm0, QWORD PTR .LC4[rip]
	mulsd	xmm1, xmm0
	movzx	eax, BYTE PTR -8[rbp]
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, eax
	movsd	xmm0, QWORD PTR .LC5[rip]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movzx	eax, BYTE PTR -12[rbp]
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, eax
	movsd	xmm0, QWORD PTR .LC6[rip]
	mulsd	xmm0, xmm2
	addsd	xmm0, xmm1
	cvttsd2si	eax, xmm0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	rgb2gray, .-rgb2gray
	.globl	recolor
	.type	recolor, @function
recolor:
.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, 96
	mov	rax, rsi
	mov	r8, rdi
	mov	rsi, r8
	mov	rdi, r9
	mov	rdi, rax
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -64[rbp], rdx
	mov	QWORD PTR -56[rbp], rcx
	movsd	QWORD PTR -72[rbp], xmm0
	movsd	QWORD PTR -80[rbp], xmm1
	movsd	QWORD PTR -88[rbp], xmm2
	movsd	QWORD PTR -96[rbp], xmm3
	mov	edx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -44[rbp]
	imul	eax, edx
	mov	DWORD PTR -20[rbp], eax
	cvttsd2si	eax, QWORD PTR -88[rbp]
	movzx	edx, al
	cvttsd2si	eax, QWORD PTR -80[rbp]
	movzx	ecx, al
	cvttsd2si	eax, QWORD PTR -72[rbp]
	movzx	eax, al
	mov	esi, ecx
	mov	edi, eax
	call	max
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	movsd	QWORD PTR -16[rbp], xmm0
	movsd	xmm0, QWORD PTR -72[rbp]
	divsd	xmm0, QWORD PTR -16[rbp]
	movsd	QWORD PTR -72[rbp], xmm0
	movsd	xmm0, QWORD PTR -80[rbp]
	divsd	xmm0, QWORD PTR -16[rbp]
	movsd	QWORD PTR -80[rbp], xmm0
	movsd	xmm0, QWORD PTR -88[rbp]
	divsd	xmm0, QWORD PTR -16[rbp]
	movsd	QWORD PTR -88[rbp], xmm0
	mov	DWORD PTR -24[rbp], 0
	jmp	.L12
.L13:
	mov	rcx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cdqe
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -27[rbp], al
	mov	rcx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cdqe
	add	rax, 1
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -26[rbp], al
	mov	rcx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cdqe
	add	rax, 2
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -25[rbp], al
	mov	rcx, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cdqe
	add	rax, 2
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rsi, QWORD PTR -56[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	eax, ecx
	add	eax, eax
	add	eax, ecx
	cdqe
	add	rax, 1
	add	rax, rsi
	movzx	eax, BYTE PTR [rax]
	movzx	ecx, al
	mov	rdi, QWORD PTR -56[rbp]
	mov	esi, DWORD PTR -24[rbp]
	mov	eax, esi
	add	eax, eax
	add	eax, esi
	cdqe
	add	rax, rdi
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, ecx
	mov	edi, eax
	call	rgb2gray
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	movsd	QWORD PTR -16[rbp], xmm0
	movsd	xmm0, QWORD PTR -16[rbp]
	movsd	xmm1, QWORD PTR .LC7[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -16[rbp], xmm0
	movzx	edx, BYTE PTR -25[rbp]
	movzx	ecx, BYTE PTR -26[rbp]
	movzx	eax, BYTE PTR -27[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	max
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	movsd	QWORD PTR -8[rbp], xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	movsd	xmm2, QWORD PTR .LC7[rip]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC8[rip]
	subsd	xmm0, xmm1
	movq	rax, xmm0
	movsd	xmm0, QWORD PTR -96[rbp]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	movsd	xmm1, QWORD PTR .LC7[rip]
	mulsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR .LC7[rip]
	subsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	movzx	eax, BYTE PTR -27[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movsd	xmm0, QWORD PTR .LC8[rip]
	subsd	xmm0, QWORD PTR -16[rbp]
	mulsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	mulsd	xmm0, QWORD PTR -72[rbp]
	mulsd	xmm0, QWORD PTR -16[rbp]
	addsd	xmm0, xmm1
	mov	rcx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cdqe
	add	rax, rcx
	cvttsd2si	edx, xmm0
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR -26[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movsd	xmm0, QWORD PTR .LC8[rip]
	subsd	xmm0, QWORD PTR -16[rbp]
	mulsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	mulsd	xmm0, QWORD PTR -80[rbp]
	mulsd	xmm0, QWORD PTR -16[rbp]
	addsd	xmm0, xmm1
	mov	rcx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cdqe
	add	rax, 1
	add	rax, rcx
	cvttsd2si	edx, xmm0
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR -25[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movsd	xmm0, QWORD PTR .LC8[rip]
	subsd	xmm0, QWORD PTR -16[rbp]
	mulsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	mulsd	xmm0, QWORD PTR -88[rbp]
	mulsd	xmm0, QWORD PTR -16[rbp]
	addsd	xmm0, xmm1
	mov	rcx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cdqe
	add	rax, 2
	add	rax, rcx
	cvttsd2si	edx, xmm0
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -24[rbp], 1
.L12:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	recolor, .-recolor
	.section	.rodata
.LC9:
	.string	"%lf"
.LC10:
	.string	"14.ppm"
.LC11:
	.string	"mask.ppm"
.LC12:
	.string	"result.ppm"
	.text
	.globl	main
	.type	main, @function
main:
.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, 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]
	lea	rdx, -56[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	BYTE PTR -59[rbp], 102
	mov	BYTE PTR -58[rbp], 22
	mov	BYTE PTR -57[rbp], 64
	lea	rdi, .LC10[rip]
	call	imread
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	lea	rdi, .LC11[rip]
	call	imread
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	movsd	xmm2, QWORD PTR -56[rbp]
	movzx	eax, BYTE PTR -57[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movzx	eax, BYTE PTR -58[rbp]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	movzx	eax, BYTE PTR -59[rbp]
	pxor	xmm4, xmm4
	cvtsi2sd	xmm4, eax
	movq	rcx, xmm4
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rdi, QWORD PTR -48[rbp]
	mov	rsi, QWORD PTR -40[rbp]
	movapd	xmm3, xmm2
	movapd	xmm2, xmm1
	movapd	xmm1, xmm0
	movq	xmm0, rcx
	mov	rcx, rdx
	mov	rdx, rax
	call	recolor
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdx, rax
	lea	rdi, .LC12[rip]
	call	imwrite
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC4:
	.long	-446676599
	.long	1070801616
	.align 8
.LC5:
	.long	962072674
	.long	1071827124
	.align 8
.LC6:
	.long	-1614907703
	.long	1069362970
	.align 8
.LC7:
	.long	0
	.long	1081073664
	.align 8
.LC8:
	.long	0
	.long	1072693248
	.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	"226716.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	"%d %d\012255\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	imread
	.syntax unified
	.arm
	.fpu softvfp
	.type	imread, %function
imread:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #288
	str	r0, [fp, #-288]
	str	r1, [fp, #-292]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L4+4
	ldr	r0, [fp, #-292]
	bl	fopen
	str	r0, [fp, #-284]
	sub	r3, fp, #264
	ldr	r2, [fp, #-284]
	mov	r1, #256
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #264
	ldr	r2, [fp, #-284]
	mov	r1, #256
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #276
	add	r3, r3, #4
	sub	r2, fp, #276
	ldr	r1, .L4+8
	ldr	r0, [fp, #-284]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-276]
	ldr	r2, [fp, #-272]
	mul	r2, r3, r2
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	str	r3, [fp, #-280]
	ldr	r0, [fp, #-280]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-268]
	ldr	r0, [fp, #-268]
	ldr	r3, [fp, #-284]
	mov	r2, #1
	ldr	r1, [fp, #-280]
	bl	fread
	ldr	r0, [fp, #-284]
	bl	fclose
	ldr	r3, [fp, #-288]
	mov	ip, r3
	sub	r3, fp, #276
	ldm	r3, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, .L4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	ldr	r0, [fp, #-288]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	imread, .-imread
	.section	.rodata
	.align	2
.LC3:
	.ascii	"wb\000"
	.align	2
.LC4:
	.ascii	"P6\012# Generated by zhaipro\012%d %d\012255\012\000"
	.text
	.align	2
	.global	imwrite
	.syntax unified
	.arm
	.fpu softvfp
	.type	imwrite, %function
imwrite:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	sub	r0, fp, #28
	stm	r0, {r1, r2, r3}
	ldr	r1, .L7
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	ldr	r1, .L7+4
	ldr	r0, [fp, #-12]
	bl	fprintf
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	mul	r2, r3, r2
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-20]
	ldr	r3, [fp, #-12]
	mov	r2, #1
	ldr	r1, [fp, #-8]
	bl	fwrite
	ldr	r0, [fp, #-12]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC3
	.word	.LC4
	.size	imwrite, .-imwrite
	.align	2
	.global	max
	.syntax unified
	.arm
	.fpu softvfp
	.type	max, %function
max:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, r0
	strb	r3, [fp, #-5]
	mov	r3, r1
	strb	r3, [fp, #-6]
	mov	r3, r2
	strb	r3, [fp, #-7]
	ldrb	r2, [fp, #-6]	@ zero_extendqisi2
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	bls	.L10
	ldrb	r3, [fp, #-6]
	strb	r3, [fp, #-5]
.L10:
	ldrb	r2, [fp, #-7]	@ zero_extendqisi2
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	bls	.L11
	ldrb	r3, [fp, #-7]
	strb	r3, [fp, #-5]
.L11:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	max, .-max
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_d2uiz
	.align	2
	.global	rgb2gray
	.syntax unified
	.arm
	.fpu softvfp
	.type	rgb2gray, %function
rgb2gray:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	mov	r3, r0
	strb	r3, [fp, #-13]
	mov	r3, r1
	strb	r3, [fp, #-14]
	mov	r3, r2
	strb	r3, [fp, #-15]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L15
	ldr	r3, .L15+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldrb	r3, [fp, #-14]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L15+8
	ldr	r3, .L15+12
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldrb	r3, [fp, #-15]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L15+16
	ldr	r3, .L15+20
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r3, r3, #255
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L16:
	.align	2
.L15:
	.word	-446676599
	.word	1070801616
	.word	962072674
	.word	1071827124
	.word	-1614907703
	.word	1069362970
	.size	rgb2gray, .-rgb2gray
	.global	__aeabi_ui2d
	.global	__aeabi_ddiv
	.global	__aeabi_dsub
	.align	2
	.global	recolor
	.syntax unified
	.arm
	.fpu softvfp
	.type	recolor, %function
recolor:
	@ args = 48, pretend = 8, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #8
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #48
	sub	ip, fp, #64
	stm	ip, {r0, r1, r2}
	str	r3, [fp, #8]
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-60]
	mul	r3, r2, r3
	str	r3, [fp, #-40]
	add	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r4, r3, #255
	add	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r5, r3, #255
	add	r1, fp, #36
	ldmia	r1, {r0-r1}
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r3, r3, #255
	mov	r2, r3
	mov	r1, r5
	mov	r0, r4
	bl	max
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	add	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #20]
	str	r3, [fp, #24]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	add	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #28]
	str	r3, [fp, #32]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	add	r1, fp, #36
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #36]
	str	r3, [fp, #40]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L18
.L19:
	ldr	r1, [fp, #-56]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r1, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-47]
	ldr	r1, [fp, #-56]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #1
	add	r3, r1, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-46]
	ldr	r1, [fp, #-56]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #2
	add	r3, r1, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-45]
	ldr	r1, [fp, #16]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r1, r3
	ldrb	r0, [r3]	@ zero_extendqisi2
	ldr	r1, [fp, #16]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #1
	add	r3, r1, r3
	ldrb	ip, [r3]	@ zero_extendqisi2
	ldr	r1, [fp, #16]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #2
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	mov	r1, ip
	bl	rgb2gray
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	mov	r2, #0
	ldr	r3, .L20
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldrb	r2, [fp, #-45]	@ zero_extendqisi2
	ldrb	r1, [fp, #-46]	@ zero_extendqisi2
	ldrb	r3, [fp, #-47]	@ zero_extendqisi2
	mov	r0, r3
	bl	max
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	mov	r2, #0
	ldr	r3, .L20
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L20+4
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	add	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	pow
	mov	r2, #0
	ldr	r3, .L20
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L20
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldrb	r3, [fp, #-47]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, #0
	ldr	r1, .L20+4
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	add	r3, fp, #20
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	mov	r7, r3
	ldr	r1, [fp, #-56]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r4, r1, r3
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [r4]
	ldrb	r3, [fp, #-46]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, #0
	ldr	r1, .L20+4
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	add	r3, fp, #28
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	mov	r7, r3
	ldr	r1, [fp, #-56]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #1
	add	r4, r1, r3
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [r4]
	ldrb	r3, [fp, #-45]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, #0
	ldr	r1, .L20+4
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	add	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	mov	r7, r3
	ldr	r1, [fp, #-56]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #2
	add	r4, r1, r3
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [r4]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L18:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	blt	.L19
	nop
	nop
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, lr}
	add	sp, sp, #8
	bx	lr
.L21:
	.align	2
.L20:
	.word	1081073664
	.word	1072693248
	.size	recolor, .-recolor
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%lf\000"
	.align	2
.LC6:
	.ascii	"14.ppm\000"
	.align	2
.LC7:
	.ascii	"mask.ppm\000"
	.align	2
.LC8:
	.ascii	"result.ppm\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #96
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #60
	ldr	r1, .L25+4
	mov	r0, r3
	bl	__isoc99_sscanf
	mov	r3, #102
	strb	r3, [fp, #-63]
	mov	r3, #22
	strb	r3, [fp, #-62]
	mov	r3, #64
	strb	r3, [fp, #-61]
	sub	r3, fp, #48
	ldr	r1, .L25+8
	mov	r0, r3
	bl	imread
	sub	r3, fp, #36
	ldr	r1, .L25+12
	mov	r0, r3
	bl	imread
	ldrb	r3, [fp, #-63]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r4, r0
	mov	r5, r1
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r6, r0
	mov	r7, r1
	ldrb	r3, [fp, #-61]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	str	r2, [sp, #32]
	str	r3, [sp, #36]
	str	r0, [sp, #24]
	str	r1, [sp, #28]
	str	r6, [sp, #16]
	str	r7, [sp, #20]
	str	r4, [sp, #8]
	str	r5, [sp, #12]
	mov	r2, sp
	sub	r3, fp, #32
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r3, [fp, #-36]
	sub	r2, fp, #48
	ldm	r2, {r0, r1, r2}
	bl	recolor
	sub	r3, fp, #48
	ldm	r3, {r1, r2, r3}
	ldr	r0, .L25+16
	bl	imwrite
	ldr	r3, [fp, #-40]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-28]
	mov	r0, r3
	bl	free
	mov	r3, #0
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC9
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
