	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_vmm_pfn_unmap             ## -- Begin function nvkm_vmm_pfn_unmap
	.p2align	4, 0x90
_nvkm_vmm_pfn_unmap:                    ## @nvkm_vmm_pfn_unmap
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_nvkm_vmm_node_search
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	addq	%r12, %r15
                                        ## implicit-def: $r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rbx)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 32(%rbx)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	subq	%r12, %rdi
	movq	24(%rbx), %rsi
	subq	%r12, %rsi
	addq	16(%rbx), %rsi
	callq	_min
	movq	%rax, %r13
	movq	(%r14), %rax
	movq	8(%rbx), %rsi
	shlq	$2, %rsi
	addq	(%rax), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	movq	%r13, %rcx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_nvkm_vmm_ptes_unmap_put
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nvkm_vmm_pfn_split_merge
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_NVKM_VMA_PAGE_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r13)
	movl	$0, (%r13)
	movq	%r13, %rbx
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_node
	movq	%rax, %rbx
	xorl	%eax, %eax
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %r12
	cmpq	%r15, %r12
	jl	LBB0_2
	jmp	LBB0_8
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NVKM_VMA_PAGE_NONE,8,3         ## @NVKM_VMA_PAGE_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_vmm_pfn_unmap             ; -- Begin function nvkm_vmm_pfn_unmap
	.p2align	2
_nvkm_vmm_pfn_unmap:                    ; @nvkm_vmm_pfn_unmap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	_nvkm_vmm_node_search
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	add	x23, x22, x21
Lloh0:
	adrp	x24, _NVKM_VMA_PAGE_NONE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _NVKM_VMA_PAGE_NONE@GOTPAGEOFF]
                                        ; implicit-def: $x22
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	cbz	w8, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20, #32]
	cbnz	x8, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x0, x23, x21
	ldp	x9, x8, [x20, #16]
	sub	x8, x8, x21
	add	x1, x8, x9
	bl	_min
	mov	x22, x0
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	mov	x2, x21
	mov	x3, x22
	mov	w4, #0
	mov	w5, #1
	bl	_nvkm_vmm_ptes_unmap_put
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	mov	w4, #0
	mov	w5, #0
	bl	_nvkm_vmm_pfn_split_merge
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	w0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
	str	x8, [x22, #8]
	str	wzr, [x22]
	mov	x20, x22
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_node
	cbz	x0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x20, x0
	ldr	x21, [x0, #16]
	cmp	x21, x23
	b.lt	LBB0_2
; %bb.8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NVKM_VMA_PAGE_NONE,8,3         ; @NVKM_VMA_PAGE_NONE
.subsections_via_symbols
