	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skx_get_dimm_config
_skx_get_dimm_config:                   ## @skx_get_dimm_config
	.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	_SKX_NUM_CHANNELS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_13
## %bb.1:
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r14
	xorl	%r15d, %r15d
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	incq	%r15
	movq	_SKX_NUM_CHANNELS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jge	LBB0_13
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	8(%r14), %rax
	movl	(%rax,%r15,4), %edi
	movl	$140, %esi
	leaq	-72(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	8(%r14), %rax
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movl	(%rax,%r15,4), %edi
	movl	$1024, %esi                     ## imm = 0x400
	leaq	-68(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	_SKX_NUM_DIMMS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$128, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	-48(%rbp), %edi
	movl	-72(%rbp), %esi
	movq	%r14, %rdx
	movq	%r15, %rcx
	movl	%ebx, %r8d
	movl	%r12d, %r9d
	callq	_skx_get_dimm_info
	addl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	incl	%r12d
	addl	$4, %r13d
	movq	_SKX_NUM_DIMMS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jge	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	8(%rbx), %edi
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %ecx
	movl	%r12d, %r8d
	xorl	%r9d, %r9d
	callq	_EDAC_DIMM_PTR
	movq	%rax, %r14
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	movl	%r13d, %esi
	leaq	-48(%rbp), %rdx
	callq	_pci_read_config_dword
	movl	-48(%rbp), %edi
	callq	_IS_DIMM_PRESENT
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	-68(%rbp), %edi
	movl	%r12d, %esi
	callq	_IS_NVDIMM_PRESENT
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_EDAC_MOD_STR@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	%r12d, %ecx
	callq	_skx_get_nvdimm_info
	addl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
	movq	_nvdimm_count@GOTPCREL(%rip), %rax
	incl	(%rax)
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_skx_check_ecc
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_skx_printk
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SKX_NUM_CHANNELS,4,2           ## @SKX_NUM_CHANNELS
	.comm	_SKX_NUM_DIMMS,4,2              ## @SKX_NUM_DIMMS
	.comm	_EDAC_MOD_STR,4,2               ## @EDAC_MOD_STR
	.comm	_nvdimm_count,4,2               ## @nvdimm_count
	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ECC is disabled on imc %d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_skx_get_dimm_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skx_get_dimm_config
_skx_get_dimm_config:                   ; @skx_get_dimm_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, _SKX_NUM_CHANNELS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SKX_NUM_CHANNELS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x19, x0
	mov	x21, #0
	ldr	x8, [x0, #16]
	ldr	x20, [x8]
Lloh3:
	adrp	x26, _SKX_NUM_DIMMS@GOTPAGE
Lloh4:
	ldr	x26, [x26, _SKX_NUM_DIMMS@GOTPAGEOFF]
Lloh5:
	adrp	x27, _EDAC_MOD_STR@GOTPAGE
Lloh6:
	ldr	x27, [x27, _EDAC_MOD_STR@GOTPAGEOFF]
Lloh7:
	adrp	x28, _nvdimm_count@GOTPAGE
Lloh8:
	ldr	x28, [x28, _nvdimm_count@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
Lloh9:
	adrp	x8, _SKX_NUM_CHANNELS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SKX_NUM_CHANNELS@GOTPAGEOFF]
Lloh11:
	ldrsw	x8, [x8]
	cmp	x21, x8
	b.ge	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x8, [x20, #8]
	lsl	x22, x21, #2
	ldr	w0, [x8, x22]
	add	x2, sp, #8
	mov	w1, #140
	bl	_pci_read_config_dword
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x22]
	add	x2, sp, #4
	mov	w1, #1024
	bl	_pci_read_config_dword
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w25, #0
	mov	w22, #0
	mov	w23, #128
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	ldp	w1, w0, [sp, #8]
	mov	x2, x24
	mov	x3, x20
	mov	x4, x21
	mov	x5, x22
	bl	_skx_get_dimm_info
	add	w25, w25, w0
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	w22, w22, #1
	ldr	w8, [x26]
	add	w23, w23, #4
	cmp	w22, w8
	b.ge	LBB0_10
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	w1, w0, [x19, #4]
	ldr	w2, [x19]
	mov	x3, x21
	mov	x4, x22
	mov	w5, #0
	bl	_EDAC_DIMM_PTR
	mov	x24, x0
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x21, lsl #2]
	add	x2, sp, #12
	mov	x1, x23
	bl	_pci_read_config_dword
	ldr	w0, [sp, #12]
	bl	_IS_DIMM_PRESENT
	cbnz	x0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w0, [sp, #4]
	mov	x1, x22
	bl	_IS_NVDIMM_PRESENT
	cbz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w4, [x27]
	mov	x0, x24
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_skx_get_nvdimm_info
	add	w25, w25, w0
	ldr	w8, [x28]
	add	w8, w8, #1
	str	w8, [x28]
	b	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w25, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_skx_check_ecc
	cbnz	w0, LBB0_2
; %bb.12:
Lloh12:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w2, [x20]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_skx_printk
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SKX_NUM_CHANNELS,4,2           ; @SKX_NUM_CHANNELS
	.comm	_SKX_NUM_DIMMS,4,2              ; @SKX_NUM_DIMMS
	.comm	_EDAC_MOD_STR,4,2               ; @EDAC_MOD_STR
	.comm	_nvdimm_count,4,2               ; @nvdimm_count
	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ECC is disabled on imc %d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_skx_get_dimm_config
.subsections_via_symbols
