	.file	"extr_jbig2_image_png.c_jbig2_image_write_png.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"unable to create png structure\n"
	.align 8
.LC1:
	.string	"unable to create png info structure\n"
	.align 8
.LC2:
	.string	"internal error in libpng saving file\n"
	.text
	.p2align 4
	.globl	jbig2_image_write_png
	.type	jbig2_image_write_png, @function
jbig2_image_write_png:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	ecx, ecx
	xor	edx, edx
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 56
	.cfi_def_cfa_offset 80
	mov	QWORD PTR [rsp], rdi
	mov	edi, DWORD PTR PNG_LIBPNG_VER_STRING[rip]
	mov	QWORD PTR 8[rsp], rsi
	xor	esi, esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	png_create_write_struct@PLT
	mov	QWORD PTR 24[rsp], rax
	test	rax, rax
	je	.L16
	mov	rdi, rax
	call	png_create_info_struct@PLT
	mov	QWORD PTR 32[rsp], rax
	test	rax, rax
	je	.L17
	mov	rdi, QWORD PTR 24[rsp]
	call	png_jmpbuf@PLT
	mov	edi, eax
	call	setjmp@PLT
	endbr64
	mov	rbx, rax
	test	rax, rax
	je	.L6
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	call	fprintf@PLT
	lea	rsi, 32[rsp]
	lea	rdi, 24[rsp]
	call	png_destroy_write_struct@PLT
	mov	eax, 4
