	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_remove_all                ## -- Begin function pmap_remove_all
	.p2align	4, 0x90
_pmap_remove_all:                       ## @pmap_remove_all
	.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	%rdi, %rbx
	movq	_VPO_UNMANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	sete	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	leaq	-56(%rbp), %rdi
	callq	_SLIST_INIT
	movq	%rbx, %rdi
	callq	_VM_PAGE_TO_PV_LIST_LOCK
	movq	%rax, %r14
	movq	%rax, -48(%rbp)
	movq	_PG_FICTITIOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_pv_dummy@GOTPCREL(%rip), %r15
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_VM_PAGE_TO_PHYS
	movl	%eax, %edi
	callq	_pa_to_pvh
	movq	%rax, %r15
LBB0_3:
	leaq	4(%r15), %r13
	movq	%rbx, %r12
	leaq	12(%rbx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
                                        ##     Child Loop BB0_7 Depth 2
	movq	%r14, %rdi
	callq	_rw_wlock
	movq	%r13, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	testq	%rax, %rax
	movq	%r13, %r14
	jne	LBB0_17
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_TAILQ_FIRST
	movq	%rax, %r15
	testq	%rax, %rax
	movq	%r12, %r14
	jne	LBB0_7
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=2
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%r13, %rdi
	leaq	-56(%rbp), %rcx
	callq	_pmap_unuse_pt
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_pmap_invalidate_page
	movq	_pv_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_TAILQ_REMOVE
	incl	8(%r14)
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_free_pv_entry
	movq	%r13, %rdi
	callq	_PMAP_UNLOCK
	movq	%rbx, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_23
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	callq	_PV_PMAP
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_PMAP_TRYLOCK
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	(%r12), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r14, %rbx
	movl	8(%r14), %r14d
	movq	-48(%rbp), %rdi
	callq	_rw_wunlock
	movq	%r13, %rdi
	callq	_PMAP_LOCK
	movq	-48(%rbp), %rdi
	callq	_rw_wlock
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cmpl	(%r12), %eax
	jne	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	cmpl	8(%rbx), %r14d
	movq	%rbx, %r14
	jne	LBB0_20
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	%r13, %rdi
	callq	_pmap_accessed_bit
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_pmap_modified_bit
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_pmap_rw_bit
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_pmap_resident_count_dec
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_pmap_pde
	movq	%rax, %r12
	movq	_PG_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%r12), %eax
	sete	%dil
	movq	%r14, %rsi
	callq	_KASSERT
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_pmap_pde_to_pte
	movq	%rax, %rdi
	callq	_pte_load_clear
	movl	%eax, %r14d
	movq	_PG_W@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	decl	(%r13)
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=2
	testl	%r14d, -68(%rbp)                ## 4-byte Folded Reload
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	_PGA_REFERENCED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_vm_page_aflag_set
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	-72(%rbp), %eax                 ## 4-byte Reload
	orl	-52(%rbp), %eax                 ## 4-byte Folded Reload
	notl	%r14d
	testl	%r14d, %eax
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_6
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	%r14, %rdi
	callq	_vm_page_dirty
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=2
	movl	(%rbx), %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_pmap_pde
	movq	%r13, %rdi
	movq	%rax, %rsi
	movl	%ebx, %edx
	leaq	-48(%rbp), %rcx
	callq	_pmap_demote_pde_locked
	movq	%r13, %rdi
	callq	_PMAP_UNLOCK
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_5
LBB0_17:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_PV_PMAP
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_PMAP_TRYLOCK
	testl	%eax, %eax
	jne	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	(%r15), %r14d
	movq	-48(%rbp), %rdi
	callq	_rw_wunlock
	movq	%r13, %rdi
	callq	_PMAP_LOCK
	movq	-48(%rbp), %rdi
	callq	_rw_wlock
	cmpl	(%r15), %r14d
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_16
	jmp	LBB0_22
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %r12
	jmp	LBB0_21
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %r12
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_22:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rdi
	callq	_rw_wunlock
	movq	%r13, %rdi
	callq	_PMAP_UNLOCK
	movq	-48(%rbp), %r14
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_4
LBB0_23:
	movq	_PGA_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vm_page_aflag_clear
	movq	-48(%rbp), %rdi
	callq	_rw_wunlock
	movq	%r14, %rdi
	callq	_pmap_delayed_invl_wait
	leaq	-56(%rbp), %rdi
	movl	$1, %esi
	callq	_vm_page_free_pages_toq
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VPO_UNMANAGED,4,2              ## @VPO_UNMANAGED
	.comm	_PG_FICTITIOUS,4,2              ## @PG_FICTITIOUS
	.comm	_pv_dummy,8,2                   ## @pv_dummy
	.comm	_PG_PS,4,2                      ## @PG_PS
	.comm	_PG_W,4,2                       ## @PG_W
	.comm	_PGA_REFERENCED,4,2             ## @PGA_REFERENCED
	.comm	_pv_next,4,2                    ## @pv_next
	.comm	_PGA_WRITEABLE,4,2              ## @PGA_WRITEABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_remove_all                ; -- Begin function pmap_remove_all
	.p2align	2
