	.file	"extr_sh_eth.c_sh_eth_rx.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sh_eth_rx, @function
sh_eth_rx:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	netdev_priv@PLT
	mov	r13d, DWORD PTR RX_RING_SIZE[rip]
	mov	ecx, DWORD PTR [rax]
	mov	rbx, rax
	mov	eax, ecx
	cdq
	idiv	r13d
	add	r13d, DWORD PTR 4[rbx]
	sub	r13d, ecx
	movsx	rax, edx
	lea	rdx, [rax+rax*2]
	mov	r14, rax
	mov	rax, QWORD PTR 24[rbx]
	lea	rbp, [rax+rdx*8]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L47:
	add	DWORD PTR 64[rbx], 1
	test	r10d, eax
	je	.L9
	add	DWORD PTR 60[rbx], 1
.L9:
	test	r9d, eax
	je	.L10
	add	DWORD PTR 56[rbx], 1
.L10:
	test	r8d, eax
	je	.L11
	add	DWORD PTR 52[rbx], 1
.L11:
	test	edi, eax
	je	.L12
	add	DWORD PTR 52[rbx], 1
.L12:
	test	esi, eax
	je	.L13
	add	DWORD PTR 48[rbx], 1
.L13:
	test	ecx, eax
	je	.L14
	add	DWORD PTR 44[rbx], 1
.L14:
	mov	esi, DWORD PTR RD_RACT[rip]
	mov	rdi, rbx
	call	cpu_to_edmac@PLT
	or	DWORD PTR 0[rbp], eax
	mov	eax, DWORD PTR [rbx]
	add	eax, 1
	cdq
	mov	DWORD PTR [rbx], eax
	idiv	DWORD PTR RX_RING_SIZE[rip]
	movsx	r14, edx
	movsx	rax, r14d
	lea	rdx, [rax+rax*2]
	mov	rax, QWORD PTR 24[rbx]
	lea	rbp, [rax+rdx*8]
.L2:
	mov	esi, DWORD PTR RD_RACT[rip]
	mov	r15d, DWORD PTR 0[rbp]
	mov	rdi, rbx
	call	cpu_to_edmac@PLT
	test	r15d, eax
	jne	.L17
	mov	esi, DWORD PTR 0[rbp]
	mov	rdi, rbx
	call	edmac_to_cpu@PLT
	mov	r15, QWORD PTR 16[rbp]
	sub	r13d, 1
	js	.L17
	test	DWORD PTR RDFEND[rip], eax
	jne	.L7
	add	DWORD PTR 52[rbx], 1
.L7:
	mov	r10d, DWORD PTR RD_RFS1[rip]
	mov	r9d, DWORD PTR RD_RFS2[rip]
	mov	r8d, DWORD PTR RD_RFS3[rip]
	mov	edi, DWORD PTR RD_RFS4[rip]
	mov	edx, r10d
	mov	esi, DWORD PTR RD_RFS6[rip]
	mov	ecx, DWORD PTR RD_RFS10[rip]
	or	edx, r9d
	or	edx, r8d
	or	edx, edi
	or	edx, DWORD PTR RD_RFS5[rip]
	or	edx, esi
	or	edx, ecx
	test	edx, eax
	jne	.L47
	mov	rax, QWORD PTR 72[rbx]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L48
.L15:
	mov	rdx, QWORD PTR 16[rbx]
	mov	rsi, r15
	lea	rax, [rdx+r14*8]
	mov	r14, QWORD PTR [rax]
	mov	QWORD PTR [rax], 0
	mov	rdi, r14
	call	skb_put@PLT
	mov	rsi, r12
	mov	rdi, r14
	call	eth_type_trans@PLT
	mov	rdi, r14
	mov	DWORD PTR 20[r14], eax
	call	netif_rx@PLT
	add	DWORD PTR 40[rbx], 1
	add	QWORD PTR 32[rbx], r15
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L48:
	mov	edi, DWORD PTR 4[rbp]
	mov	esi, 4
	call	ALIGN@PLT
	mov	edi, eax
	call	phys_to_virt@PLT
	lea	esi, 2[r15]
	mov	edi, eax
	call	sh_eth_soft_swap@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L17:
	mov	eax, DWORD PTR 4[rbx]
	mov	edx, DWORD PTR [rbx]
	lea	rcx, 8[r12]
	mov	QWORD PTR 8[rsp], rcx
	sub	edx, eax
	test	edx, edx
	jg	.L4
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L50:
	or	esi, DWORD PTR RD_RDEL[rip]
	mov	rdi, rbx
	call	cpu_to_edmac@PLT
	or	DWORD PTR [r14], eax
