	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x86topo_add_sched_group
_x86topo_add_sched_group:               ## @x86topo_add_sched_group
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	_TOPO_TYPE_SYSTEM@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	sete	%cl
	movq	_TOPO_TYPE_CACHE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%dl
	orb	%cl, %dl
	movq	_TOPO_TYPE_GROUP@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	movq	%rsi, %rbx
	sete	%cl
	orb	%dl, %cl
	movzbl	%cl, %edi
	movq	%rax, %rsi
	callq	_KASSERT
	leaq	24(%r13), %r15
	leaq	44(%rbx), %rsi
	movq	%r15, %rdi
	callq	_CPU_COPY
	movl	8(%r13), %eax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%eax, (%rbx)
	movq	(%r13), %rax
	cmpq	(%r12), %rax
	jne	LBB0_1
## %bb.2:
	movq	_CG_SHARE_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	leaq	16(%r13), %rax
LBB0_3:
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx)
	xorl	%r12d, %r12d
	movq	_TOPO_TYPE_CORE@GOTPCREL(%rip), %rbx
	movq	%r13, %rax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rcx
	cmpq	(%rbx), %rcx
	je	LBB0_26
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_topo_next_node
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_7
LBB0_26:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%r12d
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_topo_next_nonchild_node
	testq	%rax, %rax
	jne	LBB0_4
LBB0_7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	_CG_SHARE_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.8:
	cmpl	$2, 8(%r13)
	jl	LBB0_11
## %bb.9:
	cmpl	$1, %r12d
	jg	LBB0_11
## %bb.10:
	movq	_CG_FLAG_SMT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 40(%rcx)
LBB0_11:
	xorl	%r12d, %r12d
	movq	%r13, %rbx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_TOPO_TYPE_CACHE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r13), %rax
	movq	_TOPO_TYPE_SYSTEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_27
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	24(%rbx), %rdi
	movq	%r15, %rsi
	callq	_CPU_CMP
	testq	%rax, %rax
	jne	LBB0_27
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_topo_next_node
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_18
LBB0_27:                                ##   in Loop: Header=BB0_12 Depth=1
	incl	%r12d
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_topo_next_nonchild_node
	jmp	LBB0_17
LBB0_18:
	movl	%r12d, %edi
	callq	_smp_topo_alloc
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 24(%rcx)
	movl	%r12d, 16(%rcx)
	xorl	%r12d, %r12d
	movq	%r13, %rbx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	_TOPO_TYPE_CACHE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	(%r13), %rax
	movq	_TOPO_TYPE_SYSTEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_28
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	leaq	24(%rbx), %rdi
	movq	%r15, %rsi
	callq	_CPU_CMP
	testq	%rax, %rax
	jne	LBB0_28
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_topo_next_node
LBB0_24:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_19
	jmp	LBB0_25
LBB0_28:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	24(%rdx), %rax
	leaq	(%r12,%r12,2), %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %rsi
	movq	%rdx, 32(%rax,%rcx)
	movq	%rbx, %rdi
	callq	_x86topo_add_sched_group
	incq	%r12
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_topo_next_nonchild_node
	jmp	LBB0_24
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TOPO_TYPE_SYSTEM,8,3           ## @TOPO_TYPE_SYSTEM
	.comm	_TOPO_TYPE_CACHE,8,3            ## @TOPO_TYPE_CACHE
	.comm	_TOPO_TYPE_GROUP,8,3            ## @TOPO_TYPE_GROUP
	.comm	_CG_SHARE_NONE,8,3              ## @CG_SHARE_NONE
	.comm	_TOPO_TYPE_CORE,8,3             ## @TOPO_TYPE_CORE
	.comm	_CG_FLAG_SMT,4,2                ## @CG_FLAG_SMT
	.no_dead_strip	_x86topo_add_sched_group
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x86topo_add_sched_group
_x86topo_add_sched_group:               ; @x86topo_add_sched_group
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _TOPO_TYPE_SYSTEM@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TOPO_TYPE_SYSTEM@GOTPAGEOFF]
	ldr	x1, [x0]
	ldr	x8, [x24]
	cmp	x1, x8
