	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_beacon_ensure_primary_slot ## -- Begin function ath9k_beacon_ensure_primary_slot
	.p2align	4, 0x90
_ath9k_beacon_ensure_primary_slot:      ## @ath9k_beacon_ensure_primary_slot
	.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, %r13
	movl	4(%rdi), %edi
	callq	_ath9k_hw_common
	movq	%rax, %r14
	movq	_ATH_BCBUF@GOTPCREL(%rip), %r15
	movl	(%r15), %r12d
	movq	%r13, %rdi
	callq	_tasklet_disable
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.1:
	movq	16(%r13), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rcx,8)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_2
## %bb.5:
	testl	%r12d, %r12d
	jne	LBB0_6
	jmp	LBB0_15
LBB0_16:
	testl	%r12d, %r12d
	je	LBB0_15
LBB0_12:
	movq	16(%r13), %rax
	movq	(%rax), %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_15
## %bb.13:
	movq	(%r15), %r12
	movl	16(%r12), %edi
	callq	_le64_to_cpu
	movq	%rax, %r15
	movq	_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_ath_dbg
	movq	8(%r12), %rdi
	addq	%r15, (%rdi)
	cmpq	%rdi, 8(%r13)
	jne	LBB0_15
## %bb.14:
	addq	$8, %rdi
	xorl	%esi, %esi
	callq	_ath9k_hw_get_tsf_offset
	movl	4(%r13), %edi
	movq	8(%r12), %rcx
	addq	(%rcx), %rax
	movq	%rax, %rsi
	callq	_ath9k_hw_settsf64
	jmp	LBB0_15
LBB0_4:
	movl	%ecx, %r12d
	testl	%r12d, %r12d
	je	LBB0_15
LBB0_6:
	movslq	%r12d, %rcx
	leaq	(,%rcx,8), %r8
	xorl	%esi, %esi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	$0, (%rbx,%rsi,8)
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rsi
	cmpq	%rdi, %rsi
	jge	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rcx,%rsi), %rdx
	movslq	%eax, %rdi
	movq	16(%r13), %rbx
	cmpq	%rdi, %rdx
	jge	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leaq	(%rbx,%r8), %rdx
	movq	(%rdx,%rsi,8), %rdx
	movq	%rdx, (%rbx,%rsi,8)
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rdx), %rax
	movl	%esi, (%rax)
	movl	(%r15), %eax
	movslq	%eax, %rdi
	jmp	LBB0_11
LBB0_15:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tasklet_enable                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH_BCBUF,4,2                  ## @ATH_BCBUF
	.comm	_CONFIG,4,2                     ## @CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Adjusting global TSF after beacon slot reassignment: %lld\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_beacon_ensure_primary_slot ; -- Begin function ath9k_beacon_ensure_primary_slot
	.p2align	2
_ath9k_beacon_ensure_primary_slot:      ; @ath9k_beacon_ensure_primary_slot
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_ath9k_hw_common
	mov	x20, x0
Lloh0:
	adrp	x21, _ATH_BCBUF@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ATH_BCBUF@GOTPAGEOFF]
	ldr	w22, [x21]
	mov	x0, x19
	bl	_tasklet_disable
	ldr	w11, [x21]
	cmp	w11, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x8, #0
	ldr	x9, [x19, #16]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x8, lsl #3]
	cbnz	x10, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x8, #1
	cmp	x11, x8
	b.ne	LBB0_2
; %bb.4:
	cbnz	w22, LBB0_10
	b	LBB0_16
LBB0_5:
	cbz	w22, LBB0_16
LBB0_6:
	ldr	x8, [x19, #16]
	ldr	x21, [x8]
	cmp	x21, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_16
; %bb.7:
	ldr	x22, [x21]
	ldr	w0, [x22, #16]
	bl	_le64_to_cpu
	mov	x21, x0
Lloh2:
	adrp	x8, _CONFIG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CONFIG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x21
	bl	_ath_dbg
	ldr	x8, [x22, #8]
	ldr	x9, [x8]
	add	x9, x9, x21
	str	x9, [x8]
	ldr	x9, [x19, #8]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.8:
	add	x0, x8, #8
	mov	x1, #0
	bl	_ath9k_hw_get_tsf_offset
	ldr	w8, [x19, #4]
	ldr	x9, [x22, #8]
	ldr	x9, [x9]
	add	x1, x9, x0
	mov	x0, x8
	bl	_ath9k_hw_settsf64
	b	LBB0_16
LBB0_9:
	mov	x22, x8
	cbz	w22, LBB0_16
LBB0_10:
	mov	x8, #0
	sxtw	x9, w22
	sbfiz	x10, x22, #3, #32
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	str	xzr, [x13, x8, lsl #3]
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x8, x8, #1
	cmp	x8, x12
	b.ge	LBB0_6
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sxtw	x12, w11
	ldr	x13, [x19, #16]
	add	x14, x9, x8
	cmp	x14, x12
	b.ge	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x14, x13, x10
	lsl	x15, x8, #3
	ldr	x14, [x14, x15]
	str	x14, [x13, x15]
	cbz	x14, LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x11, [x14]
	str	w8, [x11]
	ldr	w11, [x21]
	sxtw	x12, w11
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	b	LBB0_12
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_tasklet_enable
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH_BCBUF,4,2                  ; @ATH_BCBUF
	.comm	_CONFIG,4,2                     ; @CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Adjusting global TSF after beacon slot reassignment: %lld\n"

.subsections_via_symbols