.L1:
	mov	rdx, QWORD PTR 40[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L18
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	call	fprintf@PLT
	lea	rdi, 24[rsp]
	xor	esi, esi
	call	png_destroy_write_struct@PLT
	mov	eax, 3
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	call	fprintf@PLT
	mov	eax, 2
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR 8[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	mov	ecx, DWORD PTR jbig2_png_flush[rip]
	mov	edx, DWORD PTR jbig2_png_write_data[rip]
	call	png_set_write_fn@PLT
	mov	rbp, QWORD PTR [rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	mov	eax, DWORD PTR PNG_FILTER_TYPE_DEFAULT[rip]
	mov	r9d, DWORD PTR PNG_COLOR_TYPE_GRAY[rip]
	mov	r8d, 1
	mov	edx, DWORD PTR 24[rbp]
	mov	rcx, QWORD PTR 0[rbp]
	push	rax
	.cfi_def_cfa_offset 96
	mov	eax, DWORD PTR PNG_COMPRESSION_TYPE_DEFAULT[rip]
	push	rax
	.cfi_def_cfa_offset 104
	mov	eax, DWORD PTR PNG_INTERLACE_NONE[rip]
	push	rax
	.cfi_def_cfa_offset 112
	mov	rsi, QWORD PTR 64[rsp]
	mov	rdi, QWORD PTR 56[rsp]
	call	png_set_IHDR@PLT
	mov	rsi, QWORD PTR 64[rsp]
	mov	rdi, QWORD PTR 56[rsp]
	add	rsp, 32
	.cfi_def_cfa_offset 80
	call	png_write_info@PLT
	mov	rdi, QWORD PTR 24[rsp]
	call	png_set_invert_mono@PLT
	mov	rcx, rbp
	mov	rbp, QWORD PTR 16[rbp]
	cmp	QWORD PTR [rcx], 0
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, QWORD PTR 24[rsp]
	mov	rsi, rbp
	add	rbx, 1
	call	png_write_row@PLT
	mov	rax, QWORD PTR [rsp]
	add	rbp, QWORD PTR 8[rax]
	cmp	QWORD PTR [rax], rbx
	jg	.L8
.L7:
	mov	rsi, QWORD PTR 32[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	call	png_write_end@PLT
	lea	rsi, 32[rsp]
	lea	rdi, 24[rsp]
	call	png_destroy_write_struct@PLT
	xor	eax, eax
	jmp	.L1
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	jbig2_image_write_png, .-jbig2_image_write_png
	.comm	stderr,4,4
	.comm	jbig2_png_write_data,4,4
	.comm	jbig2_png_flush,4,4
	.comm	PNG_LIBPNG_VER_STRING,4,4
	.comm	PNG_INTERLACE_NONE,4,4
	.comm	PNG_FILTER_TYPE_DEFAULT,4,4
	.comm	PNG_COMPRESSION_TYPE_DEFAULT,4,4
	.comm	PNG_COLOR_TYPE_GRAY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_jbig2_image_png.c_jbig2_image_write_png.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unable to create png structure\012\000"
	.align	2
.LC1:
	.ascii	"unable to create png info structure\012\000"
	.align	2
.LC2:
	.ascii	"internal error in libpng saving file\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	jbig2_image_write_png
	.syntax unified
	.arm
	.fpu softvfp
	.type	jbig2_image_write_png, %function
jbig2_image_write_png:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, r1
	push	{r4, r5, r6, lr}
	mov	r3, #0
	mov	lr, r0
	sub	sp, sp, #48
	ldr	r0, .L19
	str	ip, [sp, #28]
	ldr	ip, .L19+4
	str	lr, [sp, #24]
	mov	r2, r3
	mov	r1, r3
	ldr	r0, [r0]
	ldr	ip, [ip]
	str	ip, [sp, #44]
	mov	ip,#0
	bl	png_create_write_struct
	cmp	r0, #0
	str	r0, [sp, #36]
	beq	.L16
	bl	png_create_info_struct
	cmp	r0, #0
	mov	r4, r0
	str	r0, [sp, #40]
	beq	.L17
	ldr	r0, [sp, #36]
	bl	png_jmpbuf
	bl	setjmp
	subs	r6, r0, #0
	beq	.L6
	ldr	r3, .L19+8
	ldr	r1, .L19+12
	ldr	r0, [r3]
	bl	fprintf
	add	r1, sp, #40
	add	r0, sp, #36
	bl	png_destroy_write_struct
	mov	r6, #4
.L1:
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, r6
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, pc}
.L17:
	ldr	r3, .L19+8
	ldr	r1, .L19+16
	ldr	r0, [r3]
	bl	fprintf
	mov	r1, r4
	add	r0, sp, #36
	bl	png_destroy_write_struct
	mov	r6, #3
	b	.L1
.L16:
	ldr	r3, .L19+8
	ldr	r1, .L19+20
	ldr	r0, [r3]
	bl	fprintf
	mov	r6, #2
	b	.L1
.L6:
	ldr	r3, .L19+24
	ldr	r2, .L19+28
	ldr	r1, [sp, #28]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r0, [sp, #36]
	bl	png_set_write_fn
	mov	r3, #1
	ldr	ip, .L19+32
	ldr	r0, .L19+36
	ldr	r1, .L19+40
	ldr	r2, .L19+44
	ldr	ip, [ip]
	ldr	r0, [r0]
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	r4, [sp, #24]
	str	ip, [sp, #16]
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r3, [r4]
	ldr	r2, [r4, #12]
	ldr	r1, [sp, #40]
	ldr	r0, [sp, #36]
	bl	png_set_IHDR
	ldr	r1, [sp, #40]
	ldr	r0, [sp, #36]
	bl	png_write_info
	ldr	r0, [sp, #36]
	bl	png_set_invert_mono
	ldr	r3, [r4]
	ldr	r4, [r4, #8]
	cmp	r3, #0
	ble	.L7
	mov	r5, r6
.L8:
	mov	r1, r4
	ldr	r0, [sp, #36]
	bl	png_write_row
	ldr	r3, [sp, #24]
	add	r5, r5, #1
	ldr	r2, [r3]
	ldr	r3, [r3, #4]
	cmp	r2, r5
	add	r4, r4, r3
	bgt	.L8
.L7:
	ldr	r1, [sp, #40]
	ldr	r0, [sp, #36]
	bl	png_write_end
	add	r1, sp, #40
	add	r0, sp, #36
	bl	png_destroy_write_struct
	b	.L1
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	PNG_LIBPNG_VER_STRING
	.word	.LC3
	.word	stderr
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.word	jbig2_png_flush
	.word	jbig2_png_write_data
	.word	PNG_FILTER_TYPE_DEFAULT
	.word	PNG_COMPRESSION_TYPE_DEFAULT
	.word	PNG_INTERLACE_NONE
	.word	PNG_COLOR_TYPE_GRAY
	.size	jbig2_image_write_png, .-jbig2_image_write_png
	.comm	stderr,4,4
	.comm	jbig2_png_write_data,4,4
	.comm	jbig2_png_flush,4,4
	.comm	PNG_LIBPNG_VER_STRING,4,4
	.comm	PNG_INTERLACE_NONE,4,4
	.comm	PNG_FILTER_TYPE_DEFAULT,4,4
	.comm	PNG_COMPRESSION_TYPE_DEFAULT,4,4
	.comm	PNG_COLOR_TYPE_GRAY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
