	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tlb_page_demap                 ## -- Begin function tlb_page_demap
	.p2align	4, 0x90
_tlb_page_demap:                        ## @tlb_page_demap
	.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
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_tlb_npage_demap@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PMAP_STATS_INC
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_ipi_tlb_page_demap
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_intr_disable
	movl	%eax, %r15d
	movq	_cpuid@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PCPU_GET
	leaq	8(%rbx), %rsi
	movl	%eax, %edi
	callq	_CPU_ISSET
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	(%rbx), %rax
	movq	_curcpu@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edi, %edi
	cmpl	$-1, (%rax,%rcx,4)
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_2
## %bb.3:
	movq	_TLB_DEMAP_NUCLEUS@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_TLB_DEMAP_PRIMARY@GOTPCREL(%rip), %rax
LBB0_4:
	movq	_TLB_DEMAP_PAGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movl	%r12d, %edi
	callq	_TLB_DEMAP_VA
	orl	%ebx, %eax
	movq	_ASI_DMMU_DEMAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_stxa
	movl	%r12d, %edi
	callq	_TLB_DEMAP_VA
	orl	%eax, %ebx
	movq	_ASI_IMMU_DEMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	callq	_stxa
	movq	_KERNBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_flush
LBB0_5:
	movl	%r15d, %edi
	callq	_intr_restore
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ipi_wait                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_tlb_npage_demap,4,2            ## @tlb_npage_demap
	.comm	_cpuid,4,2                      ## @cpuid
	.comm	_curcpu,8,3                     ## @curcpu
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tlb_page_demap: inactive pmap?"

	.comm	_kernel_pmap,8,3                ## @kernel_pmap
	.comm	_TLB_DEMAP_NUCLEUS,4,2          ## @TLB_DEMAP_NUCLEUS
	.comm	_TLB_DEMAP_PAGE,4,2             ## @TLB_DEMAP_PAGE
	.comm	_TLB_DEMAP_PRIMARY,4,2          ## @TLB_DEMAP_PRIMARY
	.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	_tlb_page_demap                 ; -- Begin function tlb_page_demap
	.p2align	2
_tlb_page_demap:                        ; @tlb_page_demap
	.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
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _tlb_npage_demap@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tlb_npage_demap@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_PMAP_STATS_INC
	mov	x0, x22
	mov	x1, x21
	bl	_ipi_tlb_page_demap
	mov	x19, x0
	bl	_intr_disable
	mov	x20, x0
Lloh3:
	adrp	x8, _cpuid@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cpuid@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_PCPU_GET
	add	x1, x22, #8
	bl	_CPU_ISSET
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _curcpu@GOTPAGE
Lloh7:
	ldr	x8, [x8, _curcpu@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh8:
	ldr	x8, [x8]
	ldr	w8, [x9, x8, lsl #2]
	cmn	w8, #1
	cset	w0, ne
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh11:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh12:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _TLB_DEMAP_NUCLEUS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _TLB_DEMAP_NUCLEUS@GOTPAGEOFF]
Lloh16:
	adrp	x10, _TLB_DEMAP_PRIMARY@GOTPAGE
Lloh17:
	ldr	x10, [x10, _TLB_DEMAP_PRIMARY@GOTPAGEOFF]
	cmp	x8, x22
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _TLB_DEMAP_PAGE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _TLB_DEMAP_PAGE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w22, w9, w8
	mov	x0, x21
	bl	_TLB_DEMAP_VA
	orr	w0, w0, w22
Lloh21:
	adrp	x8, _ASI_DMMU_DEMAP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ASI_DMMU_DEMAP@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_stxa
	mov	x0, x21
	bl	_TLB_DEMAP_VA
	orr	w0, w0, w22
Lloh24:
	adrp	x8, _ASI_IMMU_DEMAP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ASI_IMMU_DEMAP@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_stxa
Lloh27:
	adrp	x8, _KERNBASE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _KERNBASE@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_flush
LBB0_2:
	mov	x0, x20
	bl	_intr_restore
	mov	x0, x19
	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	_ipi_wait
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_tlb_npage_demap,4,2            ; @tlb_npage_demap
	.comm	_cpuid,4,2                      ; @cpuid
	.comm	_curcpu,8,3                     ; @curcpu
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tlb_page_demap: inactive pmap?"

	.comm	_kernel_pmap,8,3                ; @kernel_pmap
	.comm	_TLB_DEMAP_NUCLEUS,4,2          ; @TLB_DEMAP_NUCLEUS
	.comm	_TLB_DEMAP_PAGE,4,2             ; @TLB_DEMAP_PAGE
	.comm	_TLB_DEMAP_PRIMARY,4,2          ; @TLB_DEMAP_PRIMARY
	.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
