	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dcn20_set_shaper_3dlut
_dcn20_set_shaper_3dlut:                ## @dcn20_set_shaper_3dlut
	.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	%rsi, %r14
	movq	(%rdi), %rbx
	movq	8(%rsi), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.1:
	movq	(%rsi), %rax
	movq	_TF_TYPE_HWPWL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	addq	$8, %rsi
	jmp	LBB0_7
LBB0_4:
	movq	_TF_TYPE_DISTRIBUTED_POINTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	leaq	8(%rbx), %r15
	movq	%rsi, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_cm_helper_translate_curve_to_hw_format
	movq	%r15, %rsi
	jmp	LBB0_7
LBB0_6:
	xorl	%esi, %esi
LBB0_7:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.8:
	cmpl	$1, 4(%rsi)
	jne	LBB0_10
## %bb.9:
	movq	(%rbx), %rax
	addq	$8, %rsi
	movq	%rbx, %rdi
	jmp	LBB0_11
LBB0_10:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	xorl	%esi, %esi
LBB0_11:
	callq	*8(%rax)
	movl	%eax, %r15d
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	cmpl	$1, 4(%rax)
	jne	LBB0_14
## %bb.13:
	movl	(%rax), %esi
	testl	%esi, %esi
	jne	LBB0_15
LBB0_14:
	movl	$126976, %esi                   ## imm = 0x1F000
LBB0_15:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	callq	*16(%rax)
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TF_TYPE_HWPWL,8,3              ## @TF_TYPE_HWPWL
	.comm	_TF_TYPE_DISTRIBUTED_POINTS,8,3 ## @TF_TYPE_DISTRIBUTED_POINTS
	.no_dead_strip	_dcn20_set_shaper_3dlut
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dcn20_set_shaper_3dlut
_dcn20_set_shaper_3dlut:                ; @dcn20_set_shaper_3dlut
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	ldr	x19, [x0]
	ldr	x0, [x1, #8]
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _TF_TYPE_HWPWL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TF_TYPE_HWPWL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	add	x21, x0, #8
	b	LBB0_6
LBB0_3:
Lloh3:
	adrp	x9, _TF_TYPE_DISTRIBUTED_POINTS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TF_TYPE_DISTRIBUTED_POINTS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	add	x21, x19, #8
	mov	x1, x21
	mov	w2, #1
	bl	_cm_helper_translate_curve_to_hw_format
	b	LBB0_6
LBB0_5:
	mov	x21, #0
LBB0_6:
	ldr	x8, [x19]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	ldr	x8, [x20]
	cbz	x8, LBB0_9
; %bb.7:
	ldr	w9, [x8, #4]
	cmp	w9, #1
	b.ne	LBB0_9
; %bb.8:
	ldr	x9, [x19]
	ldr	x9, [x9, #8]
	add	x1, x8, #8
	mov	x0, x19
	blr	x9
	b	LBB0_10
LBB0_9:
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	mov	x0, x19
	mov	x1, #0
	blr	x8
LBB0_10:
	mov	x21, x0
	ldr	x8, [x20]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	w9, [x8, #4]
	cmp	w9, #1
	b.ne	LBB0_13
; %bb.12:
	ldr	w1, [x8]
	cbnz	w1, LBB0_14
LBB0_13:
	mov	w1, #126976
LBB0_14:
	ldr	x8, [x19]
	ldr	x8, [x8, #16]
	mov	x0, x19
	blr	x8
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TF_TYPE_HWPWL,8,3              ; @TF_TYPE_HWPWL
	.comm	_TF_TYPE_DISTRIBUTED_POINTS,8,3 ; @TF_TYPE_DISTRIBUTED_POINTS
	.no_dead_strip	_dcn20_set_shaper_3dlut
.subsections_via_symbols
