	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_remove_tte                ## -- Begin function pmap_remove_tte
	.p2align	4, 0x90
_pmap_remove_tte:                       ## @pmap_remove_tte
	.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
	movl	%ecx, %r15d
	movq	%rdx, %r13
	movq	%rdi, %r14
	movq	_RA_WLOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_tte_list_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_assert
	movq	%r13, %rdi
	callq	_atomic_readandclear_long
	movl	%eax, %ebx
	movq	_TD_FAKE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_12
## %bb.1:
	movl	%ebx, %edi
	callq	_TD_PA
	movl	%eax, %edi
	callq	_PHYS_TO_VM_PAGE
	movq	%rax, %r12
	movq	_tte_link@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_TAILQ_REMOVE
	movq	_TD_WIRED@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.2:
	decl	4(%r14)
LBB0_3:
	movq	_TD_PV@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_11
## %bb.4:
	movq	_TD_W@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_vm_page_dirty
LBB0_6:
	movq	_TD_REF@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_PGA_REFERENCED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_vm_page_aflag_set
LBB0_8:
	movq	%r12, %rdi
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_PGA_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_vm_page_aflag_clear
LBB0_10:
	decl	(%r14)
LBB0_11:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_pmap_cache_remove
LBB0_12:
	movq	%r13, %rdi
	callq	_TTE_ZERO
	movq	%r14, %rdi
	callq	_PMAP_REMOVE_DONE
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tte_list_global_lock,4,2       ## @tte_list_global_lock
	.comm	_RA_WLOCKED,4,2                 ## @RA_WLOCKED
	.comm	_TD_FAKE,4,2                    ## @TD_FAKE
	.comm	_tte_link,4,2                   ## @tte_link
	.comm	_TD_WIRED,4,2                   ## @TD_WIRED
	.comm	_TD_PV,4,2                      ## @TD_PV
	.comm	_TD_W,4,2                       ## @TD_W
	.comm	_TD_REF,4,2                     ## @TD_REF
	.comm	_PGA_REFERENCED,4,2             ## @PGA_REFERENCED
	.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_tte                ; -- Begin function pmap_remove_tte
	.p2align	2
_pmap_remove_tte:                       ; @pmap_remove_tte
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _RA_WLOCKED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RA_WLOCKED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, _tte_list_global_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _tte_list_global_lock@GOTPAGEOFF]
	bl	_rw_assert
	mov	x0, x20
	bl	_atomic_readandclear_long
Lloh5:
	adrp	x8, _TD_FAKE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TD_FAKE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.1:
	mov	x23, x0
	bl	_TD_PA
	bl	_PHYS_TO_VM_PAGE
	mov	x22, x0
Lloh8:
	adrp	x8, _tte_link@GOTPAGE
Lloh9:
	ldr	x8, [x8, _tte_link@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_TAILQ_REMOVE
Lloh11:
	adrp	x8, _TD_WIRED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TD_WIRED@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_3
; %bb.2:
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	str	w8, [x19, #4]
LBB0_3:
Lloh14:
	adrp	x8, _TD_PV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TD_PV@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_11
; %bb.4:
Lloh17:
	adrp	x8, _TD_W@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TD_W@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_vm_page_dirty
LBB0_6:
Lloh20:
	adrp	x8, _TD_REF@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TD_REF@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_8
; %bb.7:
Lloh23:
	adrp	x8, _PGA_REFERENCED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PGA_REFERENCED@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_vm_page_aflag_set
LBB0_8:
	mov	x0, x22
	bl	_TAILQ_EMPTY
	cbz	x0, LBB0_10
; %bb.9:
Lloh26:
	adrp	x8, _PGA_WRITEABLE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PGA_WRITEABLE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_vm_page_aflag_clear
LBB0_10:
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
LBB0_11:
	mov	x0, x22
	mov	x1, x21
	bl	_pmap_cache_remove
LBB0_12:
	mov	x0, x20
	bl	_TTE_ZERO
	mov	x0, x19
	bl	_PMAP_REMOVE_DONE
	cmp	x0, #0
	cset	w0, eq
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_tte_list_global_lock,4,2       ; @tte_list_global_lock
	.comm	_RA_WLOCKED,4,2                 ; @RA_WLOCKED
	.comm	_TD_FAKE,4,2                    ; @TD_FAKE
	.comm	_tte_link,4,2                   ; @tte_link
	.comm	_TD_WIRED,4,2                   ; @TD_WIRED
	.comm	_TD_PV,4,2                      ; @TD_PV
	.comm	_TD_W,4,2                       ; @TD_W
	.comm	_TD_REF,4,2                     ; @TD_REF
	.comm	_PGA_REFERENCED,4,2             ; @PGA_REFERENCED
	.comm	_PGA_WRITEABLE,4,2              ; @PGA_WRITEABLE
.subsections_via_symbols
