	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpp1_cm_set_regamma_pwl
_dpp1_cm_set_regamma_pwl:               ## @dpp1_cm_set_regamma_pwl
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_TO_DCN10_DPP
	cmpl	$128, %ebx
	je	LBB0_4
## %bb.1:
	cmpl	$129, %ebx
	je	LBB0_5
## %bb.2:
	xorl	%r13d, %r13d
	cmpl	$130, %ebx
	jne	LBB0_10
## %bb.3:
	movl	$1, %r13d
	jmp	LBB0_10
LBB0_4:
	movl	$2, %r13d
	jmp	LBB0_10
LBB0_5:
	movq	%rax, %r15
	cmpl	$1, (%rax)
	movl	$4, %r13d
	sbbl	$0, %r13d
	movq	%rax, %rdi
	addq	$4, %rdi
	movq	%r14, %rsi
	movl	$8, %edx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_dpp1_cm_power_on_regamma_lut
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_dpp1_cm_configure_regamma_lut
	cmpl	$0, (%r15)
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_dpp1_cm_program_regamma_luta_settings
	jmp	LBB0_9
LBB0_8:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_dpp1_cm_program_regamma_lutb_settings
LBB0_9:
	movl	(%r14), %edx
	movl	4(%r14), %esi
	movq	%r12, %rdi
	callq	_dpp1_cm_program_regamma_lut
	movq	(%r14), %rax
	movq	%rax, 4(%r15)
	xorl	%r13d, %r13d
	cmpl	$0, (%r15)
	sete	%r13b
	movl	%r13d, (%r15)
	addl	$3, %r13d
LBB0_10:
	movq	_CM_RGAM_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CM_RGAM_LUT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	%r13d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_SET                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CM_RGAM_CONTROL,4,2            ## @CM_RGAM_CONTROL
	.comm	_CM_RGAM_LUT_MODE,4,2           ## @CM_RGAM_LUT_MODE
	.no_dead_strip	_dpp1_cm_set_regamma_pwl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpp1_cm_set_regamma_pwl
_dpp1_cm_set_regamma_pwl:               ; @dpp1_cm_set_regamma_pwl
	.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	x22, x2
	mov	x20, x1
	mov	x21, x0
	bl	_TO_DCN10_DPP
	cmp	w22, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w22, #129
	b.eq	LBB0_4
; %bb.2:
	mov	w8, #1
	cmp	w22, #130
	csel	w22, wzr, w8, ne
	b	LBB0_9
LBB0_3:
	mov	w22, #2
	b	LBB0_9
LBB0_4:
	mov	x19, x0
	ldr	w8, [x0], #4
	cmp	w8, #0
	mov	w8, #3
	cinc	w22, w8, ne
	mov	x1, x20
	mov	w2, #8
	bl	_memcmp
	cbz	w0, LBB0_9
; %bb.5:
	mov	x0, x21
	mov	w1, #1
	bl	_dpp1_cm_power_on_regamma_lut
	ldr	w1, [x19]
	mov	x0, x21
	bl	_dpp1_cm_configure_regamma_lut
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.6:
	mov	x0, x21
	mov	x1, x20
	bl	_dpp1_cm_program_regamma_luta_settings
	b	LBB0_8
LBB0_7:
	mov	x0, x21
	mov	x1, x20
	bl	_dpp1_cm_program_regamma_lutb_settings
LBB0_8:
	ldp	w2, w1, [x20]
	mov	x0, x21
	bl	_dpp1_cm_program_regamma_lut
	ldr	x8, [x20]
	stur	x8, [x19, #4]
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w8, eq
	mov	w9, #3
	cinc	w22, w9, eq
	str	w8, [x19]
LBB0_9:
Lloh0:
	adrp	x8, _CM_RGAM_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CM_RGAM_CONTROL@GOTPAGEOFF]
Lloh2:
	adrp	x9, _CM_RGAM_LUT_MODE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CM_RGAM_LUT_MODE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	ldr	w2, [x9]
	mov	w1, #0
	mov	x3, x22
	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
	b	_REG_SET
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CM_RGAM_CONTROL,4,2            ; @CM_RGAM_CONTROL
	.comm	_CM_RGAM_LUT_MODE,4,2           ; @CM_RGAM_LUT_MODE
	.no_dead_strip	_dpp1_cm_set_regamma_pwl
.subsections_via_symbols
