	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dcn10_set_output_transfer_func
_dcn10_set_output_transfer_func:        ## @dcn10_set_output_transfer_func
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	_GAMMA_HW_POINTS_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	(%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.3:
	movq	(%rdi), %rax
	movq	_TF_TYPE_PREDEFINED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movq	8(%rdi), %rax
	movq	_TRANSFER_FUNCTION_SRGB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	8(%rbx), %rax
	movq	_OPP_REGAMMA_SRGB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	*(%rax)
	jmp	LBB0_10
LBB0_6:
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_cm_helper_translate_curve_to_hw_format
	movq	8(%rbx), %rcx
	movq	(%rcx), %rcx
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_OPP_REGAMMA_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	jmp	LBB0_9
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_8:
	movq	_OPP_REGAMMA_BYPASS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
LBB0_9:
	callq	*%rcx
LBB0_10:
	movq	8(%r14), %rdi
	movl	$1, %r15d
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.11:
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:
	movl	(%rbx), %edx
	callq	_log_tf
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GAMMA_HW_POINTS_NUM,4,2        ## @GAMMA_HW_POINTS_NUM
	.comm	_TF_TYPE_PREDEFINED,8,3         ## @TF_TYPE_PREDEFINED
	.comm	_TRANSFER_FUNCTION_SRGB,8,3     ## @TRANSFER_FUNCTION_SRGB
	.comm	_OPP_REGAMMA_SRGB,4,2           ## @OPP_REGAMMA_SRGB
	.comm	_OPP_REGAMMA_USER,4,2           ## @OPP_REGAMMA_USER
	.comm	_OPP_REGAMMA_BYPASS,4,2         ## @OPP_REGAMMA_BYPASS
	.no_dead_strip	_dcn10_set_output_transfer_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dcn10_set_output_transfer_func
_dcn10_set_output_transfer_func:        ; @dcn10_set_output_transfer_func
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0]
	cbz	x19, LBB0_7
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x8, _GAMMA_HW_POINTS_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GAMMA_HW_POINTS_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x0, [x1]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _TF_TYPE_PREDEFINED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TF_TYPE_PREDEFINED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x0, #8]
Lloh6:
	adrp	x9, _TRANSFER_FUNCTION_SRGB@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TRANSFER_FUNCTION_SRGB@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _OPP_REGAMMA_SRGB@GOTPAGE
Lloh10:
	ldr	x9, [x9, _OPP_REGAMMA_SRGB@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	mov	x1, x19
	mov	w2, #0
	bl	_cm_helper_translate_curve_to_hw_format
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x0, LBB0_8
; %bb.6:
Lloh11:
	adrp	x9, _OPP_REGAMMA_USER@GOTPAGE
Lloh12:
	ldr	x9, [x9, _OPP_REGAMMA_USER@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x9]
	mov	x0, x19
	mov	x1, x19
	b	LBB0_10
LBB0_7:
	mov	w0, #0
	b	LBB0_14
LBB0_8:
Lloh14:
	adrp	x9, _OPP_REGAMMA_BYPASS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _OPP_REGAMMA_BYPASS@GOTPAGEOFF]
LBB0_9:
	ldr	w2, [x9]
	mov	x0, x19
	mov	x1, #0
LBB0_10:
	blr	x8
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_13
; %bb.11:
	ldr	x1, [x20]
	cbz	x1, LBB0_13
; %bb.12:
	ldr	w2, [x19]
	bl	_log_tf
LBB0_13:
	mov	w0, #1
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GAMMA_HW_POINTS_NUM,4,2        ; @GAMMA_HW_POINTS_NUM
	.comm	_TF_TYPE_PREDEFINED,8,3         ; @TF_TYPE_PREDEFINED
	.comm	_TRANSFER_FUNCTION_SRGB,8,3     ; @TRANSFER_FUNCTION_SRGB
	.comm	_OPP_REGAMMA_SRGB,4,2           ; @OPP_REGAMMA_SRGB
	.comm	_OPP_REGAMMA_USER,4,2           ; @OPP_REGAMMA_USER
	.comm	_OPP_REGAMMA_BYPASS,4,2         ; @OPP_REGAMMA_BYPASS
	.no_dead_strip	_dcn10_set_output_transfer_func
.subsections_via_symbols
