	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76u_stop_tx                  ## -- Begin function mt76u_stop_tx
	.p2align	4, 0x90
_mt76u_stop_tx:                         ## @mt76u_stop_tx
	.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
	movq	%rdi, %r14
	movl	32(%rdi), %ebx
	callq	_mt76_has_tx_pending
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1717986919, %rax, %rdx         ## imm = 0x66666667
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$33, %rdx
	addl	%eax, %edx
	movl	%ebx, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_wait_event_timeout
	testl	%eax, %eax
	je	LBB0_1
LBB0_17:
	leaq	4(%r14), %rdi
	callq	_cancel_delayed_work_sync
	movq	_MT76_READING_STATS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_mt76_tx_status_check
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	28(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_IEEE80211_NUM_ACS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.2:
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movslq	%eax, %rcx
	cmpq	%rcx, %r15
	jge	LBB0_8
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	16(%r14), %rcx
	movq	(%rcx,%r15,8), %r12
	cmpl	$0, (%r12)
	jle	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	32(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_usb_kill_urb
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IEEE80211_NUM_ACS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_8:
	leaq	24(%r14), %rdi
	callq	_tasklet_kill
	movq	_IEEE80211_NUM_ACS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_17
## %bb.9:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	incq	%rbx
	movq	_IEEE80211_NUM_ACS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_17
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %r13
	leaq	16(%r13), %r12
	movq	%r12, %rdi
	callq	_spin_lock_bh
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=2
	xorl	%edx, %edx
	divq	%rsi
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=2
	movq	%rdx, 8(%r13)
	decq	%rcx
	movq	%rcx, 24(%r13)
	movq	8(%r14), %rax
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	*(%rax)
LBB0_11:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	24(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	8(%r13), %rax
	movq	32(%r13), %rdx
	movl	(%rdx,%rax,4), %edx
	movl	%edx, -48(%rbp)
	incq	%rax
	movslq	(%r13), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=2
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ,4,2                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timed out waiting for pending tx\n"

	.comm	_IEEE80211_NUM_ACS,4,2          ## @IEEE80211_NUM_ACS
	.comm	_MT76_READING_STATS,4,2         ## @MT76_READING_STATS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76u_stop_tx                  ; -- Begin function mt76u_stop_tx
	.p2align	2
_mt76u_stop_tx:                         ; @mt76u_stop_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	w20, [x0, #32]
	bl	_mt76_has_tx_pending
	cmp	w0, #0
	cset	w1, eq
Lloh0:
	adrp	x8, _HZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w2, w8, w9, asr #1
	mov	x0, x20
	bl	_wait_event_timeout
	cbz	w0, LBB0_2
LBB0_1:
	add	x0, x19, #4
	bl	_cancel_delayed_work_sync
Lloh3:
	adrp	x8, _MT76_READING_STATS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT76_READING_STATS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_clear_bit
	mov	x0, x19
	mov	x1, #0
	mov	w2, #1
	bl	_mt76_tx_status_check
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
	ldr	w0, [x19, #28]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x22, _IEEE80211_NUM_ACS@GOTPAGE
Lloh9:
	ldr	x22, [x22, _IEEE80211_NUM_ACS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	x20, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x9, [x19, #16]
	ldr	x21, [x9, x20, lsl #3]
	ldr	w9, [x21]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, #0
LBB0_7:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x21, #32]
	ldr	w0, [x8, x23, lsl #2]
	bl	_usb_kill_urb
	add	x23, x23, #1
	ldrsw	x8, [x21]
	cmp	x23, x8
	b.lt	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x22]
	b	LBB0_4
LBB0_9:
	add	x0, x19, #24
	bl	_tasklet_kill
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.10:
	mov	x20, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x21
	bl	_spin_unlock_bh
	add	x20, x20, #1
	ldrsw	x8, [x22]
	cmp	x20, x8
	b.ge	LBB0_1
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	x8, [x19, #16]
	ldr	x23, [x8, x20, lsl #3]
	add	x21, x23, #16
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	x8, [x23, #24]
	cbz	x8, LBB0_11
LBB0_13:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x23, #32]
	ldr	x10, [x23, #8]
	ldr	w9, [x9, x10, lsl #2]
	str	w9, [sp, #8]
	add	x9, x10, #1
	ldrsw	x10, [x23]
	udiv	x11, x9, x10
	msub	x9, x11, x10, x9
	str	x9, [x23, #8]
	sub	x8, x8, #1
	str	x8, [x23, #24]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	blr	x8
	ldr	x8, [x23, #24]
	cbnz	x8, LBB0_13
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ,4,2                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timed out waiting for pending tx\n"

	.comm	_IEEE80211_NUM_ACS,4,2          ; @IEEE80211_NUM_ACS
	.comm	_MT76_READING_STATS,4,2         ; @MT76_READING_STATS
.subsections_via_symbols
