	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclge_handle_hw_ras_error      ## -- Begin function hclge_handle_hw_ras_error
	.p2align	4, 0x90
_hclge_handle_hw_ras_error:             ## @hclge_handle_hw_ras_error
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movq	8(%rbx), %r15
	addq	$4, %r15
	movq	_HCLGE_STATE_SERVICE_INITED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	16(%rbx), %rdi
	movq	_HCLGE_RAS_PF_OTHER_INT_STS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hclge_read_dev
	movl	%eax, %r12d
	movq	_HCLGE_RAS_REG_NFE_MASK@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_3
## %bb.5:
	movq	$0, (%r14)
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_hclge_handle_all_ras_errors
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_PCI_ERS_RESULT_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_3:
	movq	_HCLGE_RAS_REG_ROCEE_ERR_MASK@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_12
## %bb.4:
	movq	$0, (%r14)
LBB0_6:
	movq	8(%rbx), %rax
	cmpl	$33, (%rax)
	jl	LBB0_9
## %bb.7:
	movq	_HCLGE_RAS_REG_ROCEE_ERR_MASK@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r14, %rdi
	callq	_hclge_handle_rocee_ras_error
LBB0_9:
	movq	_HCLGE_STATE_RST_HANDLING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_10
LBB0_12:
	movq	_PCI_ERS_RESULT_RECOVERED@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	cmpq	$0, (%r14)
	je	LBB0_12
## %bb.11:
	movq	_PCI_ERS_RESULT_NEED_RESET@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HCLGE_STATE_SERVICE_INITED,4,2 ## @HCLGE_STATE_SERVICE_INITED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't recover - RAS error reported during dev init\n"

	.comm	_PCI_ERS_RESULT_NONE,4,2        ## @PCI_ERS_RESULT_NONE
	.comm	_HCLGE_RAS_PF_OTHER_INT_STS_REG,4,2 ## @HCLGE_RAS_PF_OTHER_INT_STS_REG
	.comm	_HCLGE_RAS_REG_NFE_MASK,4,2     ## @HCLGE_RAS_REG_NFE_MASK
	.comm	_HCLGE_RAS_REG_ROCEE_ERR_MASK,4,2 ## @HCLGE_RAS_REG_ROCEE_ERR_MASK
L_.str.1:                               ## @.str.1
	.asciz	"HNS Non-Fatal RAS error(status=0x%x) identified\n"

L_.str.2:                               ## @.str.2
	.asciz	"ROCEE Non-Fatal RAS error identified\n"

	.comm	_HCLGE_STATE_RST_HANDLING,4,2   ## @HCLGE_STATE_RST_HANDLING
	.comm	_PCI_ERS_RESULT_NEED_RESET,4,2  ## @PCI_ERS_RESULT_NEED_RESET
	.comm	_PCI_ERS_RESULT_RECOVERED,4,2   ## @PCI_ERS_RESULT_RECOVERED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclge_handle_hw_ras_error      ; -- Begin function hclge_handle_hw_ras_error
	.p2align	2
_hclge_handle_hw_ras_error:             ; @hclge_handle_hw_ras_error
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	x8, [x20, #8]
	add	x21, x8, #4
Lloh0:
	adrp	x8, _HCLGE_STATE_SERVICE_INITED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCLGE_STATE_SERVICE_INITED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.1:
	add	x0, x20, #16
Lloh3:
	adrp	x8, _HCLGE_RAS_PF_OTHER_INT_STS_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HCLGE_RAS_PF_OTHER_INT_STS_REG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_hclge_read_dev
	mov	x22, x0
Lloh6:
	adrp	x8, _HCLGE_RAS_REG_NFE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HCLGE_RAS_REG_NFE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
	str	xzr, [x19]
	str	x22, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	mov	x0, x20
	bl	_hclge_handle_all_ras_errors
	b	LBB0_6
LBB0_3:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh13:
	adrp	x8, _PCI_ERS_RESULT_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PCI_ERS_RESULT_NONE@GOTPAGEOFF]
	b	LBB0_13
LBB0_4:
Lloh15:
	adrp	x8, _HCLGE_RAS_REG_ROCEE_ERR_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HCLGE_RAS_REG_ROCEE_ERR_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_10
; %bb.5:
	str	xzr, [x19]
LBB0_6:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	cmp	w8, #33
	b.lt	LBB0_9
; %bb.7:
Lloh18:
	adrp	x8, _HCLGE_RAS_REG_ROCEE_ERR_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HCLGE_RAS_REG_ROCEE_ERR_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_9
; %bb.8:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	mov	x0, x19
	bl	_hclge_handle_rocee_ras_error
LBB0_9:
Lloh23:
	adrp	x8, _HCLGE_STATE_RST_HANDLING@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HCLGE_STATE_RST_HANDLING@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_11
LBB0_10:
Lloh26:
	adrp	x8, _PCI_ERS_RESULT_RECOVERED@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PCI_ERS_RESULT_RECOVERED@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.12:
Lloh28:
	adrp	x8, _PCI_ERS_RESULT_NEED_RESET@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PCI_ERS_RESULT_NEED_RESET@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_HCLGE_STATE_SERVICE_INITED,4,2 ; @HCLGE_STATE_SERVICE_INITED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't recover - RAS error reported during dev init\n"

	.comm	_PCI_ERS_RESULT_NONE,4,2        ; @PCI_ERS_RESULT_NONE
	.comm	_HCLGE_RAS_PF_OTHER_INT_STS_REG,4,2 ; @HCLGE_RAS_PF_OTHER_INT_STS_REG
	.comm	_HCLGE_RAS_REG_NFE_MASK,4,2     ; @HCLGE_RAS_REG_NFE_MASK
	.comm	_HCLGE_RAS_REG_ROCEE_ERR_MASK,4,2 ; @HCLGE_RAS_REG_ROCEE_ERR_MASK
l_.str.1:                               ; @.str.1
	.asciz	"HNS Non-Fatal RAS error(status=0x%x) identified\n"

l_.str.2:                               ; @.str.2
	.asciz	"ROCEE Non-Fatal RAS error identified\n"

	.comm	_HCLGE_STATE_RST_HANDLING,4,2   ; @HCLGE_STATE_RST_HANDLING
	.comm	_PCI_ERS_RESULT_NEED_RESET,4,2  ; @PCI_ERS_RESULT_NEED_RESET
	.comm	_PCI_ERS_RESULT_RECOVERED,4,2   ; @PCI_ERS_RESULT_RECOVERED
.subsections_via_symbols
