	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_ts_referenced             ## -- Begin function pmap_ts_referenced
	.p2align	4, 0x90
_pmap_ts_referenced:                    ## @pmap_ts_referenced
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_VPO_UNMANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%r14), %eax
	sete	%dil
	movq	%r14, %rsi
	callq	_KASSERT
	leaq	-104(%rbp), %rdi
	callq	_SLIST_INIT
	movq	%r14, %rdi
	callq	_VM_PAGE_TO_PHYS
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PHYS_TO_PV_LIST_LOCK
	movq	%rax, -56(%rbp)
	movq	_PG_FICTITIOUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%r14)
	movq	%rbx, -144(%rbp)                ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	_pv_dummy@GOTPCREL(%rip), %rbx
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_pa_to_pvh
	movq	%rax, %rbx
	movq	-56(%rbp), %rax
LBB0_3:
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	movq	%rax, %rdi
	callq	_rw_wlock
	leaq	4(%rbx), %r15
	leaq	12(%r14), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_29 Depth 2
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_26
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r15
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%r15, %r15
	cmoveq	%rbx, %r15
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_PV_PMAP
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_PMAP_TRYLOCK
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	-128(%rbp), %r12                ## 8-byte Reload
	movl	(%r12), %r15d
	movq	-56(%rbp), %rdi
	callq	_rw_wunlock
	movq	%r14, %rdi
	callq	_PMAP_LOCK
	movq	-56(%rbp), %rdi
	callq	_rw_wlock
	cmpl	(%r12), %r15d
	jne	LBB0_47
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	%r14, %rdi
	callq	_pmap_accessed_bit
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_pmap_modified_bit
	movq	%rax, %r13
	movq	%r14, %rdi
	callq	_pmap_rw_bit
	movq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	callq	_pmap_pde
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	(%rax), %rbx
	orq	%r13, %r15
	movq	%rbx, %rax
	notq	%rax
	testq	%rax, %r15
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_vm_page_dirty
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=2
	testq	%r12, %rbx
	je	LBB0_21
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	movq	-144(%rbp), %rax                ## 8-byte Reload
	shrq	%cl, %rax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rdx
	movq	_PDRSHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shrq	%cl, %rdx
	xorq	%r14, %rax
	xorq	%rdx, %rax
	movq	_NPTEPG@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	decq	%rcx
	testq	%rcx, %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	_PG_W@GOTPCREL(%rip), %rax
	testq	%rbx, (%rax)
	je	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%r14, %rdi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	_pv_next@GOTPCREL(%rip), %rbx
	jmp	LBB0_22
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_safe_to_clear_referenced
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movq	%r12, %rsi
	callq	_atomic_clear_long
	movq	(%r13), %rsi
	movq	%r14, %rdi
	callq	_pmap_invalidate_page
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_19
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	(%r13), %rdx
	movq	%r14, %rdi
	movq	-120(%rbp), %r13                ## 8-byte Reload
	movq	%r13, %rsi
	leaq	-56(%rbp), %r15
	movq	%r15, %rcx
	callq	_pmap_demote_pde_locked
	movq	_TRUE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_VM_PAGE_TO_PHYS
	movq	_PG_PS_FRAME@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rbx
	subq	%rbx, %rax
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	addq	%rax, %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_pmap_pde_to_pte
	movq	(%r13), %rcx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	xorl	%r8d, %r8d
	movq	%r15, %r9
	callq	_pmap_remove_pte
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_pmap_invalidate_page
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%r12, %rbx
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r12
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_VM_PAGE_TO_PV_LIST_LOCK
	xorl	%r15d, %r15d
	cmpq	%rax, %r12
	sete	%r15b
	movq	%r13, %rdi
	callq	_VM_PAGE_TO_PV_LIST_LOCK
	movl	%r15d, %edi
	movq	%r13, %rsi
	callq	_KASSERT
	testq	%rbx, %rbx
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	cmpq	-48(%rbp), %r15                 ## 8-byte Folded Reload
	movl	$0, %eax
	cmoveq	%rax, %r15
	movq	%r14, %rdi
	callq	_PMAP_UNLOCK
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%r14, %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	_pv_next@GOTPCREL(%rip), %rbx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_22:                                ##   in Loop: Header=BB0_6 Depth=2
	callq	_PMAP_UNLOCK
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_TAILQ_NEXT
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_6 Depth=2
	movl	(%rbx), %edx
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_TAILQ_REMOVE
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	-128(%rbp), %rax                ## 8-byte Reload
	incl	(%rax)
