	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_reset_wait
_hclge_reset_wait:                      ## @hclge_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movslq	(%rdi), %rdx
	leal	-128(%rdx), %esi
	cmpl	$3, %esi
	ja	LBB0_9
## %bb.1:
	movq	_HCLGE_IMP_RESET_BIT@GOTPCREL(%rip), %rcx
	movq	_HCLGE_GLOBAL_RESET_REG@GOTPCREL(%rip), %rax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rsi,4), %rsi
	addq	%rdx, %rsi
	jmpq	*%rsi
LBB0_11:
	movq	_HCLGE_GLOBAL_RESET_BIT@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_9:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_8:
	movq	_HCLGE_FUN_RST_ING_B@GOTPCREL(%rip), %rcx
	movq	_HCLGE_FUN_RST_ING@GOTPCREL(%rip), %rax
LBB0_12:
	movq	(%rcx), %r15
	movq	(%rax), %r13
	leaq	16(%r14), %rbx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_hclge_read_dev
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_hnae3_get_bit
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_20
## %bb.13:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	$-1, %r14
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	incq	%r14
	movl	$100, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_hclge_read_dev
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_hnae3_get_bit
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpq	$199, %r14
	jb	LBB0_14
LBB0_16:
	cmpq	$199, %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jb	LBB0_20
## %bb.17:
	movq	8(%rax), %rdi
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_18
LBB0_2:
	leaq	20(%r14), %r15
	movq	_HNAE3_FLR_DONE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_test_bit
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$200, %rbx
	je	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movl	$100, %edi
	callq	_msleep
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_4
	jmp	LBB0_6
LBB0_5:
	movl	$201, %ebx
LBB0_6:
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_20
## %bb.7:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_dev_err
LBB0_18:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_19:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_20:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_11
	.long	L0_0_set_8
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_HCLGE_GLOBAL_RESET_REG,8,3     ## @HCLGE_GLOBAL_RESET_REG
	.comm	_HCLGE_IMP_RESET_BIT,8,3        ## @HCLGE_IMP_RESET_BIT
	.comm	_HCLGE_GLOBAL_RESET_BIT,8,3     ## @HCLGE_GLOBAL_RESET_BIT
	.comm	_HCLGE_FUN_RST_ING,8,3          ## @HCLGE_FUN_RST_ING
	.comm	_HCLGE_FUN_RST_ING_B,8,3        ## @HCLGE_FUN_RST_ING_B
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wait for unsupported reset type: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HNAE3_FLR_DONE,4,2             ## @HNAE3_FLR_DONE
L_.str.1:                               ## @.str.1
	.asciz	"flr wait timeout: %d\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.2:                               ## @.str.2
	.asciz	"Wait for reset timeout: %d\n"

	.comm	_HCLGE_RESET_WAIT_CNT,8,3       ## @HCLGE_RESET_WAIT_CNT
	.comm	_HCLGE_RESET_WATI_MS,4,2        ## @HCLGE_RESET_WATI_MS
	.no_dead_strip	_hclge_reset_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_wait
_hclge_reset_wait:                      ; @hclge_reset_wait
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldrsw	x2, [x0]
	sub	w10, w2, #128
	cmp	w10, #3
	b.hi	LBB0_16
; %bb.1:
Lloh0:
	adrp	x8, _HCLGE_IMP_RESET_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCLGE_IMP_RESET_BIT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _HCLGE_GLOBAL_RESET_REG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HCLGE_GLOBAL_RESET_REG@GOTPAGEOFF]
Lloh4:
	adrp	x11, lJTI0_0@PAGE
Lloh5:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_2
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_2:
Lloh6:
	adrp	x8, _HCLGE_GLOBAL_RESET_BIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HCLGE_GLOBAL_RESET_BIT@GOTPAGEOFF]
Lloh8:
	adrp	x9, _HCLGE_GLOBAL_RESET_REG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HCLGE_GLOBAL_RESET_REG@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _HCLGE_FUN_RST_ING_B@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HCLGE_FUN_RST_ING_B@GOTPAGEOFF]
Lloh12:
	adrp	x9, _HCLGE_FUN_RST_ING@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HCLGE_FUN_RST_ING@GOTPAGEOFF]
LBB0_4:
	ldr	x20, [x8]
	ldr	x21, [x9]
	add	x22, x19, #16
	mov	x0, x22
	mov	x1, x21
	bl	_hclge_read_dev
	mov	x1, x20
	bl	_hnae3_get_bit
	cbz	x0, LBB0_20
; %bb.5:
	mov	x23, #-1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x23, x23, #1
	mov	w0, #100
	bl	_msleep
	mov	x0, x22
	mov	x1, x21
	bl	_hclge_read_dev
	mov	x1, x20
	bl	_hnae3_get_bit
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x23, #199
	b.lo	LBB0_6
LBB0_8:
	cmp	x23, #199
	b.lo	LBB0_15
; %bb.9:
	ldr	x0, [x19, #8]
	ldr	w2, [x19]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
	b	LBB0_18
LBB0_10:
	add	x20, x19, #20
Lloh16:
	adrp	x22, _HNAE3_FLR_DONE@GOTPAGE
Lloh17:
	ldr	x22, [x22, _HNAE3_FLR_DONE@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x20
	bl	_test_bit
	mov	x21, #0
	cbnz	w0, LBB0_14
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x21, x21, #1
	mov	w0, #100
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x20
	bl	_test_bit
	cbnz	w0, LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	cmp	x21, #200
	b.ne	LBB0_11
; %bb.13:
	mov	w21, #201
LBB0_14:
	ldr	w0, [x22]
	mov	x1, x20
	bl	_test_bit
	cbz	w0, LBB0_17
LBB0_15:
	mov	w0, #0
	b	LBB0_20
LBB0_16:
	ldr	x0, [x19, #8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_19
LBB0_17:
	ldr	x0, [x19, #8]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_err
LBB0_18:
Lloh24:
	adrp	x8, _EBUSY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
                                        ; -- End function
	.comm	_HCLGE_GLOBAL_RESET_REG,8,3     ; @HCLGE_GLOBAL_RESET_REG
	.comm	_HCLGE_IMP_RESET_BIT,8,3        ; @HCLGE_IMP_RESET_BIT
	.comm	_HCLGE_GLOBAL_RESET_BIT,8,3     ; @HCLGE_GLOBAL_RESET_BIT
	.comm	_HCLGE_FUN_RST_ING,8,3          ; @HCLGE_FUN_RST_ING
	.comm	_HCLGE_FUN_RST_ING_B,8,3        ; @HCLGE_FUN_RST_ING_B
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wait for unsupported reset type: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HNAE3_FLR_DONE,4,2             ; @HNAE3_FLR_DONE
l_.str.1:                               ; @.str.1
	.asciz	"flr wait timeout: %d\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.2:                               ; @.str.2
	.asciz	"Wait for reset timeout: %d\n"

	.comm	_HCLGE_RESET_WAIT_CNT,8,3       ; @HCLGE_RESET_WAIT_CNT
	.comm	_HCLGE_RESET_WATI_MS,4,2        ; @HCLGE_RESET_WATI_MS
	.no_dead_strip	_hclge_reset_wait
.subsections_via_symbols
