	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpp20_program_shaper           ## -- Begin function dpp20_program_shaper
	.p2align	4, 0x90
_dpp20_program_shaper:                  ## @dpp20_program_shaper
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_TO_DCN20_DPP
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_dpp20_get_shaper_current
	movq	_LUT_BYPASS@GOTPCREL(%rip), %rcx
	movq	_LUT_RAM_A@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	cmpl	%edx, %eax
	movq	_LUT_RAM_B@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%edx, %ebx
	cmovel	%esi, %ebx
	cmpl	(%rcx), %eax
	cmovel	%esi, %ebx
	xorl	%esi, %esi
	cmpl	%edx, %ebx
	sete	%sil
	movq	%r12, %rdi
	callq	_dpp20_configure_shaper_lut
	cmpl	(%r15), %ebx
	jne	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_dpp20_program_shaper_luta_settings
	jmp	LBB0_5
LBB0_1:
	movq	_CM_SHAPER_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CM_SHAPER_LUT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_REG_SET
	jmp	LBB0_6
LBB0_4:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_dpp20_program_shaper_lutb_settings
LBB0_5:
	movl	(%r14), %edx
	movl	4(%r14), %esi
	movq	%r12, %rdi
	callq	_dpp20_program_shaper_lut
	movq	_CM_SHAPER_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CM_SHAPER_LUT_MODE@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	cmpl	(%r15), %ebx
	movl	(%rax), %edx
	sete	%sil
	movl	$2, %ecx
	subl	%esi, %ecx
	xorl	%esi, %esi
	callq	_REG_SET
	movl	$1, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CM_SHAPER_CONTROL,4,2          ## @CM_SHAPER_CONTROL
	.comm	_CM_SHAPER_LUT_MODE,4,2         ## @CM_SHAPER_LUT_MODE
	.comm	_LUT_BYPASS,4,2                 ## @LUT_BYPASS
	.comm	_LUT_RAM_A,4,2                  ## @LUT_RAM_A
	.comm	_LUT_RAM_B,4,2                  ## @LUT_RAM_B
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpp20_program_shaper           ; -- Begin function dpp20_program_shaper
	.p2align	2
_dpp20_program_shaper:                  ; @dpp20_program_shaper
	.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
	mov	x19, x0
	bl	_TO_DCN20_DPP
	cbz	x20, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_dpp20_get_shaper_current
Lloh0:
	adrp	x8, _LUT_BYPASS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LUT_BYPASS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x21, _LUT_RAM_A@GOTPAGE
Lloh4:
	ldr	x21, [x21, _LUT_RAM_A@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	w0, w9
	ccmp	w0, w8, #4, ne
Lloh5:
	adrp	x8, _LUT_RAM_B@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LUT_RAM_B@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	csel	w22, w8, w9, eq
	cmp	w22, w9
	cset	w1, eq
	mov	x0, x19
	bl	_dpp20_configure_shaper_lut
	ldr	w8, [x21]
	mov	x0, x19
	mov	x1, x20
	cmp	w22, w8
	b.ne	LBB0_4
; %bb.2:
	bl	_dpp20_program_shaper_luta_settings
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _CM_SHAPER_CONTROL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CM_SHAPER_CONTROL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _CM_SHAPER_LUT_MODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CM_SHAPER_LUT_MODE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w1, #0
	mov	w3, #0
	bl	_REG_SET
	mov	w19, #0
	b	LBB0_6
LBB0_4:
	bl	_dpp20_program_shaper_lutb_settings
LBB0_5:
	ldp	w2, w1, [x20]
	mov	x0, x19
	bl	_dpp20_program_shaper_lut
Lloh14:
	adrp	x8, _CM_SHAPER_CONTROL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CM_SHAPER_CONTROL@GOTPAGEOFF]
Lloh16:
	adrp	x9, _CM_SHAPER_LUT_MODE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CM_SHAPER_LUT_MODE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	ldr	w2, [x9]
	ldr	w8, [x21]
	cmp	w22, w8
	mov	w19, #1
	cinc	w3, w19, ne
	mov	w1, #0
	bl	_REG_SET
LBB0_6:
	mov	x0, x19
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CM_SHAPER_CONTROL,4,2          ; @CM_SHAPER_CONTROL
	.comm	_CM_SHAPER_LUT_MODE,4,2         ; @CM_SHAPER_LUT_MODE
	.comm	_LUT_BYPASS,4,2                 ; @LUT_BYPASS
	.comm	_LUT_RAM_A,4,2                  ; @LUT_RAM_A
	.comm	_LUT_RAM_B,4,2                  ; @LUT_RAM_B
.subsections_via_symbols
