	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_handle_bKGD                ## -- Begin function png_handle_bKGD
	.p2align	4, 0x90
_png_handle_bKGD:                       ## @png_handle_bKGD
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	movl	(%rbx), %edx
	movq	_PNG_HAVE_IHDR@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_1
## %bb.4:
	movq	_PNG_HAVE_IDAT@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_8
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_error
	movl	4(%rbx), %eax
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	movq	_PNG_COLOR_MASK_COLOR@GOTPCREL(%rip), %r12
	xorl	%edx, %edx
	testl	%eax, (%r12)
	setne	%dl
	cmpl	%ecx, %eax
	leal	2(,%rdx,4), %eax
	movl	$1, %ecx
	cmovnel	%eax, %ecx
	cmpl	%r15d, %ecx
	jne	LBB0_3
## %bb.15:
	leaq	-96(%rbp), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_png_crc_read
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_png_crc_finish
	testq	%rax, %rax
	jne	LBB0_25
## %bb.16:
	movl	4(%rbx), %r15d
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_21
## %bb.17:
	movq	-96(%rbp), %rax
	movq	%rax, 8(%rbx)
	movq	8(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_24
## %bb.18:
	cmpq	%rcx, %rax
	jbe	LBB0_20
## %bb.19:
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_warning
	jmp	LBB0_25
LBB0_3:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_6
LBB0_8:
	movl	4(%rbx), %eax
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_11
## %bb.9:
	movq	_PNG_HAVE_PLTE@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_10
LBB0_11:
	testq	%r14, %r14
	je	LBB0_2
## %bb.12:
	movq	_PNG_INFO_bKGD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%r14)
	je	LBB0_2
## %bb.13:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_6
LBB0_21:
	andl	(%r12), %r15d
	leaq	-96(%rbp), %rdi
	callq	_png_get_uint_16
	testl	%r15d, %r15d
	je	LBB0_22
## %bb.23:
	movq	%rax, 32(%rbx)
	leaq	-80(%rbp), %rdi
	callq	_png_get_uint_16
	movq	%rax, 24(%rbx)
	leaq	-64(%rbp), %rdi
	callq	_png_get_uint_16
	movq	%rax, 16(%rbx)
	jmp	LBB0_24
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
LBB0_6:
	movq	%rbx, %rdi
	callq	_png_warning
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_14
## %bb.7:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_crc_finish                 ## TAILCALL
LBB0_22:
	movq	%rax, 40(%rbx)
	movq	%rax, 16(%rbx)
	movq	%rax, 24(%rbx)
	movq	%rax, 32(%rbx)
	jmp	LBB0_24
LBB0_20:
	movq	48(%rbx), %rcx
	leaq	(%rax,%rax,2), %rax
	movq	16(%rcx,%rax,8), %rdx
	movq	%rdx, 32(%rbx)
	movups	(%rcx,%rax,8), %xmm0
	movups	%xmm0, 16(%rbx)
LBB0_24:
	leaq	8(%rbx), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_png_set_bKGD
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_14
## %bb.26:
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_handle_bKGD\n"

	.comm	_PNG_HAVE_IHDR,4,2              ## @PNG_HAVE_IHDR
L_.str.1:                               ## @.str.1
	.asciz	"Missing IHDR before bKGD"

	.comm	_PNG_HAVE_IDAT,4,2              ## @PNG_HAVE_IDAT
L_.str.2:                               ## @.str.2
	.asciz	"Invalid bKGD after IDAT"

	.comm	_PNG_COLOR_TYPE_PALETTE,4,2     ## @PNG_COLOR_TYPE_PALETTE
	.comm	_PNG_HAVE_PLTE,4,2              ## @PNG_HAVE_PLTE
L_.str.3:                               ## @.str.3
	.asciz	"Missing PLTE before bKGD"

	.comm	_PNG_INFO_bKGD,4,2              ## @PNG_INFO_bKGD
L_.str.4:                               ## @.str.4
	.asciz	"Duplicate bKGD chunk"

	.comm	_PNG_COLOR_MASK_COLOR,4,2       ## @PNG_COLOR_MASK_COLOR
L_.str.5:                               ## @.str.5
	.asciz	"Incorrect bKGD chunk length"

L_.str.6:                               ## @.str.6
	.asciz	"Incorrect bKGD chunk index value"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_handle_bKGD                ; -- Begin function png_handle_bKGD
	.p2align	2
_png_handle_bKGD:                       ; @png_handle_bKGD
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
	ldr	w10, [x19]
Lloh5:
	adrp	x8, _PNG_HAVE_IHDR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PNG_HAVE_IHDR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w10
	b.eq	LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _PNG_HAVE_IDAT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PNG_HAVE_IDAT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w10
	b.eq	LBB0_11
