	.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	$24, %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
	movq	_tte_list_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_wlock
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	4(%rbx), %r15
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	_tte_link@GOTPCREL(%rip), %r12
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_TAILQ_NEXT
	movq	%rax, %r14
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	_TD_PV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_TD_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_atomic_clear_long
	movl	%eax, %ebx
	movq	_TD_W@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_vm_page_dirty
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_TD_REF@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	movq	_PMAP_TS_REFERENCED_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jge	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rbx
	cmpq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	jne	LBB0_2
LBB0_9:
	movq	_tte_list_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_wunlock
	movl	%r13d, %eax
	addq	$24, %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	_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_REF,4,2                     ## @TD_REF
	.comm	_TD_W,4,2                       ## @TD_W
	.comm	_PMAP_TS_REFERENCED_MAX,4,2     ## @PMAP_TS_REFERENCED_MAX
.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:
	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_8
; %bb.1:
	mov	x22, x0
	mov	w21, #0
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_REF@GOTPAGE
Lloh10:
	ldr	x27, [x27, _TD_REF@GOTPAGEOFF]
Lloh11:
	adrp	x28, _TD_W@GOTPAGE
Lloh12:
	ldr	x28, [x28, _TD_W@GOTPAGEOFF]
	mov	x24, x0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x23, #0
	ccmp	x23, x22, #4, ne
	mov	x24, x23
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x24
	bl	_TAILQ_NEXT
	mov	x23, x0
	ldr	w2, [x25]
	mov	x0, x20
	mov	x1, x24
	bl	_TAILQ_REMOVE
	ldr	w2, [x25]
	mov	x0, x20
	mov	x1, x24
	bl	_TAILQ_INSERT_TAIL
	ldr	w8, [x24]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x27]
	mov	x0, x24
	bl	_atomic_clear_long
	mov	x24, x0
	ldr	w8, [x28]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_vm_page_dirty
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27]
	tst	w8, w24
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w21, #1
Lloh13:
	adrp	x8, _PMAP_TS_REFERENCED_MAX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PMAP_TS_REFERENCED_MAX@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w21, w8
	b.lt	LBB0_2
	b	LBB0_9
LBB0_8:
	mov	w21, #0
LBB0_9:
Lloh16:
	adrp	x0, _tte_list_global_lock@GOTPAGE
Lloh17:
	ldr	x0, [x0, _tte_list_global_lock@GOTPAGEOFF]
	bl	_rw_wunlock
	mov	x0, x21
	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
	ret
	.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 AdrpLdrGot	Lloh16, Lloh17
	.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_REF,4,2                     ; @TD_REF
	.comm	_TD_W,4,2                       ; @TD_W
	.comm	_PMAP_TS_REFERENCED_MAX,4,2     ; @PMAP_TS_REFERENCED_MAX
.subsections_via_symbols
