	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_reset_prepare_wait
_hclge_reset_prepare_wait:              ## @hclge_reset_prepare_wait
	.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
	movl	(%rdi), %eax
	cmpl	$128, %eax
	je	LBB0_9
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_10
## %bb.3:
	movq	%r14, %rdi
	callq	_hclge_func_reset_sync_vf
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_hclge_func_reset_cmd
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_11
LBB0_9:
	movq	%r14, %rdi
	callq	_hclge_handle_imp_error
	leaq	16(%r14), %r15
	movq	_HCLGE_PF_OTHER_INT_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_hclge_read_dev
	movl	%eax, %ebx
	movl	(%r12), %r12d
	movq	_HCLGE_VECTOR0_IMP_RESET_INT_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_hclge_write_dev
	jmp	LBB0_10
LBB0_7:
	movq	%r14, %rdi
	callq	_hclge_func_reset_sync_vf
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	_HCLGE_STATE_CMD_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	32(%r14), %rsi
	callq	_set_bit
	movq	_HNAE3_FLR_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	28(%r14), %rsi
	callq	_set_bit
	incl	20(%r14)
	jmp	LBB0_10
LBB0_6:
	movq	_HCLGE_STATE_CMD_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	32(%r14), %rsi
	callq	_set_bit
	incl	24(%r14)
LBB0_10:
	movq	_HCLGE_RESET_SYNC_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_hclge_reset_handshake
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"asserting function reset fail %d!\n"

	.comm	_HCLGE_STATE_CMD_DISABLE,4,2    ## @HCLGE_STATE_CMD_DISABLE
	.comm	_HNAE3_FLR_DOWN,4,2             ## @HNAE3_FLR_DOWN
	.comm	_HCLGE_PF_OTHER_INT_REG,4,2     ## @HCLGE_PF_OTHER_INT_REG
	.comm	_HCLGE_VECTOR0_IMP_RESET_INT_B,4,2 ## @HCLGE_VECTOR0_IMP_RESET_INT_B
	.comm	_HCLGE_RESET_SYNC_TIME,4,2      ## @HCLGE_RESET_SYNC_TIME
L_.str.1:                               ## @.str.1
	.asciz	"prepare wait ok\n"

	.no_dead_strip	_hclge_reset_prepare_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_reset_prepare_wait
_hclge_reset_prepare_wait:              ; @hclge_reset_prepare_wait
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #130
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_10
; %bb.3:
	mov	x0, x19
	bl	_hclge_func_reset_sync_vf
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	bl	_hclge_func_reset_cmd
	cbz	w0, LBB0_9
; %bb.5:
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_hclge_handle_imp_error
	add	x20, x19, #16
Lloh2:
	adrp	x22, _HCLGE_PF_OTHER_INT_REG@GOTPAGE
Lloh3:
	ldr	x22, [x22, _HCLGE_PF_OTHER_INT_REG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_hclge_read_dev
	mov	x21, x0
	ldr	w22, [x22]
Lloh4:
	adrp	x8, _HCLGE_VECTOR0_IMP_RESET_INT_B@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HCLGE_VECTOR0_IMP_RESET_INT_B@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_BIT
	orr	w2, w0, w21
	mov	x0, x20
	mov	x1, x22
	bl	_hclge_write_dev
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	bl	_hclge_func_reset_sync_vf
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.8:
Lloh7:
	adrp	x8, _HCLGE_STATE_CMD_DISABLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HCLGE_STATE_CMD_DISABLE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	add	x1, x19, #32
	bl	_set_bit
Lloh10:
	adrp	x8, _HNAE3_FLR_DOWN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HNAE3_FLR_DOWN@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	add	x1, x19, #28
	bl	_set_bit
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x8, _HCLGE_STATE_CMD_DISABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HCLGE_STATE_CMD_DISABLE@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	add	x1, x19, #32
	bl	_set_bit
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
LBB0_10:
Lloh16:
	adrp	x8, _HCLGE_RESET_SYNC_TIME@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HCLGE_RESET_SYNC_TIME@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_msleep
	mov	x0, x19
	mov	w1, #1
	bl	_hclge_reset_handshake
	ldr	x0, [x19, #8]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	mov	w20, #0
LBB0_11:
	mov	x0, 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
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"asserting function reset fail %d!\n"

	.comm	_HCLGE_STATE_CMD_DISABLE,4,2    ; @HCLGE_STATE_CMD_DISABLE
	.comm	_HNAE3_FLR_DOWN,4,2             ; @HNAE3_FLR_DOWN
	.comm	_HCLGE_PF_OTHER_INT_REG,4,2     ; @HCLGE_PF_OTHER_INT_REG
	.comm	_HCLGE_VECTOR0_IMP_RESET_INT_B,4,2 ; @HCLGE_VECTOR0_IMP_RESET_INT_B
	.comm	_HCLGE_RESET_SYNC_TIME,4,2      ; @HCLGE_RESET_SYNC_TIME
l_.str.1:                               ; @.str.1
	.asciz	"prepare wait ok\n"

	.no_dead_strip	_hclge_reset_prepare_wait
.subsections_via_symbols
