	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_pvh_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_wlock
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_PMAP_LOCK
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	cmpq	%rbx, %r12
	jge	LBB0_25
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %r13
	movq	%r12, %rdi
	callq	_L2_NEXT_BUCKET
	movq	%rax, %r12
	cmpq	%rbx, %rax
	cmovgeq	%rbx, %r12
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_pmap_get_l2_bucket
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r14
	movq	%r13, %rdi
	callq	_l2pte_index
	cmpq	%r12, %r13
	jge	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%r14,%rax,8), %r14
	xorl	%edx, %edx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%rcx, %rax
	incq	%rax
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	_cpu_idcache_wbinv_range
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	_cpu_l2cache_wbinv_range
	movq	%r13, %rdi
	callq	_cpu_tlb_flushID_SE
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	$0, (%r14)
	movq	%r14, %rdi
	callq	_PTE_SYNC
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	incq	%rdx
LBB0_23:                                ##   in Loop: Header=BB0_6 Depth=2
	addq	$8, %r14
	addq	(%rbx), %r13
	cmpq	%r12, %r13
	jge	LBB0_24
LBB0_6:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14), %r15
	testq	%r15, %r15
	je	LBB0_23
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	decl	(%rax)
	movq	%r15, %rdi
	callq	_l2pte_pa
	movl	%eax, %edi
	callq	_PHYS_TO_VM_PAGE
	movl	$1, %ecx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%rax, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_pmap_remove_pv
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_PV_BEEN_EXECD
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	callq	_PV_BEEN_REFD
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_pmap_free_pv_entry
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=2
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%r15, %rdi
	callq	_l2pte_valid
	testq	%rax, %rax
	je	LBB0_22
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pmap_is_current
	testq	%rax, %rax
	je	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	_PMAP_REMOVE_CLEAN_LIST_SIZE@GOTPCREL(%rip), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rax), %rcx
	jl	LBB0_16
## %bb.20:                              ##   in Loop: Header=BB0_6 Depth=2
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_6 Depth=2
	xorl	%eax, %eax
	callq	_cpu_idcache_wbinv_all
	xorl	%eax, %eax
	callq	_cpu_l2cache_wbinv_all
	incq	-64(%rbp)                       ## 8-byte Folded Spill
	movl	$1, -52(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_22
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=2
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	_cpu_dcache_wbinv_range
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	_cpu_l2cache_wbinv_range
	movq	%r13, %rdi
	callq	_cpu_tlb_flushD_SE
	jmp	LBB0_22
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edx, %edx
LBB0_24:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_pmap_free_l2_bucket
	movq	%r13, %r12
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_1
LBB0_25:
	movq	_pvh_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_wunlock
	testl	%r14d, %r14d
	je	LBB0_27
## %bb.26:
	xorl	%eax, %eax
	callq	_cpu_tlb_flushID
LBB0_27:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PMAP_UNLOCK                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_pvh_global_lock,4,2            ## @pvh_global_lock
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PMAP_REMOVE_CLEAN_LIST_SIZE,8,3 ## @PMAP_REMOVE_CLEAN_LIST_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:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _pvh_global_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _pvh_global_lock@GOTPAGEOFF]
	bl	_rw_wlock
	mov	x0, x19
	bl	_PMAP_LOCK
	mov	w25, #0
	str	xzr, [sp, #16]                  ; 8-byte Folded Spill
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cmp	x22, x20
	b.ge	LBB0_25
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x21, x22
	mov	x0, x22
	bl	_L2_NEXT_BUCKET
	cmp	x0, x20
	csel	x22, x0, x20, lt
	mov	x0, x19
	mov	x1, x21
	bl	_pmap_get_l2_bucket
	cbz	x0, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x23, x0
	ldr	x24, [x0]
	mov	x0, x21
	bl	_l2pte_index
	cmp	x21, x22
	str	w25, [sp, #12]                  ; 4-byte Folded Spill
	mov	x27, #0
	b.ge	LBB0_24
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x25, x24, x0, lsl #3
Lloh2:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:                                 ;   in Loop: Header=BB0_10 Depth=2
	mov	x8, x9
	add	x8, x9, #1
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	cbz	x27, LBB0_22
; %bb.6:                                ;   in Loop: Header=BB0_10 Depth=2
	ldr	x1, [x24]
	mov	x0, x21
	bl	_cpu_idcache_wbinv_range
	ldr	x1, [x24]
	mov	x0, x21
	bl	_cpu_l2cache_wbinv_range
	mov	x0, x21
	bl	_cpu_tlb_flushID_SE
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	str	xzr, [x25]
	mov	x0, x25
	bl	_PTE_SYNC
	add	x27, x27, #1
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	x25, x25, #8
	ldr	x8, [x24]
	add	x21, x8, x21
	cmp	x21, x22
	b.ge	LBB0_24
LBB0_10:                                ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x26, [x25]
	cbz	x26, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	mov	x0, x26
	bl	_l2pte_pa
	bl	_PHYS_TO_VM_PAGE
	str	x27, [sp, #24]                  ; 8-byte Folded Spill
	cbz	x0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x1, x19
	mov	x2, x21
	bl	_pmap_remove_pv
	cbz	x0, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x24, x0
	ldr	w0, [x0]
	bl	_PV_BEEN_EXECD
	mov	x27, x0
	ldr	w0, [x24]
	bl	_PV_BEEN_REFD
	mov	x28, x0
	mov	x0, x24
	bl	_pmap_free_pv_entry
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=2
	mov	x27, #0
	mov	w28, #1
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=2
	mov	x27, #0
	mov	w28, #1
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=2
Lloh4:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x26
	bl	_l2pte_valid
	cbz	x0, LBB0_7
; %bb.18:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x19
	bl	_pmap_is_current
	cbz	x0, LBB0_7
; %bb.19:                               ;   in Loop: Header=BB0_10 Depth=2
Lloh6:
	adrp	x8, _PMAP_REMOVE_CLEAN_LIST_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PMAP_REMOVE_CLEAN_LIST_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	cmp	x9, x8
	b.lt	LBB0_5
; %bb.20:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	b.ne	LBB0_8
; %bb.21:                               ;   in Loop: Header=BB0_10 Depth=2
	bl	_cpu_idcache_wbinv_all
	bl	_cpu_l2cache_wbinv_all
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	add	x8, x8, #1
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	mov	w8, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_8
LBB0_22:                                ;   in Loop: Header=BB0_10 Depth=2
	cbz	x28, LBB0_7
; %bb.23:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x1, [x24]
	mov	x0, x21
	bl	_cpu_dcache_wbinv_range
	ldr	x1, [x24]
	mov	x0, x21
	bl	_cpu_l2cache_wbinv_range
	mov	x0, x21
	bl	_cpu_tlb_flushD_SE
	b	LBB0_7
LBB0_24:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x27
	bl	_pmap_free_l2_bucket
	mov	x22, x21
	ldr	w25, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_1
LBB0_25:
Lloh9:
	adrp	x0, _pvh_global_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _pvh_global_lock@GOTPAGEOFF]
	bl	_rw_wunlock
	cbz	w25, LBB0_27
; %bb.26:
	bl	_cpu_tlb_flushID
LBB0_27:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_PMAP_UNLOCK
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_pvh_global_lock,4,2            ; @pvh_global_lock
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PMAP_REMOVE_CLEAN_LIST_SIZE,8,3 ; @PMAP_REMOVE_CLEAN_LIST_SIZE
.subsections_via_symbols
