	.file	"extr_be_cmds.c_lancer_cmd_get_pport_stats.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	lancer_cmd_get_pport_stats
	.type	lancer_cmd_get_pport_stats, @function
lancer_cmd_get_pport_stats:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edx, DWORD PTR CMD_SUBSYSTEM_ETH[rip]
	mov	esi, DWORD PTR OPCODE_ETH_GET_PPORT_STATS[rip]
	call	be_cmd_allowed@PLT
	test	eax, eax
	jne	.L2
	mov	r12d, DWORD PTR EPERM[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	rbp, 4[rbx]
	mov	rdi, rbp
	call	mutex_lock@PLT
	mov	rdi, rbx
	call	wrb_from_mccq@PLT
	mov	r8, rax
	test	rax, rax
	je	.L8
	mov	r13, QWORD PTR 8[r12]
	mov	ecx, DWORD PTR [r12]
	mov	r9, r12
	mov	edx, DWORD PTR OPCODE_ETH_GET_PPORT_STATS[rip]
	mov	esi, DWORD PTR CMD_SUBSYSTEM_ETH[rip]
	lea	rdi, 16[r13]
	call	be_wrb_cmd_hdr_prepare@PLT
	mov	edi, DWORD PTR 8[rbx]
	call	cpu_to_le16@PLT
	mov	QWORD PTR 0[r13], 0
	mov	rdi, rbx
	mov	DWORD PTR 8[r13], eax
	call	be_mcc_notify@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L5
	mov	DWORD PTR [rbx], 1
.L5:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	lancer_cmd_get_pport_stats, .-lancer_cmd_get_pport_stats
	.comm	OPCODE_ETH_GET_PPORT_STATS,4,4
	.comm	EPERM,4,4
	.comm	EBUSY,4,4
	.comm	CMD_SUBSYSTEM_ETH,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_be_cmds.c_lancer_cmd_get_pport_stats.c"
	.text
	.align	2
	.global	lancer_cmd_get_pport_stats
	.syntax unified
	.arm
	.fpu softvfp
	.type	lancer_cmd_get_pport_stats, %function
lancer_cmd_get_pport_stats:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r6, .L9
	ldr	r7, .L9+4
	mov	r5, r1
	ldr	r2, [r6]
	ldr	r1, [r7]
	sub	sp, sp, #12
	mov	r4, r0
	bl	be_cmd_allowed
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L9+8
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	add	r8, r4, #4
	mov	r0, r8
	bl	mutex_lock
	mov	r0, r4
	bl	wrb_from_mccq
	cmp	r0, #0
	beq	.L8
	ldr	r9, [r5, #4]
	stm	sp, {r0, r5}
	ldr	r2, [r7]
	ldr	r3, [r5]
	ldr	r1, [r6]
	add	r0, r9, #8
	bl	be_wrb_cmd_hdr_prepare
	ldr	r0, [r4, #8]
	bl	cpu_to_le16
	mov	r3, #0
	str	r0, [r9, #4]
	str	r3, [r9]
	mov	r0, r4
	bl	be_mcc_notify
	subs	r5, r0, #0
	moveq	r3, #1
	streq	r3, [r4]
.L5:
	mov	r0, r8
	bl	mutex_unlock
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L8:
	ldr	r3, .L9+12
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L5
.L10:
	.align	2
.L9:
	.word	CMD_SUBSYSTEM_ETH
	.word	OPCODE_ETH_GET_PPORT_STATS
	.word	EPERM
	.word	EBUSY
	.size	lancer_cmd_get_pport_stats, .-lancer_cmd_get_pport_stats
	.comm	OPCODE_ETH_GET_PPORT_STATS,4,4
	.comm	EPERM,4,4
	.comm	EBUSY,4,4
	.comm	CMD_SUBSYSTEM_ETH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
