	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpu_add                        ## -- Begin function cpu_add
	.p2align	4, 0x90
_cpu_add:                               ## @cpu_add
	.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
	movq	%rdi, %rbx
	movq	_max_apic_id@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jae	LBB0_1
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_panic                          ## TAILCALL
LBB0_1:
	movl	%esi, %r14d
	movq	_cpu_info@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax,%rbx,8)
	sete	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	(%r15), %rax
	movl	$1, (%rax,%rbx,8)
	testb	%r14b, %r14b
	je	LBB0_3
## %bb.2:
	movq	_boot_cpu_id@GOTPCREL(%rip), %r12
	movslq	(%r12), %rsi
	xorl	%edi, %edi
	cmpq	$-1, %rsi
	sete	%dil
	callq	_KASSERT
	movl	%ebx, (%r12)
	movq	(%r15), %rax
	movl	$1, 4(%rax,%rbx,8)
LBB0_3:
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.6:
	testb	%r14b, %r14b
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printf                         ## TAILCALL
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_max_apic_id,8,3                ## @max_apic_id
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SMP: APIC ID %d too high"

	.comm	_cpu_info,8,3                   ## @cpu_info
	.comm	_boot_cpu_id,4,2                ## @boot_cpu_id
	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.3:                               ## @.str.3
	.asciz	"SMP: Added CPU %u (%s)\n"

L_.str.4:                               ## @.str.4
	.asciz	"BSP"

L_.str.5:                               ## @.str.5
	.asciz	"AP"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpu_add                        ; -- Begin function cpu_add
	.p2align	2
_cpu_add:                               ; @cpu_add
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _max_apic_id@GOTPAGE
Lloh1:
	ldr	x8, [x8, _max_apic_id@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_panic
LBB0_2:
	mov	x20, x1
Lloh5:
	adrp	x21, _cpu_info@GOTPAGE
Lloh6:
	ldr	x21, [x21, _cpu_info@GOTPAGEOFF]
	ldr	x8, [x21]
	lsl	x23, x19, #3
	ldr	w8, [x8, x23]
	cmp	w8, #0
	cset	w0, eq
	mov	x1, x19
	bl	_KASSERT
	ldr	x8, [x21]
	mov	w22, #1
	str	w22, [x8, x23]
	cbz	w20, LBB0_4
; %bb.3:
Lloh7:
	adrp	x23, _boot_cpu_id@GOTPAGE
Lloh8:
	ldr	x23, [x23, _boot_cpu_id@GOTPAGEOFF]
	ldrsw	x1, [x23]
	cmn	x1, #1
	cset	w0, eq
	bl	_KASSERT
	str	w19, [x23]
	ldr	x8, [x21]
	add	x8, x8, x19, lsl #3
	str	w22, [x8, #4]
LBB0_4:
Lloh9:
	adrp	x8, _bootverbose@GOTPAGE
Lloh10:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh12:
	adrp	x8, l_.str.4@PAGE
Lloh13:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh14:
	adrp	x9, l_.str.5@PAGE
Lloh15:
	add	x9, x9, l_.str.5@PAGEOFF
	cmp	w20, #0
	csel	x2, x9, x8, eq
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_printf
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_max_apic_id,8,3                ; @max_apic_id
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SMP: APIC ID %d too high"

	.comm	_cpu_info,8,3                   ; @cpu_info
	.comm	_boot_cpu_id,4,2                ; @boot_cpu_id
	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.3:                               ; @.str.3
	.asciz	"SMP: Added CPU %u (%s)\n"

l_.str.4:                               ; @.str.4
	.asciz	"BSP"

l_.str.5:                               ; @.str.5
	.asciz	"AP"

.subsections_via_symbols
