	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_v2_init
_hns_roce_v2_init:                      ## @hns_roce_v2_init
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	24(%rdi), %r13
	movq	_TSQ_LINK_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hns_roce_init_link_table
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	8(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_23
LBB0_2:
	movq	_TPQ_LINK_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_hns_roce_init_link_table
	testl	%eax, %eax
	je	LBB0_3
## %bb.7:
	movl	%eax, %ebx
	movl	8(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_22
LBB0_3:
	cmpl	$0, 12(%r12)
	movl	$0, %r15d
	jle	LBB0_9
## %bb.4:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_hns_roce_table_get
	testl	%eax, %eax
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%r15d
	cmpl	12(%r12), %r15d
	jl	LBB0_5
LBB0_9:
	cmpl	$0, 16(%r12)
	movl	$0, %ebx
	jle	LBB0_23
## %bb.10:
	leaq	4(%r12), %rsi
	xorl	%r14d, %r14d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_hns_roce_table_get
	testl	%eax, %eax
	jne	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	incl	%r14d
	cmpl	16(%r12), %r14d
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jl	LBB0_11
	jmp	LBB0_23
LBB0_6:
	movl	%eax, %ebx
	movl	8(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_18
LBB0_12:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_dev_err
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.15:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_hns_roce_table_put
	incl	%r13d
	cmpl	%r13d, %r14d
	jne	LBB0_16
## %bb.17:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_13:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_18:
	testl	%r15d, %r15d
	je	LBB0_21
## %bb.19:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_hns_roce_table_put
	incl	%ebx
	cmpl	%ebx, %r15d
	jne	LBB0_20
LBB0_21:
	leaq	4(%r13), %rsi
	movq	%r12, %rdi
	callq	_hns_roce_free_link_table
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_22:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_hns_roce_free_link_table
LBB0_23:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TSQ_LINK_TABLE,4,2             ## @TSQ_LINK_TABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TSQ init failed, ret = %d.\n"

	.comm	_TPQ_LINK_TABLE,4,2             ## @TPQ_LINK_TABLE
L_.str.1:                               ## @.str.1
	.asciz	"TPQ init failed, ret = %d.\n"

L_.str.2:                               ## @.str.2
	.asciz	"QPC Timer get failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"CQC Timer get failed\n"

	.no_dead_strip	_hns_roce_v2_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_v2_init
_hns_roce_v2_init:                      ; @hns_roce_v2_init
	.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	x19, x0
	ldr	x20, [x0, #24]
Lloh0:
	adrp	x8, _TSQ_LINK_TABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TSQ_LINK_TABLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_hns_roce_init_link_table
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
	ldr	w0, [x19, #8]
	str	x22, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_23
LBB0_2:
Lloh5:
	adrp	x8, _TPQ_LINK_TABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TPQ_LINK_TABLE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hns_roce_init_link_table
	cbz	w0, LBB0_4
; %bb.3:
	mov	x22, x0
	ldr	w0, [x19, #8]
	str	x22, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_22
LBB0_4:
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	w21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x19
	mov	x2, x21
	bl	_hns_roce_table_get
	cbnz	w0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w21, w21, #1
	ldr	w8, [x19, #12]
	cmp	w21, w8
	b.lt	LBB0_6
	b	LBB0_9
LBB0_8:
	mov	w21, #0
LBB0_9:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.10:
	mov	w23, #0
	add	x24, x19, #4
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_hns_roce_table_get
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w23, w23, #1
	ldr	w8, [x19, #16]
	cmp	w23, w8
	b.lt	LBB0_11
	b	LBB0_23
LBB0_13:
	mov	x22, x0
	ldr	w0, [x19, #8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_18
LBB0_14:
	mov	w22, #0
	b	LBB0_23
LBB0_15:
	ldr	w0, [x19, #8]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	cbz	w23, LBB0_18
; %bb.16:
	mov	w25, #0
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x25
	bl	_hns_roce_table_put
	add	w25, w25, #1
	cmp	w23, w25
	b.ne	LBB0_17
LBB0_18:
	cbz	w21, LBB0_21
; %bb.19:
	mov	w23, #0
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x19
	mov	x2, x23
	bl	_hns_roce_table_put
	add	w23, w23, #1
	cmp	w21, w23
	b.ne	LBB0_20
LBB0_21:
	add	x1, x20, #4
	mov	x0, x19
	bl	_hns_roce_free_link_table
LBB0_22:
	mov	x0, x19
	mov	x1, x20
	bl	_hns_roce_free_link_table
LBB0_23:
	mov	x0, x22
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_TSQ_LINK_TABLE,4,2             ; @TSQ_LINK_TABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TSQ init failed, ret = %d.\n"

	.comm	_TPQ_LINK_TABLE,4,2             ; @TPQ_LINK_TABLE
l_.str.1:                               ; @.str.1
	.asciz	"TPQ init failed, ret = %d.\n"

l_.str.2:                               ; @.str.2
	.asciz	"QPC Timer get failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"CQC Timer get failed\n"

	.no_dead_strip	_hns_roce_v2_init
.subsections_via_symbols
