	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_vblank_get                 ## -- Begin function drm_vblank_get
	.p2align	4, 0x90
_drm_vblank_get:                        ## @drm_vblank_get
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %rbx
	addq	$8, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movslq	%r13d, %r14
	leaq	(,%r14,4), %r15
	movq	16(%rbx), %rsi
	addq	%r15, %rsi
	movl	$1, %edi
	callq	_atomic_add_return
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.1:
	leaq	24(%rbx), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	(%rbx), %rax
	xorl	%r12d, %r12d
	cmpl	$0, (%rax,%r14,4)
	jne	LBB0_5
## %bb.2:
	movq	32(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	*(%rax)
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_DRM_DEBUG
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_4
## %bb.3:
	addq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_atomic_dec
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_5
LBB0_6:
	movq	(%rbx), %rax
	xorl	%r12d, %r12d
	cmpl	$0, (%rax,%r14,4)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_8
## %bb.7:
	addq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_atomic_dec
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_4:
	movq	(%rbx), %rax
	movl	$1, (%rax,%r14,4)
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_drm_update_vblank_count
LBB0_5:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enabling vblank on crtc %d, ret: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_vblank_get                 ; -- Begin function drm_vblank_get
	.p2align	2
_drm_vblank_get:                        ; @drm_vblank_get
	.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	x22, x1
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #16]
	sxtw	x24, w22
	add	x1, x8, w22, sxtw #2
	mov	w0, #1
	bl	_atomic_add_return
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.1:
	add	x21, x20, #24
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
	ldr	w8, [x8, x24, lsl #2]
	cbz	w8, LBB0_5
; %bb.2:
	mov	w23, #0
	b	LBB0_9
LBB0_3:
	ldr	x8, [x20]
	ldr	w8, [x8, x24, lsl #2]
	cbz	w8, LBB0_7
; %bb.4:
	mov	w23, #0
	b	LBB0_10
LBB0_5:
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
	mov	x0, x20
	mov	x1, x22
	blr	x8
	mov	x23, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x23
	bl	_DRM_DEBUG
	cbz	w23, LBB0_8
; %bb.6:
	ldr	x8, [x20, #16]
	add	x0, x8, x24, lsl #2
	bl	_atomic_dec
	b	LBB0_9
LBB0_7:
	ldr	x8, [x20, #16]
	add	x0, x8, x24, lsl #2
	bl	_atomic_dec
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_10
LBB0_8:
	ldr	x8, [x20]
	mov	w9, #1
	str	w9, [x8, x24, lsl #2]
	mov	x0, x20
	mov	x1, x22
	bl	_drm_update_vblank_count
LBB0_9:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
LBB0_10:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x23
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enabling vblank on crtc %d, ret: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
