	.file	"extr_bcm63xx_enet.c_bcm_enet_refill_rx.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"unable to refill rx ring\n"
	.text
	.p2align 4
	.type	bcm_enet_refill_rx, @function
bcm_enet_refill_rx:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	netdev_priv@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR [rax]
	cmp	rax, QWORD PTR 8[rbx]
	jl	.L9
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, DWORD PTR 48[rbx]
	call	ENETDMA_BUFALLOC_REG@PLT
	mov	esi, 1
	mov	rdi, rbx
	mov	edx, eax
	call	enet_dma_writel@PLT
	mov	rax, QWORD PTR [rbx]
	cmp	rax, QWORD PTR 8[rbx]
	jge	.L2
.L9:
	movsx	rdx, DWORD PTR 16[rbx]
	mov	r12, QWORD PTR 72[rbx]
	mov	rcx, QWORD PTR 64[rbx]
	mov	ebp, DWORD PTR 20[rbx]
	lea	r14, 0[0+rdx*8]
	mov	rax, rdx
	add	r12, r14
	cmp	QWORD PTR [rcx+rdx*8], 0
	je	.L19
.L3:
	mov	ecx, DWORD PTR DMADESC_LENGTH_SHIFT[rip]
	mov	rsi, QWORD PTR 8[rbx]
	add	eax, 1
	sal	ebp, cl
	lea	rcx, -1[rsi]
	or	ebp, DWORD PTR DMADESC_OWNER_MASK[rip]
	cmp	rdx, rcx
	jne	.L6
	mov	ecx, DWORD PTR 24[rbx]
	mov	eax, DWORD PTR DMADESC_WRAP_MASK[rip]
	sar	eax, cl
	or	ebp, eax
	xor	eax, eax
.L6:
	mov	DWORD PTR 16[rbx], eax
	xor	eax, eax
	call	wmb@PLT
	mov	DWORD PTR [r12], ebp
	add	QWORD PTR [rbx], 1
	cmp	QWORD PTR 56[rbx], 0
	jne	.L20
	mov	ecx, DWORD PTR 48[rbx]
	mov	edx, DWORD PTR ENETDMAC_BUFALLOC[rip]
	mov	esi, 1
	mov	rdi, rbx
	call	enet_dmac_writel@PLT
	mov	rax, QWORD PTR [rbx]
	cmp	rax, QWORD PTR 8[rbx]
	jl	.L9
.L2:
	test	rax, rax
	je	.L21
.L11:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	esi, ebp
	mov	rdi, r13
	call	netdev_alloc_skb@PLT
	test	rax, rax
	je	.L22
	mov	rdx, QWORD PTR 64[rbx]
	mov	rdi, QWORD PTR 40[rbx]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	esi, DWORD PTR [rax]
	mov	QWORD PTR [rdx+r14], rax
	mov	edx, DWORD PTR 20[rbx]
	call	dma_map_single@PLT
	movsx	rdx, DWORD PTR 16[rbx]
	mov	ebp, DWORD PTR 20[rbx]
	mov	DWORD PTR 4[r12], eax
	mov	rax, rdx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, r13
	call	netif_running@PLT
	test	rax, rax
	je	.L11
	mov	rdi, QWORD PTR 40[rbx]
	lea	rsi, .LC0[rip]
	call	dev_warn@PLT
	mov	rax, QWORD PTR HZ[rip]
	lea	rdi, 32[rbx]
	add	rax, QWORD PTR jiffies[rip]
	mov	QWORD PTR 32[rbx], rax
	call	add_timer@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	mov	rax, QWORD PTR [rbx]
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	bcm_enet_refill_rx, .-bcm_enet_refill_rx
	.comm	jiffies,8,8
	.comm	HZ,8,8
	.comm	ENETDMAC_BUFALLOC,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	DMADESC_WRAP_MASK,4,4
	.comm	DMADESC_OWNER_MASK,4,4
	.comm	DMADESC_LENGTH_SHIFT,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_refill_rx.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unable to refill rx ring\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bcm_enet_refill_rx, %function
