	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath_tx_complete_check
_ath_tx_complete_check:                 ## @ath_tx_complete_check
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 16(%rdi)
	movl	$1, %r14d
	jne	LBB0_8
## %bb.1:
	movq	_IEEE80211_NUM_ACS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_8
## %bb.2:
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_ath_txq_unlock
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %r13
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_ath_txq_lock
	cmpq	$0, 8(%r13)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, (%r13)
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, (%r13)
	jmp	LBB0_7
LBB0_5:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_ath_txq_unlock
	movl	(%r15), %edi
	callq	_ath9k_hw_common
	movq	_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movl	%eax, %edi
	callq	_ath_dbg
	movq	_RESET_TYPE_TX_HANG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ath9k_queue_reset
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_NUM_ACS,4,2          ## @IEEE80211_NUM_ACS
	.comm	_RESET,4,2                      ## @RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx hung, resetting the chip\n"

	.comm	_RESET_TYPE_TX_HANG,4,2         ## @RESET_TYPE_TX_HANG
	.no_dead_strip	_ath_tx_complete_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath_tx_complete_check
_ath_tx_complete_check:                 ; @ath_tx_complete_check
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x22, _IEEE80211_NUM_ACS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IEEE80211_NUM_ACS@GOTPAGEOFF]
	ldr	w9, [x22]
	mov	w20, #1
	cmp	x8, #0
	ccmp	w9, #1, #8, eq
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x0
	mov	x23, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_ath_txq_unlock
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x21, [x8, x23, lsl #3]
	mov	x0, x19
	mov	x1, x21
	bl	_ath_txq_lock
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	cbnz	w8, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w20, [x21]
	b	LBB0_2
LBB0_6:
	mov	w20, #1
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	mov	x1, x21
	bl	_ath_txq_unlock
	ldr	w0, [x19]
	bl	_ath9k_hw_common
Lloh2:
	adrp	x8, _RESET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RESET@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	bl	_ath_dbg
Lloh7:
	adrp	x8, _RESET_TYPE_TX_HANG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RESET_TYPE_TX_HANG@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath9k_queue_reset
	mov	w20, #0
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_NUM_ACS,4,2          ; @IEEE80211_NUM_ACS
	.comm	_RESET,4,2                      ; @RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx hung, resetting the chip\n"

	.comm	_RESET_TYPE_TX_HANG,4,2         ; @RESET_TYPE_TX_HANG
	.no_dead_strip	_ath_tx_complete_check
.subsections_via_symbols
