	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calculate_interpolated_hardware_curve
_calculate_interpolated_hardware_curve: ## @calculate_interpolated_hardware_curve
	.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
	movq	%r8, %r14
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rcx, %rdx
	movq	%r8, %rcx
	xorl	%r8d, %r8d
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	callq	_build_custom_gamma_mapping_coefficients_worker
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r14, %rcx
	movl	$1, %r8d
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_build_custom_gamma_mapping_coefficients_worker
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	movq	%rbx, %rdi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r14, %rcx
	movl	$2, %r8d
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_build_custom_gamma_mapping_coefficients_worker
	testl	%eax, %eax
	movl	$0, %eax
	je	LBB0_9
## %bb.3:
	movl	$1, %eax
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	js	LBB0_9
## %bb.4:
	movq	16(%rbp), %r12
	movl	(%rbx), %r14d
	addl	$2, %r14d
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	leaq	4(,%rax,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15), %rbx
	movq	_CHANNEL_NAME_RED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %ecx
	callq	_calculate_mapped_value
	movq	16(%r12), %rcx
	movq	%rax, (%rcx,%r15,2)
	movq	_CHANNEL_NAME_GREEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %ecx
	callq	_calculate_mapped_value
	movq	8(%r12), %rcx
	movq	%rax, (%rcx,%r15,2)
	movq	_CHANNEL_NAME_BLUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %ecx
	callq	_calculate_mapped_value
	movq	(%r12), %rcx
	movq	%rax, (%rcx,%r15,2)
	addq	$4, %r15
	cmpq	%r15, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_5
## %bb.6:
	movl	$1, %eax
	jmp	LBB0_9
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHANNEL_NAME_RED,4,2           ## @CHANNEL_NAME_RED
	.comm	_CHANNEL_NAME_GREEN,4,2         ## @CHANNEL_NAME_GREEN
	.comm	_CHANNEL_NAME_BLUE,4,2          ## @CHANNEL_NAME_BLUE
	.no_dead_strip	_calculate_interpolated_hardware_curve
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calculate_interpolated_hardware_curve
_calculate_interpolated_hardware_curve: ; @calculate_interpolated_hardware_curve
	.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	x19, x6
	mov	x23, x5
	mov	x24, x4
	mov	x25, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	x2, x3
	mov	x3, x4
	mov	w4, #0
	bl	_build_custom_gamma_mapping_coefficients_worker
	cbz	w0, LBB0_7
; %bb.1:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x25
	mov	x3, x24
	mov	w4, #1
	mov	x5, x23
	bl	_build_custom_gamma_mapping_coefficients_worker
	cbz	w0, LBB0_7
; %bb.2:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x25
	mov	x3, x24
	mov	w4, #2
	mov	x5, x23
	bl	_build_custom_gamma_mapping_coefficients_worker
	cbz	w0, LBB0_7
; %bb.3:
	tbnz	w23, #31, LBB0_6
; %bb.4:
	mov	x24, #0
	ldr	w8, [x22]
	add	w22, w8, #2
	add	w8, w23, #1
	lsl	x23, x8, #3
Lloh0:
	adrp	x25, _CHANNEL_NAME_RED@GOTPAGE
Lloh1:
	ldr	x25, [x25, _CHANNEL_NAME_RED@GOTPAGEOFF]
Lloh2:
	adrp	x26, _CHANNEL_NAME_GREEN@GOTPAGE
Lloh3:
	ldr	x26, [x26, _CHANNEL_NAME_GREEN@GOTPAGEOFF]
Lloh4:
	adrp	x27, _CHANNEL_NAME_BLUE@GOTPAGE
Lloh5:
	ldr	x27, [x27, _CHANNEL_NAME_BLUE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x25]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x22
	bl	_calculate_mapped_value
	ldr	x8, [x19, #16]
	str	x0, [x8, x24]
	ldr	w2, [x26]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x22
	bl	_calculate_mapped_value
	ldr	x8, [x19, #8]
	str	x0, [x8, x24]
	ldr	w2, [x27]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x22
	bl	_calculate_mapped_value
	ldr	x8, [x19]
	str	x0, [x8, x24]
	add	x21, x21, #4
	add	x24, x24, #8
	cmp	x23, x24
	b.ne	LBB0_5
LBB0_6:
	mov	w0, #1
LBB0_7:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CHANNEL_NAME_RED,4,2           ; @CHANNEL_NAME_RED
	.comm	_CHANNEL_NAME_GREEN,4,2         ; @CHANNEL_NAME_GREEN
	.comm	_CHANNEL_NAME_BLUE,4,2          ; @CHANNEL_NAME_BLUE
	.no_dead_strip	_calculate_interpolated_hardware_curve
.subsections_via_symbols
