	.file	"extr_3c589_cs.c_el3_rx.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"in rx_packet(), status %4.4x, rx_status %4.4x.\n"
	.align 8
.LC1:
	.string	"    Receiving packet size %d status %4.4x.\n"
	.align 8
.LC2:
	.string	"couldn't allocate a sk_buff of size %d.\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"too much work in el3_rx!\n"
	.text
	.p2align 4
	.type	el3_rx, @function
el3_rx:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, 32
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r12d, DWORD PTR [rdi]
	mov	rdi, QWORD PTR RX_STATUS[rip]
	add	rdi, r12
	call	inw@PLT
	mov	rdi, QWORD PTR EL3_STATUS[rip]
	mov	ebx, eax
	add	rdi, r12
	call	inw@PLT
	movsx	ecx, bx
	lea	rsi, .LC0[rip]
	mov	rdi, r15
	movsx	edx, ax
	xor	eax, eax
	call	netdev_dbg@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L30:
	mov	eax, ebx
	add	DWORD PTR 32[r15], 1
	and	ax, 14336
	cmp	ax, 6144
	je	.L4
	jg	.L5
	cmp	ax, 2048
	je	.L4
	cmp	ax, 4096
	jne	.L29
.L6:
	add	DWORD PTR 20[r15], 1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	esi, DWORD PTR RxDiscard[rip]
	mov	rdi, r15
	call	tc589_wait_for_completion@PLT
.L2:
	mov	rdi, QWORD PTR RX_STATUS[rip]
	add	rdi, r12
	call	inw@PLT
	mov	ebx, eax
	test	ax, ax
	js	.L11
	test	ebp, ebp
	je	.L13
	sub	ebp, 1
	test	bh, 64
	jne	.L30
	mov	r13d, ebx
	mov	rdi, r15
	and	r13w, 2047
	lea	esi, 5[r13]
	movzx	esi, si
	call	netdev_alloc_skb@PLT
	mov	WORD PTR 14[rsp], r13w
	movsx	r13d, r13w
	movsx	ecx, bx
	mov	r14, rax
	mov	edx, r13d
	xor	eax, eax
	mov	rdi, r15
	lea	rsi, .LC1[rip]
	call	netdev_dbg@PLT
	test	r14, r14
	je	.L10
	mov	esi, 2
	mov	rdi, r14
	call	skb_reserve@PLT
	mov	esi, r13d
	mov	rdi, r14
	call	skb_put@PLT
	mov	rdi, QWORD PTR RX_FIFO[rip]
	lea	edx, 3[r13]
	sar	edx, 2
	mov	esi, eax
	add	rdi, r12
	call	insl@PLT
	mov	rsi, r15
	mov	rdi, r14
	call	eth_type_trans@PLT
	mov	rdi, r14
	mov	DWORD PTR [r14], eax
	call	netif_rx@PLT
	movzx	r13d, WORD PTR 14[rsp]
	add	DWORD PTR 12[r15], 1
	add	WORD PTR 4[r15], r13w
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L29:
	test	ax, ax
	jne	.L8
	add	DWORD PTR 28[r15], 1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	ax, 8192
	je	.L6
	cmp	ax, 10240
	jne	.L8
	add	DWORD PTR 16[r15], 1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	add	DWORD PTR 24[r15], 1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edx, r13d
	lea	rsi, .LC2[rip]
	mov	rdi, r15
	xor	eax, eax
	call	netdev_dbg@PLT
	add	DWORD PTR 8[r15], 1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L11:
	test	ebp, ebp
	je	.L13
.L14:
	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
.L13:
	.cfi_restore_state
	lea	rsi, .LC3[rip]
	mov	rdi, r15
	call	netdev_warn@PLT
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	el3_rx, .-el3_rx
	.comm	RxDiscard,4,4
	.comm	RX_STATUS,8,8
	.comm	RX_FIFO,8,8
	.comm	EL3_STATUS,8,8
	.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_3c589_cs.c_el3_rx.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"in rx_packet(), status %4.4x, rx_status %4.4x.\012\000"
	.align	2
.LC1:
	.ascii	"    Receiving packet size %d status %4.4x.\012\000"
	.align	2
.LC2:
	.ascii	"couldn't allocate a sk_buff of size %d.\012\000"
	.align	2
