	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_num_tx_pending        ## -- Begin function ath5k_hw_num_tx_pending
	.p2align	4, 0x90
_ath5k_hw_num_tx_pending:               ## @ath5k_hw_num_tx_pending
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	16(%rdi), %esi
	movl	%r14d, %edi
	callq	_AR5K_ASSERT_ENTRY
	movq	8(%rbx), %rax
	movl	%r14d, %ecx
	movq	(%rax,%rcx,8), %rcx
	movq	_AR5K_TX_QUEUE_INACTIVE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_5
## %bb.1:
	movq	(%rbx), %rcx
	movq	_AR5K_AR5210@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_5
## %bb.2:
	movl	%r14d, %edi
	callq	_AR5K_QUEUE_STATUS
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ath5k_hw_reg_read
	movl	%eax, %r15d
	movq	_AR5K_QCU_STS_FRMPENDCNT@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	jne	LBB0_4
## %bb.3:
	movq	_AR5K_QCU_TXE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_AR5K_REG_READ_Q
	movq	%rax, %rcx
	movl	$1, %eax
	testq	%rcx, %rcx
	jne	LBB0_5
LBB0_4:
	movl	%r15d, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_TX_QUEUE_INACTIVE,8,3     ## @AR5K_TX_QUEUE_INACTIVE
	.comm	_AR5K_AR5210,8,3                ## @AR5K_AR5210
	.comm	_AR5K_QCU_STS_FRMPENDCNT,4,2    ## @AR5K_QCU_STS_FRMPENDCNT
	.comm	_AR5K_QCU_TXE,4,2               ## @AR5K_QCU_TXE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_num_tx_pending        ; -- Begin function ath5k_hw_num_tx_pending
	.p2align	2
_ath5k_hw_num_tx_pending:               ; @ath5k_hw_num_tx_pending
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	ldr	w1, [x0, #16]
	mov	x0, x19
	bl	_AR5K_ASSERT_ENTRY
	ldr	x8, [x20, #8]
	ldr	x8, [x8, w19, uxtw #3]
Lloh0:
	adrp	x9, _AR5K_TX_QUEUE_INACTIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AR5K_TX_QUEUE_INACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _AR5K_AR5210@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AR5K_AR5210@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
LBB0_2:
	mov	w21, #0
LBB0_3:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	bl	_AR5K_QUEUE_STATUS
	mov	x1, x0
	mov	x0, x20
	bl	_ath5k_hw_reg_read
Lloh6:
	adrp	x8, _AR5K_QCU_STS_FRMPENDCNT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR5K_QCU_STS_FRMPENDCNT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ands	w21, w8, w0
	b.ne	LBB0_3
; %bb.5:
Lloh9:
	adrp	x8, _AR5K_QCU_TXE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR5K_QCU_TXE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	bl	_AR5K_REG_READ_Q
	cbz	x0, LBB0_3
; %bb.6:
	mov	w21, #1
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_TX_QUEUE_INACTIVE,8,3     ; @AR5K_TX_QUEUE_INACTIVE
	.comm	_AR5K_AR5210,8,3                ; @AR5K_AR5210
	.comm	_AR5K_QCU_STS_FRMPENDCNT,4,2    ; @AR5K_QCU_STS_FRMPENDCNT
	.comm	_AR5K_QCU_TXE,4,2               ; @AR5K_QCU_TXE
.subsections_via_symbols
