	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function platform_mp_get_core_cnt
_platform_mp_get_core_cnt:              ## @platform_mp_get_core_cnt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	_platform_mp_get_core_cnt.ncores(%rip), %eax
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_cp15_l2ctlr_get
	movl	%eax, %edi
	callq	_CPUV7_L2CTLR_NPROC
	movl	%eax, _platform_mp_get_core_cnt.ncores(%rip)
	movq	_alpine_validate_cpu@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_ofw_cpu_early_foreach
	movl	%eax, %ebx
	movl	_platform_mp_get_core_cnt.ncores(%rip), %eax
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.2:
	cmpl	%eax, %ebx
	jge	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_printf
	movl	%ebx, _platform_mp_get_core_cnt.ncores(%rip)
	movl	%ebx, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_platform_mp_get_core_cnt.ncores,4,2 ## @platform_mp_get_core_cnt.ncores
	.comm	_alpine_validate_cpu,4,2        ## @alpine_validate_cpu
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SMP: limiting number of active CPUs to %d out of %d\n"

	.no_dead_strip	_platform_mp_get_core_cnt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function platform_mp_get_core_cnt
_platform_mp_get_core_cnt:              ; @platform_mp_get_core_cnt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	adrp	x20, _platform_mp_get_core_cnt.ncores@PAGE
	ldr	w2, [x20, _platform_mp_get_core_cnt.ncores@PAGEOFF]
	cbnz	w2, LBB0_3
; %bb.1:
	bl	_cp15_l2ctlr_get
	bl	_CPUV7_L2CTLR_NPROC
	str	w0, [x20, _platform_mp_get_core_cnt.ncores@PAGEOFF]
Lloh0:
	adrp	x8, _alpine_validate_cpu@GOTPAGE
Lloh1:
	ldr	x8, [x8, _alpine_validate_cpu@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_ofw_cpu_early_foreach
	ldr	w2, [x20, _platform_mp_get_core_cnt.ncores@PAGEOFF]
	cmp	w0, #1
	ccmp	w0, w2, #0, ge
	b.ge	LBB0_3
; %bb.2:
	mov	x19, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_printf
	str	w19, [x20, _platform_mp_get_core_cnt.ncores@PAGEOFF]
	mov	x2, x19
LBB0_3:
	mov	x0, x2
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_platform_mp_get_core_cnt.ncores,4,2 ; @platform_mp_get_core_cnt.ncores
	.comm	_alpine_validate_cpu,4,2        ; @alpine_validate_cpu
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SMP: limiting number of active CPUs to %d out of %d\n"

	.no_dead_strip	_platform_mp_get_core_cnt
.subsections_via_symbols
