	.file	"extr_r8169.c_rtl_rx.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Rx ERROR. status = %08x\n"
	.text
	.p2align 4
	.type	rtl_rx, @function
rtl_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
	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
	mov	rbx, rsi
	mov	esi, edx
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r12d, DWORD PTR [rbx]
	mov	edi, DWORD PTR NUM_RX_DESC[rip]
	add	edi, DWORD PTR 4[rbx]
	sub	edi, r12d
	call	min@PLT
	mov	DWORD PTR 16[rsp], eax
	test	eax, eax
	je	.L2
	lea	rax, 24[rbx]
	mov	QWORD PTR 24[rsp], rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L32:
	mov	esi, DWORD PTR rx_err[rip]
	mov	r8d, r15d
	mov	rdx, rbp
	mov	rdi, rbx
	lea	rcx, .LC0[rip]
	call	netif_info@PLT
	mov	eax, DWORD PTR RxRWT[rip]
	add	DWORD PTR 24[rbp], 1
	or	eax, DWORD PTR RxRUNT[rip]
	test	eax, r15d
	je	.L4
	add	DWORD PTR 12[rbp], 1
.L4:
	test	DWORD PTR RxCRC[rip], r15d
	je	.L5
	add	DWORD PTR 20[rbp], 1
.L5:
	test	DWORD PTR RxFOVF[rip], r15d
	jne	.L30
.L6:
	mov	esi, DWORD PTR rx_buf_sz[rip]
	mov	rdi, r13
	call	rtl8169_mark_to_asic@PLT
.L7:
	mov	r14d, DWORD PTR 0[r13]
	mov	edi, 268427264
	call	cpu_to_le32@PLT
	test	r14d, eax
	je	.L14
	mov	rax, QWORD PTR RTL_GIGA_MAC_VER_05[rip]
	cmp	QWORD PTR 16[rbx], rax
	je	.L31
.L14:
	mov	r12d, DWORD PTR 12[rsp]
.L9:
	sub	DWORD PTR 16[rsp], 1
	je	.L2
.L12:
	mov	eax, r12d
	xor	edx, edx
	div	DWORD PTR NUM_RX_DESC[rip]
	mov	rax, QWORD PTR 40[rbx]
	mov	r14, rdx
	lea	rdx, [rdx+rdx*2]
	lea	r13, [rax+rdx*4]
	xor	eax, eax
	call	rmb@PLT
	mov	edi, DWORD PTR 8[r13]
	call	le32_to_cpu@PLT
	and	eax, DWORD PTR 8[rbx]
	mov	r15d, eax
	test	DWORD PTR DescOwn[rip], eax
	jne	.L2
	mov	edi, DWORD PTR RxRES[rip]
	and	edi, eax
	call	unlikely@PLT
	lea	ecx, 1[r12]
	mov	DWORD PTR 12[rsp], ecx
	test	rax, rax
	jne	.L32
	mov	edi, DWORD PTR 4[r13]
	call	le64_to_cpu@PLT
	mov	edi, r15d
	mov	DWORD PTR 20[rsp], eax
	call	rtl8169_fragmented_frame@PLT
	mov	edi, eax
	call	unlikely@PLT
	mov	ecx, DWORD PTR 20[rsp]
	test	rax, rax
	jne	.L33
	mov	eax, r15d
	mov	rsi, rbx
	and	eax, 16383
	lea	edx, -4[rax]
	mov	rax, QWORD PTR 32[rbx]
	mov	DWORD PTR 20[rsp], edx
	mov	edi, DWORD PTR [rax+r14*4]
	call	rtl8169_try_rx_copy@PLT
	mov	esi, DWORD PTR rx_buf_sz[rip]
	mov	rdi, r13
	mov	r14, rax
	call	rtl8169_mark_to_asic@PLT
	test	r14, r14
	je	.L34
	mov	esi, r15d
	mov	rdi, r14
	call	rtl8169_rx_csum@PLT
	mov	esi, DWORD PTR 20[rsp]
	mov	rdi, r14
	call	skb_put@PLT
	mov	rsi, rbp
	mov	rdi, r14
	call	eth_type_trans@PLT
	mov	rdx, r14
	mov	rsi, r13
	mov	rdi, rbx
	mov	DWORD PTR [r14], eax
	call	rtl8169_rx_vlan_skb@PLT
	test	rax, rax
	js	.L35
