	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_remove_pde
_pmap_remove_pde:                       ## @pmap_remove_pde
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_pmap_global_bit
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_pmap_accessed_bit
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_pmap_modified_bit
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_pmap_rw_bit
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_PMAP_LOCK_ASSERT
	movq	_PDRMASK@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movl	(%rax), %eax
	andl	%r12d, %eax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_pte_load_clear
	movl	%eax, %ebx
	movq	_PG_W@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	subl	%eax, (%r13)
LBB0_2:
	testl	%r15d, %ebx
	je	LBB0_4
## %bb.3:
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_pmap_invalidate_pde_page
LBB0_4:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	_NBPDR@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_pmap_resident_count_dec
	movq	_PG_MANAGED@GOTPCREL(%rip), %rax
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	testl	%ebx, (%rax)
	je	LBB0_15
## %bb.5:
	movq	_PG_PS_FRAME@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	andl	%r14d, %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_CHANGE_PV_LIST_LOCK_TO_PHYS
	movl	(%r15), %edi
	andl	%r14d, %edi
	callq	_pa_to_pvh
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_pmap_pvh_free
	movl	(%r12), %ebx
	movl	(%r15), %edi
	andl	%r14d, %edi
	callq	_PHYS_TO_VM_PAGE
	testl	%ebx, %ebx
	jle	LBB0_15
