	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_VPO_UNMANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%r15), %eax
	sete	%dil
	movq	%r15, %rsi
	callq	_KASSERT
	movq	_tte_list_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_wlock
	leaq	4(%r15), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_TD_V@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, (%rbx)
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_tlb_page_demap
	movq	_tte_link@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	decl	(%r13)
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_pmap_cache_remove
	movq	%rbx, %rdi
	callq	_TTE_ZERO
	movq	%r13, %rdi
	callq	_PMAP_UNLOCK
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rbx
	testq	%r12, %r12
	je	LBB0_11
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_tte_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_TAILQ_NEXT
	movq	%rax, %r12
	movq	_TD_PV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_TTE_GET_PMAP
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_TTE_GET_VA
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_PMAP_LOCK
	movl	(%rbx), %eax
	movq	_TD_WIRED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	4(%r13)
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_TD_REF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_PGA_REFERENCED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vm_page_aflag_set
	movl	(%rbx), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_TD_W@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_vm_page_dirty
	movl	(%rbx), %eax
	jmp	LBB0_9
LBB0_11:
	movq	_PGA_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vm_page_aflag_clear
	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	_VPO_UNMANAGED,4,2              ## @VPO_UNMANAGED
	.comm	_tte_list_global_lock,4,2       ## @tte_list_global_lock
	.comm	_tte_link,4,2                   ## @tte_link
	.comm	_TD_PV,4,2                      ## @TD_PV
	.comm	_TD_WIRED,4,2                   ## @TD_WIRED
	.comm	_TD_REF,4,2                     ## @TD_REF
	.comm	_PGA_REFERENCED,4,2             ## @PGA_REFERENCED
	.comm	_TD_W,4,2                       ## @TD_W
	.comm	_TD_V,4,2                       ## @TD_V
	.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:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x0
	ldr	w8, [x20], #4
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
Lloh3:
	adrp	x0, _tte_list_global_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _tte_list_global_lock@GOTPAGEOFF]
	bl	_rw_wlock
	mov	x0, x20
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_11
; %bb.1:
	mov	x21, x0
Lloh5:
	adrp	x25, _tte_link@GOTPAGE
Lloh6:
	ldr	x25, [x25, _tte_link@GOTPAGEOFF]
Lloh7:
	adrp	x26, _TD_PV@GOTPAGE
Lloh8:
	ldr	x26, [x26, _TD_PV@GOTPAGEOFF]
Lloh9:
	adrp	x27, _TD_W@GOTPAGE
Lloh10:
	ldr	x27, [x27, _TD_W@GOTPAGEOFF]
Lloh11:
	adrp	x28, _TD_V@GOTPAGE
Lloh12:
	ldr	x28, [x28, _TD_V@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x28]
	bic	w8, w8, w9
	str	w8, [x21]
	mov	x0, x23
	mov	x1, x24
	bl	_tlb_page_demap
	ldr	w2, [x25]
	mov	x0, x20
	mov	x1, x21
	bl	_TAILQ_REMOVE
	ldr	w8, [x23]
	sub	w8, w8, #1
	str	w8, [x23]
	mov	x0, x19
	mov	x1, x24
	bl	_pmap_cache_remove
	mov	x0, x21
	bl	_TTE_ZERO
	mov	x0, x23
	bl	_PMAP_UNLOCK
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x22
	cbz	x22, LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x21
	bl	_TAILQ_NEXT
	mov	x22, x0
	ldr	w8, [x21]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_TTE_GET_PMAP
	mov	x23, x0
	mov	x0, x21
	bl	_TTE_GET_VA
	mov	x24, x0
	mov	x0, x23
	bl	_PMAP_LOCK
	ldr	w8, [x21]
Lloh13:
	adrp	x9, _TD_WIRED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TD_WIRED@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x23, #4]
	sub	w9, w9, #1
	str	w9, [x23, #4]
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh16:
	adrp	x9, _TD_REF@GOTPAGE
Lloh17:
	ldr	x9, [x9, _TD_REF@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh19:
	adrp	x8, _PGA_REFERENCED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PGA_REFERENCED@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vm_page_aflag_set
	ldr	w8, [x21]
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_vm_page_dirty
	ldr	w8, [x21]
	b	LBB0_2
LBB0_11:
Lloh22:
	adrp	x8, _PGA_WRITEABLE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PGA_WRITEABLE@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vm_page_aflag_clear
Lloh25:
	adrp	x0, _tte_list_global_lock@GOTPAGE
Lloh26:
	ldr	x0, [x0, _tte_list_global_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_rw_wunlock
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_VPO_UNMANAGED,4,2              ; @VPO_UNMANAGED
	.comm	_tte_list_global_lock,4,2       ; @tte_list_global_lock
	.comm	_tte_link,4,2                   ; @tte_link
	.comm	_TD_PV,4,2                      ; @TD_PV
	.comm	_TD_WIRED,4,2                   ; @TD_WIRED
	.comm	_TD_REF,4,2                     ; @TD_REF
	.comm	_PGA_REFERENCED,4,2             ; @PGA_REFERENCED
	.comm	_TD_W,4,2                       ; @TD_W
	.comm	_TD_V,4,2                       ; @TD_V
	.comm	_PGA_WRITEABLE,4,2              ; @PGA_WRITEABLE
.subsections_via_symbols
