	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chrp_smp_next_cpu
_chrp_smp_next_cpu:                     ## @chrp_smp_next_cpu
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_platform_cpuref_valid@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movslq	(%rsi), %rax
	leal	1(%rax), %ecx
	movq	_platform_cpuref_cnt@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jge	LBB0_5
## %bb.2:
	movq	_platform_cpuref@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	8(%rcx,%rax,8), %edx
	movl	%edx, (%rsi)
	movl	12(%rcx,%rax,8), %eax
	movl	%eax, 4(%rsi)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_5:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_platform_cpuref_valid,8,3      ## @platform_cpuref_valid
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_platform_cpuref_cnt,4,2        ## @platform_cpuref_cnt
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_platform_cpuref,8,3            ## @platform_cpuref
	.no_dead_strip	_chrp_smp_next_cpu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chrp_smp_next_cpu
_chrp_smp_next_cpu:                     ; @chrp_smp_next_cpu
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _platform_cpuref_valid@GOTPAGE
Lloh1:
	ldr	x8, [x8, _platform_cpuref_valid@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	ldrsw	x8, [x1]
	add	x8, x8, #1
Lloh3:
	adrp	x9, _platform_cpuref_cnt@GOTPAGE
Lloh4:
	ldr	x9, [x9, _platform_cpuref_cnt@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.2:
	mov	w0, #0
Lloh6:
	adrp	x9, _platform_cpuref@GOTPAGE
Lloh7:
	ldr	x9, [x9, _platform_cpuref@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	d0, [x9, x8, lsl #3]
	str	d0, [x1]
	ret
LBB0_3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ret
LBB0_4:
Lloh12:
	adrp	x8, _ENOENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_platform_cpuref_valid,8,3      ; @platform_cpuref_valid
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_platform_cpuref_cnt,4,2        ; @platform_cpuref_cnt
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_platform_cpuref,8,3            ; @platform_cpuref
	.no_dead_strip	_chrp_smp_next_cpu
.subsections_via_symbols
