	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclgevf_cmd_queue_init         ## -- Begin function hclgevf_cmd_queue_init
	.p2align	4, 0x90
_hclgevf_cmd_queue_init:                ## @hclgevf_cmd_queue_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	addq	$8, %rdi
	callq	_spin_lock_init
	leaq	24(%rbx), %rdi
	callq	_spin_lock_init
	movq	_HCLGEVF_CMDQ_TX_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_HCLGEVF_NIC_CMQ_DESC_NUM@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%rbx)
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	movq	_HCLGEVF_TYPE_CSQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hclgevf_alloc_cmd_queue
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movq	40(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_5
LBB0_2:
	movq	_HCLGEVF_TYPE_CRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hclgevf_alloc_cmd_queue
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %r14d
	movq	40(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_hclgevf_free_cmd_desc
	jmp	LBB0_5
LBB0_3:
	xorl	%r14d, %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HCLGEVF_CMDQ_TX_TIMEOUT,4,2    ## @HCLGEVF_CMDQ_TX_TIMEOUT
	.comm	_HCLGEVF_NIC_CMQ_DESC_NUM,8,3   ## @HCLGEVF_NIC_CMQ_DESC_NUM
	.comm	_HCLGEVF_TYPE_CSQ,4,2           ## @HCLGEVF_TYPE_CSQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CSQ ring setup error %d\n"

	.comm	_HCLGEVF_TYPE_CRQ,4,2           ## @HCLGEVF_TYPE_CRQ
L_.str.1:                               ## @.str.1
	.asciz	"CRQ ring setup error %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclgevf_cmd_queue_init         ; -- Begin function hclgevf_cmd_queue_init
	.p2align	2
_hclgevf_cmd_queue_init:                ; @hclgevf_cmd_queue_init
	.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
	add	x0, x0, #8
	bl	_spin_lock_init
	add	x0, x19, #24
	bl	_spin_lock_init
Lloh0:
	adrp	x8, _HCLGEVF_CMDQ_TX_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCLGEVF_CMDQ_TX_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #32]
Lloh3:
	adrp	x8, _HCLGEVF_NIC_CMQ_DESC_NUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HCLGEVF_NIC_CMQ_DESC_NUM@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x19]
	ldr	x8, [x8]
	str	x8, [x19, #16]
Lloh5:
	adrp	x8, _HCLGEVF_TYPE_CSQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HCLGEVF_TYPE_CSQ@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hclgevf_alloc_cmd_queue
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	x0, [x19, #40]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_4
LBB0_2:
Lloh10:
	adrp	x8, _HCLGEVF_TYPE_CRQ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HCLGEVF_TYPE_CRQ@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hclgevf_alloc_cmd_queue
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	x0, [x19, #40]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	mov	x0, x19
	bl	_hclgevf_free_cmd_desc
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_HCLGEVF_CMDQ_TX_TIMEOUT,4,2    ; @HCLGEVF_CMDQ_TX_TIMEOUT
	.comm	_HCLGEVF_NIC_CMQ_DESC_NUM,8,3   ; @HCLGEVF_NIC_CMQ_DESC_NUM
	.comm	_HCLGEVF_TYPE_CSQ,4,2           ; @HCLGEVF_TYPE_CSQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CSQ ring setup error %d\n"

	.comm	_HCLGEVF_TYPE_CRQ,4,2           ; @HCLGEVF_TYPE_CRQ
l_.str.1:                               ; @.str.1
	.asciz	"CRQ ring setup error %d\n"

.subsections_via_symbols
