	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76x02u_restart_pre_tbtt_timer
_mt76x02u_restart_pre_tbtt_timer:       ## @mt76x02u_restart_pre_tbtt_timer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_MT_TBTT_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT_TBTT_TIMER_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_mt76_get_field
	movl	%eax, %ebx
	shll	$5, %ebx
	movq	_MT_TSF_TIMER_DW0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt76_rr
	movq	_MT_TSF_TIMER_DW1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt76_rr
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %ecx
	callq	_dev_dbg
	imulq	$1000000000, 8(%r14), %rax      ## imm = 0x3B9ACA00
	shrq	$10, %rax
	movq	_PRE_TBTT_USEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, %edx
	subl	%ecx, %edx
	jge	LBB0_2
## %bb.1:
	subl	%ebx, %ecx
	imulq	$-1000, %rcx, %rcx              ## imm = 0xFC18
	movslq	%eax, %rsi
	addq	%rcx, %rsi
	jmp	LBB0_3
LBB0_2:
	imulq	$1000, %rdx, %rsi               ## imm = 0x3E8
	addq	%rax, %rsi
LBB0_3:
	movq	_HRTIMER_MODE_REL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_hrtimer_start                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_TBTT_TIMER,4,2              ## @MT_TBTT_TIMER
	.comm	_MT_TBTT_TIMER_VAL,4,2          ## @MT_TBTT_TIMER_VAL
	.comm	_MT_TSF_TIMER_DW0,4,2           ## @MT_TSF_TIMER_DW0
	.comm	_MT_TSF_TIMER_DW1,4,2           ## @MT_TSF_TIMER_DW1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TSF: %llu us TBTT %u us\n"

	.comm	_PRE_TBTT_USEC,4,2              ## @PRE_TBTT_USEC
	.comm	_HRTIMER_MODE_REL,4,2           ## @HRTIMER_MODE_REL
	.no_dead_strip	_mt76x02u_restart_pre_tbtt_timer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76x02u_restart_pre_tbtt_timer
_mt76x02u_restart_pre_tbtt_timer:       ; @mt76x02u_restart_pre_tbtt_timer
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _MT_TBTT_TIMER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_TBTT_TIMER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MT_TBTT_TIMER_VAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT_TBTT_TIMER_VAL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_mt76_get_field
	lsl	w20, w0, #5
Lloh6:
	adrp	x8, _MT_TSF_TIMER_DW0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MT_TSF_TIMER_DW0@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt76_rr
Lloh9:
	adrp	x8, _MT_TSF_TIMER_DW1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT_TSF_TIMER_DW1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt76_rr
	ldr	w0, [x19, #16]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_dbg
	ldr	x8, [x19, #8]
	mov	w9, #51712
	movk	w9, #15258, lsl #16
	mul	x8, x8, x9
	lsr	x8, x8, #10
Lloh14:
	adrp	x9, _PRE_TBTT_USEC@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PRE_TBTT_USEC@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	sub	w10, w20, w9
	mov	w11, #1000
	umaddl	x10, w10, w11, x8
	sub	w11, w9, w20
	mov	x12, #-1000
	mul	x11, x11, x12
	add	x8, x11, w8, sxtw
	cmp	w20, w9
	csel	x1, x10, x8, ge
Lloh17:
	adrp	x8, _HRTIMER_MODE_REL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HRTIMER_MODE_REL@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_hrtimer_start
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_TBTT_TIMER,4,2              ; @MT_TBTT_TIMER
	.comm	_MT_TBTT_TIMER_VAL,4,2          ; @MT_TBTT_TIMER_VAL
	.comm	_MT_TSF_TIMER_DW0,4,2           ; @MT_TSF_TIMER_DW0
	.comm	_MT_TSF_TIMER_DW1,4,2           ; @MT_TSF_TIMER_DW1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TSF: %llu us TBTT %u us\n"

	.comm	_PRE_TBTT_USEC,4,2              ; @PRE_TBTT_USEC
	.comm	_HRTIMER_MODE_REL,4,2           ; @HRTIMER_MODE_REL
	.no_dead_strip	_mt76x02u_restart_pre_tbtt_timer
.subsections_via_symbols
