	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cn23xx_enable_error_reporting
_cn23xx_enable_error_reporting:         ## @cn23xx_enable_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movq	_CN23XX_CONFIG_PCIE_DEVCTL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-20(%rbp), %rdx
	callq	_pci_read_config_dword
	movl	-20(%rbp), %eax
	movq	_CN23XX_CONFIG_PCIE_DEVCTL_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movq	(%rbx), %rdi
	movq	_CN23XX_CONFIG_PCIE_UNCORRECT_ERR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	(%rbx), %rdi
	movq	_CN23XX_CONFIG_PCIE_CORRECT_ERR_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	(%rbx), %rdi
	movl	-20(%rbp), %edx
	movl	-28(%rbp), %ecx
	movl	-24(%rbp), %r8d
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	-20(%rbp), %eax
LBB0_2:
	orl	$15, %eax
	movl	%eax, -20(%rbp)
	movq	(%rbx), %rdi
	movl	8(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movq	(%rbx), %rdi
	movl	(%r14), %esi
	movl	-20(%rbp), %edx
	callq	_pci_write_config_dword
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CN23XX_CONFIG_PCIE_DEVCTL,4,2  ## @CN23XX_CONFIG_PCIE_DEVCTL
	.comm	_CN23XX_CONFIG_PCIE_DEVCTL_MASK,4,2 ## @CN23XX_CONFIG_PCIE_DEVCTL_MASK
	.comm	_CN23XX_CONFIG_PCIE_UNCORRECT_ERR_MASK,4,2 ## @CN23XX_CONFIG_PCIE_UNCORRECT_ERR_MASK
	.comm	_CN23XX_CONFIG_PCIE_CORRECT_ERR_STATUS,4,2 ## @CN23XX_CONFIG_PCIE_CORRECT_ERR_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCI-E Fatal error detected;\n\tdev_ctl_status_reg = 0x%08x\n\tuncorrectable_error_mask_reg = 0x%08x\n\tcorrectable_error_status_reg = 0x%08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"OCTEON[%d]: Enabling PCI-E error reporting..\n"

	.no_dead_strip	_cn23xx_enable_error_reporting
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cn23xx_enable_error_reporting
_cn23xx_enable_error_reporting:         ; @cn23xx_enable_error_reporting
	.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, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x20, _CN23XX_CONFIG_PCIE_DEVCTL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CN23XX_CONFIG_PCIE_DEVCTL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _CN23XX_CONFIG_PCIE_DEVCTL_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CN23XX_CONFIG_PCIE_DEVCTL_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	stp	wzr, wzr, [sp, #4]
	ldr	x0, [x19]
Lloh5:
	adrp	x8, _CN23XX_CONFIG_PCIE_UNCORRECT_ERR_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CN23XX_CONFIG_PCIE_UNCORRECT_ERR_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_pci_read_config_dword
	ldr	x0, [x19]
Lloh8:
	adrp	x8, _CN23XX_CONFIG_PCIE_CORRECT_ERR_STATUS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CN23XX_CONFIG_PCIE_CORRECT_ERR_STATUS@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #4
	bl	_pci_read_config_dword
	ldr	x0, [x19]
	ldp	w3, w2, [sp, #8]
	ldr	w4, [sp, #4]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	w8, [sp, #12]
LBB0_2:
	orr	w8, w8, #0xf
	str	w8, [sp, #12]
	ldr	x0, [x19]
	ldr	w2, [x19, #8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	x0, [x19]
	ldr	w1, [x20]
	ldr	w2, [sp, #12]
	bl	_pci_write_config_dword
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CN23XX_CONFIG_PCIE_DEVCTL,4,2  ; @CN23XX_CONFIG_PCIE_DEVCTL
	.comm	_CN23XX_CONFIG_PCIE_DEVCTL_MASK,4,2 ; @CN23XX_CONFIG_PCIE_DEVCTL_MASK
	.comm	_CN23XX_CONFIG_PCIE_UNCORRECT_ERR_MASK,4,2 ; @CN23XX_CONFIG_PCIE_UNCORRECT_ERR_MASK
	.comm	_CN23XX_CONFIG_PCIE_CORRECT_ERR_STATUS,4,2 ; @CN23XX_CONFIG_PCIE_CORRECT_ERR_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCI-E Fatal error detected;\n\tdev_ctl_status_reg = 0x%08x\n\tuncorrectable_error_mask_reg = 0x%08x\n\tcorrectable_error_status_reg = 0x%08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"OCTEON[%d]: Enabling PCI-E error reporting..\n"

	.no_dead_strip	_cn23xx_enable_error_reporting
.subsections_via_symbols