.L21:
	mov	eax, DWORD PTR 4[rbx]
	mov	edx, DWORD PTR [rbx]
	add	eax, 1
	sub	edx, eax
	mov	DWORD PTR 4[rbx], eax
	test	edx, edx
	jle	.L19
.L4:
	cdq
	mov	edi, DWORD PTR 8[rbx]
	mov	esi, 16
	idiv	DWORD PTR RX_RING_SIZE[rip]
	mov	rax, QWORD PTR 24[rbx]
	movsx	r15, edx
	lea	rdx, [r15+r15*2]
	mov	r13, r15
	lea	r14, [rax+rdx*8]
	call	ALIGN@PLT
	mov	DWORD PTR 8[r14], eax
	mov	rax, QWORD PTR 16[rbx]
	cmp	QWORD PTR [rax+r15*8], 0
	je	.L49
.L18:
	mov	eax, DWORD PTR RX_RING_SIZE[rip]
	mov	esi, DWORD PTR RD_RACT[rip]
	or	esi, DWORD PTR RD_RFP[rip]
	sub	eax, 1
	cmp	eax, r13d
	jle	.L50
	mov	rdi, rbx
	call	cpu_to_edmac@PLT
	or	DWORD PTR [r14], eax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L49:
	mov	edi, DWORD PTR 8[rbx]
	call	dev_alloc_skb@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR 16[rbx]
	mov	QWORD PTR [rax+r15*8], rbp
	test	rbp, rbp
	je	.L19
	mov	edx, DWORD PTR 8[rbx]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	esi, DWORD PTR 16[rbp]
	mov	rdi, QWORD PTR 8[rsp]
	call	dma_map_single@PLT
	mov	QWORD PTR 8[rbp], r12
	mov	rdi, rbp
	call	sh_eth_set_receive_align@PLT
	mov	eax, DWORD PTR CHECKSUM_NONE[rip]
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, 4
	mov	DWORD PTR 4[rbp], eax
	call	PTR_ALIGN@PLT
	mov	edi, eax
	call	virt_to_phys@PLT
	mov	DWORD PTR 4[r14], eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, QWORD PTR EDRRR[rip]
	add	rdi, QWORD PTR [r12]
	call	ctrl_inl@PLT
	mov	edi, DWORD PTR EDRRR_R[rip]
	test	eax, edi
	je	.L51
.L6:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L51:
	.cfi_restore_state
	mov	rsi, QWORD PTR EDRRR[rip]
	add	rsi, QWORD PTR [r12]
	call	ctrl_outl@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	sh_eth_rx, .-sh_eth_rx
	.comm	RX_RING_SIZE,4,4
	.comm	RD_RFS6,4,4
	.comm	RD_RFS5,4,4
	.comm	RD_RFS4,4,4
	.comm	RD_RFS3,4,4
	.comm	RD_RFS2,4,4
	.comm	RD_RFS10,4,4
	.comm	RD_RFS1,4,4
	.comm	RD_RFP,4,4
	.comm	RD_RDEL,4,4
	.comm	RD_RACT,4,4
	.comm	RDFEND,4,4
	.comm	EDRRR_R,4,4
	.comm	EDRRR,8,8
	.comm	DMA_FROM_DEVICE,4,4
	.comm	CHECKSUM_NONE,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_sh_eth.c_sh_eth_rx.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sh_eth_rx, %function
