	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_remove                    ## -- Begin function pmap_remove
	.p2align	4, 0x90
_pmap_remove:                           ## @pmap_remove
	.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
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r13
	callq	_pmap_global_bit
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_pmap_valid_bit
	cmpq	$0, (%r13)
	je	LBB0_27
## %bb.1:
	movl	%eax, %r12d
	leaq	-48(%rbp), %rdi
	callq	_SLIST_INIT
	xorl	%eax, %eax
	callq	_pmap_delayed_invl_start
	movq	%r13, %rdi
	callq	_PMAP_LOCK
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_pmap_pkru_on_remove
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	cmpl	%r14d, %eax
	jne	LBB0_5
## %bb.2:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_pmap_pde
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_PG_PS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
LBB0_5:
	movq	$0, -64(%rbp)
	cmpl	%r14d, %r15d
	jge	LBB0_26
## %bb.6:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_7
LBB0_18:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	leaq	-64(%rbp), %rcx
	callq	_pmap_demote_pde_locked
	testl	%eax, %eax
	je	LBB0_20
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%r14d, %ebx
	cmovgel	%r14d, %ebx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movq	%r12, %rcx
	leaq	-48(%rbp), %r8
	leaq	-64(%rbp), %r9
	callq	_pmap_remove_ptes
	testq	%rax, %rax
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	$1, %ecx
	cmovnel	%ecx, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	-52(%rbp), %r12d                ## 4-byte Reload
LBB0_21:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %r15d
	cmpl	%r14d, %ebx
	jge	LBB0_22
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r13)
	je	LBB0_22
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_pmap_pml4e
	testl	%r12d, (%rax)
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rdi
	movl	%r15d, %esi
	callq	_pmap_pml4e_to_pdpe
	testl	%r12d, (%rax)
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_NBPDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%r15d, %ecx
	movq	_PDRMASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	notl	%ebx
	andl	%ecx, %ebx
	cmpl	%r15d, %ebx
	cmovll	%r14d, %ebx
	movq	%rax, %rdi
	movl	%r15d, %esi
	callq	_pmap_pdpe_to_pde
	movq	%rax, %r12
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_PG_PS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%r14d, %ebx
	jg	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_NBPDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%r15d, %ecx
	cmpl	%ebx, %ecx
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	testl	%eax, -68(%rbp)                 ## 4-byte Folded Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	$1, %ecx
	cmovel	%ecx, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	leaq	-48(%rbp), %rcx
	leaq	-64(%rbp), %r8
	callq	_pmap_remove_pde
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	_NBPML4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	movq	_PML4MASK@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_NBPDP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	movq	_PDPMASK@GOTPCREL(%rip), %rcx
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	cmpl	%r15d, %ebx
	cmovll	%r14d, %ebx
	jmp	LBB0_21
LBB0_22:
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.23:
	callq	_rw_wunlock
LBB0_24:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_26
## %bb.25:
	movq	%r13, %rdi
	callq	_pmap_invalidate_all
	jmp	LBB0_26
LBB0_4:
	leaq	-48(%rbp), %rcx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%rax, %rdx
	callq	_pmap_remove_page
LBB0_26:
	movq	%r13, %rdi
	callq	_PMAP_UNLOCK
	xorl	%eax, %eax
	callq	_pmap_delayed_invl_finish
	leaq	-48(%rbp), %rdi
	movl	$1, %esi
	callq	_vm_page_free_pages_toq
LBB0_27:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PG_PS,4,2                      ## @PG_PS
	.comm	_NBPML4,4,2                     ## @NBPML4
	.comm	_PML4MASK,4,2                   ## @PML4MASK
	.comm	_NBPDP,4,2                      ## @NBPDP
	.comm	_PDPMASK,4,2                    ## @PDPMASK
	.comm	_NBPDR,4,2                      ## @NBPDR
	.comm	_PDRMASK,4,2                    ## @PDRMASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_remove                    ; -- Begin function pmap_remove
	.p2align	2
_pmap_remove:                           ; @pmap_remove
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x23, x1
	mov	x19, x0
	bl	_pmap_global_bit
	mov	x21, x0
	mov	x0, x19
	bl	_pmap_valid_bit
	ldr	x8, [x19]
	cbz	x8, LBB0_25
