	.file	"extr_greth.c_greth_rx_gbit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Could not create DMA mapping, dropping packet\n"
	.align 8
.LC1:
	.string	"Could not allocate SKB, dropping packet\n"
	.text
	.p2align 4
	.type	greth_rx_gbit, @function
greth_rx_gbit:
.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
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	DWORD PTR 16[rsp], esi
	call	netdev_priv@PLT
	test	r14d, r14d
	jle	.L18
	mov	rbx, rax
	xor	r15d, r15d
	movsx	rax, DWORD PTR [rax]
	lea	r14, 4[rbx]
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L41:
	add	DWORD PTR 24[r13], 1
.L15:
	add	DWORD PTR 8[r13], 1
.L12:
	mov	r12d, DWORD PTR GRETH_BD_EN[rip]
	movsx	rax, DWORD PTR [rbx]
	or	r12d, DWORD PTR GRETH_BD_IE[rip]
	cmp	rax, QWORD PTR GRETH_RXBD_NUM_MASK[rip]
	jne	.L16
	or	r12d, DWORD PTR GRETH_BD_WR[rip]
.L16:
	xor	eax, eax
	add	r15d, 1
	call	wmb@PLT
	mov	rdi, rbp
	mov	esi, r12d
	xor	ebp, ebp
	call	greth_write_bd@PLT
	mov	rsi, rbp
	mov	rdi, r14
	call	spin_lock_irqsave@PLT
	mov	rdi, rbx
	call	greth_enable_rx@PLT
	mov	rsi, rbp
	mov	rdi, r14
	call	spin_unlock_irqrestore@PLT
	movsx	rdi, DWORD PTR [rbx]
	call	NEXT_RX@PLT
	mov	rdx, rax
	cdqe
	mov	DWORD PTR [rbx], edx
	cmp	DWORD PTR 16[rsp], r15d
	je	.L1
.L17:
	mov	rdx, QWORD PTR 32[rbx]
	mov	esi, DWORD PTR GRETH_INT_RE[rip]
	or	esi, DWORD PTR GRETH_INT_RX[rip]
	lea	rbp, [rdx+rax*8]
	mov	rdx, QWORD PTR 16[rbx]
	mov	rax, QWORD PTR [rdx+rax*8]
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR [rax]
	call	GRETH_REGSAVE@PLT
	xor	eax, eax
	call	mb@PLT
	mov	rdi, rbp
	call	greth_read_bd@PLT
	mov	r12d, eax
	test	DWORD PTR GRETH_BD_EN[rip], eax
	jne	.L1
	mov	edi, DWORD PTR GRETH_RXBD_STATUS[rip]
	and	edi, eax
	call	unlikely@PLT
	test	rax, rax
	je	.L3
	test	DWORD PTR GRETH_RXBD_ERR_FT[rip], r12d
	jne	.L41
	mov	eax, DWORD PTR GRETH_RXBD_ERR_AE[rip]
	or	eax, DWORD PTR GRETH_RXBD_ERR_OE[rip]
	or	eax, DWORD PTR GRETH_RXBD_ERR_LE[rip]
	test	eax, r12d
	je	.L6
	add	DWORD PTR 20[r13], 1
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rsi, QWORD PTR NET_IP_ALIGN[rip]
	mov	rdi, r13
	add	rsi, QWORD PTR MAX_FRAME_SIZE[rip]
	call	netdev_alloc_skb@PLT
	test	rax, rax
	je	.L7
	mov	rsi, QWORD PTR NET_IP_ALIGN[rip]
	mov	rdi, rax
	mov	QWORD PTR 8[rsp], rax
	call	skb_reserve@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	edi, DWORD PTR 8[rbx]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	rdx, QWORD PTR NET_IP_ALIGN[rip]
	mov	esi, DWORD PTR 8[rax]
	add	rdx, QWORD PTR MAX_FRAME_SIZE[rip]
	call	dma_map_single@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	esi, eax
	mov	DWORD PTR 40[rsp], eax
	call	dma_mapping_error@PLT
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR GRETH_BD_LEN[rip]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	rdx, QWORD PTR NET_IP_ALIGN[rip]
	add	rdx, QWORD PTR MAX_FRAME_SIZE[rip]
	and	eax, r12d
	mov	DWORD PTR 44[rsp], ecx
	mov	DWORD PTR 20[rsp], eax
	lea	rax, 4[rbp]
	mov	rdi, rax
	mov	QWORD PTR 32[rsp], rdx
	mov	QWORD PTR 24[rsp], rax
	call	greth_read_bd@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	ecx, DWORD PTR 44[rsp]
	mov	rdx, QWORD PTR 32[rsp]
	mov	esi, eax
	call	dma_unmap_single@PLT
	mov	rdi, rbx
	call	netif_msg_pktdata@PLT
	test	rax, rax
	jne	.L42
