	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv04_graph_idle                ## -- Begin function nv04_graph_idle
	.p2align	4, 0x90
_nv04_graph_idle:                       ## @nv04_graph_idle
	.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
	callq	_nouveau_graph
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_nv_device
	movq	(%rax), %rax
	movq	_NV_40@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	_NV40_PGRAPH_STATUS_SYNC_STALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	$-1, %edx
	cmovel	%eax, %edx
	movq	_NV04_PGRAPH_STATUS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_nv_wait
	movl	%eax, %ecx
	movl	$1, %eax
	testl	%ecx, %ecx
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_nv_rd32
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_nv_error
	xorl	%eax, %eax
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_40,8,3                      ## @NV_40
	.comm	_NV40_PGRAPH_STATUS_SYNC_STALL,4,2 ## @NV40_PGRAPH_STATUS_SYNC_STALL
	.comm	_NV04_PGRAPH_STATUS,4,2         ## @NV04_PGRAPH_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"idle timed out with status 0x%08x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv04_graph_idle                ; -- Begin function nv04_graph_idle
	.p2align	2
_nv04_graph_idle:                       ; @nv04_graph_idle
	.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	x20, x0
	bl	_nouveau_graph
	mov	x19, x0
	mov	x0, x20
	bl	_nv_device
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _NV_40@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NV_40@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _NV40_PGRAPH_STATUS_SYNC_STALL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NV40_PGRAPH_STATUS_SYNC_STALL@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	x8, x9
	mov	w8, #-1
	csinv	w2, w8, w10, ne
Lloh6:
	adrp	x20, _NV04_PGRAPH_STATUS@GOTPAGE
Lloh7:
	ldr	x20, [x20, _NV04_PGRAPH_STATUS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w3, #0
	bl	_nv_wait
	cbz	w0, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_nv_rd32
	mov	x2, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nv_error
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_40,8,3                      ; @NV_40
	.comm	_NV40_PGRAPH_STATUS_SYNC_STALL,4,2 ; @NV40_PGRAPH_STATUS_SYNC_STALL
	.comm	_NV04_PGRAPH_STATUS,4,2         ; @NV04_PGRAPH_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"idle timed out with status 0x%08x\n"

.subsections_via_symbols
