	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function vpid_alloc
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.quad	2                               ## 0x2
	.quad	3                               ## 0x3
LCPI0_2:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_3:
	.long	5                               ## 0x5
	.long	5                               ## 0x5
	.long	5                               ## 0x5
	.long	5                               ## 0x5
LCPI0_4:
	.long	9                               ## 0x9
	.long	9                               ## 0x9
	.long	9                               ## 0x9
	.long	9                               ## 0x9
LCPI0_5:
	.long	13                              ## 0xd
	.long	13                              ## 0xd
	.long	13                              ## 0xd
	.long	13                              ## 0xd
LCPI0_6:
	.quad	16                              ## 0x10
	.quad	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_vpid_alloc:                            ## @vpid_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
	movl	%esi, %r14d
	movq	%rdi, %r12
	testl	%esi, %esi
	jle	LBB0_2
## %bb.1:
	movq	_VM_MAXCPU@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jge	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_panic
LBB0_3:
	movq	_procbased_ctls2@GOTPCREL(%rip), %rax
	movq	_PROCBASED2_ENABLE_VPID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.4:
	testl	%r14d, %r14d
	jle	LBB0_22
## %bb.5:
	movl	%r14d, %r13d
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	negq	%r13
	movl	$1, %ebx
	movq	_vpid_unr@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_alloc_unr
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, -4(%r12,%rbx,4)
	leaq	(%rbx,%r13), %rax
	incq	%rax
	incq	%rbx
	cmpq	$1, %rax
	jne	LBB0_6
	jmp	LBB0_22
LBB0_8:
	testl	%r14d, %r14d
	jle	LBB0_22
## %bb.9:
	movl	%r14d, %esi
	shlq	$2, %rsi
	movq	%r12, %rdi
	callq	___bzero
	jmp	LBB0_22
LBB0_10:
	movq	_vpid_alloc_failed@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_atomic_add_int
	cmpl	$1, %ebx
	je	LBB0_11
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movl	-8(%r12,%rbx,4), %edi
	callq	_vpid_free
	decq	%rbx
	cmpq	$1, %rbx
	jg	LBB0_23
LBB0_11:
	cmpl	$8, %r14d
	jae	LBB0_13
## %bb.12:
	xorl	%eax, %eax
	jmp	LBB0_21
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax def $rax
	andl	$-8, %eax
	leaq	-8(%rax), %rdx
	movq	%rdx, %rcx
	shrq	$3, %rcx
	incq	%rcx
	testq	%rdx, %rdx
	je	LBB0_14
## %bb.15:
	movq	%rcx, %rsi
	andq	$-2, %rsi
	movaps	LCPI0_1(%rip), %xmm1            ## xmm1 = [2,3]
	movaps	LCPI0_2(%rip), %xmm0            ## xmm0 = [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
	xorl	%edx, %edx
	pcmpeqd	%xmm8, %xmm8
	movdqa	LCPI0_3(%rip), %xmm9            ## xmm9 = [5,5,5,5]
	movdqa	LCPI0_4(%rip), %xmm4            ## xmm4 = [9,9,9,9]
	movdqa	LCPI0_5(%rip), %xmm5            ## xmm5 = [13,13,13,13]
	movdqa	LCPI0_6(%rip), %xmm6            ## xmm6 = [16,16]
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movaps	%xmm0, %xmm7
	shufps	$136, %xmm1, %xmm7              ## xmm7 = xmm7[0,2],xmm1[0,2]
	movaps	%xmm7, %xmm2
	psubd	%xmm8, %xmm2
	movaps	%xmm7, %xmm3
	paddd	%xmm9, %xmm3
	movdqu	%xmm2, (%r12,%rdx,4)
	movdqu	%xmm3, 16(%r12,%rdx,4)
	movaps	%xmm7, %xmm2
	paddd	%xmm4, %xmm2
	paddd	%xmm5, %xmm7
	movdqu	%xmm2, 32(%r12,%rdx,4)
	movdqu	%xmm7, 48(%r12,%rdx,4)
	addq	$16, %rdx
	paddq	%xmm6, %xmm0
	paddq	%xmm6, %xmm1
	addq	$-2, %rsi
	jne	LBB0_16
## %bb.17:
	shufps	$136, %xmm1, %xmm0              ## xmm0 = xmm0[0,2],xmm1[0,2]
	testb	$1, %cl
	je	LBB0_20
LBB0_19:
	pcmpeqd	%xmm1, %xmm1
	movaps	%xmm0, %xmm2
	psubd	%xmm1, %xmm2
	paddd	LCPI0_3(%rip), %xmm0
	movdqu	%xmm2, (%r12,%rdx,4)
	movdqu	%xmm0, 16(%r12,%rdx,4)
