	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_tx
_ath9k_tx:                              ## @ath9k_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	8(%r12), %rdi
	callq	_ath9k_hw_common
	movq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rbx
	cmpq	$0, 24(%r12)
	je	LBB0_5
## %bb.1:
	movl	(%rbx), %edi
	callq	_ieee80211_is_data
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	(%rbx), %edi
	callq	_ieee80211_is_nullfunc
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	(%rbx), %edi
	callq	_ieee80211_has_pm
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	movq	_IEEE80211_FCTL_PM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	orl	%eax, (%rbx)
LBB0_5:
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movq	_ATH9K_PM_NETWORK_SLEEP@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_ath9k_ps_wakeup
	leaq	16(%r12), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	8(%r12), %rdi
	movq	_ATH9K_HW_CAP_AUTOSLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rdi)
	jne	LBB0_8
## %bb.7:
	xorl	%esi, %esi
	callq	_ath9k_hw_setrxabort
LBB0_8:
	movl	(%rbx), %edi
	callq	_ieee80211_is_pspoll
	movq	_PS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testq	%rax, %rax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	_PS_WAIT_FOR_PSPOLL_DATA@GOTPCREL(%rip), %rbx
	cmoveq	_PS_WAIT_FOR_TX_ACK@GOTPCREL(%rip), %rbx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	movl	(%rbx), %eax
	orl	%eax, 20(%r12)
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r12, %rdi
	callq	_ath9k_ps_restore
	movq	-72(%rbp), %r14                 ## 8-byte Reload
LBB0_9:
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movq	_ATH9K_PM_FULL_SLEEP@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_ath_err
	jmp	LBB0_13
LBB0_11:
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	(%r12), %rbx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_skb_get_queue_mapping
	movq	(%rbx,%rax,8), %rax
	movq	%rax, -64(%rbp)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_XMIT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r15, %rdi
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_ath_dbg
	movq	%r14, %rdi
	movq	%r13, %rsi
	leaq	-64(%rbp), %rdx
	callq	_ath_tx_start
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movl	(%rbx), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	movq	-64(%rbp), %rax
	movl	(%rax), %esi
	movq	_txfailed@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_TX_STAT_INC
LBB0_13:
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_ieee80211_free_txskb
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PS,4,2                         ## @PS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Add PM=1 for a TX frame while in PS mode\n"

	.comm	_IEEE80211_FCTL_PM,4,2          ## @IEEE80211_FCTL_PM
	.comm	_ATH9K_PM_NETWORK_SLEEP,8,3     ## @ATH9K_PM_NETWORK_SLEEP
	.comm	_ATH9K_HW_CAP_AUTOSLEEP,4,2     ## @ATH9K_HW_CAP_AUTOSLEEP
L_.str.1:                               ## @.str.1
	.asciz	"Sending PS-Poll to pick a buffered frame\n"

	.comm	_PS_WAIT_FOR_PSPOLL_DATA,4,2    ## @PS_WAIT_FOR_PSPOLL_DATA
L_.str.2:                               ## @.str.2
	.asciz	"Wake up to complete TX\n"

	.comm	_PS_WAIT_FOR_TX_ACK,4,2         ## @PS_WAIT_FOR_TX_ACK
	.comm	_ATH9K_PM_FULL_SLEEP,8,3        ## @ATH9K_PM_FULL_SLEEP
L_.str.3:                               ## @.str.3
	.asciz	"TX while HW is in FULL_SLEEP mode\n"

	.comm	_XMIT,4,2                       ## @XMIT
L_.str.4:                               ## @.str.4
	.asciz	"transmitting packet, skb: %p\n"

L_.str.5:                               ## @.str.5
	.asciz	"TX failed\n"

	.comm	_txfailed,4,2                   ## @txfailed
	.no_dead_strip	_ath9k_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_tx
_ath9k_tx:                              ; @ath9k_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x2
	mov	x23, x1
	mov	x20, x0
	ldr	x21, [x0]
	ldr	x0, [x21, #8]
	bl	_ath9k_hw_common
	mov	x22, x0
	ldr	x25, [x19]
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w0, [x25]
	bl	_ieee80211_is_data
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x25]
	bl	_ieee80211_is_nullfunc
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x25]
	bl	_ieee80211_has_pm
	cbnz	w0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _PS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	bl	_ath_dbg
Lloh5:
	adrp	x8, _IEEE80211_FCTL_PM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IEEE80211_FCTL_PM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	ldr	w8, [x25]
	orr	w8, w8, w0
	str	w8, [x25]
