	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_flr_prepare
_hclge_flr_prepare:                     ## @hclge_flr_prepare
	.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), %r15
	movq	_HNAE3_FLR_DOWN@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	8(%r15), %r14
	movq	%r14, %rsi
	callq	_clear_bit
	movq	_HNAE3_FLR_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movq	_HNAE3_FLR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r15), %rsi
	callq	_set_bit
	movq	(%r15), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_hclge_reset_event
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$50, %ebx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movl	$100, %edi
	callq	_msleep
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movl	$51, %ebx
LBB0_5:
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HNAE3_FLR_DOWN,4,2             ## @HNAE3_FLR_DOWN
	.comm	_HNAE3_FLR_DONE,4,2             ## @HNAE3_FLR_DONE
	.comm	_HNAE3_FLR_RESET,4,2            ## @HNAE3_FLR_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"flr wait down timeout: %d\n"

	.comm	_HCLGE_FLR_WAIT_CNT,4,2         ## @HCLGE_FLR_WAIT_CNT
	.comm	_HCLGE_FLR_WAIT_MS,4,2          ## @HCLGE_FLR_WAIT_MS
	.no_dead_strip	_hclge_flr_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_flr_prepare
_hclge_flr_prepare:                     ; @hclge_flr_prepare
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x21, [x0]
Lloh0:
	adrp	x22, _HNAE3_FLR_DOWN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HNAE3_FLR_DOWN@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x19, x21, #8
	mov	x1, x19
	bl	_clear_bit
Lloh2:
	adrp	x8, _HNAE3_FLR_DONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HNAE3_FLR_DONE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_clear_bit
Lloh5:
	adrp	x8, _HNAE3_FLR_RESET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HNAE3_FLR_RESET@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x21, #12
	bl	_set_bit
	ldr	x0, [x21]
	mov	x1, #0
	bl	_hclge_reset_event
	ldr	w0, [x22]
	mov	x1, x19
	bl	_test_bit
	mov	w20, #0
	cbnz	w0, LBB0_4
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	mov	w0, #100
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x19
	bl	_test_bit
	cbnz	w0, LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w20, #50
	b.ne	LBB0_1
; %bb.3:
	mov	w20, #51
LBB0_4:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_test_bit
	cbz	w0, LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x0, [x21]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_dev_err
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_HNAE3_FLR_DOWN,4,2             ; @HNAE3_FLR_DOWN
	.comm	_HNAE3_FLR_DONE,4,2             ; @HNAE3_FLR_DONE
	.comm	_HNAE3_FLR_RESET,4,2            ; @HNAE3_FLR_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"flr wait down timeout: %d\n"

	.comm	_HCLGE_FLR_WAIT_CNT,4,2         ; @HCLGE_FLR_WAIT_CNT
	.comm	_HCLGE_FLR_WAIT_MS,4,2          ; @HCLGE_FLR_WAIT_MS
	.no_dead_strip	_hclge_flr_prepare
.subsections_via_symbols
