	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclgevf_reset_prepare_wait
_hclgevf_reset_prepare_wait:            ## @hclgevf_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	cmpl	$129, %eax
	je	LBB0_3
## %bb.1:
	xorl	%r14d, %r14d
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.2:
	movq	_HCLGE_MBX_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	pushq	$4
	pushq	$0
	callq	_hclgevf_send_mbx_msg
	addq	$16, %rsp
	movl	%eax, %r14d
	leaq	24(%rbx), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_HNAE3_FLR_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	28(%rbx), %rsi
	callq	_set_bit
	leaq	20(%rbx), %rax
	xorl	%r14d, %r14d
LBB0_4:
	incl	(%rax)
LBB0_5:
	movq	_HCLGEVF_STATE_CMD_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%rbx), %rsi
	callq	_set_bit
	movl	$100, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_hclgevf_reset_handshake
	movq	8(%rbx), %rdi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	callq	_dev_info
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HCLGE_MBX_RESET,4,2            ## @HCLGE_MBX_RESET
	.comm	_HNAE3_FLR_DOWN,4,2             ## @HNAE3_FLR_DOWN
	.comm	_HCLGEVF_STATE_CMD_DISABLE,4,2  ## @HCLGEVF_STATE_CMD_DISABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"prepare reset(%d) wait done, ret:%d\n"

	.comm	_HCLGEVF_RESET_SYNC_TIME,4,2    ## @HCLGEVF_RESET_SYNC_TIME
	.no_dead_strip	_hclgevf_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 hclgevf_reset_prepare_wait
_hclgevf_reset_prepare_wait:            ; @hclgevf_reset_prepare_wait
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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	w8, [x0]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _HCLGE_MBX_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCLGE_MBX_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	mov	w5, #1
	mov	x6, #0
	mov	w7, #4
	bl	_hclgevf_send_mbx_msg
	mov	x20, x0
	add	x8, x19, #24
	b	LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _HNAE3_FLR_DOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HNAE3_FLR_DOWN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, x19, #28
	bl	_set_bit
	mov	w20, #0
	add	x8, x19, #20
LBB0_4:
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
Lloh6:
	adrp	x8, _HCLGEVF_STATE_CMD_DISABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HCLGEVF_STATE_CMD_DISABLE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_set_bit
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	mov	w1, #1
	bl	_hclgevf_reset_handshake
	ldr	x0, [x19, #8]
	ldr	w2, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_info
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_HCLGE_MBX_RESET,4,2            ; @HCLGE_MBX_RESET
	.comm	_HNAE3_FLR_DOWN,4,2             ; @HNAE3_FLR_DOWN
	.comm	_HCLGEVF_STATE_CMD_DISABLE,4,2  ; @HCLGEVF_STATE_CMD_DISABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"prepare reset(%d) wait done, ret:%d\n"

	.comm	_HCLGEVF_RESET_SYNC_TIME,4,2    ; @HCLGEVF_RESET_SYNC_TIME
	.no_dead_strip	_hclgevf_reset_prepare_wait
.subsections_via_symbols
