	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wil_is_tx_idle                 ## -- Begin function wil_is_tx_idle
	.p2align	4, 0x90
_wil_is_tx_idle:                        ## @wil_is_tx_idle
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_wil_get_min_tx_ring_id
	movq	_WIL6210_MAX_TX_RINGS@GOTPCREL(%rip), %rdx
	movl	$1, %ecx
	cmpl	(%rdx), %eax
	jge	LBB0_12
## %bb.1:
	movslq	%eax, %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_spin_unlock
	incq	%r15
	movq	_WIL6210_MAX_TX_RINGS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jge	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	8(%r12), %r13
	movq	16(%r12), %r14
	leaq	(,%r15,8), %rbx
	addq	%r13, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	cmpl	$0, (%r14,%r15,4)
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 4(%r13,%r15,8)
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_WIL_DATA_COMPLETION_TO_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_wil_status_napi_en@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r14,%r15,4), %r14
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, -48(%rbp)                 ## 8-byte Folded Spill
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	callq	_wil_ring_is_empty
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%r12, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_wil_dbg_ratelimited
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	%r12, %rdi
	callq	_napi_synchronize
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	callq	_spin_lock
	cmpl	$0, (%r14)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	cmpl	$0, 4(%r13,%r15,8)
	jne	LBB0_6
	jmp	LBB0_10
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_wil_dbg_pm
	movq	%rbx, %rdi
	callq	_spin_unlock
	xorl	%ecx, %ecx
	jmp	LBB0_12
LBB0_11:
	movl	$1, %ecx
LBB0_12:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WIL6210_MAX_TX_RINGS,4,2       ## @WIL6210_MAX_TX_RINGS
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_WIL_DATA_COMPLETION_TO_MS,4,2  ## @WIL_DATA_COMPLETION_TO_MS
	.comm	_wil_status_napi_en,4,2         ## @wil_status_napi_en
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TO waiting for idle tx\n"

L_.str.1:                               ## @.str.1
	.asciz	"tx vring is not empty -> NAPI\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wil_is_tx_idle                 ; -- Begin function wil_is_tx_idle
	.p2align	2
_wil_is_tx_idle:                        ; @wil_is_tx_idle
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_wil_get_min_tx_ring_id
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x24, _WIL6210_MAX_TX_RINGS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _WIL6210_MAX_TX_RINGS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.ge	LBB0_11
; %bb.1:
	sxtw	x25, w0
Lloh2:
	adrp	x26, _jiffies@GOTPAGE
Lloh3:
	ldr	x26, [x26, _jiffies@GOTPAGEOFF]
Lloh4:
	adrp	x20, l_.str.1@PAGE
Lloh5:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_spin_unlock
	add	x25, x25, #1
	ldrsw	x8, [x24]
	cmp	x25, x8
	b.ge	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldp	x9, x8, [x19, #8]
	add	x22, x8, x25, lsl #2
	add	x21, x9, x25, lsl #3
	mov	x0, x21
	bl	_spin_lock
	ldr	w8, [x22]
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x27, x21
	ldr	w8, [x27, #4]!
	cbz	w8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x28, [x26]
Lloh6:
	adrp	x8, _WIL_DATA_COMPLETION_TO_MS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WIL_DATA_COMPLETION_TO_MS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x23, x0
Lloh9:
	adrp	x8, _wil_status_napi_en@GOTPAGE
Lloh10:
	ldr	x8, [x8, _wil_status_napi_en@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, x28
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	bl	_wil_ring_is_empty
	cbnz	w0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x0, [x26]
	mov	x1, x23
	bl	_time_after
	cbnz	x0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x19
	mov	x1, x20
	bl	_wil_dbg_ratelimited
	mov	x0, x21
	bl	_spin_unlock
	mov	x0, x19
	bl	_napi_synchronize
	mov	w0, #20
	bl	_msleep
	mov	x0, x21
	bl	_spin_lock
	ldr	w8, [x22]
	cbz	w8, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	w8, [x27]
	cbnz	w8, LBB0_7
	b	LBB0_2
LBB0_11:
	mov	w0, #1
	b	LBB0_13
LBB0_12:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_wil_dbg_pm
	mov	x0, x21
	bl	_spin_unlock
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_WIL6210_MAX_TX_RINGS,4,2       ; @WIL6210_MAX_TX_RINGS
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_WIL_DATA_COMPLETION_TO_MS,4,2  ; @WIL_DATA_COMPLETION_TO_MS
	.comm	_wil_status_napi_en,4,2         ; @wil_status_napi_en
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TO waiting for idle tx\n"

l_.str.1:                               ; @.str.1
	.asciz	"tx vring is not empty -> NAPI\n"

.subsections_via_symbols