LBB0_24:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %eax
	movq	_PMAP_TS_REFERENCED_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_51
## %bb.25:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	cmpq	%r15, %rax
	jne	LBB0_6
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
LBB0_27:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_51
## %bb.28:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r13
	movq	%rax, %r14
	.p2align	4, 0x90
LBB0_29:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%r13, %r13
	cmoveq	%r14, %r13
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_PV_PMAP
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PMAP_TRYLOCK
	testl	%eax, %eax
	jne	LBB0_32
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=2
	movq	-128(%rbp), %r12                ## 8-byte Reload
	movl	(%r12), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	8(%r13), %r15d
	movq	-56(%rbp), %rdi
	callq	_rw_wunlock
	movq	%rbx, %rdi
	callq	_PMAP_LOCK
	movq	-56(%rbp), %rdi
	callq	_rw_wlock
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	(%r12), %eax
	jne	LBB0_49
## %bb.31:                              ##   in Loop: Header=BB0_29 Depth=2
	cmpl	8(%r13), %r15d
	jne	LBB0_49
LBB0_32:                                ##   in Loop: Header=BB0_29 Depth=2
	movq	%rbx, %rdi
	callq	_pmap_accessed_bit
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_pmap_modified_bit
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_pmap_rw_bit
	movq	%rax, %r15
	movq	(%r14), %rsi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_pmap_pde
	movq	%rax, %r13
	movq	_PG_PS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%edi, %edi
	andq	(%r13), %rax
	sete	%dil
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_KASSERT
	movq	(%r14), %rsi
	movq	%r13, %rdi
	callq	_pmap_pde_to_pte
	movq	%rax, %r12
	movq	(%rax), %rsi
	orq	-136(%rbp), %r15                ## 8-byte Folded Reload
	movq	%rsi, %rax
	notq	%rax
	testq	%rax, %r15
	jne	LBB0_34
## %bb.33:                              ##   in Loop: Header=BB0_29 Depth=2
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_vm_page_dirty
	movq	(%r12), %rsi
LBB0_34:                                ##   in Loop: Header=BB0_29 Depth=2
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	testq	%rbx, %rsi
	je	LBB0_39
## %bb.35:                              ##   in Loop: Header=BB0_29 Depth=2
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_safe_to_clear_referenced
	testq	%rax, %rax
	je	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_29 Depth=2
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_atomic_clear_long
	movq	(%r14), %rsi
	movq	%r15, %rdi
	callq	_pmap_invalidate_page
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r15, %rdi
	jmp	LBB0_40
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_29 Depth=2
	movq	_PG_W@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, (%r12)
	je	LBB0_43
## %bb.38:                              ##   in Loop: Header=BB0_29 Depth=2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
LBB0_39:                                ##   in Loop: Header=BB0_29 Depth=2
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_40:                                ##   in Loop: Header=BB0_29 Depth=2
	callq	_PMAP_UNLOCK
	movq	_pv_next@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_TAILQ_NEXT
	testq	%rax, %rax
	je	LBB0_44
## %bb.41:                              ##   in Loop: Header=BB0_29 Depth=2
	movl	(%r15), %edx
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	incl	8(%rax)
	jmp	LBB0_45
