	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mdp4_crtc_wait_for_flush_done
_mdp4_crtc_wait_for_flush_done:         ## @mdp4_crtc_wait_for_flush_done
	.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	%rdi, %rbx
	movq	(%rdi), %r13
	callq	_to_mdp4_crtc
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_get_kms
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_drm_crtc_vblank_get
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	8(%r13), %r12
	movq	%rbx, %rdi
	callq	_drm_crtc_index
	movl	(%r12,%rax,4), %r12d
	movq	_REG_MDP4_OVERLAY_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mdp4_read
	xorl	%r15d, %r15d
	andl	(%r14), %eax
	sete	%r15b
	movl	$50, %edi
	callq	_msecs_to_jiffies
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	testl	%eax, %eax
	jg	LBB0_3
## %bb.2:
	movl	(%r13), %edi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_3:
	movl	$0, (%r14)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_crtc_vblank_put            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_MDP4_OVERLAY_FLUSH,4,2     ## @REG_MDP4_OVERLAY_FLUSH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vblank time out, crtc=%d\n"

	.no_dead_strip	_mdp4_crtc_wait_for_flush_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mdp4_crtc_wait_for_flush_done
_mdp4_crtc_wait_for_flush_done:         ; @mdp4_crtc_wait_for_flush_done
	.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	x19, x0
	ldr	x23, [x0]
	bl	_to_mdp4_crtc
	mov	x20, x0
	mov	x0, x19
	bl	_get_kms
	mov	x21, x0
	mov	x0, x19
	bl	_drm_crtc_vblank_get
	cbz	w0, LBB0_2
; %bb.1:
	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_2:
	ldr	x22, [x23, #8]
	mov	x0, x19
	bl	_drm_crtc_index
	ldr	w22, [x22, x0, lsl #2]
Lloh0:
	adrp	x8, _REG_MDP4_OVERLAY_FLUSH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_MDP4_OVERLAY_FLUSH@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mdp4_read
	ldr	w8, [x20]
	tst	w8, w0
	cset	w21, eq
	mov	w0, #50
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x22
	mov	x1, x21
	bl	_wait_event_timeout
	cmp	w0, #0
	b.gt	LBB0_4
; %bb.3:
	ldr	w0, [x23]
	ldr	w2, [x20, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_4:
	str	wzr, [x20]
	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	_drm_crtc_vblank_put
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_MDP4_OVERLAY_FLUSH,4,2     ; @REG_MDP4_OVERLAY_FLUSH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vblank time out, crtc=%d\n"

	.no_dead_strip	_mdp4_crtc_wait_for_flush_done
.subsections_via_symbols
