	.file	"259389.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"1.6.37"
.LC1:
	.string	"OOM allocating info structure"
.LC2:
	.string	"OOM allocating row buffers"
	.text
	.type	read_png, @function
read_png:
.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	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 0
	lea	rdi, .LC0[rip]
	call	png_create_read_struct@PLT
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	test	rax, rax
	jne	.L2
	mov	eax, 0
	jmp	.L15
.L2:
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, 200
	mov	rcx, QWORD PTR longjmp@GOTPCREL[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	png_set_longjmp_fn@PLT
	mov	rdi, rax
	call	_setjmp@PLT
	endbr64
	test	eax, eax
	je	.L5
	lea	rcx, -40[rbp]
	lea	rax, -48[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	png_destroy_read_struct@PLT
	cmp	QWORD PTR -32[rbp], 0
	je	.L6
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
.L6:
	cmp	QWORD PTR -24[rbp], 0
	je	.L7
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
.L7:
	mov	eax, 0
	jmp	.L15
.L5:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_init_io@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	png_create_info_struct@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	test	rax, rax
	jne	.L8
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	png_error@PLT
.L8:
	mov	rax, QWORD PTR -48[rbp]
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 3
	mov	rdi, rax
	call	png_set_keep_unknown_chunks@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_read_info@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_get_rowbytes@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	je	.L9
	cmp	QWORD PTR -24[rbp], 0
	jne	.L10
.L9:
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	png_error@PLT
.L10:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_get_image_height@PLT
	mov	DWORD PTR -56[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	png_set_interlace_handling@PLT
	mov	DWORD PTR -52[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	png_start_read_image@PLT
	mov	DWORD PTR -64[rbp], 0
	jmp	.L11
.L14:
	mov	eax, DWORD PTR -56[rbp]
	mov	DWORD PTR -60[rbp], eax
	jmp	.L12
.L13:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	png_read_row@PLT
.L12:
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -60[rbp], edx
	test	eax, eax
	jne	.L13
	add	DWORD PTR -64[rbp], 1
.L11:
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jl	.L14
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_read_end@PLT
	lea	rcx, -40[rbp]
	lea	rax, -48[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	png_destroy_read_struct@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 1
.L15:
	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
.LFE6:
	.size	read_png, .-read_png
	.section	.rodata
.LC3:
	.string	"rb"
	.text
	.globl	main
	.type	main, @function
main:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	read_png
	test	eax, eax
	sete	al
	movzx	eax, al
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"259389.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"1.6.37\000"
	.align	2
.LC1:
	.ascii	"OOM allocating info structure\000"
	.align	2
.LC2:
	.ascii	"OOM allocating row buffers\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_png, %function
read_png:
	@ 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]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L17+4
	bl	png_create_read_struct
	mov	r3, r0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	b	.L15
.L2:
	ldr	r3, [fp, #-44]
	mov	r2, #392
	ldr	r1, .L17+8
	mov	r0, r3
	bl	png_set_longjmp_fn
	mov	r3, r0
	mov	r0, r3
	bl	_setjmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	sub	r1, fp, #40
	sub	r3, fp, #44
	mov	r2, #0
	mov	r0, r3
	bl	png_destroy_read_struct
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L6
	ldr	r0, [fp, #-36]
	bl	free
.L6:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L7
	ldr	r0, [fp, #-32]
	bl	free
.L7:
	mov	r3, #0
	b	.L15
.L5:
	ldr	r3, [fp, #-44]
	ldr	r1, [fp, #-48]
	mov	r0, r3
	bl	png_init_io
	ldr	r3, [fp, #-44]
	mov	r0, r3
	bl	png_create_info_struct
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-44]
	ldr	r1, .L17+12
	mov	r0, r3
	bl	png_error
.L8:
	ldr	r0, [fp, #-44]
	mov	r3, #0
	mov	r2, #0
	mov	r1, #3
	bl	png_set_keep_unknown_chunks
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r2
	mov	r0, r3
	bl	png_read_info
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r2
	mov	r0, r3
	bl	png_get_rowbytes
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r0, [fp, #-20]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L10
.L9:
	ldr	r3, [fp, #-44]
	ldr	r1, .L17+16
	mov	r0, r3
	bl	png_error
.L10:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r2
	mov	r0, r3
	bl	png_get_image_height
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-44]
	mov	r0, r3
	bl	png_set_interlace_handling
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-44]
	mov	r0, r3
	bl	png_start_read_image
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L11
.L14:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-24]
	b	.L12
.L13:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	png_read_row
.L12:
	ldr	r3, [fp, #-24]
	sub	r2, r3, #1
	str	r2, [fp, #-24]
	cmp	r3, #0
	bne	.L13
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L11:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L14
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	mov	r1, r2
	mov	r0, r3
	bl	png_read_end
	sub	r1, fp, #40
	sub	r3, fp, #44
	mov	r2, #0
	mov	r0, r3
	bl	png_destroy_read_struct
	ldr	r0, [fp, #-36]
	bl	free
	ldr	r0, [fp, #-32]
	bl	free
	mov	r3, #1
.L15:
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC3
	.word	.LC0
	.word	longjmp
	.word	.LC1
	.word	.LC2
	.size	read_png, .-read_png
	.section	.rodata
	.align	2
.LC4:
	.ascii	"rb\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L21
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	read_png
	mov	r3, r0
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
