	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fimd_wait_for_vblank
_fimd_wait_for_vblank:                  ## @fimd_wait_for_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	cmpq	$0, 16(%rbx)
	jne	LBB0_2
## %bb.1:
	leaq	4(%rbx), %r15
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_atomic_set
	movl	8(%rbx), %r14d
	movq	%r15, %rdi
	callq	_atomic_read
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1717986919, %rax, %rdx         ## imm = 0x66666667
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$35, %rdx
	addl	%eax, %edx
	movl	%r14d, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_wait_event_timeout
	testl	%eax, %eax
	je	LBB0_3
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEV_DEBUG_KMS              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ,4,2                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vblank wait timed out.\n"

	.no_dead_strip	_fimd_wait_for_vblank
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fimd_wait_for_vblank
_fimd_wait_for_vblank:                  ; @fimd_wait_for_vblank
	.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
	ldr	x21, [x0]
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_2
; %bb.1:
	add	x19, x21, #4
	mov	x0, x19
	mov	w1, #1
	bl	_atomic_set
	ldr	w20, [x21, #8]
	mov	x0, x19
	bl	_atomic_read
	cmp	w0, #0
	cset	w1, eq
Lloh0:
	adrp	x8, _HZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #35
	add	w2, w8, w9
	mov	x0, x20
	bl	_wait_event_timeout
	cbz	w0, LBB0_3
LBB0_2:
	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_3:
	ldr	w0, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	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	_DRM_DEV_DEBUG_KMS
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ,4,2                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vblank wait timed out.\n"

	.no_dead_strip	_fimd_wait_for_vblank
.subsections_via_symbols
