	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_func_clr_rst_prc
_hns_roce_func_clr_rst_prc:             ## @hns_roce_func_clr_rst_prc
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	movq	(%rax), %r14
	movq	(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rax
	movq	(%rax), %r12
	movq	%r14, %rdi
	callq	*(%r12)
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	*8(%r12)
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	*16(%r12)
	cmpq	(%rbx), %r15
	jne	LBB0_1
## %bb.2:
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.3:
	movq	%rbx, %r13
	movl	$1, 8(%rbx)
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_HNS_ROCE_V2_HW_RST_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.4:
	movq	_HNS_ROCE_V2_HW_RST_COMPLETION_WAIT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	*8(%r12)
	testl	%eax, %eax
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rdi
	callq	_msleep
	subq	(%r15), %rbx
	jne	LBB0_5
	jmp	LBB0_10
LBB0_1:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%rbx)
	movl	16(%rbx), %edi
LBB0_7:
	leaq	L_.str(%rip), %rsi
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_info                       ## TAILCALL
LBB0_12:
	testl	%eax, %eax
	movq	%rbx, %r13
	je	LBB0_20
## %bb.13:
	movq	_HNS_ROCE_STATE_INIT@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rax), %rcx
	jne	LBB0_20
## %bb.14:
	movl	$1, 8(%r13)
	movl	16(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_HNS_ROCE_V2_HW_RST_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.15:
	movq	_HNS_ROCE_V2_HW_RST_COMPLETION_WAIT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	*(%r12)
	cmpq	(%r13), %rax
	jne	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r15), %rdi
	callq	_msleep
	subq	(%r15), %rbx
	jne	LBB0_16
LBB0_19:
	movl	16(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_11
LBB0_6:
	movl	$1, 12(%r13)
	movl	16(%r13), %edi
	jmp	LBB0_7
LBB0_20:
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, %edx
	je	LBB0_10
## %bb.21:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_10
## %bb.22:
	movl	16(%r13), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
LBB0_10:
	movl	16(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_11:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
LBB0_17:
	movl	$1, 12(%r13)
	movl	16(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Func clear success after reset.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Func clear is pending, device in resetting state.\n"

	.comm	_HNS_ROCE_V2_HW_RST_TIMEOUT,8,3 ## @HNS_ROCE_V2_HW_RST_TIMEOUT
	.comm	_HNS_ROCE_V2_HW_RST_COMPLETION_WAIT,8,3 ## @HNS_ROCE_V2_HW_RST_COMPLETION_WAIT
L_.str.2:                               ## @.str.2
	.asciz	"Func clear failed.\n"

	.comm	_HNS_ROCE_STATE_INIT,8,3        ## @HNS_ROCE_STATE_INIT
L_.str.3:                               ## @.str.3
	.asciz	"Func clear success after sw reset\n"

L_.str.4:                               ## @.str.4
	.asciz	"Func clear failed because of unfinished sw reset\n"

L_.str.5:                               ## @.str.5
	.asciz	"Func clear read failed, ret = %d.\n"

	.no_dead_strip	_hns_roce_func_clr_rst_prc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_func_clr_rst_prc
_hns_roce_func_clr_rst_prc:             ; @hns_roce_func_clr_rst_prc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x20, [x8]
	ldp	x26, x8, [x20]
	ldr	x25, [x8]
	ldr	x8, [x25]
	mov	x0, x20
	blr	x8
	mov	x24, x0
	ldr	x8, [x25, #8]
	mov	x0, x20
	blr	x8
	mov	x23, x0
	ldr	x8, [x25, #16]
	mov	x0, x20
	blr	x8
	ldr	x8, [x19]
	cmp	x24, x8
	b.ne	LBB0_6
; %bb.1:
	cbz	w23, LBB0_9
; %bb.2:
	mov	w8, #1
	str	w8, [x19, #8]
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
Lloh2:
	adrp	x8, _HNS_ROCE_V2_HW_RST_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HNS_ROCE_V2_HW_RST_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	x21, [x8]
	cbz	x21, LBB0_13
; %bb.3:
Lloh5:
	adrp	x22, _HNS_ROCE_V2_HW_RST_COMPLETION_WAIT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _HNS_ROCE_V2_HW_RST_COMPLETION_WAIT@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25, #8]
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x22]
	bl	_msleep
	ldr	x8, [x22]
	subs	x21, x21, x8
	b.ne	LBB0_4
	b	LBB0_13
LBB0_6:
	movi.2s	v0, #1
	str	d0, [x19, #8]
LBB0_7:
	ldr	w0, [x19, #16]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_dev_info
LBB0_9:
Lloh9:
	adrp	x8, _HNS_ROCE_STATE_INIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HNS_ROCE_STATE_INIT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	w0, #0
	ccmp	x26, x8, #0, ne
	b.eq	LBB0_16
; %bb.10:
	cbz	w21, LBB0_13
; %bb.11:
	cbnz	w22, LBB0_13
; %bb.12:
	ldr	w0, [x19, #16]
	str	x21, [sp]
Lloh12:
	adrp	x1, l_.str.5@PAGE
Lloh13:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_warn
LBB0_13:
	ldr	w0, [x19, #16]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_dev_warn
LBB0_15:
	mov	w8, #1
	str	w8, [x19, #12]
	b	LBB0_7
LBB0_16:
	mov	w8, #1
	str	w8, [x19, #8]
	ldr	w0, [x19, #16]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
Lloh18:
	adrp	x8, _HNS_ROCE_V2_HW_RST_TIMEOUT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HNS_ROCE_V2_HW_RST_TIMEOUT@GOTPAGEOFF]
Lloh20:
	ldr	x21, [x8]
	cbz	x21, LBB0_20
; %bb.17:
Lloh21:
	adrp	x22, _HNS_ROCE_V2_HW_RST_COMPLETION_WAIT@GOTPAGE
Lloh22:
	ldr	x22, [x22, _HNS_ROCE_V2_HW_RST_COMPLETION_WAIT@GOTPAGEOFF]
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	mov	x0, x20
	blr	x8
	ldr	x8, [x19]
	cmp	x0, x8
	b.ne	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x0, [x22]
	bl	_msleep
	ldr	x8, [x22]
	subs	x21, x21, x8
	b.ne	LBB0_18
LBB0_20:
	ldr	w0, [x19, #16]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_21:
	mov	w8, #1
	str	w8, [x19, #12]
	ldr	w0, [x19, #16]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Func clear success after reset.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Func clear is pending, device in resetting state.\n"

	.comm	_HNS_ROCE_V2_HW_RST_TIMEOUT,8,3 ; @HNS_ROCE_V2_HW_RST_TIMEOUT
	.comm	_HNS_ROCE_V2_HW_RST_COMPLETION_WAIT,8,3 ; @HNS_ROCE_V2_HW_RST_COMPLETION_WAIT
l_.str.2:                               ; @.str.2
	.asciz	"Func clear failed.\n"

	.comm	_HNS_ROCE_STATE_INIT,8,3        ; @HNS_ROCE_STATE_INIT
l_.str.3:                               ; @.str.3
	.asciz	"Func clear success after sw reset\n"

l_.str.4:                               ; @.str.4
	.asciz	"Func clear failed because of unfinished sw reset\n"

l_.str.5:                               ; @.str.5
	.asciz	"Func clear read failed, ret = %d.\n"

	.no_dead_strip	_hns_roce_func_clr_rst_prc
.subsections_via_symbols
