	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_beacon_generate
_ath9k_beacon_generate:                 ## @ath9k_beacon_generate
	.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	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	movl	24(%r12), %edi
	callq	_ath9k_hw_common
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r15
	movq	8(%r15), %r14
	testq	%r14, %r14
	je	LBB0_9
## %bb.1:
	movq	16(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %r13
	testq	%r13, %r13
	je	LBB0_3
## %bb.2:
	movl	8(%r12), %edi
	movq	(%r14), %rsi
	movl	(%r13), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_unmap_single
	movq	%r13, %rdi
	callq	_dev_kfree_skb_any
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
LBB0_3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_ieee80211_beacon_get
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	%rax, %r13
	movq	%rax, 8(%r14)
	movq	8(%rax), %rax
	movl	(%r15), %ecx
	movl	%ecx, (%rax)
	movq	%r13, %rdi
	callq	_IEEE80211_SKB_CB
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ath_assign_seq
	xorl	%eax, %eax
	callq	_ath9k_is_chanctx_enabled
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_ath9k_beacon_add_noa
LBB0_6:
	movl	8(%r12), %edi
	movq	8(%r13), %rsi
	movl	(%r13), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	%rax, (%r14)
	movl	8(%r12), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%r13, %rdi
	callq	_dev_kfree_skb_any
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ath_err
LBB0_9:
	xorl	%r14d, %r14d
LBB0_16:
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_ieee80211_get_buffered_bc
	movq	%rax, %r13
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	4(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_bh
	movl	(%rbx), %ebx
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	testq	%r13, %r13
	je	LBB0_14
## %bb.11:
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.12:
	movq	(%r12), %rax
	cmpl	$2, (%rax)
	jl	LBB0_14
## %bb.13:
	movq	_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_ath_dbg
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_ath_draintxq
LBB0_14:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_ath9k_beacon_setup
	testq	%r13, %r13
	je	LBB0_16
## %bb.15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_ath_tx_cabq
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma_mapping_error on beaconing\n"

	.comm	_BEACON,4,2                     ## @BEACON
L_.str.1:                               ## @.str.1
	.asciz	"Flushing previous cabq traffic\n"

	.no_dead_strip	_ath9k_beacon_generate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_beacon_generate
_ath9k_beacon_generate:                 ; @ath9k_beacon_generate
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0]
	ldr	w0, [x22, #24]
	bl	_ath9k_hw_common
	ldr	x26, [x20]
	ldr	x19, [x26, #8]
	cbz	x19, LBB0_9
; %bb.1:
	mov	x23, x0
	ldr	x24, [x22, #16]
	ldr	x25, [x19, #8]
Lloh0:
	adrp	x28, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _DMA_TO_DEVICE@GOTPAGEOFF]
	cbz	x25, LBB0_3
; %bb.2:
	ldr	w0, [x22, #8]
	ldr	x1, [x19]
	ldr	w2, [x25]
	ldr	w3, [x28]
	bl	_dma_unmap_single
	mov	x0, x25
	bl	_dev_kfree_skb_any
	stp	xzr, xzr, [x19]
LBB0_3:
	mov	x0, x21
	mov	x1, x20
	bl	_ieee80211_beacon_get
	cbz	x0, LBB0_8
; %bb.4:
	mov	x27, x0
	str	x0, [x19, #8]
	ldr	x8, [x0, #8]
	ldr	w9, [x26]
	str	w9, [x8]
	bl	_IEEE80211_SKB_CB
	mov	x25, x0
	mov	x0, x23
	mov	x1, x27
	bl	_ath_assign_seq
	bl	_ath9k_is_chanctx_enabled
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x22
	mov	x1, x26
	mov	x2, x27
	bl	_ath9k_beacon_add_noa
LBB0_6:
	ldr	w0, [x22, #8]
	ldr	x1, [x27, #8]
	ldr	w2, [x27]
	ldr	w3, [x28]
	bl	_dma_map_single
	mov	x1, x0
	str	x0, [x19]
	ldr	w0, [x22, #8]
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.7:
	mov	x0, x27
	bl	_dev_kfree_skb_any
	stp	xzr, xzr, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_ath_err
LBB0_8:
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	bl	_ieee80211_get_buffered_bc
	mov	x26, x0
	add	x27, x24, #4
	mov	x0, x27
	bl	_spin_lock_bh
	ldr	w28, [x24]
	mov	x0, x27
	bl	_spin_unlock_bh
	cbz	x26, LBB0_14
; %bb.11:
	cbz	w28, LBB0_14
; %bb.12:
	ldr	x8, [x22]
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_14
; %bb.13:
Lloh4:
	adrp	x8, _BEACON@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BEACON@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_ath_dbg
	mov	x0, x22
	mov	x1, x24
	bl	_ath_draintxq
LBB0_14:
	ldr	x8, [x25]
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_ath9k_beacon_setup
	cbz	x26, LBB0_9
; %bb.15:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x26
	bl	_ath_tx_cabq
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma_mapping_error on beaconing\n"

	.comm	_BEACON,4,2                     ; @BEACON
l_.str.1:                               ; @.str.1
	.asciz	"Flushing previous cabq traffic\n"

	.no_dead_strip	_ath9k_beacon_generate
.subsections_via_symbols
