	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mod_color_calculate_degamma_params ## -- Begin function mod_color_calculate_degamma_params
	.p2align	4, 0x90
_mod_color_calculate_degamma_params:    ## @mod_color_calculate_degamma_params
	.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	(%rdi), %rax
	movq	_TF_TYPE_BYPASS@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_36
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_TRANSFER_FUNCTION_SRGB@GOTPCREL(%rip), %rsi
	movq	_TF_TYPE_PREDEFINED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.2:
	movq	8(%r12), %rax
	cmpq	(%rsi), %rax
	jne	LBB0_5
## %bb.3:
	testl	%edx, %edx
	jne	LBB0_7
## %bb.4:
	movl	$1, %r14d
	jmp	LBB0_36
LBB0_5:
	testl	%edx, %edx
	jne	LBB0_7
## %bb.6:
	movq	_TRANSFER_FUNCTION_LINEAR@GOTPCREL(%rip), %rcx
	movl	$1, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_36
LBB0_7:
	movq	_TF_TYPE_DISTRIBUTED_POINTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	testl	%edx, %edx
	setne	%al
	testq	%r15, %r15
	setne	%bl
	andb	%al, %bl
	xorl	%eax, %eax
	cmpb	$1, %bl
	jne	LBB0_12
## %bb.8:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	_GAMMA_RGB_256@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.9:
	movq	__EXTRA_POINTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	$12, %esi
	callq	_kvcalloc
	movq	%rax, %rcx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_36
## %bb.10:
	movq	__EXTRA_POINTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	movl	(%r13), %edx
	movl	$12, %esi
	callq	_kvcalloc
	testq	%rax, %rax
	je	LBB0_37