LBB0_20:
	cmpq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	je	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	leaq	1(%rax), %rcx
	movl	%ecx, (%r12,%rax,4)
	movq	%rcx, %rax
	cmpq	%rcx, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_21
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,2,3]
	xorl	%edx, %edx
	testb	$1, %cl
	jne	LBB0_19
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_MAXCPU,4,2                  ## @VM_MAXCPU
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid number of vpids requested: %d"

	.comm	_procbased_ctls2,4,2            ## @procbased_ctls2
	.comm	_PROCBASED2_ENABLE_VPID,4,2     ## @PROCBASED2_ENABLE_VPID
	.comm	_vpid_unr,4,2                   ## @vpid_unr
	.comm	_vpid_alloc_failed,4,2          ## @vpid_alloc_failed
	.no_dead_strip	_vpid_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function vpid_alloc
lCPI0_0:
	.quad	2                               ; 0x2
	.quad	3                               ; 0x3
lCPI0_1:
	.quad	0                               ; 0x0
	.quad	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_vpid_alloc:                            ; @vpid_alloc
	.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	x20, x1
	mov	x19, x0
	cmp	w1, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _VM_MAXCPU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_MAXCPU@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ge	LBB0_3
LBB0_2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_panic
LBB0_3:
Lloh5:
	adrp	x8, _procbased_ctls2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _procbased_ctls2@GOTPAGEOFF]
	mov	w21, w20
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _PROCBASED2_ENABLE_VPID@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PROCBASED2_ENABLE_VPID@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.4:
	cmp	w20, #1
	b.lt	LBB0_19
; %bb.5:
	mov	x20, #0
Lloh11:
	adrp	x22, _vpid_unr@GOTPAGE
Lloh12:
	ldr	x22, [x22, _vpid_unr@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_alloc_unr
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	str	w0, [x19, x20, lsl #2]
	add	x20, x20, #1
	cmp	x21, x20
	b.ne	LBB0_6
	b	LBB0_19
LBB0_8:
	cmp	w20, #1
	b.lt	LBB0_19
; %bb.9:
	lsl	x1, x21, #2
	mov	x0, x19
	bl	_bzero
	b	LBB0_19
LBB0_10:
Lloh13:
	adrp	x0, _vpid_alloc_failed@GOTPAGE
Lloh14:
	ldr	x0, [x0, _vpid_alloc_failed@GOTPAGEOFF]
	mov	w1, #1
	bl	_atomic_add_int
	cbz	w20, LBB0_13
; %bb.11:
	sub	x20, x20, #1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, x20, lsl #2]
	bl	_vpid_free
	add	x8, x20, #1
	sub	x20, x20, #1
	cmp	x8, #1
	b.gt	LBB0_12
LBB0_13:
	cmp	w21, #16
	b.hs	LBB0_15
; %bb.14:
	mov	x8, #0
	b	LBB0_18
LBB0_15:
	and	x8, x21, #0xfffffff0
Lloh15:
	adrp	x9, lCPI0_0@PAGE
Lloh16:
	ldr	q0, [x9, lCPI0_0@PAGEOFF]
Lloh17:
	adrp	x9, lCPI0_1@PAGE
Lloh18:
	ldr	q1, [x9, lCPI0_1@PAGEOFF]
	add	x9, x19, #32
	movi.4s	v2, #1
	movi.4s	v3, #5
	movi.4s	v4, #9
	movi.4s	v5, #13
	mov	w10, #16
	dup.2d	v6, x10
	mov	x10, x8
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	uzp1.4s	v7, v1, v0
	add.4s	v16, v7, v2
	add.4s	v17, v7, v3
	add.4s	v18, v7, v4
	add.4s	v7, v7, v5
	stp	q16, q17, [x9, #-32]
	stp	q18, q7, [x9], #64
	add.2d	v0, v0, v6
	add.2d	v1, v1, v6
	subs	x10, x10, #16
	b.ne	LBB0_16
; %bb.17:
	cmp	x8, x21
	b.eq	LBB0_19
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	add	x9, x8, #1
	str	w9, [x19, x8, lsl #2]
	mov	x8, x9
	cmp	x21, x9
	b.ne	LBB0_18
LBB0_19:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpAdrp	Lloh15, Lloh17
	.loh AdrpLdr	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_MAXCPU,4,2                  ; @VM_MAXCPU
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid number of vpids requested: %d"

	.comm	_procbased_ctls2,4,2            ; @procbased_ctls2
	.comm	_PROCBASED2_ENABLE_VPID,4,2     ; @PROCBASED2_ENABLE_VPID
	.comm	_vpid_unr,4,2                   ; @vpid_unr
	.comm	_vpid_alloc_failed,4,2          ; @vpid_alloc_failed
	.no_dead_strip	_vpid_alloc
.subsections_via_symbols
