	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_check_ibss_tsf
_ath5k_check_ibss_tsf:                  ## @ath5k_check_ibss_tsf
	.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	%rdx, %r15
	movq	%rdi, %r13
	movq	(%rsi), %rbx
	movl	4(%rbx), %edi
	callq	_le16_to_cpu
	movq	_WLAN_CAPABILITY_IBSS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.1:
	movq	%r13, %rdi
	callq	_ath5k_hw_get_tsf64
	movq	%rax, %r12
	movl	(%rbx), %edi
	callq	_le64_to_cpu
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_TSF_TO_TU
	movq	%rax, %rbx
	movq	_ATH5K_DEBUG_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r15), %r8
	movq	%r8, %r9
	subq	%r14, %r9
	movq	%r12, (%rsp)
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_ATH5K_DBG_UNLIMIT
	movq	(%r15), %rcx
	cmpq	%rcx, %r14
	jle	LBB0_3
## %bb.2:
	movq	_ATH5K_DEBUG_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	movq	%r12, %r8
	xorl	%eax, %eax
	callq	_ATH5K_DBG_UNLIMIT
	movq	%r12, (%r15)
LBB0_3:
	cmpq	(%r13), %rbx
	jl	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ath5k_beacon_update_timers
LBB0_5:
	movl	8(%r13), %esi
	movq	%r13, %rdi
	callq	_ath5k_hw_check_beacon_timers
	testl	%eax, %eax
	je	LBB0_7
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ath5k_beacon_update_timers
	movq	_ATH5K_DEBUG_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ATH5K_DBG_UNLIMIT              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WLAN_CAPABILITY_IBSS,4,2       ## @WLAN_CAPABILITY_IBSS
	.comm	_ATH5K_DEBUG_BEACON,4,2         ## @ATH5K_DEBUG_BEACON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"beacon %llx mactime %llx (diff %lld) tsf now %llx\n"

L_.str.1:                               ## @.str.1
	.asciz	"fixing mactime from %llx to %llx\n"

L_.str.2:                               ## @.str.2
	.asciz	"fixed beacon timers after beacon receive\n"

	.no_dead_strip	_ath5k_check_ibss_tsf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_check_ibss_tsf
_ath5k_check_ibss_tsf:                  ; @ath5k_check_ibss_tsf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x2
	mov	x19, x0
	ldr	x21, [x1]
	ldr	w0, [x21, #4]
	bl	_le16_to_cpu
Lloh0:
	adrp	x8, _WLAN_CAPABILITY_IBSS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WLAN_CAPABILITY_IBSS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_ath5k_hw_get_tsf64
	mov	x22, x0
	ldr	w0, [x21]
	bl	_le64_to_cpu
	mov	x21, x0
	mov	x0, x22
	bl	_TSF_TO_TU
	mov	x23, x0
Lloh3:
	adrp	x24, _ATH5K_DEBUG_BEACON@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ATH5K_DEBUG_BEACON@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	x8, [x20]
	sub	x9, x8, x21
	stp	x9, x22, [sp, #16]
	stp	x21, x8, [sp]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_DBG_UNLIMIT
	ldr	x8, [x20]
	cmp	x21, x8
	b.le	LBB0_3
; %bb.2:
	ldr	w1, [x24]
	stp	x8, x22, [sp]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_DBG_UNLIMIT
	str	x22, [x20]
LBB0_3:
	ldr	x8, [x19]
	cmp	x23, x8
	b.lt	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	bl	_ath5k_beacon_update_timers
LBB0_5:
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_ath5k_hw_check_beacon_timers
	cbz	w0, LBB0_7
LBB0_6:
	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
	add	sp, sp, #96
	ret
LBB0_7:
	mov	x0, x19
	mov	x1, x21
	bl	_ath5k_beacon_update_timers
	ldr	w1, [x24]
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	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
	add	sp, sp, #96
	b	_ATH5K_DBG_UNLIMIT
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_WLAN_CAPABILITY_IBSS,4,2       ; @WLAN_CAPABILITY_IBSS
	.comm	_ATH5K_DEBUG_BEACON,4,2         ; @ATH5K_DEBUG_BEACON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"beacon %llx mactime %llx (diff %lld) tsf now %llx\n"

l_.str.1:                               ; @.str.1
	.asciz	"fixing mactime from %llx to %llx\n"

l_.str.2:                               ; @.str.2
	.asciz	"fixed beacon timers after beacon receive\n"

	.no_dead_strip	_ath5k_check_ibss_tsf
.subsections_via_symbols
