	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_remove                    ## -- Begin function pmap_remove
	.p2align	4, 0x90
_pmap_remove:                           ## @pmap_remove
	.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, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_KTR_PMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rax
	movq	_curcpu@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rcx
	movq	%r14, %r8
	callq	_CTR3
	movq	%r12, %rdi
	callq	_PMAP_REMOVE_DONE
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_tte_list_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_wlock
	movq	%r12, %rdi
	callq	_PMAP_LOCK
	movq	%r14, %rax
	subq	%r15, %rax
	movq	_PMAP_TSB_THRESH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_2
## %bb.10:
	movq	_pmap_remove_tte@GOTPCREL(%rip), %r8
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_tsb_foreach
	movq	%r12, %rdi
	callq	_tlb_context_demap
	jmp	LBB0_8
LBB0_2:
	cmpq	%r15, %r14
	jle	LBB0_7
## %bb.3:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	movq	%r15, %rbx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	(%r13), %rbx
	cmpq	%r14, %rbx
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_tsb_tte_lookup
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%rax, %rdx
	movq	%rbx, %rcx
	callq	_pmap_remove_tte
	testl	%eax, %eax
	jne	LBB0_6
LBB0_7:
	decq	%r14
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_tlb_range_demap
LBB0_8:
	movq	%r12, %rdi
	callq	_PMAP_UNLOCK
	movq	_tte_list_global_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rw_wunlock                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_KTR_PMAP,4,2                   ## @KTR_PMAP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_remove: ctx=%#lx start=%#lx end=%#lx"

	.comm	_curcpu,8,3                     ## @curcpu
	.comm	_tte_list_global_lock,4,2       ## @tte_list_global_lock
	.comm	_PMAP_TSB_THRESH,8,3            ## @PMAP_TSB_THRESH
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_remove                    ; -- Begin function pmap_remove
	.p2align	2
_pmap_remove:                           ; @pmap_remove
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _KTR_PMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KTR_PMAP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _curcpu@GOTPAGE
Lloh4:
	ldr	x9, [x9, _curcpu@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w2, [x8, x9, lsl #2]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	mov	x4, x21
	bl	_CTR3
	mov	x0, x19
	bl	_PMAP_REMOVE_DONE
	cbz	x0, LBB0_2
; %bb.1:
	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
LBB0_2:
Lloh8:
	adrp	x0, _tte_list_global_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _tte_list_global_lock@GOTPAGEOFF]
	bl	_rw_wlock
	mov	x0, x19
	bl	_PMAP_LOCK
Lloh10:
	adrp	x8, _PMAP_TSB_THRESH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PMAP_TSB_THRESH@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	sub	x9, x21, x20
	cmp	x9, x8
	b.le	LBB0_4
; %bb.3:
Lloh13:
	adrp	x4, _pmap_remove_tte@GOTPAGE
Lloh14:
	ldr	x4, [x4, _pmap_remove_tte@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, #0
	mov	x2, x20
	mov	x3, x21
	bl	_tsb_foreach
	mov	x0, x19
	bl	_tlb_context_demap
	b	LBB0_10
LBB0_4:
	cmp	x21, x20
	b.le	LBB0_9
; %bb.5:
Lloh15:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh16:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	mov	x22, x20
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x23]
	add	x22, x8, x22
	cmp	x22, x21
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_tsb_tte_lookup
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x2, x0
	mov	x0, x19
	mov	x1, #0
	mov	x3, x22
	bl	_pmap_remove_tte
	cbnz	w0, LBB0_6
LBB0_9:
	sub	x2, x21, #1
	mov	x0, x19
	mov	x1, x20
	bl	_tlb_range_demap
LBB0_10:
	mov	x0, x19
	bl	_PMAP_UNLOCK
Lloh17:
	adrp	x0, _tte_list_global_lock@GOTPAGE
Lloh18:
	ldr	x0, [x0, _tte_list_global_lock@GOTPAGEOFF]
	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
	b	_rw_wunlock
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_KTR_PMAP,4,2                   ; @KTR_PMAP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_remove: ctx=%#lx start=%#lx end=%#lx"

	.comm	_curcpu,8,3                     ; @curcpu
	.comm	_tte_list_global_lock,4,2       ; @tte_list_global_lock
	.comm	_PMAP_TSB_THRESH,8,3            ; @PMAP_TSB_THRESH
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
.subsections_via_symbols
