	.file	"extr_bcm63xx_enet.c_bcm_enet_receive_queue.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bcm_enet_receive_queue, @function
bcm_enet_receive_queue:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	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, 40
	.cfi_def_cfa_offset 96
	call	netdev_priv@PLT
	mov	r15, rax
	mov	rax, QWORD PTR 40[rax]
	cmp	DWORD PTR [r15], r14d
	cmovle	r14d, DWORD PTR [r15]
	xor	r12d, r12d
	mov	QWORD PTR 16[rsp], rax
	lea	rax, 48[r15]
	mov	DWORD PTR 8[rsp], r14d
	mov	QWORD PTR 24[rsp], rax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L4:
	mov	ecx, DWORD PTR 52[r15]
	test	ecx, ecx
	je	.L35
.L6:
	mov	ecx, DWORD PTR DMADESC_LENGTH_SHIFT[rip]
	and	edx, DWORD PTR DMADESC_LENGTH_MASK[rip]
	mov	rax, QWORD PTR 24[r15]
	sar	edx, cl
	lea	r9d, -4[rdx]
	cmp	DWORD PTR copybreak[rip], r9d
	mov	r14, QWORD PTR [rax+rbx*8]
	jbe	.L10
	mov	rdi, QWORD PTR 24[rsp]
	mov	esi, r9d
	mov	DWORD PTR 12[rsp], r9d
	call	napi_alloc_skb@PLT
	mov	r9d, DWORD PTR 12[rsp]
	test	rax, rax
	mov	rbx, rax
	je	.L33
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	esi, DWORD PTR 4[r13]
	mov	edx, r9d
	mov	DWORD PTR 12[rsp], r9d
	mov	rdi, QWORD PTR 16[rsp]
	call	dma_sync_single_for_cpu@PLT
	mov	r9d, DWORD PTR 12[rsp]
	mov	esi, DWORD PTR 4[r14]
	mov	r14, rbx
	mov	edi, DWORD PTR 4[rbx]
	mov	edx, r9d
	call	memcpy@PLT
	mov	r9d, DWORD PTR 12[rsp]
	mov	esi, DWORD PTR 4[r13]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	rdi, QWORD PTR 16[rsp]
	mov	edx, r9d
	call	dma_sync_single_for_device@PLT
	mov	r9d, DWORD PTR 12[rsp]
.L12:
	mov	esi, r9d
	mov	rdi, r14
	mov	DWORD PTR 12[rsp], r9d
	call	skb_put@PLT
	mov	rdi, r14
	mov	rsi, rbp
	call	eth_type_trans@PLT
	mov	r9d, DWORD PTR 12[rsp]
	mov	rdi, r14
	mov	DWORD PTR [r14], eax
	add	DWORD PTR 4[rbp], 1
	add	DWORD PTR 0[rbp], r9d
	call	netif_receive_skb@PLT
.L5:
	mov	eax, DWORD PTR 8[rsp]
	sub	eax, r12d
	test	eax, eax
	jle	.L14
.L13:
	mov	rax, QWORD PTR 56[r15]
	movsx	rbx, DWORD PTR 4[r15]
	lea	r13, [rax+rbx*8]
	xor	eax, eax
	call	rmb@PLT
	mov	edx, DWORD PTR 0[r13]
	test	DWORD PTR DMADESC_OWNER_MASK[rip], edx
	jne	.L2
	mov	eax, DWORD PTR 4[r15]
	add	r12d, 1
	add	eax, 1
	mov	DWORD PTR 4[r15], eax
	cmp	eax, DWORD PTR 8[r15]
	jne	.L3
	mov	DWORD PTR 4[r15], 0
.L3:
	mov	ecx, DWORD PTR 12[r15]
	mov	eax, DWORD PTR DMADESC_ESOP_MASK[rip]
	sub	DWORD PTR [r15], 1
	sar	eax, cl
	mov	ecx, eax
	and	ecx, edx
	cmp	eax, ecx
	je	.L4
.L33:
	mov	eax, DWORD PTR 8[rsp]
	add	DWORD PTR 8[rbp], 1
	sub	eax, r12d
	test	eax, eax
	jg	.L13
.L14:
	mov	rdi, rbp
	call	bcm_enet_refill_rx@PLT
	mov	ecx, DWORD PTR 16[r15]
	mov	esi, DWORD PTR 20[r15]
	mov	rdi, r15
	mov	edx, DWORD PTR ENETDMAC_CHANCFG[rip]
	call	enet_dmac_writel@PLT