LBB0_5:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _ATH9K_PM_NETWORK_SLEEP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ATH9K_PM_NETWORK_SLEEP@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x21
	bl	_ath9k_ps_wakeup
	add	x24, x21, #16
	mov	x0, x24
	bl	_spin_lock_irqsave
	ldr	x0, [x21, #8]
	ldr	w8, [x0, #8]
Lloh11:
	adrp	x9, _ATH9K_HW_CAP_AUTOSLEEP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ATH9K_HW_CAP_AUTOSLEEP@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
	mov	w1, #0
	bl	_ath9k_hw_setrxabort
LBB0_8:
	ldr	w0, [x25]
	bl	_ieee80211_is_pspoll
Lloh14:
	adrp	x8, _PS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PS@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, l_.str.1@PAGE
Lloh18:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh19:
	adrp	x9, l_.str.2@PAGE
Lloh20:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x0, #0
	csel	x2, x9, x8, eq
Lloh21:
	adrp	x8, _PS_WAIT_FOR_TX_ACK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PS_WAIT_FOR_TX_ACK@GOTPAGEOFF]
Lloh23:
	adrp	x9, _PS_WAIT_FOR_PSPOLL_DATA@GOTPAGE
Lloh24:
	ldr	x9, [x9, _PS_WAIT_FOR_PSPOLL_DATA@GOTPAGEOFF]
	csel	x25, x8, x9, eq
	mov	x0, x22
	bl	_ath_dbg
	ldr	w8, [x25]
	ldr	w9, [x21, #20]
	orr	w8, w9, w8
	str	w8, [x21, #20]
	mov	x0, x24
	bl	_spin_unlock_irqrestore
	mov	x0, x21
	bl	_ath9k_ps_restore
LBB0_9:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
Lloh25:
	adrp	x9, _ATH9K_PM_FULL_SLEEP@GOTPAGE
Lloh26:
	ldr	x9, [x9, _ATH9K_PM_FULL_SLEEP@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.10:
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_ath_err
	b	LBB0_13
LBB0_11:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x24, [x21]
	mov	x0, x19
	bl	_skb_get_queue_mapping
	ldr	x8, [x24, x0, lsl #3]
	str	x8, [sp, #16]
	ldr	w8, [x23]
	str	w8, [sp, #24]
Lloh30:
	adrp	x23, _XMIT@GOTPAGE
Lloh31:
	ldr	x23, [x23, _XMIT@GOTPAGEOFF]
	ldr	w1, [x23]
	str	x19, [sp]
Lloh32:
	adrp	x2, l_.str.4@PAGE
Lloh33:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x22
	bl	_ath_dbg
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x19
	bl	_ath_tx_start
	cbz	x0, LBB0_14
; %bb.12:
	ldr	w1, [x23]
Lloh34:
	adrp	x2, l_.str.5@PAGE
Lloh35:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x22
	bl	_ath_dbg
	ldr	x8, [sp, #16]
	ldr	w1, [x8]
Lloh36:
	adrp	x8, _txfailed@GOTPAGE
Lloh37:
	ldr	x8, [x8, _txfailed@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_TX_STAT_INC
LBB0_13:
	mov	x0, x20
	mov	x1, x19
	bl	_ieee80211_free_txskb
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_PS,4,2                         ; @PS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Add PM=1 for a TX frame while in PS mode\n"

	.comm	_IEEE80211_FCTL_PM,4,2          ; @IEEE80211_FCTL_PM
	.comm	_ATH9K_PM_NETWORK_SLEEP,8,3     ; @ATH9K_PM_NETWORK_SLEEP
	.comm	_ATH9K_HW_CAP_AUTOSLEEP,4,2     ; @ATH9K_HW_CAP_AUTOSLEEP
l_.str.1:                               ; @.str.1
	.asciz	"Sending PS-Poll to pick a buffered frame\n"

	.comm	_PS_WAIT_FOR_PSPOLL_DATA,4,2    ; @PS_WAIT_FOR_PSPOLL_DATA
l_.str.2:                               ; @.str.2
	.asciz	"Wake up to complete TX\n"

	.comm	_PS_WAIT_FOR_TX_ACK,4,2         ; @PS_WAIT_FOR_TX_ACK
	.comm	_ATH9K_PM_FULL_SLEEP,8,3        ; @ATH9K_PM_FULL_SLEEP
l_.str.3:                               ; @.str.3
	.asciz	"TX while HW is in FULL_SLEEP mode\n"

	.comm	_XMIT,4,2                       ; @XMIT
l_.str.4:                               ; @.str.4
	.asciz	"transmitting packet, skb: %p\n"

l_.str.5:                               ; @.str.5
	.asciz	"TX failed\n"

	.comm	_txfailed,4,2                   ; @txfailed
	.no_dead_strip	_ath9k_tx
.subsections_via_symbols
