	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_beacon_tasklet           ## -- Begin function ath9k_beacon_tasklet
	.p2align	4, 0x90
_ath9k_beacon_tasklet:                  ## @ath9k_beacon_tasklet
	.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	56(%rdi), %r14
	movq	%r14, %rdi
	callq	_ath9k_hw_common
	movq	%rax, %r15
	movq	_ATH9K_HW_CAP_EDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	4(%r14), %r12d
	movq	_ATH_OP_HW_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_1
## %bb.26:
	movq	_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath_dbg                        ## TAILCALL
LBB0_1:
	movl	28(%rbx), %esi
	movq	%r14, %rdi
	callq	_ath9k_hw_numtxpending
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	incl	8(%rbx)
	movq	%r14, %rdi
	callq	_ath9k_hw_check_nav
	movq	%rbx, %rdi
	callq	_ath_hw_check
	testl	%eax, %eax
	je	LBB0_25
## %bb.3:
	movl	8(%rbx), %ecx
	movq	_BSTUCK_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rbx), %edx
	imull	%eax, %edx
	cmpl	%edx, %ecx
	jge	LBB0_6
## %bb.4:
	movq	_BSTUCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	movl	28(%rbx), %esi
	movq	%r14, %rdi
	callq	_ath9k_hw_stop_dma_queue
	cmpl	$4, 8(%rbx)
	jl	LBB0_25
## %bb.5:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath9k_hw_bstuck_nfcal          ## TAILCALL
LBB0_8:
	movq	%rbx, %rdi
	callq	_ath9k_beacon_choose_slot
	movq	40(%rbx), %rdx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	%eax, %rcx
	movq	(%rdx,%rcx,8), %r13
	testl	%r12d, %r12d
	jne	LBB0_12
## %bb.9:
	xorl	%eax, %eax
	callq	_ath9k_is_chanctx_enabled
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_ATH_CHANCTX_EVENT_BEACON_SENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath_chanctx_beacon_sent_ev
LBB0_11:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ath9k_csa_is_finished
	testq	%rax, %rax
	jne	LBB0_25
LBB0_12:
	testq	%r13, %r13
	je	LBB0_25
## %bb.13:
	cmpl	$0, (%r13)
	je	LBB0_25
## %bb.14:
	xorl	%eax, %eax
	callq	_ath9k_is_chanctx_enabled
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_ATH_CHANCTX_EVENT_BEACON_PREPARE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ath_chanctx_event
LBB0_16:
	movl	48(%rbx), %edi
	movq	%r13, %rsi
	callq	_ath9k_beacon_generate
	movq	%rax, %r13
	movl	8(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_18
## %bb.17:
	movq	_BSTUCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	movl	$0, 8(%rbx)
LBB0_18:
	movq	16(%rbx), %rax
	movq	_UPDATE@GOTPCREL(%rip), %rdx
	movq	_COMMIT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rdx), %rax
	jne	LBB0_20
