	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_uvmm_mthd_page
_nvkm_uvmm_mthd_page:                   ## @nvkm_uvmm_mthd_page
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rax
	movq	%rsi, -56(%rbp)
	movl	%edx, -44(%rbp)
	movq	_ENOSYS@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	leaq	8(%r15), %rax
	movq	$-1, %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rbx
	cmpq	$0, (%rax)
	leaq	16(%rax), %rax
	jne	LBB0_1
## %bb.2:
	negl	%edi
	movups	(%r14), %xmm0
	movups	16(%r14), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nvif_unpack
	testl	%eax, %eax
	je	LBB0_3
## %bb.6:
	subl	(%r12), %r13d
	jmp	LBB0_7
LBB0_3:
	movq	(%r14), %rcx
	cmpq	%rbx, %rcx
	jae	LBB0_4
## %bb.5:
	shlq	$4, %rcx
	movq	(%r15,%rcx), %rax
	movq	8(%r15,%rcx), %rcx
	movq	%rcx, 24(%r14)
	movq	_NVKM_VMM_PAGE_SPARSE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	setne	%dl
	movl	%edx, 8(%r14)
	movq	_NVKM_VMM_PAGE_VRAM@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	setne	%dl
	movl	%edx, 12(%r14)
	movq	_NVKM_VMM_PAGE_HOST@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	setne	%dl
	movl	%edx, 16(%r14)
	movq	_NVKM_VMM_PAGE_COMP@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andq	(%rcx), %rax
	setne	%dl
	movl	%edx, 20(%r14)
	xorl	%r13d, %r13d
	jmp	LBB0_7
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_7:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NVKM_VMM_PAGE_SPARSE,8,3       ## @NVKM_VMM_PAGE_SPARSE
	.comm	_NVKM_VMM_PAGE_VRAM,8,3         ## @NVKM_VMM_PAGE_VRAM
	.comm	_NVKM_VMM_PAGE_HOST,8,3         ## @NVKM_VMM_PAGE_HOST
	.comm	_NVKM_VMM_PAGE_COMP,8,3         ## @NVKM_VMM_PAGE_COMP
	.no_dead_strip	_nvkm_uvmm_mthd_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_uvmm_mthd_page
_nvkm_uvmm_mthd_page:                   ; @nvkm_uvmm_mthd_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	str	x1, [sp, #40]
	str	w2, [sp, #36]
Lloh0:
	adrp	x21, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ENOSYS@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	x9, [x0]
	ldr	x9, [x9]
	ldr	x20, [x9]
	add	x9, x20, #8
	mov	x22, #-1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #16
	add	x22, x22, #1
	cbnz	x10, LBB0_1
; %bb.2:
	neg	w0, w8
	ldp	q0, q1, [x19]
	stp	q0, q1, [sp]
	add	x1, sp, #40
	add	x2, sp, #36
	mov	x3, sp
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_nvif_unpack
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w8, [x21]
	b	LBB0_7
LBB0_4:
	ldr	x8, [x19]
	cmp	x8, x22
	b.hs	LBB0_6
; %bb.5:
	mov	w0, #0
	add	x8, x20, x8, lsl #4
	ld1r.2d	{ v0 }, [x8], #8
	ldr	x8, [x8]
Lloh2:
	adrp	x9, _NVKM_VMM_PAGE_SPARSE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NVKM_VMM_PAGE_SPARSE@GOTPAGEOFF]
Lloh4:
	ldr	d1, [x9]
Lloh5:
	adrp	x9, _NVKM_VMM_PAGE_VRAM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NVKM_VMM_PAGE_VRAM@GOTPAGEOFF]
	ld1.d	{ v1 }[1], [x9]
Lloh7:
	adrp	x9, _NVKM_VMM_PAGE_HOST@GOTPAGE
Lloh8:
	ldr	x9, [x9, _NVKM_VMM_PAGE_HOST@GOTPAGEOFF]
	str	x8, [x19, #24]
Lloh9:
	adrp	x8, _NVKM_VMM_PAGE_COMP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NVKM_VMM_PAGE_COMP@GOTPAGEOFF]
Lloh11:
	ldr	d2, [x9]
	ld1.d	{ v2 }[1], [x8]
	cmtst.2d	v2, v2, v0
	cmtst.2d	v0, v1, v0
	uzp1.4s	v0, v0, v2
	movi.4s	v1, #1
	and.16b	v0, v0, v1
	stur	q0, [x19, #8]
	b	LBB0_8
LBB0_6:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
LBB0_7:
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NVKM_VMM_PAGE_SPARSE,8,3       ; @NVKM_VMM_PAGE_SPARSE
	.comm	_NVKM_VMM_PAGE_VRAM,8,3         ; @NVKM_VMM_PAGE_VRAM
	.comm	_NVKM_VMM_PAGE_HOST,8,3         ; @NVKM_VMM_PAGE_HOST
	.comm	_NVKM_VMM_PAGE_COMP,8,3         ; @NVKM_VMM_PAGE_COMP
	.no_dead_strip	_nvkm_uvmm_mthd_page
.subsections_via_symbols
