	.file	"extr_ipw2200.c_ipw_queue_tx_reclaim.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Read index for DMA queue (%d) is out of range [0-%d)\n"
	.text
	.p2align 4
	.type	ipw_queue_tx_reclaim, @function
ipw_queue_tx_reclaim:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR 28[rsi]
	call	ipw_read32@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	r12, rax
	cmp	rdx, rax
	jle	.L2
	cmp	rax, QWORD PTR 8[rbx]
	je	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rsi, rbx
	mov	rdi, rbp
	call	ipw_queue_tx_free_tfd@PLT
	add	DWORD PTR 4[rbp], 1
	mov	rdi, QWORD PTR 8[rbx]
	mov	rsi, QWORD PTR [rbx]
	call	ipw_queue_inc_wrap@PLT
	mov	QWORD PTR 8[rbx], rax
	cmp	rax, r12
	jne	.L3
.L5:
	mov	rdi, rbx
	call	ipw_tx_queue_space@PLT
	cmp	rax, QWORD PTR 16[rbx]
	jle	.L6
	test	r13d, r13d
	jns	.L15
.L6:
	mov	eax, DWORD PTR 24[rbx]
	sub	eax, DWORD PTR 8[rbx]
	jns	.L1
	add	eax, DWORD PTR [rbx]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	edi, DWORD PTR 0[rbp]
	call	netif_wake_queue@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	call	IPW_ERROR@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	ipw_queue_tx_reclaim, .-ipw_queue_tx_reclaim
	.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_ipw2200.c_ipw_queue_tx_reclaim.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Read index for DMA queue (%d) is out of range [0-%d"
	.ascii	")\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipw_queue_tx_reclaim, %function
ipw_queue_tx_reclaim:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	ldr	r1, [r1, #16]
	mov	r7, r2
	mov	r5, r0
	bl	ipw_read32
	ldr	r2, [r4]
	mov	r6, r0
	cmp	r2, r0
	ble	.L2
	ldr	r3, [r4, #4]
	cmp	r0, r3
	beq	.L5
.L3:
	mov	r1, r4
	mov	r0, r5
	bl	ipw_queue_tx_free_tfd
	ldr	r3, [r5, #4]
	ldr	r1, [r4]
	add	r3, r3, #1
	ldr	r0, [r4, #4]
	str	r3, [r5, #4]
	bl	ipw_queue_inc_wrap
	cmp	r0, r6
	str	r0, [r4, #4]
	bne	.L3
.L5:
	mov	r0, r4
	bl	ipw_tx_queue_space
	ldr	r3, [r4, #8]
	cmp	r7, #0
	cmpge	r0, r3
	bgt	.L15
.L6:
	ldr	r3, [r4, #4]
	ldr	r0, [r4, #12]
	subs	r0, r0, r3
	ldrmi	r3, [r4]
	addmi	r0, r0, r3
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	ldr	r0, [r5]
	bl	netif_wake_queue
	b	.L6
.L2:
	mov	r1, r0
	ldr	r0, .L16
	bl	IPW_ERROR
	b	.L5
.L17:
	.align	2
.L16:
	.word	.LC0
	.size	ipw_queue_tx_reclaim, .-ipw_queue_tx_reclaim
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