bcm_enet_refill_rx:
	@ 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
	str	r0, [sp, #4]
	bl	netdev_priv
	ldm	r0, {r3, ip}
	cmp	r3, ip
	mov	r4, r0
	bge	.L2
	ldr	r9, .L23
	ldr	r8, .L23+4
	ldr	fp, .L23+8
	ldr	r10, .L23+12
	b	.L9
.L20:
	ldr	r0, [r4, #28]
	bl	ENETDMA_BUFALLOC_REG
	mov	r1, #1
	mov	r2, r0
	mov	r0, r4
	bl	enet_dma_writel
	ldm	r4, {r3, ip}
	cmp	r3, ip
	bge	.L2
.L9:
	ldr	r3, [r4, #8]
	ldr	r2, [r4, #36]
	ldr	r5, [r4, #40]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, [r4, #12]
	cmp	r2, #0
	lsl	r6, r3, #3
	add	r7, r5, r3, lsl #3
	lsl	r2, r3, #2
	beq	.L19
.L3:
	sub	ip, ip, #1
	cmp	ip, r3
	moveq	r3, #0
	ldr	r2, [r9]
	ldr	r7, [r8]
	addne	r3, r3, #1
	orr	r7, r7, r1, lsl r2
	ldreq	r2, [r4, #16]
	ldreq	r1, [fp]
	str	r3, [r4, #8]
	orreq	r7, r7, r1, asr r2
	bl	wmb
	ldr	r3, [r4]
	ldr	r2, [r4, #32]
	add	r3, r3, #1
	cmp	r2, #0
	str	r7, [r5, r6]
	str	r3, [r4]
	bne	.L20
	ldr	r3, [r4, #28]
	mov	r1, #1
	mov	r0, r4
	ldr	r2, [r10]
	bl	enet_dmac_writel
	ldm	r4, {r3, ip}
	cmp	r3, ip
	blt	.L9
.L2:
	cmp	r3, #0
	beq	.L21
.L11:
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r0, [sp, #4]
	str	r2, [sp]
	bl	netdev_alloc_skb
	cmp	r0, #0
	ldr	r2, [sp]
	beq	.L22
	ldr	r3, [r4, #36]
	ldr	r1, [r0]
	str	r0, [r3, r2]
	ldr	r3, .L23+16
	ldr	r2, [r4, #12]
	ldr	r3, [r3]
	ldr	r0, [r4, #24]
	bl	dma_map_single
	ldr	r1, [r4, #12]
	ldr	r3, [r4, #8]
	ldr	ip, [r4, #4]
	str	r0, [r7, #4]
	b	.L3
.L21:
	ldr	r0, [sp, #4]
	bl	netif_running
	cmp	r0, #0
	beq	.L11
	ldr	r1, .L23+20
	ldr	r0, [r4, #24]
	bl	dev_warn
	mov	r0, r4
	ldr	r3, .L23+24
	ldr	r2, .L23+28
	ldr	r3, [r3]
	ldr	r2, [r2]
	add	r3, r3, r2
	str	r3, [r0, #20]!
	bl	add_timer
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	ldr	r3, [r4]
	b	.L2
.L24:
	.align	2
.L23:
	.word	DMADESC_LENGTH_SHIFT
	.word	DMADESC_OWNER_MASK
	.word	DMADESC_WRAP_MASK
	.word	ENETDMAC_BUFALLOC
	.word	DMA_FROM_DEVICE
	.word	.LC0
	.word	jiffies
	.word	HZ
	.size	bcm_enet_refill_rx, .-bcm_enet_refill_rx
	.comm	jiffies,4,4
	.comm	HZ,4,4
	.comm	ENETDMAC_BUFALLOC,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	DMADESC_WRAP_MASK,4,4
	.comm	DMADESC_OWNER_MASK,4,4
	.comm	DMADESC_LENGTH_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
