	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_v2_cmq_init
_hns_roce_v2_cmq_init:                  ## @hns_roce_v2_cmq_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
	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
	movq	8(%rdi), %rbx
	movq	_CMD_CSQ_DESC_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	_CMD_CRQ_DESC_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	12(%rbx), %r15
	movl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_spin_lock_init
	movq	%r15, %rdi
	callq	_spin_lock_init
	movq	_HNS_ROCE_CMQ_TX_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_TYPE_CSQ@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_hns_roce_init_cmq_ring
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_5
LBB0_2:
	movq	_TYPE_CRQ@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_hns_roce_init_cmq_ring
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_hns_roce_free_cmq_desc
	jmp	LBB0_5
LBB0_4:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_hns_roce_cmq_init_regs
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_hns_roce_cmq_init_regs
	xorl	%r15d, %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_CSQ_DESC_NUM,4,2           ## @CMD_CSQ_DESC_NUM
	.comm	_CMD_CRQ_DESC_NUM,4,2           ## @CMD_CRQ_DESC_NUM
	.comm	_HNS_ROCE_CMQ_TX_TIMEOUT,4,2    ## @HNS_ROCE_CMQ_TX_TIMEOUT
	.comm	_TYPE_CSQ,4,2                   ## @TYPE_CSQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Init CSQ error, ret = %d.\n"

	.comm	_TYPE_CRQ,4,2                   ## @TYPE_CRQ
L_.str.1:                               ## @.str.1
	.asciz	"Init CRQ error, ret = %d.\n"

	.no_dead_strip	_hns_roce_v2_cmq_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_cmq_init
_hns_roce_v2_cmq_init:                  ; @hns_roce_v2_cmq_init
	.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
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _CMD_CSQ_DESC_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_CSQ_DESC_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20, #4]
Lloh3:
	adrp	x8, _CMD_CRQ_DESC_NUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_CRQ_DESC_NUM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	x21, x20, #12
	str	w8, [x20, #16]
	mov	x0, x20
	bl	_spin_lock_init
	mov	x0, x21
	bl	_spin_lock_init
Lloh6:
	adrp	x8, _HNS_ROCE_CMQ_TX_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HNS_ROCE_CMQ_TX_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20, #8]
Lloh9:
	adrp	x22, _TYPE_CSQ@GOTPAGE
Lloh10:
	ldr	x22, [x22, _TYPE_CSQ@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hns_roce_init_cmq_ring
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_5
LBB0_2:
Lloh13:
	adrp	x23, _TYPE_CRQ@GOTPAGE
Lloh14:
	ldr	x23, [x23, _TYPE_CRQ@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_hns_roce_init_cmq_ring
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	mov	x0, x19
	mov	x1, x20
	bl	_hns_roce_free_cmq_desc
	b	LBB0_5
LBB0_4:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hns_roce_cmq_init_regs
	ldr	w1, [x23]
	mov	x0, x19
	bl	_hns_roce_cmq_init_regs
LBB0_5:
	mov	x0, x21
	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 AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_CSQ_DESC_NUM,4,2           ; @CMD_CSQ_DESC_NUM
	.comm	_CMD_CRQ_DESC_NUM,4,2           ; @CMD_CRQ_DESC_NUM
	.comm	_HNS_ROCE_CMQ_TX_TIMEOUT,4,2    ; @HNS_ROCE_CMQ_TX_TIMEOUT
	.comm	_TYPE_CSQ,4,2                   ; @TYPE_CSQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Init CSQ error, ret = %d.\n"

	.comm	_TYPE_CRQ,4,2                   ; @TYPE_CRQ
l_.str.1:                               ; @.str.1
	.asciz	"Init CRQ error, ret = %d.\n"

	.no_dead_strip	_hns_roce_v2_cmq_init
.subsections_via_symbols