.L1:
	add	rsp, 40
	.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
.L10:
	.cfi_restore_state
	mov	edx, DWORD PTR 32[r15]
	mov	esi, DWORD PTR 4[r13]
	mov	DWORD PTR 12[rsp], r9d
	mov	rdi, QWORD PTR 40[r15]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	call	dma_unmap_single@PLT
	mov	rax, QWORD PTR 24[r15]
	mov	r9d, DWORD PTR 12[rsp]
	mov	QWORD PTR [rax+rbx*8], 0
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L35:
	mov	edi, edx
	and	edi, DWORD PTR DMADESC_ERR_MASK[rip]
	mov	DWORD PTR 12[rsp], edx
	call	unlikely@PLT
	mov	edx, DWORD PTR 12[rsp]
	test	rax, rax
	je	.L6
	add	DWORD PTR 28[rbp], 1
	test	DWORD PTR DMADESC_OVSIZE_MASK[rip], edx
	je	.L7
	add	DWORD PTR 24[rbp], 1
.L7:
	test	DWORD PTR DMADESC_CRC_MASK[rip], edx
	je	.L8
	add	DWORD PTR 20[rbp], 1
.L8:
	test	DWORD PTR DMADESC_UNDER_MASK[rip], edx
	je	.L9
	add	DWORD PTR 16[rbp], 1
.L9:
	test	DWORD PTR DMADESC_OV_MASK[rip], edx
	je	.L5
	add	DWORD PTR 12[rbp], 1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	test	r12d, r12d
	jne	.L14
	mov	eax, DWORD PTR [r15]
	test	eax, eax
	jne	.L1
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	bcm_enet_receive_queue, .-bcm_enet_receive_queue
	.comm	copybreak,4,4
	.comm	ENETDMAC_CHANCFG,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	DMADESC_UNDER_MASK,4,4
	.comm	DMADESC_OWNER_MASK,4,4
	.comm	DMADESC_OV_MASK,4,4
	.comm	DMADESC_OVSIZE_MASK,4,4
	.comm	DMADESC_LENGTH_SHIFT,4,4
	.comm	DMADESC_LENGTH_MASK,4,4
	.comm	DMADESC_ESOP_MASK,4,4
	.comm	DMADESC_ERR_MASK,4,4
	.comm	DMADESC_CRC_MASK,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_bcm63xx_enet.c_bcm_enet_receive_queue.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bcm_enet_receive_queue, %function
