	.file	"extr_ar5211_xmit.c_ar5211StopTxDma.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ar5211StopTxDma
	.type	ar5211StopTxDma, @function
ar5211StopTxDma:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	xor	edi, edi
	cmp	QWORD PTR HAL_NUM_TX_QUEUES[rip], rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	seta	dil
	call	HALASSERT@PLT
	mov	rdi, rbp
	call	AH5211@PLT
	mov	rcx, QWORD PTR HAL_TX_QUEUE_INACTIVE[rip]
	xor	edi, edi
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR [rax+r12*8], rcx
	setne	dil
	xor	ebx, ebx
	call	HALASSERT@PLT
	mov	ecx, r12d
	mov	edx, 1
	mov	rdi, rbp
	mov	esi, DWORD PTR AR_Q_TXD[rip]
	sal	edx, cl
	call	OS_REG_WRITE@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, 10
	add	ebx, 1
	call	OS_DELAY@PLT
	cmp	ebx, 10000
	je	.L8
.L3:
	mov	rsi, r12
	mov	rdi, rbp
	call	ar5211NumTxPending@PLT
	test	rax, rax
	jne	.L9
	mov	r12d, 1
.L2:
	mov	esi, DWORD PTR AR_Q_TXD[rip]
	mov	rdi, rbp
	xor	edx, edx
	call	OS_REG_WRITE@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	xor	r12d, r12d
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ar5211StopTxDma, .-ar5211StopTxDma
	.comm	HAL_TX_QUEUE_INACTIVE,8,8
	.comm	HAL_NUM_TX_QUEUES,8,8
	.comm	AR_Q_TXD,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_ar5211_xmit.c_ar5211StopTxDma.c"
	.text
	.align	2
	.global	ar5211StopTxDma
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar5211StopTxDma, %function
ar5211StopTxDma:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r3, .L10
	mov	r6, r1
	ldr	r0, [r3]
	ldr	r8, .L10+4
	cmp	r0, r1
	movls	r0, #0
	movhi	r0, #1
	bl	HALASSERT
	mov	r0, r5
	bl	AH5211
	ldr	r3, .L10+8
	ldr	r2, [r0]
	ldr	r3, [r3]
	ldr	r0, [r2, r6, lsl #2]
	mov	r4, #0
	subs	r0, r0, r3
	movne	r0, #1
	bl	HALASSERT
	mov	r2, #1
	mov	r0, r5
	ldr	r1, [r8]
	lsl	r2, r2, r6
	bl	OS_REG_WRITE
	ldr	r7, .L10+12
	b	.L3
.L9:
	mov	r0, #10
	bl	OS_DELAY
	cmp	r4, r7
	beq	.L8
.L3:
	mov	r1, r6
	mov	r0, r5
	bl	ar5211NumTxPending
	cmp	r0, #0
	add	r4, r4, #1
	bne	.L9
	mov	r4, #1
.L2:
	mov	r0, r5
	mov	r2, #0
	ldr	r1, [r8]
	bl	OS_REG_WRITE
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r4, #0
	b	.L2
.L11:
	.align	2
.L10:
	.word	HAL_NUM_TX_QUEUES
	.word	AR_Q_TXD
	.word	HAL_TX_QUEUE_INACTIVE
	.word	10000
	.size	ar5211StopTxDma, .-ar5211StopTxDma
	.comm	HAL_TX_QUEUE_INACTIVE,4,4
	.comm	HAL_NUM_TX_QUEUES,4,4
	.comm	AR_Q_TXD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