; %bb.2:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_3:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_png_error
	ldr	w8, [x19, #4]
Lloh15:
	adrp	x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
LBB0_4:
Lloh18:
	adrp	x22, _PNG_COLOR_MASK_COLOR@GOTPAGE
Lloh19:
	ldr	x22, [x22, _PNG_COLOR_MASK_COLOR@GOTPAGEOFF]
	ldr	w10, [x22]
	tst	w10, w8
	mov	w10, #6
	mov	w11, #2
	csel	w10, w11, w10, eq
	cmp	w8, w9
	csinc	w8, w10, wzr, ne
	cmp	w8, w21
	b.ne	LBB0_10
; %bb.5:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_png_crc_read
	mov	x0, x19
	mov	w1, #0
	bl	_png_crc_finish
	cbnz	x0, LBB0_24
; %bb.6:
	ldr	w8, [x19, #4]
Lloh20:
	adrp	x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.7:
	ldr	x8, [sp, #8]
	str	x8, [x19, #8]
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_23
; %bb.8:
	cmp	x8, x9
	b.ls	LBB0_22
; %bb.9:
Lloh23:
	adrp	x1, l_.str.6@PAGE
Lloh24:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_png_warning
	b	LBB0_24
LBB0_10:
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_19
LBB0_11:
	ldr	w8, [x19, #4]
Lloh27:
	adrp	x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.12:
Lloh30:
	adrp	x11, _PNG_HAVE_PLTE@GOTPAGE
Lloh31:
	ldr	x11, [x11, _PNG_HAVE_PLTE@GOTPAGEOFF]
Lloh32:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_18
LBB0_13:
	cbz	x20, LBB0_4
; %bb.14:
	ldr	w10, [x20]
Lloh33:
	adrp	x11, _PNG_INFO_bKGD@GOTPAGE
Lloh34:
	ldr	x11, [x11, _PNG_INFO_bKGD@GOTPAGEOFF]
Lloh35:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_4
; %bb.15:
Lloh36:
	adrp	x1, l_.str.4@PAGE
Lloh37:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_19
LBB0_16:
	ldr	w9, [x22]
	and	w22, w9, w8
	add	x21, sp, #8
	add	x0, sp, #8
	bl	_png_get_uint_16
	cbz	w22, LBB0_21
; %bb.17:
	str	x0, [x19, #32]
	add	x0, x21, #16
	bl	_png_get_uint_16
	str	x0, [x19, #24]
	add	x0, x21, #32
	bl	_png_get_uint_16
	str	x0, [x19, #16]
	b	LBB0_23
LBB0_18:
Lloh38:
	adrp	x1, l_.str.3@PAGE
Lloh39:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_19:
	mov	x0, x19
	bl	_png_warning
	ldur	x8, [x29, #-40]
Lloh40:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh41:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.20:
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_png_crc_finish
LBB0_21:
	stp	x0, x0, [x19, #16]
	stp	x0, x0, [x19, #32]
	b	LBB0_23
LBB0_22:
	ldr	x9, [x19, #48]
	mov	w10, #24
	madd	x8, x8, x10, x9
	ldr	x9, [x8, #16]
	str	x9, [x19, #32]
	ldr	q0, [x8]
	str	q0, [x19, #16]
LBB0_23:
	add	x2, x19, #8
	mov	x0, x19
	mov	x1, x20
	bl	_png_set_bKGD
LBB0_24:
	ldur	x8, [x29, #-40]
Lloh43:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh44:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_handle_bKGD\n"

	.comm	_PNG_HAVE_IHDR,4,2              ; @PNG_HAVE_IHDR
l_.str.1:                               ; @.str.1
	.asciz	"Missing IHDR before bKGD"

	.comm	_PNG_HAVE_IDAT,4,2              ; @PNG_HAVE_IDAT
l_.str.2:                               ; @.str.2
	.asciz	"Invalid bKGD after IDAT"

	.comm	_PNG_COLOR_TYPE_PALETTE,4,2     ; @PNG_COLOR_TYPE_PALETTE
	.comm	_PNG_HAVE_PLTE,4,2              ; @PNG_HAVE_PLTE
l_.str.3:                               ; @.str.3
	.asciz	"Missing PLTE before bKGD"

	.comm	_PNG_INFO_bKGD,4,2              ; @PNG_INFO_bKGD
l_.str.4:                               ; @.str.4
	.asciz	"Duplicate bKGD chunk"

	.comm	_PNG_COLOR_MASK_COLOR,4,2       ; @PNG_COLOR_MASK_COLOR
l_.str.5:                               ; @.str.5
	.asciz	"Incorrect bKGD chunk length"

l_.str.6:                               ; @.str.6
	.asciz	"Incorrect bKGD chunk index value"

.subsections_via_symbols