.L11:
	mov	eax, DWORD PTR 20[rsp]
	add	DWORD PTR 4[rbp], 1
	add	DWORD PTR 0[rbp], eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L30:
	mov	esi, DWORD PTR RTL_FLAG_TASK_RESET_PENDING[rip]
	mov	rdi, rbx
	call	rtl_schedule_task@PLT
	add	DWORD PTR 16[rbp], 1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L33:
	add	DWORD PTR 8[rbp], 1
	mov	esi, DWORD PTR rx_buf_sz[rip]
	mov	rdi, r13
	add	DWORD PTR 12[rbp], 1
	call	rtl8169_mark_to_asic@PLT
	sub	DWORD PTR 16[rsp], 1
	mov	r12d, DWORD PTR 12[rsp]
	jne	.L12
.L2:
	mov	eax, r12d
	sub	eax, DWORD PTR [rbx]
	mov	DWORD PTR [rbx], r12d
	add	DWORD PTR 4[rbx], eax
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L31:
	.cfi_restore_state
	mov	DWORD PTR 0[r13], 0
	add	r12d, 2
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L34:
	add	DWORD PTR 8[rbp], 1
	mov	r12d, DWORD PTR 12[rsp]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rdi, QWORD PTR 24[rsp]
	mov	rsi, r14
	call	napi_gro_receive@PLT
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	rtl_rx, .-rtl_rx
	.comm	rx_err,4,4
	.comm	rx_buf_sz,4,4
	.comm	RxRWT,4,4
	.comm	RxRUNT,4,4
	.comm	RxRES,4,4
	.comm	RxFOVF,4,4
	.comm	RxCRC,4,4
	.comm	RTL_GIGA_MAC_VER_05,8,8
	.comm	RTL_FLAG_TASK_RESET_PENDING,4,4
	.comm	NUM_RX_DESC,4,4
	.comm	DescOwn,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_r8169.c_rtl_rx.c"
	.text
	.global	__aeabi_uidivmod
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Rx ERROR. status = %08x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtl_rx, %function
rtl_rx:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	ldr	r3, .L37
	mov	r8, r0
	ldr	r0, [r1, #4]
	ldr	r1, [r3]
	ldr	fp, [r6]
	add	r0, r0, r1
	sub	sp, sp, #28
	mov	r1, r2
	sub	r0, r0, fp
	bl	min
	subs	r3, r0, #0
	str	r3, [sp, #8]
	bne	.L12
	b	.L2
.L33:
	ldr	r1, .L37+4
	str	r4, [sp]
	mov	r2, r8
	ldr	r3, .L37+8
	ldr	r1, [r1]
	mov	r0, r6
	bl	netif_info
	ldr	r3, .L37+12
	ldr	r2, .L37+16
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, [r8, #24]
	orr	r2, r2, r1
	add	r3, r3, #1
	tst	r2, r4
	str	r3, [r8, #24]
	ldrne	r3, [r8, #12]
	addne	r3, r3, #1
	strne	r3, [r8, #12]
	ldr	r3, .L37+20
	ldr	r3, [r3]
	tst	r4, r3
	ldrne	r3, [r8, #20]
	addne	r3, r3, #1
	strne	r3, [r8, #20]
	ldr	r3, .L37+24
	ldr	r3, [r3]
	tst	r4, r3
	bne	.L31
.L6:
	ldr	r3, .L37+28
	mov	r0, r7
	ldr	r1, [r3]
	bl	rtl8169_mark_to_asic
.L7:
	ldr	r3, [sp, #12]
	ldr	r0, .L37+32
	ldr	r4, [r3, r9, lsl #2]
	bl	cpu_to_le32
	tst	r4, r0
	beq	.L14
	ldr	r3, .L37+36
	ldr	r2, [r6, #12]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L32
.L14:
	ldr	fp, [sp, #16]
.L9:
	ldr	r3, [sp, #8]
	subs	r3, r3, #1
	str	r3, [sp, #8]
	beq	.L2
.L12:
	ldr	r3, .L37
	mov	r0, fp
	ldr	r1, [r3]
	bl	__aeabi_uidivmod
	ldr	r3, [r6, #24]
	add	r9, r1, r1, lsl #1
	add	r7, r3, r9, lsl #2
	str	r3, [sp, #12]
	mov	r5, r1
	bl	rmb
	ldr	r0, [r7, #8]
	bl	le32_to_cpu
	ldr	r3, .L37+40
	ldr	r2, [r6, #8]
	ldr	r3, [r3]
	and	r4, r0, r2
	tst	r4, r3
	bne	.L2
	ldr	r3, .L37+44
	ldr	r0, [r3]
	add	r3, fp, #1
	and	r0, r0, r4
	str	r3, [sp, #16]
	bl	unlikely
	cmp	r0, #0
	bne	.L33
	ldr	r0, [r7, #4]
	bl	le64_to_cpu
	mov	r3, r0
	mov	r0, r4
	str	r3, [sp, #20]
	bl	rtl8169_fragmented_frame
	bl	unlikely
	cmp	r0, #0
	ldr	r3, [sp, #20]
	bne	.L34
	lsl	r10, r4, #18
	ldr	r1, [r6, #20]
	lsr	r10, r10, #18
	sub	r10, r10, #4
	ldr	r0, [r1, r5, lsl #2]
	mov	r2, r10
	mov	r1, r6
	bl	rtl8169_try_rx_copy
	mov	r5, r0
	ldr	r3, .L37+28
	mov	r0, r7
	ldr	r1, [r3]
	bl	rtl8169_mark_to_asic
	cmp	r5, #0
	beq	.L35
	mov	r1, r4
	mov	r0, r5
	bl	rtl8169_rx_csum
	mov	r1, r10
	mov	r0, r5
	bl	skb_put
	mov	r1, r8
	mov	r0, r5
	bl	eth_type_trans
	mov	r1, r7
	str	r0, [r5]
	mov	r2, r5
	mov	r0, r6
	bl	rtl8169_rx_vlan_skb
	cmp	r0, #0
	blt	.L36
.L11:
	ldm	r8, {r2, r3}
	add	r10, r2, r10
	add	r3, r3, #1
	str	r10, [r8]
	str	r3, [r8, #4]
	b	.L7
.L31:
	ldr	r3, .L37+48
	mov	r0, r6
	ldr	r1, [r3]
	bl	rtl_schedule_task
	ldr	r3, [r8, #16]
	add	r3, r3, #1
	str	r3, [r8, #16]
	b	.L6
.L34:
	ldr	r3, [r8, #12]
	ldr	r2, [r8, #8]
	add	r3, r3, #1
	str	r3, [r8, #12]
	ldr	r3, .L37+28
	add	r2, r2, #1
	ldr	r1, [r3]
	mov	r0, r7
	str	r2, [r8, #8]
	ldr	fp, [sp, #16]
	bl	rtl8169_mark_to_asic
	ldr	r3, [sp, #8]
	subs	r3, r3, #1
	str	r3, [sp, #8]
	bne	.L12
.L2:
	ldm	r6, {r0, r3}
	sub	r0, fp, r0
	add	r3, r3, r0
	str	fp, [r6]
	str	r3, [r6, #4]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	mov	r3, #0
	ldr	r2, [sp, #12]
	add	fp, fp, #2
	str	r3, [r2, r9, lsl #2]
	b	.L9
.L35:
	ldr	r3, [r8, #8]
	ldr	fp, [sp, #16]
	add	r3, r3, #1
	str	r3, [r8, #8]
	b	.L9
.L36:
	mov	r1, r5
	add	r0, r6, #16
	bl	napi_gro_receive
	b	.L11
.L38:
	.align	2
.L37:
	.word	NUM_RX_DESC
	.word	rx_err
	.word	.LC0
	.word	RxRUNT
	.word	RxRWT
	.word	RxCRC
	.word	RxFOVF
	.word	rx_buf_sz
	.word	268427264
	.word	RTL_GIGA_MAC_VER_05
	.word	DescOwn
	.word	RxRES
	.word	RTL_FLAG_TASK_RESET_PENDING
	.size	rtl_rx, .-rtl_rx
	.comm	rx_err,4,4
	.comm	rx_buf_sz,4,4
	.comm	RxRWT,4,4
	.comm	RxRUNT,4,4
	.comm	RxRES,4,4
	.comm	RxFOVF,4,4
	.comm	RxCRC,4,4
	.comm	RTL_GIGA_MAC_VER_05,4,4
	.comm	RTL_FLAG_TASK_RESET_PENDING,4,4
	.comm	NUM_RX_DESC,4,4
	.comm	DescOwn,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
