	.file	"999958.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"wb"
.LC1:
	.string	"PNM2PNG\n"
	.align 8
.LC2:
	.string	"Error:  cannot create alpha-channel file %s\n"
.LC3:
	.string	"PNG2PNM\n"
.LC4:
	.string	"Error:  unknown option %s\n"
.LC5:
	.string	"rb"
	.align 8
.LC6:
	.string	"Error:  file %s does not exist\n"
	.align 8
.LC7:
	.string	"Error:  cannot create file %s\n"
.LC8:
	.string	"Error:  too many parameters\n"
	.align 8
.LC9:
	.string	"Error:  unsuccessful conversion of PNG-image\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
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR stdin[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR stdout[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -8[rbp], 0
	mov	BYTE PTR -30[rbp], 1
	mov	BYTE PTR -29[rbp], 0
	mov	DWORD PTR -28[rbp], 1
	jmp	.L2
.L14:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L3
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 114
	je	.L4
	cmp	eax, 114
	jg	.L5
	cmp	eax, 110
	je	.L6
	cmp	eax, 110
	jg	.L5
	cmp	eax, 104
	je	.L7
	cmp	eax, 104
	jg	.L5
	cmp	eax, 63
	je	.L7
	cmp	eax, 97
	je	.L8
	jmp	.L5
.L6:
	mov	BYTE PTR -30[rbp], 0
	jmp	.L11
.L4:
	mov	BYTE PTR -30[rbp], 1
	jmp	.L11
.L8:
	mov	BYTE PTR -29[rbp], 1
	add	DWORD PTR -28[rbp], 1
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L18
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	eax, 0
	call	usage
	mov	edi, 0
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	call	usage
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR stdin[rip]
	cmp	QWORD PTR -24[rbp], rax
	jne	.L12
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	rax, QWORD PTR stdout[rip]
	cmp	QWORD PTR -16[rbp], rax
	jne	.L13
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	eax, 0
	call	usage
	mov	edi, 1
	call	exit@PLT
.L18:
	nop
.L11:
	add	DWORD PTR -28[rbp], 1
.L2:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L14
	movzx	edi, BYTE PTR -29[rbp]
	movzx	ecx, BYTE PTR -30[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	png2pnm
	test	al, al
	jne	.L15
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 45
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	BYTE PTR -29[rbp], 0
	je	.L16
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L16:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC10:
	.string	"   by Willem van Schaik, 1999\n"
	.align 8
.LC11:
	.string	"Usage:  png2pnm [options] <file>.png [<file>.pnm]\n"
	.align 8
.LC12:
	.string	"   or:  ... | png2pnm [options]\n"
.LC13:
	.string	"Options:\n"
	.align 8
.LC14:
	.string	"   -r[aw]   write pnm-file in binary format (P4/P5/P6) (default)\n"
	.align 8
.LC15:
	.string	"   -n[oraw] write pnm-file in ascii format (P1/P2/P3)\n"
	.align 8
.LC16:
	.string	"   -a[lpha] <file>.pgm write PNG alpha channel as pgm-file\n"
	.align 8
.LC17:
	.string	"   -h | -?  print this help-information\n"
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 50
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 32
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 9
	mov	esi, 1
	lea	rdi, .LC13[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 65
	mov	esi, 1
	lea	rdi, .LC14[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 54
	mov	esi, 1
	lea	rdi, .LC15[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 59
	mov	esi, 1
	lea	rdi, .LC16[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 40
	mov	esi, 1
	lea	rdi, .LC17[rip]
	call	fwrite@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	usage, .-usage
	.section	.rodata
	.align 8
.LC18:
	.string	"Error:  PNG-file doesn't contain alpha channel\n"
.LC19:
	.string	"P5"
.LC20:
	.string	"P2"
.LC21:
	.string	"%s\n"
.LC22:
	.string	"%d %d\n"
.LC23:
	.string	"%ld\n"
.LC24:
	.string	"P6"
.LC25:
	.string	"P3"
.LC26:
	.string	"%ld "
	.text
	.globl	png2pnm
	.type	png2pnm, @function
png2pnm:
.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, 144
	mov	QWORD PTR -120[rbp], rdi
	mov	QWORD PTR -128[rbp], rsi
	mov	QWORD PTR -136[rbp], rdx
	mov	eax, ecx
	mov	edx, r8d
	mov	BYTE PTR -140[rbp], al
	mov	eax, edx
	mov	BYTE PTR -144[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -16[rbp]
	mov	rcx, rdx
	mov	edx, 8
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 8
	je	.L21
	mov	eax, 0
	jmp	.L73
.L21:
	lea	rax, -16[rbp]
	mov	edx, 8
	mov	esi, 0
	mov	rdi, rax
	call	png_sig_cmp@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	je	.L23
	mov	eax, 0
	jmp	.L73
.L23:
	mov	edi, 0
	call	png_get_libpng_ver@PLT
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	png_create_read_struct@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	test	rax, rax
	jne	.L24
	mov	eax, 0
	jmp	.L73
.L24:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	png_create_info_struct@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	test	rax, rax
	jne	.L25
	lea	rax, -64[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	png_destroy_read_struct@PLT
	mov	eax, 0
	jmp	.L73
.L25:
	mov	rax, QWORD PTR -64[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	.L27
	lea	rcx, -56[rbp]
	lea	rax, -64[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	png_destroy_read_struct@PLT
	mov	eax, 0
	jmp	.L73
.L27:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -120[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_init_io@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	esi, 8
	mov	rdi, rax
	call	png_set_sig_bytes@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_read_info@PLT
	mov	rsi, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	lea	r8, -96[rbp]
	lea	rdi, -100[rbp]
	lea	rcx, -104[rbp]
	lea	rdx, -108[rbp]
	sub	rsp, 8
	push	0
	push	0
	push	0
	mov	r9, r8
	mov	r8, rdi
	mov	rdi, rax
	call	png_get_IHDR@PLT
	add	rsp, 32
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, 3
	jne	.L28
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	png_set_expand@PLT
.L28:
	mov	eax, DWORD PTR -96[rbp]
	test	eax, eax
	jne	.L29
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, 7
	jg	.L29
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	png_set_expand@PLT
.L29:
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	rdi, rax
	call	png_get_valid@PLT
	test	eax, eax
	je	.L30
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	png_set_expand@PLT
.L30:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_read_update_info@PLT
	mov	rsi, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	lea	r8, -96[rbp]
	lea	rdi, -100[rbp]
	lea	rcx, -104[rbp]
	lea	rdx, -108[rbp]
	sub	rsp, 8
	push	0
	push	0
	push	0
	mov	r9, r8
	mov	r8, rdi
	mov	rdi, rax
	call	png_get_IHDR@PLT
	add	rsp, 32
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, 16
	jne	.L31
	mov	BYTE PTR -140[rbp], 0
.L31:
	mov	eax, DWORD PTR -96[rbp]
	test	eax, eax
	jne	.L32
	mov	DWORD PTR -92[rbp], 1
	jmp	.L33
.L32:
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, 4
	jne	.L34
	mov	DWORD PTR -92[rbp], 2
	jmp	.L33
.L34:
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, 2
	jne	.L35
	mov	DWORD PTR -92[rbp], 3
	jmp	.L33
.L35:
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, 6
	jne	.L36
	mov	DWORD PTR -92[rbp], 4
	jmp	.L33
.L36:
	mov	DWORD PTR -92[rbp], 0
.L33:
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 1
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	mov	DWORD PTR -72[rbp], eax
	cmp	BYTE PTR -144[rbp], 0
	je	.L37
	cmp	DWORD PTR -72[rbp], 0
	jne	.L37
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 47
	mov	esi, 1
	lea	rdi, .LC18[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L37:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_get_rowbytes@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	je	.L38
	mov	eax, 0
	test	rax, rax
	je	.L39
.L38:
	lea	rcx, -56[rbp]
	lea	rax, -64[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	png_destroy_read_struct@PLT
	mov	eax, 0
	jmp	.L73
.L39:
	mov	eax, DWORD PTR -68[rbp]
	mov	edx, DWORD PTR -104[rbp]
	mov	edx, edx
	imul	rax, rdx
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L40
	lea	rcx, -56[rbp]
	lea	rax, -64[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	png_destroy_read_struct@PLT
	mov	eax, 0
	jmp	.L73
.L40:
	mov	eax, DWORD PTR -104[rbp]
	mov	eax, eax
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L41
	lea	rcx, -56[rbp]
	lea	rax, -64[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	png_destroy_read_struct@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	jmp	.L73
.L41:
	mov	DWORD PTR -80[rbp], 0
	jmp	.L42
.L43:
	mov	eax, DWORD PTR -80[rbp]
	imul	eax, DWORD PTR -68[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -40[rbp]
	add	rdx, rcx
	mov	QWORD PTR [rax], rdx
	add	DWORD PTR -80[rbp], 1
.L42:
	mov	eax, DWORD PTR -104[rbp]
	cmp	DWORD PTR -80[rbp], eax
	jl	.L43
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_read_image@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	png_read_end@PLT
	lea	rcx, -56[rbp]
	lea	rax, -64[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	png_destroy_read_struct@PLT
	mov	eax, DWORD PTR -96[rbp]
	test	eax, eax
	je	.L44
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, 4
	jne	.L45
.L44:
	cmp	BYTE PTR -140[rbp], 0
	je	.L46
	lea	rax, .LC19[rip]
	jmp	.L47
.L46:
	lea	rax, .LC20[rip]
.L47:
	mov	rcx, QWORD PTR -128[rbp]
	mov	rdx, rax
	lea	rsi, .LC21[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -104[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -108[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L48
.L45:
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, 2
	je	.L49
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, 6
	jne	.L48
.L49:
	cmp	BYTE PTR -140[rbp], 0
	je	.L50
	lea	rax, .LC24[rip]
	jmp	.L51
.L50:
	lea	rax, .LC25[rip]
.L51:
	mov	rcx, QWORD PTR -128[rbp]
	mov	rdx, rax
	lea	rsi, .LC21[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -104[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -108[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L48:
	cmp	BYTE PTR -144[rbp], 0
	je	.L52
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, 4
	je	.L53
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, 6
	jne	.L52
.L53:
	cmp	BYTE PTR -140[rbp], 0
	je	.L54
	lea	rax, .LC19[rip]
	jmp	.L55
.L54:
	lea	rax, .LC20[rip]
.L55:
	mov	rcx, QWORD PTR -136[rbp]
	mov	rdx, rax
	lea	rsi, .LC21[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -104[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -108[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -136[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -136[rbp]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L52:
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	DWORD PTR -88[rbp], 0
	jmp	.L56
.L70:
	mov	DWORD PTR -84[rbp], 0
	jmp	.L57
.L68:
	mov	DWORD PTR -80[rbp], 0
	jmp	.L58
.L62:
	cmp	BYTE PTR -140[rbp], 0
	je	.L59
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	rdx, QWORD PTR -128[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	jmp	.L60
.L59:
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, 16
	jne	.L61
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	sal	rax, 8
	mov	rcx, rax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	lea	rdx, [rcx+rax]
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L60
.L61:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L60:
	add	DWORD PTR -80[rbp], 1
.L58:
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, DWORD PTR -72[rbp]
	cmp	DWORD PTR -80[rbp], eax
	jl	.L62
	cmp	DWORD PTR -72[rbp], 0
	je	.L63
	cmp	BYTE PTR -144[rbp], 0
	jne	.L64
	add	QWORD PTR -48[rbp], 1
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, 16
	jne	.L63
	add	QWORD PTR -48[rbp], 1
	jmp	.L63
.L64:
	cmp	BYTE PTR -140[rbp], 0
	je	.L65
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	rdx, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	jmp	.L63
.L65:
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, 16
	jne	.L66
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	sal	rax, 8
	mov	rcx, rax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	lea	rdx, [rcx+rax]
	mov	rax, QWORD PTR -136[rbp]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L63
.L66:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -136[rbp]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L63:
	cmp	BYTE PTR -140[rbp], 0
	jne	.L67
	mov	eax, DWORD PTR -84[rbp]
	cdq
	shr	edx, 30
	add	eax, edx
	and	eax, 3
	sub	eax, edx
	cmp	eax, 3
	jne	.L67
	mov	rax, QWORD PTR -128[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
.L67:
	add	DWORD PTR -84[rbp], 1
.L57:
	mov	eax, DWORD PTR -108[rbp]
	cmp	DWORD PTR -84[rbp], eax
	jl	.L68
	cmp	BYTE PTR -140[rbp], 0
	jne	.L69
	mov	eax, DWORD PTR -84[rbp]
	and	eax, 3
	test	eax, eax
	je	.L69
	mov	rax, QWORD PTR -128[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
.L69:
	add	DWORD PTR -88[rbp], 1
.L56:
	mov	eax, DWORD PTR -104[rbp]
	cmp	DWORD PTR -88[rbp], eax
	jl	.L70
	cmp	QWORD PTR -32[rbp], 0
	je	.L71
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
.L71:
	cmp	QWORD PTR -40[rbp], 0
	je	.L72
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
.L72:
	mov	eax, 1
.L73:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L74
	call	__stack_chk_fail@PLT
.L74:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	png2pnm, .-png2pnm
	.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	"999958.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"wb\000"
	.align	2
.LC1:
	.ascii	"PNM2PNG\012\000"
	.align	2
.LC2:
	.ascii	"Error:  cannot create alpha-channel file %s\012\000"
	.align	2
.LC3:
	.ascii	"PNG2PNM\012\000"
	.align	2
.LC4:
	.ascii	"Error:  unknown option %s\012\000"
	.align	2
.LC5:
	.ascii	"rb\000"
	.align	2
.LC6:
	.ascii	"Error:  file %s does not exist\012\000"
	.align	2
.LC7:
	.ascii	"Error:  cannot create file %s\012\000"
	.align	2
.LC8:
	.ascii	"Error:  too many parameters\012\000"
	.align	2
.LC9:
	.ascii	"Error:  unsuccessful conversion of PNG-image\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, .L20+4
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #1
	strb	r3, [fp, #-22]
	mov	r3, #0
	strb	r3, [fp, #-21]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L2
.L15:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L3
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #63
	beq	.L4
	cmp	r3, #63
	blt	.L5
	cmp	r3, #114
	bgt	.L5
	cmp	r3, #97
	blt	.L5
	sub	r3, r3, #97
	cmp	r3, #17
	ldrls	pc, [pc, r3, asl #2]
	b	.L5
.L7:
	.word	.L9
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L4
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L8
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L6
.L8:
	mov	r3, #0
	strb	r3, [fp, #-22]
	b	.L12
.L6:
	mov	r3, #1
	strb	r3, [fp, #-22]
	b	.L12
.L9:
	mov	r3, #1
	strb	r3, [fp, #-21]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L20+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L19
	ldr	r3, .L20+12
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L20+16
	bl	fwrite
	ldr	r3, .L20+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L20+20
	bl	fprintf
	mov	r0, #1
	bl	exit
.L4:
	bl	usage
	mov	r0, #0
	bl	exit
.L5:
	ldr	r3, .L20+12
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L20+24
	bl	fwrite
	ldr	r3, .L20+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L20+28
	bl	fprintf
	bl	usage
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, .L20
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L13
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L20+32
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L20+12
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L20+24
	bl	fwrite
	ldr	r3, .L20+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L20+36
	bl	fprintf
	mov	r0, #1
	bl	exit
.L13:
	ldr	r3, .L20+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L14
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L20+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L20+12
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L20+24
	bl	fwrite
	ldr	r3, .L20+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L20+40
	bl	fprintf
	mov	r0, #1
	bl	exit
.L14:
	ldr	r3, .L20+12
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L20+24
	bl	fwrite
	ldr	r3, .L20+12
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L20+44
	bl	fwrite
	bl	usage
	mov	r0, #1
	bl	exit
.L19:
	nop
.L12:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L15
	ldrb	r2, [fp, #-22]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-20]
	bl	png2pnm
	mov	r3, r0
	cmp	r3, #0
	bne	.L16
	ldr	r3, .L20+12
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L20+24
	bl	fwrite
	ldr	r3, .L20+12
	ldr	r3, [r3]
	mov	r2, #45
	mov	r1, #1
	ldr	r0, .L20+48
	bl	fwrite
	mov	r0, #1
	bl	exit
.L16:
	ldr	r0, [fp, #-20]
	bl	fclose
	ldr	r0, [fp, #-16]
	bl	fclose
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L17
	ldr	r0, [fp, #-12]
	bl	fclose
.L17:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	stdin
	.word	stdout
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.section	.rodata
	.align	2
.LC10:
	.ascii	"   by Willem van Schaik, 1999\012\000"
	.align	2
.LC11:
	.ascii	"Usage:  png2pnm [options] <file>.png [<file>.pnm]\012"
	.ascii	"\000"
	.align	2
.LC12:
	.ascii	"   or:  ... | png2pnm [options]\012\000"
	.align	2
.LC13:
	.ascii	"Options:\012\000"
	.align	2
.LC14:
	.ascii	"   -r[aw]   write pnm-file in binary format (P4/P5/"
	.ascii	"P6) (default)\012\000"
	.align	2
.LC15:
	.ascii	"   -n[oraw] write pnm-file in ascii format (P1/P2/P"
	.ascii	"3)\012\000"
	.align	2
.LC16:
	.ascii	"   -a[lpha] <file>.pgm write PNG alpha channel as p"
	.ascii	"gm-file\012\000"
	.align	2
.LC17:
	.ascii	"   -h | -?  print this help-information\012\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L23+4
	bl	fwrite
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L23+8
	bl	fwrite
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, #50
	mov	r1, #1
	ldr	r0, .L23+12
	bl	fwrite
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, #32
	mov	r1, #1
	ldr	r0, .L23+16
	bl	fwrite
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, #9
	mov	r1, #1
	ldr	r0, .L23+20
	bl	fwrite
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, #65
	mov	r1, #1
	ldr	r0, .L23+24
	bl	fwrite
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, #54
	mov	r1, #1
	ldr	r0, .L23+28
	bl	fwrite
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, #59
	mov	r1, #1
	ldr	r0, .L23+32
	bl	fwrite
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, #40
	mov	r1, #1
	ldr	r0, .L23+36
	bl	fwrite
	nop
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	stderr
	.word	.LC3
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC18:
	.ascii	"Error:  PNG-file doesn't contain alpha channel\012\000"
	.align	2
.LC19:
	.ascii	"P5\000"
	.align	2
.LC20:
	.ascii	"P2\000"
	.align	2
.LC21:
	.ascii	"%s\012\000"
	.align	2
.LC22:
	.ascii	"%d %d\012\000"
	.align	2
.LC23:
	.ascii	"%ld\012\000"
	.align	2
.LC24:
	.ascii	"P6\000"
	.align	2
.LC25:
	.ascii	"P3\000"
	.align	2
.LC26:
	.ascii	"%ld \000"
	.align	2
.LC27:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	png2pnm
	.syntax unified
	.arm
	.fpu softvfp
	.type	png2pnm, %function
png2pnm:
	@ args = 4, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	str	r2, [fp, #-96]
	strb	r3, [fp, #-97]
	ldr	r3, .L82
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-84]
	mov	r3, #0
	str	r3, [fp, #-80]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-60]
	sub	r0, fp, #16
	ldr	r3, [fp, #-88]
	mov	r2, #8
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #8
	beq	.L26
	mov	r3, #0
	b	.L80
.L26:
	sub	r3, fp, #16
	mov	r2, #8
	mov	r1, #0
	mov	r0, r3
	bl	png_sig_cmp
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L28
	mov	r3, #0
	b	.L80
.L28:
	mov	r0, #0
	bl	png_get_libpng_ver
	mov	r3, #0
	mov	r2, #0
	mov	r1, #0
	bl	png_create_read_struct
	mov	r3, r0
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L29
	mov	r3, #0
	b	.L80
.L29:
	ldr	r3, [fp, #-84]
	mov	r0, r3
	bl	png_create_info_struct
	mov	r3, r0
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bne	.L30
	sub	r3, fp, #84
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	png_destroy_read_struct
	mov	r3, #0
	b	.L80
.L30:
	ldr	r3, [fp, #-84]
	mov	r2, #392
	ldr	r1, .L82+4
	mov	r0, r3
	bl	png_set_longjmp_fn
	mov	r3, r0
	mov	r0, r3
	bl	_setjmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L32
	sub	r1, fp, #80
	sub	r3, fp, #84
	mov	r2, #0
	mov	r0, r3
	bl	png_destroy_read_struct
	mov	r3, #0
	b	.L80
.L32:
	ldr	r3, [fp, #-84]
	ldr	r1, [fp, #-88]
	mov	r0, r3
	bl	png_init_io
	ldr	r3, [fp, #-84]
	mov	r1, #8
	mov	r0, r3
	bl	png_set_sig_bytes
	ldr	r3, [fp, #-84]
	ldr	r2, [fp, #-80]
	mov	r1, r2
	mov	r0, r3
	bl	png_read_info
	ldr	r0, [fp, #-84]
	ldr	r1, [fp, #-80]
	sub	ip, fp, #72
	sub	r2, fp, #76
	mov	r3, #0
	str	r3, [sp, #16]
	mov	r3, #0
	str	r3, [sp, #12]
	mov	r3, #0
	str	r3, [sp, #8]
	sub	r3, fp, #64
	str	r3, [sp, #4]
	sub	r3, fp, #68
	str	r3, [sp]
	mov	r3, ip
	bl	png_get_IHDR
	ldr	r3, [fp, #-64]
	cmp	r3, #3
	bne	.L33
	ldr	r3, [fp, #-84]
	mov	r0, r3
	bl	png_set_expand
.L33:
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L34
	ldr	r3, [fp, #-68]
	cmp	r3, #7
	bgt	.L34
	ldr	r3, [fp, #-84]
	mov	r0, r3
	bl	png_set_expand
.L34:
	ldr	r3, [fp, #-84]
	ldr	r1, [fp, #-80]
	mov	r2, #16
	mov	r0, r3
	bl	png_get_valid
	mov	r3, r0
	cmp	r3, #0
	beq	.L35
	ldr	r3, [fp, #-84]
	mov	r0, r3
	bl	png_set_expand
.L35:
	ldr	r3, [fp, #-84]
	ldr	r2, [fp, #-80]
	mov	r1, r2
	mov	r0, r3
	bl	png_read_update_info
	ldr	r0, [fp, #-84]
	ldr	r1, [fp, #-80]
	sub	ip, fp, #72
	sub	r2, fp, #76
	mov	r3, #0
	str	r3, [sp, #16]
	mov	r3, #0
	str	r3, [sp, #12]
	mov	r3, #0
	str	r3, [sp, #8]
	sub	r3, fp, #64
	str	r3, [sp, #4]
	sub	r3, fp, #68
	str	r3, [sp]
	mov	r3, ip
	bl	png_get_IHDR
	ldr	r3, [fp, #-68]
	cmp	r3, #16
	bne	.L36
	mov	r3, #0
	strb	r3, [fp, #-97]
.L36:
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L37
	mov	r3, #1
	str	r3, [fp, #-56]
	b	.L38
.L37:
	ldr	r3, [fp, #-64]
	cmp	r3, #4
	bne	.L39
	mov	r3, #2
	str	r3, [fp, #-56]
	b	.L38
.L39:
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	bne	.L40
	mov	r3, #3
	str	r3, [fp, #-56]
	b	.L38
.L40:
	ldr	r3, [fp, #-64]
	cmp	r3, #6
	bne	.L41
	mov	r3, #4
	str	r3, [fp, #-56]
	b	.L38
.L41:
	mov	r3, #0
	str	r3, [fp, #-56]
.L38:
	ldr	r3, [fp, #-56]
	sub	r3, r3, #1
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	str	r3, [fp, #-28]
	ldrb	r3, [fp, #4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L42
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L42
	ldr	r3, .L82+8
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L82+12
	bl	fwrite
	ldr	r3, .L82+8
	ldr	r3, [r3]
	mov	r2, #47
	mov	r1, #1
	ldr	r0, .L82+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L42:
	ldr	r3, [fp, #-84]
	ldr	r2, [fp, #-80]
	mov	r1, r2
	mov	r0, r3
	bl	png_get_rowbytes
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L43
	ldr	r2, [fp, #-72]
	mov	r1, #0
	ldr	r3, [fp, #-24]
	umull	r0, r3, r2, r3
	cmp	r3, #0
	beq	.L44
	mov	r1, #1
.L44:
	mov	r3, r1
	cmp	r3, #0
	beq	.L46
.L43:
	sub	r1, fp, #80
	sub	r3, fp, #84
	mov	r2, #0
	mov	r0, r3
	bl	png_destroy_read_struct
	mov	r3, #0
	b	.L80
.L46:
	ldr	r3, [fp, #-72]
	ldr	r2, [fp, #-24]
	mul	r3, r2, r3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L47
	sub	r1, fp, #80
	sub	r3, fp, #84
	mov	r2, #0
	mov	r0, r3
	bl	png_destroy_read_struct
	mov	r3, #0
	b	.L80
.L47:
	ldr	r3, [fp, #-72]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L48
	sub	r1, fp, #80
	sub	r3, fp, #84
	mov	r2, #0
	mov	r0, r3
	bl	png_destroy_read_struct
	ldr	r0, [fp, #-40]
	bl	free
	mov	r3, #0
	b	.L80
.L48:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L49
.L50:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-24]
	mul	r2, r3, r2
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-36]
	add	r3, r1, r3
	ldr	r1, [fp, #-40]
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L49:
	ldr	r3, [fp, #-72]
	mov	r2, r3
	ldr	r3, [fp, #-44]
	cmp	r3, r2
	blt	.L50
	ldr	r3, [fp, #-84]
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	png_read_image
	ldr	r3, [fp, #-84]
	ldr	r2, [fp, #-80]
	mov	r1, r2
	mov	r0, r3
	bl	png_read_end
	sub	r1, fp, #80
	sub	r3, fp, #84
	mov	r2, #0
	mov	r0, r3
	bl	png_destroy_read_struct
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	beq	.L51
	ldr	r3, [fp, #-64]
	cmp	r3, #4
	bne	.L52
.L51:
	ldrb	r3, [fp, #-97]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L53
	ldr	r3, .L82+20
	b	.L54
.L53:
	ldr	r3, .L82+24
.L54:
	mov	r2, r3
	ldr	r1, .L82+28
	ldr	r0, [fp, #-92]
	bl	fprintf
	ldr	r3, [fp, #-76]
	mov	r2, r3
	ldr	r3, [fp, #-72]
	ldr	r1, .L82+32
	ldr	r0, [fp, #-92]
	bl	fprintf
	ldr	r3, [fp, #-68]
	mov	r2, #1
	lsl	r3, r2, r3
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r1, .L82+36
	ldr	r0, [fp, #-92]
	bl	fprintf
	b	.L55
.L52:
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	beq	.L56
	ldr	r3, [fp, #-64]
	cmp	r3, #6
	bne	.L55
.L56:
	ldrb	r3, [fp, #-97]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L57
	ldr	r3, .L82+40
	b	.L58
.L57:
	ldr	r3, .L82+44
.L58:
	mov	r2, r3
	ldr	r1, .L82+28
	ldr	r0, [fp, #-92]
	bl	fprintf
	ldr	r3, [fp, #-76]
	mov	r2, r3
	ldr	r3, [fp, #-72]
	ldr	r1, .L82+32
	ldr	r0, [fp, #-92]
	bl	fprintf
	ldr	r3, [fp, #-68]
	mov	r2, #1
	lsl	r3, r2, r3
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r1, .L82+36
	ldr	r0, [fp, #-92]
	bl	fprintf
.L55:
	ldrb	r3, [fp, #4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L59
	ldr	r3, [fp, #-64]
	cmp	r3, #4
	beq	.L60
	ldr	r3, [fp, #-64]
	cmp	r3, #6
	bne	.L59
.L60:
	ldrb	r3, [fp, #-97]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L61
	ldr	r3, .L82+20
	b	.L62
.L61:
	ldr	r3, .L82+24
.L62:
	mov	r2, r3
	ldr	r1, .L82+28
	ldr	r0, [fp, #-96]
	bl	fprintf
	ldr	r3, [fp, #-76]
	mov	r2, r3
	ldr	r3, [fp, #-72]
	ldr	r1, .L82+32
	ldr	r0, [fp, #-96]
	bl	fprintf
	ldr	r3, [fp, #-68]
	mov	r2, #1
	lsl	r3, r2, r3
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r1, .L82+36
	ldr	r0, [fp, #-96]
	bl	fprintf
.L59:
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L63
.L77:
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L64
.L75:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L65
.L69:
	ldrb	r3, [fp, #-97]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L66
	ldr	r3, [fp, #-60]
	add	r2, r3, #1
	str	r2, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldr	r1, [fp, #-92]
	mov	r0, r3
	bl	fputc
	b	.L67
.L66:
	ldr	r3, [fp, #-68]
	cmp	r3, #16
	bne	.L68
	ldr	r3, [fp, #-60]
	add	r2, r3, #1
	str	r2, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #8
	ldr	r3, [fp, #-60]
	add	r1, r3, #1
	str	r1, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L82+48
	ldr	r0, [fp, #-92]
	bl	fprintf
	b	.L67
.L68:
	ldr	r3, [fp, #-60]
	add	r2, r3, #1
	str	r2, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r1, .L82+48
	ldr	r0, [fp, #-92]
	bl	fprintf
.L67:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L65:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L69
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L70
	ldrb	r3, [fp, #4]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L71
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-68]
	cmp	r3, #16
	bne	.L70
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
	b	.L70
.L71:
	ldrb	r3, [fp, #-97]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L72
	ldr	r3, [fp, #-60]
	add	r2, r3, #1
	str	r2, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldr	r1, [fp, #-96]
	mov	r0, r3
	bl	fputc
	b	.L70
.L72:
	ldr	r3, [fp, #-68]
	cmp	r3, #16
	bne	.L73
	ldr	r3, [fp, #-60]
	add	r2, r3, #1
	str	r2, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #8
	ldr	r3, [fp, #-60]
	add	r1, r3, #1
	str	r1, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L82+48
	ldr	r0, [fp, #-96]
	bl	fprintf
	b	.L70
.L73:
	ldr	r3, [fp, #-60]
	add	r2, r3, #1
	str	r2, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r1, .L82+48
	ldr	r0, [fp, #-96]
	bl	fprintf
.L70:
	ldrb	r3, [fp, #-97]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L74
	ldr	r3, [fp, #-48]
	rsbs	r2, r3, #0
	and	r3, r3, #3
	and	r2, r2, #3
	rsbpl	r3, r2, #0
	cmp	r3, #3
	bne	.L74
	ldr	r1, [fp, #-92]
	mov	r0, #10
	bl	fputc
.L74:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L64:
	ldr	r3, [fp, #-76]
	mov	r2, r3
	ldr	r3, [fp, #-48]
	cmp	r3, r2
	blt	.L75
	ldrb	r3, [fp, #-97]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L76
	ldr	r3, [fp, #-48]
	and	r3, r3, #3
	cmp	r3, #0
	beq	.L76
	ldr	r1, [fp, #-92]
	mov	r0, #10
	bl	fputc
.L76:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L63:
	ldr	r3, [fp, #-72]
	mov	r2, r3
	ldr	r3, [fp, #-52]
	cmp	r3, r2
	blt	.L77
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L78
	ldr	r0, [fp, #-36]
	bl	free
.L78:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L79
	ldr	r0, [fp, #-40]
	bl	free
.L79:
	mov	r3, #1
.L80:
	ldr	r2, .L82
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L81
	bl	__stack_chk_fail
.L81:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L83:
	.align	2
.L82:
	.word	.LC27
	.word	longjmp
	.word	stderr
	.word	.LC3
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.size	png2pnm, .-png2pnm
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
