	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_mc_regs
_read_mc_regs:                          ## @read_mc_regs
	.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	%rdi, %r12
	movq	_MSR_K8_TOP_MEM1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_rdmsrl
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_edac_dbg
	movq	_MSR_K8_SYSCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdmsrl
	movl	$21, %edi
	callq	_BIT
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_edac_dbg
	cmpq	$0, 64(%r12)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	___read_mc_regs_df
	movl	56(%r12), %edi
	movq	_DF_DHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	44(%r12), %rdx
	callq	_amd64_read_pci_cfg
	jmp	LBB0_9
LBB0_2:
	movl	36(%r12), %edi
	movq	_NBCAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	52(%r12), %rdx
	callq	_amd64_read_pci_cfg
	movq	%r12, %rdi
	callq	_read_dram_ctl_register
	movq	_DRAM_RANGES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	movq	_DRAM_RANGES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jae	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_read_dram_base_limit_regs
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_dram_rw
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %r13d
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_get_dram_base
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_get_dram_limit
	movl	$1, %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_edac_dbg
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_dram_intlv_en
	testq	%rax, %rax
	leaq	L_.str.5(%rip), %r14
	leaq	L_.str.6(%rip), %rax
	cmoveq	%rax, %r14
	testb	$1, %r13b
	leaq	L_.str.7(%rip), %r15
	leaq	L_.str.8(%rip), %rax
	cmoveq	%rax, %r15
	testb	$2, %r13b
	leaq	L_.str.9(%rip), %r13
	cmoveq	%rax, %r13
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_dram_intlv_sel
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_dram_dst_node
	movl	%eax, (%rsp)
	movl	$1, %edi
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%r13, %r8
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_edac_dbg
	jmp	LBB0_6
LBB0_7:
	movl	48(%r12), %edi
	movq	_DHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	44(%r12), %rdx
	callq	_amd64_read_pci_cfg
	movq	_DBAM0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	40(%r12), %rcx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_amd64_read_dct_pci_cfg
	movl	36(%r12), %edi
	movq	_F10_ONLINE_SPARE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	32(%r12), %rdx
	callq	_amd64_read_pci_cfg
	movq	_DCLR0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	28(%r12), %rcx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_amd64_read_dct_pci_cfg
	movq	_DCHR0@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	24(%r12), %rcx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_amd64_read_dct_pci_cfg
	movq	%r12, %rdi
	callq	_dct_ganging_enabled
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	(%rbx), %edx
	leaq	20(%r12), %rcx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_amd64_read_dct_pci_cfg
	movl	(%r14), %edx
	leaq	16(%r12), %rcx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_amd64_read_dct_pci_cfg