_pmap_remove_all:                       ; @pmap_remove_all
	.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	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _VPO_UNMANAGED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VPO_UNMANAGED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	mov	x1, x19
	bl	_KASSERT
	add	x0, sp, #16
	bl	_SLIST_INIT
	mov	x0, x19
	bl	_VM_PAGE_TO_PV_LIST_LOCK
	mov	x23, x0
	str	x0, [sp, #24]
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _PG_FICTITIOUS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PG_FICTITIOUS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x20, _pv_dummy@GOTPAGE
Lloh7:
	ldr	x20, [x20, _pv_dummy@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_VM_PAGE_TO_PHYS
	bl	_pa_to_pvh
	mov	x20, x0
LBB0_3:
	add	x25, x20, #4
	add	x22, x19, #12
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
	mov	x0, x23
	bl	_rw_wlock
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	ldr	w21, [x24]
	mov	x0, x23
	mov	x1, x21
	bl	_pmap_pde
	mov	x1, x0
	add	x3, sp, #24
	mov	x0, x23
	mov	x2, x21
	bl	_pmap_demote_pde_locked
	mov	x0, x23
	bl	_PMAP_UNLOCK
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x25
	bl	_TAILQ_FIRST
	mov	x24, x0
	cbz	x0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x24
	bl	_PV_PMAP
	mov	x23, x0
	bl	_PMAP_TRYLOCK
	cbnz	w0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w21, [x20]
	ldr	x0, [sp, #24]
	bl	_rw_wunlock
	mov	x0, x23
	bl	_PMAP_LOCK
	ldr	x0, [sp, #24]
	bl	_rw_wlock
	ldr	w8, [x20]
	cmp	w21, w8
	b.eq	LBB0_5
	b	LBB0_21
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	w1, [x24]
	ldr	w2, [x26]
	add	x3, sp, #16
	mov	x0, x23
	bl	_pmap_unuse_pt
	ldr	w1, [x24]
	mov	x0, x23
	bl	_pmap_invalidate_page
Lloh8:
	adrp	x8, _pv_next@GOTPAGE
Lloh9:
	ldr	x8, [x8, _pv_next@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x24
	bl	_TAILQ_REMOVE
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	x0, x23
	mov	x1, x24
	bl	_free_pv_entry
	mov	x0, x23
	bl	_PMAP_UNLOCK
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	bl	_TAILQ_FIRST
	mov	x24, x0
	cbz	x0, LBB0_22
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x24
	bl	_PV_PMAP
	mov	x23, x0
	bl	_PMAP_TRYLOCK
	cbnz	w0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w25, [x20]
	ldr	w21, [x19, #8]
	ldr	x0, [sp, #24]
	bl	_rw_wunlock
	mov	x0, x23
	bl	_PMAP_LOCK
	ldr	x0, [sp, #24]
	bl	_rw_wlock
	ldr	w8, [x20]
	cmp	w25, w8
	b.ne	LBB0_20
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x19, #8]
	cmp	w21, w8
	b.ne	LBB0_20
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x23
	bl	_pmap_accessed_bit
	mov	x28, x0
	mov	x0, x23
	bl	_pmap_modified_bit
	mov	x25, x0
	mov	x0, x23
	bl	_pmap_rw_bit
	mov	x27, x0
	mov	x0, x23
	mov	w1, #1
	bl	_pmap_resident_count_dec
	ldr	w1, [x24]
	mov	x0, x23
	bl	_pmap_pde
	mov	x26, x0
	ldr	w8, [x0]
Lloh11:
	adrp	x9, _PG_PS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PG_PS@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	mov	x1, x19
	bl	_KASSERT
	ldr	w1, [x24]
	mov	x0, x26
	bl	_pmap_pde_to_pte
	bl	_pte_load_clear
	mov	x21, x0
Lloh14:
	adrp	x8, _PG_W@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PG_W@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x23]
	sub	w8, w8, #1
	str	w8, [x23]
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=2
	tst	w21, w28
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_10 Depth=2
Lloh17:
	adrp	x8, _PGA_REFERENCED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PGA_REFERENCED@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vm_page_aflag_set
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=2
	orr	w8, w27, w25
	bics	wzr, w8, w21
	b.ne	LBB0_9
; %bb.19:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x19
	bl	_vm_page_dirty
	b	LBB0_9
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
LBB0_21:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #24]
	bl	_rw_wunlock
	mov	x0, x23
	bl	_PMAP_UNLOCK
	ldr	x23, [sp, #24]
	b	LBB0_4
LBB0_22:
Lloh20:
	adrp	x8, _PGA_WRITEABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PGA_WRITEABLE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vm_page_aflag_clear
	ldr	x0, [sp, #24]
	bl	_rw_wunlock
	mov	x0, x19
	bl	_pmap_delayed_invl_wait
	add	x0, sp, #16
	mov	w1, #1
	bl	_vm_page_free_pages_toq
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_VPO_UNMANAGED,4,2              ; @VPO_UNMANAGED
	.comm	_PG_FICTITIOUS,4,2              ; @PG_FICTITIOUS
	.comm	_pv_dummy,8,2                   ; @pv_dummy
	.comm	_PG_PS,4,2                      ; @PG_PS
	.comm	_PG_W,4,2                       ; @PG_W
	.comm	_PGA_REFERENCED,4,2             ; @PGA_REFERENCED
	.comm	_pv_next,4,2                    ; @pv_next
	.comm	_PGA_WRITEABLE,4,2              ; @PGA_WRITEABLE
.subsections_via_symbols