.LC3:
	.ascii	"too much work in el3_rx!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	el3_rx, %function
el3_rx:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L31
	ldr	r8, [r0]
	mov	r4, r0
	ldr	r0, [r3]
	sub	sp, sp, #12
	add	r0, r8, r0
	bl	inw
	ldr	r10, .L31+4
	mov	r5, r0
	ldr	r3, [r10]
	ldr	fp, .L31+8
	add	r0, r8, r3
	bl	inw
	mov	r2, r5
	mov	r3, r0
	ldr	r1, .L31+12
	mov	r0, r4
	bl	netdev_dbg
	mov	r5, #32
	b	.L2
.L30:
	ldr	r2, [r4, #32]
	and	r3, r3, #14336
	add	r2, r2, #1
	cmp	r3, #6144
	str	r2, [r4, #32]
	beq	.L4
	bgt	.L5
	cmp	r3, #2048
	beq	.L4
	cmp	r3, #4096
	bne	.L29
.L6:
	ldr	r3, [r4, #20]
	add	r3, r3, #1
	str	r3, [r4, #20]
.L8:
	mov	r0, r4
	ldr	r1, [fp]
	bl	tc589_wait_for_completion
.L2:
	ldr	r0, [r10]
	add	r0, r8, r0
	bl	inw
	subs	r3, r0, #0
	blt	.L11
	cmp	r5, #0
	beq	.L13
	tst	r3, #16384
	sub	r5, r5, #1
	bne	.L30
	lsl	r7, r3, #21
	lsr	r7, r7, #21
	add	r1, r7, #5
	mov	r0, r4
	str	r3, [sp, #4]
	bl	netdev_alloc_skb
	mov	r6, r0
	mov	r2, r7
	mov	r0, r4
	ldr	r3, [sp, #4]
	ldr	r1, .L31+16
	bl	netdev_dbg
	cmp	r6, #0
	beq	.L10
	mov	r1, #2
	mov	r0, r6
	bl	skb_reserve
	ldr	r3, .L31+20
	mov	r1, r7
	ldr	r3, [r3]
	mov	r0, r6
	add	r3, r8, r3
	str	r3, [sp, #4]
	bl	skb_put
	ldr	r3, [sp, #4]
	add	r2, r7, #3
	lsr	r2, r2, #2
	mov	r1, r0
	mov	r0, r3
	bl	insl
	mov	r1, r4
	mov	r0, r6
	bl	eth_type_trans
	mov	r3, r0
	mov	r0, r6
	str	r3, [r6]
	bl	netif_rx
	ldr	r3, [r4, #12]
	ldrh	r2, [r4, #4]
	add	r3, r3, #1
	add	r9, r7, r2
	str	r3, [r4, #12]
	strh	r9, [r4, #4]	@ movhi
	b	.L8
.L29:
	cmp	r3, #0
	ldreq	r3, [r4, #28]
	addeq	r3, r3, #1
	streq	r3, [r4, #28]
	b	.L8
.L5:
	cmp	r3, #8192
	beq	.L6
	cmp	r3, #10240
	ldreq	r3, [r4, #16]
	addeq	r3, r3, #1
	streq	r3, [r4, #16]
	b	.L8
.L4:
	ldr	r3, [r4, #24]
	add	r3, r3, #1
	str	r3, [r4, #24]
	b	.L8
.L10:
	mov	r2, r7
	mov	r0, r4
	ldr	r1, .L31+24
	bl	netdev_dbg
	ldr	r3, [r4, #8]
	add	r3, r3, #1
	str	r3, [r4, #8]
	b	.L8
.L11:
	cmp	r5, #0
	beq	.L13
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	mov	r0, r4
	ldr	r1, .L31+28
	bl	netdev_warn
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	.align	2
.L31:
	.word	EL3_STATUS
	.word	RX_STATUS
	.word	RxDiscard
	.word	.LC0
	.word	.LC1
	.word	RX_FIFO
	.word	.LC2
	.word	.LC3
	.size	el3_rx, .-el3_rx
	.comm	RxDiscard,4,4
	.comm	RX_STATUS,4,4
	.comm	RX_FIFO,4,4
	.comm	EL3_STATUS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
