	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function armada_drm_crtc_atomic_flush
_armada_drm_crtc_atomic_flush:          ## @armada_drm_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_drm_to_armada_crtc
	movq	%rax, %r14
	movl	4(%rbx), %edx
	movl	8(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	8(%r14), %edi
	movl	12(%r14), %esi
	callq	_armada_reg_queue_end
	movl	(%rbx), %edi
	callq	_drm_atomic_crtc_needs_modeset
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movl	8(%r14), %esi
	movq	%r14, %rdi
	callq	_armada_drm_crtc_update_regs
	jmp	LBB0_3
LBB0_1:
	movl	$1, (%r14)
	movq	%rbx, %rdi
	callq	_armada_drm_crtc_queue_state_event
	movq	%r14, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movq	_DUMB_FRAMEDONE_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_armada_drm_crtc_enable_irq
LBB0_3:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock_irq                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[CRTC:%d:%s]\n"

	.comm	_DUMB_FRAMEDONE_ENA,4,2         ## @DUMB_FRAMEDONE_ENA
	.no_dead_strip	_armada_drm_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 armada_drm_crtc_atomic_flush
_armada_drm_crtc_atomic_flush:          ; @armada_drm_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	_drm_to_armada_crtc
	mov	x19, x0
	ldp	w2, w1, [x20, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldp	w0, w1, [x19, #8]
	bl	_armada_reg_queue_end
	ldr	w0, [x20]
	bl	_drm_atomic_crtc_needs_modeset
	cbz	w0, LBB0_2
; %bb.1:
	add	x21, x19, #4
	mov	x0, x21
	bl	_spin_lock_irq
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_armada_drm_crtc_update_regs
	b	LBB0_3
LBB0_2:
	mov	w8, #1
	mov	x21, x19
	str	w8, [x21], #4
	mov	x0, x20
	bl	_armada_drm_crtc_queue_state_event
	mov	x0, x21
	bl	_spin_lock_irq
Lloh2:
	adrp	x8, _DUMB_FRAMEDONE_ENA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DUMB_FRAMEDONE_ENA@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_armada_drm_crtc_enable_irq
LBB0_3:
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[CRTC:%d:%s]\n"

	.comm	_DUMB_FRAMEDONE_ENA,4,2         ; @DUMB_FRAMEDONE_ENA
	.no_dead_strip	_armada_drm_crtc_atomic_flush
.subsections_via_symbols