sh_eth_rx:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	str	r0, [sp, #12]
	bl	netdev_priv
	ldr	r7, .L50
	mov	r4, r0
	ldr	r9, [r0]
	ldr	r8, [r7]
	mov	r0, r9
	mov	r1, r8
	bl	__aeabi_idivmod
	ldr	r3, [r4, #4]
	ldr	r5, [r4, #16]
	add	r8, r8, r3
	sub	r3, r8, r9
	mov	r6, r1
	ldr	fp, .L50+4
	str	r3, [sp, #4]
	add	r5, r5, r1, lsl #4
	b	.L2
.L47:
	ldr	r3, [r4, #48]
	tst	r8, r0
	add	r3, r3, #1
	str	r3, [r4, #48]
	ldrne	r3, [r4, #44]
	addne	r3, r3, #1
	strne	r3, [r4, #44]
	tst	lr, r0
	ldrne	r3, [r4, #40]
	addne	r3, r3, #1
	strne	r3, [r4, #40]
	tst	ip, r0
	ldrne	r3, [r4, #36]
	addne	r3, r3, #1
	strne	r3, [r4, #36]
	tst	r1, r0
	ldrne	r3, [r4, #36]
	addne	r3, r3, #1
	strne	r3, [r4, #36]
	ldr	r3, [sp]
	tst	r3, r0
	ldrne	r3, [r4, #32]
	addne	r3, r3, #1
	strne	r3, [r4, #32]
	tst	r9, r0
	ldrne	r3, [r4, #28]
	addne	r3, r3, #1
	strne	r3, [r4, #28]
.L14:
	ldr	r1, [fp]
	mov	r0, r4
	bl	cpu_to_edmac
	ldr	r2, [r5]
	ldr	r3, [r4]
	orr	r2, r2, r0
	add	r0, r3, #1
	str	r2, [r5]
	ldr	r1, [r7]
	str	r0, [r4]
	bl	__aeabi_idivmod
	mov	r6, r1
	ldr	r5, [r4, #16]
	add	r5, r5, r1, lsl #4
.L2:
	mov	r0, r4
	ldr	r1, [fp]
	ldr	r8, [r5]
	bl	cpu_to_edmac
	tst	r8, r0
	bne	.L17
	mov	r0, r4
	ldr	r1, [r5]
	bl	edmac_to_cpu
	ldr	r3, [sp, #4]
	ldr	r10, [r5, #12]
	subs	r3, r3, #1
	str	r3, [sp, #4]
	bmi	.L17
	ldr	r3, .L50+8
	ldr	r2, .L50+12
	ldr	r3, [r3]
	ldr	r2, [r2]
	tst	r0, r3
	ldreq	r3, [r4, #36]
	str	r2, [sp, #8]
	addeq	r3, r3, #1
	streq	r3, [r4, #36]
	ldr	r3, .L50+16
	ldr	r2, .L50+20
	ldr	r8, [r3]
	ldr	r3, .L50+24
	ldr	r1, .L50+28
	ldr	lr, [r3]
	ldr	r3, .L50+32
	ldr	r2, [r2]
	ldr	ip, [r3]
	ldr	r1, [r1]
	orr	r3, r8, lr
	str	r2, [sp]
	orr	r3, r3, ip
	ldr	r2, [sp, #8]
	ldr	r9, .L50+36
	orr	r3, r3, r1
	orr	r3, r3, r2
	ldr	r2, [sp]
	ldr	r9, [r9]
	orr	r3, r3, r2
	orr	r3, r3, r9
	tst	r3, r0
	bne	.L47
	ldr	r3, [r4, #52]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L48
.L15:
	mov	r2, #0
	ldr	r3, [r4, #12]
	mov	r1, r10
	ldr	r8, [r3, r6, lsl #2]
	str	r2, [r3, r6, lsl #2]
	mov	r0, r8
	bl	skb_put
	ldr	r1, [sp, #12]
	mov	r0, r8
	bl	eth_type_trans
	mov	r3, r0
	mov	r0, r8
	str	r3, [r8, #16]
	bl	netif_rx
	ldr	r2, [r4, #24]
	ldr	r3, [r4, #20]
	add	r2, r2, #1
	add	r3, r3, r10
	str	r2, [r4, #24]
	str	r3, [r4, #20]
	b	.L14
.L48:
	mov	r1, #4
	ldr	r0, [r5, #4]
	bl	ALIGN
	bl	phys_to_virt
	add	r1, r10, #2
	bl	sh_eth_soft_swap
	b	.L15
.L17:
	ldr	r0, [r4, #4]
	ldr	r3, [r4]
	sub	r3, r3, r0
	cmp	r3, #0
	ble	.L19
	ldr	r3, [sp, #12]
	ldr	r10, .L50+40
	add	r3, r3, #4
	str	r3, [sp]
	b	.L4
.L18:
	ldr	r3, [r7]
	ldr	r1, [fp]
	sub	r3, r3, #1
	cmp	r3, r5
	ldrle	r3, .L50+44
	ldr	r2, [r10]
	ldrle	r3, [r3]
	orr	r1, r1, r2
	orrle	r1, r1, r3
	movle	r0, r4
	movgt	r0, r4
	bl	cpu_to_edmac
	ldr	r3, [r6, r5, lsl #4]
	orr	r3, r3, r0
	ldr	r0, [r4, #4]
	str	r3, [r6, r5, lsl #4]
	ldr	r3, [r4]
	add	r0, r0, #1
	sub	r3, r3, r0
	cmp	r3, #0
	str	r0, [r4, #4]
	ble	.L19
.L4:
	ldr	r1, [r7]
	bl	__aeabi_idivmod
	mov	r5, r1
	ldr	r0, [r4, #8]
	mov	r1, #16
	ldr	r6, [r4, #16]
	bl	ALIGN
	ldr	r3, [r4, #12]
	add	r8, r6, r5, lsl #4
	ldr	r3, [r3, r5, lsl #2]
	str	r0, [r8, #8]
	cmp	r3, #0
	bne	.L18
	ldr	r0, [r4, #8]
	bl	dev_alloc_skb
	ldr	r3, [r4, #12]
	cmp	r0, #0
	mov	r9, r0
	str	r0, [r3, r5, lsl #2]
	beq	.L19
	ldr	r3, .L50+48
	ldr	r2, [r4, #8]
	ldr	r1, [r0, #12]
	ldr	r3, [r3]
	ldr	r0, [sp]
	bl	dma_map_single
	ldr	r3, [sp, #12]
	mov	r0, r9
	str	r3, [r9, #8]
	bl	sh_eth_set_receive_align
	ldr	r3, .L50+52
	mov	r1, #4
	ldr	r3, [r3]
	ldr	r0, [r9]
	str	r3, [r9, #4]
	bl	PTR_ALIGN
	bl	virt_to_phys
	str	r0, [r8, #4]
	b	.L18
.L19:
	ldr	r3, [sp, #12]
	ldr	r4, .L50+56
	ldr	r0, [r3]
	ldr	r3, [r4]
	add	r0, r0, r3
	bl	ctrl_inl
	ldr	r3, .L50+60
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L49
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L49:
	ldr	r2, [sp, #12]
	mov	r0, r3
	ldr	r1, [r2]
	ldr	r2, [r4]
	add	r1, r1, r2
	bl	ctrl_outl
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L51:
	.align	2
.L50:
	.word	RX_RING_SIZE
	.word	RD_RACT
	.word	RDFEND
	.word	RD_RFS5
	.word	RD_RFS1
	.word	RD_RFS6
	.word	RD_RFS2
	.word	RD_RFS4
	.word	RD_RFS3
	.word	RD_RFS10
	.word	RD_RFP
	.word	RD_RDEL
	.word	DMA_FROM_DEVICE
	.word	CHECKSUM_NONE
	.word	EDRRR
	.word	EDRRR_R
	.size	sh_eth_rx, .-sh_eth_rx
	.comm	RX_RING_SIZE,4,4
	.comm	RD_RFS6,4,4
	.comm	RD_RFS5,4,4
	.comm	RD_RFS4,4,4
	.comm	RD_RFS3,4,4
	.comm	RD_RFS2,4,4
	.comm	RD_RFS10,4,4
	.comm	RD_RFS1,4,4
	.comm	RD_RFP,4,4
	.comm	RD_RDEL,4,4
	.comm	RD_RACT,4,4
	.comm	RDFEND,4,4
	.comm	EDRRR_R,4,4
	.comm	EDRRR,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	CHECKSUM_NONE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
