	.file	"extr_cvmx-cmd-queue.c_cvmx_cmd_queue_length.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cvmx_cmd_queue_length
	.type	cvmx_cmd_queue_length, @function
cvmx_cmd_queue_length:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR CVMX_ENABLE_PARAMETER_CHECKING[rip], 0
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	ebx, edi
	jne	.L7
.L2:
	and	ebx, 16711680
	mov	eax, 0
	add	ebx, -128
	cmp	ebx, 1
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	cmova	eax, DWORD PTR CVMX_CMD_QUEUE_INVALID_PARAM[rip]
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	call	__cvmx_cmd_queue_get_state@PLT
	test	rax, rax
	jne	.L2
	mov	eax, DWORD PTR CVMX_CMD_QUEUE_INVALID_PARAM[rip]
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	cvmx_cmd_queue_length, .-cvmx_cmd_queue_length
	.comm	OCTEON_CN3XXX,4,4
	.comm	CVMX_PKO_REG_READ_IDX,4,4
	.comm	CVMX_PKO_MEM_DEBUG9,4,4
	.comm	CVMX_PKO_MEM_DEBUG8,4,4
	.comm	CVMX_ENABLE_PARAMETER_CHECKING,8,8
	.comm	CVMX_CMD_QUEUE_INVALID_PARAM,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_cvmx-cmd-queue.c_cvmx_cmd_queue_length.c"
	.text
	.align	2
	.global	cvmx_cmd_queue_length
	.syntax unified
	.arm
	.fpu softvfp
	.type	cvmx_cmd_queue_length, %function
cvmx_cmd_queue_length:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L16
	push	{r4, lr}
	ldr	r3, [r3]
	mov	r4, r0
	cmp	r3, #0
	bne	.L15
.L2:
	and	r3, r4, #16711680
	sub	r3, r3, #128
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L4
.L5:
	.word	.L9
	.word	.L9
	.word	.L7
	.word	.L4
	.word	.L6
	.word	.L9
.L9:
	mov	r0, #0
	pop	{r4, pc}
.L15:
	bl	__cvmx_cmd_queue_get_state
	cmp	r0, #0
	bne	.L2
.L4:
	ldr	r3, .L16+4
	ldr	r0, [r3]
	pop	{r4, pc}
.L6:
	and	r0, r4, #7
	bl	CVMX_PEXP_NPEI_DMAX_COUNTS
	pop	{r4, lr}
	b	cvmx_read_csr
.L7:
	ldr	r3, .L16+8
	lsl	r1, r4, #16
	ldr	r0, [r3]
	lsr	r1, r1, #16
	bl	cvmx_write_csr
	ldr	r3, .L16+12
	ldr	r0, [r3]
	bl	OCTEON_IS_MODEL
	cmp	r0, #0
	beq	.L8
	pop	{r4, lr}
	ldr	r3, .L16+16
	ldr	r0, [r3]
	b	cvmx_read_csr
.L8:
	ldr	r3, .L16+20
	pop	{r4, lr}
	ldr	r0, [r3]
	b	cvmx_read_csr
.L17:
	.align	2
.L16:
	.word	CVMX_ENABLE_PARAMETER_CHECKING
	.word	CVMX_CMD_QUEUE_INVALID_PARAM
	.word	CVMX_PKO_REG_READ_IDX
	.word	OCTEON_CN3XXX
	.word	CVMX_PKO_MEM_DEBUG9
	.word	CVMX_PKO_MEM_DEBUG8
	.size	cvmx_cmd_queue_length, .-cvmx_cmd_queue_length
	.comm	OCTEON_CN3XXX,4,4
	.comm	CVMX_PKO_REG_READ_IDX,4,4
	.comm	CVMX_PKO_MEM_DEBUG9,4,4
	.comm	CVMX_PKO_MEM_DEBUG8,4,4
	.comm	CVMX_ENABLE_PARAMETER_CHECKING,4,4
	.comm	CVMX_CMD_QUEUE_INVALID_PARAM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
