	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_invalidate_all            ## -- Begin function pmap_invalidate_all
	.p2align	4, 0x90
_pmap_invalidate_all:                   ## @pmap_invalidate_all
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rsi
	movq	_PT_RVI@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_2
## %bb.1:
	movq	_PT_EPT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_2
## %bb.3:
	movq	_PT_X86@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	(%rax), %rsi
	sete	%dil
	callq	_KASSERT
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	je	LBB0_4
## %bb.8:
	movq	_curpmap@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PCPU_GET
	movq	_pmap_pcid_enabled@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rbx, %rax
	je	LBB0_9
## %bb.18:
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.19:
	movq	16(%rbx), %rax
	movq	$0, 8(%rax)
	jmp	LBB0_20
LBB0_2:
	incl	24(%rbx)
LBB0_20:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	_pmap_pcid_enabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.5:
	movq	_invpcid_works@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.6:
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$24, %esi
	callq	_bzero
	movq	_INVPCID_CTXGLOB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_invpcid
	jmp	LBB0_20
LBB0_9:
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_17
## %bb.10:
	callq	_critical_enter
	movq	_invpcid_works@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.11:
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -32(%rbp)
	movq	_INVPCID_CTX@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-40(%rbp), %rdi
	callq	_invpcid
	movl	8(%rbx), %eax
	movq	_PMAP_NO_CR3@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_16
## %bb.12:
	movq	_PMAP_PCID_USER_PT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -40(%rbp)
	movl	(%r14), %esi
	leaq	-40(%rbp), %rdi
	callq	_invpcid
	jmp	LBB0_16
LBB0_7:
	xorl	%eax, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_invltlb_glob                   ## TAILCALL
LBB0_17:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_invltlb                        ## TAILCALL
LBB0_13:
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	movl	12(%rbx), %esi
	orl	%eax, %esi
	movl	8(%rbx), %edi
	movq	_PMAP_NO_CR3@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edi
	jne	LBB0_14
## %bb.15:
	movl	%esi, %edi
	callq	_load_cr3
	jmp	LBB0_16
LBB0_14:
	orl	%eax, %edi
	movq	_PMAP_PCID_USER_PT@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_pmap_pti_pcid_invalidate
LBB0_16:
	xorl	%eax, %eax
	callq	_critical_exit
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_PT_RVI,8,3                     ## @PT_RVI
	.comm	_PT_EPT,8,3                     ## @PT_EPT
	.comm	_PT_X86,8,3                     ## @PT_X86
	.comm	_kernel_pmap,8,3                ## @kernel_pmap
	.comm	_pmap_pcid_enabled,8,3          ## @pmap_pcid_enabled
	.comm	_invpcid_works,8,3              ## @invpcid_works
	.comm	_INVPCID_CTXGLOB,4,2            ## @INVPCID_CTXGLOB
	.comm	_curpmap,4,2                    ## @curpmap
	.comm	_INVPCID_CTX,4,2                ## @INVPCID_CTX
	.comm	_PMAP_NO_CR3,4,2                ## @PMAP_NO_CR3
	.comm	_PMAP_PCID_USER_PT,4,2          ## @PMAP_PCID_USER_PT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_invalidate_all            ; -- Begin function pmap_invalidate_all
	.p2align	2
_pmap_invalidate_all:                   ; @pmap_invalidate_all
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x1, [x0]
Lloh0:
	adrp	x8, _PT_RVI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PT_RVI@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PT_EPT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PT_EPT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x1, x8
	ccmp	x1, x9, #4, ne
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_3:
Lloh6:
	adrp	x8, _PT_X86@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PT_X86@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x1, x8
	cset	w0, eq
	bl	_KASSERT
Lloh9:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh10:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, x19
	b.eq	LBB0_7
; %bb.4:
Lloh12:
	adrp	x8, _curpmap@GOTPAGE