LBB0_43:                                ##   in Loop: Header=BB0_29 Depth=2
	movq	(%r14), %rdx
	movq	(%r13), %rcx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r12, %rsi
	leaq	-104(%rbp), %r8
	leaq	-56(%rbp), %r9
	callq	_pmap_remove_pte
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_pmap_invalidate_page
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	cmpq	%r14, %r13
	movl	$0, %eax
	cmoveq	%rax, %r13
	movq	-56(%rbp), %r15
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_VM_PAGE_TO_PV_LIST_LOCK
	xorl	%r14d, %r14d
	cmpq	%rax, %r15
	sete	%r14b
	movq	%r12, %rdi
	callq	_VM_PAGE_TO_PV_LIST_LOCK
	movl	%r14d, %edi
	movq	%r12, %rsi
	callq	_KASSERT
	movq	%rbx, %rdi
	callq	_PMAP_UNLOCK
LBB0_44:                                ##   in Loop: Header=BB0_29 Depth=2
	movq	-112(%rbp), %rbx                ## 8-byte Reload
LBB0_45:                                ##   in Loop: Header=BB0_29 Depth=2
	movq	%rbx, %rdi
	callq	_TAILQ_FIRST
	cmpq	%r13, %rax
	je	LBB0_51
## %bb.46:                              ##   in Loop: Header=BB0_29 Depth=2
	movq	%rax, %r14
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %eax
	movq	_PMAP_TS_REFERENCED_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_29
	jmp	LBB0_51
LBB0_49:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_50
LBB0_47:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	%r14, %rbx
LBB0_50:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_PMAP_UNLOCK
	jmp	LBB0_4
