	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function enable_ecc_error_reporting
_enable_ecc_error_reporting:            ## @enable_ecc_error_reporting
	.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	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_toggle_ecc_err_reporting
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_amd64_warn
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_2:
	movq	_NBCTL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_amd64_read_pci_cfg
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	andl	$3, %eax
	movl	%eax, (%rbx)
	movl	$1, 4(%rbx)
	orl	$3, %edx
	movl	%edx, -44(%rbp)
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_amd64_write_pci_cfg
	movq	_NBCFG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_amd64_read_pci_cfg
	movl	-44(%rbp), %ecx
	movq	_NBCFG_ECC_ENABLE@GOTPCREL(%rip), %r12
	xorl	%r8d, %r8d
	movl	(%r12), %eax
	andl	%ecx, %eax
	setne	%r8b
	leaq	L_.str.1(%rip), %rsi
	xorl	%edi, %edi
	movl	%r14d, %edx
	callq	_edac_dbg
	movl	(%r12), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_3
## %bb.6:
	movl	$1, 8(%rbx)
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	callq	_amd64_warn
	movl	$0, 8(%rbx)
	movl	-44(%rbp), %edx
	orl	(%r12), %edx
	movl	%edx, -44(%rbp)
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_amd64_write_pci_cfg
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_amd64_read_pci_cfg
	movl	(%r12), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_4
## %bb.5:
	leaq	L_.str.4(%rip), %rdi
	callq	_amd64_info
LBB0_7:
	movl	$1, %ebx
LBB0_8:
	movl	-44(%rbp), %ecx
	xorl	%r8d, %r8d
	movl	(%r12), %eax
	andl	%ecx, %eax
	setne	%r8b
	leaq	L_.str.5(%rip), %rsi
	xorl	%edi, %edi
	movl	%r14d, %edx
	callq	_edac_dbg
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.3(%rip), %rdi
	callq	_amd64_warn
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ON,4,2                         ## @ON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error enabling ECC reporting over MCGCTL!\n"

	.comm	_NBCTL,4,2                      ## @NBCTL
	.comm	_NBCFG,4,2                      ## @NBCFG
L_.str.1:                               ## @.str.1
	.asciz	"1: node %d, NBCFG=0x%08x[DramEccEn: %d]\n"

	.comm	_NBCFG_ECC_ENABLE,4,2           ## @NBCFG_ECC_ENABLE
L_.str.2:                               ## @.str.2
	.asciz	"DRAM ECC disabled on this node, enabling...\n"

L_.str.3:                               ## @.str.3
	.asciz	"Hardware rejected DRAM ECC enable,check memory DIMM configuration.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Hardware accepted DRAM ECC Enable\n"

L_.str.5:                               ## @.str.5
	.asciz	"2: node %d, NBCFG=0x%08x[DramEccEn: %d]\n"

	.no_dead_strip	_enable_ecc_error_reporting
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function enable_ecc_error_reporting
_enable_ecc_error_reporting:            ; @enable_ecc_error_reporting
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ON@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_toggle_ecc_err_reporting
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_amd64_warn
	mov	w22, #0
	b	LBB0_8
LBB0_2:
Lloh5:
	adrp	x23, _NBCTL@GOTPAGE
Lloh6:
	ldr	x23, [x23, _NBCTL@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x20
	bl	_amd64_read_pci_cfg
	ldr	w8, [sp, #12]
	and	w9, w8, #0x3
	mov	w22, #1
	stp	w9, w22, [x21]
	orr	w2, w8, #0x3
	str	w2, [sp, #12]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_amd64_write_pci_cfg
Lloh7:
	adrp	x24, _NBCFG@GOTPAGE
Lloh8:
	ldr	x24, [x24, _NBCFG@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x2, sp, #12
	mov	x0, x20
	bl	_amd64_read_pci_cfg
	ldr	w3, [sp, #12]
Lloh9:
	adrp	x23, _NBCFG_ECC_ENABLE@GOTPAGE
Lloh10:
	ldr	x23, [x23, _NBCFG_ECC_ENABLE@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w3
	cset	w4, ne
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #0
	mov	x2, x19
	bl	_edac_dbg
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	str	w22, [x21, #8]
	b	LBB0_7
LBB0_4:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_amd64_warn
	str	wzr, [x21, #8]
	ldr	w8, [x23]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_amd64_write_pci_cfg
	ldr	w1, [x24]
	add	x2, sp, #12
	mov	x0, x20
	bl	_amd64_read_pci_cfg
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_amd64_info
	mov	w22, #1
	b	LBB0_7
LBB0_6:
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_amd64_warn
	mov	w22, #0
LBB0_7:
	ldr	w3, [sp, #12]
	ldr	w8, [x23]
	tst	w8, w3
	cset	w4, ne
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #0
	mov	x2, x19
	bl	_edac_dbg
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ON,4,2                         ; @ON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error enabling ECC reporting over MCGCTL!\n"

	.comm	_NBCTL,4,2                      ; @NBCTL
	.comm	_NBCFG,4,2                      ; @NBCFG
l_.str.1:                               ; @.str.1
	.asciz	"1: node %d, NBCFG=0x%08x[DramEccEn: %d]\n"

	.comm	_NBCFG_ECC_ENABLE,4,2           ; @NBCFG_ECC_ENABLE
l_.str.2:                               ; @.str.2
	.asciz	"DRAM ECC disabled on this node, enabling...\n"

l_.str.3:                               ; @.str.3
	.asciz	"Hardware rejected DRAM ECC enable,check memory DIMM configuration.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Hardware accepted DRAM ECC Enable\n"

l_.str.5:                               ; @.str.5
	.asciz	"2: node %d, NBCFG=0x%08x[DramEccEn: %d]\n"

	.no_dead_strip	_enable_ecc_error_reporting
.subsections_via_symbols
