	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scale_user_regamma_ramp
_scale_user_regamma_ramp:               ## @scale_user_regamma_ramp
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	_GAMMA_RGB_256_ENTRIES@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	(%rsi), %rax
	xorl	%edx, %edx
	movw	$-1, %cx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movzwl	(%rax,%rdx,2), %esi
	cmpl	$65280, %esi                    ## imm = 0xFF00
	ja	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movzwl	512(%rax,%rdx,2), %esi
	cmpl	$65280, %esi                    ## imm = 0xFF00
	ja	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movzwl	1024(%rax,%rdx,2), %esi
	cmpl	$65280, %esi                    ## imm = 0xFF00
	ja	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rdx
	cmpq	%rdx, %rbx
	jne	LBB0_1
## %bb.5:
	movw	$-256, %cx
LBB0_6:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	leaq	88(%rdi), %r14
	xorl	%r15d, %r15d
	movzwl	%cx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movzwl	(%rax,%r15,2), %edi
	movl	%ebx, %esi
	callq	_dc_fixpt_from_fraction
	movq	%rax, -72(%r14)
	movq	(%r13), %rax
	movzwl	512(%rax,%r15,2), %edi
	movl	%ebx, %esi
	callq	_dc_fixpt_from_fraction
	movq	%rax, -80(%r14)
	movq	(%r13), %rax
	movzwl	1024(%rax,%r15,2), %edi
	movl	%ebx, %esi
	callq	_dc_fixpt_from_fraction
	movq	%rax, -88(%r14)
	incq	%r15
	movl	(%r12), %eax
	cmpq	%rax, %r15
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r13), %rax
	addq	$24, %r14
	jmp	LBB0_7
LBB0_9:
	movslq	-64(%rbp), %rax                 ## 4-byte Folded Reload
	leaq	(%rax,%rax,2), %r13
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	shrq	$32, %rbx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-8(%r15,%r13,8), %rdi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	callq	_dc_fixpt_mul
	movq	%rax, -48(%r14)
	movq	-16(%r15,%r13,8), %rdi
	movl	%r12d, %esi
	callq	_dc_fixpt_mul
	movq	%rax, -56(%r14)
	movq	-24(%r15,%r13,8), %rdi
	movl	%r12d, %esi
	callq	_dc_fixpt_mul
	movq	%rax, -64(%r14)
	movq	-8(%r15,%r13,8), %rdi
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, -24(%r14)
	movq	-16(%r15,%r13,8), %rdi
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, -32(%r14)
	movq	-24(%r15,%r13,8), %rdi
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, -40(%r14)
	movq	-8(%r15,%r13,8), %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, (%r14)
	movq	-16(%r15,%r13,8), %rdi
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, -8(%r14)
	movq	-24(%r15,%r13,8), %rdi
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, -16(%r14)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GAMMA_RGB_256_ENTRIES,4,2      ## @GAMMA_RGB_256_ENTRIES
	.no_dead_strip	_scale_user_regamma_ramp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scale_user_regamma_ramp
_scale_user_regamma_ramp:               ; @scale_user_regamma_ramp
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.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	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	mov	x9, #0
	ldr	x8, [x1]
Lloh0:
	adrp	x26, _GAMMA_RGB_256_ENTRIES@GOTPAGE
Lloh1:
	ldr	x26, [x26, _GAMMA_RGB_256_ENTRIES@GOTPAGEOFF]
	ldr	w25, [x26]
	mov	w10, #65280
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldrh	w11, [x8, x9, lsl #1]
	cmp	w11, w10
	b.hi	LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x11, x8, x9, lsl #1
	ldrh	w12, [x11, #512]
	cmp	w12, w10
	b.hi	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrh	w11, [x11, #1024]
	cmp	w11, w10
	b.hi	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x9, x9, #1
	cmp	x25, x9
	b.ne	LBB0_1
; %bb.5:
	mov	w23, #65280
	b	LBB0_7
LBB0_6:
	mov	w23, #65535
LBB0_7:
	mov	x27, #0
	add	x24, x21, #48
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x28, x27, #1
	ldrh	w0, [x8, x28]
	mov	x1, x23
	bl	_dc_fixpt_from_fraction
	stur	x0, [x24, #-32]
	ldr	x8, [x22]
	add	x8, x8, x28
	ldrh	w0, [x8, #512]
	mov	x1, x23
	bl	_dc_fixpt_from_fraction
	stur	x0, [x24, #-40]
	ldr	x8, [x22]
	add	x8, x8, x28
	ldrh	w0, [x8, #1024]
	mov	x1, x23
	bl	_dc_fixpt_from_fraction
	stur	x0, [x24, #-48]
	add	x27, x27, #1
	ldr	w8, [x26]
	cmp	x27, x8
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x22]
	add	x24, x24, #24
	b	LBB0_8
LBB0_10:
	mov	w8, #24
	smaddl	x22, w25, w8, x21
	lsr	x21, x19, #32
	ldur	x0, [x22, #-8]
	mov	x1, x20
	bl	_dc_fixpt_mul
	stur	x0, [x24, #-8]
	ldur	x0, [x22, #-16]
	mov	x1, x20
	bl	_dc_fixpt_mul
	stur	x0, [x24, #-16]
	ldur	x0, [x22, #-24]
	mov	x1, x20
	bl	_dc_fixpt_mul
	stur	x0, [x24, #-24]
	ldur	x0, [x22, #-8]
	mov	x1, x21
	bl	_dc_fixpt_mul
	str	x0, [x24, #16]
	ldur	x0, [x22, #-16]
	mov	x1, x21
	bl	_dc_fixpt_mul
	str	x0, [x24, #8]
	ldur	x0, [x22, #-24]
	mov	x1, x21
	bl	_dc_fixpt_mul
	str	x0, [x24]
	ldur	x0, [x22, #-8]
	mov	x1, x19
	bl	_dc_fixpt_mul
	str	x0, [x24, #40]
	ldur	x0, [x22, #-16]
	mov	x1, x19
	bl	_dc_fixpt_mul
	str	x0, [x24, #32]
	ldur	x0, [x22, #-24]
	mov	x1, x19
	bl	_dc_fixpt_mul
	str	x0, [x24, #24]
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GAMMA_RGB_256_ENTRIES,4,2      ; @GAMMA_RGB_256_ENTRIES
	.no_dead_strip	_scale_user_regamma_ramp
.subsections_via_symbols
