	.file	"293058.c"
	.intel_syntax noprefix
	.text
	.globl	read_program_from_png
	.type	read_program_from_png, @function
read_program_from_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, 160
	mov	QWORD PTR -152[rbp], rdi
	mov	QWORD PTR -160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -112[rbp]
	mov	edx, 104
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -104[rbp], 1
	mov	rdx, QWORD PTR -160[rbp]
	mov	rcx, QWORD PTR -152[rbp]
	lea	rax, -112[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	png_image_begin_read_from_memory@PLT
	test	eax, eax
	jne	.L2
	mov	eax, 0
	jmp	.L9
.L2:
	mov	DWORD PTR -92[rbp], 0
	mov	eax, DWORD PTR -92[rbp]
	and	eax, 8
	test	eax, eax
	jne	.L4
	mov	eax, DWORD PTR -92[rbp]
	shr	eax, 2
	and	eax, 1
	lea	edx, 1[rax]
	jmp	.L5
.L4:
	mov	edx, 1
.L5:
	mov	eax, DWORD PTR -96[rbp]
	imul	edx, eax
	mov	eax, DWORD PTR -92[rbp]
	and	eax, 8
	test	eax, eax
	jne	.L6
	mov	eax, DWORD PTR -92[rbp]
	and	eax, 3
	lea	ecx, 1[rax]
	jmp	.L7
.L6:
	mov	ecx, 1
.L7:
	mov	eax, DWORD PTR -100[rbp]
	imul	eax, ecx
	imul	eax, edx
	mov	eax, eax
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -128[rbp], rax
	mov	rdx, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -128[rbp]
	lea	rax, -112[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	esi, 0
	mov	rdi, rax
	call	png_image_finish_read@PLT
	test	eax, eax
	jne	.L8
	mov	eax, 0
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -128[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -140[rbp], eax
	mov	eax, DWORD PTR -140[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	edx, DWORD PTR -140[rbp]
	mov	rax, QWORD PTR -128[rbp]
	lea	rcx, 4[rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -120[rbp]
.L9:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_program_from_png, .-read_program_from_png
	.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	"293058.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_program_from_png
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_program_from_png, %function
read_program_from_png:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	str	r0, [fp, #-128]
	str	r1, [fp, #-132]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #104
	mov	r2, #96
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-100]
	sub	r3, fp, #104
	ldr	r2, [fp, #-132]
	ldr	r1, [fp, #-128]
	mov	r0, r3
	bl	png_image_begin_read_from_memory
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	b	.L9
.L2:
	mov	r3, #0
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-88]
	and	r3, r3, #8
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-88]
	lsr	r3, r3, #2
	and	r3, r3, #1
	add	r3, r3, #1
	b	.L5
.L4:
	mov	r3, #1
.L5:
	ldr	r2, [fp, #-92]
	mul	r2, r3, r2
	ldr	r3, [fp, #-88]
	and	r3, r3, #8
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-88]
	and	r3, r3, #3
	add	r3, r3, #1
	b	.L7
.L6:
	mov	r3, #1
.L7:
	ldr	r1, [fp, #-96]
	mul	r3, r1, r3
	mul	r3, r2, r3
	str	r3, [fp, #-120]
	ldr	r0, [fp, #-120]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-116]
	ldr	r2, [fp, #-120]
	mov	r1, #0
	ldr	r0, [fp, #-116]
	bl	memset
	sub	r0, fp, #104
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	ldr	r2, [fp, #-116]
	mov	r1, #0
	bl	png_image_finish_read
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	mov	r3, #0
	b	.L9
.L8:
	ldr	r3, [fp, #-116]
	ldr	r3, [r3]
	str	r3, [fp, #-112]
	ldr	r0, [fp, #-112]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-116]
	add	r3, r3, #4
	ldr	r2, [fp, #-112]
	mov	r1, r3
	ldr	r0, [fp, #-108]
	bl	memcpy
	ldr	r0, [fp, #-116]
	bl	free
	ldr	r3, [fp, #-108]
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC0
	.size	read_program_from_png, .-read_program_from_png
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
