	.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, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	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	(%r15), %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	%r15, %rdi
	movl	%ebx, %esi
	callq	_png_crc_finish
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_40
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_png_chunk_error
	movl	4(%r15), %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	%ebx, %ecx
	jne	LBB0_3
## %bb.15:
	leaq	-96(%rbp), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_png_crc_read
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_png_crc_finish
	testq	%rax, %rax
	jne	LBB0_38
## %bb.16:
	movl	4(%r15), %eax
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_24
## %bb.17:
	movq	-96(%rbp), %rax
	movq	%rax, -136(%rbp)
	testq	%r14, %r14
	je	LBB0_23
## %bb.18:
	movq	8(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_23
## %bb.19:
	cmpq	%rcx, %rax
	jae	LBB0_20
## %bb.22:
	movq	16(%r15), %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_36
LBB0_3:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_png_crc_finish
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_40
## %bb.4:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_10
LBB0_6:
	movl	4(%r15), %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	%r15, %rdi
	movl	%ebx, %esi
	callq	_png_crc_finish
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_40
## %bb.14:
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	movq	%r15, %rdi
	addq	$112, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_chunk_benign_error         ## TAILCALL
LBB0_24:
	movl	8(%r15), %ecx
	testl	%eax, (%r12)
	je	LBB0_25
## %bb.30:
	cmpl	$8, %ecx
	jg	LBB0_35
## %bb.31:
	cmpq	$0, -96(%rbp)
	jne	LBB0_34
## %bb.32:
	cmpq	$0, -80(%rbp)
	jne	LBB0_34
## %bb.33:
	cmpq	$0, -64(%rbp)
	jne	LBB0_34
LBB0_35:
	movq	$0, -136(%rbp)
	leaq	-96(%rbp), %rdi
	callq	_png_get_uint_16
	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_36
LBB0_23:
	xorps	%xmm0, %xmm0
	movups	%xmm0, -120(%rbp)
	movq	$0, -104(%rbp)
LBB0_36:
	movq	$0, -128(%rbp)
LBB0_37:
	leaq	-136(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_png_set_bKGD
	jmp	LBB0_38
LBB0_25:
	cmpl	$8, %ecx
	jg	LBB0_29
## %bb.26:
	cmpq	$0, -96(%rbp)
	jne	LBB0_28
## %bb.27:
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $rcx
	shlq	%cl, %rax
	cmpq	%rax, -88(%rbp)
	jae	LBB0_28
LBB0_29:
	movq	$0, -136(%rbp)
	leaq	-96(%rbp), %rdi
	callq	_png_get_uint_16
	movq	%rax, -128(%rbp)
	movq	%rax, -120(%rbp)
	movq	%rax, -112(%rbp)
	movq	%rax, -104(%rbp)
	jmp	LBB0_37
LBB0_20:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_21
LBB0_34:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_21
LBB0_28:
	leaq	L_.str.6(%rip), %rsi
LBB0_21:
	movq	%r15, %rdi
	callq	_png_chunk_benign_error
LBB0_38:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_40
## %bb.39:
	addq	$112, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_40:
	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"

L_.str.6:                               ## @.str.6
	.asciz	"invalid gray level"

L_.str.7:                               ## @.str.7
	.asciz	"invalid color"

.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_40
; %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_38
; %bb.7:
	ldr	w9, [x19, #4]
Lloh23:
	adrp	x8, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w9, w8
	b.ne	LBB0_21
; %bb.8:
	ldr	x8, [sp, #40]
	str	x8, [sp]
	cbz	x20, LBB0_27
; %bb.9:
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_27
; %bb.10:
	cmp	x8, x9
	b.hs	LBB0_34
; %bb.11:
	ldr	x9, [x19, #16]
	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_28
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_40
; %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_40
; %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	w10, [x22]
	ldr	w8, [x19, #8]
	tst	w10, w9
	b.eq	LBB0_30
; %bb.22:
	cmp	w8, #8
	b.gt	LBB0_26
; %bb.23:
	ldr	x8, [sp, #40]
	cbnz	x8, LBB0_35
; %bb.24:
	ldr	x8, [sp, #56]
	cbnz	x8, LBB0_35
; %bb.25:
	ldr	x8, [sp, #72]
	cbnz	x8, LBB0_35
LBB0_26:
	str	xzr, [sp]
	add	x21, sp, #40
	add	x0, sp, #40
	bl	_png_get_uint_16
	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_28
LBB0_27:
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #32]
LBB0_28:
	str	xzr, [sp, #8]
LBB0_29:
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	bl	_png_set_bKGD
	b	LBB0_38
LBB0_30:
	cmp	w8, #8
	b.gt	LBB0_33
; %bb.31:
	ldr	x9, [sp, #40]
	cbnz	x9, LBB0_36
; %bb.32:
	ldr	x9, [sp, #48]
	mov	w10, #1
	lsl	x8, x10, x8
	cmp	x9, x8
	b.hs	LBB0_36
LBB0_33:
	str	xzr, [sp]
	add	x0, sp, #40
	bl	_png_get_uint_16
	stp	x0, x0, [sp, #8]
	stp	x0, x0, [sp, #24]
	b	LBB0_29
LBB0_34:
Lloh45:
	adrp	x1, l_.str.5@PAGE
Lloh46:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_37
LBB0_35:
Lloh47:
	adrp	x1, l_.str.7@PAGE
Lloh48:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_37
LBB0_36:
Lloh49:
	adrp	x1, l_.str.6@PAGE
Lloh50:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_37:
	mov	x0, x19
	bl	_png_chunk_benign_error
LBB0_38:
	ldur	x8, [x29, #-40]
Lloh51:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh52:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh53:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_40
; %bb.39:
	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_40:
	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 AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.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"

l_.str.6:                               ; @.str.6
	.asciz	"invalid gray level"

l_.str.7:                               ; @.str.7
	.asciz	"invalid color"

.subsections_via_symbols
