	.file	"extr_hclgevf_mbx.c_hclgevf_send_mbx_msg.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"VF send mbx msg fail, msg len %d exceeds max len %d\n"
	.align 8
.LC1:
	.string	"VF failed(=%d) to send mbx message to PF\n"
	.text
	.p2align 4
	.globl	hclgevf_send_mbx_msg
	.type	hclgevf_send_mbx_msg, @function
hclgevf_send_mbx_msg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r10, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, r8d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	ecx, DWORD PTR HCLGE_MBX_MAX_MSG_SIZE[rip]
	mov	rax, QWORD PTR 112[rsp]
	mov	rbx, QWORD PTR 120[rsp]
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	lea	eax, -1[rcx]
	cmp	eax, r8d
	jle	.L16
	mov	rcx, QWORD PTR 32[rsp]
	mov	r13, rsi
	lea	r15, 32[rsp]
	mov	r14, rdx
	mov	esi, DWORD PTR HCLGEVF_OPC_MBX_VF_TO_PF[rip]
	xor	edx, edx
	mov	rdi, r15
	mov	DWORD PTR 20[rsp], r9d
	mov	QWORD PTR 8[rsp], r10
	mov	QWORD PTR [rsp], rcx
	call	hclgevf_cmd_setup_basic_desc@PLT
	mov	r9d, DWORD PTR 20[rsp]
	mov	rcx, QWORD PTR [rsp]
	mov	r10, QWORD PTR 8[rsp]
	test	r9d, r9d
	mov	eax, DWORD PTR 8[rcx]
	jne	.L4
	mov	edx, DWORD PTR HCLGE_MBX_NEED_RESP_BIT[rip]
	not	edx
	or	eax, edx
	mov	DWORD PTR 8[rcx], eax
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR [rax], r13
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR 8[rax], r14
	test	r10, r10
	je	.L6
	mov	rdi, QWORD PTR [rcx]
	mov	edx, r12d
	mov	rsi, r10
	add	rdi, 16
	call	memcpy@PLT
.L6:
	lea	rdi, 8[rbp]
	mov	edx, 1
	mov	rsi, r15
	call	hclgevf_cmd_send@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L17
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	or	eax, DWORD PTR HCLGE_MBX_NEED_RESP_BIT[rip]
	mov	DWORD PTR 8[rcx], eax
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR [rax], r13
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR 8[rax], r14
	test	r10, r10
	je	.L9
	mov	rdi, QWORD PTR [rcx]
	mov	edx, r12d
	mov	rsi, r10
	add	rdi, 16
	call	memcpy@PLT
.L9:
	lea	r9, 12[rbp]
	mov	rdi, r9
	mov	QWORD PTR [rsp], r9
	call	mutex_lock@PLT
	mov	rdi, rbp
	call	hclgevf_reset_mbx_resp_status@PLT
	lea	rdi, 8[rbp]
	mov	edx, 1
	mov	rsi, r15
	call	hclgevf_cmd_send@PLT
	mov	r9, QWORD PTR [rsp]
	test	eax, eax
	mov	r12d, eax
	jne	.L19
	mov	rcx, QWORD PTR 24[rsp]
	mov	rdi, rbp
	mov	r8, rbx
	mov	rdx, r14
	mov	rsi, r13
	mov	QWORD PTR [rsp], r9
	call	hclgevf_get_mbx_resp@PLT
	mov	r9, QWORD PTR [rsp]
	mov	r12d, eax
	mov	rdi, r9
	call	mutex_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdi, QWORD PTR [rdi]
	mov	edx, r8d
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, QWORD PTR 0[rbp]
	mov	edx, eax
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	r9, QWORD PTR [rsp]
	mov	rdi, r9
	call	mutex_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, QWORD PTR 0[rbp]
	mov	edx, eax
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L1
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hclgevf_send_mbx_msg, .-hclgevf_send_mbx_msg
	.comm	HCLGE_MBX_NEED_RESP_BIT,4,4
	.comm	HCLGE_MBX_MAX_MSG_SIZE,4,4
	.comm	HCLGEVF_OPC_MBX_VF_TO_PF,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_hclgevf_mbx.c_hclgevf_send_mbx_msg.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"VF send mbx msg fail, msg len %d exceeds max len %d"
	.ascii	"\012\000"
	.align	2
