	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_reset_err_handle
_hclge_reset_err_handle:                ## @hclge_reset_err_handle
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
LBB0_2:
	xorl	%eax, %eax
	callq	_dev_info
	movl	$1, %r14d
	jmp	LBB0_8
LBB0_3:
	leaq	28(%rbx), %rdi
	movq	_HCLGE_MISC_VECTOR_INT_STS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hclge_read_dev
	movq	_HCLGE_RESET_INT_M@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_info
	movq	%rbx, %rdi
	callq	_hclge_clear_reset_cause
	jmp	LBB0_8
LBB0_5:
	movq	16(%rbx), %rax
	cmpq	$4, %rax
	jg	LBB0_7
## %bb.6:
	incq	%rax
	movq	%rax, 16(%rbx)
	movl	24(%rbx), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movq	8(%rbx), %rdi
	movq	16(%rbx), %rdx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_7:
	movq	%rbx, %rdi
	callq	_hclge_clear_reset_cause
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_hclge_reset_handshake
	movq	8(%rbx), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reset pending %lu\n"

	.comm	_HCLGE_MISC_VECTOR_INT_STS,4,2  ## @HCLGE_MISC_VECTOR_INT_STS
	.comm	_HCLGE_RESET_INT_M,4,2          ## @HCLGE_RESET_INT_M
L_.str.1:                               ## @.str.1
	.asciz	"reset failed because new reset interrupt\n"

L_.str.2:                               ## @.str.2
	.asciz	"re-schedule reset task(%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"Reset fail!\n"

	.comm	_MAX_RESET_FAIL_CNT,8,3         ## @MAX_RESET_FAIL_CNT
	.no_dead_strip	_hclge_reset_err_handle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_reset_err_handle
_hclge_reset_err_handle:                ; @hclge_reset_err_handle
	.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	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x0, [x19, #8]
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	bl	_dev_info
	mov	w0, #1
	b	LBB0_9
LBB0_3:
	add	x0, x19, #28
Lloh2:
	adrp	x8, _HCLGE_MISC_VECTOR_INT_STS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCLGE_MISC_VECTOR_INT_STS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_hclge_read_dev
Lloh5:
	adrp	x8, _HCLGE_RESET_INT_M@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HCLGE_RESET_INT_M@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.4:
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	mov	x0, x19
	bl	_hclge_clear_reset_cause
	b	LBB0_8
LBB0_5:
	ldr	x8, [x19, #16]
	cmp	x8, #4
	b.gt	LBB0_7
; %bb.6:
	add	x8, x8, #1
	str	x8, [x19, #16]
	ldr	w0, [x19, #24]
	mov	x1, x19
	bl	_set_bit
	ldp	x0, x8, [x19, #8]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_7:
	mov	x0, x19
	bl	_hclge_clear_reset_cause
	mov	x0, x19
	mov	w1, #1
	bl	_hclge_reset_handshake
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_8:
	mov	w0, #0
LBB0_9:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reset pending %lu\n"

	.comm	_HCLGE_MISC_VECTOR_INT_STS,4,2  ; @HCLGE_MISC_VECTOR_INT_STS
	.comm	_HCLGE_RESET_INT_M,4,2          ; @HCLGE_RESET_INT_M
l_.str.1:                               ; @.str.1
	.asciz	"reset failed because new reset interrupt\n"

l_.str.2:                               ; @.str.2
	.asciz	"re-schedule reset task(%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"Reset fail!\n"

	.comm	_MAX_RESET_FAIL_CNT,8,3         ; @MAX_RESET_FAIL_CNT
	.no_dead_strip	_hclge_reset_err_handle
.subsections_via_symbols
