	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_reset_vblank_timestamp
_drm_reset_vblank_timestamp:            ## @drm_reset_vblank_timestamp
	.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, %r15d
	movq	%rdi, %r14
	movq	_DRM_TIMESTAMP_MAXRETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	callq	_spin_lock
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	___get_vblank_counter
	movq	%rax, %r13
	movq	%r14, %rdi
	movl	%r15d, %esi
	leaq	-48(%rbp), %rdx
	xorl	%ecx, %ecx
	callq	_drm_get_last_vbltimestamp
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	___get_vblank_counter
	cmpq	%rax, %r13
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	-1(%r12), %eax
	cmpl	$1, %r12d
	movl	%eax, %r12d
	jg	LBB0_1
LBB0_3:
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rcx
	jmp	LBB0_6
LBB0_5:
	movq	$0, -48(%rbp)
	xorl	%ecx, %ecx
LBB0_6:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$1, %edx
	movq	%r13, %r8
	callq	_store_vblank
	movq	%r14, %rdi
	callq	_spin_unlock
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_TIMESTAMP_MAXRETRIES,4,2   ## @DRM_TIMESTAMP_MAXRETRIES
	.no_dead_strip	_drm_reset_vblank_timestamp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_reset_vblank_timestamp
_drm_reset_vblank_timestamp:            ; @drm_reset_vblank_timestamp
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _DRM_TIMESTAMP_MAXRETRIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_TIMESTAMP_MAXRETRIES@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	bl	_spin_lock
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	___get_vblank_counter
	mov	x21, x0
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_drm_get_last_vbltimestamp
	mov	x22, x0
	mov	x0, x19
	mov	x1, x20
	bl	___get_vblank_counter
	cmp	x21, x0
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w8, w23, #1
	cmp	w23, #1
	mov	x23, x8
	b.gt	LBB0_1
LBB0_3:
	cbz	w22, LBB0_5
; %bb.4:
	ldr	x3, [sp, #8]
	b	LBB0_6
LBB0_5:
	mov	x3, #0
	str	xzr, [sp, #8]
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	mov	x4, x21
	bl	_store_vblank
	mov	x0, x19
	bl	_spin_unlock
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_TIMESTAMP_MAXRETRIES,4,2   ; @DRM_TIMESTAMP_MAXRETRIES
	.no_dead_strip	_drm_reset_vblank_timestamp
.subsections_via_symbols
