	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76x02_check_tx_hang
_mt76x02_check_tx_hang:                 ## @mt76x02_check_tx_hang
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_mt76x02_tx_hang
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	(%rbx), %rax
	incq	%rax
	movq	%rax, (%rbx)
	movq	_MT_TX_HANG_TH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.4:
	cmpq	$0, 24(%rbx)
	je	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	callq	_mt76x02_watchdog_reset
	leaq	12(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	$0, 24(%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	incl	16(%rbx)
	movq	$0, (%rbx)
	movl	8(%rbx), %edi
	movl	$255, %esi
	movl	$4, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_memset                         ## TAILCALL
LBB0_3:
	movq	$0, (%rbx)
	cmpq	$0, 24(%rbx)
	jne	LBB0_2
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_TX_HANG_TH,8,3              ## @MT_TX_HANG_TH
	.no_dead_strip	_mt76x02_check_tx_hang
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76x02_check_tx_hang
_mt76x02_check_tx_hang:                 ; @mt76x02_check_tx_hang
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_mt76x02_tx_hang
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
Lloh0:
	adrp	x9, _MT_TX_HANG_TH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MT_TX_HANG_TH@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_mt76x02_watchdog_reset
	add	x20, x19, #12
	mov	x0, x20
	bl	_mutex_lock
	str	xzr, [x19, #24]
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	str	xzr, [x19]
	ldr	w0, [x19, #8]
	mov	w1, #255
	mov	w2, #4
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_memset
LBB0_4:
	str	xzr, [x19]
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_3
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_TX_HANG_TH,8,3              ; @MT_TX_HANG_TH
	.no_dead_strip	_mt76x02_check_tx_hang
.subsections_via_symbols
