	.file	"extr_pngwutil.c_png_write_bKGD.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"in png_write_bKGD"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Invalid background palette index"
	.align 8
.LC2:
	.string	"Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8"
	.align 8
.LC3:
	.string	"Ignoring attempt to write bKGD chunk out-of-range for bit_depth"
	.text
	.p2align 4
	.globl	png_write_bKGD
	.type	png_write_bKGD, @function
png_write_bKGD:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	lea	rsi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	edi, 1
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	png_debug@PLT
	cmp	DWORD PTR PNG_COLOR_TYPE_PALETTE[rip], ebx
	je	.L11
	test	DWORD PTR PNG_COLOR_MASK_COLOR[rip], ebx
	jne	.L12
	mov	ecx, DWORD PTR 12[rbp]
	mov	eax, 1
	mov	esi, DWORD PTR 20[r12]
	sal	eax, cl
	cmp	esi, eax
	jge	.L13
	mov	r12, rsp
	mov	rdi, r12
	call	png_save_uint_16@PLT
	mov	ecx, 2
	mov	rdx, r12
	mov	rdi, rbp
	mov	esi, DWORD PTR png_bKGD[rip]
	call	png_write_complete_chunk@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	esi, DWORD PTR 8[r12]
	mov	r13, rsp
	mov	rdi, r13
	call	png_save_uint_16@PLT
	mov	esi, DWORD PTR 12[r12]
	lea	rdi, 8[rsp]
	call	png_save_uint_16@PLT
	mov	esi, DWORD PTR 16[r12]
	lea	rdi, 16[rsp]
	call	png_save_uint_16@PLT
	mov	eax, DWORD PTR [rsp]
	or	eax, DWORD PTR 8[rsp]
	or	eax, DWORD PTR 16[rsp]
	jne	.L15
	mov	esi, DWORD PTR png_bKGD[rip]
	mov	ecx, 6
	mov	rdx, r13
	mov	rdi, rbp
	call	png_write_complete_chunk@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR [r12]
	cmp	rax, QWORD PTR 0[rbp]
	jge	.L16
	mov	esi, DWORD PTR png_bKGD[rip]
	mov	rdx, rsp
	mov	rdi, rbp
	mov	DWORD PTR [rsp], eax
	mov	ecx, 1
	call	png_write_complete_chunk@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	call	png_warning@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	call	png_warning@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	png_warning@PLT
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	png_write_bKGD, .-png_write_bKGD
	.comm	png_bKGD,4,4
	.comm	PNG_FLAG_MNG_EMPTY_PLTE,4,4
	.comm	PNG_COLOR_TYPE_PALETTE,4,4
	.comm	PNG_COLOR_MASK_COLOR,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_pngwutil.c_png_write_bKGD.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"in png_write_bKGD\000"
	.align	2
.LC1:
	.ascii	"Invalid background palette index\000"
	.align	2
.LC2:
	.ascii	"Ignoring attempt to write 16-bit bKGD chunk when bi"
	.ascii	"t_depth is 8\000"
	.align	2
.LC3:
	.ascii	"Ignoring attempt to write bKGD chunk out-of-range f"
	.ascii	"or bit_depth\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	png_write_bKGD
	.syntax unified
	.arm
	.fpu softvfp
	.type	png_write_bKGD, %function
png_write_bKGD:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r2
	ldr	r3, .L17
	sub	sp, sp, #32
	mov	r4, r0
	mov	r6, r1
	mov	r0, #1
	ldr	r1, .L17+4
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	png_debug
	ldr	r3, .L17+8
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L11
	ldr	r3, .L17+12
	ldr	r3, [r3]
	tst	r5, r3
	bne	.L12
	mov	r2, #1
	ldr	r1, [r6, #16]
	ldr	r3, [r4, #8]
	cmp	r1, r2, lsl r3
	bge	.L13
	add	r0, sp, #4
	bl	png_save_uint_16
	ldr	r3, .L17+16
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #4
	mov	r3, #2
	bl	png_write_complete_chunk
.L1:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, pc}
.L12:
	ldr	r1, [r6, #4]
	add	r0, sp, #4
	bl	png_save_uint_16
	ldr	r1, [r6, #8]
	add	r0, sp, #12
	bl	png_save_uint_16
	ldr	r1, [r6, #12]
	add	r0, sp, #20
	bl	png_save_uint_16
	ldr	r3, [sp, #4]
	ldr	r1, [sp, #12]
	ldr	r2, [sp, #20]
	orr	r3, r3, r1
	orrs	r3, r3, r2
	bne	.L15
	ldr	r3, .L17+16
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #4
	mov	r3, #6
	bl	png_write_complete_chunk
	b	.L1
.L11:
	ldr	ip, [r6]
	ldr	r3, [r4]
	cmp	ip, r3
	bge	.L16
	ldr	r3, .L17+16
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #4
	mov	r3, #1
	str	ip, [sp, #4]
	bl	png_write_complete_chunk
	b	.L1
.L15:
	mov	r0, r4
	ldr	r1, .L17+20
	bl	png_warning
	b	.L1
.L13:
	mov	r0, r4
	ldr	r1, .L17+24
	bl	png_warning
	b	.L1
.L16:
	mov	r0, r4
	ldr	r1, .L17+28
	bl	png_warning
	b	.L1
.L14:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	.LC4
	.word	.LC0
	.word	PNG_COLOR_TYPE_PALETTE
	.word	PNG_COLOR_MASK_COLOR
	.word	png_bKGD
	.word	.LC2
	.word	.LC3
	.word	.LC1
	.size	png_write_bKGD, .-png_write_bKGD
	.comm	png_bKGD,4,4
	.comm	PNG_FLAG_MNG_EMPTY_PLTE,4,4
	.comm	PNG_COLOR_TYPE_PALETTE,4,4
	.comm	PNG_COLOR_MASK_COLOR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
