	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_wait_one_vblank            ## -- Begin function drm_wait_one_vblank
	.p2align	4, 0x90
_drm_wait_one_vblank:                   ## @drm_wait_one_vblank
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	xorl	%edi, %edi
	cmpl	%esi, (%rbx)
	setbe	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_drm_vblank_get
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_WARN
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%r14d, %r13d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_drm_vblank_count
	movq	%rax, %r15
	movl	(%r12,%r13,4), %r12d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_drm_vblank_count
	xorl	%r13d, %r13d
	cmpq	%rax, %r15
	setne	%r13b
	movl	$100, %edi
	callq	_msecs_to_jiffies
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_WARN
	movq	%rbx, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_vblank_put                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vblank not available on crtc %i, ret=%i\n"

L_.str.1:                               ## @.str.1
	.asciz	"vblank wait timed out on crtc %i\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_wait_one_vblank            ; -- Begin function drm_wait_one_vblank
	.p2align	2
_drm_wait_one_vblank:                   ; @drm_wait_one_vblank
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	w8, [x0]
	cmp	w8, w1
	cset	w0, ls
	bl	_WARN_ON
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_drm_vblank_get
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x2, x19
	bl	_WARN
	cbz	x0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_3:
	mov	w23, w19
	mov	x0, x20
	mov	x1, x19
	bl	_drm_vblank_count
	mov	x21, x0
	ldr	w22, [x22, x23, lsl #2]
	mov	x0, x20
	mov	x1, x19
	bl	_drm_vblank_count
	cmp	x21, x0
	cset	w21, ne
	mov	w0, #100
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x22
	mov	x1, x21
	bl	_wait_event_timeout
	cmp	w0, #0
	cset	w0, eq
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_WARN
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_drm_vblank_put
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vblank not available on crtc %i, ret=%i\n"

l_.str.1:                               ; @.str.1
	.asciz	"vblank wait timed out on crtc %i\n"

.subsections_via_symbols
