	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp_atomic_commit_update_coloradj
_malidp_atomic_commit_update_coloradj:  ## @malidp_atomic_commit_update_coloradj
	.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
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_crtc_to_malidp_device
	movq	(%r15), %rdi
	cmpl	$0, 8(%rdi)
	je	LBB0_8
## %bb.1:
	movq	(%rax), %r13
	cmpq	$0, (%rdi)
	je	LBB0_9
## %bb.2:
	callq	_to_malidp_crtc_state
	movq	%rax, %r14
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rax), %rcx
	je	LBB0_7
LBB0_4:
	movq	_MALIDP_COLORADJ_NUM_COEFFS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	movq	_MALIDP_COLORADJ_NUM_COEFFS@GOTPCREL(%rip), %r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%rbx), %esi
	movq	(%r13), %rax
	movq	(%rax), %rdx
	movq	_MALIDP_COLOR_ADJ_COEF@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	addq	%rbx, %rdx
	movq	%r13, %rdi
	callq	_malidp_hw_write
	incq	%r15
	movslq	(%r12), %rax
	addq	$4, %rbx
	cmpq	%rax, %r15
	jl	LBB0_6
LBB0_7:
	movq	_MALIDP_DISP_FUNC_CADJ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MALIDP_DE_DISPLAY_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_malidp_hw_setbits              ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_MALIDP_DISP_FUNC_CADJ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MALIDP_DE_DISPLAY_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_malidp_hw_clearbits            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MALIDP_DISP_FUNC_CADJ,4,2      ## @MALIDP_DISP_FUNC_CADJ
	.comm	_MALIDP_DE_DISPLAY_FUNC,4,2     ## @MALIDP_DE_DISPLAY_FUNC
	.comm	_MALIDP_COLORADJ_NUM_COEFFS,4,2 ## @MALIDP_COLORADJ_NUM_COEFFS
	.comm	_MALIDP_COLOR_ADJ_COEF,8,3      ## @MALIDP_COLOR_ADJ_COEF
	.no_dead_strip	_malidp_atomic_commit_update_coloradj
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function malidp_atomic_commit_update_coloradj
_malidp_atomic_commit_update_coloradj:  ; @malidp_atomic_commit_update_coloradj
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x1
	mov	x21, x0
	bl	_crtc_to_malidp_device
	mov	x8, x0
	ldr	x0, [x21]
	ldr	w9, [x0, #8]
	cbz	w9, LBB0_4
; %bb.1:
	ldr	x19, [x8]
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.2:
	bl	_to_malidp_crtc_state
	mov	x20, x0
	ldr	x8, [x22]
Lloh0:
	adrp	x22, _MALIDP_COLORADJ_NUM_COEFFS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MALIDP_COLORADJ_NUM_COEFFS@GOTPAGEOFF]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	x9, [x21]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x8, [x8]
	ldr	w10, [x22]
	cmp	x9, x8
	ccmp	w10, #0, #4, ne
	b.gt	LBB0_7
	b	LBB0_9
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh2:
	adrp	x8, _MALIDP_DISP_FUNC_CADJ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MALIDP_DISP_FUNC_CADJ@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _MALIDP_DE_DISPLAY_FUNC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MALIDP_DE_DISPLAY_FUNC@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_malidp_hw_clearbits
LBB0_6:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_9
LBB0_7:
	mov	x21, #0
	mov	x23, #0
Lloh8:
	adrp	x24, _MALIDP_COLOR_ADJ_COEF@GOTPAGE
Lloh9:
	ldr	x24, [x24, _MALIDP_COLOR_ADJ_COEF@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	w1, [x8, x21]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x9, [x24]
	add	x8, x8, x9
	add	x2, x21, x8
	mov	x0, x19
	bl	_malidp_hw_write
	add	x23, x23, #1
	ldrsw	x8, [x22]
	add	x21, x21, #4
	cmp	x23, x8
	b.lt	LBB0_8
LBB0_9:
Lloh10:
	adrp	x8, _MALIDP_DISP_FUNC_CADJ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MALIDP_DISP_FUNC_CADJ@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _MALIDP_DE_DISPLAY_FUNC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MALIDP_DE_DISPLAY_FUNC@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_malidp_hw_setbits
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MALIDP_DISP_FUNC_CADJ,4,2      ; @MALIDP_DISP_FUNC_CADJ
	.comm	_MALIDP_DE_DISPLAY_FUNC,4,2     ; @MALIDP_DE_DISPLAY_FUNC
	.comm	_MALIDP_COLORADJ_NUM_COEFFS,4,2 ; @MALIDP_COLORADJ_NUM_COEFFS
	.comm	_MALIDP_COLOR_ADJ_COEF,8,3      ; @MALIDP_COLOR_ADJ_COEF
	.no_dead_strip	_malidp_atomic_commit_update_coloradj
.subsections_via_symbols