bcm_enet_receive_queue:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r5, r1
	mov	r8, r0
	bl	netdev_priv
	ldr	r1, [r0]
	mov	r4, r0
	cmp	r5, r1
	movlt	r3, r5
	movge	r3, r1
	str	r3, [sp]
	ldr	r3, [r0, #32]
	mov	r9, #0
	ldr	fp, .L36
	str	r3, [sp, #4]
	b	.L13
.L4:
	ldr	r3, [r4, #40]
	cmp	r3, #0
	beq	.L35
.L6:
	ldr	r3, .L36+4
	ldr	r5, [r3]
	ldr	r3, .L36+8
	and	r5, r5, r10
	ldr	r3, [r3]
	asr	r5, r5, r3
	ldr	r3, .L36+12
	sub	r5, r5, #4
	ldr	r2, [r3]
	ldr	r3, [r4, #24]
	cmp	r2, r5
	ldr	r10, [r3, r7, lsl #2]
	bls	.L10
	mov	r1, r5
	add	r0, r4, #36
	bl	napi_alloc_skb
	subs	r7, r0, #0
	beq	.L33
	ldr	r3, .L36+16
	mov	r2, r5
	ldr	r3, [r3]
	ldr	r1, [r6, #4]
	ldr	r0, [sp, #4]
	bl	dma_sync_single_for_cpu
	ldr	r1, [r10, #4]
	mov	r2, r5
	ldr	r0, [r7, #4]
	bl	memcpy
	ldr	r3, .L36+16
	mov	r2, r5
	ldr	r1, [r6, #4]
	ldr	r3, [r3]
	ldr	r0, [sp, #4]
	mov	r10, r7
	bl	dma_sync_single_for_device
.L12:
	mov	r1, r5
	mov	r0, r10
	bl	skb_put
	mov	r1, r8
	mov	r0, r10
	bl	eth_type_trans
	ldr	r2, [r8, #4]
	ldr	r3, [r8]
	add	r2, r2, #1
	add	r5, r3, r5
	str	r0, [r10]
	mov	r0, r10
	str	r2, [r8, #4]
	str	r5, [r8]
	bl	netif_receive_skb
.L5:
	ldr	r3, [sp]
	sub	r3, r3, r9
	cmp	r3, #0
	ble	.L14
.L13:
	ldr	r7, [r4, #4]
	ldr	r6, [r4, #44]
	bl	rmb
	ldr	r10, [r6, r7, lsl #3]
	ldr	r3, [fp]
	add	r6, r6, r7, lsl #3
	ands	r3, r10, r3
	bne	.L2
	ldr	r2, [r4, #4]
	ldr	r1, [r4, #8]
	add	r2, r2, #1
	cmp	r2, r1
	movne	r3, r2
	ldr	r2, .L36+20
	ldr	r0, [r4, #12]
	ldr	r1, [r2]
	ldr	r2, [r4]
	asr	r1, r1, r0
	sub	r2, r2, #1
	bics	r1, r1, r10
	stm	r4, {r2, r3}
	add	r9, r9, #1
	beq	.L4
.L33:
	ldr	r3, [r8, #8]
	add	r3, r3, #1
	str	r3, [r8, #8]
	ldr	r3, [sp]
	sub	r3, r3, r9
	cmp	r3, #0
	bgt	.L13
.L14:
	mov	r0, r8
	bl	bcm_enet_refill_rx
	ldr	r2, .L36+24
	mov	r0, r4
	ldr	r3, [r4, #16]
	ldr	r2, [r2]
	ldr	r1, [r4, #20]
	bl	enet_dmac_writel
.L1:
	mov	r0, r9
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	ldr	r3, .L36+16
	ldr	r2, [r4, #28]
	ldr	r3, [r3]
	ldr	r1, [r6, #4]
	ldr	r0, [r4, #32]
	bl	dma_unmap_single
	mov	r2, #0
	ldr	r3, [r4, #24]
	str	r2, [r3, r7, lsl #2]
	b	.L12
.L35:
	ldr	r3, .L36+28
	ldr	r0, [r3]
	and	r0, r0, r10
	bl	unlikely
	cmp	r0, #0
	beq	.L6
	ldr	r2, .L36+32
	ldr	r3, [r8, #28]
	ldr	r2, [r2]
	add	r3, r3, #1
	tst	r10, r2
	str	r3, [r8, #28]
	ldrne	r3, [r8, #24]
	addne	r3, r3, #1
	strne	r3, [r8, #24]
	ldr	r3, .L36+36
	ldr	r3, [r3]
	tst	r10, r3
	ldrne	r3, [r8, #20]
	addne	r3, r3, #1
	strne	r3, [r8, #20]
	ldr	r3, .L36+40
	ldr	r3, [r3]
	tst	r10, r3
	ldrne	r3, [r8, #16]
	addne	r3, r3, #1
	strne	r3, [r8, #16]
	ldr	r3, .L36+44
	ldr	r3, [r3]
	tst	r10, r3
	ldrne	r3, [r8, #12]
	addne	r3, r3, #1
	strne	r3, [r8, #12]
	b	.L5
.L2:
	cmp	r9, #0
	bne	.L14
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L1
	b	.L14
.L37:
	.align	2
.L36:
	.word	DMADESC_OWNER_MASK
	.word	DMADESC_LENGTH_MASK
	.word	DMADESC_LENGTH_SHIFT
	.word	copybreak
	.word	DMA_FROM_DEVICE
	.word	DMADESC_ESOP_MASK
	.word	ENETDMAC_CHANCFG
	.word	DMADESC_ERR_MASK
	.word	DMADESC_OVSIZE_MASK
	.word	DMADESC_CRC_MASK
	.word	DMADESC_UNDER_MASK
	.word	DMADESC_OV_MASK
	.size	bcm_enet_receive_queue, .-bcm_enet_receive_queue
	.comm	copybreak,4,4
	.comm	ENETDMAC_CHANCFG,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	DMADESC_UNDER_MASK,4,4
	.comm	DMADESC_OWNER_MASK,4,4
	.comm	DMADESC_OV_MASK,4,4
	.comm	DMADESC_OVSIZE_MASK,4,4
	.comm	DMADESC_LENGTH_SHIFT,4,4
	.comm	DMADESC_LENGTH_MASK,4,4
	.comm	DMADESC_ESOP_MASK,4,4
	.comm	DMADESC_ERR_MASK,4,4
	.comm	DMADESC_CRC_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
