	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wsm_flush_tx                   ## -- Begin function wsm_flush_tx
	.p2align	4, 0x90
_wsm_flush_tx:                          ## @wsm_flush_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, %rbx
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, -48(%rbp)
	addq	$40, %rdi
	callq	_atomic_read
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_BUG_ON
	movl	$1, %r14d
	cmpl	$0, 8(%rbx)
	je	LBB0_7
## %bb.1:
	cmpl	$0, (%rbx)
	je	LBB0_2
## %bb.8:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_6:
	xorl	%r14d, %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	32(%rbx), %rdi
	leaq	-48(%rbp), %r13
	movq	%r13, %rsi
	movl	$-1, %edx
	callq	_cw1200_queue_get_xmit_timestamp
	movl	%eax, %r12d
	movq	32(%rbx), %rdi
	addq	$4, %rdi
	movq	%r13, %rsi
	movl	$-1, %edx
	callq	_cw1200_queue_get_xmit_timestamp
	movl	%eax, %r13d
	orl	%r12d, %r13d
	movq	32(%rbx), %rdi
	addq	$8, %rdi
	leaq	-48(%rbp), %rsi
	movl	$-1, %edx
	callq	_cw1200_queue_get_xmit_timestamp
	movl	%eax, %r12d
	orl	%r13d, %r12d
	movq	32(%rbx), %rdi
	addq	$12, %rdi
	leaq	-48(%rbp), %rsi
	movl	$-1, %edx
	callq	_cw1200_queue_get_xmit_timestamp
	orl	%r12d, %eax
	je	LBB0_7
## %bb.3:
	movq	_WSM_CMD_LAST_CHANCE_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	-48(%rbp), %rdx
	subq	(%r15), %rdx
	js	LBB0_5
## %bb.4:
	movl	24(%rbx), %edi
	xorl	%esi, %esi
	cmpl	$0, 8(%rbx)
	sete	%sil
	callq	_wait_event_timeout
	testq	%rax, %rax
	jg	LBB0_7
LBB0_5:
	movl	$1, (%rbx)
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_wiphy_err
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_wake_up
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[WSM] Fatal error occurred, will not flush TX.\n"

	.comm	_WSM_CMD_LAST_CHANCE_TIMEOUT,8,3 ## @WSM_CMD_LAST_CHANCE_TIMEOUT
L_.str.1:                               ## @.str.1
	.asciz	"[WSM] TX Frames (%d) stuck in firmware, killing BH\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wsm_flush_tx                   ; -- Begin function wsm_flush_tx
	.p2align	2
_wsm_flush_tx:                          ; @wsm_flush_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _jiffies@GOTPAGE
Lloh1:
	ldr	x21, [x21, _jiffies@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [sp, #8]
	add	x0, x0, #40
	bl	_atomic_read
	cmp	w0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_7
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.2:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_3:
	mov	w0, #0
	b	LBB0_8
LBB0_4:
	ldr	x0, [x19, #32]
	add	x1, sp, #8
	mov	w2, #-1
	bl	_cw1200_queue_get_xmit_timestamp
	mov	x20, x0
	ldr	x8, [x19, #32]
	add	x0, x8, #4
	add	x1, sp, #8
	mov	w2, #-1
	bl	_cw1200_queue_get_xmit_timestamp
	orr	w20, w0, w20
	ldr	x8, [x19, #32]
	add	x0, x8, #8
	add	x1, sp, #8
	mov	w2, #-1
	bl	_cw1200_queue_get_xmit_timestamp
	orr	w20, w0, w20
	ldr	x8, [x19, #32]
	add	x0, x8, #12
	add	x1, sp, #8
	mov	w2, #-1
	bl	_cw1200_queue_get_xmit_timestamp
	orr	w8, w0, w20
	cbz	w8, LBB0_7
; %bb.5:
	ldr	x8, [sp, #8]
Lloh4:
	adrp	x9, _WSM_CMD_LAST_CHANCE_TIMEOUT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _WSM_CMD_LAST_CHANCE_TIMEOUT@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	ldr	x10, [x21]
	add	x8, x9, x8
	subs	x2, x8, x10
	b.mi	LBB0_9
; %bb.6:
	ldr	w0, [x19, #24]
	ldr	w8, [x19, #8]
	cmp	w8, #0
	cset	w1, eq
	bl	_wait_event_timeout
	cmp	x0, #0
	b.le	LBB0_9
LBB0_7:
	mov	w0, #1
LBB0_8:
	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
	add	sp, sp, #64
	ret
LBB0_9:
	mov	w8, #1
	str	w8, [x19]
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	ldr	w2, [x19, #8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wiphy_err
	add	x0, x19, #4
	bl	_wake_up
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[WSM] Fatal error occurred, will not flush TX.\n"

	.comm	_WSM_CMD_LAST_CHANCE_TIMEOUT,8,3 ; @WSM_CMD_LAST_CHANCE_TIMEOUT
l_.str.1:                               ; @.str.1
	.asciz	"[WSM] TX Frames (%d) stuck in firmware, killing BH\n"

.subsections_via_symbols
