	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scale_gamma
_scale_gamma:                           ## @scale_gamma
	.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	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_dc_fixpt_from_int
	movl	%eax, %r13d
	movl	$65280, %edi                    ## imm = 0xFF00
	callq	_dc_fixpt_from_int
	movl	%eax, %r14d
	movslq	(%r15), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movl	%r14d, %edi
	callq	_dc_fixpt_lt
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movl	%r14d, %edi
	callq	_dc_fixpt_lt
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movl	%r14d, %edi
	callq	_dc_fixpt_lt
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jne	LBB0_1
## %bb.5:
	movl	%r14d, %r13d
LBB0_6:
	movq	%r12, %r14
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	movl	%r13d, %esi
	callq	_dc_fixpt_div
	movq	%rax, 16(%r12)
	movq	16(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	movl	%r13d, %esi
	callq	_dc_fixpt_div
	movq	%rax, 8(%r12)
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	movl	%r13d, %esi
	callq	_dc_fixpt_div
	movq	%rax, (%r12)
	addq	$24, %r12
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jne	LBB0_7
## %bb.8:
	leaq	(%r14,%r14,2), %r15
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	shrq	$32, %rbx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-8(%r14,%r15,8), %rdi
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	callq	_dc_fixpt_mul
	movq	%rax, 16(%r12)
	movq	-16(%r14,%r15,8), %rdi
	movl	%r13d, %esi
	callq	_dc_fixpt_mul
	movq	%rax, 8(%r12)
	movq	-24(%r14,%r15,8), %rdi
	movl	%r13d, %esi
	callq	_dc_fixpt_mul
	movq	%rax, (%r12)
	movq	-8(%r14,%r15,8), %rdi
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, 40(%r12)
	movq	-16(%r14,%r15,8), %rdi
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, 32(%r12)
	movq	-24(%r14,%r15,8), %rdi
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, 24(%r12)
	movq	-8(%r14,%r15,8), %rdi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, 64(%r12)
	movq	-16(%r14,%r15,8), %rdi
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, 56(%r12)
	movq	-24(%r14,%r15,8), %rdi
	movl	%ebx, %esi
	callq	_dc_fixpt_mul
	movq	%rax, 48(%r12)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_scale_gamma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scale_gamma
_scale_gamma:                           ; @scale_gamma
	.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	w0, #65535
	bl	_dc_fixpt_from_int
	mov	x23, x0
	mov	w0, #65280
	bl	_dc_fixpt_from_int
	mov	x24, x0
	mov	x27, #0
	ldrsw	x26, [x22]
	mov	w25, w0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #24]
	ldr	w1, [x8, x27, lsl #2]
	mov	x0, x25
	bl	_dc_fixpt_lt
	cbnz	x0, LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x22, #16]
	ldr	w1, [x8, x27, lsl #2]
	mov	x0, x25
	bl	_dc_fixpt_lt
	cbnz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x22, #8]
	ldr	w1, [x8, x27, lsl #2]
	mov	x0, x25
	bl	_dc_fixpt_lt
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x27, x27, #1
	ldrsw	x8, [x22]
	cmp	x27, x8
	b.ne	LBB0_1
; %bb.5:
	mov	x23, x24
LBB0_6:
	mov	x25, #0
	mov	w23, w23
	add	x24, x21, #32
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #24]
	lsl	x27, x25, #2
	ldr	w0, [x8, x27]
	mov	x1, x23
	bl	_dc_fixpt_div
	stur	x0, [x24, #-16]
	ldr	x8, [x22, #16]
	ldr	w0, [x8, x27]
	mov	x1, x23
	bl	_dc_fixpt_div
	stur	x0, [x24, #-24]
	ldr	x8, [x22, #8]
	ldr	w0, [x8, x27]
	mov	x1, x23
	bl	_dc_fixpt_div
	stur	x0, [x24, #-32]
	add	x25, x25, #1
	ldrsw	x8, [x22]
	add	x24, x24, #24
	cmp	x25, x8
	b.ne	LBB0_7
; %bb.8:
	mov	w8, #24
	madd	x22, x26, x8, x21
	lsr	x21, x19, #32
	ldur	x0, [x22, #-8]
	mov	x1, x20
	bl	_dc_fixpt_mul
	stur	x0, [x24, #-16]
	ldur	x0, [x22, #-16]
	mov	x1, x20
	bl	_dc_fixpt_mul
	stur	x0, [x24, #-24]
	ldur	x0, [x22, #-24]
	mov	x1, x20
	bl	_dc_fixpt_mul
	stur	x0, [x24, #-32]
	ldur	x0, [x22, #-8]
	mov	x1, x21
	bl	_dc_fixpt_mul
	str	x0, [x24, #8]
	ldur	x0, [x22, #-16]
	mov	x1, x21
	bl	_dc_fixpt_mul
	str	x0, [x24]
	ldur	x0, [x22, #-24]
	mov	x1, x21
	bl	_dc_fixpt_mul
	stur	x0, [x24, #-8]
	ldur	x0, [x22, #-8]
	mov	x1, x19
	bl	_dc_fixpt_mul
	str	x0, [x24, #32]
	ldur	x0, [x22, #-16]
	mov	x1, x19
	bl	_dc_fixpt_mul
	str	x0, [x24, #24]
	ldur	x0, [x22, #-24]
	mov	x1, x19
	bl	_dc_fixpt_mul
	str	x0, [x24, #16]
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_scale_gamma
.subsections_via_symbols
