	.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	$112, %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.5:
	movq	_PNG_HAVE_IDAT@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_6
LBB0_8:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_png_crc_finish
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_30
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_chunk_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_28
## %bb.16:
	movl	4(%rbx), %r15d
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_23
## %bb.17:
	movq	-96(%rbp), %rax
	movq	%rax, -136(%rbp)
	testq	%r14, %r14
	je	LBB0_22
## %bb.18:
	movq	8(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_22
## %bb.19:
	cmpq	%rcx, %rax
	jae	LBB0_20
## %bb.21:
	movq	8(%rbx), %rcx
	leaq	(%rax,%rax,2), %rax
	movq	16(%rcx,%rax,8), %rdx
	movq	%rdx, -104(%rbp)
	movups	(%rcx,%rax,8), %xmm0
	movups	%xmm0, -120(%rbp)
	jmp	LBB0_26
LBB0_3:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_png_crc_finish
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_30
## %bb.4:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_10
LBB0_6:
	movl	4(%rbx), %eax
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_11
## %bb.7:
	movq	_PNG_HAVE_PLTE@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_8
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:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_png_crc_finish
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_30
## %bb.14:
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	movq	%rbx, %rdi
	addq	$112, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_chunk_benign_error         ## TAILCALL
LBB0_23:
	andl	(%r12), %r15d
	movq	$0, -136(%rbp)
	leaq	-96(%rbp), %rdi
	callq	_png_get_uint_16
	testl	%r15d, %r15d
	je	LBB0_24
## %bb.25:
	movq	%rax, -104(%rbp)
	leaq	-80(%rbp), %rdi
	callq	_png_get_uint_16
	movq	%rax, -112(%rbp)
	leaq	-64(%rbp), %rdi
	callq	_png_get_uint_16
	movq	%rax, -120(%rbp)
	jmp	LBB0_26
LBB0_22:
	xorps	%xmm0, %xmm0
	movups	%xmm0, -120(%rbp)
	movq	$0, -104(%rbp)
LBB0_26:
	movq	$0, -128(%rbp)
	jmp	LBB0_27
LBB0_24:
	movq	%rax, -128(%rbp)
	movq	%rax, -120(%rbp)
	movq	%rax, -112(%rbp)
	movq	%rax, -104(%rbp)
LBB0_27:
	leaq	-136(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_png_set_bKGD
LBB0_28:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_30
## %bb.29:
	addq	$112, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_chunk_benign_error
	jmp	LBB0_28
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_handle_bKGD"

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

	.comm	_PNG_HAVE_IDAT,4,2              ## @PNG_HAVE_IDAT
	.comm	_PNG_COLOR_TYPE_PALETTE,4,2     ## @PNG_COLOR_TYPE_PALETTE
	.comm	_PNG_HAVE_PLTE,4,2              ## @PNG_HAVE_PLTE
L_.str.2:                               ## @.str.2
	.asciz	"out of place"

	.comm	_PNG_INFO_bKGD,4,2              ## @PNG_INFO_bKGD
L_.str.3:                               ## @.str.3
	.asciz	"duplicate"

	.comm	_PNG_COLOR_MASK_COLOR,4,2       ## @PNG_COLOR_MASK_COLOR
L_.str.4:                               ## @.str.4
	.asciz	"invalid"

L_.str.5:                               ## @.str.5
	.asciz	"invalid index"

.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, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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_4
; %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_14
LBB0_2:
	mov	x0, x19
	mov	x1, x21
	bl	_png_crc_finish
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.3:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_4:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_png_chunk_error
	ldr	w8, [x19, #4]
Lloh18:
	adrp	x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
LBB0_5:
Lloh21:
	adrp	x22, _PNG_COLOR_MASK_COLOR@GOTPAGE
Lloh22:
	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_12
; %bb.6:
	add	x1, sp, #40
	mov	x0, x19
	mov	x2, x21
	bl	_png_crc_read
	mov	x0, x19
	mov	w1, #0
	bl	_png_crc_finish
	cbnz	x0, LBB0_27
; %bb.7:
	ldr	w8, [x19, #4]
Lloh23:
	adrp	x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_21
; %bb.8:
	ldr	x8, [sp, #40]
	str	x8, [sp]
	cbz	x20, LBB0_23
; %bb.9:
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_23
; %bb.10:
	cmp	x8, x9
	b.hs	LBB0_29
; %bb.11:
	ldr	x9, [x19, #8]
	mov	w10, #24
	madd	x8, x8, x10, x9
	ldr	x9, [x8, #16]
	str	x9, [sp, #32]
	ldr	q0, [x8]
	str	q0, [sp, #16]
	b	LBB0_24
LBB0_12:
	mov	x0, x19
	mov	x1, x21
	bl	_png_crc_finish
	ldur	x8, [x29, #-40]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.13:
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_20
LBB0_14:
	ldr	w8, [x19, #4]
Lloh31:
	adrp	x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.15:
Lloh34:
	adrp	x11, _PNG_HAVE_PLTE@GOTPAGE
Lloh35:
	ldr	x11, [x11, _PNG_HAVE_PLTE@GOTPAGEOFF]
Lloh36:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_2
LBB0_16:
	cbz	x20, LBB0_5
; %bb.17:
	ldr	w10, [x20]
Lloh37:
	adrp	x11, _PNG_INFO_bKGD@GOTPAGE
Lloh38:
	ldr	x11, [x11, _PNG_INFO_bKGD@GOTPAGEOFF]
Lloh39:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_5
; %bb.18:
	mov	x0, x19
	mov	x1, x21
	bl	_png_crc_finish
	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_30
; %bb.19:
Lloh43:
	adrp	x1, l_.str.3@PAGE
Lloh44:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_20:
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_png_chunk_benign_error
LBB0_21:
	ldr	w9, [x22]
	and	w22, w9, w8
	str	xzr, [sp]
	add	x21, sp, #40
	add	x0, sp, #40
	bl	_png_get_uint_16
	cbz	w22, LBB0_25
; %bb.22:
	str	x0, [sp, #32]
	add	x0, x21, #16
	bl	_png_get_uint_16
	str	x0, [sp, #24]
	add	x0, x21, #32
	bl	_png_get_uint_16
	str	x0, [sp, #16]
	b	LBB0_24
LBB0_23:
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #32]
LBB0_24:
	str	xzr, [sp, #8]
	b	LBB0_26
LBB0_25:
	stp	x0, x0, [sp, #8]
	stp	x0, x0, [sp, #24]
LBB0_26:
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	bl	_png_set_bKGD
LBB0_27:
	ldur	x8, [x29, #-40]
Lloh45:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh46:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.28:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_29:
Lloh48:
	adrp	x1, l_.str.5@PAGE
Lloh49:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_png_chunk_benign_error
	b	LBB0_27
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_handle_bKGD"

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

	.comm	_PNG_HAVE_IDAT,4,2              ; @PNG_HAVE_IDAT
	.comm	_PNG_COLOR_TYPE_PALETTE,4,2     ; @PNG_COLOR_TYPE_PALETTE
	.comm	_PNG_HAVE_PLTE,4,2              ; @PNG_HAVE_PLTE
l_.str.2:                               ; @.str.2
	.asciz	"out of place"

	.comm	_PNG_INFO_bKGD,4,2              ; @PNG_INFO_bKGD
l_.str.3:                               ; @.str.3
	.asciz	"duplicate"

	.comm	_PNG_COLOR_MASK_COLOR,4,2       ; @PNG_COLOR_MASK_COLOR
l_.str.4:                               ; @.str.4
	.asciz	"invalid"

l_.str.5:                               ; @.str.5
	.asciz	"invalid index"

.subsections_via_symbols
