	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpp1_program_input_lut         ## -- Begin function dpp1_program_input_lut
	.p2align	4, 0x90
_dpp1_program_input_lut:                ## @dpp1_program_input_lut
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_TO_DCN10_DPP
	movl	$0, -44(%rbp)
	movq	_CM_MEM_PWR_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SHARED_MEM_PWR_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	$1, %ecx
	callq	_REG_SET
	movq	%r14, %rdi
	callq	_dpp1_enable_cm_block
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_dpp1_ingamma_ram_inuse
	xorl	%edx, %edx
	cmpl	$0, -44(%rbp)
	setne	%dl
	movq	_CM_IGAM_LUT_RW_CONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_CM_IGAM_LUT_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_REG_UPDATE
	movl	(%r14), %edi
	movq	_CM_IGAM_LUT_RW_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_REG_UPDATE
	movq	_CM_IGAM_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_CM_IGAM_INPUT_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_REG_UPDATE
	movl	(%r14), %edi
	movq	_CM_IGAM_LUT_WRITE_EN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$7, %edx
	callq	_REG_UPDATE
	movl	(%rbx), %edi
	movq	_CM_IGAM_LUT_FORMAT_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CM_IGAM_LUT_FORMAT_G@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_CM_IGAM_LUT_FORMAT_B@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$3, (%rsp)
	movl	$3, %r14d
	movl	$3, %edx
	movl	$3, %r8d
	callq	_REG_UPDATE_3
	movq	_CM_IGAM_LUT_RW_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %esi
	xorl	%edx, %edx
	callq	_REG_UPDATE
	cmpl	$0, (%r15)
	jle	LBB0_3
## %bb.1:
	xorl	%r13d, %r13d
	movq	_CM_IGAM_LUT_SEQ_COLOR@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ebx
	movq	24(%r15), %rax
	movl	(%rax,%r13,4), %edi
	callq	_dc_fixpt_round
	movl	%ebx, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_REG_SET
	movl	(%r12), %ebx
	movq	16(%r15), %rax
	movl	(%rax,%r13,4), %edi
	callq	_dc_fixpt_round
	movl	%ebx, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_REG_SET
	movl	(%r12), %ebx
	movq	8(%r15), %rax
	movl	(%rax,%r13,4), %edi
	callq	_dc_fixpt_round
	movl	%ebx, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_REG_SET
	incq	%r13
	movslq	(%r15), %rax
	cmpq	%rax, %r13
	jl	LBB0_2
LBB0_3:
	movq	_CM_MEM_PWR_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SHARED_MEM_PWR_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_REG_SET
	movq	_CM_IGAM_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_CM_IGAM_LUT_MODE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	cmpl	$1, -44(%rbp)
	sbbl	$0, %r14d
	movl	%r14d, %edx
	callq	_REG_UPDATE
	movl	(%r15), %edi
	movl	(%rbx), %esi
	leaq	-48(%rbp), %rdx
	callq	_REG_GET
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CM_MEM_PWR_CTRL,4,2            ## @CM_MEM_PWR_CTRL
	.comm	_SHARED_MEM_PWR_DIS,4,2         ## @SHARED_MEM_PWR_DIS
	.comm	_CM_IGAM_LUT_RW_CONTROL,4,2     ## @CM_IGAM_LUT_RW_CONTROL
	.comm	_CM_IGAM_LUT_SEL,4,2            ## @CM_IGAM_LUT_SEL
	.comm	_CM_IGAM_LUT_RW_MODE,4,2        ## @CM_IGAM_LUT_RW_MODE
	.comm	_CM_IGAM_CONTROL,4,2            ## @CM_IGAM_CONTROL
	.comm	_CM_IGAM_INPUT_FORMAT,4,2       ## @CM_IGAM_INPUT_FORMAT
	.comm	_CM_IGAM_LUT_WRITE_EN_MASK,4,2  ## @CM_IGAM_LUT_WRITE_EN_MASK
	.comm	_CM_IGAM_LUT_FORMAT_R,4,2       ## @CM_IGAM_LUT_FORMAT_R
	.comm	_CM_IGAM_LUT_FORMAT_G,4,2       ## @CM_IGAM_LUT_FORMAT_G
	.comm	_CM_IGAM_LUT_FORMAT_B,4,2       ## @CM_IGAM_LUT_FORMAT_B
	.comm	_CM_IGAM_LUT_RW_INDEX,4,2       ## @CM_IGAM_LUT_RW_INDEX
	.comm	_CM_IGAM_LUT_SEQ_COLOR,4,2      ## @CM_IGAM_LUT_SEQ_COLOR
	.comm	_CM_IGAM_LUT_MODE,4,2           ## @CM_IGAM_LUT_MODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpp1_program_input_lut         ; -- Begin function dpp1_program_input_lut
	.p2align	2
