	.file	"879623.c"
	.intel_syntax noprefix
	.text
	.globl	width
	.bss
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.zero	4
	.globl	height
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.globl	color_type
	.type	color_type, @object
	.size	color_type, 1
color_type:
	.zero	1
	.globl	bit_depth
	.type	bit_depth, @object
	.size	bit_depth, 1
bit_depth:
	.zero	1
	.globl	row_pointers
	.align 8
	.type	row_pointers, @object
	.size	row_pointers, 8
row_pointers:
	.zero	8
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"1.6.37"
	.text
	.globl	read_png_file
	.type	read_png_file, @function
read_png_file:
.LFB6:
	.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, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR -56[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 0
	lea	rdi, .LC1[rip]
	call	png_create_read_struct@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L2
	call	abort@PLT
.L2:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	png_create_info_struct@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L3
	call	abort@PLT
.L3:
	mov	rax, QWORD PTR -32[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
	call	abort@PLT
.L5:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_init_io@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_read_info@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_get_image_width@PLT
	mov	DWORD PTR width[rip], eax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_get_image_height@PLT
	mov	DWORD PTR height[rip], eax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_get_color_type@PLT
	mov	BYTE PTR color_type[rip], al
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_get_bit_depth@PLT
	mov	BYTE PTR bit_depth[rip], al
	movzx	eax, BYTE PTR bit_depth[rip]
	cmp	al, 16
	jne	.L6
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	png_set_strip_16@PLT
.L6:
	movzx	eax, BYTE PTR color_type[rip]
	cmp	al, 3
	jne	.L7
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	png_set_palette_to_rgb@PLT
.L7:
	movzx	eax, BYTE PTR color_type[rip]
	test	al, al
	jne	.L8
	movzx	eax, BYTE PTR bit_depth[rip]
	cmp	al, 7
	ja	.L8
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	png_set_expand_gray_1_2_4_to_8@PLT
.L8:
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	rdi, rax
	call	png_get_valid@PLT
	test	eax, eax
	je	.L9
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	png_set_tRNS_to_alpha@PLT
.L9:
	movzx	eax, BYTE PTR color_type[rip]
	cmp	al, 2
	je	.L10
	movzx	eax, BYTE PTR color_type[rip]
	test	al, al
	je	.L10
	movzx	eax, BYTE PTR color_type[rip]
	cmp	al, 3
	jne	.L11
.L10:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, 1
	mov	esi, 255
	mov	rdi, rax
	call	png_set_filler@PLT
.L11:
	movzx	eax, BYTE PTR color_type[rip]
	test	al, al
	je	.L12
	movzx	eax, BYTE PTR color_type[rip]
	cmp	al, 4
	jne	.L13
.L12:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	png_set_gray_to_rgb@PLT
.L13:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_read_update_info@PLT
	mov	eax, DWORD PTR height[rip]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR row_pointers[rip], rax
	mov	DWORD PTR -44[rbp], 0
	jmp	.L14
.L15:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_get_rowbytes@PLT
	mov	rcx, QWORD PTR row_pointers[rip]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -44[rbp], 1
.L14:
	mov	eax, DWORD PTR height[rip]
	cmp	DWORD PTR -44[rbp], eax
	jl	.L15
	mov	rdx, QWORD PTR row_pointers[rip]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_read_image@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_png_file, .-read_png_file
	.section	.rodata
.LC2:
	.string	"uint16_t bitmap[%d][%d] ={\n"
.LC3:
	.string	"{ "
.LC4:
	.string	"0x%04X, "
.LC5:
	.string	" },"
	.align 8
.LC6:
	.string	"};\nuint16_t transparent_color=0x%04X;\n"
	.text
	.globl	process_png_file
	.type	process_png_file, @function
process_png_file:
.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	WORD PTR -28[rbp], 0
	mov	edx, DWORD PTR width[rip]
	mov	eax, DWORD PTR height[rip]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -24[rbp], 0
	jmp	.L17
.L21:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR row_pointers[rip]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L18
.L20:
	mov	eax, DWORD PTR -20[rbp]
	sal	eax, 2
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	shr	al, 3
	movzx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	shr	al, 2
	movzx	eax, al
	sal	eax, 5
	add	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	shr	al, 3
	movzx	eax, al
	sal	eax, 11
	add	eax, edx
	mov	WORD PTR -26[rbp], ax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L19
	movzx	eax, WORD PTR -26[rbp]
	mov	WORD PTR -28[rbp], ax
.L19:
	movzx	eax, WORD PTR -26[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -20[rbp], 1
.L18:
	mov	eax, DWORD PTR width[rip]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L20
	lea	rdi, .LC5[rip]
	call	puts@PLT
	add	DWORD PTR -24[rbp], 1
.L17:
	mov	eax, DWORD PTR height[rip]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L21
	movzx	eax, WORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	process_png_file, .-process_png_file
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 2
	je	.L23
	call	abort@PLT
.L23:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	read_png_file
	mov	eax, 0
	call	process_png_file
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"879623.c"
	.text
	.comm	width,4,4
	.comm	height,4,4
	.comm	color_type,1,1
	.comm	bit_depth,1,1
	.comm	row_pointers,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	"1.6.37\000"
	.text
	.align	2
	.global	read_png_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_png_file, %function
read_png_file:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	ldr	r1, .L16
	ldr	r0, [fp, #-32]
	bl	fopen
	mov	r3, r0
	str	r3, [fp, #-28]
	mov	r3, #0
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L16+4
	bl	png_create_read_struct
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L2
	bl	abort
.L2:
	ldr	r0, [fp, #-24]
	bl	png_create_info_struct
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L3
	bl	abort
.L3:
	mov	r2, #392
	ldr	r1, .L16+8
	ldr	r0, [fp, #-24]
	bl	png_set_longjmp_fn
	mov	r3, r0
	mov	r0, r3
	bl	_setjmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	bl	abort
.L5:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	png_init_io
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	png_read_info
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	png_get_image_width
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L16+12
	str	r2, [r3]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	png_get_image_height
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L16+16
	str	r2, [r3]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	png_get_color_type
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L16+20
	strb	r2, [r3]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	png_get_bit_depth
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L16+24
	strb	r2, [r3]
	ldr	r3, .L16+24
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #16
	bne	.L6
	ldr	r0, [fp, #-24]
	bl	png_set_strip_16
.L6:
	ldr	r3, .L16+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #3
	bne	.L7
	ldr	r0, [fp, #-24]
	bl	png_set_palette_to_rgb
.L7:
	ldr	r3, .L16+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L16+24
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #7
	bhi	.L8
	ldr	r0, [fp, #-24]
	bl	png_set_expand_gray_1_2_4_to_8
.L8:
	mov	r2, #16
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	png_get_valid
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r0, [fp, #-24]
	bl	png_set_tRNS_to_alpha
.L9:
	ldr	r3, .L16+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #2
	beq	.L10
	ldr	r3, .L16+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L16+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #3
	bne	.L11
.L10:
	mov	r2, #1
	mov	r1, #255
	ldr	r0, [fp, #-24]
	bl	png_set_filler
.L11:
	ldr	r3, .L16+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L12
	ldr	r3, .L16+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #4
	bne	.L13
.L12:
	ldr	r0, [fp, #-24]
	bl	png_set_gray_to_rgb
.L13:
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	png_read_update_info
	ldr	r3, .L16+16
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L16+28
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L14
.L15:
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	png_get_rowbytes
	mov	r1, r0
	ldr	r3, .L16+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L14:
	ldr	r3, .L16+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L15
	ldr	r3, .L16+28
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	png_read_image
	ldr	r0, [fp, #-28]
	bl	fclose
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	.LC1
	.word	longjmp
	.word	width
	.word	height
	.word	color_type
	.word	bit_depth
	.word	row_pointers
	.size	read_png_file, .-read_png_file
	.section	.rodata
	.align	2
.LC2:
	.ascii	"uint16_t bitmap[%d][%d] ={\012\000"
	.align	2
.LC3:
	.ascii	"{ \000"
	.align	2
.LC4:
	.ascii	"0x%04X, \000"
	.align	2
.LC5:
	.ascii	" },\000"
	.align	2
.LC6:
	.ascii	"};\012uint16_t transparent_color=0x%04X;\012\000"
	.text
	.align	2
	.global	process_png_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_png_file, %function
process_png_file:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, #0
	strh	r3, [fp, #-24]	@ movhi
	ldr	r3, .L24
	ldr	r3, [r3]
	ldr	r2, .L24+4
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L24+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L19
.L23:
	ldr	r0, .L24+12
	bl	printf
	ldr	r3, .L24+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L20
.L22:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #3
	and	r3, r3, #255
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #2
	and	r3, r3, #255
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #5
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #3
	and	r3, r3, #255
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #11
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	strh	r3, [fp, #-22]	@ movhi
	ldr	r3, [fp, #-8]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L21
	ldrh	r3, [fp, #-22]	@ movhi
	strh	r3, [fp, #-24]	@ movhi
.L21:
	ldrh	r3, [fp, #-22]
	mov	r1, r3
	ldr	r0, .L24+20
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L20:
	ldr	r3, .L24+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L22
	ldr	r0, .L24+24
	bl	puts
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L19:
	ldr	r3, .L24
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L23
	ldrh	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L24+28
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	height
	.word	width
	.word	.LC2
	.word	.LC3
	.word	row_pointers
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	process_png_file, .-process_png_file
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	beq	.L27
	bl	abort
.L27:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	read_png_file
	bl	process_png_file
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
