	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_pti_remove_kva            ## -- Begin function pmap_pti_remove_kva
	.p2align	4, 0x90
_pmap_pti_remove_kva:                   ## @pmap_pti_remove_kva
	.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	_pti@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.1:
	movq	%rsi, %r14
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	callq	_rounddown2
	movq	%rax, %rbx
	movq	_VM_MAXUSER_ADDRESS@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	(%rax), %rbx
	setg	%dil
	callq	_MPASS
	movq	(%r13), %rsi
	movq	%r14, %rdi
	callq	_roundup2
	movq	%rax, %r15
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	setl	%dil
	callq	_MPASS
	movq	_pti_obj@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VM_OBJECT_WLOCK
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cmpq	%r15, %rbx
	jge	LBB0_4
## %bb.2:
	movq	_X86_PG_V@GOTPCREL(%rip), %r14
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pmap_pti_pte
	movq	%rax, %r12
	movslq	(%rax), %rsi
	xorl	%edi, %edi
	movl	(%r14), %eax
	andl	%esi, %eax
	setne	%dil
	callq	_KASSERT
	movq	%r12, %rdi
	callq	_pte_clear
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_pmap_pti_unwire_pte
	addq	(%r13), %rbx
	cmpq	%r15, %rbx
	jl	LBB0_3
LBB0_4:
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_pmap_invalidate_range
	movq	_pti_obj@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VM_OBJECT_WUNLOCK              ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pti,4,2                        ## @pti
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_VM_MAXUSER_ADDRESS,8,3         ## @VM_MAXUSER_ADDRESS
	.comm	_pti_obj,4,2                    ## @pti_obj
	.comm	_X86_PG_V,4,2                   ## @X86_PG_V
	.comm	_kernel_pmap,4,2                ## @kernel_pmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_pti_remove_kva            ; -- Begin function pmap_pti_remove_kva
	.p2align	2
_pmap_pti_remove_kva:                   ; @pmap_pti_remove_kva
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, _pti@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pti@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x20, x1
Lloh3:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x1, [x23]
	bl	_rounddown2
	mov	x19, x0
Lloh5:
	adrp	x8, _VM_MAXUSER_ADDRESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VM_MAXUSER_ADDRESS@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, gt
	bl	_MPASS
	ldr	x1, [x23]
	mov	x0, x20
	bl	_roundup2
	mov	x20, x0
	cmp	x19, x0
	cset	w0, lt
	bl	_MPASS
Lloh8:
	adrp	x24, _pti_obj@GOTPAGE
Lloh9:
	ldr	x24, [x24, _pti_obj@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_VM_OBJECT_WLOCK
	cmp	x19, x20
	b.ge	LBB0_4
; %bb.2:
Lloh10:
	adrp	x25, _X86_PG_V@GOTPAGE
Lloh11:
	ldr	x25, [x25, _X86_PG_V@GOTPAGEOFF]
	mov	x21, x19
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, #0
	bl	_pmap_pti_pte
	mov	x22, x0
	ldrsw	x1, [x0]
	ldr	w8, [x25]
	tst	w8, w1
	cset	w0, ne
	bl	_KASSERT
	mov	x0, x22
	bl	_pte_clear
	mov	x0, x22
	mov	x1, x21
	bl	_pmap_pti_unwire_pte
	ldr	x8, [x23]
	add	x21, x8, x21
	cmp	x21, x20
	b.lt	LBB0_3
LBB0_4:
Lloh12:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh13:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, x19
	mov	x2, x20
	bl	_pmap_invalidate_range
	ldr	w0, [x24]
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_VM_OBJECT_WUNLOCK
LBB0_5:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_pti,4,2                        ; @pti
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_VM_MAXUSER_ADDRESS,8,3         ; @VM_MAXUSER_ADDRESS
	.comm	_pti_obj,4,2                    ; @pti_obj
	.comm	_X86_PG_V,4,2                   ; @X86_PG_V
	.comm	_kernel_pmap,4,2                ; @kernel_pmap
.subsections_via_symbols