_dpp1_program_input_lut:                ; @dpp1_program_input_lut
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_TO_DCN10_DPP
	str	wzr, [sp, #12]
Lloh0:
	adrp	x21, _CM_MEM_PWR_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CM_MEM_PWR_CTRL@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x22, _SHARED_MEM_PWR_DIS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SHARED_MEM_PWR_DIS@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #0
	mov	w3, #1
	bl	_REG_SET
	mov	x0, x20
	bl	_dpp1_enable_cm_block
	add	x1, sp, #12
	mov	x0, x20
	bl	_dpp1_ingamma_ram_inuse
	ldr	w8, [sp, #12]
	cmp	w8, #0
	cset	w2, ne
Lloh4:
	adrp	x20, _CM_IGAM_LUT_RW_CONTROL@GOTPAGE
Lloh5:
	ldr	x20, [x20, _CM_IGAM_LUT_RW_CONTROL@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh6:
	adrp	x8, _CM_IGAM_LUT_SEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CM_IGAM_LUT_SEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_REG_UPDATE
	ldr	w0, [x20]
Lloh9:
	adrp	x8, _CM_IGAM_LUT_RW_MODE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CM_IGAM_LUT_RW_MODE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_REG_UPDATE
Lloh12:
	adrp	x23, _CM_IGAM_CONTROL@GOTPAGE
Lloh13:
	ldr	x23, [x23, _CM_IGAM_CONTROL@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh14:
	adrp	x8, _CM_IGAM_INPUT_FORMAT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CM_IGAM_INPUT_FORMAT@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_REG_UPDATE
	ldr	w0, [x20]
Lloh17:
	adrp	x8, _CM_IGAM_LUT_WRITE_EN_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CM_IGAM_LUT_WRITE_EN_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w2, #7
	bl	_REG_UPDATE
	ldr	w0, [x23]
Lloh20:
	adrp	x8, _CM_IGAM_LUT_FORMAT_R@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CM_IGAM_LUT_FORMAT_R@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _CM_IGAM_LUT_FORMAT_G@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CM_IGAM_LUT_FORMAT_G@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
Lloh26:
	adrp	x8, _CM_IGAM_LUT_FORMAT_B@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CM_IGAM_LUT_FORMAT_B@GOTPAGEOFF]
Lloh28:
	ldr	w5, [x8]
	mov	w2, #3
	mov	w4, #3
	mov	w6, #3
	bl	_REG_UPDATE_3
Lloh29:
	adrp	x8, _CM_IGAM_LUT_RW_INDEX@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CM_IGAM_LUT_RW_INDEX@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	x1, x0
	mov	w2, #0
	bl	_REG_UPDATE
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x24, #0
Lloh32:
	adrp	x25, _CM_IGAM_LUT_SEQ_COLOR@GOTPAGE
Lloh33:
	ldr	x25, [x25, _CM_IGAM_LUT_SEQ_COLOR@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x25]
	ldr	x8, [x19, #24]
	lsl	x26, x24, #2
	ldr	w0, [x8, x26]
	bl	_dc_fixpt_round
	mov	x3, x0
	mov	x0, x20
	mov	w1, #0
	mov	x2, x20
	bl	_REG_SET
	ldr	w20, [x25]
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x26]
	bl	_dc_fixpt_round
	mov	x3, x0
	mov	x0, x20
	mov	w1, #0
	mov	x2, x20
	bl	_REG_SET
	ldr	w20, [x25]
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x26]
	bl	_dc_fixpt_round
	mov	x3, x0
	mov	x0, x20
	mov	w1, #0
	mov	x2, x20
	bl	_REG_SET
	add	x24, x24, #1
	ldrsw	x8, [x19]
	cmp	x24, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	w0, [x21]
	ldr	w2, [x22]
	mov	w1, #0
	mov	w3, #0
	bl	_REG_SET
Lloh34:
	adrp	x19, _CM_IGAM_LUT_MODE@GOTPAGE
Lloh35:
	ldr	x19, [x19, _CM_IGAM_LUT_MODE@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	w1, [x19]
	ldr	w8, [sp, #12]
	cmp	w8, #0
	mov	w8, #2
	cinc	w2, w8, ne
	bl	_REG_UPDATE
	ldr	w0, [x23]
	ldr	w1, [x19]
	add	x2, sp, #8
	bl	_REG_GET
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_CM_MEM_PWR_CTRL,4,2            ; @CM_MEM_PWR_CTRL
	.comm	_SHARED_MEM_PWR_DIS,4,2         ; @SHARED_MEM_PWR_DIS
	.comm	_CM_IGAM_LUT_RW_CONTROL,4,2     ; @CM_IGAM_LUT_RW_CONTROL
	.comm	_CM_IGAM_LUT_SEL,4,2            ; @CM_IGAM_LUT_SEL
	.comm	_CM_IGAM_LUT_RW_MODE,4,2        ; @CM_IGAM_LUT_RW_MODE
	.comm	_CM_IGAM_CONTROL,4,2            ; @CM_IGAM_CONTROL
	.comm	_CM_IGAM_INPUT_FORMAT,4,2       ; @CM_IGAM_INPUT_FORMAT
	.comm	_CM_IGAM_LUT_WRITE_EN_MASK,4,2  ; @CM_IGAM_LUT_WRITE_EN_MASK
	.comm	_CM_IGAM_LUT_FORMAT_R,4,2       ; @CM_IGAM_LUT_FORMAT_R
	.comm	_CM_IGAM_LUT_FORMAT_G,4,2       ; @CM_IGAM_LUT_FORMAT_G
	.comm	_CM_IGAM_LUT_FORMAT_B,4,2       ; @CM_IGAM_LUT_FORMAT_B
	.comm	_CM_IGAM_LUT_RW_INDEX,4,2       ; @CM_IGAM_LUT_RW_INDEX
	.comm	_CM_IGAM_LUT_SEQ_COLOR,4,2      ; @CM_IGAM_LUT_SEQ_COLOR
	.comm	_CM_IGAM_LUT_MODE,4,2           ; @CM_IGAM_LUT_MODE
.subsections_via_symbols
