	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fbsdrun_addcpu                 ## -- Begin function fbsdrun_addcpu
	.p2align	4, 0x90
_fbsdrun_addcpu:                        ## @fbsdrun_addcpu
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	%rdi, %r14
	movq	_BSP@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%esi, (%rax)
	sete	%dil
	callq	_assert
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_vm_activate_cpu
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_err
LBB0_2:
	movq	_cpumask@GOTPCREL(%rip), %rsi
	movl	%ebx, %edi
	callq	_CPU_SET_ATOMIC
	movq	_vmexit@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rdx
	shlq	$4, %rdx
	movl	%r15d, 8(%rax,%rdx)
	movq	$0, (%rax,%rdx)
	movq	_mt_vmm_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r14, 8(%rcx,%rdx)
	movq	(%rax), %rax
	leaq	(%rax,%rdx), %rcx
	movl	%ebx, (%rax,%rdx)
	leaq	(%rax,%rdx), %rdi
	addq	$4, %rdi
	movq	_fbsdrun_start_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_pthread_create
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_assert                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BSP,4,2                        ## @BSP
	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not activate CPU %d"

	.comm	_cpumask,4,2                    ## @cpumask
	.comm	_vmexit,8,3                     ## @vmexit
	.comm	_mt_vmm_info,8,3                ## @mt_vmm_info
	.comm	_fbsdrun_start_thread,4,2       ## @fbsdrun_start_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fbsdrun_addcpu                 ; -- Begin function fbsdrun_addcpu
	.p2align	2
_fbsdrun_addcpu:                        ; @fbsdrun_addcpu
	.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, x3
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _BSP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BSP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	cset	w0, eq
	bl	_assert
	mov	x0, x20
	mov	x1, x19
	bl	_vm_activate_cpu
	cbz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_err
LBB0_2:
Lloh8:
	adrp	x1, _cpumask@GOTPAGE
Lloh9:
	ldr	x1, [x1, _cpumask@GOTPAGEOFF]
	mov	x0, x19
	bl	_CPU_SET_ATOMIC
Lloh10:
	adrp	x8, _vmexit@GOTPAGE
Lloh11:
	ldr	x8, [x8, _vmexit@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	sbfiz	x9, x19, #4, #32
	add	x8, x8, x9
	str	w21, [x8, #8]
Lloh13:
	adrp	x10, _mt_vmm_info@GOTPAGE
Lloh14:
	ldr	x10, [x10, _mt_vmm_info@GOTPAGEOFF]
	str	xzr, [x8]
	ldr	x8, [x10]
	add	x8, x8, x9
	str	x20, [x8, #8]
	ldr	x8, [x10]
	add	x3, x8, x9
	mov	x0, x3
	str	w19, [x0], #4
Lloh15:
	adrp	x8, _fbsdrun_start_thread@GOTPAGE
Lloh16:
	ldr	x8, [x8, _fbsdrun_start_thread@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x1, #0
	bl	_pthread_create
	cmp	w0, #0
	cset	w0, eq
	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	_assert
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BSP,4,2                        ; @BSP
	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not activate CPU %d"

	.comm	_cpumask,4,2                    ; @cpumask
	.comm	_vmexit,8,3                     ; @vmexit
	.comm	_mt_vmm_info,8,3                ; @mt_vmm_info
	.comm	_fbsdrun_start_thread,4,2       ; @fbsdrun_start_thread
.subsections_via_symbols
