	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i7core_get_active_channels
_i7core_get_active_channels:            ## @i7core_get_active_channels
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movl	$0, (%rsi)
	movl	$0, (%rdx)
	xorl	%r12d, %r12d
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_get_pdev_slot_func
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	_MC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-68(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_dword
	movq	_MC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_dword
	movq	_NUM_CHANS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	movl	%r14d, %esi
	jle	LBB0_16
## %bb.4:
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_NUM_CHANS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r15d, %esi
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_16
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-64(%rbp), %edx
	movl	%ebx, %ecx
	shrl	%cl, %edx
	testl	$256, %edx                      ## imm = 0x100
	je	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-68(%rbp), %ecx
	btl	%ebx, %ecx
	jb	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	leal	4(%rbx), %r14d
	movl	%esi, %r15d
	movl	%esi, %edi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_get_pdev_slot_func
	testq	%rax, %rax
	je	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r12
	movq	_MC_DOD_CH_DIMM0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	leaq	-60(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	_MC_DOD_CH_DIMM1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	leaq	-56(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	_MC_DOD_CH_DIMM2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	leaq	-52(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	movl	-60(%rbp), %edi
	callq	_DIMM_PRESENT
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	(%r13)
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-56(%rbp), %edi
	callq	_DIMM_PRESENT
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	incl	(%r13)
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-52(%rbp), %edi
	callq	_DIMM_PRESENT
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	incl	(%r13)
	jmp	LBB0_14
LBB0_16:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rdi
	callq	_debugf0
	xorl	%r12d, %r12d
	jmp	LBB0_17
LBB0_1:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_i7core_printk
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.18:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	$1, %r8d
	xorl	%eax, %eax
	callq	_i7core_printk
	jmp	LBB0_2
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't find socket %d fn 3.0!!!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MC_STATUS,4,2                  ## @MC_STATUS
	.comm	_MC_CONTROL,4,2                 ## @MC_CONTROL
	.comm	_NUM_CHANS,4,2                  ## @NUM_CHANS
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't find socket %d fn %d.%d!!!\n"

	.comm	_MC_DOD_CH_DIMM0,4,2            ## @MC_DOD_CH_DIMM0
	.comm	_MC_DOD_CH_DIMM1,4,2            ## @MC_DOD_CH_DIMM1
	.comm	_MC_DOD_CH_DIMM2,4,2            ## @MC_DOD_CH_DIMM2
L_.str.2:                               ## @.str.2
	.asciz	"Number of active channels on socket %d: %d\n"

	.no_dead_strip	_i7core_get_active_channels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i7core_get_active_channels
_i7core_get_active_channels:            ; @i7core_get_active_channels
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	str	wzr, [x1]
	str	wzr, [x2]
	mov	w1, #3
	mov	w2, #0
	bl	_get_pdev_slot_func
	cbz	x0, LBB0_15
; %bb.1:
	mov	x22, x0
Lloh3:
	adrp	x8, _MC_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MC_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #24
	bl	_pci_read_config_dword
Lloh6:
	adrp	x8, _MC_CONTROL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MC_CONTROL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #20
	mov	x0, x22
	bl	_pci_read_config_dword
Lloh9:
	adrp	x26, _NUM_CHANS@GOTPAGE
Lloh10:
	ldr	x26, [x26, _NUM_CHANS@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.2:
	mov	w27, #0
	add	x9, sp, #28
	add	x22, x9, #4
	add	x23, x9, #8
Lloh11:
	adrp	x28, _MC_DOD_CH_DIMM2@GOTPAGE
Lloh12:
	ldr	x28, [x28, _MC_DOD_CH_DIMM2@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x26]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w27, w27, #1
	cmp	w27, w8
	b.ge	LBB0_14
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [sp, #20]
	lsr	w9, w9, w27
	tbz	w9, #8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [sp, #24]
	lsr	w9, w9, w27
	tbnz	w9, #0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w25, w27, #4
	mov	x0, x19
	mov	x1, x25
	mov	w2, #1
	bl	_get_pdev_slot_func
	cbz	x0, LBB0_19
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x0
Lloh13:
	adrp	x8, _MC_DOD_CH_DIMM0@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MC_DOD_CH_DIMM0@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x2, sp, #28
	bl	_pci_read_config_dword
Lloh16:
	adrp	x8, _MC_DOD_CH_DIMM1@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MC_DOD_CH_DIMM1@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x24
	mov	x2, x22
	bl	_pci_read_config_dword
	ldr	w1, [x28]
	mov	x0, x24
	mov	x2, x23
	bl	_pci_read_config_dword
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	ldr	w0, [sp, #28]
	bl	_DIMM_PRESENT
	cbz	w0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #32]
	bl	_DIMM_PRESENT
	cbz	w0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #36]
	bl	_DIMM_PRESENT
	cbz	w0, LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	b	LBB0_3
LBB0_14:
	ldr	w2, [x20]
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_debugf0
	mov	w0, #0
	b	LBB0_17
LBB0_15:
Lloh21:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
LBB0_16:
	mov	x2, x19
	bl	_i7core_printk
Lloh26:
	adrp	x8, _ENODEV@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	ldr	x8, [sp, #40]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.18:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_19:
Lloh32:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	mov	w8, #1
	stp	x25, x8, [sp]
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't find socket %d fn 3.0!!!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MC_STATUS,4,2                  ; @MC_STATUS
	.comm	_MC_CONTROL,4,2                 ; @MC_CONTROL
	.comm	_NUM_CHANS,4,2                  ; @NUM_CHANS
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't find socket %d fn %d.%d!!!\n"

	.comm	_MC_DOD_CH_DIMM0,4,2            ; @MC_DOD_CH_DIMM0
	.comm	_MC_DOD_CH_DIMM1,4,2            ; @MC_DOD_CH_DIMM1
	.comm	_MC_DOD_CH_DIMM2,4,2            ; @MC_DOD_CH_DIMM2
l_.str.2:                               ; @.str.2
	.asciz	"Number of active channels on socket %d: %d\n"

	.no_dead_strip	_i7core_get_active_channels
.subsections_via_symbols