## %bb.11:
	movq	%rax, %r14
	movb	%bl, -41(%rbp)                  ## 1-byte Spill
	movl	$3, %edi
	movl	$2, %esi
	callq	_dc_fixpt_from_fraction
	movq	%rax, -96(%rbp)
	movl	$2, %edi
	callq	_dc_fixpt_from_int
	movl	%eax, -104(%rbp)
	movl	$5, %edi
	movl	$2, %esi
	callq	_dc_fixpt_from_fraction
	movq	%rax, -112(%rbp)
	movq	8(%r15), %rsi
	movq	-96(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-112(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	%r14, %rdi
	callq	_build_evenly_distributed_points
	movq	-96(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-112(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	callq	_scale_gamma
	jmp	LBB0_14
LBB0_12:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movb	%bl, -41(%rbp)                  ## 1-byte Spill
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_13:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movb	%bl, -41(%rbp)                  ## 1-byte Spill
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
LBB0_14:
	movq	_MAX_HW_POINTS@GOTPCREL(%rip), %rbx
	movq	__EXTRA_POINTS@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	(%rbx), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$12, %esi
	callq	_kvcalloc
	testq	%rax, %rax
	je	LBB0_34
## %bb.15:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rdi
	addq	(%rbx), %rdi
	movl	(%r15), %edx
	movl	$12, %esi
	callq	_kvcalloc
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movq	8(%r12), %rcx
	movq	_TRANSFER_FUNCTION_PQ@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_19
## %bb.17:
	movq	(%rbx), %rsi
	movq	_coordinates_x@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_build_de_pq
	movb	-41(%rbp), %r10b                ## 1-byte Reload
	jmp	LBB0_28
LBB0_18:
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_33
LBB0_19:
	movl	%ecx, %eax
	movq	_TRANSFER_FUNCTION_SRGB@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	movb	-41(%rbp), %r10b                ## 1-byte Reload
	je	LBB0_26
## %bb.20:
	movq	_TRANSFER_FUNCTION_BT709@GOTPCREL(%rip), %rdx
	cmpl	%ecx, (%rdx)
	je	LBB0_26
## %bb.21:
	movq	_TRANSFER_FUNCTION_GAMMA22@GOTPCREL(%rip), %rdx
	cmpl	%ecx, (%rdx)
	je	LBB0_26
## %bb.22:
	movq	_TRANSFER_FUNCTION_GAMMA24@GOTPCREL(%rip), %rdx
	cmpl	%ecx, (%rdx)
	je	LBB0_26
## %bb.23:
	movq	_TRANSFER_FUNCTION_GAMMA26@GOTPCREL(%rip), %rdx
	cmpl	%ecx, (%rdx)
	je	LBB0_26
## %bb.24:
	movq	_TRANSFER_FUNCTION_HLG@GOTPCREL(%rip), %rdx
	cmpl	%ecx, (%rdx)
	jne	LBB0_38
## %bb.25:
	movq	(%rbx), %rsi
	movq	_coordinates_x@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	$80, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	movl	%r10d, %r15d
	callq	_build_hlg_degamma
	jmp	LBB0_27
LBB0_26:
	movq	(%rbx), %rsi
	movq	_coordinates_x@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r10d, %r15d
	callq	_build_degamma
LBB0_27:
	movl	%r15d, %r10d
LBB0_28:
	leaq	16(%r12), %r15
	movq	$0, 32(%r12)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 16(%r12)
	movl	$1, 24(%r12)
	movq	_coordinates_x@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rbx, %r12
	movq	(%rbx), %rax
	xorl	%edx, %edx
	testb	%r10b, %r10b
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_30
## %bb.29:
	movq	(%rbx), %rsi
	movq	_GAMMA_RGB_256@GOTPCREL(%rip), %rdi
	xorl	%edx, %edx
	cmpq	(%rdi), %rsi
	sete	%dl
LBB0_30:
	movl	%edx, 16(%rsp)
	movq	%r15, 8(%rsp)
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %r8
	movq	%r13, %r9
	callq	_map_regamma_hw_to_x_user
	movq	(%rbx), %rax
	movq	_GAMMA_CUSTOM@GOTPCREL(%rip), %rcx
	movl	$1, %edx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	cmpq	(%rcx), %rax
	jne	LBB0_32
## %bb.31:
	movq	(%r12), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_apply_lut_1d
LBB0_32:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_kvfree
LBB0_33:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kvfree
LBB0_34:
	movq	%r14, %rdi
	callq	_kvfree
	movq	-72(%rbp), %r14                 ## 8-byte Reload
LBB0_35:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_kvfree
                                        ## kill: def $r14d killed $r14d killed $r14 def $r14
LBB0_36:
	movl	%r14d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_37:
	xorl	%r14d, %r14d
	jmp	LBB0_35
LBB0_38:
	movq	_TRANSFER_FUNCTION_LINEAR@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	cmpq	(%rcx), %rax
	jne	LBB0_32
## %bb.39:
	movq	(%rbx), %rdx
	cmpq	$-1, %rdx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_28
## %bb.40:
	movq	_coordinates_x@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	1(%rdx), %r8
	testq	%rdx, %rdx
	je	LBB0_43
## %bb.41:
	movq	%r8, %rsi
	andq	$-2, %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$20, %rdi
	xorl	%edx, %edx
LBB0_42:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdx,4), %ecx
	movl	%ecx, -20(%rdi)
	movl	%ecx, -12(%rdi)
	movl	%ecx, -16(%rdi)
	movl	4(%rax,%rdx,4), %ecx
	movl	%ecx, -8(%rdi)
	movl	%ecx, (%rdi)
	movl	%ecx, -4(%rdi)
	addq	$2, %rdx
	addq	$24, %rdi
	cmpq	%rdx, %rsi
	jne	LBB0_42
	jmp	LBB0_44
LBB0_43:
	xorl	%edx, %edx
LBB0_44:
	testb	$1, %r8b
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_28
## %bb.45:
	movl	(%rax,%rdx,4), %eax
	leaq	(%rdx,%rdx,2), %rcx
	movl	%eax, (%r13,%rcx,4)
	movl	%eax, 8(%r13,%rcx,4)
	movl	%eax, 4(%r13,%rcx,4)
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_TRANSFER_FUNCTION_SRGB,8,3     ## @TRANSFER_FUNCTION_SRGB
	.comm	_TF_TYPE_BYPASS,8,3             ## @TF_TYPE_BYPASS
	.comm	_TF_TYPE_PREDEFINED,8,3         ## @TF_TYPE_PREDEFINED
	.comm	_TRANSFER_FUNCTION_LINEAR,8,3   ## @TRANSFER_FUNCTION_LINEAR
	.comm	_TF_TYPE_DISTRIBUTED_POINTS,8,3 ## @TF_TYPE_DISTRIBUTED_POINTS
	.comm	_GAMMA_RGB_256,8,3              ## @GAMMA_RGB_256
	.comm	__EXTRA_POINTS,8,3              ## @_EXTRA_POINTS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_MAX_HW_POINTS,8,3              ## @MAX_HW_POINTS
	.comm	_TRANSFER_FUNCTION_PQ,4,2       ## @TRANSFER_FUNCTION_PQ
	.comm	_coordinates_x,8,3              ## @coordinates_x
	.comm	_TRANSFER_FUNCTION_BT709,4,2    ## @TRANSFER_FUNCTION_BT709
	.comm	_TRANSFER_FUNCTION_GAMMA22,4,2  ## @TRANSFER_FUNCTION_GAMMA22
	.comm	_TRANSFER_FUNCTION_GAMMA24,4,2  ## @TRANSFER_FUNCTION_GAMMA24
	.comm	_TRANSFER_FUNCTION_GAMMA26,4,2  ## @TRANSFER_FUNCTION_GAMMA26
	.comm	_TRANSFER_FUNCTION_HLG,4,2      ## @TRANSFER_FUNCTION_HLG
	.comm	_GAMMA_CUSTOM,8,3               ## @GAMMA_CUSTOM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mod_color_calculate_degamma_params ; -- Begin function mod_color_calculate_degamma_params
	.p2align	2
_mod_color_calculate_degamma_params:    ; @mod_color_calculate_degamma_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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, x0
	ldr	x8, [x20], #16
Lloh0:
	adrp	x9, _TF_TYPE_BYPASS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TF_TYPE_BYPASS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_1:
	mov	w19, #0
	b	LBB0_37
LBB0_2:
	mov	x19, x1
	mov	x23, x0
Lloh3:
	adrp	x10, _TRANSFER_FUNCTION_SRGB@GOTPAGE
Lloh4:
	ldr	x10, [x10, _TRANSFER_FUNCTION_SRGB@GOTPAGEOFF]
Lloh5:
	adrp	x9, _TF_TYPE_PREDEFINED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TF_TYPE_PREDEFINED@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	ldr	x9, [x10]
	ldr	x8, [x23, #8]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	cbnz	w2, LBB0_8
	b	LBB0_7
LBB0_5:
	cbnz	w2, LBB0_8
; %bb.6:
Lloh8:
	adrp	x9, _TRANSFER_FUNCTION_LINEAR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TRANSFER_FUNCTION_LINEAR@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_7:
	mov	w19, #1
	b	LBB0_37
LBB0_8:
Lloh11:
	adrp	x8, _TF_TYPE_DISTRIBUTED_POINTS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TF_TYPE_DISTRIBUTED_POINTS@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x23]
	cmp	x19, #0
	ccmp	w2, #0, #4, ne
	cset	w25, ne
Lloh14:
	adrp	x28, __EXTRA_POINTS@GOTPAGE
Lloh15:
	ldr	x28, [x28, __EXTRA_POINTS@GOTPAGEOFF]
Lloh16:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh17:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
	b.eq	LBB0_13
; %bb.9:
	ldr	x8, [x19]
Lloh18:
	adrp	x9, _GAMMA_RGB_256@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GAMMA_RGB_256@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.10:
	ldr	x8, [x19, #8]
	ldr	x9, [x28]
	add	x0, x9, x8
	ldr	w2, [x27]
	mov	w1, #12
	bl	_kvcalloc
	cbz	x0, LBB0_1
; %bb.11:
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	x9, [x28]
	add	x0, x9, x8
	ldr	w2, [x27]
	mov	w1, #12
	bl	_kvcalloc
	cbz	x0, LBB0_38
; %bb.12:
	mov	x24, x0
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	mov	w0, #3
	mov	w1, #2
	bl	_dc_fixpt_from_fraction
	mov	x26, x0
	mov	w0, #2
	bl	_dc_fixpt_from_int
	str	w25, [sp, #20]                  ; 4-byte Folded Spill
	mov	x25, x0
	mov	w0, #5
	mov	w1, #2
	bl	_dc_fixpt_from_fraction
	mov	x21, x0
	ldr	x1, [x19, #8]
	str	x0, [sp, #24]
	str	w25, [sp, #32]
	str	x26, [sp, #40]
	add	x2, sp, #24
	mov	x22, x24
	mov	x0, x24
	bl	_build_evenly_distributed_points
	str	x21, [sp, #24]
	str	w25, [sp, #32]
	ldr	w25, [sp, #20]                  ; 4-byte Folded Reload
	str	x26, [sp, #40]
	add	x2, sp, #24
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x21, x0
	mov	x1, x19
	bl	_scale_gamma
	b	LBB0_14
LBB0_13:
	mov	x21, #0
	mov	x22, #0
LBB0_14:
Lloh21:
	adrp	x26, _MAX_HW_POINTS@GOTPAGE
Lloh22:
	ldr	x26, [x26, _MAX_HW_POINTS@GOTPAGEOFF]
	ldr	x8, [x26]
	ldr	x9, [x28]
	add	x0, x9, x8
	ldr	w2, [x27]
	mov	w1, #12
	bl	_kvcalloc
	cbz	x0, LBB0_18
; %bb.15:
	mov	x24, x0
	str	w25, [sp, #20]                  ; 4-byte Folded Spill
	ldr	x8, [x26]
	ldr	x9, [x28]
	add	x0, x9, x8
	ldr	w2, [x27]
	mov	w1, #12
	bl	_kvcalloc
	cbz	x0, LBB0_19
; %bb.16:
	mov	x25, x0
	ldr	x3, [x23, #8]
Lloh23:
	adrp	x8, _TRANSFER_FUNCTION_PQ@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TRANSFER_FUNCTION_PQ@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w8, w3
	b.ne	LBB0_20
; %bb.17:
Lloh26:
	adrp	x26, _MAX_HW_POINTS@GOTPAGE
Lloh27:
	ldr	x26, [x26, _MAX_HW_POINTS@GOTPAGEOFF]
	ldr	x1, [x26]
Lloh28:
	adrp	x8, _coordinates_x@GOTPAGE
Lloh29:
	ldr	x8, [x8, _coordinates_x@GOTPAGEOFF]
Lloh30:
	ldr	x2, [x8]
	mov	x0, x24
	bl	_build_de_pq
	b	LBB0_28
LBB0_18:
	mov	w19, #0
	b	LBB0_35
LBB0_19:
	mov	w19, #0
	b	LBB0_34
LBB0_20:
	and	x8, x3, #0xffffffff
Lloh31:
	adrp	x9, _TRANSFER_FUNCTION_SRGB@GOTPAGE
Lloh32:
	ldr	x9, [x9, _TRANSFER_FUNCTION_SRGB@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_27
; %bb.21:
Lloh34:
	adrp	x9, _TRANSFER_FUNCTION_BT709@GOTPAGE
Lloh35:
	ldr	x9, [x9, _TRANSFER_FUNCTION_BT709@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	cmp	w9, w3
	b.eq	LBB0_27
; %bb.22:
Lloh37:
	adrp	x9, _TRANSFER_FUNCTION_GAMMA22@GOTPAGE
Lloh38:
	ldr	x9, [x9, _TRANSFER_FUNCTION_GAMMA22@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	cmp	w9, w3
	b.eq	LBB0_27
; %bb.23:
Lloh40:
	adrp	x9, _TRANSFER_FUNCTION_GAMMA24@GOTPAGE
Lloh41:
	ldr	x9, [x9, _TRANSFER_FUNCTION_GAMMA24@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	cmp	w9, w3
	b.eq	LBB0_27
; %bb.24:
Lloh43:
	adrp	x9, _TRANSFER_FUNCTION_GAMMA26@GOTPAGE
Lloh44:
	ldr	x9, [x9, _TRANSFER_FUNCTION_GAMMA26@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	cmp	w9, w3
	b.eq	LBB0_27
; %bb.25:
Lloh46:
	adrp	x9, _TRANSFER_FUNCTION_HLG@GOTPAGE
Lloh47:
	ldr	x9, [x9, _TRANSFER_FUNCTION_HLG@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	cmp	w9, w3
Lloh49:
	adrp	x26, _MAX_HW_POINTS@GOTPAGE
Lloh50:
	ldr	x26, [x26, _MAX_HW_POINTS@GOTPAGEOFF]
	b.ne	LBB0_39
; %bb.26:
	ldr	x1, [x26]
Lloh51:
	adrp	x8, _coordinates_x@GOTPAGE
Lloh52:
	ldr	x8, [x8, _coordinates_x@GOTPAGEOFF]
Lloh53:
	ldr	x2, [x8]
	mov	x0, x24
	mov	w3, #80
	mov	w4, #1000
	bl	_build_hlg_degamma
	b	LBB0_28
LBB0_27:
Lloh54:
	adrp	x26, _MAX_HW_POINTS@GOTPAGE
Lloh55:
	ldr	x26, [x26, _MAX_HW_POINTS@GOTPAGEOFF]
	ldr	x1, [x26]
Lloh56:
	adrp	x8, _coordinates_x@GOTPAGE
Lloh57:
	ldr	x8, [x8, _coordinates_x@GOTPAGEOFF]
Lloh58:
	ldr	x2, [x8]
	mov	x0, x24
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_build_degamma
LBB0_28:
	str	xzr, [x23, #32]
	movi.2s	v0, #1
	str	d0, [x23, #16]
	mov	w8, #1
	str	w8, [x23, #24]
Lloh59:
	adrp	x8, _coordinates_x@GOTPAGE
Lloh60:
	ldr	x8, [x8, _coordinates_x@GOTPAGEOFF]
Lloh61:
	ldr	x3, [x8]
	ldr	x6, [x26]
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_30
; %bb.29:
	ldr	x8, [x19]
Lloh62:
	adrp	x9, _GAMMA_RGB_256@GOTPAGE
Lloh63:
	ldr	x9, [x9, _GAMMA_RGB_256@GOTPAGEOFF]
Lloh64:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
LBB0_30:
	str	w8, [sp]
	mov	x0, x19
	mov	x1, x25
	mov	x2, x21
	mov	x4, x22
	mov	x5, x24
	mov	x7, x20
	bl	_map_regamma_hw_to_x_user
	ldr	x8, [x19]
Lloh65:
	adrp	x9, _GAMMA_CUSTOM@GOTPAGE
Lloh66:
	ldr	x9, [x9, _GAMMA_CUSTOM@GOTPAGEOFF]
Lloh67:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_32
; %bb.31:
	ldr	x1, [x26]
	mov	x0, x19
	mov	x2, x20
	bl	_apply_lut_1d
LBB0_32:
	mov	w19, #1
LBB0_33:
	mov	x0, x25
	bl	_kvfree
LBB0_34:
	mov	x0, x24
	bl	_kvfree
LBB0_35:
	mov	x0, x22
	bl	_kvfree
LBB0_36:
	mov	x0, x21
	bl	_kvfree
LBB0_37:
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_38:
	mov	w19, #0
	b	LBB0_36
LBB0_39:
Lloh68:
	adrp	x9, _TRANSFER_FUNCTION_LINEAR@GOTPAGE
Lloh69:
	ldr	x9, [x9, _TRANSFER_FUNCTION_LINEAR@GOTPAGEOFF]
Lloh70:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_43
; %bb.40:
	ldr	x8, [x26]
	cmn	x8, #1
	b.eq	LBB0_28
; %bb.41:
Lloh71:
	adrp	x9, _coordinates_x@GOTPAGE
Lloh72:
	ldr	x9, [x9, _coordinates_x@GOTPAGEOFF]
Lloh73:
	ldr	x9, [x9]
	add	x11, x8, #1
	cmp	x11, #16
	b.hs	LBB0_44
; %bb.42:
	mov	x10, #0
	b	LBB0_47
LBB0_43:
	mov	w19, #0
	b	LBB0_33
LBB0_44:
	and	x10, x11, #0xfffffffffffffff0
	add	x14, x24, #96
	add	x12, x9, #32
	mov	x13, x10
LBB0_45:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q3, [x12, #-32]
	mov.16b	v1, v0
	mov.16b	v2, v0
	mov.16b	v4, v3
	mov.16b	v5, v3
	ldp	q16, q19, [x12], #64
	sub	x15, x14, #96
	sub	x16, x14, #48
	st3.4s	{ v0, v1, v2 }, [x15]
	st3.4s	{ v3, v4, v5 }, [x16]
	mov.16b	v17, v16
	mov.16b	v18, v16
	mov.16b	v20, v19
	mov.16b	v21, v19
	add	x15, x14, #192
	st3.4s	{ v16, v17, v18 }, [x14], #48
	st3.4s	{ v19, v20, v21 }, [x14]
	mov	x14, x15
	subs	x13, x13, #16
	b.ne	LBB0_45
; %bb.46:
	cmp	x11, x10
	b.eq	LBB0_28
LBB0_47:
	sub	x8, x8, x10
	add	x8, x8, #1
	add	x9, x9, x10, lsl #2
	mov	w11, #12
	mul	x10, x10, x11
	add	x10, x24, x10
	add	x10, x10, #8
LBB0_48:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9], #4
	stp	w11, w11, [x10, #-4]
	stur	w11, [x10, #-8]
	add	x10, x10, #12
	subs	x8, x8, #1
	b.ne	LBB0_48
	b	LBB0_28
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.cfi_endproc
                                        ; -- End function
	.comm	_TRANSFER_FUNCTION_SRGB,8,3     ; @TRANSFER_FUNCTION_SRGB
	.comm	_TF_TYPE_BYPASS,8,3             ; @TF_TYPE_BYPASS
	.comm	_TF_TYPE_PREDEFINED,8,3         ; @TF_TYPE_PREDEFINED
	.comm	_TRANSFER_FUNCTION_LINEAR,8,3   ; @TRANSFER_FUNCTION_LINEAR
	.comm	_TF_TYPE_DISTRIBUTED_POINTS,8,3 ; @TF_TYPE_DISTRIBUTED_POINTS
	.comm	_GAMMA_RGB_256,8,3              ; @GAMMA_RGB_256
	.comm	__EXTRA_POINTS,8,3              ; @_EXTRA_POINTS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_MAX_HW_POINTS,8,3              ; @MAX_HW_POINTS
	.comm	_TRANSFER_FUNCTION_PQ,4,2       ; @TRANSFER_FUNCTION_PQ
	.comm	_coordinates_x,8,3              ; @coordinates_x
	.comm	_TRANSFER_FUNCTION_BT709,4,2    ; @TRANSFER_FUNCTION_BT709
	.comm	_TRANSFER_FUNCTION_GAMMA22,4,2  ; @TRANSFER_FUNCTION_GAMMA22
	.comm	_TRANSFER_FUNCTION_GAMMA24,4,2  ; @TRANSFER_FUNCTION_GAMMA24
	.comm	_TRANSFER_FUNCTION_GAMMA26,4,2  ; @TRANSFER_FUNCTION_GAMMA26
	.comm	_TRANSFER_FUNCTION_HLG,4,2      ; @TRANSFER_FUNCTION_HLG
	.comm	_GAMMA_CUSTOM,8,3               ; @GAMMA_CUSTOM
.subsections_via_symbols
