	.file	"extr_main.c_alx_refill_rx_ring.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	alx_refill_rx_ring, @function
alx_refill_rx_ring:
.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	r14, rdi
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR 24[rdi]
	mov	DWORD PTR 28[rsp], esi
	mov	QWORD PTR 16[rsp], 0
	mov	rax, QWORD PTR [rax]
	mov	r12, QWORD PTR [rax]
	mov	eax, 0
	mov	rcx, QWORD PTR [r12]
	lea	rbx, 1[rcx]
	cmp	QWORD PTR [rdi], rbx
	mov	QWORD PTR [rsp], rcx
	cmove	rbx, rax
	mov	rax, QWORD PTR 16[r12]
	lea	rbp, [rax+rcx*8]
	cmp	QWORD PTR 0[rbp], 0
	je	.L3
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, QWORD PTR 8[r14]
	mov	edx, DWORD PTR 16[r14]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	call	dma_map_single@PLT
	mov	rdi, QWORD PTR 8[r14]
	mov	esi, eax
	mov	r13d, eax
	call	dma_mapping_error@PLT
	test	rax, rax
	jne	.L20
	mov	edi, r13d
	and	edi, 3
	call	WARN_ON@PLT
	test	rax, rax
	jne	.L20
	mov	QWORD PTR 0[rbp], r15
	mov	edx, DWORD PTR 16[r14]
	mov	rdi, rbp
	mov	esi, DWORD PTR size[rip]
	call	dma_unmap_len_set@PLT
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, r13d
	call	dma_unmap_addr_set@PLT
	mov	edi, r13d
	call	cpu_to_le64@PLT
	mov	rcx, QWORD PTR 8[rsp]
	mov	rdx, QWORD PTR 16[r12]
	mov	QWORD PTR [rsp], rbx
	mov	DWORD PTR [rcx], eax
	lea	rbp, [rdx+rbx*8]
	lea	rax, 1[rbx]
	mov	ecx, 0
	cmp	QWORD PTR [r14], rax
	cmove	rax, rcx
	add	QWORD PTR 16[rsp], 1
	cmp	QWORD PTR 0[rbp], 0
	jne	.L5
	mov	rbx, rax
.L3:
	cmp	QWORD PTR 8[r12], rbx
	je	.L5
	mov	rax, QWORD PTR 24[r12]
	mov	rcx, QWORD PTR [rsp]
	mov	edi, DWORD PTR 20[r14]
	mov	edx, DWORD PTR 28[rsp]
	lea	rax, [rax+rcx*4]
	mov	QWORD PTR 8[rsp], rax
	mov	eax, DWORD PTR 16[r14]
	lea	esi, 64[rax]
	call	__netdev_alloc_skb@PLT
	mov	r15, rax
	test	rax, rax
	je	.L5
	mov	rsi, QWORD PTR [rax]
	mov	rax, rsi
	and	eax, 4095
	cmp	rax, 4032
	jne	.L6
	mov	esi, 64
	mov	rdi, r15
	call	skb_reserve@PLT
	mov	rsi, QWORD PTR [r15]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, r15
	call	dev_kfree_skb@PLT
.L5:
	mov	rax, QWORD PTR 16[rsp]
	mov	r15d, eax
	test	rax, rax
	jne	.L22
.L13:
	xor	r15d, r15d
.L1:
	add	rsp, 40
	.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
.L22:
	.cfi_restore_state
	xor	eax, eax
	call	wmb@PLT
	mov	rdx, QWORD PTR [rsp]
	mov	esi, DWORD PTR ALX_RFD_PIDX[rip]
	lea	rdi, 8[r14]
	mov	QWORD PTR [r12], rdx
	call	alx_write_mem16@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	alx_refill_rx_ring, .-alx_refill_rx_ring
	.comm	size,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	ALX_RFD_PIDX,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_main.c_alx_refill_rx_ring.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	alx_refill_rx_ring, %function
alx_refill_rx_ring:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #16]
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r3]
	ldr	r2, [r0]
	ldr	r8, [r3]
	sub	sp, sp, #20
	ldr	r9, [r8]
	ldr	r5, [r8, #8]
	add	r7, r9, #1
	ldr	r3, [r5, r9, lsl #2]
	cmp	r2, r7
	moveq	r7, #0
	cmp	r3, #0
	add	r5, r5, r9, lsl #2
	str	r1, [sp, #12]
	movne	r5, #0
	bne	.L1
	mov	r4, r0
	mov	fp, r3
	b	.L3
.L6:
	ldr	r3, .L22
	ldmib	r4, {r0, r2}
	ldr	r3, [r3]
	bl	dma_map_single
	mov	r10, r0
	ldr	r0, [r4, #4]
	mov	r1, r10
	bl	dma_mapping_error
	mov	r2, r0
	cmp	r2, #0
	and	r0, r10, #3
	bne	.L20
	bl	WARN_ON
	cmp	r0, #0
	bne	.L20
	ldr	r3, .L22+4
	mov	r0, r5
	ldr	r1, [r3]
	ldr	r2, [r4, #8]
	str	r6, [r5]
	bl	dma_unmap_len_set
	mov	r2, r10
	mov	r1, r10
	mov	r0, r5
	bl	dma_unmap_addr_set
	mov	r0, r10
	bl	cpu_to_le64
	ldr	r5, [r8, #8]
	ldr	r1, [r4]
	ldr	r2, [r5, r7, lsl #2]
	add	r3, r7, #1
	cmp	r1, r3
	moveq	r3, #0
	cmp	r2, #0
	mov	r9, r7
	ldmib	sp, {r1, r2}
	add	fp, fp, #1
	str	r0, [r2, r1]
	add	r5, r5, r7, lsl #2
	bne	.L5
	mov	r7, r3
.L3:
	ldr	r3, [r8, #4]
	lsl	r2, r9, #2
	cmp	r3, r7
	str	r2, [sp, #4]
	beq	.L5
	ldr	r1, [r4, #8]
	ldr	r3, [r8, #12]
	ldr	r2, [sp, #12]
	ldr	r0, [r4, #12]
	add	r1, r1, #64
	str	r3, [sp, #8]
	bl	__netdev_alloc_skb
	subs	r6, r0, #0
	beq	.L5
	ldr	r1, [r6]
	lsl	r3, r1, #20
	lsr	r3, r3, #20
	cmp	r3, #4032
	bne	.L6
	mov	r1, #64
	bl	skb_reserve
	ldr	r1, [r6]
	b	.L6
.L20:
	mov	r0, r6
	bl	dev_kfree_skb
.L5:
	subs	r5, fp, #0
	beq	.L1
	bl	wmb
	ldr	r3, .L22+8
	mov	r2, r9
	ldr	r1, [r3]
	str	r9, [r8]
	add	r0, r4, #4
	bl	alx_write_mem16
.L1:
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	.align	2
.L22:
	.word	DMA_FROM_DEVICE
	.word	size
	.word	ALX_RFD_PIDX
	.size	alx_refill_rx_ring, .-alx_refill_rx_ring
	.comm	size,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	ALX_RFD_PIDX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
