	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getcpuinfo
_getcpuinfo:                            ## @getcpuinfo
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_kd@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_xo_errx
LBB0_2:
	movq	$4, -48(%rbp)
	leaq	L_.str.1(%rip), %rdi
	leaq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	xorl	%eax, %eax
	callq	_mysysctl
	cmpq	$4, -48(%rbp)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_xo_errx
LBB0_4:
	movslq	-52(%rbp), %rax
	movq	_CPUSTATES@GOTPCREL(%rip), %r13
	movslq	(%r13), %r12
	imulq	%rax, %r12
	shlq	$3, %r12
	movq	%r12, -48(%rbp)
	movq	%r12, %rdi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movq	%r12, %rdx
	callq	_xo_err
LBB0_6:
	leaq	L_.str.4(%rip), %rdi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_mysysctl
	movq	-48(%rbp), %rax
	movslq	(%r13), %r13
	movq	%rax, %rcx
	orq	%r13, %rcx
	shrq	$32, %rcx
	je	LBB0_7
## %bb.8:
	xorl	%edx, %edx
	divq	%r13
	jmp	LBB0_9
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r13d
                                        ## kill: def $eax killed $eax def $rax
LBB0_9:
	shrq	$3, %rax
	movl	%eax, %r8d
	decl	%r8d
	js	LBB0_10
## %bb.11:
	movl	%eax, %r9d
	leaq	(,%r13,8), %r10
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	xorl	%r11d, %r11d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	xorl	%r12d, %r12d
	xorl	%edi, %edi
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=1
	addl	%r12d, %eax
	orq	%rdi, %r11
	incq	%rcx
	addq	%r10, %rbx
	cmpq	%r9, %rcx
	je	LBB0_19
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	testl	%r13d, %r13d
	jle	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$1, %edi
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-8(%rbx,%rdi,8), %rdx
	testq	%rdx, %rdx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	leaq	1(%rdi), %rsi
	cmpq	%r13, %rdi
	movq	%rsi, %rdi
	jl	LBB0_14
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	$1, %edi
	shlq	%cl, %rdi
	movl	$1, %r12d
	testq	%rdx, %rdx
	jne	LBB0_18
	jmp	LBB0_17
LBB0_10:
	xorl	%r11d, %r11d
	xorl	%eax, %eax
LBB0_19:
	testq	%r15, %r15
	je	LBB0_21
## %bb.20:
	movq	%r11, (%r15)
LBB0_21:
	testq	%r14, %r14
	je	LBB0_23
## %bb.22:
	movl	%r8d, (%r14)
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kd,8,3                         ## @kd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not implemented"

L_.str.1:                               ## @.str.1
	.asciz	"kern.smp.maxcpus"

L_.str.2:                               ## @.str.2
	.asciz	"sysctl kern.smp.maxcpus"

	.comm	_CPUSTATES,4,2                  ## @CPUSTATES
L_.str.3:                               ## @.str.3
	.asciz	"malloc %zd bytes"

L_.str.4:                               ## @.str.4
	.asciz	"kern.cp_times"

	.no_dead_strip	_getcpuinfo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getcpuinfo
_getcpuinfo:                            ; @getcpuinfo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _kd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kd@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_xo_errx
LBB0_2:
	mov	w8, #4
	str	x8, [sp, #24]
	add	x8, sp, #24
	add	x9, sp, #20
	stp	x9, x8, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_mysysctl
	ldr	x8, [sp, #24]
	cmp	x8, #4
	b.eq	LBB0_4
; %bb.3:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_xo_errx
LBB0_4:
	ldrsw	x8, [sp, #20]
Lloh9:
	adrp	x23, _CPUSTATES@GOTPAGE
Lloh10:
	ldr	x23, [x23, _CPUSTATES@GOTPAGEOFF]
	ldrsw	x9, [x23]
	mul	x8, x8, x9
	lsl	x22, x8, #3
	str	x22, [sp, #24]
	mov	x0, x22
	bl	_malloc
	mov	x21, x0
	cbnz	x0, LBB0_6
; %bb.5:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	mov	x2, x22
	bl	_xo_err
LBB0_6:
	add	x8, sp, #24
	stp	x21, x8, [sp]
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_mysysctl
	ldr	x8, [sp, #24]
	ldrsw	x10, [x23]
	udiv	x12, x8, x10
	lsr	x8, x12, #3
	subs	w8, w8, #1
	b.mi	LBB0_15
; %bb.7:
	mov	x11, #0
	mov	w0, #0
	mov	x9, #0
	ubfx	x12, x12, #3, #32
	lsl	x13, x10, #3
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	w14, #0
	mov	x15, #0
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	orr	x9, x15, x9
	add	w0, w0, w14
	add	x11, x11, #1
	add	x21, x21, x13
	cmp	x11, x12
	b.eq	LBB0_16
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	cmp	w10, #1
	b.lt	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x14, #0
LBB0_12:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x15, [x21, x14, lsl #3]
	add	x14, x14, #1
	cmp	x15, #0
	ccmp	x14, x10, #0, eq
	b.lt	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	cbz	x15, LBB0_8
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w14, #1
	lsl	x15, x14, x11
	b	LBB0_9
LBB0_15:
	mov	x9, #0
	mov	w0, #0
LBB0_16:
	cbz	x20, LBB0_18
; %bb.17:
	str	x9, [x20]
LBB0_18:
	cbz	x19, LBB0_20
; %bb.19:
	str	w8, [x19]
LBB0_20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_kd,8,3                         ; @kd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not implemented"

l_.str.1:                               ; @.str.1
	.asciz	"kern.smp.maxcpus"

l_.str.2:                               ; @.str.2
	.asciz	"sysctl kern.smp.maxcpus"

	.comm	_CPUSTATES,4,2                  ; @CPUSTATES
l_.str.3:                               ; @.str.3
	.asciz	"malloc %zd bytes"

l_.str.4:                               ; @.str.4
	.asciz	"kern.cp_times"

	.no_dead_strip	_getcpuinfo
.subsections_via_symbols