; %bb.1:
	mov	x22, x0
	mov	x0, sp
	bl	_SLIST_INIT
	bl	_pmap_delayed_invl_start
	mov	x0, x19
	bl	_PMAP_LOCK
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	bl	_pmap_pkru_on_remove
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w8, w8, w23
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x23
	bl	_pmap_pde
	cbz	x0, LBB0_4
; %bb.3:
	mov	x2, x0
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _PG_PS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PG_PS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_23
LBB0_4:
	str	xzr, [sp, #8]
	cmp	w23, w20
	b.ge	LBB0_24
; %bb.5:
	mov	w26, #0
Lloh6:
	adrp	x27, _NBPDR@GOTPAGE
Lloh7:
	ldr	x27, [x27, _NBPDR@GOTPAGEOFF]
Lloh8:
	adrp	x28, _PDRMASK@GOTPAGE
Lloh9:
	ldr	x28, [x28, _PDRMASK@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_9 Depth=1
Lloh10:
	adrp	x8, _NBPML4@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NBPML4@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _PML4MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PML4MASK@GOTPAGEOFF]
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w9, [x9]
	add	w8, w8, w23
	bic	w8, w8, w9
	cmp	w8, w23
	csel	w24, w20, w8, lt
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x23, x24
	cmp	w24, w20
	b.ge	LBB0_19
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	cbz	x8, LBB0_19
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_pmap_pml4e
	ldr	w8, [x0]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x1, x23
	bl	_pmap_pml4e_to_pdpe
	ldr	w8, [x0]
	tst	w8, w22
	b.eq	LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x27]
	ldr	w9, [x28]
	add	w8, w8, w23
	bic	w8, w8, w9
	cmp	w8, w23
	csel	w24, w20, w8, lt
	mov	x1, x23
	bl	_pmap_pdpe_to_pde
	ldr	w8, [x0]
	cbz	w8, LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x25, x0
Lloh15:
	adrp	x9, _PG_PS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PG_PS@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w9, [x27]
	add	w9, w9, w23
	cmp	w24, w20
	ccmp	w9, w24, #0, le
	b.eq	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x25
	mov	x2, x23
	bl	_pmap_demote_pde_locked
	cbz	w0, LBB0_8
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=1
	cmp	w24, w20
	csel	w24, w24, w20, lt
	mov	x4, sp
	add	x5, sp, #8
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	mov	x3, x25
	bl	_pmap_remove_ptes
	cmp	x0, #0
	csinc	w26, w26, wzr, eq
	b	LBB0_8
LBB0_17:                                ;   in Loop: Header=BB0_9 Depth=1
Lloh18:
	adrp	x8, _NBPDP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NBPDP@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _PDPMASK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PDPMASK@GOTPAGEOFF]
	b	LBB0_7
LBB0_18:                                ;   in Loop: Header=BB0_9 Depth=1
	tst	w8, w21
	csinc	w26, w26, wzr, ne
	mov	x3, sp
	add	x4, sp, #8
	mov	x0, x19
	mov	x1, x25
	mov	x2, x23
	bl	_pmap_remove_pde
	b	LBB0_8
LBB0_19:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_21
; %bb.20:
	bl	_rw_wunlock
LBB0_21:
	cbz	w26, LBB0_24
; %bb.22:
	mov	x0, x19
	bl	_pmap_invalidate_all
	b	LBB0_24
LBB0_23:
	mov	x3, sp
	mov	x0, x19
	mov	x1, x23
	bl	_pmap_remove_page
LBB0_24:
	mov	x0, x19
	bl	_PMAP_UNLOCK
	bl	_pmap_delayed_invl_finish
	mov	x0, sp
	mov	w1, #1
	bl	_vm_page_free_pages_toq
LBB0_25:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PG_PS,4,2                      ; @PG_PS
	.comm	_NBPML4,4,2                     ; @NBPML4
	.comm	_PML4MASK,4,2                   ; @PML4MASK
	.comm	_NBPDP,4,2                      ; @NBPDP
	.comm	_PDPMASK,4,2                    ; @PDPMASK
	.comm	_NBPDR,4,2                      ; @NBPDR
	.comm	_PDRMASK,4,2                    ; @PDRMASK
.subsections_via_symbols
