	.file	"193892240.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"lena_color.pnm"
.LC2:
	.string	"wb"
.LC3:
	.string	"lena_grey.pnm"
.LC4:
	.string	"File error."
.LC5:
	.string	"width: %d (%d)\n"
.LC6:
	.string	"height: %d\n"
.LC7:
	.string	"stride: %d\n"
.LC8:
	.string	"padding: %d\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
	add	rsp, -128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -88[rbp], rax
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	fopen@PLT
	mov	QWORD PTR -80[rbp], rax
	cmp	QWORD PTR -88[rbp], 0
	je	.L2
	cmp	QWORD PTR -80[rbp], 0
	jne	.L3
.L2:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L9
.L3:
	mov	rdx, QWORD PTR -88[rbp]
	lea	rax, -64[rbp]
	mov	rcx, rdx
	mov	edx, 54
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -80[rbp]
	lea	rax, -64[rbp]
	mov	rcx, rdx
	mov	edx, 54
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	lea	rax, -64[rbp]
	add	rax, 18
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -104[rbp], eax
	lea	rax, -64[rbp]
	add	rax, 22
	mov	eax, DWORD PTR [rax]
	cdq
	xor	eax, edx
	mov	DWORD PTR -100[rbp], eax
	sub	DWORD PTR -100[rbp], edx
	mov	eax, DWORD PTR -104[rbp]
	lea	edx, 1[rax]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	and	eax, -4
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	sal	eax, 2
	sub	edx, eax
	mov	eax, DWORD PTR -96[rbp]
	add	eax, edx
	mov	DWORD PTR -92[rbp], eax
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, edx
	add	eax, eax
	add	edx, eax
	mov	eax, DWORD PTR -104[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -96[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -92[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -112[rbp], 0
	jmp	.L5
.L8:
	mov	DWORD PTR -108[rbp], 0
	jmp	.L6
.L7:
	mov	rdx, QWORD PTR -88[rbp]
	lea	rax, -67[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 3
	mov	rdi, rax
	call	fread@PLT
	movzx	eax, BYTE PTR -67[rbp]
	movzx	eax, al
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movsd	xmm0, QWORD PTR .LC9[rip]
	mulsd	xmm1, xmm0
	movzx	eax, BYTE PTR -66[rbp]
	movzx	eax, al
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, eax
	movsd	xmm0, QWORD PTR .LC10[rip]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movzx	eax, BYTE PTR -65[rbp]
	movzx	eax, al
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, eax
	movsd	xmm0, QWORD PTR .LC11[rip]
	mulsd	xmm0, xmm2
	addsd	xmm0, xmm1
	cvttsd2si	eax, xmm0
	mov	BYTE PTR -113[rbp], al
	movzx	ecx, BYTE PTR -113[rbp]
	lea	rax, -67[rbp]
	mov	edx, 3
	mov	esi, ecx
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -80[rbp]
	lea	rax, -67[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 3
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -108[rbp], 1
.L6:
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, DWORD PTR -104[rbp]
	jl	.L7
	mov	eax, DWORD PTR -92[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -88[rbp]
	lea	rax, -67[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	eax, DWORD PTR -92[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -80[rbp]
	lea	rax, -67[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -112[rbp], 1
.L5:
	mov	eax, DWORD PTR -112[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jl	.L8
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L9:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC9:
	.long	858993459
	.long	1070805811
	.align 8
.LC10:
	.long	687194767
	.long	1071812444
	.align 8
.LC11:
	.long	-1030792151
	.long	1069295861
	.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	"193892240.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	"lena_color.pnm\000"
	.align	2
.LC2:
	.ascii	"wb\000"
	.align	2
.LC3:
	.ascii	"lena_grey.pnm\000"
	.align	2
.LC4:
	.ascii	"File error.\000"
	.align	2
.LC5:
	.ascii	"width: %d (%d)\012\000"
	.align	2
.LC6:
	.ascii	"height: %d\012\000"
	.align	2
.LC7:
	.ascii	"stride: %d\012\000"
	.align	2
.LC8:
	.ascii	"padding: %d\012\000"
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_d2uiz
	.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 = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #104
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L11+4
	ldr	r0, .L11+8
	bl	fopen
	str	r0, [fp, #-100]
	ldr	r1, .L11+12
	ldr	r0, .L11+16
	bl	fopen
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	bne	.L3
.L2:
	ldr	r0, .L11+20
	bl	puts
	mov	r3, #0
	b	.L9
.L3:
	sub	r0, fp, #72
	ldr	r3, [fp, #-100]
	mov	r2, #54
	mov	r1, #1
	bl	fread
	sub	r0, fp, #72
	ldr	r3, [fp, #-96]
	mov	r2, #54
	mov	r1, #1
	bl	fwrite
	sub	r3, fp, #72
	add	r3, r3, #18
	ldr	r3, [r3]
	str	r3, [fp, #-92]
	sub	r3, fp, #72
	add	r3, r3, #22
	ldr	r3, [r3]
	cmp	r3, #0
	rsblt	r3, r3, #0
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-92]
	add	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	bic	r3, r3, #3
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-92]
	mov	r2, r3
	lsl	r3, r3, #2
	sub	r3, r2, r3
	ldr	r2, [fp, #-84]
	add	r3, r2, r3
	str	r3, [fp, #-80]
	ldr	r2, [fp, #-92]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r2, r3
	ldr	r1, [fp, #-92]
	ldr	r0, .L11+24
	bl	printf
	ldr	r1, [fp, #-88]
	ldr	r0, .L11+28
	bl	printf
	ldr	r1, [fp, #-84]
	ldr	r0, .L11+32
	bl	printf
	ldr	r1, [fp, #-80]
	ldr	r0, .L11+36
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L5
.L8:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L6
.L7:
	sub	r0, fp, #76
	ldr	r3, [fp, #-100]
	mov	r2, #1
	mov	r1, #3
	bl	fread
	ldrb	r3, [fp, #-76]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L11+40
	ldr	r3, .L11+44
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldrb	r3, [fp, #-75]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L11+48
	ldr	r3, .L11+52
	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, #-74]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L11+56
	ldr	r3, .L11+60
	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
	strb	r3, [fp, #-109]
	ldrb	r1, [fp, #-109]	@ zero_extendqisi2
	sub	r3, fp, #76
	mov	r2, #3
	mov	r0, r3
	bl	memset
	sub	r0, fp, #76
	ldr	r3, [fp, #-96]
	mov	r2, #1
	mov	r1, #3
	bl	fwrite
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L6:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L7
	ldr	r1, [fp, #-80]
	sub	r0, fp, #76
	ldr	r3, [fp, #-100]
	mov	r2, #1
	bl	fread
	ldr	r1, [fp, #-80]
	sub	r0, fp, #76
	ldr	r3, [fp, #-96]
	mov	r2, #1
	bl	fwrite
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L5:
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	blt	.L8
	ldr	r0, [fp, #-96]
	bl	fclose
	ldr	r0, [fp, #-100]
	bl	fclose
	mov	r3, #0
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	858993459
	.word	1070805811
	.word	687194767
	.word	1071812444
	.word	-1030792151
	.word	1069295861
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
