	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_beacon_send
_ath5k_beacon_send:                     ## @ath5k_beacon_send
	.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	_ATH5K_DEBUG_BEACON@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdx
	callq	_ATH5K_DBG_UNLIMIT
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_ath5k_hw_num_tx_pending
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_unlikely
	movl	8(%rbx), %ecx
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	incl	%ecx
	movl	%ecx, 8(%rbx)
	movl	(%r12), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ATH5K_DBG
	movl	8(%rbx), %ecx
	cmpl	$11, %ecx
	jl	LBB0_24
## %bb.2:
	movl	(%r12), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ATH5K_DBG
	movq	_ATH5K_DEBUG_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ATH5K_DBG
	movl	40(%rbx), %edi
	addq	$72, %rbx
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ieee80211_queue_work           ## TAILCALL
LBB0_3:
	xorl	%edi, %edi
	testl	%ecx, %ecx
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%r12), %esi
	movl	8(%rbx), %ecx
	leaq	L_.str.4(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ATH5K_DBG
	movl	$0, 8(%rbx)
LBB0_5:
	movq	16(%rbx), %rax
	movq	_NL80211_IFTYPE_AP@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_7
## %bb.6:
	movl	28(%rbx), %ecx
	addl	24(%rbx), %ecx
	cmpl	$1, %ecx
	jg	LBB0_8
LBB0_7:
	movq	_NL80211_IFTYPE_MESH_POINT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.9:
	movq	64(%rbx), %rax
	movq	(%rax), %r14
	testq	%r14, %r14
	jne	LBB0_11
	jmp	LBB0_24
LBB0_8:
	movq	%rbx, %rdi
	callq	_ath5k_hw_get_tsf64
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_TSF_TO_TU
	movl	%eax, %r8d
	movl	32(%rbx), %r9d
	cltd
	idivl	%r9d
	movl	%edx, %eax
	movq	_ATH_BCBUF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	%ecx, %eax
	cltd
	idivl	%r9d
	movl	%eax, %r10d
	movq	64(%rbx), %rsi
	leal	1(%r10), %eax
	cltd
	idivl	%ecx
	movslq	%edx, %rax
	movq	(%rsi,%rax,8), %r14
	movl	(%r12), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rcx
	xorl	%eax, %eax
	pushq	%r14
	pushq	%r10
	callq	_ATH5K_DBG
	addq	$16, %rsp
	testq	%r14, %r14
	je	LBB0_24
LBB0_11:
	movq	(%r14), %rax
	movq	(%rax), %r15
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_ath5k_hw_stop_beacon_queue
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	(%rbx), %rdx
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ATH5K_WARN
LBB0_13:
	movq	16(%rbx), %rax
	cmpq	(%r13), %rax
	je	LBB0_15
## %bb.14:
	movq	_NL80211_IFTYPE_MESH_POINT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
LBB0_15:
	movl	40(%rbx), %edi
	movq	%r14, %rsi
	callq	_ath5k_beacon_update
	testl	%eax, %eax
	jne	LBB0_24
LBB0_16:
	movl	$1, %edi
	cmpq	$0, 16(%r15)
	je	LBB0_19
## %bb.17:
	movq	16(%rbx), %rax
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.18:
	movq	_NL80211_IFTYPE_MONITOR@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
LBB0_19:
	callq	_unlikely
	movq	16(%r15), %rcx
	testq	%rax, %rax
	je	LBB0_20
## %bb.25:
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ATH5K_WARN                     ## TAILCALL
LBB0_20:
	movq	(%rbx), %rdx
	shlq	$2, %rdx
	addq	56(%rbx), %rdx
	movq	%rbx, %rdi
	movq	%rcx, %rsi
	callq	_trace_ath5k_tx
	movq	(%rbx), %rsi
	movq	8(%r15), %rdx
	movq	%rbx, %rdi
	callq	_ath5k_hw_set_txdp
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_ath5k_hw_start_tx_dma
	movl	(%r12), %esi
	movq	(%rbx), %rcx
	movq	8(%r15), %r8
	movl	(%r15), %r9d
	leaq	L_.str.8(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ATH5K_DBG
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	40(%rbx), %edi
	movq	%r14, %rsi
	callq	_ieee80211_get_buffered_bc
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	40(%rbx), %edi
	movq	48(%rbx), %rdx
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	callq	_ath5k_tx_queue
	movq	48(%rbx), %rax
	movq	(%rax), %rcx
	cmpq	8(%rax), %rcx
	jl	LBB0_21
LBB0_23:
	incl	36(%rbx)
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH5K_DEBUG_BEACON,4,2         ## @ATH5K_DEBUG_BEACON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in beacon_send\n"

L_.str.1:                               ## @.str.1
	.asciz	"missed %u consecutive beacons\n"

L_.str.2:                               ## @.str.2
	.asciz	"stuck beacon time (%u missed)\n"

	.comm	_ATH5K_DEBUG_RESET,4,2          ## @ATH5K_DEBUG_RESET
L_.str.3:                               ## @.str.3
	.asciz	"stuck beacon, resetting\n"

L_.str.4:                               ## @.str.4
	.asciz	"resume beacon xmit after %u misses\n"

	.comm	_NL80211_IFTYPE_AP,8,3          ## @NL80211_IFTYPE_AP
	.comm	_NL80211_IFTYPE_MESH_POINT,8,3  ## @NL80211_IFTYPE_MESH_POINT
	.comm	_ATH_BCBUF,4,2                  ## @ATH_BCBUF
L_.str.5:                               ## @.str.5
	.asciz	"tsf %llx tsftu %x intval %u slot %u vif %p\n"

L_.str.6:                               ## @.str.6
	.asciz	"beacon queue %u didn't start/stop ?\n"

	.comm	_NL80211_IFTYPE_STATION,8,3     ## @NL80211_IFTYPE_STATION
	.comm	_NL80211_IFTYPE_MONITOR,8,3     ## @NL80211_IFTYPE_MONITOR
L_.str.7:                               ## @.str.7
	.asciz	"bf=%p bf_skb=%p\n"

L_.str.8:                               ## @.str.8
	.asciz	"TXDP[%u] = %llx (%p)\n"

	.no_dead_strip	_ath5k_beacon_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_beacon_send
_ath5k_beacon_send:                     ; @ath5k_beacon_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
Lloh0:
	adrp	x22, _ATH5K_DEBUG_BEACON@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ATH5K_DEBUG_BEACON@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	bl	_ATH5K_DBG_UNLIMIT
	ldr	x1, [x19]
	mov	x0, x19
	bl	_ath5k_hw_num_tx_pending
	cmp	x0, #0
	cset	w0, ne
	bl	_unlikely
	ldr	w8, [x19, #8]
	cbz	x0, LBB0_3
; %bb.1:
	add	w8, w8, #1
	str	w8, [x19, #8]
	ldr	w1, [x22]
	str	x8, [sp]
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_DBG
	ldr	w8, [x19, #8]
	cmp	w8, #11
	b.lt	LBB0_26
; %bb.2:
	ldr	w1, [x22]
	str	x8, [sp]
Lloh6:
	adrp	x2, l_.str.2@PAGE
Lloh7:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_DBG
Lloh8:
	adrp	x8, _ATH5K_DEBUG_RESET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATH5K_DEBUG_RESET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.3@PAGE
Lloh12:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_DBG
	ldr	w0, [x19, #40]
	add	x1, x19, #72
	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
	add	sp, sp, #112
	b	_ieee80211_queue_work
LBB0_3:
	cmp	w8, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w1, [x22]
	ldr	w8, [x19, #8]
	str	x8, [sp]
Lloh13:
	adrp	x2, l_.str.4@PAGE
Lloh14:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_DBG
	str	wzr, [x19, #8]
LBB0_5:
	ldr	x8, [x19, #16]
Lloh15:
	adrp	x24, _NL80211_IFTYPE_AP@GOTPAGE
Lloh16:
	ldr	x24, [x24, _NL80211_IFTYPE_AP@GOTPAGEOFF]
	ldr	x9, [x24]
Lloh17:
	adrp	x23, _NL80211_IFTYPE_MESH_POINT@GOTPAGE
Lloh18:
	ldr	x23, [x23, _NL80211_IFTYPE_MESH_POINT@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldp	w9, w10, [x19, #24]
	add	w9, w10, w9
	cmp	w9, #1
	b.gt	LBB0_9
LBB0_7:
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.8:
	ldr	x8, [x19, #64]
	ldr	x20, [x8]
	cbnz	x20, LBB0_10
	b	LBB0_26
LBB0_9:
	mov	x0, x19
	bl	_ath5k_hw_get_tsf64
	mov	x21, x0
	bl	_TSF_TO_TU
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x19, #32]
	sdiv	w9, w0, w8
	msub	w9, w9, w8, w0
Lloh19:
	adrp	x10, _ATH_BCBUF@GOTPAGE
Lloh20:
	ldr	x10, [x10, _ATH_BCBUF@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	mul	w9, w10, w9
	sdiv	w9, w9, w8
	ldr	x11, [x19, #64]
	add	w12, w9, #1
	sdiv	w13, w12, w10
	msub	w10, w13, w10, w12
	ldr	x20, [x11, w10, sxtw #3]
	ldr	w1, [x22]
	stp	x9, x20, [sp, #24]
	stp	x0, x8, [sp, #8]
	str	x21, [sp]
Lloh22:
	adrp	x2, l_.str.5@PAGE
Lloh23:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_DBG
	cbz	x20, LBB0_26
LBB0_10:
	ldr	x8, [x20]
	ldr	x21, [x8]
	ldr	x1, [x19]
	mov	x0, x19
	bl	_ath5k_hw_stop_beacon_queue
	bl	_unlikely
	cbz	x0, LBB0_12
; %bb.11:
	ldr	x8, [x19]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.6@PAGE
Lloh25:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_WARN
LBB0_12:
	ldr	x8, [x19, #16]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.13:
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_15
LBB0_14:
	ldr	w0, [x19, #40]
	mov	x1, x20
	bl	_ath5k_beacon_update
	cbnz	w0, LBB0_26
LBB0_15:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_17
; %bb.16:
	ldr	x8, [x19, #16]
Lloh26:
	adrp	x9, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh27:
	ldr	x9, [x9, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
LBB0_17:
	mov	w0, #1
	b	LBB0_19
LBB0_18:
Lloh29:
	adrp	x9, _NL80211_IFTYPE_MONITOR@GOTPAGE
Lloh30:
	ldr	x9, [x9, _NL80211_IFTYPE_MONITOR@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
LBB0_19:
	bl	_unlikely
	ldr	x1, [x21, #16]
	cbz	x0, LBB0_21
; %bb.20:
	stp	x21, x1, [sp]
Lloh32:
	adrp	x1, l_.str.7@PAGE
Lloh33:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_WARN
	b	LBB0_26
LBB0_21:
	ldr	x8, [x19, #56]
	ldr	x9, [x19]
	add	x2, x8, x9, lsl #2
	mov	x0, x19
	bl	_trace_ath5k_tx
	ldr	x1, [x19]
	ldr	x2, [x21, #8]
	mov	x0, x19
	bl	_ath5k_hw_set_txdp
	ldr	x1, [x19]
	mov	x0, x19
	bl	_ath5k_hw_start_tx_dma
	ldr	w1, [x22]
	ldr	x8, [x19]
	ldr	x9, [x21, #8]
	ldr	w10, [x21]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh34:
	adrp	x2, l_.str.8@PAGE
Lloh35:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_DBG
	ldr	w0, [x19, #40]
	mov	x1, x20
	bl	_ieee80211_get_buffered_bc
	cbz	x0, LBB0_25
; %bb.22:
	mov	x1, x0
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #40]
	ldr	x2, [x19, #48]
	mov	x3, #0
	bl	_ath5k_tx_queue
	ldr	x8, [x19, #48]
	ldp	x9, x8, [x8]
	cmp	x9, x8
	b.ge	LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	w0, [x19, #40]
	mov	x1, x20
	bl	_ieee80211_get_buffered_bc
	mov	x1, x0
	cbnz	x0, LBB0_23
LBB0_25:
	ldr	w8, [x19, #36]
	add	w8, w8, #1
	str	w8, [x19, #36]
LBB0_26:
	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
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH5K_DEBUG_BEACON,4,2         ; @ATH5K_DEBUG_BEACON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in beacon_send\n"

l_.str.1:                               ; @.str.1
	.asciz	"missed %u consecutive beacons\n"

l_.str.2:                               ; @.str.2
	.asciz	"stuck beacon time (%u missed)\n"

	.comm	_ATH5K_DEBUG_RESET,4,2          ; @ATH5K_DEBUG_RESET
l_.str.3:                               ; @.str.3
	.asciz	"stuck beacon, resetting\n"

l_.str.4:                               ; @.str.4
	.asciz	"resume beacon xmit after %u misses\n"

	.comm	_NL80211_IFTYPE_AP,8,3          ; @NL80211_IFTYPE_AP
	.comm	_NL80211_IFTYPE_MESH_POINT,8,3  ; @NL80211_IFTYPE_MESH_POINT
	.comm	_ATH_BCBUF,4,2                  ; @ATH_BCBUF
l_.str.5:                               ; @.str.5
	.asciz	"tsf %llx tsftu %x intval %u slot %u vif %p\n"

l_.str.6:                               ; @.str.6
	.asciz	"beacon queue %u didn't start/stop ?\n"

	.comm	_NL80211_IFTYPE_STATION,8,3     ; @NL80211_IFTYPE_STATION
	.comm	_NL80211_IFTYPE_MONITOR,8,3     ; @NL80211_IFTYPE_MONITOR
l_.str.7:                               ; @.str.7
	.asciz	"bf=%p bf_skb=%p\n"

l_.str.8:                               ; @.str.8
	.asciz	"TXDP[%u] = %llx (%p)\n"

	.no_dead_strip	_ath5k_beacon_send
.subsections_via_symbols