.LC1:
	.ascii	"VF failed(=%d) to send mbx message to PF\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	hclgevf_send_mbx_msg
	.syntax unified
	.arm
	.fpu softvfp
	.type	hclgevf_send_mbx_msg, %function
hclgevf_send_mbx_msg:
	@ args = 16, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	ip, .L20
	sub	sp, sp, #20
	ldr	ip, [ip]
	ldr	fp, [sp, #56]
	mov	r5, r0
	mov	r4, r3
	sub	r0, ip, #1
	ldr	r3, .L20+4
	cmp	r0, fp
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r8, [sp, #64]
	ldr	r10, [sp, #68]
	ble	.L16
	ldr	r3, .L20+8
	mov	r6, r1
	mov	r7, r2
	ldr	r1, [r3]
	mov	r2, #0
	add	r0, sp, #8
	ldr	r9, [sp, #8]
	bl	hclgevf_cmd_setup_basic_desc
	ldr	r3, [sp, #60]
	ldr	r2, [r9, #4]
	cmp	r3, #0
	ldr	r3, .L20+12
	bne	.L4
	ldr	r3, [r3]
	ldr	r1, [r9]
	mvn	r3, r3
	orr	r3, r3, r2
	str	r3, [r9, #4]
	str	r6, [r1]
	ldr	r3, [r9]
	cmp	r4, #0
	str	r7, [r3, #4]
	beq	.L6
	ldr	r0, [r9]
	mov	r2, fp
	mov	r1, r4
	add	r0, r0, #8
	bl	memcpy
.L6:
	mov	r2, #1
	add	r1, sp, #8
	add	r0, r5, #4
	bl	hclgevf_cmd_send
	subs	r4, r0, #0
	bne	.L17
.L1:
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r3, [r3]
	ldr	r1, [r9]
	orr	r3, r3, r2
	str	r3, [r9, #4]
	str	r6, [r1]
	ldr	r3, [r9]
	cmp	r4, #0
	str	r7, [r3, #4]
	beq	.L9
	ldr	r0, [r9]
	mov	r2, fp
	mov	r1, r4
	add	r0, r0, #8
	bl	memcpy
.L9:
	add	r9, r5, #8
	mov	r0, r9
	bl	mutex_lock
	mov	r0, r5
	bl	hclgevf_reset_mbx_resp_status
	mov	r2, #1
	add	r1, sp, #8
	add	r0, r5, #4
	bl	hclgevf_cmd_send
	subs	r4, r0, #0
	bne	.L19
	mov	r3, r8
	mov	r2, r7
	mov	r1, r6
	mov	r0, r5
	str	r10, [sp]
	bl	hclgevf_get_mbx_resp
	mov	r4, r0
	mov	r0, r9
	bl	mutex_unlock
	b	.L1
.L16:
	mov	r3, ip
	mov	r2, fp
	ldr	r0, [r5]
	ldr	r1, .L20+16
	bl	dev_err
	ldr	r3, .L20+20
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L19:
	mov	r2, r4
	ldr	r0, [r5]
	ldr	r1, .L20+24
	bl	dev_err
	mov	r0, r9
	bl	mutex_unlock
	b	.L1
.L17:
	mov	r2, r4
	ldr	r0, [r5]
	ldr	r1, .L20+24
	bl	dev_err
	b	.L1
.L18:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	HCLGE_MBX_MAX_MSG_SIZE
	.word	.LC2
	.word	HCLGEVF_OPC_MBX_VF_TO_PF
	.word	HCLGE_MBX_NEED_RESP_BIT
	.word	.LC0
	.word	EINVAL
	.word	.LC1
	.size	hclgevf_send_mbx_msg, .-hclgevf_send_mbx_msg
	.comm	HCLGE_MBX_NEED_RESP_BIT,4,4
	.comm	HCLGE_MBX_MAX_MSG_SIZE,4,4
	.comm	HCLGEVF_OPC_MBX_VF_TO_PF,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
