	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ecc_enabled
_ecc_enabled:                           ## @ecc_enabled
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	_NBCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_amd64_read_pci_cfg
	movq	_NBCFG_ECC_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	-20(%rbp), %ebx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_amd64_info
	movl	%r14d, %edi
	callq	_amd64_nb_mce_bank_enabled_on_node
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	$1, %r14d
	testl	%ebx, %ebx
	jne	LBB0_4
	jmp	LBB0_3
LBB0_1:
	movq	_MSR_IA32_MCG_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_amd64_notice
LBB0_3:
	movq	_ecc_msg@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_amd64_notice
LBB0_4:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NBCFG,4,2                      ## @NBCFG
	.comm	_NBCFG_ECC_ENABLE,4,2           ## @NBCFG_ECC_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DRAM ECC %s.\n"

L_.str.1:                               ## @.str.1
	.asciz	"enabled"

L_.str.2:                               ## @.str.2
	.asciz	"disabled"

L_.str.3:                               ## @.str.3
	.asciz	"NB MCE bank disabled, set MSR 0x%08x[4] on node %d to enable.\n"

	.comm	_MSR_IA32_MCG_CTL,4,2           ## @MSR_IA32_MCG_CTL
L_.str.4:                               ## @.str.4
	.asciz	"%s"

	.comm	_ecc_msg,4,2                    ## @ecc_msg
	.no_dead_strip	_ecc_enabled
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ecc_enabled
_ecc_enabled:                           ; @ecc_enabled
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _NBCFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NBCFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_amd64_read_pci_cfg
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _NBCFG_ECC_ENABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NBCFG_ECC_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ands	w20, w9, w8
Lloh6:
	adrp	x8, l_.str.1@PAGE
Lloh7:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh8:
	adrp	x9, l_.str.2@PAGE
Lloh9:
	add	x9, x9, l_.str.2@PAGEOFF
	csel	x1, x9, x8, eq
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_amd64_info
	mov	x0, x19
	bl	_amd64_nb_mce_bank_enabled_on_node
	cbz	w0, LBB0_3
; %bb.1:
	cbz	w20, LBB0_4
; %bb.2:
	mov	w0, #1
	b	LBB0_5
LBB0_3:
Lloh12:
	adrp	x8, _MSR_IA32_MCG_CTL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSR_IA32_MCG_CTL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	str	x19, [sp]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_amd64_notice
LBB0_4:
Lloh17:
	adrp	x8, _ecc_msg@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ecc_msg@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_amd64_notice
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_NBCFG,4,2                      ; @NBCFG
	.comm	_NBCFG_ECC_ENABLE,4,2           ; @NBCFG_ECC_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DRAM ECC %s.\n"

l_.str.1:                               ; @.str.1
	.asciz	"enabled"

l_.str.2:                               ; @.str.2
	.asciz	"disabled"

l_.str.3:                               ; @.str.3
	.asciz	"NB MCE bank disabled, set MSR 0x%08x[4] on node %d to enable.\n"

	.comm	_MSR_IA32_MCG_CTL,4,2           ; @MSR_IA32_MCG_CTL
l_.str.4:                               ; @.str.4
	.asciz	"%s"

	.comm	_ecc_msg,4,2                    ; @ecc_msg
	.no_dead_strip	_ecc_enabled
.subsections_via_symbols
