	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___ath9k_flush                  ## -- Begin function __ath9k_flush
	.p2align	4, 0x90
___ath9k_flush:                         ## @__ath9k_flush
	.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
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	24(%rbx), %r12
	movq	%r12, %rdi
	callq	_ath9k_hw_common
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_cancel_delayed_work_sync
	movq	_AH_UNPLUGGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.1:
	movq	_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_2
LBB0_3:
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	_ATH_OP_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_2:
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath_dbg                        ## TAILCALL
LBB0_5:
	leaq	12(%rbx), %rdi
	movq	%rdi, %r14
	callq	_spin_lock_bh
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.6:
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1717986919, %rax, %r15         ## imm = 0x66666667
	movq	%r15, %rax
	shrq	$63, %rax
	sarq	$33, %r15
	addl	%eax, %r15d
	jmp	LBB0_8
LBB0_7:
	movq	16(%rbx), %rax
	movl	(%rax), %r15d
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movq	_CHAN_CTX@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r15d, %edi
	callq	_jiffies_to_msecs
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_ath_dbg
	movl	8(%rbx), %r12d
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_ath9k_has_tx_pending
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	%r12d, %edi
	movl	%r15d, %edx
	callq	_wait_event_timeout
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_13
## %bb.9:
	testq	%rax, %rax
	jg	LBB0_13
## %bb.10:
	movq	%rbx, %rdi
	callq	_ath9k_ps_wakeup
	leaq	4(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_bh
	movq	%rbx, %rdi
	callq	_ath_drain_all_txq
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	testl	%r12d, %r12d
	jne	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ath_reset
LBB0_12:
	movq	%rbx, %rdi
	callq	_ath9k_ps_restore
LBB0_13:
	movq	_ATH_HW_CHECK_POLL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ieee80211_queue_delayed_work   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AH_UNPLUGGED,4,2               ## @AH_UNPLUGGED
	.comm	_ANY,4,2                        ## @ANY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device has been unplugged!\n"

	.comm	_ATH_OP_INVALID,4,2             ## @ATH_OP_INVALID
L_.str.1:                               ## @.str.1
	.asciz	"Device not present\n"

	.comm	_HZ,4,2                         ## @HZ
	.comm	_CHAN_CTX,4,2                   ## @CHAN_CTX
L_.str.2:                               ## @.str.2
	.asciz	"Flush timeout: %d\n"

	.comm	_ATH_HW_CHECK_POLL_INT,4,2      ## @ATH_HW_CHECK_POLL_INT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___ath9k_flush                  ; -- Begin function __ath9k_flush
	.p2align	2
___ath9k_flush:                         ; @__ath9k_flush
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x24, x4
	mov	x22, x3
	mov	x21, x2
	mov	x19, x0
	ldr	x20, [x0]
	ldr	x25, [x20, #24]
	mov	x0, x25
	bl	_ath9k_hw_common
	mov	x23, x0
	mov	x0, x20
	bl	_cancel_delayed_work_sync
	ldr	w8, [x25]
Lloh0:
	adrp	x9, _AH_UNPLUGGED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AH_UNPLUGGED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ANY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
Lloh8:
	adrp	x8, _ATH_OP_INVALID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATH_OP_INVALID@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x23
	bl	_test_bit
	cbz	x0, LBB0_5
; %bb.3:
Lloh11:
	adrp	x8, _ANY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ANY@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x23
	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
	add	sp, sp, #96
	b	_ath_dbg
LBB0_5:
	add	x25, x20, #12
	mov	x0, x25
	bl	_spin_lock_bh
	cbz	w24, LBB0_7
; %bb.6:
Lloh16:
	adrp	x8, _HZ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh18:
	ldrsw	x8, [x8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w24, w8, w9
	b	LBB0_8
LBB0_7:
	ldr	x8, [x20, #16]
	ldr	w24, [x8]
LBB0_8:
	mov	x0, x25
	bl	_spin_unlock_bh
Lloh19:
	adrp	x8, _CHAN_CTX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CHAN_CTX@GOTPAGEOFF]
Lloh21:
	ldr	w25, [x8]
	mov	x0, x24
	bl	_jiffies_to_msecs
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x23
	mov	x1, x25
	bl	_ath_dbg
	ldr	w23, [x20, #8]
	mov	x0, x20
	mov	x1, x22
	bl	_ath9k_has_tx_pending
	cmp	w0, #0
	cset	w1, eq
	mov	x0, x23
	mov	x2, x24
	bl	_wait_event_timeout
	cbz	w21, LBB0_13
; %bb.9:
	cmp	x0, #0
	b.gt	LBB0_13
; %bb.10:
	mov	x0, x20
	bl	_ath9k_ps_wakeup
	add	x21, x20, #4
	mov	x0, x21
	bl	_spin_lock_bh
	mov	x0, x20
	bl	_ath_drain_all_txq
	mov	x22, x0
	mov	x0, x21
	bl	_spin_unlock_bh
	cbnz	w22, LBB0_12
; %bb.11:
	mov	x0, x20
	mov	x1, #0
	bl	_ath_reset
LBB0_12:
	mov	x0, x20
	bl	_ath9k_ps_restore
LBB0_13:
Lloh24:
	adrp	x8, _ATH_HW_CHECK_POLL_INT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ATH_HW_CHECK_POLL_INT@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	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
	add	sp, sp, #96
	b	_ieee80211_queue_delayed_work
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_AH_UNPLUGGED,4,2               ; @AH_UNPLUGGED
	.comm	_ANY,4,2                        ; @ANY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device has been unplugged!\n"

	.comm	_ATH_OP_INVALID,4,2             ; @ATH_OP_INVALID
l_.str.1:                               ; @.str.1
	.asciz	"Device not present\n"

	.comm	_HZ,4,2                         ; @HZ
	.comm	_CHAN_CTX,4,2                   ; @CHAN_CTX
l_.str.2:                               ; @.str.2
	.asciz	"Flush timeout: %d\n"

	.comm	_ATH_HW_CHECK_POLL_INT,4,2      ; @ATH_HW_CHECK_POLL_INT
.subsections_via_symbols
