	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_write_sBIT                 ## -- Begin function png_write_sBIT
	.p2align	4, 0x90
_png_write_sBIT:                        ## @png_write_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	movq	_PNG_COLOR_MASK_COLOR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_12
## %bb.1:
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rcx
	movl	$8, %eax
	cmpl	%ebx, (%rcx)
	je	LBB0_3
## %bb.2:
	movslq	(%r14), %rax
LBB0_3:
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.4:
	cmpq	%rax, %rcx
	jg	LBB0_9
## %bb.5:
	movq	8(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.6:
	cmpq	%rax, %rdx
	jg	LBB0_9
## %bb.7:
	movq	16(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:
	cmpq	%rax, %rsi
	jg	LBB0_9
## %bb.11:
	movq	%rcx, -64(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rsi, -48(%rbp)
	movl	$3, %ecx
	jmp	LBB0_15
LBB0_12:
	movslq	24(%r15), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.13:
	cmpl	(%r14), %eax
	jg	LBB0_9
## %bb.14:
	movq	%rax, -64(%rbp)
	movl	$1, %ecx
LBB0_15:
	movq	_PNG_COLOR_MASK_ALPHA@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_19
## %bb.16:
	movslq	28(%r15), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.17:
	cmpl	(%r14), %eax
	jle	LBB0_18
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_21
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_warning                    ## TAILCALL
LBB0_18:
	movl	%ecx, %edx
	incl	%ecx
	movq	%rax, -64(%rbp,%rdx,8)
LBB0_19:
	movq	_png_sBIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	callq	_png_write_chunk
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_write_sBIT\n"

	.comm	_PNG_COLOR_MASK_COLOR,4,2       ## @PNG_COLOR_MASK_COLOR
	.comm	_PNG_COLOR_TYPE_PALETTE,4,2     ## @PNG_COLOR_TYPE_PALETTE
L_.str.1:                               ## @.str.1
	.asciz	"Invalid sBIT depth specified"

	.comm	_PNG_COLOR_MASK_ALPHA,4,2       ## @PNG_COLOR_MASK_ALPHA
	.comm	_png_sBIT,4,2                   ## @png_sBIT
	.comm	_PNG_sBIT,4,2                   ## @PNG_sBIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_write_sBIT                 ; -- Begin function png_write_sBIT
	.p2align	2
_png_write_sBIT:                        ; @png_write_sBIT
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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]
	str	x8, [sp, #40]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
Lloh5:
	adrp	x8, _PNG_COLOR_MASK_COLOR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PNG_COLOR_MASK_COLOR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_6
; %bb.2:
	mov	w8, #8
	ldr	x9, [x20]
	cbnz	x9, LBB0_7
	b	LBB0_16
LBB0_3:
	ldrsw	x8, [x20, #24]
	cbz	w8, LBB0_16
; %bb.4:
	ldr	w9, [x19]
	cmp	w8, w9
	b.gt	LBB0_16
; %bb.5:
	str	x8, [sp, #8]
	mov	w3, #1
	b	LBB0_13
LBB0_6:
	ldrsw	x8, [x19]
	ldr	x9, [x20]
	cbz	x9, LBB0_16
LBB0_7:
	cmp	x9, x8
	b.gt	LBB0_16
; %bb.8:
	ldr	x10, [x20, #8]
	cbz	x10, LBB0_16
; %bb.9:
	cmp	x10, x8
	b.gt	LBB0_16
; %bb.10:
	ldr	x11, [x20, #16]
	cbz	x11, LBB0_16
; %bb.11:
	cmp	x11, x8
	b.gt	LBB0_16
; %bb.12:
	stp	x9, x10, [sp, #8]
	mov	w3, #3
	str	x11, [sp, #24]
LBB0_13:
Lloh11:
	adrp	x8, _PNG_COLOR_MASK_ALPHA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PNG_COLOR_MASK_ALPHA@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_19
; %bb.14:
	ldrsw	x8, [x20, #28]
	cbz	w8, LBB0_16
; %bb.15:
	ldr	w9, [x19]
	cmp	w8, w9
	b.le	LBB0_18
LBB0_16:
	ldr	x8, [sp, #40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.17:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_png_warning
LBB0_18:
	add	x9, sp, #8
	str	x8, [x9, w3, uxtw #3]
	add	w3, w3, #1
LBB0_19:
Lloh19:
	adrp	x8, _png_sBIT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _png_sBIT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_png_write_chunk
	ldr	x8, [sp, #40]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_21:
	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 AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_write_sBIT\n"

	.comm	_PNG_COLOR_MASK_COLOR,4,2       ; @PNG_COLOR_MASK_COLOR
	.comm	_PNG_COLOR_TYPE_PALETTE,4,2     ; @PNG_COLOR_TYPE_PALETTE
l_.str.1:                               ; @.str.1
	.asciz	"Invalid sBIT depth specified"

	.comm	_PNG_COLOR_MASK_ALPHA,4,2       ; @PNG_COLOR_MASK_ALPHA
	.comm	_png_sBIT,4,2                   ; @png_sBIT
	.comm	_PNG_sBIT,4,2                   ; @PNG_sBIT
.subsections_via_symbols