Lloh13:
	ldr	x8, [x8, _curpmap@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_PCPU_GET
Lloh15:
	adrp	x8, _pmap_pcid_enabled@GOTPAGE
Lloh16:
	ldr	x8, [x8, _pmap_pcid_enabled@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x0, x19
	b.eq	LBB0_9
; %bb.5:
	cbz	x8, LBB0_2
; %bb.6:
	ldr	x8, [x19, #16]
	str	xzr, [x8, #8]
	b	LBB0_2
LBB0_7:
Lloh18:
	adrp	x8, _pmap_pcid_enabled@GOTPAGE
Lloh19:
	ldr	x8, [x8, _pmap_pcid_enabled@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
Lloh21:
	adrp	x9, _invpcid_works@GOTPAGE
Lloh22:
	ldr	x9, [x9, _invpcid_works@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	b.ne	LBB0_13
; %bb.8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_invltlb_glob
LBB0_9:
	cbz	x8, LBB0_14
; %bb.10:
	bl	_critical_enter
Lloh24:
	adrp	x8, _invpcid_works@GOTPAGE
Lloh25:
	ldr	x8, [x8, _invpcid_works@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.11:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	str	w8, [sp, #8]
	stp	xzr, xzr, [sp, #16]
Lloh27:
	adrp	x20, _INVPCID_CTX@GOTPAGE
Lloh28:
	ldr	x20, [x20, _INVPCID_CTX@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x0, sp, #8
	bl	_invpcid
	ldr	w8, [x19, #8]
Lloh29:
	adrp	x9, _PMAP_NO_CR3@GOTPAGE
Lloh30:
	ldr	x9, [x9, _PMAP_NO_CR3@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_17
; %bb.12:
Lloh32:
	adrp	x8, _PMAP_PCID_USER_PT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _PMAP_PCID_USER_PT@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	orr	w8, w9, w8
	str	w8, [sp, #8]
	ldr	w1, [x20]
	add	x0, sp, #8
	bl	_invpcid
	bl	_critical_exit
	b	LBB0_2
LBB0_13:
	add	x0, sp, #8
	mov	w1, #24
	bl	_bzero
Lloh35:
	adrp	x8, _INVPCID_CTXGLOB@GOTPAGE
Lloh36:
	ldr	x8, [x8, _INVPCID_CTXGLOB@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_invpcid
	b	LBB0_2
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_invltlb
LBB0_15:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	ldp	w9, w10, [x19, #8]
	orr	w1, w8, w10
Lloh38:
	adrp	x10, _PMAP_NO_CR3@GOTPAGE
Lloh39:
	ldr	x10, [x10, _PMAP_NO_CR3@GOTPAGEOFF]
Lloh40:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_18
; %bb.16:
	mov	x0, x1
	bl	_load_cr3
LBB0_17:
	bl	_critical_exit
	b	LBB0_2
LBB0_18:
	orr	w8, w9, w8
Lloh41:
	adrp	x9, _PMAP_PCID_USER_PT@GOTPAGE
Lloh42:
	ldr	x9, [x9, _PMAP_PCID_USER_PT@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_pmap_pti_pcid_invalidate
	bl	_critical_exit
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_PT_RVI,8,3                     ; @PT_RVI
	.comm	_PT_EPT,8,3                     ; @PT_EPT
	.comm	_PT_X86,8,3                     ; @PT_X86
	.comm	_kernel_pmap,8,3                ; @kernel_pmap
	.comm	_pmap_pcid_enabled,8,3          ; @pmap_pcid_enabled
	.comm	_invpcid_works,8,3              ; @invpcid_works
	.comm	_INVPCID_CTXGLOB,4,2            ; @INVPCID_CTXGLOB
	.comm	_curpmap,4,2                    ; @curpmap
	.comm	_INVPCID_CTX,4,2                ; @INVPCID_CTX
	.comm	_PMAP_NO_CR3,4,2                ; @PMAP_NO_CR3
	.comm	_PMAP_PCID_USER_PT,4,2          ; @PMAP_PCID_USER_PT
.subsections_via_symbols
