	.file	"107866.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"the_stack_data/107866.c"
.LC2:
	.string	"src"
.LC3:
	.string	"P6\n"
.LC4:
	.string	"P5\n"
	.align 8
.LC5:
	.string	"0 == strcmp(line, \"P6\\n\") || 0 == strcmp(line, \"P5\\n\")"
.LC6:
	.string	"%d %d"
	.align 8
.LC7:
	.string	"2 == sscanf(line, \"%d %d\", &w, &h)"
.LC8:
	.string	"%d"
.LC9:
	.string	"1 == sscanf(line, \"%d\", &f)"
.LC10:
	.string	"3*w < 9999"
.LC11:
	.string	"P%c\n%d %d\n%d\n"
	.align 8
.LC12:
	.string	"9 <= printf(\"P%c\\n%d %d\\n%d\\n\",m,w,2*h,f)"
	.align 8
.LC13:
	.string	"f*w == fread(line, 1, f*w, src)"
	.align 8
.LC14:
	.string	"f*w == fwrite(line, 1, f*w, stdout)"
.LC15:
	.string	"h == ftell(src)"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 1880
	.cfi_offset 3, -24
	mov	DWORD PTR -10068[rbp], edi
	mov	QWORD PTR -10080[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -10080[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -10040[rbp], rax
	cmp	QWORD PTR -10040[rbp], 0
	jne	.L2
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 11
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L2:
	mov	rdx, QWORD PTR -10040[rbp]
	lea	rax, -10032[rbp]
	mov	esi, 9999
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -10032[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L3
	lea	rax, -10032[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L3
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 12
	lea	rsi, .LC1[rip]
	lea	rdi, .LC5[rip]
	call	__assert_fail@PLT
.L3:
	movzx	eax, BYTE PTR -10031[rbp]
	mov	BYTE PTR -10057[rbp], al
	mov	rdx, QWORD PTR -10040[rbp]
	lea	rax, -10032[rbp]
	mov	esi, 9999
	mov	rdi, rax
	call	fgets@PLT
	lea	rcx, -10052[rbp]
	lea	rdx, -10056[rbp]
	lea	rax, -10032[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	je	.L4
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 14
	lea	rsi, .LC1[rip]
	lea	rdi, .LC7[rip]
	call	__assert_fail@PLT
.L4:
	mov	rdx, QWORD PTR -10040[rbp]
	lea	rax, -10032[rbp]
	mov	esi, 9999
	mov	rdi, rax
	call	fgets@PLT
	lea	rdx, -10048[rbp]
	lea	rax, -10032[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 1
	je	.L5
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 15
	lea	rsi, .LC1[rip]
	lea	rdi, .LC9[rip]
	call	__assert_fail@PLT
.L5:
	mov	edx, DWORD PTR -10056[rbp]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cmp	eax, 9998
	jle	.L6
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 16
	lea	rsi, .LC1[rip]
	lea	rdi, .LC10[rip]
	call	__assert_fail@PLT
.L6:
	mov	esi, DWORD PTR -10048[rbp]
	mov	eax, DWORD PTR -10052[rbp]
	lea	ecx, [rax+rax]
	mov	edx, DWORD PTR -10056[rbp]
	movsx	eax, BYTE PTR -10057[rbp]
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	eax, 8
	jg	.L7
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 17
	lea	rsi, .LC1[rip]
	lea	rdi, .LC12[rip]
	call	__assert_fail@PLT
.L7:
	cmp	BYTE PTR -10057[rbp], 53
	jne	.L8
	mov	eax, 1
	jmp	.L9
.L8:
	mov	eax, 3
.L9:
	mov	DWORD PTR -10048[rbp], eax
	mov	DWORD PTR -10044[rbp], 0
	jmp	.L10
.L14:
	mov	edx, DWORD PTR -10048[rbp]
	mov	eax, DWORD PTR -10056[rbp]
	imul	eax, edx
	movsx	rbx, eax
	mov	edx, DWORD PTR -10048[rbp]
	mov	eax, DWORD PTR -10056[rbp]
	imul	eax, edx
	movsx	rdx, eax
	mov	rcx, QWORD PTR -10040[rbp]
	lea	rax, -10032[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rbx, rax
	je	.L11
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 23
	lea	rsi, .LC1[rip]
	lea	rdi, .LC13[rip]
	call	__assert_fail@PLT
.L11:
	mov	edx, DWORD PTR -10048[rbp]
	mov	eax, DWORD PTR -10056[rbp]
	imul	eax, edx
	movsx	rbx, eax
	mov	rcx, QWORD PTR stdout[rip]
	mov	edx, DWORD PTR -10048[rbp]
	mov	eax, DWORD PTR -10056[rbp]
	imul	eax, edx
	movsx	rdx, eax
	lea	rax, -10032[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rbx, rax
	je	.L12
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 24
	lea	rsi, .LC1[rip]
	lea	rdi, .LC14[rip]
	call	__assert_fail@PLT
.L12:
	mov	edx, DWORD PTR -10048[rbp]
	mov	eax, DWORD PTR -10056[rbp]
	imul	eax, edx
	movsx	rbx, eax
	mov	rcx, QWORD PTR stdout[rip]
	mov	edx, DWORD PTR -10048[rbp]
	mov	eax, DWORD PTR -10056[rbp]
	imul	eax, edx
	movsx	rdx, eax
	lea	rax, -10032[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rbx, rax
	je	.L13
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 25
	lea	rsi, .LC1[rip]
	lea	rdi, .LC14[rip]
	call	__assert_fail@PLT
.L13:
	add	DWORD PTR -10044[rbp], 1
.L10:
	mov	eax, DWORD PTR -10052[rbp]
	cmp	DWORD PTR -10044[rbp], eax
	jl	.L14
	mov	rax, QWORD PTR -10040[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR -10052[rbp], eax
	mov	rax, QWORD PTR -10040[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR -10052[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -10040[rbp]
	mov	rdi, rax
	call	ftell@PLT
	cmp	rbx, rax
	je	.L15
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 28
	lea	rsi, .LC1[rip]
	lea	rdi, .LC15[rip]
	call	__assert_fail@PLT
.L15:
	mov	rax, QWORD PTR -10040[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"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	"107866.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	"the_stack_data/107866.c\000"
	.align	2
.LC2:
	.ascii	"src\000"
	.align	2
.LC3:
	.ascii	"P6\012\000"
	.align	2
.LC4:
	.ascii	"P5\012\000"
	.align	2
.LC5:
	.ascii	"0 == strcmp(line, \"P6\\n\") || 0 == strcmp(line, \""
	.ascii	"P5\\n\")\000"
	.align	2
.LC6:
	.ascii	"%d %d\000"
	.align	2
.LC7:
	.ascii	"2 == sscanf(line, \"%d %d\", &w, &h)\000"
	.align	2
.LC8:
	.ascii	"%d\000"
	.align	2
.LC9:
	.ascii	"1 == sscanf(line, \"%d\", &f)\000"
	.align	2
.LC10:
	.ascii	"3*w < 9999\000"
	.align	2
.LC11:
	.ascii	"P%c\012%d %d\012%d\012\000"
	.align	2
.LC12:
	.ascii	"9 <= printf(\"P%c\\n%d %d\\n%d\\n\",m,w,2*h,f)\000"
	.align	2
.LC13:
	.ascii	"f*w == fread(line, 1, f*w, src)\000"
	.align	2
.LC14:
	.ascii	"f*w == fwrite(line, 1, f*w, stdout)\000"
	.align	2
.LC15:
	.ascii	"h == ftell(src)\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 10040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #10048
	sub	sp, sp, #4
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-1844]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r1, [r3, #-1848]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1848]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	ldr	r1, .L18+4
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-1816]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1816]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L18+8
	mov	r2, #11
	ldr	r1, .L18+12
	ldr	r0, .L18+16
	bl	__assert_fail
.L2:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #9984
	sub	r3, r3, #12
	sub	r3, r3, #20
	ldr	r2, [r2, #-1816]
	ldr	r1, .L18+20
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #9984
	sub	r3, r3, #12
	sub	r3, r3, #20
	ldr	r1, .L18+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	sub	r3, fp, #9984
	sub	r3, r3, #12
	sub	r3, r3, #20
	ldr	r1, .L18+28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L18+8
	mov	r2, #12
	ldr	r1, .L18+12
	ldr	r0, .L18+32
	bl	__assert_fail
.L3:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldrb	r3, [r3, #-1811]
	strb	r3, [r2, #-1833]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #9984
	sub	r3, r3, #12
	sub	r3, r3, #20
	ldr	r2, [r2, #-1816]
	ldr	r1, .L18+20
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #9984
	sub	r3, r3, #12
	sub	r3, r3, #36
	sub	r2, fp, #9984
	sub	r2, r2, #12
	sub	r2, r2, #40
	sub	r0, fp, #9984
	sub	r0, r0, #12
	sub	r0, r0, #20
	ldr	r1, .L18+36
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	beq	.L4
	ldr	r3, .L18+8
	mov	r2, #14
	ldr	r1, .L18+12
	ldr	r0, .L18+40
	bl	__assert_fail
.L4:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #9984
	sub	r3, r3, #12
	sub	r3, r3, #20
	ldr	r2, [r2, #-1816]
	ldr	r1, .L18+20
	mov	r0, r3
	bl	fgets
	sub	r2, fp, #9984
	sub	r2, r2, #12
	sub	r2, r2, #32
	sub	r3, fp, #9984
	sub	r3, r3, #12
	sub	r3, r3, #20
	ldr	r1, .L18+44
	mov	r0, r3
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #1
	beq	.L5
	ldr	r3, .L18+8
	mov	r2, #15
	ldr	r1, .L18+12
	ldr	r0, .L18+48
	bl	__assert_fail
.L5:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-1832]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, .L18+52
	cmp	r3, r2
	ble	.L6
	ldr	r3, .L18+8
	mov	r2, #16
	ldr	r1, .L18+12
	ldr	r0, .L18+56
	bl	__assert_fail
.L6:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldrb	r1, [r3, #-1833]	@ zero_extendqisi2
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-1832]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1828]
	lsl	r0, r3, #1
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1824]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L18+60
	bl	printf
	mov	r3, r0
	cmp	r3, #8
	bgt	.L7
	ldr	r3, .L18+8
	mov	r2, #17
	ldr	r1, .L18+12
	ldr	r0, .L18+64
	bl	__assert_fail
.L7:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldrb	r3, [r3, #-1833]	@ zero_extendqisi2
	cmp	r3, #53
	bne	.L8
	mov	r3, #1
	b	.L9
.L8:
	mov	r3, #3
.L9:
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-1824]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1820]
	b	.L10
.L14:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1824]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-1832]
	mul	r3, r2, r3
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1824]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-1832]
	mul	r3, r2, r3
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r0, fp, #9984
	sub	r0, r0, #12
	sub	r0, r0, #20
	ldr	r3, [r3, #-1816]
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r4, r3
	beq	.L11
	ldr	r3, .L18+8
	mov	r2, #23
	ldr	r1, .L18+12
	ldr	r0, .L18+68
	bl	__assert_fail
.L11:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1824]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-1832]
	mul	r3, r2, r3
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1824]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-1832]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, .L18+72
	ldr	r3, [r3]
	sub	r0, fp, #9984
	sub	r0, r0, #12
	sub	r0, r0, #20
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	cmp	r4, r3
	beq	.L12
	ldr	r3, .L18+8
	mov	r2, #24
	ldr	r1, .L18+12
	ldr	r0, .L18+76
	bl	__assert_fail
.L12:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1824]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-1832]
	mul	r3, r2, r3
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1824]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-1832]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, .L18+72
	ldr	r3, [r3]
	sub	r0, fp, #9984
	sub	r0, r0, #12
	sub	r0, r0, #20
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	cmp	r4, r3
	beq	.L13
	ldr	r3, .L18+8
	mov	r2, #25
	ldr	r1, .L18+12
	ldr	r0, .L18+76
	bl	__assert_fail
.L13:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1820]
	add	r3, r3, #1
	str	r3, [r2, #-1820]
.L10:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1828]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-1820]
	cmp	r2, r3
	blt	.L14
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-1816]
	bl	ftell
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-1828]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [r3, #-1816]
	bl	fseek
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-1816]
	bl	ftell
	mov	r2, r0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1828]
	cmp	r2, r3
	beq	.L15
	ldr	r3, .L18+8
	mov	r2, #28
	ldr	r1, .L18+12
	ldr	r0, .L18+80
	bl	__assert_fail
.L15:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-1816]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC16
	.word	.LC0
	.word	__PRETTY_FUNCTION__.4803
	.word	.LC1
	.word	.LC2
	.word	9999
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	9998
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	stdout
	.word	.LC14
	.word	.LC15
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.4803, %object
	.size	__PRETTY_FUNCTION__.4803, 5
__PRETTY_FUNCTION__.4803:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