## %bb.19:
	movq	%rcx, 16(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 24(%rbx)
	jmp	LBB0_23
LBB0_6:
	cmpl	%eax, %ecx
	jl	LBB0_25
## %bb.7:
	movq	_BSTUCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	movl	$0, 8(%rbx)
	movq	_RESET_TYPE_BEACON_STUCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath9k_queue_reset              ## TAILCALL
LBB0_20:
	cmpq	%rcx, %rax
	jne	LBB0_23
## %bb.21:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, 24(%rbx)
	jne	LBB0_23
## %bb.22:
	movl	32(%rbx), %eax
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_ath9k_hw_init_global_settings
	movq	_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
LBB0_23:
	testq	%r13, %r13
	je	LBB0_25
## %bb.24:
	movq	%rbx, %rdi
	callq	_ath9k_reset_beacon_status
	movq	_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r15, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_ath_dbg
	movl	28(%rbx), %esi
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_ath9k_hw_puttxbuf
	testl	%r12d, %r12d
	je	LBB0_27
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movl	28(%rbx), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath9k_hw_txstart               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH9K_HW_CAP_EDMA,4,2          ## @ATH9K_HW_CAP_EDMA
	.comm	_ATH_OP_HW_RESET,4,2            ## @ATH_OP_HW_RESET
	.comm	_RESET,4,2                      ## @RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset work is pending, skip beaconing now\n"

	.comm	_BSTUCK_THRESH,4,2              ## @BSTUCK_THRESH
	.comm	_BSTUCK,4,2                     ## @BSTUCK
L_.str.1:                               ## @.str.1
	.asciz	"missed %u consecutive beacons\n"

L_.str.2:                               ## @.str.2
	.asciz	"beacon is officially stuck\n"

	.comm	_RESET_TYPE_BEACON_STUCK,4,2    ## @RESET_TYPE_BEACON_STUCK
	.comm	_ATH_CHANCTX_EVENT_BEACON_SENT,4,2 ## @ATH_CHANCTX_EVENT_BEACON_SENT
	.comm	_ATH_CHANCTX_EVENT_BEACON_PREPARE,4,2 ## @ATH_CHANCTX_EVENT_BEACON_PREPARE
L_.str.3:                               ## @.str.3
	.asciz	"resume beacon xmit after %u misses\n"

	.comm	_UPDATE,8,3                     ## @UPDATE
	.comm	_COMMIT,8,3                     ## @COMMIT
	.comm	_OK,8,3                         ## @OK
	.comm	_BEACON,4,2                     ## @BEACON
L_.str.4:                               ## @.str.4
	.asciz	"Transmitting beacon for slot: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_beacon_tasklet           ; -- Begin function ath9k_beacon_tasklet
	.p2align	2
_ath9k_beacon_tasklet:                  ; @ath9k_beacon_tasklet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #56]
	mov	x0, x20
	bl	_ath9k_hw_common
	mov	x21, x0
	ldr	w22, [x20, #4]
Lloh0:
	adrp	x8, _ATH9K_HW_CAP_EDMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH9K_HW_CAP_EDMA@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _ATH_OP_HW_RESET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH_OP_HW_RESET@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _RESET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RESET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ath_dbg
LBB0_2:
	ldr	w1, [x19, #28]
	mov	x0, x20
	bl	_ath9k_hw_numtxpending
	cbz	x0, LBB0_7
; %bb.3:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_ath9k_hw_check_nav
	mov	x0, x19
	bl	_ath_hw_check
	cbz	w0, LBB0_26
; %bb.4:
	ldr	w8, [x19, #8]
Lloh11:
	adrp	x9, _BSTUCK_THRESH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BSTUCK_THRESH@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	ldr	w10, [x19]
	mul	w10, w10, w9
	cmp	w8, w10
	b.ge	LBB0_9
; %bb.5:
Lloh14:
	adrp	x9, _BSTUCK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BSTUCK@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_ath_dbg
	ldr	w1, [x19, #28]
	mov	x0, x20
	bl	_ath9k_hw_stop_dma_queue
	ldr	w8, [x19, #8]
	cmp	w8, #4
	b.lt	LBB0_26
; %bb.6:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ath9k_hw_bstuck_nfcal
LBB0_7:
	and	w24, w23, w22
	mov	x0, x19
	bl	_ath9k_beacon_choose_slot
	mov	x22, x0
	ldr	x8, [x19, #40]
	ldr	x23, [x8, w0, sxtw #3]
	cbz	w24, LBB0_11
; %bb.8:
	cbnz	x23, LBB0_14
	b	LBB0_26
LBB0_9:
	cmp	w8, w9
	b.lt	LBB0_26
; %bb.10:
Lloh19:
	adrp	x8, _BSTUCK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BSTUCK@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_ath_dbg
	str	wzr, [x19, #8]
Lloh24:
	adrp	x8, _RESET_TYPE_BEACON_STUCK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RESET_TYPE_BEACON_STUCK@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ath9k_queue_reset
LBB0_11:
	bl	_ath9k_is_chanctx_enabled
	cbz	x0, LBB0_13
; %bb.12:
Lloh27:
	adrp	x8, _ATH_CHANCTX_EVENT_BEACON_SENT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ATH_CHANCTX_EVENT_BEACON_SENT@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath_chanctx_beacon_sent_ev
LBB0_13:
	mov	x0, x19
	mov	x1, x23
	bl	_ath9k_csa_is_finished
	cmp	x0, #0
	ccmp	x23, #0, #4, eq
	b.eq	LBB0_26
LBB0_14:
	ldr	w8, [x23]
	cbz	w8, LBB0_26
; %bb.15:
	bl	_ath9k_is_chanctx_enabled
	cbz	x0, LBB0_17
; %bb.16:
Lloh30:
	adrp	x8, _ATH_CHANCTX_EVENT_BEACON_PREPARE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ATH_CHANCTX_EVENT_BEACON_PREPARE@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x23
	bl	_ath_chanctx_event
LBB0_17:
	ldr	w0, [x19, #48]
	mov	x1, x23
	bl	_ath9k_beacon_generate
	mov	x23, x0
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_19
; %bb.18:
Lloh33:
	adrp	x9, _BSTUCK@GOTPAGE
Lloh34:
	ldr	x9, [x9, _BSTUCK@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh36:
	adrp	x2, l_.str.3@PAGE
Lloh37:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_ath_dbg
	str	wzr, [x19, #8]
LBB0_19:
Lloh38:
	adrp	x8, _UPDATE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _UPDATE@GOTPAGEOFF]
	ldr	x9, [x19, #16]
Lloh40:
	ldr	x10, [x8]
Lloh41:
	adrp	x8, _COMMIT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _COMMIT@GOTPAGEOFF]
Lloh43:
	ldr	x8, [x8]
	cmp	x9, x10
	b.ne	LBB0_21
; %bb.20:
	str	x8, [x19, #16]
	str	w22, [x19, #24]
	b	LBB0_24
LBB0_21:
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.22:
	ldr	w8, [x19, #24]
	cmp	w8, w22
	b.ne	LBB0_24
; %bb.23:
	ldr	w8, [x19, #32]
	str	w8, [x20]
	mov	x0, x20
	bl	_ath9k_hw_init_global_settings
Lloh44:
	adrp	x8, _OK@GOTPAGE
Lloh45:
	ldr	x8, [x8, _OK@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	str	x8, [x19, #16]
LBB0_24:
	cbz	x23, LBB0_26
; %bb.25:
	mov	x0, x19
	bl	_ath9k_reset_beacon_status
Lloh47:
	adrp	x8, _BEACON@GOTPAGE
Lloh48:
	ldr	x8, [x8, _BEACON@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	str	x22, [sp]
Lloh50:
	adrp	x2, l_.str.4@PAGE
Lloh51:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_ath_dbg
	ldr	w1, [x19, #28]
	ldr	w2, [x23]
	mov	x0, x20
	bl	_ath9k_hw_puttxbuf
	cbz	w24, LBB0_27
LBB0_26:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_27:
	ldr	w1, [x19, #28]
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ath9k_hw_txstart
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH9K_HW_CAP_EDMA,4,2          ; @ATH9K_HW_CAP_EDMA
	.comm	_ATH_OP_HW_RESET,4,2            ; @ATH_OP_HW_RESET
	.comm	_RESET,4,2                      ; @RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset work is pending, skip beaconing now\n"

	.comm	_BSTUCK_THRESH,4,2              ; @BSTUCK_THRESH
	.comm	_BSTUCK,4,2                     ; @BSTUCK
l_.str.1:                               ; @.str.1
	.asciz	"missed %u consecutive beacons\n"

l_.str.2:                               ; @.str.2
	.asciz	"beacon is officially stuck\n"

	.comm	_RESET_TYPE_BEACON_STUCK,4,2    ; @RESET_TYPE_BEACON_STUCK
	.comm	_ATH_CHANCTX_EVENT_BEACON_SENT,4,2 ; @ATH_CHANCTX_EVENT_BEACON_SENT
	.comm	_ATH_CHANCTX_EVENT_BEACON_PREPARE,4,2 ; @ATH_CHANCTX_EVENT_BEACON_PREPARE
l_.str.3:                               ; @.str.3
	.asciz	"resume beacon xmit after %u misses\n"

	.comm	_UPDATE,8,3                     ; @UPDATE
	.comm	_COMMIT,8,3                     ; @COMMIT
	.comm	_OK,8,3                         ; @OK
	.comm	_BEACON,4,2                     ; @BEACON
l_.str.4:                               ; @.str.4
	.asciz	"Transmitting beacon for slot: %d\n"

.subsections_via_symbols
