	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp_atomic_commit_update_gamma
_malidp_atomic_commit_update_gamma:     ## @malidp_atomic_commit_update_gamma
	.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, %r15
	movq	%rdi, %rbx
	callq	_crtc_to_malidp_device
	movq	(%rbx), %rdi
	cmpl	$0, 8(%rdi)
	je	LBB0_6
## %bb.1:
	movq	(%rax), %r14
	cmpq	$0, (%rdi)
	je	LBB0_7
## %bb.2:
	callq	_to_malidp_crtc_state
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.3:
	movq	(%rbx), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx), %rdx
	cmpq	(%rcx), %rdx
	je	LBB0_5
LBB0_4:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_malidp_write_gamma_table
LBB0_5:
	movq	_MALIDP_DISP_FUNC_GAMMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MALIDP_DE_DISPLAY_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_malidp_hw_setbits              ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_MALIDP_DISP_FUNC_GAMMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MALIDP_DE_DISPLAY_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_malidp_hw_clearbits            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MALIDP_DISP_FUNC_GAMMA,4,2     ## @MALIDP_DISP_FUNC_GAMMA
	.comm	_MALIDP_DE_DISPLAY_FUNC,4,2     ## @MALIDP_DE_DISPLAY_FUNC
	.no_dead_strip	_malidp_atomic_commit_update_gamma
.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_gamma
_malidp_atomic_commit_update_gamma:     ; @malidp_atomic_commit_update_gamma
	.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	x21, x1
	mov	x20, x0
	bl	_crtc_to_malidp_device
	mov	x8, x0
	ldr	x0, [x20]
	ldr	w9, [x0, #8]
	cbz	w9, LBB0_6
; %bb.1:
	ldr	x19, [x8]
	ldr	x8, [x0]
	cbz	x8, LBB0_7
; %bb.2:
	bl	_to_malidp_crtc_state
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x9, [x20]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_5
LBB0_4:
	ldr	w1, [x0]
	mov	x0, x19
	bl	_malidp_write_gamma_table
LBB0_5:
Lloh0:
	adrp	x8, _MALIDP_DISP_FUNC_GAMMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MALIDP_DISP_FUNC_GAMMA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MALIDP_DE_DISPLAY_FUNC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MALIDP_DE_DISPLAY_FUNC@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	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
	b	_malidp_hw_setbits
LBB0_6:
	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
LBB0_7:
Lloh6:
	adrp	x8, _MALIDP_DISP_FUNC_GAMMA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MALIDP_DISP_FUNC_GAMMA@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _MALIDP_DE_DISPLAY_FUNC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MALIDP_DE_DISPLAY_FUNC@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	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
	b	_malidp_hw_clearbits
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MALIDP_DISP_FUNC_GAMMA,4,2     ; @MALIDP_DISP_FUNC_GAMMA
	.comm	_MALIDP_DE_DISPLAY_FUNC,4,2     ; @MALIDP_DE_DISPLAY_FUNC
	.no_dead_strip	_malidp_atomic_commit_update_gamma
.subsections_via_symbols
