	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclgevf_cmd_send               ## -- Begin function hclgevf_cmd_send
	.p2align	4, 0x90
_hclgevf_cmd_send:                      ## @hclgevf_cmd_send
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	48(%rdi), %r14
	leaq	24(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	movq	_HCLGEVF_STATE_CMD_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	jmp	LBB0_2
LBB0_3:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %ebx
	leaq	16(%r13), %r12
	movq	%r12, %rdi
	callq	_hclgevf_ring_space
	cmpl	%ebx, %eax
	jge	LBB0_5
## %bb.4:
	movq	_HCLGEVF_NIC_CSQ_HEAD_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_hclgevf_read_dev
	movl	%eax, 40(%r13)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_2:
	callq	_spin_unlock_bh
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_25:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movl	(%r12), %r15d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	callq	_le16_to_cpu
	movl	%ebx, %ecx
	movl	%ebx, %r8d
	testl	%ebx, %ebx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	jle	LBB0_6
## %bb.7:
	movl	16(%r13), %edx
	leaq	(,%rcx,4), %rcx
	leaq	(%rcx,%rcx,2), %rbx
	xorl	%ecx, %ecx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%edx, 16(%r13)
	addq	$12, %rcx
	cmpq	%rcx, %rbx
	je	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %rsi
	movslq	%edx, %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movl	8(%r12,%rcx), %edi
	movl	%edi, 8(%rsi,%rdx,4)
	movq	(%r12,%rcx), %rdi
	movq	%rdi, (%rsi,%rdx,4)
	movl	16(%r13), %esi
	incl	%esi
	movl	$0, %edx
	cmpl	20(%r13), %esi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	%esi, %edx
	jmp	LBB0_10
LBB0_6:
	movl	(%r12), %edx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_11:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	_HCLGEVF_NIC_CSQ_TAIL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_hclgevf_write_dev
	movl	4(%r12), %edi
	callq	_le16_to_cpu
	movq	%rax, %rdi
	callq	_HCLGEVF_SEND_SYNC
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_hclgevf_cmd_csq_done
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	$1, %edi
	callq	_udelay
	incq	%rbx
	cmpq	(%r13), %rbx
	jl	LBB0_13
LBB0_15:
	movq	%r13, %rdi
	callq	_hclgevf_cmd_csq_done
	movq	%rax, %rdx
	movl	$0, %eax
	testq	%rdx, %rdx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_22
## %bb.16:
	movl	$0, %eax
	testl	%r14d, %r14d
	jle	LBB0_22
## %bb.17:
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	addq	$12, %r12
	decq	-96(%rbp)                       ## 8-byte Folded Spill
	je	LBB0_21
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %rax
	movslq	%r15d, %r14
	leaq	(%r14,%r14,2), %rcx
	movl	8(%rax,%rcx,4), %edx
	movl	%edx, 8(%r12)
	movq	(%rax,%rcx,4), %rax
	movq	%rax, (%r12)
	movq	%rbx, %rdi
	callq	_hclgevf_is_special_opcode
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	movq	%r12, %rax
	cmoveq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_hclgevf_cmd_convert_err_code
	movl	%r15d, 8(%r13)
	incl	%r14d
	xorl	%r15d, %r15d
	cmpl	20(%r13), %r14d
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	%r14d, %r15d
	jmp	LBB0_20
LBB0_21:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
LBB0_22:
	movq	_EBADE@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	testq	%rdx, %rdx
	cmovnel	%eax, %ebx
	movq	%r13, %rdi
	callq	_hclgevf_cmd_csq_clean
	cmpl	%r14d, %eax
	je	LBB0_24
## %bb.23:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_dev_warn
LBB0_24:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_bh
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_HCLGEVF_STATE_CMD_DISABLE,4,2  ## @HCLGEVF_STATE_CMD_DISABLE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_HCLGEVF_NIC_CSQ_HEAD_REG,4,2   ## @HCLGEVF_NIC_CSQ_HEAD_REG
	.comm	_HCLGEVF_NIC_CSQ_TAIL_REG,4,2   ## @HCLGEVF_NIC_CSQ_TAIL_REG
	.comm	_EBADE,4,2                      ## @EBADE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cleaned %d, need to clean %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclgevf_cmd_send               ; -- Begin function hclgevf_cmd_send
	.p2align	2
_hclgevf_cmd_send:                      ; @hclgevf_cmd_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x26, [x0, #48]
	add	x19, x0, #24
	mov	x0, x19
	bl	_spin_lock_bh
Lloh0:
	adrp	x8, _HCLGEVF_STATE_CMD_DISABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCLGEVF_STATE_CMD_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x26, #8
	bl	_test_bit
	cbnz	x0, LBB0_3
; %bb.1:
	add	x24, x21, #16
	mov	x0, x24
	bl	_hclgevf_ring_space
	cmp	w0, w25
	b.ge	LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _HCLGEVF_NIC_CSQ_HEAD_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HCLGEVF_NIC_CSQ_HEAD_REG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_hclgevf_read_dev
	str	w0, [x21, #40]
LBB0_3:
	mov	x0, x19
	bl	_spin_unlock_bh
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_4:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	ldr	w27, [x24]
	ldr	w0, [x20, #8]
	bl	_le16_to_cpu
	mov	x23, x0
	mov	w28, w25
	cmp	w25, #0
	b.le	LBB0_8
; %bb.6:
	ldr	w2, [x21, #16]
	mov	w8, #12
	mov	x9, x28
	mov	x10, x20
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x21, #32]
	smaddl	x11, w2, w8, x11
	ldr	x12, [x10]
	ldr	w13, [x10, #8]
	str	w13, [x11, #8]
	str	x12, [x11]
	ldp	w11, w12, [x21, #16]
	add	w13, w11, #1
	cmp	w13, w12
	csinc	w2, wzr, w11, eq
	str	w2, [x21, #16]
	add	x10, x10, #12
	subs	x9, x9, #1
	b.ne	LBB0_7
	b	LBB0_9
LBB0_8:
	ldr	w2, [x24]
LBB0_9:
Lloh9:
	adrp	x8, _HCLGEVF_NIC_CSQ_TAIL_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HCLGEVF_NIC_CSQ_TAIL_REG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_hclgevf_write_dev
	ldr	w0, [x20, #4]
	bl	_le16_to_cpu
	bl	_HCLGEVF_SEND_SYNC
	cbz	x0, LBB0_13
; %bb.10:
	mov	x22, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_hclgevf_cmd_csq_done
	cbnz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #1
	bl	_udelay
	add	x22, x22, #1
	ldr	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_11
LBB0_13:
	mov	x0, x21
	bl	_hclgevf_cmd_csq_done
	mov	x9, x0
	mov	w0, #0
	cbz	x9, LBB0_18
; %bb.14:
	cmp	w25, #1
	b.lt	LBB0_18
; %bb.15:
	str	x9, [sp]                        ; 8-byte Folded Spill
	str	w25, [sp, #12]                  ; 4-byte Folded Spill
	mov	w24, #12
	mov	x22, x20
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #32]
	smaddl	x8, w27, w24, x8
	ldr	x9, [x8]
	ldr	w8, [x8, #8]
	str	w8, [x22, #8]
	str	x9, [x22]
	mov	x0, x23
	bl	_hclgevf_is_special_opcode
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cmp	x0, #0
	csel	x8, x20, x22, eq
	ldr	w0, [x8]
	bl	_le16_to_cpu
	mov	x25, x0
	bl	_hclgevf_cmd_convert_err_code
	str	w25, [x21, #8]
	add	w8, w27, #1
	ldr	w9, [x21, #20]
	cmp	w8, w9
	csinc	w27, wzr, w27, eq
	add	x22, x22, #12
	subs	x28, x28, #1
	b.ne	LBB0_16
; %bb.17:
	ldr	w25, [sp, #12]                  ; 4-byte Folded Reload
	ldr	x9, [sp]                        ; 8-byte Folded Reload
LBB0_18:
Lloh12:
	adrp	x8, _EBADE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBADE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	x9, #0
	csneg	w22, w0, w8, ne
	mov	x0, x21
	bl	_hclgevf_cmd_csq_clean
	cmp	w0, w25
	b.eq	LBB0_20
; %bb.19:
	mov	x2, x0
	ldr	x0, [x26]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x25
	bl	_dev_warn
LBB0_20:
	mov	x0, x19
	bl	_spin_unlock_bh
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_HCLGEVF_STATE_CMD_DISABLE,4,2  ; @HCLGEVF_STATE_CMD_DISABLE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_HCLGEVF_NIC_CSQ_HEAD_REG,4,2   ; @HCLGEVF_NIC_CSQ_HEAD_REG
	.comm	_HCLGEVF_NIC_CSQ_TAIL_REG,4,2   ; @HCLGEVF_NIC_CSQ_TAIL_REG
	.comm	_EBADE,4,2                      ; @EBADE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cleaned %d, need to clean %d\n"

.subsections_via_symbols
