	.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	$88, %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	-112(%rbp), %rdi
	callq	_SLIST_INIT
	movq	%r14, %rdi
	callq	_VM_PAGE_TO_PHYS
	movq	%rax, %rcx
	movq	_PG_FICTITIOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	_pv_dummy@GOTPCREL(%rip), %r13
	jmp	LBB0_3
LBB0_2:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_pa_to_pvh
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, %r13
LBB0_3:
	movq	%rcx, %rdi
	callq	_PHYS_TO_PV_LIST_LOCK
	movq	%rax, %rbx
	movq	_pvh_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_rlock
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_rw_wlock
	leaq	4(%r13), %r15
	leaq	12(%r14), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##     Child Loop BB0_23 Depth 2
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rcx
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_PV_PMAP
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_PMAP_TRYLOCK
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	(%r13), %r14d
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_rw_wunlock
	movq	%r12, %rdi
	callq	_PMAP_LOCK
	movq	%r15, %rdi
	callq	_rw_wlock
	cmpl	(%r13), %r14d
	jne	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	(%rbx), %r14
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_pmap_l2
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_pmap_load
	movl	%eax, %r13d
	movq	_PTE_D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PTE_W@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%r13d, %ecx
	notl	%ecx
	testl	%ecx, %eax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_vm_page_dirty
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	_PTE_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r13d, %esi
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	shrq	%cl, %rax
	movq	(%rbx), %rdx
	movq	_L2_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shrq	%cl, %rdx
	xorq	%r12, %rax
	xorq	%rdx, %rax
	movq	_Ln_ENTRIES@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	decq	%rcx
	testq	%rcx, %rax
	jne	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	_PTE_SW_WIRED@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_15
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_PMAP_UNLOCK
	movq	_pv_next@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_TAILQ_NEXT
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	(%r14), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r14), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	incl	(%r13)
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %eax
	movq	_PMAP_TS_REFERENCED_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_37
## %bb.20:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	cmpq	%rcx, %rax
	jne	LBB0_7
	jmp	LBB0_21
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	%r15, %rdi
	callq	_pmap_clear_bits
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_pmap_invalidate_page
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_37
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rdx
	movq	%rax, %r15
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	callq	_PV_PMAP
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_PMAP_TRYLOCK
	testl	%eax, %eax
	jne	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=2
	movl	(%r13), %eax
	movl	%eax, -116(%rbp)                ## 4-byte Spill
	movq	%r14, %rbx
	movl	8(%r14), %r13d
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_rw_wunlock
	movq	%r12, %rdi
	callq	_PMAP_LOCK
	movq	%r14, %rdi
	callq	_rw_wlock
	movl	-116(%rbp), %eax                ## 4-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpl	(%rcx), %eax
	jne	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_23 Depth=2
	cmpl	8(%rbx), %r13d
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_9
LBB0_27:                                ##   in Loop: Header=BB0_23 Depth=2
	movq	(%r15), %rsi
	movq	%r12, %rdi
	callq	_pmap_l2
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_pmap_load
	xorl	%edi, %edi
	movq	_PTE_RX@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_pmap_l2_to_l3
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_pmap_load
	movl	%eax, %ebx
	movq	_PTE_D@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_23 Depth=2
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_vm_page_dirty
LBB0_29:                                ##   in Loop: Header=BB0_23 Depth=2
	movq	_PTE_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%ebx, %esi
	je	LBB0_33
## %bb.30:                              ##   in Loop: Header=BB0_23 Depth=2
	movq	_PTE_SW_WIRED@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_31
## %bb.32:                              ##   in Loop: Header=BB0_23 Depth=2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_33
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_23 Depth=2
	movq	%r14, %rdi
	callq	_pmap_clear_bits
	movq	(%r15), %rsi
	movq	%r12, %rdi
	callq	_pmap_invalidate_page
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_33:                                ##   in Loop: Header=BB0_23 Depth=2
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_PMAP_UNLOCK
	movq	_pv_next@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_TAILQ_NEXT
	testq	%rax, %rax
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_23 Depth=2
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_TAILQ_INSERT_TAIL
	incl	8(%r14)
LBB0_35:                                ##   in Loop: Header=BB0_23 Depth=2
	movq	%rbx, %rdi
	callq	_TAILQ_FIRST
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	cmpq	%rdx, %rax
	je	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_23 Depth=2
	movq	%rax, %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %eax
	movq	_PMAP_TS_REFERENCED_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_23
	jmp	LBB0_37
LBB0_25:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %r13                 ## 8-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_PMAP_UNLOCK
	jmp	LBB0_4
