	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perform_gamma_scale16_tests
_perform_gamma_scale16_tests:           ## @perform_gamma_scale16_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	je	LBB0_12
## %bb.1:
	movq	%rdi, %r13
	movl	$1, %eax
	xorl	%r14d, %r14d
	movq	_PNG_GAMMA_THRESHOLD@GOTPCREL(%rip), %r15
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movl	%eax, %ecx
	cmpq	%rcx, %r12
	jae	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%eax, %eax
	movl	$0, %eax
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%rbx
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jae	LBB0_11
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rbx, %r12
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	8(%r13), %rcx
	movl	(%rcx,%rbx,4), %eax
	cltd
	idivl	(%rcx,%r12,4)
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %edi
	callq	_fabs
	cmpq	(%r15), %rax
	jl	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	20(%r13), %r8d
	movq	8(%r13), %rax
	movl	(%rax,%r12,4), %r9d
	leal	1(%r9), %ecx
	cmpl	$3, %ecx
	cmovael	%r14d, %r9d
	movl	(%rax,%rbx,4), %r10d
	movl	16(%r13), %eax
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	xorl	%ecx, %ecx
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	$1
	pushq	%rax
	pushq	$11
	pushq	%r10
	callq	_gamma_transform_test
	addq	$32, %rsp
	movq	%r13, %rdi
	callq	_fail
	testq	%rax, %rax
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	20(%r13), %r8d
	movq	8(%r13), %rax
	movl	(%rax,%r12,4), %r9d
	leal	1(%r9), %ecx
	cmpl	$3, %ecx
	cmovael	%r14d, %r9d
	movl	(%rax,%rbx,4), %r10d
	movl	16(%r13), %eax
	movq	%r13, %rdi
	movl	$2, %esi
	movl	$16, %edx
	xorl	%ecx, %ecx
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	$1
	pushq	%rax
	pushq	$11
	pushq	%r10
	callq	_gamma_transform_test
	addq	$32, %rsp
	movq	%r13, %rdi
	callq	_fail
	testq	%rax, %rax
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	20(%r13), %r8d
	movq	8(%r13), %rax
	movl	(%rax,%r12,4), %r9d
	leal	1(%r9), %ecx
	cmpl	$3, %ecx
	cmovael	%r14d, %r9d
	movl	(%rax,%rbx,4), %r10d
	movl	16(%r13), %eax
	movq	%r13, %rdi
	movl	$4, %esi
	movl	$16, %edx
	xorl	%ecx, %ecx
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	$1
	pushq	%rax
	pushq	$11
	pushq	%r10
	callq	_gamma_transform_test
	addq	$32, %rsp
	movq	%r13, %rdi
	callq	_fail
	testq	%rax, %rax
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	20(%r13), %r8d
	movq	8(%r13), %rax
	movl	(%rax,%r12,4), %r9d
	leal	1(%r9), %ecx
	cmpl	$3, %ecx
	cmovael	%r14d, %r9d
	movl	(%rax,%rbx,4), %r10d
	movl	16(%r13), %eax
	movq	%r13, %rdi
	movl	$6, %esi
	movl	$16, %edx
	xorl	%ecx, %ecx
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	$1
	pushq	%rax
	pushq	$11
	pushq	%r10
	callq	_gamma_transform_test
	addq	$32, %rsp
	movq	%r13, %rdi
	callq	_fail
	testq	%rax, %rax
	je	LBB0_10
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_GAMMA_THRESHOLD,8,3        ## @PNG_GAMMA_THRESHOLD
	.comm	_SBIT_16_TO_8,4,2               ## @SBIT_16_TO_8
	.no_dead_strip	_perform_gamma_scale16_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_scale16_tests
_perform_gamma_scale16_tests:           ; @perform_gamma_scale16_tests
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_12
; %bb.1:
	mov	x19, x0
	mov	x20, #0
	mov	w21, #1
Lloh0:
	adrp	x22, _PNG_GAMMA_THRESHOLD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PNG_GAMMA_THRESHOLD@GOTPAGEOFF]
	mov	w8, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, uxtw
	b.hs	LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x23, x23, #1
	ldr	w8, [x19]
	cmp	x23, x8
	b.hs	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x20, x23
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x19, #8]
	ldr	w9, [x8, x23, lsl #2]
	ldr	w8, [x8, x20, lsl #2]
	sdiv	w8, w9, w8
	sub	w0, w8, #1
	bl	_fabs
	ldr	x8, [x22]
	cmp	x0, x8
	b.lt	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x19, #8]
	ldr	w9, [x8, x20, lsl #2]
	add	w10, w9, #1
	cmp	w10, #3
	csel	w5, w9, wzr, lo
	ldr	w6, [x8, x23, lsl #2]
	ldp	w8, w4, [x19, #16]
	stp	w8, w21, [sp]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	mov	w3, #0
	mov	w7, #11
	bl	_gamma_transform_test
	mov	x0, x19
	bl	_fail
	cbnz	x0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x19, #8]
	ldr	w9, [x8, x20, lsl #2]
	add	w10, w9, #1
	cmp	w10, #3
	csel	w5, w9, wzr, lo
	ldr	w6, [x8, x23, lsl #2]
	ldp	w8, w4, [x19, #16]
	stp	w8, w21, [sp]
	mov	x0, x19
	mov	w1, #2
	mov	w2, #16
	mov	w3, #0
	mov	w7, #11
	bl	_gamma_transform_test
	mov	x0, x19
	bl	_fail
	cbnz	x0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x19, #8]
	ldr	w9, [x8, x20, lsl #2]
	add	w10, w9, #1
	cmp	w10, #3
	csel	w5, w9, wzr, lo
	ldr	w6, [x8, x23, lsl #2]
	ldp	w8, w4, [x19, #16]
	stp	w8, w21, [sp]
	mov	x0, x19
	mov	w1, #4
	mov	w2, #16
	mov	w3, #0
	mov	w7, #11
	bl	_gamma_transform_test
	mov	x0, x19
	bl	_fail
	cbnz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x19, #8]
	ldr	w9, [x8, x20, lsl #2]
	add	w10, w9, #1
	cmp	w10, #3
	csel	w5, w9, wzr, lo
	ldr	w6, [x8, x23, lsl #2]
	ldp	w8, w4, [x19, #16]
	stp	w8, w21, [sp]
	mov	x0, x19
	mov	w1, #6
	mov	w2, #16
	mov	w3, #0
	mov	w7, #11
	bl	_gamma_transform_test
	mov	x0, x19
	bl	_fail
	cbz	x0, LBB0_5
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_GAMMA_THRESHOLD,8,3        ; @PNG_GAMMA_THRESHOLD
	.comm	_SBIT_16_TO_8,4,2               ; @SBIT_16_TO_8
	.no_dead_strip	_perform_gamma_scale16_tests
.subsections_via_symbols
