	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_pcid_alloc
_pmap_pcid_alloc:                       ## @pmap_pcid_alloc
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_curthread@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CRITICAL_ASSERT
	movq	_pcid_gen@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PCPU_GET
	movl	%eax, %r15d
	movq	(%r14), %rax
	shlq	$4, %rbx
	movq	(%rax,%rbx), %rcx
	movq	_PMAP_PCID_KERN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.1:
	movq	_pti@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	$0, (%rcx)
	je	LBB0_2
	jmp	LBB0_10
LBB0_3:
	cmpl	%r15d, 8(%rax,%rbx)
	jne	LBB0_4
LBB0_2:
	movq	_CR3_PCID_SAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_4:
	callq	_PCPU_GET
	movl	%eax, %r12d
	movq	_PMAP_PCID_OVERMAX@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %r12d
	setle	%al
	movq	_PMAP_PCID_OVERMAX_KERN@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpl	(%rdx), %r12d
	movq	_pti@GOTPCREL(%rip), %rdx
	setle	%cl
	cmpq	$0, (%rdx)
	cmovel	%eax, %ecx
	movzbl	%cl, %edi
	movslq	%r12d, %r13
	movq	%r13, %rsi
	callq	_KASSERT
	movq	_pti@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	_PMAP_PCID_OVERMAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	je	LBB0_8
LBB0_6:
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	_PMAP_PCID_OVERMAX_KERN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_9
LBB0_8:
	incl	%r15d
	movl	$1, %eax
	cmovel	%eax, %r15d
	movq	_pcid_gen@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_PCPU_SET
	movq	_PMAP_PCID_KERN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	incl	%r12d
	movslq	%r12d, %r13
LBB0_9:
	movq	(%r14), %rax
	movq	%r13, (%rax,%rbx)
	movl	%r15d, 8(%rax,%rbx)
	leal	1(%r12), %esi
	movl	%r12d, %edi
	callq	_PCPU_SET
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_curthread,4,2                  ## @curthread
	.comm	_pcid_gen,4,2                   ## @pcid_gen
	.comm	_PMAP_PCID_KERN,8,3             ## @PMAP_PCID_KERN
	.comm	_pti,8,3                        ## @pti
	.comm	_CR3_PCID_SAVE,4,2              ## @CR3_PCID_SAVE
	.comm	_PMAP_PCID_OVERMAX,4,2          ## @PMAP_PCID_OVERMAX
	.comm	_PMAP_PCID_OVERMAX_KERN,4,2     ## @PMAP_PCID_OVERMAX_KERN
	.no_dead_strip	_pmap_pcid_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_pcid_alloc
_pmap_pcid_alloc:                       ; @pmap_pcid_alloc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _curthread@GOTPAGE
Lloh1:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_CRITICAL_ASSERT
Lloh3:
	adrp	x24, _pcid_gen@GOTPAGE
Lloh4:
	ldr	x24, [x24, _pcid_gen@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_PCPU_GET
	ldr	x8, [x20]
	lsl	x9, x19, #4
	ldr	x9, [x8, x9]
Lloh5:
	adrp	x25, _PMAP_PCID_KERN@GOTPAGE
Lloh6:
	ldr	x25, [x25, _PMAP_PCID_KERN@GOTPAGEOFF]
	ldr	x10, [x25]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _pti@GOTPAGE
Lloh8:
	ldr	x8, [x8, _pti@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _CR3_PCID_SAVE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CR3_PCID_SAVE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w0, w9, wzr, eq
	b	LBB0_9
LBB0_2:
	mov	x21, x0
	add	x8, x8, x19, lsl #4
	ldr	w8, [x8, #8]
	cmp	w8, w0
	b.ne	LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _CR3_PCID_SAVE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CR3_PCID_SAVE@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_4:
	bl	_PCPU_GET
	mov	x22, x0
Lloh16:
	adrp	x27, _pti@GOTPAGE
Lloh17:
	ldr	x27, [x27, _pti@GOTPAGEOFF]
Lloh18:
	adrp	x28, _PMAP_PCID_OVERMAX@GOTPAGE
Lloh19:
	ldr	x28, [x28, _PMAP_PCID_OVERMAX@GOTPAGEOFF]
	ldr	x8, [x27]
	ldr	w9, [x28]
	cmp	w0, w9
	cset	w9, le
Lloh20:
	adrp	x26, _PMAP_PCID_OVERMAX_KERN@GOTPAGE
Lloh21:
	ldr	x26, [x26, _PMAP_PCID_OVERMAX_KERN@GOTPAGEOFF]
	ldr	w10, [x26]
	cmp	w0, w10
	cset	w10, le
	cmp	x8, #0
	csel	w0, w9, w10, eq
	sxtw	x23, w22
	mov	x1, x23
	bl	_KASSERT
	ldr	x8, [x27]
	ldr	w9, [x28]
	cmp	x8, #0
	ccmp	w22, w9, #0, eq
	b.eq	LBB0_7
; %bb.5:
	cbz	x8, LBB0_8
; %bb.6:
	ldr	w8, [x26]
	cmp	w22, w8
	b.ne	LBB0_8
LBB0_7:
	adds	w8, w21, #1
	csinc	w21, w8, wzr, lo
	ldr	w0, [x24]
	mov	x1, x21
	bl	_PCPU_SET
	ldr	w8, [x25]
	add	w22, w8, #1
	sxtw	x23, w22
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
LBB0_8:
	ldr	x8, [x20]
	add	x8, x8, x19, lsl #4
	str	x23, [x8]
	str	w21, [x8, #8]
	add	w1, w22, #1
	mov	x0, x22
	bl	_PCPU_SET
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_curthread,4,2                  ; @curthread
	.comm	_pcid_gen,4,2                   ; @pcid_gen
	.comm	_PMAP_PCID_KERN,8,3             ; @PMAP_PCID_KERN
	.comm	_pti,8,3                        ; @pti
	.comm	_CR3_PCID_SAVE,4,2              ; @CR3_PCID_SAVE
	.comm	_PMAP_PCID_OVERMAX,4,2          ; @PMAP_PCID_OVERMAX
	.comm	_PMAP_PCID_OVERMAX_KERN,4,2     ; @PMAP_PCID_OVERMAX_KERN
	.no_dead_strip	_pmap_pcid_alloc
.subsections_via_symbols