LBB0_37:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	addl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_rw_wunlock
	movq	_pvh_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_runlock
	leaq	-112(%rbp), %rdi
	xorl	%esi, %esi
	callq	_vm_page_free_pages_toq
	movl	%ebx, %eax
	addq	$88, %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	_pvh_global_lock,4,2            ## @pvh_global_lock
	.comm	_PTE_W,4,2                      ## @PTE_W
	.comm	_PTE_D,4,2                      ## @PTE_D
	.comm	_PTE_A,4,2                      ## @PTE_A
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_L2_SHIFT,8,3                   ## @L2_SHIFT
	.comm	_Ln_ENTRIES,4,2                 ## @Ln_ENTRIES
	.comm	_PTE_SW_WIRED,4,2               ## @PTE_SW_WIRED
	.comm	_pv_next,4,2                    ## @pv_next
	.comm	_PMAP_TS_REFERENCED_MAX,4,2     ## @PMAP_TS_REFERENCED_MAX
	.comm	_PTE_RX,4,2                     ## @PTE_RX
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"pmap_ts_referenced: found an invalid l2 table"

.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, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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, #40
	bl	_SLIST_INIT
	mov	x0, x19
	bl	_VM_PAGE_TO_PHYS
	mov	x20, x0
	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	x22, _pv_dummy@GOTPAGE
