	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltdc_crtc_atomic_flush
_ltdc_crtc_atomic_flush:                ## @ltdc_crtc_atomic_flush
	.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	%rdi, %rbx
	callq	_crtc_to_ltdc
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	8(%rbx), %r14
	movq	(%rax), %r15
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_ATOMIC
	movq	%rbx, %rdi
	callq	_ltdc_crtc_update_clut
	movl	(%r12), %edi
	movq	_LTDC_SRCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SRCR_VBR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_reg_set
	testq	%r15, %r15
	je	LBB0_5
## %bb.1:
	movq	(%rbx), %rax
	movq	$0, (%rax)
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	%rbx, %rdi
	callq	_drm_crtc_vblank_get
	movq	%rbx, %rdi
	movq	%r15, %rsi
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	callq	_drm_crtc_send_vblank_event
	jmp	LBB0_4
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	_drm_crtc_arm_vblank_event
LBB0_4:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irq                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_LTDC_SRCR,4,2                  ## @LTDC_SRCR
	.comm	_SRCR_VBR,4,2                   ## @SRCR_VBR
	.no_dead_strip	_ltdc_crtc_atomic_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltdc_crtc_atomic_flush
_ltdc_crtc_atomic_flush:                ; @ltdc_crtc_atomic_flush
	.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, x0
	bl	_crtc_to_ltdc
	mov	x22, x0
	ldp	x8, x19, [x20]
	ldr	x21, [x8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_ATOMIC
	mov	x0, x20
	bl	_ltdc_crtc_update_clut
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _LTDC_SRCR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LTDC_SRCR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _SRCR_VBR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SRCR_VBR@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_reg_set
	cbz	x21, LBB0_3
; %bb.1:
	ldr	x8, [x20]
	str	xzr, [x8]
	mov	x0, x19
	bl	_spin_lock_irq
	mov	x0, x20
	bl	_drm_crtc_vblank_get
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_drm_crtc_send_vblank_event
	b	LBB0_5
LBB0_3:
	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_4:
	mov	x0, x20
	mov	x1, x21
	bl	_drm_crtc_arm_vblank_event
LBB0_5:
	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	_spin_unlock_irq
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_LTDC_SRCR,4,2                  ; @LTDC_SRCR
	.comm	_SRCR_VBR,4,2                   ; @SRCR_VBR
	.no_dead_strip	_ltdc_crtc_atomic_flush
.subsections_via_symbols
