	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclge_cmd_init                 ## -- Begin function hclge_cmd_init
	.p2align	4, 0x90
_hclge_cmd_init:                        ## @hclge_cmd_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, %r15
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	leaq	48(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%r15)
	movups	%xmm0, 56(%r15)
	movq	%r14, %rdi
	callq	_hclge_cmd_init_regs
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movq	_HCLGE_STATE_CMD_DISABLE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%r15, %rsi
	callq	_clear_bit
	movq	%r15, %rdi
	callq	_hclge_is_reset_pending
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_2
LBB0_3:
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_hclge_cmd_query_firmware_version
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
LBB0_2:
	movl	(%r12), %edi
	movq	%r15, %rsi
	callq	_set_bit
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	-44(%rbp), %edi
	movl	%edi, 16(%r15)
	movq	8(%r15), %r14
	movq	_HNAE3_FW_VERSION_BYTE3_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HNAE3_FW_VERSION_BYTE3_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hnae3_get_field
	movl	%eax, %r12d
	movl	-44(%rbp), %edi
	movq	_HNAE3_FW_VERSION_BYTE2_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HNAE3_FW_VERSION_BYTE2_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hnae3_get_field
	movl	%eax, %r13d
	movl	-44(%rbp), %edi
	movq	_HNAE3_FW_VERSION_BYTE1_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HNAE3_FW_VERSION_BYTE1_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hnae3_get_field
	movl	%eax, %ebx
	movl	-44(%rbp), %edi
	movq	_HNAE3_FW_VERSION_BYTE0_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HNAE3_FW_VERSION_BYTE0_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hnae3_get_field
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	movl	%eax, %r9d
	callq	_dev_info
	movq	%r15, %rdi
	callq	_hclge_firmware_compat_config
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	8(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_HCLGE_STATE_CMD_DISABLE,4,2    ## @HCLGE_STATE_CMD_DISABLE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"firmware version query failed %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"The firmware version is %lu.%lu.%lu.%lu\n"

	.comm	_HNAE3_FW_VERSION_BYTE3_MASK,4,2 ## @HNAE3_FW_VERSION_BYTE3_MASK
	.comm	_HNAE3_FW_VERSION_BYTE3_SHIFT,4,2 ## @HNAE3_FW_VERSION_BYTE3_SHIFT
	.comm	_HNAE3_FW_VERSION_BYTE2_MASK,4,2 ## @HNAE3_FW_VERSION_BYTE2_MASK
	.comm	_HNAE3_FW_VERSION_BYTE2_SHIFT,4,2 ## @HNAE3_FW_VERSION_BYTE2_SHIFT
	.comm	_HNAE3_FW_VERSION_BYTE1_MASK,4,2 ## @HNAE3_FW_VERSION_BYTE1_MASK
	.comm	_HNAE3_FW_VERSION_BYTE1_SHIFT,4,2 ## @HNAE3_FW_VERSION_BYTE1_SHIFT
	.comm	_HNAE3_FW_VERSION_BYTE0_MASK,4,2 ## @HNAE3_FW_VERSION_BYTE0_MASK
	.comm	_HNAE3_FW_VERSION_BYTE0_SHIFT,4,2 ## @HNAE3_FW_VERSION_BYTE0_SHIFT
L_.str.2:                               ## @.str.2
	.asciz	"Firmware compatible features not enabled(%d).\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclge_cmd_init                 ; -- Begin function hclge_cmd_init
	.p2align	2
_hclge_cmd_init:                        ; @hclge_cmd_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	add	x20, x0, #24
	mov	x0, x20
	bl	_spin_lock_bh
	add	x21, x19, #48
	mov	x0, x21
	bl	_spin_lock
	stp	xzr, xzr, [x19, #32]
	stp	xzr, xzr, [x19, #56]
	mov	x0, x20
	bl	_hclge_cmd_init_regs
	mov	x0, x21
	bl	_spin_unlock
	mov	x0, x20
	bl	_spin_unlock_bh
Lloh0:
	adrp	x21, _HCLGE_STATE_CMD_DISABLE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HCLGE_STATE_CMD_DISABLE@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_clear_bit
	mov	x0, x19
	bl	_hclge_is_reset_pending
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_2:
	add	x1, sp, #12
	mov	x0, x20
	bl	_hclge_cmd_query_firmware_version
	cbz	w0, LBB0_6
; %bb.3:
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_4:
	ldr	w0, [x21]
	mov	x1, x19
	bl	_set_bit
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	ldr	w0, [sp, #12]
	str	w0, [x19, #16]
	ldr	x20, [x19, #8]
Lloh7:
	adrp	x8, _HNAE3_FW_VERSION_BYTE3_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HNAE3_FW_VERSION_BYTE3_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _HNAE3_FW_VERSION_BYTE3_SHIFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HNAE3_FW_VERSION_BYTE3_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	bl	_hnae3_get_field
	mov	x21, x0
	ldr	w0, [sp, #12]
Lloh13:
	adrp	x8, _HNAE3_FW_VERSION_BYTE2_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HNAE3_FW_VERSION_BYTE2_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _HNAE3_FW_VERSION_BYTE2_SHIFT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HNAE3_FW_VERSION_BYTE2_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	bl	_hnae3_get_field
	mov	x22, x0
	ldr	w0, [sp, #12]
Lloh19:
	adrp	x8, _HNAE3_FW_VERSION_BYTE1_MASK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HNAE3_FW_VERSION_BYTE1_MASK@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _HNAE3_FW_VERSION_BYTE1_SHIFT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _HNAE3_FW_VERSION_BYTE1_SHIFT@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	bl	_hnae3_get_field
	mov	x23, x0
	ldr	w0, [sp, #12]
Lloh25:
	adrp	x8, _HNAE3_FW_VERSION_BYTE0_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _HNAE3_FW_VERSION_BYTE0_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _HNAE3_FW_VERSION_BYTE0_SHIFT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _HNAE3_FW_VERSION_BYTE0_SHIFT@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	bl	_hnae3_get_field
	mov	x5, x0
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
	bl	_dev_info
	mov	x0, x19
	bl	_hclge_firmware_compat_config
	cbz	w0, LBB0_8
; %bb.7:
	mov	x2, x0
	ldr	x0, [x19, #8]
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
LBB0_8:
	mov	w20, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_HCLGE_STATE_CMD_DISABLE,4,2    ; @HCLGE_STATE_CMD_DISABLE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"firmware version query failed %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"The firmware version is %lu.%lu.%lu.%lu\n"

	.comm	_HNAE3_FW_VERSION_BYTE3_MASK,4,2 ; @HNAE3_FW_VERSION_BYTE3_MASK
	.comm	_HNAE3_FW_VERSION_BYTE3_SHIFT,4,2 ; @HNAE3_FW_VERSION_BYTE3_SHIFT
	.comm	_HNAE3_FW_VERSION_BYTE2_MASK,4,2 ; @HNAE3_FW_VERSION_BYTE2_MASK
	.comm	_HNAE3_FW_VERSION_BYTE2_SHIFT,4,2 ; @HNAE3_FW_VERSION_BYTE2_SHIFT
	.comm	_HNAE3_FW_VERSION_BYTE1_MASK,4,2 ; @HNAE3_FW_VERSION_BYTE1_MASK
	.comm	_HNAE3_FW_VERSION_BYTE1_SHIFT,4,2 ; @HNAE3_FW_VERSION_BYTE1_SHIFT
	.comm	_HNAE3_FW_VERSION_BYTE0_MASK,4,2 ; @HNAE3_FW_VERSION_BYTE0_MASK
	.comm	_HNAE3_FW_VERSION_BYTE0_SHIFT,4,2 ; @HNAE3_FW_VERSION_BYTE0_SHIFT
l_.str.2:                               ; @.str.2
	.asciz	"Firmware compatible features not enabled(%d).\n"

.subsections_via_symbols
