	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_custom_gamma_mapping_coefficients_worker
_build_custom_gamma_mapping_coefficients_worker: ## @build_custom_gamma_mapping_coefficients_worker
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r13
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -120(%rbp)                ## 8-byte Spill
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	leaq	48(%rsi), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	%r9, -128(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_dc_fixpt_zero@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_20:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 20(%r15)
	movq	-80(%rbp), %rax
	movq	%rax, (%r15)
	movq	-72(%rbp), %rax
	movq	%rax, 8(%r15)
	movl	-44(%rbp), %eax
	movl	%eax, 16(%r15)
	incq	%r14
	addq	$72, -112(%rbp)                 ## 8-byte Folded Spill
	addq	$12, %rdx
	cmpq	%r13, %r14
	ja	LBB0_21
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, -136(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	_CHANNEL_NAME_RED@GOTPCREL(%rip), %rax
	cmpl	%r8d, (%rax)
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%r14,%r14,2), %rax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rax
	addq	$8, %rax
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rdx, %rax
	movq	_CHANNEL_NAME_GREEN@GOTPCREL(%rip), %rcx
	cmpl	%r8d, (%rcx)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%r14,%r14,2), %rax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rax
	addq	$4, %rax
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rax), %r12d
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	movl	%r8d, %ebx
	movl	%r8d, %ecx
	leaq	-136(%rbp), %r8
	leaq	-80(%rbp), %r9
	leaq	-44(%rbp), %rax
	pushq	%rax
	leaq	-72(%rbp), %rax
	pushq	%rax
	callq	_find_software_points
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_23
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-80(%rbp), %rax
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rdx
	addq	$3, %rdx
	cmpq	%rdx, %rax
	jae	LBB0_23
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-72(%rbp), %rcx
	cmpq	%rdx, %rcx
	jae	LBB0_23
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %r8d
	movq	_CHANNEL_NAME_RED@GOTPCREL(%rip), %rdx
	cmpl	%ebx, (%rdx)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%rax,%rax,2), %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rax,4), %rax
	addq	$8, %rax
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rdx,%rcx,4), %rcx
	addq	$8, %rcx
	movq	-112(%rbp), %r15                ## 8-byte Reload
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_CHANNEL_NAME_GREEN@GOTPCREL(%rip), %rdx
	cmpl	%r8d, (%rdx)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%r14,%r14,8), %rdx
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rdx,8), %r15
	addq	$24, %r15
	leaq	(%rax,%rax,2), %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rax,4), %rax
	addq	$4, %rax
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rdx,%rcx,4), %rcx
	addq	$4, %rcx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%r14,%r14,8), %rdx
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rdx,8), %r15
	leaq	(%rax,%rax,2), %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rax,4), %rax
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rdx,%rcx,4), %rcx
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %edx
	movq	_HW_POINT_POSITION_MIDDLE@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rcx), %ecx
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	movl	(%rax), %r13d
	movl	%r12d, %edi
	movl	%r13d, %esi
	callq	_dc_fixpt_sub
	movl	%eax, %r12d
	movl	-84(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %esi
	movq	-128(%rbp), %r13                ## 8-byte Reload
	callq	_dc_fixpt_sub
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_dc_fixpt_div
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_HW_POINT_POSITION_LEFT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_HW_POINT_POSITION_RIGHT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$2, %edi
	callq	_dc_fixpt_from_int
LBB0_19:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %r8d
	jmp	LBB0_20
LBB0_23:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_BREAK_TO_DEBUGGER
	jmp	LBB0_22
LBB0_21:
	movl	$1, %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$104, %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	_HW_POINT_POSITION_MIDDLE,4,2   ## @HW_POINT_POSITION_MIDDLE
	.comm	_HW_POINT_POSITION_LEFT,4,2     ## @HW_POINT_POSITION_LEFT
	.comm	_dc_fixpt_zero,4,2              ## @dc_fixpt_zero
	.comm	_HW_POINT_POSITION_RIGHT,4,2    ## @HW_POINT_POSITION_RIGHT
	.no_dead_strip	_build_custom_gamma_mapping_coefficients_worker
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_custom_gamma_mapping_coefficients_worker
_build_custom_gamma_mapping_coefficients_worker: ; @build_custom_gamma_mapping_coefficients_worker
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	stp	x5, x0, [sp, #32]               ; 16-byte Folded Spill
	mov	x26, x4
	mov	x24, x3
	mov	x23, x2
	mov	x28, #0
	str	x1, [sp, #16]                   ; 8-byte Folded Spill
	add	x19, x1, #48
Lloh0:
	adrp	x27, _CHANNEL_NAME_RED@GOTPAGE
Lloh1:
	ldr	x27, [x27, _CHANNEL_NAME_RED@GOTPAGEOFF]
	mov	w20, #12
Lloh2:
	adrp	x21, _HW_POINT_POSITION_MIDDLE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _HW_POINT_POSITION_MIDDLE@GOTPAGEOFF]
	str	x2, [sp, #24]                   ; 8-byte Folded Spill
	str	w4, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w26, [x9]
	mov	x20, x27
	ldr	w27, [x8]
	mov	x0, x25
	mov	x1, x27
	bl	_dc_fixpt_sub
	mov	x25, x0
	mov	x0, x26
	ldr	w26, [sp, #12]                  ; 4-byte Folded Reload
	mov	x1, x27
	mov	x27, x20
	mov	w20, #12
	bl	_dc_fixpt_sub
	mov	x1, x0
	mov	x0, x25
	bl	_dc_fixpt_div
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	x9, x8, [sp, #56]
	stp	x8, x9, [x22]
	ldr	w8, [sp, #52]
	stp	w8, w0, [x22, #16]
	add	x28, x28, #1
	add	x19, x19, #72
	add	x23, x23, #12
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	cmp	x28, x8
	b.hi	LBB0_19
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	stp	xzr, xzr, [sp, #64]
	str	xzr, [sp, #56]
	ldr	w8, [x27]
	cmp	w8, w26
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	madd	x8, x28, x20, x8
	add	x8, x8, #8
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh4:
	adrp	x8, _CHANNEL_NAME_GREEN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CHANNEL_NAME_GREEN@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x8]
	mov	x8, x23
	cmp	w9, w26
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	madd	x8, x28, x20, x8
	add	x8, x8, #4
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w25, [x8]
	add	x4, sp, #72
	add	x5, sp, #64
	add	x6, sp, #56
	add	x7, sp, #52
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	mov	x1, x24
	mov	x2, x25
	mov	x3, x26
	bl	_find_software_points
	cbz	w0, LBB0_18
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #64]
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	ldr	x9, [x9]
	add	x10, x9, #3
	cmp	x8, x10
	b.hs	LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [sp, #56]
	cmp	x9, x10
	b.hs	LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x27]
	cmp	w10, w26
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	madd	x8, x8, x20, x24
	add	x8, x8, #8
	madd	x9, x9, x20, x24
	add	x9, x9, #8
	mov	x22, x19
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh7:
	adrp	x10, _CHANNEL_NAME_GREEN@GOTPAGE
Lloh8:
	ldr	x10, [x10, _CHANNEL_NAME_GREEN@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	cmp	w10, w26
	ldr	x13, [sp, #16]                  ; 8-byte Folded Reload
	mov	w14, #72
	madd	x10, x28, x14, x13
	madd	x11, x8, x20, x24
	madd	x12, x9, x20, x24
	madd	x13, x28, x14, x13
	add	x13, x13, #24
	madd	x8, x8, x20, x24
	add	x8, x8, #4
	madd	x9, x9, x20, x24
	add	x9, x9, #4
	csel	x22, x10, x13, ne
	csel	x8, x11, x8, ne
	csel	x9, x12, x9, ne
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [sp, #52]
	ldr	w11, [x21]
	cmp	w10, w11
	b.eq	LBB0_1
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
Lloh10:
	adrp	x8, _HW_POINT_POSITION_LEFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HW_POINT_POSITION_LEFT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w10, w8
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
Lloh13:
	adrp	x8, _dc_fixpt_zero@GOTPAGE
Lloh14:
	ldr	x8, [x8, _dc_fixpt_zero@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	b	LBB0_2
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh16:
	adrp	x8, _HW_POINT_POSITION_RIGHT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HW_POINT_POSITION_RIGHT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w10, w8
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #2
	bl	_dc_fixpt_from_int
	b	LBB0_2
LBB0_18:
	bl	_BREAK_TO_DEBUGGER
	mov	w0, #0
	b	LBB0_20
LBB0_19:
	mov	w0, #1
LBB0_20:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CHANNEL_NAME_RED,4,2           ; @CHANNEL_NAME_RED
	.comm	_CHANNEL_NAME_GREEN,4,2         ; @CHANNEL_NAME_GREEN
	.comm	_HW_POINT_POSITION_MIDDLE,4,2   ; @HW_POINT_POSITION_MIDDLE
	.comm	_HW_POINT_POSITION_LEFT,4,2     ; @HW_POINT_POSITION_LEFT
	.comm	_dc_fixpt_zero,4,2              ; @dc_fixpt_zero
	.comm	_HW_POINT_POSITION_RIGHT,4,2    ; @HW_POINT_POSITION_RIGHT
	.no_dead_strip	_build_custom_gamma_mapping_coefficients_worker
.subsections_via_symbols