.L9:
	mov	esi, DWORD PTR 20[rsp]
	mov	rdi, QWORD PTR [rsp]
	call	skb_put@PLT
	mov	eax, DWORD PTR 0[r13]
	test	DWORD PTR NETIF_F_RXCSUM[rip], eax
	je	.L10
	mov	edi, r12d
	call	hw_checksummed@PLT
	test	rax, rax
	je	.L10
	mov	eax, DWORD PTR CHECKSUM_UNNECESSARY[rip]
	mov	rcx, QWORD PTR [rsp]
	mov	DWORD PTR 4[rcx], eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, QWORD PTR [rsp]
	call	skb_checksum_none_assert@PLT
.L11:
	mov	r12, QWORD PTR [rsp]
	mov	rsi, r13
	mov	rdi, r12
	call	eth_type_trans@PLT
	mov	rdi, r12
	mov	DWORD PTR [r12], eax
	mov	eax, DWORD PTR 20[rsp]
	add	DWORD PTR 12[r13], 1
	add	DWORD PTR 4[r13], eax
	call	netif_receive_skb@PLT
	movsx	rdx, DWORD PTR [rbx]
	mov	rax, QWORD PTR 16[rbx]
	mov	rcx, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR 40[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	mov	QWORD PTR [rax+rdx*8], rcx
	call	greth_write_bd@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L7:
	xor	eax, eax
	call	net_ratelimit@PLT
	test	rax, rax
	je	.L15
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC1[rip]
	call	dev_warn@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L6:
	test	DWORD PTR GRETH_RXBD_ERR_CRC[rip], r12d
	je	.L3
	add	DWORD PTR 16[r13], 1
	jmp	.L15
.L18:
	xor	r15d, r15d
.L1:
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L8:
	.cfi_restore_state
	xor	eax, eax
	call	net_ratelimit@PLT
	test	rax, rax
	jne	.L43
.L13:
	mov	rdi, QWORD PTR 8[rsp]
	call	dev_kfree_skb@PLT
	add	DWORD PTR 8[r13], 1
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L42:
	mov	rdi, QWORD PTR 24[rsp]
	call	greth_read_bd@PLT
	mov	edi, eax
	call	phys_to_virt@PLT
	mov	esi, DWORD PTR 20[rsp]
	mov	edi, eax
	call	greth_print_rx_packet@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC0[rip]
	call	dev_warn@PLT
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	greth_rx_gbit, .-greth_rx_gbit
	.comm	NET_IP_ALIGN,8,8
	.comm	NETIF_F_RXCSUM,4,4
	.comm	MAX_FRAME_SIZE,8,8
	.comm	GRETH_RXBD_STATUS,4,4
	.comm	GRETH_RXBD_NUM_MASK,8,8
	.comm	GRETH_RXBD_ERR_OE,4,4
	.comm	GRETH_RXBD_ERR_LE,4,4
	.comm	GRETH_RXBD_ERR_FT,4,4
	.comm	GRETH_RXBD_ERR_CRC,4,4
	.comm	GRETH_RXBD_ERR_AE,4,4
	.comm	GRETH_INT_RX,4,4
	.comm	GRETH_INT_RE,4,4
	.comm	GRETH_BD_WR,4,4
	.comm	GRETH_BD_LEN,4,4
	.comm	GRETH_BD_IE,4,4
	.comm	GRETH_BD_EN,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	CHECKSUM_UNNECESSARY,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_greth.c_greth_rx_gbit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Could not create DMA mapping, dropping packet\012\000"
	.align	2
.LC1:
	.ascii	"Could not allocate SKB, dropping packet\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	greth_rx_gbit, %function
greth_rx_gbit:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r1
	sub	sp, sp, #28
	mov	r8, r0
	str	r1, [sp]
	bl	netdev_priv
	cmp	r4, #0
	ble	.L18
	mov	r4, r0
	mov	fp, #0
	ldr	r3, [r0]
	ldr	r10, .L44
	ldr	r9, .L44+4
	b	.L17
.L41:
	ldr	r3, [r8, #24]
	add	r3, r3, #1
	str	r3, [r8, #24]
.L15:
	ldr	r3, [r8, #8]
	add	r3, r3, #1
	str	r3, [r8, #8]
.L12:
	mov	r7, #0
	ldr	r3, .L44+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	ldr	r1, .L44+12
	cmp	r2, r3
	ldreq	r3, .L44+16
	ldr	r1, [r1]
	ldr	r5, [r9]
	ldreq	r3, [r3]
	orr	r5, r5, r1
	orreq	r5, r5, r3
	bl	wmb
	mov	r1, r5
	mov	r0, r6
	add	r5, r4, #4
	bl	greth_write_bd
	mov	r1, r7
	mov	r0, r5
	bl	spin_lock_irqsave
	mov	r0, r4
	bl	greth_enable_rx
	mov	r1, r7
	mov	r0, r5
	bl	spin_unlock_irqrestore
	ldr	r0, [r4]
	bl	NEXT_RX
	ldr	r2, [sp]
	add	fp, fp, #1
	cmp	r2, fp
	mov	r3, r0
	str	r0, [r4]
	beq	.L1
.L17:
	ldr	r2, .L44+20
	ldr	ip, [r10]
	ldr	r1, [r2]
	ldr	r6, [r4, #20]
	ldr	r0, [r4, #16]
	ldr	r2, [r4, #12]
	add	r6, r6, r3, lsl #3
	orr	r1, ip, r1
	ldr	r0, [r0]
	ldr	r7, [r2, r3, lsl #2]
	bl	GRETH_REGSAVE
	bl	mb
	mov	r0, r6
	bl	greth_read_bd
	ldr	r3, [r9]
	mov	r5, r0
	tst	r0, r3
	bne	.L1
	ldr	r3, .L44+24
	ldr	r0, [r3]
	and	r0, r0, r5
	bl	unlikely
	cmp	r0, #0
	beq	.L3
	ldr	r3, .L44+28
	ldr	r3, [r3]
	tst	r5, r3
	bne	.L41
	ldr	r3, .L44+32
	ldr	r1, .L44+36
	ldr	r2, .L44+40
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r3, r3, r2
	tst	r3, r5
	beq	.L6
	ldr	r3, [r8, #20]
	add	r3, r3, #1
	str	r3, [r8, #20]
	b	.L15
.L3:
	ldr	r3, .L44+44
	mov	r0, r8
	ldr	r1, [r3]
	ldr	r3, .L44+48
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	netdev_alloc_skb
	subs	r1, r0, #0
	str	r1, [sp, #4]
	beq	.L7
	ldr	r3, .L44+48
	ldr	r1, [r3]
	bl	skb_reserve
	ldr	r2, .L44+44
	ldr	r3, .L44+48
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r0, .L44+52
	add	r2, r1, r2
	ldr	r1, [sp, #4]
	ldr	r3, [r0]
	ldr	r1, [r1, #8]
	ldr	r0, [r4, #8]
	bl	dma_map_single
	mov	r1, r0
	str	r0, [sp, #12]
	ldr	r0, [r4, #8]
	bl	dma_mapping_error
	cmp	r0, #0
	bne	.L8
	ldr	r3, .L44+56
	ldr	r2, [r4, #8]
	ldr	r3, [r3]
	add	r1, r6, #4
	mov	r0, r1
	str	r1, [sp, #16]
	and	r1, r5, r3
	str	r1, [sp, #8]
	str	r2, [sp, #20]
	bl	greth_read_bd
	ldr	r2, .L44+44
	ldr	r3, .L44+48
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r2, [sp, #20]
	mov	r1, r0
	mov	r0, r2
	add	r2, ip, r3
	ldr	r3, .L44+52
	ldr	r3, [r3]
	bl	dma_unmap_single
	mov	r0, r4
	bl	netif_msg_pktdata
	cmp	r0, #0
	bne	.L42
.L9:
	mov	r0, r7
	ldr	r1, [sp, #8]
	bl	skb_put
	ldr	r3, .L44+60
	ldr	r2, [r8]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L10
	mov	r0, r5
	bl	hw_checksummed
	cmp	r0, #0
	ldrne	r3, .L44+64
	ldrne	r3, [r3]
	strne	r3, [r7, #4]
	bne	.L11
.L10:
	mov	r0, r7
	bl	skb_checksum_none_assert
.L11:
	mov	r1, r8
	mov	r0, r7
	bl	eth_type_trans
	ldr	r2, [r8, #12]
	ldr	r3, [r8, #4]
	ldr	r1, [sp, #8]
	add	r2, r2, #1
	add	r3, r3, r1
	str	r0, [r7]
	str	r2, [r8, #12]
	str	r3, [r8, #4]
	mov	r0, r7
	bl	netif_receive_skb
	ldr	r2, [r4]
	ldr	r3, [r4, #12]
	ldr	ip, [sp, #4]
	ldr	r1, [sp, #12]
	ldr	r0, [sp, #16]
	str	ip, [r3, r2, lsl #2]
	bl	greth_write_bd
	b	.L12
.L7:
	bl	net_ratelimit
	cmp	r0, #0
	beq	.L15
	ldr	r1, .L44+68
	ldr	r0, [r4, #8]
	bl	dev_warn
	b	.L15
.L6:
	ldr	r3, .L44+72
	ldr	r3, [r3]
	tst	r5, r3
	beq	.L3
	ldr	r3, [r8, #16]
	add	r3, r3, #1
	str	r3, [r8, #16]
	b	.L15
.L18:
	mov	fp, #0
.L1:
	mov	r0, fp
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	bl	net_ratelimit
	cmp	r0, #0
	bne	.L43
.L13:
	ldr	r0, [sp, #4]
	bl	dev_kfree_skb
	ldr	r3, [r8, #8]
	add	r3, r3, #1
	str	r3, [r8, #8]
	b	.L12
.L42:
	ldr	r0, [sp, #16]
	bl	greth_read_bd
	bl	phys_to_virt
	ldr	r1, [sp, #8]
	bl	greth_print_rx_packet
	b	.L9
.L43:
	ldr	r1, .L44+76
	ldr	r0, [r4, #8]
	bl	dev_warn
	b	.L13
.L45:
	.align	2
.L44:
	.word	GRETH_INT_RE
	.word	GRETH_BD_EN
	.word	GRETH_RXBD_NUM_MASK
	.word	GRETH_BD_IE
	.word	GRETH_BD_WR
	.word	GRETH_INT_RX
	.word	GRETH_RXBD_STATUS
	.word	GRETH_RXBD_ERR_FT
	.word	GRETH_RXBD_ERR_AE
	.word	GRETH_RXBD_ERR_OE
	.word	GRETH_RXBD_ERR_LE
	.word	MAX_FRAME_SIZE
	.word	NET_IP_ALIGN
	.word	DMA_FROM_DEVICE
	.word	GRETH_BD_LEN
	.word	NETIF_F_RXCSUM
	.word	CHECKSUM_UNNECESSARY
	.word	.LC1
	.word	GRETH_RXBD_ERR_CRC
	.word	.LC0
	.size	greth_rx_gbit, .-greth_rx_gbit
	.comm	NET_IP_ALIGN,4,4
	.comm	NETIF_F_RXCSUM,4,4
	.comm	MAX_FRAME_SIZE,4,4
	.comm	GRETH_RXBD_STATUS,4,4
	.comm	GRETH_RXBD_NUM_MASK,4,4
	.comm	GRETH_RXBD_ERR_OE,4,4
	.comm	GRETH_RXBD_ERR_LE,4,4
	.comm	GRETH_RXBD_ERR_FT,4,4
	.comm	GRETH_RXBD_ERR_CRC,4,4
	.comm	GRETH_RXBD_ERR_AE,4,4
	.comm	GRETH_INT_RX,4,4
	.comm	GRETH_INT_RE,4,4
	.comm	GRETH_BD_WR,4,4
	.comm	GRETH_BD_LEN,4,4
	.comm	GRETH_BD_IE,4,4
	.comm	GRETH_BD_EN,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	CHECKSUM_UNNECESSARY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
