	.file	"extr_3945-mac.c_il3945_rx_queue_reset.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	il3945_rx_queue_reset
	.type	il3945_rx_queue_reset, @function
il3945_rx_queue_reset:
.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
	mov	r12, rsi
	xor	esi, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rdi, r12
	lea	r14, 40[r12]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xor	ebx, ebx
	call	spin_lock_irqsave@PLT
	lea	rdi, 56[r12]
	call	INIT_LIST_HEAD@PLT
	mov	rdi, r14
	call	INIT_LIST_HEAD@PLT
	mov	eax, DWORD PTR RX_QUEUE_SIZE[rip]
	add	eax, DWORD PTR RX_FREE_BUFFERS[rip]
	test	eax, eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, QWORD PTR 48[r12]
	lea	rbp, [rbx+rbx*2]
	sal	rbp, 3
	add	rdi, rbp
	cmp	QWORD PTR 8[rdi], 0
	je	.L3
	mov	ecx, DWORD PTR 0[r13]
	mov	edx, DWORD PTR PAGE_SIZE[rip]
	mov	esi, DWORD PTR 16[rdi]
	mov	edi, DWORD PTR 4[r13]
	sal	edx, cl
	mov	ecx, DWORD PTR PCI_DMA_FROMDEVICE[rip]
	call	pci_unmap_page@PLT
	mov	rax, QWORD PTR 48[r12]
	mov	rdi, r13
	mov	rsi, QWORD PTR 8[rax+rbp]
	call	__il_free_pages@PLT
	mov	rdi, QWORD PTR 48[r12]
	add	rdi, rbp
	mov	QWORD PTR 8[rdi], 0
.L3:
	mov	rsi, r14
	add	rbx, 1
	call	list_add_tail@PLT
	mov	eax, DWORD PTR RX_QUEUE_SIZE[rip]
	add	eax, DWORD PTR RX_FREE_BUFFERS[rip]
	cmp	eax, ebx
	jg	.L2
.L4:
	mov	QWORD PTR 24[r12], 0
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	rdi, r12
	xor	esi, esi
	mov	QWORD PTR 32[r12], 0
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	QWORD PTR 16[r12], 0
	mov	QWORD PTR 8[r12], 0
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	spin_unlock_irqrestore@PLT
	.cfi_endproc
.LFE0:
	.size	il3945_rx_queue_reset, .-il3945_rx_queue_reset
	.comm	RX_QUEUE_SIZE,4,4
	.comm	RX_FREE_BUFFERS,4,4
	.comm	PCI_DMA_FROMDEVICE,4,4
	.comm	PAGE_SIZE,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_3945-mac.c_il3945_rx_queue_reset.c"
	.text
	.align	2
	.global	il3945_rx_queue_reset
	.syntax unified
	.arm
	.fpu softvfp
	.type	il3945_rx_queue_reset, %function
il3945_rx_queue_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	mov	r7, r0
	mov	r1, #0
	mov	r0, r6
	bl	spin_lock_irqsave
	ldr	r9, .L12
	ldr	r10, .L12+4
	add	r8, r6, #20
	add	r0, r6, #28
	bl	INIT_LIST_HEAD
	mov	r0, r8
	bl	INIT_LIST_HEAD
	ldr	r3, [r9]
	ldr	r2, [r10]
	add	r3, r3, r2
	cmp	r3, #0
	movgt	r4, #0
	ldrgt	fp, .L12+8
	ble	.L4
.L2:
	ldr	r0, [r6, #24]
	add	r5, r4, r4, lsl #1
	add	r0, r0, r5, lsl #2
	ldr	r3, [r0, #4]
	add	r4, r4, #1
	cmp	r3, #0
	lsl	r5, r5, #2
	beq	.L3
	ldr	r3, [r7]
	ldr	r2, [fp]
	ldr	r1, [r0, #8]
	lsl	r2, r2, r3
	ldr	r3, .L12+12
	ldr	r0, [r7, #4]
	ldr	r3, [r3]
	bl	pci_unmap_page
	ldr	r3, [r6, #24]
	mov	r0, r7
	add	r3, r3, r5
	ldr	r1, [r3, #4]
	bl	__il_free_pages
	mov	r3, #0
	ldr	r0, [r6, #24]
	add	r0, r0, r5
	str	r3, [r0, #4]
.L3:
	mov	r1, r8
	bl	list_add_tail
	ldr	r3, [r9]
	ldr	r2, [r10]
	add	r3, r3, r2
	cmp	r3, r4
	bgt	.L2
.L4:
	mov	r3, #0
	mov	r0, r6
	mov	r1, r3
	str	r3, [r6, #12]
	str	r3, [r6, #16]
	str	r3, [r6, #8]
	str	r3, [r6, #4]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	spin_unlock_irqrestore
.L13:
	.align	2
.L12:
	.word	RX_FREE_BUFFERS
	.word	RX_QUEUE_SIZE
	.word	PAGE_SIZE
	.word	PCI_DMA_FROMDEVICE
	.size	il3945_rx_queue_reset, .-il3945_rx_queue_reset
	.comm	RX_QUEUE_SIZE,4,4
	.comm	RX_FREE_BUFFERS,4,4
	.comm	PCI_DMA_FROMDEVICE,4,4
	.comm	PAGE_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
