	.file	"extr_ar9300_xmit.c_ar9300_num_tx_pending.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ar9300_num_tx_pending
	.type	ar9300_num_tx_pending, @function
ar9300_num_tx_pending:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movsx	r12, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	call	AH_PRIVATE@PLT
	xor	edi, edi
	cmp	DWORD PTR [rax], r12d
	setg	dil
	call	HALASSERT@PLT
	mov	edi, r12d
	call	AR_QSTS@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	OS_REG_READ@PLT
	and	eax, DWORD PTR AR_Q_STS_PEND_FR_CNT[rip]
	mov	r13d, eax
	je	.L10
.L2:
	mov	rdi, rbp
	call	AH9300@PLT
	mov	rdx, QWORD PTR HAL_TX_QUEUE_INACTIVE[rip]
	xor	edi, edi
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR [rax+r12*8], rdx
	setne	dil
	call	HALASSERT@PLT
	mov	eax, r13d
	pop	rbp
	.cfi_remember_state
	.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
.L10:
	.cfi_restore_state
	mov	esi, DWORD PTR AR_Q_TXE[rip]
	mov	rdi, rbp
	call	OS_REG_READ@PLT
	mov	ecx, r12d
	mov	edi, 1
	sar	eax, cl
	and	eax, 1
	mov	r13d, eax
	jne	.L2
	call	HALASSERT@PLT
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ar9300_num_tx_pending, .-ar9300_num_tx_pending
	.comm	HAL_TX_QUEUE_INACTIVE,8,8
	.comm	HAL_TX_QUEUE_CAB,8,8
	.comm	HAL_DEBUG_QUEUE,4,4
	.comm	AR_Q_TXE,4,4
	.comm	AR_Q_STS_PEND_FR_CNT,4,4
	.comm	AR_Q_RDYTIMESHDN,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_ar9300_xmit.c_ar9300_num_tx_pending.c"
	.text
	.align	2
	.global	ar9300_num_tx_pending
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar9300_num_tx_pending, %function
ar9300_num_tx_pending:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r1
	mov	r6, r0
	bl	AH_PRIVATE
	ldr	r0, [r0]
	cmp	r0, r5
	movle	r0, #0
	movgt	r0, #1
	bl	HALASSERT
	mov	r0, r5
	bl	AR_QSTS
	mov	r1, r0
	mov	r0, r6
	bl	OS_REG_READ
	ldr	r3, .L8
	ldr	r3, [r3]
	ands	r4, r0, r3
	beq	.L7
.L2:
	mov	r0, r6
	bl	AH9300
	ldr	r3, .L8+4
	ldr	r2, [r0]
	ldr	r3, [r3]
	ldr	r0, [r2, r5, lsl #2]
	subs	r0, r0, r3
	movne	r0, #1
.L3:
	bl	HALASSERT
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L7:
	ldr	r3, .L8+8
	mov	r0, r6
	ldr	r1, [r3]
	bl	OS_REG_READ
	asr	r0, r0, r5
	ands	r4, r0, #1
	moveq	r0, #1
	beq	.L3
	b	.L2
.L9:
	.align	2
.L8:
	.word	AR_Q_STS_PEND_FR_CNT
	.word	HAL_TX_QUEUE_INACTIVE
	.word	AR_Q_TXE
	.size	ar9300_num_tx_pending, .-ar9300_num_tx_pending
	.comm	HAL_TX_QUEUE_INACTIVE,4,4
	.comm	HAL_TX_QUEUE_CAB,4,4
	.comm	HAL_DEBUG_QUEUE,4,4
	.comm	AR_Q_TXE,4,4
	.comm	AR_Q_STS_PEND_FR_CNT,4,4
	.comm	AR_Q_RDYTIMESHDN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