LBB0_9:
	movq	%r12, %rdi
	callq	_read_dct_base_mask
	movq	%r12, %rdi
	callq	_determine_memory_type
	movq	_edac_mem_types@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r12), %rcx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str.10(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_edac_dbg
	movq	%r12, %rdi
	callq	_determine_ecc_sym_sz
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dump_misc_regs                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSR_K8_TOP_MEM1,4,2            ## @MSR_K8_TOP_MEM1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"  TOP_MEM:  0x%016llx\n"

	.comm	_MSR_K8_SYSCFG,4,2              ## @MSR_K8_SYSCFG
	.comm	_MSR_K8_TOP_MEM2,4,2            ## @MSR_K8_TOP_MEM2
L_.str.2:                               ## @.str.2
	.asciz	"  TOP_MEM2 disabled\n"

	.comm	_DF_DHAR,4,2                    ## @DF_DHAR
	.comm	_NBCAP,4,2                      ## @NBCAP
	.comm	_DRAM_RANGES,4,2                ## @DRAM_RANGES
L_.str.3:                               ## @.str.3
	.asciz	"  DRAM range[%d], base: 0x%016llx; limit: 0x%016llx\n"

L_.str.4:                               ## @.str.4
	.asciz	"   IntlvEn=%s; Range access: %s%s IntlvSel=%d DstNode=%d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Enabled"

L_.str.6:                               ## @.str.6
	.asciz	"Disabled"

L_.str.7:                               ## @.str.7
	.asciz	"R"

L_.str.8:                               ## @.str.8
	.asciz	"-"

L_.str.9:                               ## @.str.9
	.asciz	"W"

	.comm	_DHAR,4,2                       ## @DHAR
	.comm	_DBAM0,4,2                      ## @DBAM0
	.comm	_F10_ONLINE_SPARE,4,2           ## @F10_ONLINE_SPARE
	.comm	_DCLR0,4,2                      ## @DCLR0
	.comm	_DCHR0,4,2                      ## @DCHR0
L_.str.10:                              ## @.str.10
	.asciz	"  DIMM type: %s\n"

	.comm	_edac_mem_types,8,3             ## @edac_mem_types
	.no_dead_strip	_read_mc_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_mc_regs
_read_mc_regs:                          ; @read_mc_regs
	.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	x19, x0
Lloh0:
	adrp	x8, _MSR_K8_TOP_MEM1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSR_K8_TOP_MEM1@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_rdmsrl
	ldr	w8, [x19]
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	bl	_edac_dbg
Lloh5:
	adrp	x8, _MSR_K8_SYSCFG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSR_K8_SYSCFG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_rdmsrl
	mov	w0, #21
	bl	_BIT
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #0
	bl	_edac_dbg
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	___read_mc_regs_df
	ldr	w0, [x19, #56]
Lloh10:
	adrp	x8, _DF_DHAR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DF_DHAR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x2, x19, #44
	bl	_amd64_read_pci_cfg
	b	LBB0_9
LBB0_2:
	ldr	w0, [x19, #36]
Lloh13:
	adrp	x8, _NBCAP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NBCAP@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x2, x19, #52
	bl	_amd64_read_pci_cfg
	mov	x0, x19
	bl	_read_dram_ctl_register
Lloh16:
	adrp	x25, _DRAM_RANGES@GOTPAGE
Lloh17:
	ldr	x25, [x25, _DRAM_RANGES@GOTPAGEOFF]
	ldr	w8, [x25]
	cbz	w8, LBB0_7
; %bb.3:
	mov	w20, #0
Lloh18:
	adrp	x21, l_.str.8@PAGE
Lloh19:
	add	x21, x21, l_.str.8@PAGEOFF
Lloh20:
	adrp	x26, l_.str.9@PAGE
Lloh21:
	add	x26, x26, l_.str.9@PAGEOFF
Lloh22:
	adrp	x22, l_.str.4@PAGE
Lloh23:
	add	x22, x22, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w20, w20, #1
	ldr	w8, [x25]
	cmp	w20, w8
	b.hs	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_read_dram_base_limit_regs
	mov	x0, x19
	mov	x1, x20
	bl	_dram_rw
	cbz	w0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
	mov	x0, x19
	mov	x1, x20
	bl	_get_dram_base
	mov	x24, x0
	mov	x0, x19
	mov	x1, x20
	bl	_get_dram_limit
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x24, x0, [sp, #8]
	str	x20, [sp]
	mov	w0, #1
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_edac_dbg
	mov	x0, x19
	mov	x1, x20
	bl	_dram_intlv_en
	cmp	x0, #0
Lloh26:
	adrp	x8, l_.str.5@PAGE
Lloh27:
	add	x8, x8, l_.str.5@PAGEOFF
Lloh28:
	adrp	x9, l_.str.6@PAGE
Lloh29:
	add	x9, x9, l_.str.6@PAGEOFF
	csel	x24, x9, x8, eq
	tst	w23, #0x1
Lloh30:
	adrp	x8, l_.str.7@PAGE
Lloh31:
	add	x8, x8, l_.str.7@PAGEOFF
	csel	x27, x21, x8, eq
	tst	w23, #0x2
	csel	x28, x21, x26, eq
	mov	x0, x19
	mov	x1, x20
	bl	_dram_intlv_sel
	mov	x23, x0
	mov	x0, x19
	mov	x1, x20
	bl	_dram_dst_node
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x23, x0, [sp, #24]
	stp	x27, x28, [sp, #8]
	str	x24, [sp]
	mov	w0, #1
	mov	x1, x22
	bl	_edac_dbg
	b	LBB0_4
LBB0_7:
	ldr	w0, [x19, #48]
Lloh32:
	adrp	x8, _DHAR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DHAR@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	add	x2, x19, #44
	bl	_amd64_read_pci_cfg
Lloh35:
	adrp	x8, _DBAM0@GOTPAGE
Lloh36:
	ldr	x8, [x8, _DBAM0@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	add	x3, x19, #40
	mov	x0, x19
	mov	w1, #0
	bl	_amd64_read_dct_pci_cfg
	ldr	w0, [x19, #36]
Lloh38:
	adrp	x8, _F10_ONLINE_SPARE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _F10_ONLINE_SPARE@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	add	x2, x19, #32
	bl	_amd64_read_pci_cfg
Lloh41:
	adrp	x20, _DCLR0@GOTPAGE
Lloh42:
	ldr	x20, [x20, _DCLR0@GOTPAGEOFF]
	ldr	w2, [x20]
	add	x3, x19, #28
	mov	x0, x19
	mov	w1, #0
	bl	_amd64_read_dct_pci_cfg
Lloh43:
	adrp	x21, _DCHR0@GOTPAGE
Lloh44:
	ldr	x21, [x21, _DCHR0@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x3, x19, #24
	mov	x0, x19
	mov	w1, #0
	bl	_amd64_read_dct_pci_cfg
	mov	x0, x19
	bl	_dct_ganging_enabled
	cbnz	w0, LBB0_9
; %bb.8:
	ldr	w2, [x20]
	add	x3, x19, #20
	mov	x0, x19
	mov	w1, #1
	bl	_amd64_read_dct_pci_cfg
	ldr	w2, [x21]
	add	x3, x19, #16
	mov	x0, x19
	mov	w1, #1
	bl	_amd64_read_dct_pci_cfg
LBB0_9:
	mov	x0, x19
	bl	_read_dct_base_mask
	mov	x0, x19
	bl	_determine_memory_type
Lloh45:
	adrp	x8, _edac_mem_types@GOTPAGE
Lloh46:
	ldr	x8, [x8, _edac_mem_types@GOTPAGEOFF]
Lloh47:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	ldr	w8, [x8, x9, lsl #2]
	str	x8, [sp]
Lloh48:
	adrp	x1, l_.str.10@PAGE
Lloh49:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	w0, #1
	bl	_edac_dbg
	mov	x0, x19
	bl	_determine_ecc_sym_sz
	mov	x0, x19
	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
	b	_dump_misc_regs
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_MSR_K8_TOP_MEM1,4,2            ; @MSR_K8_TOP_MEM1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"  TOP_MEM:  0x%016llx\n"

	.comm	_MSR_K8_SYSCFG,4,2              ; @MSR_K8_SYSCFG
	.comm	_MSR_K8_TOP_MEM2,4,2            ; @MSR_K8_TOP_MEM2
l_.str.2:                               ; @.str.2
	.asciz	"  TOP_MEM2 disabled\n"

	.comm	_DF_DHAR,4,2                    ; @DF_DHAR
	.comm	_NBCAP,4,2                      ; @NBCAP
	.comm	_DRAM_RANGES,4,2                ; @DRAM_RANGES
l_.str.3:                               ; @.str.3
	.asciz	"  DRAM range[%d], base: 0x%016llx; limit: 0x%016llx\n"

l_.str.4:                               ; @.str.4
	.asciz	"   IntlvEn=%s; Range access: %s%s IntlvSel=%d DstNode=%d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Enabled"

l_.str.6:                               ; @.str.6
	.asciz	"Disabled"

l_.str.7:                               ; @.str.7
	.asciz	"R"

l_.str.8:                               ; @.str.8
	.asciz	"-"

l_.str.9:                               ; @.str.9
	.asciz	"W"

	.comm	_DHAR,4,2                       ; @DHAR
	.comm	_DBAM0,4,2                      ; @DBAM0
	.comm	_F10_ONLINE_SPARE,4,2           ; @F10_ONLINE_SPARE
	.comm	_DCLR0,4,2                      ; @DCLR0
	.comm	_DCHR0,4,2                      ; @DCHR0
l_.str.10:                              ; @.str.10
	.asciz	"  DIMM type: %s\n"

	.comm	_edac_mem_types,8,3             ; @edac_mem_types
	.no_dead_strip	_read_mc_regs
.subsections_via_symbols
