	.file	"extr_cns3xxx_eth.c_destroy_rings.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	destroy_rings, @function
destroy_rings:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR RX_DESCS[rip]
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	test	edx, edx
	jle	.L2
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 24[rbx]
	mov	r12, QWORD PTR [rax+rbp*8]
	test	r12, r12
	je	.L3
	mov	rax, QWORD PTR 32[rbx]
	mov	edi, DWORD PTR [rbx]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	edx, DWORD PTR RX_SEGMENT_MRU[rip]
	mov	esi, DWORD PTR [rax+rbp*4]
	call	dma_unmap_single@PLT
	mov	rdi, r12
	call	skb_free_frag@PLT
.L3:
	add	rbp, 1
	cmp	DWORD PTR RX_DESCS[rip], ebp
	jg	.L4
.L2:
	mov	eax, DWORD PTR TX_DESCS[rip]
	test	eax, eax
	jle	.L1
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR 8[rbx]
	mov	r12, QWORD PTR [rax+rbp*8]
	test	r12, r12
	je	.L6
	mov	rax, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR [rbx]
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	mov	edx, DWORD PTR [r12]
	mov	esi, DWORD PTR [rax+rbp*4]
	call	dma_unmap_single@PLT
	mov	rdi, r12
	call	dev_kfree_skb@PLT
.L6:
	add	rbp, 1
	cmp	DWORD PTR TX_DESCS[rip], ebp
	jg	.L7
.L1:
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	destroy_rings, .-destroy_rings
	.comm	TX_DESCS,4,4
	.comm	RX_SEGMENT_MRU,4,4
	.comm	RX_DESCS,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,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_cns3xxx_eth.c_destroy_rings.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	destroy_rings, %function
destroy_rings:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r7, .L18
	mov	r4, r0
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L2
	mov	r5, #0
	ldr	r9, .L18+4
	ldr	r8, .L18+8
.L4:
	ldr	r3, [r4, #12]
	ldr	r6, [r3, r5, lsl #2]
	cmp	r6, #0
	beq	.L3
	ldr	r2, [r4, #16]
	ldr	r3, [r9]
	ldr	r1, [r2, r5, lsl #2]
	ldr	r0, [r4]
	ldr	r2, [r8]
	bl	dma_unmap_single
	mov	r0, r6
	bl	skb_free_frag
.L3:
	ldr	r3, [r7]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L4
.L2:
	ldr	r7, .L18+12
	ldr	r3, [r7]
	cmp	r3, #0
	pople	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r5, #0
	ldr	r8, .L18+16
.L7:
	ldr	r3, [r4, #4]
	ldr	r6, [r3, r5, lsl #2]
	cmp	r6, #0
	beq	.L6
	ldr	r2, [r4, #8]
	ldr	r3, [r8]
	ldr	r1, [r2, r5, lsl #2]
	ldr	r0, [r4]
	ldr	r2, [r6]
	bl	dma_unmap_single
	mov	r0, r6
	bl	dev_kfree_skb
.L6:
	ldr	r3, [r7]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	.align	2
.L18:
	.word	RX_DESCS
	.word	DMA_FROM_DEVICE
	.word	RX_SEGMENT_MRU
	.word	TX_DESCS
	.word	DMA_TO_DEVICE
	.size	destroy_rings, .-destroy_rings
	.comm	TX_DESCS,4,4
	.comm	RX_SEGMENT_MRU,4,4
	.comm	RX_DESCS,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
