	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_remove_pages_pv
_pmap_remove_pages_pv:                  ## @pmap_remove_pages_pv
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r13
	movl	%edi, %r15d
	testl	%r8d, %r8d
	je	LBB0_10
## %bb.1:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	_Ln_ENTRIES@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%r15d, %edi
	callq	_pmap_resident_count_dec
	movl	24(%r13), %edi
	callq	_pa_to_pvh
	movq	%rax, %rbx
	movq	_pv_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	callq	_TAILQ_REMOVE
	incl	4(%rbx)
	movq	%rbx, %rdi
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	cmpq	$0, (%r14)
	jle	LBB0_8
## %bb.3:
	movq	_PGA_WRITEABLE@GOTPCREL(%rip), %r12
	movq	%r13, %rbx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$40, %rbx
	movq	(%r14), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(,%rax,8), %rax
	addq	%r13, %rax
	cmpq	%rax, %rbx
	jae	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leaq	28(%rbx), %rdi
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %esi
	testl	%esi, (%rbx)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_vm_page_aflag_clear
	jmp	LBB0_7
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_pmap_remove_pt_page
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	_VM_PAGE_BITS_ALL@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movl	%r15d, %edi
	movl	$1, %esi
	callq	_pmap_resident_count_dec
	movq	16(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%r14), %rax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	$0, 16(%rbx)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pmap_add_delayed_free_list     ## TAILCALL
LBB0_10:
	movl	%r15d, %edi
	movl	$1, %esi
	callq	_pmap_resident_count_dec
	leaq	28(%r13), %rbx
	movq	_pv_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_TAILQ_REMOVE
	incl	32(%r13)
	movq	%rbx, %rdi
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	_PGA_WRITEABLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, (%r13)
	je	LBB0_13
## %bb.12:
	movl	24(%r13), %edi
	callq	_pa_to_pvh
	movq	%rax, %rdi
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movl	(%rbx), %esi
	movq	%r13, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vm_page_aflag_clear            ## TAILCALL
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Ln_ENTRIES,8,3                 ## @Ln_ENTRIES
	.comm	_pv_next,4,2                    ## @pv_next
	.comm	_PGA_WRITEABLE,4,2              ## @PGA_WRITEABLE
	.comm	_VM_PAGE_BITS_ALL,8,3           ## @VM_PAGE_BITS_ALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_remove_pages: pte page not promoted"

L_.str.1:                               ## @.str.1
	.asciz	"pmap_remove_pages: pte page ref count error"

	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_pmap_remove_pages_pv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_remove_pages_pv
_pmap_remove_pages_pv:                  ; @pmap_remove_pages_pv
	.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
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
	cbz	w4, LBB0_4
; %bb.1:
	mov	x20, x3
Lloh0:
	adrp	x24, _Ln_ENTRIES@GOTPAGE
Lloh1:
	ldr	x24, [x24, _Ln_ENTRIES@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_pmap_resident_count_dec
	ldr	w0, [x19, #24]
	bl	_pa_to_pvh
	mov	x23, x0
Lloh2:
	adrp	x8, _pv_next@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pv_next@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_TAILQ_REMOVE
	ldr	w8, [x23, #4]
	add	w8, w8, #1
	str	w8, [x23, #4]
	mov	x0, x23
	bl	_TAILQ_EMPTY
	ldr	x8, [x24]
	cmp	x0, #0
	ccmp	x8, #1, #8, ne
	b.ge	LBB0_9
LBB0_2:
	ldr	w1, [x22]
	mov	x0, x21
	bl	_pmap_remove_pt_page
	cbz	x0, LBB0_8
; %bb.3:
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh5:
	adrp	x9, _VM_PAGE_BITS_ALL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VM_PAGE_BITS_ALL@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	mov	x0, x21
	mov	w1, #1
	bl	_pmap_resident_count_dec
	ldr	x8, [x19, #16]
	ldr	x9, [x24]
	cmp	x8, x9
	cset	w0, eq
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	str	xzr, [x19, #16]
Lloh12:
	adrp	x8, _FALSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	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	_pmap_add_delayed_free_list
LBB0_4:
	mov	x0, x21
	mov	w1, #1
	bl	_pmap_resident_count_dec
	add	x20, x19, #28
Lloh15:
	adrp	x8, _pv_next@GOTPAGE
Lloh16:
	ldr	x8, [x8, _pv_next@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x22
	bl	_TAILQ_REMOVE
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
	mov	x0, x20
	bl	_TAILQ_EMPTY
	cbz	x0, LBB0_8
; %bb.5:
	ldr	w8, [x19]
Lloh18:
	adrp	x20, _PGA_WRITEABLE@GOTPAGE
Lloh19:
	ldr	x20, [x20, _PGA_WRITEABLE@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	ldr	w0, [x19, #24]
	bl	_pa_to_pvh
	bl	_TAILQ_EMPTY
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w1, [x20]
	mov	x0, x19
	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_page_aflag_clear
LBB0_8:
	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
LBB0_9:
	mov	w25, #40
Lloh20:
	adrp	x26, _PGA_WRITEABLE@GOTPAGE
Lloh21:
	ldr	x26, [x26, _PGA_WRITEABLE@GOTPAGEOFF]
	mov	x23, x19
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x23, x23, #40
	ldr	x8, [x24]
	madd	x8, x8, x25, x19
	cmp	x23, x8
	b.hs	LBB0_2
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x0, x23, #28
	bl	_TAILQ_EMPTY
	cbz	x0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x23]
	ldr	w1, [x26]
	tst	w1, w8
	b.eq	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x23
	bl	_vm_page_aflag_clear
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_Ln_ENTRIES,8,3                 ; @Ln_ENTRIES
	.comm	_pv_next,4,2                    ; @pv_next
	.comm	_PGA_WRITEABLE,4,2              ; @PGA_WRITEABLE
	.comm	_VM_PAGE_BITS_ALL,8,3           ; @VM_PAGE_BITS_ALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_remove_pages: pte page not promoted"

l_.str.1:                               ; @.str.1
	.asciz	"pmap_remove_pages: pte page ref count error"

	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_pmap_remove_pages_pv
.subsections_via_symbols