## %bb.6:
	movq	%rax, %r13
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	addl	%r15d, %ebx
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	orl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	%eax, %r14d
	andl	%eax, %r12d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	callq	_pmap_delayed_invl_page
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	addq	$24, %r13
	cmpl	%ebx, %r15d
	jge	LBB0_15
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r14d, %r12d
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	callq	_vm_page_dirty
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, -68(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_PGA_REFERENCED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_vm_page_aflag_set
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	16(%r13), %rdi
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_PGA_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_vm_page_aflag_clear
	jmp	LBB0_14
LBB0_15:
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%rbx, (%rax)
	je	LBB0_16
## %bb.17:
	movq	%rbx, %rdi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	callq	_pmap_remove_pt_page
	testq	%rax, %rax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_19
## %bb.18:
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_VM_PAGE_BITS_ALL@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_pmap_resident_count_dec
	movq	8(%r15), %rax
	movq	_NPTEPG@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	leaq	L_.str.2(%rip), %rsi
	callq	_KASSERT
	movq	$0, 8(%r15)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_pmap_add_delayed_free_list
	jmp	LBB0_19
LBB0_16:
	movq	%rbx, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edx
	callq	_pmap_remove_kernel_pde
	movq	-80(%rbp), %r14                 ## 8-byte Reload
LBB0_19:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_pmap_pdpe
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r14, %rcx
	addq	$56, %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	_PDRMASK,4,2                    ## @PDRMASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_remove_pde: sva is not 2mpage aligned"

	.comm	_PG_W,4,2                       ## @PG_W
	.comm	_NBPDR,4,2                      ## @NBPDR
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_kernel_pmap,8,3                ## @kernel_pmap
	.comm	_PG_MANAGED,4,2                 ## @PG_MANAGED
	.comm	_PG_PS_FRAME,4,2                ## @PG_PS_FRAME
	.comm	_PGA_REFERENCED,4,2             ## @PGA_REFERENCED
	.comm	_PGA_WRITEABLE,4,2              ## @PGA_WRITEABLE
	.comm	_VM_PAGE_BITS_ALL,8,3           ## @VM_PAGE_BITS_ALL
L_.str.1:                               ## @.str.1
	.asciz	"pmap_remove_pde: pte page not promoted"

	.comm	_NPTEPG,8,3                     ## @NPTEPG
L_.str.2:                               ## @.str.2
	.asciz	"pmap_remove_pde: pte page ref count error"

	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_pmap_remove_pde
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_remove_pde
_pmap_remove_pde:                       ; @pmap_remove_pde
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x26, x4
	str	x3, [sp, #16]                   ; 8-byte Folded Spill
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
	bl	_pmap_global_bit
	mov	x28, x0
	mov	x0, x21
	bl	_pmap_accessed_bit
	mov	x23, x0
	mov	x0, x21
	bl	_pmap_modified_bit
	mov	x24, x0
	mov	x0, x21
	bl	_pmap_rw_bit
	mov	x25, x0
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_PMAP_LOCK_ASSERT
Lloh3:
	adrp	x8, _PDRMASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PDRMASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	cset	w0, eq
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	mov	x0, x19
	bl	_pte_load_clear
	mov	x27, x0
Lloh8:
	adrp	x8, _PG_W@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PG_W@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x20, _NBPDR@GOTPAGE
Lloh12:
	ldr	x20, [x20, _NBPDR@GOTPAGEOFF]
Lloh13:
	adrp	x19, _PAGE_SIZE@GOTPAGE
Lloh14:
	ldr	x19, [x19, _PAGE_SIZE@GOTPAGEOFF]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x20]
	ldr	w9, [x19]
	sdiv	w8, w8, w9
	ldr	w9, [x21]
	sub	w8, w9, w8
	str	w8, [x21]
LBB0_2:
Lloh15:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh16:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
	tst	w27, w28
	b.eq	LBB0_4
; %bb.3:
	ldr	x0, [x8]
	mov	x1, x22
	mov	x2, x27
	bl	_pmap_invalidate_pde_page
LBB0_4:
	str	w22, [sp, #28]                  ; 4-byte Folded Spill
	ldr	w8, [x20]
	ldr	w9, [x19]
	sdiv	w1, w8, w9
	mov	x0, x21
	bl	_pmap_resident_count_dec
Lloh17:
	adrp	x8, _PG_MANAGED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PG_MANAGED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w27
	b.eq	LBB0_15
; %bb.5:
Lloh20:
	adrp	x22, _PG_PS_FRAME@GOTPAGE
Lloh21:
	ldr	x22, [x22, _PG_PS_FRAME@GOTPAGEOFF]
	ldr	w8, [x22]
	and	w1, w8, w27
	mov	x0, x26
	bl	_CHANGE_PV_LIST_LOCK_TO_PHYS
	ldr	w8, [x22]
	and	w0, w8, w27
	bl	_pa_to_pvh
	mov	x26, x0
	mov	x1, x21
	ldr	w2, [sp, #28]                   ; 4-byte Folded Reload
	bl	_pmap_pvh_free
	ldr	w20, [x20]
	ldr	w8, [x22]
	and	w0, w8, w27
	bl	_PHYS_TO_VM_PAGE
	cmp	w20, #1
	b.lt	LBB0_15
; %bb.6:
	mov	x28, x0
	ldr	w22, [sp, #28]                  ; 4-byte Folded Reload
	mov	x8, x23
	add	w23, w20, w22
	orr	w24, w25, w24
	and	w25, w27, w24
	and	w27, w27, w8
Lloh22:
	adrp	x20, _PGA_REFERENCED@GOTPAGE
Lloh23:
	ldr	x20, [x20, _PGA_REFERENCED@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x28
	bl	_pmap_delayed_invl_page
	ldr	w8, [x19]
	add	x28, x28, #24
	add	w22, w8, w22
	cmp	w22, w23
	b.ge	LBB0_15
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w25, w24
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x28
	bl	_vm_page_dirty
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	cbz	w27, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x20]
	mov	x0, x28
	bl	_vm_page_aflag_set
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x0, x28, #16
	bl	_TAILQ_EMPTY
	cbz	x0, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x26
	bl	_TAILQ_EMPTY
	cbz	x0, LBB0_7
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh24:
	adrp	x8, _PGA_WRITEABLE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PGA_WRITEABLE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x28
	bl	_vm_page_aflag_clear
	b	LBB0_7
LBB0_15:
Lloh27:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh28:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	mov	x0, x21
	cmp	x8, x21
	b.eq	LBB0_18
; %bb.16:
	ldr	w20, [sp, #28]                  ; 4-byte Folded Reload
	mov	x1, x20
	bl	_pmap_remove_pt_page
	ldr	x19, [sp, #16]                  ; 8-byte Folded Reload
	cbz	x0, LBB0_19
; %bb.17:
	mov	x22, x0
	ldr	x8, [x0]
Lloh30:
	adrp	x9, _VM_PAGE_BITS_ALL@GOTPAGE
Lloh31:
	ldr	x9, [x9, _VM_PAGE_BITS_ALL@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	mov	x0, x21
	mov	w1, #1
	bl	_pmap_resident_count_dec
	ldr	x8, [x22, #8]
Lloh35:
	adrp	x9, _NPTEPG@GOTPAGE
Lloh36:
	ldr	x9, [x9, _NPTEPG@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_KASSERT
	str	xzr, [x22, #8]
Lloh40:
	adrp	x8, _FALSE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x19
	bl	_pmap_add_delayed_free_list
	b	LBB0_19
LBB0_18:
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w20, [sp, #28]                  ; 4-byte Folded Reload
	mov	x2, x20
	bl	_pmap_remove_kernel_pde
	ldr	x19, [sp, #16]                  ; 8-byte Folded Reload
LBB0_19:
	mov	x0, x21
	mov	x1, x20
	bl	_pmap_pdpe
	ldr	w2, [x0]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_pmap_unuse_pt
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_PDRMASK,4,2                    ; @PDRMASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_remove_pde: sva is not 2mpage aligned"

	.comm	_PG_W,4,2                       ; @PG_W
	.comm	_NBPDR,4,2                      ; @NBPDR
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_kernel_pmap,8,3                ; @kernel_pmap
	.comm	_PG_MANAGED,4,2                 ; @PG_MANAGED
	.comm	_PG_PS_FRAME,4,2                ; @PG_PS_FRAME
	.comm	_PGA_REFERENCED,4,2             ; @PGA_REFERENCED
	.comm	_PGA_WRITEABLE,4,2              ; @PGA_WRITEABLE
	.comm	_VM_PAGE_BITS_ALL,8,3           ; @VM_PAGE_BITS_ALL
l_.str.1:                               ; @.str.1
	.asciz	"pmap_remove_pde: pte page not promoted"

	.comm	_NPTEPG,8,3                     ; @NPTEPG
l_.str.2:                               ; @.str.2
	.asciz	"pmap_remove_pde: pte page ref count error"

	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_pmap_remove_pde
.subsections_via_symbols
