	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_remove_pte
_pmap_remove_pte:                       ## @pmap_remove_pte
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_pmap_accessed_bit
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_pmap_modified_bit
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_pmap_rw_bit
	movl	%eax, %r12d
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_PMAP_LOCK_ASSERT
	movq	%r14, %rdi
	callq	_pte_load_clear
	movl	%eax, %r15d
	movq	_PG_W@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_2
## %bb.1:
	decl	(%r13)
LBB0_2:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_pmap_resident_count_dec
	movq	_PG_MANAGED@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.3:
	movq	_PG_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%r15d, %edi
	callq	_PHYS_TO_VM_PAGE
	movq	%rax, %r14
	orl	%ebx, %r12d
	movl	%r15d, %eax
	notl	%eax
	testl	%eax, %r12d
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_vm_page_dirty
LBB0_5:
	testl	%r15d, -48(%rbp)                ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:
	movq	_PGA_REFERENCED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vm_page_aflag_set
LBB0_7:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_CHANGE_PV_LIST_LOCK_TO_VM_PAGE
	movq	%r14, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_pmap_pvh_free
	movq	%rbx, %rdi
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	_PG_FICTITIOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_11
## %bb.9:
	movq	%r14, %rdi
	callq	_VM_PAGE_TO_PHYS
	movl	%eax, %edi
	callq	_pa_to_pvh
	movq	%rax, %rdi
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_PGA_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vm_page_aflag_clear
LBB0_11:
	movq	%r14, %rdi
	callq	_pmap_delayed_invl_page
LBB0_12:
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pmap_unuse_pt                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_PG_W,4,2                       ## @PG_W
	.comm	_PG_MANAGED,4,2                 ## @PG_MANAGED
	.comm	_PG_FRAME,4,2                   ## @PG_FRAME
	.comm	_PGA_REFERENCED,4,2             ## @PGA_REFERENCED
	.comm	_PG_FICTITIOUS,4,2              ## @PG_FICTITIOUS
	.comm	_PGA_WRITEABLE,4,2              ## @PGA_WRITEABLE
	.no_dead_strip	_pmap_remove_pte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_remove_pte
_pmap_remove_pte:                       ; @pmap_remove_pte
	.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	x23, x5
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x24, x1
	mov	x22, x0
	bl	_pmap_accessed_bit
	mov	x25, x0
	mov	x0, x22
	bl	_pmap_modified_bit
	mov	x26, x0
	mov	x0, x22
	bl	_pmap_rw_bit
	mov	x27, x0
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_PMAP_LOCK_ASSERT
	mov	x0, x24
	bl	_pte_load_clear
	mov	x28, x0
Lloh3:
	adrp	x8, _PG_W@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PG_W@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x22]
	sub	w8, w8, #1
	str	w8, [x22]
LBB0_2:
	mov	x0, x22
	mov	w1, #1
	bl	_pmap_resident_count_dec
Lloh6:
	adrp	x8, _PG_MANAGED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PG_MANAGED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w28
	b.eq	LBB0_12
; %bb.3:
Lloh9:
	adrp	x8, _PG_FRAME@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PG_FRAME@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w0, w8, w28
	bl	_PHYS_TO_VM_PAGE
	mov	x24, x0
	orr	w8, w27, w26
	bics	wzr, w8, w28
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x24
	bl	_vm_page_dirty
LBB0_5:
	tst	w28, w25
	b.eq	LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _PGA_REFERENCED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PGA_REFERENCED@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_vm_page_aflag_set
LBB0_7:
	mov	x0, x23
	mov	x1, x24
	bl	_CHANGE_PV_LIST_LOCK_TO_VM_PAGE
	add	x23, x24, #4
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_pmap_pvh_free
	mov	x0, x23
	bl	_TAILQ_EMPTY
	cbz	x0, LBB0_11
; %bb.8:
	ldr	w8, [x24]
Lloh15:
	adrp	x9, _PG_FICTITIOUS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PG_FICTITIOUS@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_11
; %bb.9:
	mov	x0, x24
	bl	_VM_PAGE_TO_PHYS
	bl	_pa_to_pvh
	bl	_TAILQ_EMPTY
	cbz	x0, LBB0_11
; %bb.10:
Lloh18:
	adrp	x8, _PGA_WRITEABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PGA_WRITEABLE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_vm_page_aflag_clear
LBB0_11:
	mov	x0, x24
	bl	_pmap_delayed_invl_page
LBB0_12:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	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
	b	_pmap_unuse_pt
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_PG_W,4,2                       ; @PG_W
	.comm	_PG_MANAGED,4,2                 ; @PG_MANAGED
	.comm	_PG_FRAME,4,2                   ; @PG_FRAME
	.comm	_PGA_REFERENCED,4,2             ; @PGA_REFERENCED
	.comm	_PG_FICTITIOUS,4,2              ; @PG_FICTITIOUS
	.comm	_PGA_WRITEABLE,4,2              ; @PGA_WRITEABLE
	.no_dead_strip	_pmap_remove_pte
.subsections_via_symbols
