	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_vmm_ptes_sparse_get
_nvkm_vmm_ptes_sparse_get:              ## @nvkm_vmm_ptes_sparse_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_NVKM_VMM_PAGE_SPARSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_6
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_nvkm_vmm_sparse_ref_ptes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rsi), %rdx
	movq	(%rdx), %rdx
	movl	(%rdx), %edx
	movl	%edx, 32(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movl	%eax, 8(%rsp)
	movl	$0, (%rsp)
	leaq	L_.str(%rip), %r8
	movq	%r14, %rdx
	movl	$1, %r9d
	callq	_nvkm_vmm_iter
	cmpq	$-1, %rax
	je	LBB0_2
## %bb.3:
	subq	%r14, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	%rax, %rcx
	callq	_nvkm_vmm_ptes_sparse_put
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_2:
	xorl	%eax, %eax
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_VMM_PAGE_SPARSE,4,2       ## @NVKM_VMM_PAGE_SPARSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sparse ref"

	.comm	_nvkm_vmm_sparse_ref_ptes,4,2   ## @nvkm_vmm_sparse_ref_ptes
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nvkm_vmm_ptes_sparse_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_vmm_ptes_sparse_get
_nvkm_vmm_ptes_sparse_get:              ; @nvkm_vmm_ptes_sparse_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _NVKM_VMM_PAGE_SPARSE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVKM_VMM_PAGE_SPARSE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh3:
	adrp	x8, _nvkm_vmm_sparse_ref_ptes@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nvkm_vmm_sparse_ref_ptes@GOTPAGEOFF]
Lloh5:
	ldr	w7, [x8]
	ldr	x8, [x1, #8]
	ldr	x8, [x8]
	ldr	w8, [x8]
	stp	xzr, xzr, [sp]
	str	w8, [sp, #16]
Lloh6:
	adrp	x4, l_.str@PAGE
Lloh7:
	add	x4, x4, l_.str@PAGEOFF
	mov	w5, #1
	mov	w6, #0
	bl	_nvkm_vmm_iter
	cmn	x0, #1
	b.eq	LBB0_7
; %bb.2:
	subs	x3, x0, x19
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_nvkm_vmm_ptes_sparse_put
LBB0_4:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_VMM_PAGE_SPARSE,4,2       ; @NVKM_VMM_PAGE_SPARSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sparse ref"

	.comm	_nvkm_vmm_sparse_ref_ptes,4,2   ; @nvkm_vmm_sparse_ref_ptes
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nvkm_vmm_ptes_sparse_get
.subsections_via_symbols
