	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv44_vm_flush
_nv44_vm_flush:                         ## @nv44_vm_flush
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rbx
	movl	(%rbx), %edx
	movq	_NV44_GART_PAGE@GOTPCREL(%rip), %rax
	subl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1050644, %esi                  ## imm = 0x100814
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$1050632, %esi                  ## imm = 0x100808
	movl	$32, %edx
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$1050632, %esi                  ## imm = 0x100808
	movl	$1, %edx
	movl	$1, %ecx
	callq	_nv_wait
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$1050632, %esi                  ## imm = 0x100808
	callq	_nv_rd32
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_nv_error
LBB0_2:
	movq	%rbx, %rdi
	movl	$1050632, %esi                  ## imm = 0x100808
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_nv_wr32                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NV44_GART_PAGE,4,2             ## @NV44_GART_PAGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout: 0x%08x\n"

	.no_dead_strip	_nv44_vm_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv44_vm_flush
_nv44_vm_flush:                         ; @nv44_vm_flush
	.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	w8, #2056
	movk	w8, #16, lsl #16
	ldr	x19, [x0]
	ldr	w9, [x19]
Lloh0:
	adrp	x10, _NV44_GART_PAGE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NV44_GART_PAGE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	sub	w2, w9, w10
	add	w1, w8, #12
	mov	x0, x19
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #2056
	movk	w1, #16, lsl #16
	mov	w2, #32
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #2056
	movk	w1, #16, lsl #16
	mov	w2, #1
	mov	w3, #1
	bl	_nv_wait
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #2056
	movk	w1, #16, lsl #16
	bl	_nv_rd32
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nv_error
LBB0_2:
	mov	x0, x19
	mov	w1, #2056
	movk	w1, #16, lsl #16
	mov	w2, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_nv_wr32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_NV44_GART_PAGE,4,2             ; @NV44_GART_PAGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout: 0x%08x\n"

	.no_dead_strip	_nv44_vm_flush
.subsections_via_symbols