LBB0_51:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	addl	-88(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rdi
	callq	_rw_wunlock
	leaq	-104(%rbp), %rdi
	movl	$1, %esi
	callq	_vm_page_free_pages_toq
	movl	%ebx, %eax
	addq	$104, %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	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_PDRSHIFT,8,3                   ## @PDRSHIFT
	.comm	_NPTEPG,4,2                     ## @NPTEPG
	.comm	_PG_W,8,3                       ## @PG_W
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_PG_PS_FRAME,8,3                ## @PG_PS_FRAME
	.comm	_pv_next,4,2                    ## @pv_next
	.comm	_PMAP_TS_REFERENCED_MAX,4,2     ## @PMAP_TS_REFERENCED_MAX
	.comm	_PG_PS,8,3                      ## @PG_PS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_ts_referenced             ; -- Begin function pmap_ts_referenced
	.p2align	2
_pmap_ts_referenced:                    ; @pmap_ts_referenced
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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, #48
	bl	_SLIST_INIT
	mov	x0, x19
	bl	_VM_PAGE_TO_PHYS
	mov	x20, x0
	bl	_PHYS_TO_PV_LIST_LOCK
	str	x0, [sp, #56]
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _PG_FICTITIOUS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PG_FICTITIOUS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	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, x20
	bl	_pa_to_pvh
	mov	x20, x0
	ldr	x0, [sp, #56]
LBB0_3:
	bl	_rw_wlock
	mov	w28, #0
	str	x20, [sp, #24]                  ; 8-byte Folded Spill
	add	x20, x20, #4
	add	x8, x19, #12
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	str	x20, [sp, #32]                  ; 8-byte Folded Spill
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_28 Depth 2
	mov	x0, x20
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_25
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	str	wzr, [sp, #44]                  ; 4-byte Folded Spill
	mov	x26, x0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x25, #0
	csel	x25, x26, x25, eq
	mov	x0, x26
	bl	_PV_PMAP
	mov	x24, x0
	bl	_PMAP_TRYLOCK
	cbnz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x21, [sp, #24]                  ; 8-byte Folded Reload
	ldr	w20, [x21]
	ldr	x0, [sp, #56]
	bl	_rw_wunlock
	mov	x0, x24
	bl	_PMAP_LOCK
	ldr	x0, [sp, #56]
	bl	_rw_wlock
	ldr	w8, [x21]
	cmp	w20, w8
	b.ne	LBB0_44
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	str	w28, [sp, #40]                  ; 4-byte Folded Spill
	mov	x0, x24
	bl	_pmap_accessed_bit
	mov	x20, x0
	mov	x0, x24
	bl	_pmap_modified_bit
	mov	x22, x0
	mov	x0, x24
	bl	_pmap_rw_bit
	mov	x21, x0
	ldr	x28, [x26]
	mov	x0, x24
	mov	x1, x28
	bl	_pmap_pde
	mov	x27, x0
	ldr	x23, [x0]
	orr	x8, x21, x22
	bics	xzr, x8, x23
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x19
	bl	_vm_page_dirty
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	tst	x23, x20
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh8:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	lsr	x8, x9, x8
	ldr	x9, [x26]
Lloh11:
	adrp	x10, _PDRSHIFT@GOTPAGE
Lloh12:
	ldr	x10, [x10, _PDRSHIFT@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	lsr	x9, x9, x10
	eor	x8, x8, x24
	eor	x8, x8, x9
Lloh14:
	adrp	x9, _NPTEPG@GOTPAGE
Lloh15:
	ldr	x9, [x9, _NPTEPG@GOTPAGEOFF]
Lloh16:
	ldrsw	x9, [x9]
	sub	x9, x9, #1
	tst	x8, x9
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh17:
	adrp	x8, _PG_W@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PG_W@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	tst	x8, x23
	b.eq	LBB0_19
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	add	w8, w8, #1
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w28, [sp, #40]                  ; 4-byte Folded Reload
Lloh20:
	adrp	x22, _pv_next@GOTPAGE
Lloh21:
	ldr	x22, [x22, _pv_next@GOTPAGEOFF]
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x24
	bl	_PMAP_UNLOCK
	ldr	w1, [x22]
	mov	x0, x26
	bl	_TAILQ_NEXT
	cbz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w2, [x22]
	ldr	x20, [sp, #32]                  ; 8-byte Folded Reload
	mov	x0, x20
	mov	x1, x26
	bl	_TAILQ_REMOVE
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x26
	bl	_TAILQ_INSERT_TAIL
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w8, [x9]
	add	w8, w8, #1
	str	w8, [x9]
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=2
Lloh22:
	adrp	x8, _PMAP_TS_REFERENCED_MAX@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PMAP_TS_REFERENCED_MAX@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	add	w9, w28, w9
	cmp	w9, w8
	b.ge	LBB0_45
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	bl	_TAILQ_FIRST
	mov	x26, x0
	cmp	x0, x25
	b.ne	LBB0_6
	b	LBB0_26
LBB0_19:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x24
	mov	x1, x23
	bl	_safe_to_clear_referenced
	cbz	x0, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x27
	mov	x1, x20
	bl	_atomic_clear_long
	ldr	x1, [x26]
	mov	x0, x24
	bl	_pmap_invalidate_page
Lloh25:
	adrp	x8, _FALSE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh27:
	ldr	x21, [x8]
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x2, [x26]
	add	x3, sp, #56
	mov	x0, x24
	mov	x1, x27
	bl	_pmap_demote_pde_locked
Lloh28:
	adrp	x8, _TRUE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh30:
	ldr	x21, [x8]
	cbz	x0, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x19
	bl	_VM_PAGE_TO_PHYS
Lloh31:
	adrp	x8, _PG_PS_FRAME@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PG_PS_FRAME@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	and	x8, x8, x23
	sub	x8, x0, x8
	add	x20, x8, x28
	mov	x0, x27
	mov	x1, x20
	bl	_pmap_pde_to_pte
	mov	x1, x0
	ldr	x3, [x27]
	add	x5, sp, #56
	mov	x0, x24
	mov	x2, x20
	mov	x4, #0
	bl	_pmap_remove_pte
	mov	x0, x24
	mov	x1, x20
	bl	_pmap_invalidate_page
LBB0_23:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w28, [sp, #40]                  ; 4-byte Folded Reload
Lloh34:
	adrp	x22, _pv_next@GOTPAGE
Lloh35:
	ldr	x22, [x22, _pv_next@GOTPAGEOFF]
	add	w28, w28, #1
	ldr	x20, [sp, #56]
	mov	x0, x19
	bl	_VM_PAGE_TO_PV_LIST_LOCK
	cmp	x20, x0
	cset	w20, eq
	mov	x0, x19
	bl	_VM_PAGE_TO_PV_LIST_LOCK
	mov	x0, x20
	mov	x1, x19
	bl	_KASSERT
	cbz	x21, LBB0_15
; %bb.24:                               ;   in Loop: Header=BB0_6 Depth=2
	cmp	x25, x26
	csel	x25, xzr, x25, eq
	mov	x0, x24
	bl	_PMAP_UNLOCK
	b	LBB0_17
LBB0_25:                                ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [sp, #44]                  ; 4-byte Folded Spill
LBB0_26:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_45
; %bb.27:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	mov	x26, x0
LBB0_28:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x25, #0
	csel	x25, x26, x25, eq
	mov	x0, x26
	bl	_PV_PMAP
	mov	x24, x0
	bl	_PMAP_TRYLOCK
	cbnz	w0, LBB0_31
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=2
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	ldr	w21, [x22]
	ldr	w20, [x19, #8]
	ldr	x0, [sp, #56]
	bl	_rw_wunlock
	mov	x0, x24
	bl	_PMAP_LOCK
	ldr	x0, [sp, #56]
	bl	_rw_wlock
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_44
; %bb.30:                               ;   in Loop: Header=BB0_28 Depth=2
	ldr	w8, [x19, #8]
	cmp	w20, w8
	b.ne	LBB0_44
LBB0_31:                                ;   in Loop: Header=BB0_28 Depth=2
	mov	x0, x24
	bl	_pmap_accessed_bit
	mov	x27, x0
	mov	x0, x24
	bl	_pmap_modified_bit
	mov	x21, x0
	mov	x0, x24
	bl	_pmap_rw_bit
	mov	x22, x0
	ldr	x1, [x26]
	mov	x0, x24
	bl	_pmap_pde
	mov	x20, x0
	ldr	x8, [x0]
Lloh36:
	adrp	x9, _PG_PS@GOTPAGE
Lloh37:
	ldr	x9, [x9, _PG_PS@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	tst	x9, x8
	cset	w0, eq
	mov	x1, x19
	bl	_KASSERT
	ldr	x1, [x26]
	mov	x0, x20
	bl	_pmap_pde_to_pte
	mov	x23, x0
	ldr	x1, [x0]
	orr	x8, x22, x21
	bics	xzr, x8, x1
	b.ne	LBB0_33
; %bb.32:                               ;   in Loop: Header=BB0_28 Depth=2
	mov	x0, x19
	bl	_vm_page_dirty
	ldr	x1, [x23]
LBB0_33:                                ;   in Loop: Header=BB0_28 Depth=2
	tst	x1, x27
	b.eq	LBB0_38
; %bb.34:                               ;   in Loop: Header=BB0_28 Depth=2
	mov	x0, x24
	bl	_safe_to_clear_referenced
	cbz	x0, LBB0_36
; %bb.35:                               ;   in Loop: Header=BB0_28 Depth=2
	mov	x0, x23
	mov	x1, x27
	bl	_atomic_clear_long
	ldr	x1, [x26]
	mov	x0, x24
	bl	_pmap_invalidate_page
	add	w28, w28, #1
	b	LBB0_38
LBB0_36:                                ;   in Loop: Header=BB0_28 Depth=2
	ldr	x8, [x23]
Lloh39:
	adrp	x9, _PG_W@GOTPAGE
Lloh40:
	ldr	x9, [x9, _PG_W@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	tst	x9, x8
	b.eq	LBB0_40
; %bb.37:                               ;   in Loop: Header=BB0_28 Depth=2
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	add	w8, w8, #1
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
LBB0_38:                                ;   in Loop: Header=BB0_28 Depth=2
Lloh42:
	adrp	x21, _pv_next@GOTPAGE
Lloh43:
	ldr	x21, [x21, _pv_next@GOTPAGEOFF]
	mov	x0, x24
	bl	_PMAP_UNLOCK
	ldr	w1, [x21]
	mov	x0, x26
	bl	_TAILQ_NEXT
	cbz	x0, LBB0_41
; %bb.39:                               ;   in Loop: Header=BB0_28 Depth=2
	ldr	w2, [x21]
	ldr	x20, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x20
	mov	x1, x26
	bl	_TAILQ_REMOVE
	ldr	w2, [x21]
	mov	x0, x20
	mov	x1, x26
	bl	_TAILQ_INSERT_TAIL
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	b	LBB0_42
LBB0_40:                                ;   in Loop: Header=BB0_28 Depth=2
	ldr	x2, [x26]
	ldr	x3, [x20]
	add	x4, sp, #48
	add	x5, sp, #56
	mov	x0, x24
	mov	x1, x23
	bl	_pmap_remove_pte
	ldr	x1, [x26]
	mov	x0, x24
	bl	_pmap_invalidate_page
	add	w28, w28, #1
	cmp	x25, x26
	csel	x25, xzr, x25, eq
	ldr	x20, [sp, #56]
	mov	x0, x19
	bl	_VM_PAGE_TO_PV_LIST_LOCK
	cmp	x20, x0
	cset	w20, eq
	mov	x0, x19
	bl	_VM_PAGE_TO_PV_LIST_LOCK
	mov	x0, x20
	mov	x1, x19
	bl	_KASSERT
	mov	x0, x24
	bl	_PMAP_UNLOCK
LBB0_41:                                ;   in Loop: Header=BB0_28 Depth=2
	ldr	x20, [sp, #16]                  ; 8-byte Folded Reload
LBB0_42:                                ;   in Loop: Header=BB0_28 Depth=2
	mov	x0, x20
	bl	_TAILQ_FIRST
	cmp	x0, x25
	b.eq	LBB0_45
; %bb.43:                               ;   in Loop: Header=BB0_28 Depth=2
	mov	x26, x0
Lloh44:
	adrp	x8, _PMAP_TS_REFERENCED_MAX@GOTPAGE
Lloh45:
	ldr	x8, [x8, _PMAP_TS_REFERENCED_MAX@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	add	w9, w28, w9
	cmp	w9, w8
	b.lt	LBB0_28
	b	LBB0_45
LBB0_44:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x20, [sp, #32]                  ; 8-byte Folded Reload
	mov	x0, x24
	bl	_PMAP_UNLOCK
	b	LBB0_4
LBB0_45:
	ldr	x0, [sp, #56]
	bl	_rw_wunlock
	add	x0, sp, #48
	mov	w1, #1
	bl	_vm_page_free_pages_toq
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	add	w0, w8, w28
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.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	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_PDRSHIFT,8,3                   ; @PDRSHIFT
	.comm	_NPTEPG,4,2                     ; @NPTEPG
	.comm	_PG_W,8,3                       ; @PG_W
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_PG_PS_FRAME,8,3                ; @PG_PS_FRAME
	.comm	_pv_next,4,2                    ; @pv_next
	.comm	_PMAP_TS_REFERENCED_MAX,4,2     ; @PMAP_TS_REFERENCED_MAX
	.comm	_PG_PS,8,3                      ; @PG_PS
.subsections_via_symbols
