	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_quick_remove_page         ## -- Begin function pmap_quick_remove_page
	.p2align	4, 0x90
_pmap_quick_remove_page:                ## @pmap_quick_remove_page
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_VM_MIN_DIRECT_ADDRESS@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jle	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	callq	_tsb_kvtotte
	movq	%rax, %r14
	movq	_qmap_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PCPU_GET
	xorl	%edi, %edi
	cmpq	%rbx, %rax
	jg	LBB0_3
## %bb.2:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	_DCACHE_COLORS@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	imulq	%rcx, %rdx
	addq	%rdx, %rax
	xorl	%edi, %edi
	cmpq	%rbx, %rax
	setg	%dil
LBB0_3:
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	%rbx, %rdi
	callq	_TLB_DEMAP_VA
	movq	_TLB_DEMAP_NUCLEUS@GOTPCREL(%rip), %r15
	orl	(%r15), %eax
	movq	_TLB_DEMAP_PAGE@GOTPCREL(%rip), %r12
	orl	(%r12), %eax
	movq	_ASI_DMMU_DEMAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_stxa
	movq	%rbx, %rdi
	callq	_TLB_DEMAP_VA
	orl	(%r15), %eax
	orl	(%r12), %eax
	movq	_ASI_IMMU_DEMAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_stxa
	movq	_KERNBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_flush
	movq	%r14, %rdi
	callq	_TTE_ZERO
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_critical_exit                  ## TAILCALL
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_MIN_DIRECT_ADDRESS,8,3      ## @VM_MIN_DIRECT_ADDRESS
	.comm	_qmap_addr,4,2                  ## @qmap_addr
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DCACHE_COLORS,4,2              ## @DCACHE_COLORS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_quick_remove_page: invalid address"

L_.str.1:                               ## @.str.1
	.asciz	"pmap_quick_remove_page: PTE not in use"

	.comm	_TLB_DEMAP_NUCLEUS,4,2          ## @TLB_DEMAP_NUCLEUS
	.comm	_TLB_DEMAP_PAGE,4,2             ## @TLB_DEMAP_PAGE
	.comm	_ASI_DMMU_DEMAP,4,2             ## @ASI_DMMU_DEMAP
	.comm	_ASI_IMMU_DEMAP,4,2             ## @ASI_IMMU_DEMAP
	.comm	_KERNBASE,4,2                   ## @KERNBASE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_quick_remove_page         ; -- Begin function pmap_quick_remove_page
	.p2align	2
_pmap_quick_remove_page:                ; @pmap_quick_remove_page
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _VM_MIN_DIRECT_ADDRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_MIN_DIRECT_ADDRESS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.le	LBB0_3
; %bb.1:
	mov	x20, x0
	bl	_tsb_kvtotte
	mov	x19, x0
Lloh3:
	adrp	x8, _qmap_addr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _qmap_addr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_PCPU_GET
	cmp	x0, x20
	b.le	LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh6:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
Lloh9:
	adrp	x9, _DCACHE_COLORS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DCACHE_COLORS@GOTPAGEOFF]
Lloh11:
	ldrsw	x9, [x9]
	madd	x8, x9, x8, x0
	cmp	x8, x20
	cset	w0, gt
LBB0_5:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, ne
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	mov	x0, x20
	bl	_TLB_DEMAP_VA
Lloh16:
	adrp	x21, _TLB_DEMAP_NUCLEUS@GOTPAGE
Lloh17:
	ldr	x21, [x21, _TLB_DEMAP_NUCLEUS@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh18:
	adrp	x22, _TLB_DEMAP_PAGE@GOTPAGE
Lloh19:
	ldr	x22, [x22, _TLB_DEMAP_PAGE@GOTPAGEOFF]
	orr	w8, w8, w0
	ldr	w9, [x22]
	orr	w0, w8, w9
Lloh20:
	adrp	x8, _ASI_DMMU_DEMAP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ASI_DMMU_DEMAP@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_stxa
	mov	x0, x20
	bl	_TLB_DEMAP_VA
	ldr	w8, [x21]
	orr	w8, w8, w0
	ldr	w9, [x22]
	orr	w0, w8, w9
Lloh23:
	adrp	x8, _ASI_IMMU_DEMAP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ASI_IMMU_DEMAP@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_stxa
Lloh26:
	adrp	x8, _KERNBASE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _KERNBASE@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_flush
	mov	x0, x19
	bl	_TTE_ZERO
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_critical_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_MIN_DIRECT_ADDRESS,8,3      ; @VM_MIN_DIRECT_ADDRESS
	.comm	_qmap_addr,4,2                  ; @qmap_addr
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DCACHE_COLORS,4,2              ; @DCACHE_COLORS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_quick_remove_page: invalid address"

l_.str.1:                               ; @.str.1
	.asciz	"pmap_quick_remove_page: PTE not in use"

	.comm	_TLB_DEMAP_NUCLEUS,4,2          ; @TLB_DEMAP_NUCLEUS
	.comm	_TLB_DEMAP_PAGE,4,2             ; @TLB_DEMAP_PAGE
	.comm	_ASI_DMMU_DEMAP,4,2             ; @ASI_DMMU_DEMAP
	.comm	_ASI_IMMU_DEMAP,4,2             ; @ASI_IMMU_DEMAP
	.comm	_KERNBASE,4,2                   ; @KERNBASE
.subsections_via_symbols
