	.file	"extr_usb.c_mt76u_get_rx_entry_len.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mt76u_get_rx_entry_len, @function
mt76u_get_rx_entry_len:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rsi
	call	get_unaligned_le16@PLT
	mov	rcx, QWORD PTR MT_DMA_HDR_LEN[rip]
	mov	rdx, QWORD PTR MT_RX_RXWI_LEN[rip]
	add	rdx, rcx
	add	rdx, QWORD PTR MT_FCE_INFO_LEN[rip]
	cmp	rdx, rbx
	jg	.L2
	test	rax, rax
	je	.L2
	add	rcx, rax
	cmp	rcx, rbx
	jg	.L2
	mov	r8d, eax
	test	al, 3
	je	.L1
.L2:
	mov	r8d, DWORD PTR EINVAL[rip]
	neg	r8d
.L1:
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mt76u_get_rx_entry_len, .-mt76u_get_rx_entry_len
	.comm	MT_RX_RXWI_LEN,8,8
	.comm	MT_FCE_INFO_LEN,8,8
	.comm	MT_DMA_HDR_LEN,8,8
	.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_usb.c_mt76u_get_rx_entry_len.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mt76u_get_rx_entry_len, %function
mt76u_get_rx_entry_len:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	mov	r4, r1
	bl	get_unaligned_le16
	clz	r3, r0
	ldr	r1, .L9
	ldr	r2, .L9+4
	ldr	ip, .L9+8
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	ip, [ip]
	add	r2, r1, r2
	add	r2, r2, ip
	lsr	r3, r3, #5
	cmp	r2, r4
	orrgt	r3, r3, #1
	cmp	r3, #0
	bne	.L2
	add	r1, r1, r0
	cmp	r1, r4
	bgt	.L2
	tst	r0, #3
	popeq	{r4, pc}
.L2:
	ldr	r3, .L9+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, pc}
.L10:
	.align	2
.L9:
	.word	MT_DMA_HDR_LEN
	.word	MT_RX_RXWI_LEN
	.word	MT_FCE_INFO_LEN
	.word	EINVAL
	.size	mt76u_get_rx_entry_len, .-mt76u_get_rx_entry_len
	.comm	MT_RX_RXWI_LEN,4,4
	.comm	MT_FCE_INFO_LEN,4,4
	.comm	MT_DMA_HDR_LEN,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
