	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perform_gamma_sbit_tests
_perform_gamma_sbit_tests:              ## @perform_gamma_sbit_tests
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %edx
	movq	_READ_BDHI@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	cmpl	%eax, %edx
	jge	LBB0_23
## %bb.1:
	movq	%rdi, %r12
	leaq	-48(%rbp), %r15
	leaq	-44(%rbp), %r13
	leaq	-52(%rbp), %rbx
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##       Child Loop BB0_11 Depth 3
                                        ##         Child Loop BB0_14 Depth 4
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, -52(%rbp)
	movl	24(%r12), %r8d
	movl	28(%r12), %ecx
	movq	%r15, %rdi
	movq	%r13, %rsi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=2
	movl	24(%r12), %r8d
	movl	28(%r12), %ecx
	movq	%r15, %rdi
	movq	%r13, %rsi
	leaq	-52(%rbp), %rbx
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_11 Depth 3
                                        ##         Child Loop BB0_14 Depth 4
	movq	%rbx, %rdx
	callq	_next_format
	testq	%rax, %rax
	je	LBB0_22
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	-48(%rbp), %eax
	movq	_PNG_COLOR_MASK_ALPHA@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_21
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	cmpl	$3, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=2
	cmpl	$8, -64(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=2
	cmpl	$3, %eax
	je	LBB0_21
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	-44(%rbp), %eax
	jge	LBB0_21
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=2
	movl	4(%r12), %eax
	testl	%eax, %eax
	je	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=2
	xorl	%r14d, %r14d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_11 Depth=3
	xorl	%eax, %eax
LBB0_20:                                ##   in Loop: Header=BB0_11 Depth=3
	incq	%r14
	movl	%eax, %ecx
	cmpq	%rcx, %r14
	leaq	-48(%rbp), %r15
	leaq	-44(%rbp), %r13
	jae	LBB0_21
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_3 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_14 Depth 4
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=3
	xorl	%r15d, %r15d
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=4
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movl	-52(%rbp), %ecx
	movl	20(%r12), %r8d
	movl	(%rax,%r15,4), %eax
	movl	16(%r12), %ebx
	movq	%r12, %rdi
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	$0
	pushq	%rbx
	pushq	%r13
	pushq	%rax
	callq	_gamma_transform_test
	addq	$32, %rsp
	movq	%r12, %rdi
	callq	_fail
	testq	%rax, %rax
	jne	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=4
	movl	4(%r12), %eax
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=4
	incq	%r15
	movl	%eax, %ecx
	cmpq	%rcx, %r15
	jae	LBB0_20
LBB0_14:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_3 Depth=2
                                        ##       Parent Loop BB0_11 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	cmpq	%r15, %r14
	je	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=4
	movq	8(%r12), %rax
	movl	(%rax,%r14,4), %r9d
	leal	1(%r9), %ecx
	cmpl	$3, %ecx
	jb	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=4
	xorl	%r9d, %r9d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	incl	%edx
	movq	_READ_BDHI@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	cmpl	%eax, %edx
	jl	LBB0_2
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_READ_BDHI,4,2                  ## @READ_BDHI
	.comm	_PNG_COLOR_MASK_ALPHA,4,2       ## @PNG_COLOR_MASK_ALPHA
	.no_dead_strip	_perform_gamma_sbit_tests
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perform_gamma_sbit_tests
_perform_gamma_sbit_tests:              ; @perform_gamma_sbit_tests
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w20, [x0]
Lloh0:
	adrp	x21, _READ_BDHI@GOTPAGE
Lloh1:
	ldr	x21, [x21, _READ_BDHI@GOTPAGEOFF]
	ldr	w8, [x21]
	mov	w22, #1
	lsl	w8, w22, w8
	cmp	w20, w8
	b.ge	LBB0_17
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x23, _PNG_COLOR_MASK_ALPHA@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PNG_COLOR_MASK_ALPHA@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;         Child Loop BB0_14 Depth 4
	str	xzr, [sp, #24]
	str	wzr, [sp, #20]
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;         Child Loop BB0_14 Depth 4
	ldp	w4, w3, [x19, #24]
	add	x0, sp, #28
	add	x1, sp, #24
	add	x2, sp, #20
	bl	_next_format
	cbz	x0, LBB0_16
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	w8, [sp, #28]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=2
	cmp	w8, #3
	ccmp	w20, #8, #0, eq
	b.lt	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	w9, [sp, #24]
	cmp	w8, #3
	ccmp	w20, w9, #0, ne
	b.ge	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=2
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=2
	mov	x24, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=3
	add	x24, x24, #1
	cmp	x24, w8, uxtw
	b.hs	LBB0_3
LBB0_10:                                ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_3 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_14 Depth 4
	cbz	w8, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=3
	mov	x25, #0
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=4
	ldr	w8, [x19, #4]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=4
	add	x25, x25, #1
	cmp	x25, w8, uxtw
	b.hs	LBB0_9
LBB0_14:                                ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_3 Depth=2
                                        ;       Parent Loop BB0_10 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	cmp	x24, x25
	b.eq	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=4
	ldp	w2, w1, [sp, #24]
	ldr	w3, [sp, #20]
	ldr	x8, [x19, #8]
	ldr	w9, [x8, x24, lsl #2]
	add	w10, w9, #1
	cmp	w10, #3
	csel	w5, w9, wzr, lo
	ldr	w6, [x8, x25, lsl #2]
	ldp	w8, w4, [x19, #16]
	stp	w8, wzr, [sp]
	mov	x0, x19
	mov	x7, x20
	bl	_gamma_transform_test
	mov	x0, x19
	bl	_fail
	cbz	x0, LBB0_12
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	ldr	w8, [x21]
	lsl	w8, w22, w8
	cmp	w20, w8
	b.lt	LBB0_2
LBB0_17:
	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
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_READ_BDHI,4,2                  ; @READ_BDHI
	.comm	_PNG_COLOR_MASK_ALPHA,4,2       ; @PNG_COLOR_MASK_ALPHA
	.no_dead_strip	_perform_gamma_sbit_tests
.subsections_via_symbols
