	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function insert_sBIT
_insert_sBIT:                           ## @insert_sBIT
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r14d
	movl	%esi, %ebx
	movl	%edi, %r13d
	callq	_png_get_color_type
	movl	%eax, %r12d
	movq	_PNG_COLOR_MASK_COLOR@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	testl	%r12d, (%rsi)
	setne	%al
	movq	_PNG_COLOR_MASK_ALPHA@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	testl	%r12d, (%rdx)
	setne	%cl
	leal	(%rcx,%rax,2), %r15d
	incl	%r15d
	movq	_PNG_COLOR_MASK_PALETTE@GOTPCREL(%rip), %rcx
	movl	$8, %eax
	testl	%r12d, (%rcx)
	jne	LBB0_2
## %bb.1:
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_png_get_bit_depth
	movq	_PNG_COLOR_MASK_COLOR@GOTPCREL(%rip), %rsi
LBB0_2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	cmpl	%r14d, %r15d
	je	LBB0_4
## %bb.3:
	movq	%rsi, %r14
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edi
	movl	%eax, %ebx
	callq	_png_error
	movq	%r14, %rsi
	movl	%ebx, %eax
LBB0_4:
	movl	(%rsi), %ebx
	andl	%r12d, %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %esi
	movl	%r13d, %edi
	movl	%r13d, %r15d
	movl	%eax, %r13d
	movl	%eax, %edx
	callq	_bval
	movq	%rax, %rsi
	movl	$42, %edx
	testl	%ebx, %ebx
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	je	LBB0_5
## %bb.6:
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %esi
	movl	%r15d, %edi
	movl	%r13d, %edx
	callq	_bval
	movq	%r14, %rcx
	movq	%rax, %r14
	movl	8(%rcx), %esi
	movl	%r15d, %ebx
	movl	%r15d, %edi
	movl	%r13d, %edx
	callq	_bval
	movl	$42, %edx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	$42, %esi
	jmp	LBB0_7
LBB0_5:
	movl	%r15d, %ebx
	movl	$42, %eax
	movl	$42, %r14d
	movl	$42, %ecx
LBB0_7:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%eax, -80(%rbp)
	movl	%r14d, -84(%rbp)
	movl	%ecx, -88(%rbp)
	movl	%esi, -76(%rbp)
	movq	_PNG_COLOR_MASK_ALPHA@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	je	LBB0_9
## %bb.8:
	cltq
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	-4(%rcx,%rax,4), %esi
	movl	%ebx, %edi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_bval
	movq	%rax, %rdx
LBB0_9:
	movl	%edx, -72(%rbp)
	leaq	-88(%rbp), %rdx
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_png_set_sBIT
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_COLOR_MASK_COLOR,4,2       ## @PNG_COLOR_MASK_COLOR
	.comm	_PNG_COLOR_MASK_ALPHA,4,2       ## @PNG_COLOR_MASK_ALPHA
	.comm	_PNG_COLOR_MASK_PALETTE,4,2     ## @PNG_COLOR_MASK_PALETTE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sBIT: incorrect parameter count"

	.no_dead_strip	_insert_sBIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function insert_sBIT
_insert_sBIT:                           ; @insert_sBIT
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	bl	_png_get_color_type
	mov	x23, x0
Lloh0:
	adrp	x25, _PNG_COLOR_MASK_COLOR@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PNG_COLOR_MASK_COLOR@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh2:
	adrp	x27, _PNG_COLOR_MASK_ALPHA@GOTPAGE
Lloh3:
	ldr	x27, [x27, _PNG_COLOR_MASK_ALPHA@GOTPAGEOFF]
	ldr	w9, [x27]
	tst	w9, w0
	cset	w9, ne
	mov	w10, #4
	mov	w11, #3
	csel	w10, w11, w10, eq
	tst	w8, w0
	csinc	w26, w10, w9, ne
Lloh4:
	adrp	x8, _PNG_COLOR_MASK_PALETTE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PNG_COLOR_MASK_PALETTE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.1:
	mov	w24, #8
	cmp	w26, w22
	b.eq	LBB0_3
LBB0_2:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_png_error
LBB0_3:
	ldr	w8, [x25]
	and	w26, w8, w23
	ldr	w1, [x21]
	mov	x0, x20
	mov	x2, x24
	bl	_bval
	mov	x25, x0
	cbz	w26, LBB0_6
; %bb.4:
	ldr	w1, [x21, #4]
	mov	x0, x20
	mov	x2, x24
	bl	_bval
	mov	x26, x0
	ldr	w1, [x21, #8]
	mov	x0, x20
	mov	x2, x24
	bl	_bval
	mov	x8, x25
	mov	w25, #42
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	bl	_png_get_bit_depth
	mov	x24, x0
	cmp	w26, w22
	b.ne	LBB0_2
	b	LBB0_3
LBB0_6:
	mov	w0, #42
	mov	w26, #42
	mov	w8, #42
LBB0_7:
	stp	w8, w26, [sp, #8]
	stp	w0, w25, [sp, #16]
	ldr	w8, [x27]
	tst	w8, w23
	b.eq	LBB0_9
; %bb.8:
	sub	w8, w22, #1
	ldr	w1, [x21, w8, sxtw #2]
	mov	x0, x20
	mov	x2, x24
	bl	_bval
	b	LBB0_10
LBB0_9:
	mov	w0, #42
LBB0_10:
	str	w0, [sp, #24]
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_png_set_sBIT
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_COLOR_MASK_COLOR,4,2       ; @PNG_COLOR_MASK_COLOR
	.comm	_PNG_COLOR_MASK_ALPHA,4,2       ; @PNG_COLOR_MASK_ALPHA
	.comm	_PNG_COLOR_MASK_PALETTE,4,2     ; @PNG_COLOR_MASK_PALETTE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sBIT: incorrect parameter count"

	.no_dead_strip	_insert_sBIT
.subsections_via_symbols
