	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_timer_wait_test           ## -- Begin function nvkm_timer_wait_test
	.p2align	4, 0x90
_nvkm_timer_wait_test:                  ## @nvkm_timer_wait_test
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	32(%rdi), %r14
	movq	%r14, %rdi
	callq	_nvkm_timer_read
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.1:
	cmpq	%rax, 16(%rbx)
	jne	LBB0_5
## %bb.2:
	leal	1(%rcx), %edx
	movl	%edx, (%rbx)
	cmpl	$16, %ecx
	jne	LBB0_6
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_nvkm_fatal
	jmp	LBB0_7
LBB0_4:
	movq	%rax, 8(%rbx)
LBB0_5:
	movq	%rax, 16(%rbx)
	movl	$1, (%rbx)
LBB0_6:
	movq	8(%rbx), %rcx
	subq	%rcx, %rax
	cmpq	24(%rbx), %rax
	jle	LBB0_8
LBB0_7:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stalled at %016llx\n"

	.comm	_ETIMEDOUT,8,3                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_timer_wait_test           ; -- Begin function nvkm_timer_wait_test
	.p2align	2
_nvkm_timer_wait_test:                  ; @nvkm_timer_wait_test
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #32]
	mov	x0, x20
	bl	_nvkm_timer_read
	mov	x2, x0
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	x9, [x19, #16]
	cmp	x9, x2
	b.ne	LBB0_5
; %bb.2:
	add	w9, w8, #1
	str	w9, [x19]
	cmp	w8, #16
	b.ne	LBB0_6
; %bb.3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_nvkm_fatal
	b	LBB0_7
LBB0_4:
	str	x2, [x19, #8]
LBB0_5:
	str	x2, [x19, #16]
	mov	w8, #1
	str	w8, [x19]
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x9, [x19, #24]
	sub	x0, x2, x8
	cmp	x0, x9
	b.le	LBB0_8
LBB0_7:
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 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	"stalled at %016llx\n"

	.comm	_ETIMEDOUT,8,3                  ; @ETIMEDOUT
.subsections_via_symbols