Lloh7:
	ldr	x22, [x22, _pv_dummy@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_pa_to_pvh
	mov	x22, x0
LBB0_3:
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	mov	x0, x20
	bl	_PHYS_TO_PV_LIST_LOCK
	mov	x20, x0
Lloh8:
	adrp	x0, _pvh_global_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _pvh_global_lock@GOTPAGEOFF]
	bl	_rw_rlock
	str	x20, [sp, #16]                  ; 8-byte Folded Spill
	mov	x0, x20
	bl	_rw_wlock
	mov	w25, #0
	add	x23, x22, #4
	add	x8, x19, #12
	stp	x8, x23, [sp, #24]              ; 16-byte Folded Spill
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_23 Depth 2
	mov	x0, x23
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_20
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x27, x0
	mov	w24, #0
	mov	x28, x0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x28
	bl	_PV_PMAP
	mov	x26, x0
	bl	_PMAP_TRYLOCK
	cbnz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w20, [x22]
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x21
	bl	_rw_wunlock
	mov	x0, x26
	bl	_PMAP_LOCK
	mov	x0, x21
	bl	_rw_wlock
	ldr	w8, [x22]
	cmp	w20, w8
	b.ne	LBB0_37
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x23, x25
	ldr	x25, [x28]
	mov	x0, x26
	mov	x1, x25
	bl	_pmap_l2
	mov	x20, x0
	bl	_pmap_load
	mov	x21, x0
Lloh10:
	adrp	x8, _PTE_W@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PTE_W@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _PTE_D@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PTE_D@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	wzr, w8, w0
	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
Lloh16:
	adrp	x8, _PTE_A@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PTE_A@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	tst	w1, w21
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh19:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	lsr	x8, x9, x8
	ldr	x9, [x28]
Lloh22:
	adrp	x10, _L2_SHIFT@GOTPAGE
Lloh23:
	ldr	x10, [x10, _L2_SHIFT@GOTPAGEOFF]
Lloh24:
	ldr	x10, [x10]
	lsr	x9, x9, x10
	eor	x8, x8, x26
	eor	x8, x8, x9
Lloh25:
	adrp	x9, _Ln_ENTRIES@GOTPAGE
Lloh26:
	ldr	x9, [x9, _Ln_ENTRIES@GOTPAGEOFF]
Lloh27:
	ldrsw	x9, [x9]
	sub	x9, x9, #1
	tst	x8, x9
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh28:
	adrp	x8, _PTE_SW_WIRED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PTE_SW_WIRED@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_19
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=2
	add	w24, w24, #1
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x25, x23
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
Lloh31:
	adrp	x20, _pv_next@GOTPAGE
Lloh32:
	ldr	x20, [x20, _pv_next@GOTPAGEOFF]
	mov	x0, x26
	bl	_PMAP_UNLOCK
	ldr	w1, [x20]
	mov	x0, x28
	bl	_TAILQ_NEXT
	cbz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w2, [x20]
	mov	x0, x23
	mov	x1, x28
	bl	_TAILQ_REMOVE
	ldr	w2, [x20]
	mov	x0, x23
	mov	x1, x28
	bl	_TAILQ_INSERT_TAIL
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=2
Lloh33:
	adrp	x8, _PMAP_TS_REFERENCED_MAX@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PMAP_TS_REFERENCED_MAX@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	add	w9, w24, w25
	cmp	w9, w8
	b.ge	LBB0_38
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x23
	bl	_TAILQ_FIRST
	mov	x28, x0
	cmp	x0, x27
	b.ne	LBB0_6
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x20
	bl	_pmap_clear_bits
	mov	x0, x26
	mov	x1, x25
	bl	_pmap_invalidate_page
	mov	x25, x23
	add	w25, w23, #1
	b	LBB0_15
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w24, #0
LBB0_21:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_38
; %bb.22:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x27, x0
	mov	x28, x0
LBB0_23:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x28
	bl	_PV_PMAP
	mov	x26, x0
	bl	_PMAP_TRYLOCK
	cbnz	w0, LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=2
	ldr	w21, [x22]
	ldr	w20, [x19, #8]
	ldr	x23, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x23
	bl	_rw_wunlock
	mov	x0, x26
	bl	_PMAP_LOCK
	mov	x0, x23
	bl	_rw_wlock
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_36
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=2
	ldr	w8, [x19, #8]
	cmp	w20, w8
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
	b.ne	LBB0_37
LBB0_26:                                ;   in Loop: Header=BB0_23 Depth=2
	ldr	x1, [x28]
	mov	x0, x26
	bl	_pmap_l2
	mov	x20, x0
	bl	_pmap_load
Lloh36:
	adrp	x8, _PTE_RX@GOTPAGE
Lloh37:
	ldr	x8, [x8, _PTE_RX@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, eq
Lloh39:
	adrp	x1, l_.str.1@PAGE
Lloh40:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	x1, [x28]
	mov	x0, x20
	bl	_pmap_l2_to_l3
	mov	x20, x0
	bl	_pmap_load
	mov	x21, x0
Lloh41:
	adrp	x8, _PTE_D@GOTPAGE
Lloh42:
	ldr	x8, [x8, _PTE_D@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_23 Depth=2
	mov	x0, x19
	bl	_vm_page_dirty
LBB0_28:                                ;   in Loop: Header=BB0_23 Depth=2
Lloh44:
	adrp	x8, _PTE_A@GOTPAGE
Lloh45:
	ldr	x8, [x8, _PTE_A@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	tst	w1, w21
	ldr	x23, [sp, #24]                  ; 8-byte Folded Reload
	b.eq	LBB0_32
; %bb.29:                               ;   in Loop: Header=BB0_23 Depth=2
Lloh47:
	adrp	x8, _PTE_SW_WIRED@GOTPAGE
Lloh48:
	ldr	x8, [x8, _PTE_SW_WIRED@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_31
; %bb.30:                               ;   in Loop: Header=BB0_23 Depth=2
	add	w24, w24, #1
	b	LBB0_32
LBB0_31:                                ;   in Loop: Header=BB0_23 Depth=2
	mov	x0, x20
	bl	_pmap_clear_bits
	ldr	x1, [x28]
	mov	x0, x26
	bl	_pmap_invalidate_page
	add	w25, w25, #1
LBB0_32:                                ;   in Loop: Header=BB0_23 Depth=2
Lloh50:
	adrp	x20, _pv_next@GOTPAGE
Lloh51:
	ldr	x20, [x20, _pv_next@GOTPAGEOFF]
	mov	x0, x26
	bl	_PMAP_UNLOCK
	ldr	w1, [x20]
	mov	x0, x28
	bl	_TAILQ_NEXT
	cbz	x0, LBB0_34
; %bb.33:                               ;   in Loop: Header=BB0_23 Depth=2
	ldr	w2, [x20]
	mov	x0, x23
	mov	x1, x28
	bl	_TAILQ_REMOVE
	ldr	w2, [x20]
	mov	x0, x23
	mov	x1, x28
	bl	_TAILQ_INSERT_TAIL
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
LBB0_34:                                ;   in Loop: Header=BB0_23 Depth=2
	mov	x0, x23
	bl	_TAILQ_FIRST
	cmp	x0, x27
	b.eq	LBB0_38
; %bb.35:                               ;   in Loop: Header=BB0_23 Depth=2
	mov	x28, x0
Lloh52:
	adrp	x8, _PMAP_TS_REFERENCED_MAX@GOTPAGE
Lloh53:
	ldr	x8, [x8, _PMAP_TS_REFERENCED_MAX@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
	add	w9, w24, w25
	cmp	w9, w8
	b.lt	LBB0_23
	b	LBB0_38
LBB0_36:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
LBB0_37:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x26
	bl	_PMAP_UNLOCK
	b	LBB0_4
LBB0_38:
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_rw_wunlock
Lloh55:
	adrp	x0, _pvh_global_lock@GOTPAGE
Lloh56:
	ldr	x0, [x0, _pvh_global_lock@GOTPAGEOFF]
	bl	_rw_runlock
	add	x0, sp, #40
	mov	w1, #0
	bl	_vm_page_free_pages_toq
	add	w0, w24, w25
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh55, Lloh56
	.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	_pvh_global_lock,4,2            ; @pvh_global_lock
	.comm	_PTE_W,4,2                      ; @PTE_W
	.comm	_PTE_D,4,2                      ; @PTE_D
	.comm	_PTE_A,4,2                      ; @PTE_A
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_L2_SHIFT,8,3                   ; @L2_SHIFT
	.comm	_Ln_ENTRIES,4,2                 ; @Ln_ENTRIES
	.comm	_PTE_SW_WIRED,4,2               ; @PTE_SW_WIRED
	.comm	_pv_next,4,2                    ; @pv_next
	.comm	_PMAP_TS_REFERENCED_MAX,4,2     ; @PMAP_TS_REFERENCED_MAX
	.comm	_PTE_RX,4,2                     ; @PTE_RX
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"pmap_ts_referenced: found an invalid l2 table"

.subsections_via_symbols