Lloh2:
	adrp	x25, _TOPO_TYPE_CACHE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _TOPO_TYPE_CACHE@GOTPAGEOFF]
	ldr	x8, [x25]
	ccmp	x1, x8, #4, ne
Lloh4:
	adrp	x26, _TOPO_TYPE_GROUP@GOTPAGE
Lloh5:
	ldr	x26, [x26, _TOPO_TYPE_GROUP@GOTPAGEOFF]
	ldr	x8, [x26]
	ccmp	x1, x8, #4, ne
	cset	w0, eq
	bl	_KASSERT
	add	x21, x20, #24
	add	x1, x19, #44
	mov	x0, x21
	bl	_CPU_COPY
	mov	w22, #0
	ldr	w8, [x20, #8]
	str	w8, [x19]
	ldr	x8, [x20]
	ldr	x9, [x24]
	add	x10, x20, #16
Lloh6:
	adrp	x23, _CG_SHARE_NONE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _CG_SHARE_NONE@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x23, x10, eq
	ldr	x8, [x8]
	str	x8, [x19, #8]
Lloh8:
	adrp	x27, _TOPO_TYPE_CORE@GOTPAGE
Lloh9:
	ldr	x27, [x27, _TOPO_TYPE_CORE@GOTPAGEOFF]
	mov	x1, x20
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x1]
	ldr	x9, [x27]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	bl	_topo_next_node
	mov	x1, x0
	cbnz	x0, LBB0_1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	add	w22, w22, #1
	mov	x0, x20
	bl	_topo_next_nonchild_node
	mov	x1, x0
	cbnz	x0, LBB0_1
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.5:
	ldr	w8, [x20, #8]
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.6:
	cmp	w22, #1
	b.gt	LBB0_8
; %bb.7:
Lloh10:
	adrp	x8, _CG_FLAG_SMT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CG_FLAG_SMT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #40]
LBB0_8:
	mov	w22, #0
	mov	x23, x20
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x9, [x26]
	ldr	x10, [x25]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x0, x23, #24
	mov	x1, x21
	bl	_CPU_CMP
	cbnz	x0, LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_topo_next_node
	mov	x23, x0
	cbnz	x0, LBB0_9
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	add	w22, w22, #1
	mov	x0, x20
	mov	x1, x23
	bl	_topo_next_nonchild_node
	mov	x23, x0
	cbnz	x0, LBB0_9
LBB0_14:
	mov	x0, x22
	bl	_smp_topo_alloc
	mov	x23, #0
	str	x0, [x19, #24]
	str	w22, [x19, #16]
	mov	w27, #48
	mov	x22, x20
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x9, [x26]
	ldr	x10, [x25]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x0, x22, #24
	mov	x1, x21
	bl	_CPU_CMP
	cbnz	x0, LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_topo_next_node
	mov	x22, x0
	cbnz	x0, LBB0_15
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x19, #24]
	madd	x1, x23, x27, x8
	str	x19, [x1, #32]
	mov	x0, x22
	bl	_x86topo_add_sched_group
	add	x23, x23, #1
	mov	x0, x20
	mov	x1, x22
	bl	_topo_next_nonchild_node
	mov	x22, x0
	cbnz	x0, LBB0_15
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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_TOPO_TYPE_SYSTEM,8,3           ; @TOPO_TYPE_SYSTEM
	.comm	_TOPO_TYPE_CACHE,8,3            ; @TOPO_TYPE_CACHE
	.comm	_TOPO_TYPE_GROUP,8,3            ; @TOPO_TYPE_GROUP
	.comm	_CG_SHARE_NONE,8,3              ; @CG_SHARE_NONE
	.comm	_TOPO_TYPE_CORE,8,3             ; @TOPO_TYPE_CORE
	.comm	_CG_FLAG_SMT,4,2                ; @CG_FLAG_SMT
	.no_dead_strip	_x86topo_add_sched_group
.subsections_via_symbols
