	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclgevf_reset_wait
_hclgevf_reset_wait:                    ## @hclgevf_reset_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
	movq	(%rdi), %rax
	movq	_HNAE3_FLR_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.8:
	movq	%rbx, %rdi
	movl	$20000, %esi                    ## imm = 0x4E20
	movl	$2000, %edx                     ## imm = 0x7D0
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_hclgevf_flr_poll_timeout       ## TAILCALL
LBB0_1:
	movq	_HNAE3_VF_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_HCLGEVF_VF_RST_ING@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_HCLGEVF_RST_ING@GOTPCREL(%rip), %rax
LBB0_4:
	movq	(%rax), %rdi
	addq	16(%rbx), %rdi
	movl	$1, %edx
	movl	$20000, %ecx                    ## imm = 0x4E20
	movl	$40000000, %r8d                 ## imm = 0x2625A00
	callq	_readl_poll_timeout
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_7
LBB0_6:
	movl	$5000, %edi                     ## imm = 0x1388
	callq	_msleep
	xorl	%r14d, %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HNAE3_FLR_RESET,8,3            ## @HNAE3_FLR_RESET
	.comm	_HNAE3_VF_RESET,8,3             ## @HNAE3_VF_RESET
	.comm	_HCLGEVF_VF_RST_ING,8,3         ## @HCLGEVF_VF_RST_ING
	.comm	_HCLGEVF_VF_RST_ING_BIT,4,2     ## @HCLGEVF_VF_RST_ING_BIT
	.comm	_HCLGEVF_RST_ING,8,3            ## @HCLGEVF_RST_ING
	.comm	_HCLGEVF_RST_ING_BITS,4,2       ## @HCLGEVF_RST_ING_BITS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could'nt get reset done status from h/w, timeout!\n"

	.comm	_HCLGEVF_RESET_WAIT_CNT,4,2     ## @HCLGEVF_RESET_WAIT_CNT
	.comm	_HCLGEVF_RESET_WAIT_TIMEOUT_US,4,2 ## @HCLGEVF_RESET_WAIT_TIMEOUT_US
	.comm	_HCLGEVF_RESET_WAIT_US,4,2      ## @HCLGEVF_RESET_WAIT_US
	.no_dead_strip	_hclgevf_reset_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_wait
_hclgevf_reset_wait:                    ; @hclgevf_reset_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	x8, [x0]
Lloh0:
	adrp	x9, _HNAE3_FLR_RESET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HNAE3_FLR_RESET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #20000
	mov	w2, #2000
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_hclgevf_flr_poll_timeout
LBB0_2:
Lloh3:
	adrp	x9, _HNAE3_VF_RESET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HNAE3_VF_RESET@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x10, [x19, #16]
Lloh6:
	adrp	x11, _HCLGEVF_VF_RST_ING@GOTPAGE
Lloh7:
	ldr	x11, [x11, _HCLGEVF_VF_RST_ING@GOTPAGEOFF]
Lloh8:
	adrp	x12, _HCLGEVF_RST_ING@GOTPAGE
Lloh9:
	ldr	x12, [x12, _HCLGEVF_RST_ING@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x11, x12, eq
	ldr	x8, [x8]
	add	x0, x8, x10
	mov	w2, #1
	mov	w3, #20000
	mov	w4, #23040
	movk	w4, #610, lsl #16
	bl	_readl_poll_timeout
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	x0, [x19, #8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_4:
	mov	w0, #5000
	bl	_msleep
LBB0_5:
	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 AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HNAE3_FLR_RESET,8,3            ; @HNAE3_FLR_RESET
	.comm	_HNAE3_VF_RESET,8,3             ; @HNAE3_VF_RESET
	.comm	_HCLGEVF_VF_RST_ING,8,3         ; @HCLGEVF_VF_RST_ING
	.comm	_HCLGEVF_VF_RST_ING_BIT,4,2     ; @HCLGEVF_VF_RST_ING_BIT
	.comm	_HCLGEVF_RST_ING,8,3            ; @HCLGEVF_RST_ING
	.comm	_HCLGEVF_RST_ING_BITS,4,2       ; @HCLGEVF_RST_ING_BITS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could'nt get reset done status from h/w, timeout!\n"

	.comm	_HCLGEVF_RESET_WAIT_CNT,4,2     ; @HCLGEVF_RESET_WAIT_CNT
	.comm	_HCLGEVF_RESET_WAIT_TIMEOUT_US,4,2 ; @HCLGEVF_RESET_WAIT_TIMEOUT_US
	.comm	_HCLGEVF_RESET_WAIT_US,4,2      ; @HCLGEVF_RESET_WAIT_US
	.no_dead_strip	_hclgevf_reset_wait
.subsections_via_symbols
