	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mesh_sync_adjust_tbtt          ## -- Begin function mesh_sync_adjust_tbtt
	.p2align	4, 0x90
_mesh_sync_adjust_tbtt:                 ## @mesh_sync_adjust_tbtt
	.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	24(%rdi), %r14
	movl	(%rdi), %eax
	shll	$10, %eax
	cltq
	imulq	$1759218605, %rax, %rax         ## imm = 0x68DB8BAD
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$42, %rax
	addl	%ecx, %eax
	movslq	%eax, %r15
	leaq	16(%rdi), %r12
	movq	%r12, %rdi
	callq	_spin_lock_bh
	movq	8(%rbx), %rdx
	cmpq	%r15, %rdx
	jae	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_msync_dbg
	movq	8(%rbx), %r15
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_msync_dbg
	movq	8(%rbx), %r13
	subq	%r15, %r13
LBB0_3:
	movq	%r13, 8(%rbx)
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_drv_get_tsf
	cmpq	$-1, %rax
	je	LBB0_4
## %bb.5:
	subq	%r15, %rax
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drv_set_tsf                    ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TBTT : max clockdrift=%lld; adjusting\n"

L_.str.1:                               ## @.str.1
	.asciz	"TBTT : max clockdrift=%lld; adjusting by %llu\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mesh_sync_adjust_tbtt          ; -- Begin function mesh_sync_adjust_tbtt
	.p2align	2
_mesh_sync_adjust_tbtt:                 ; @mesh_sync_adjust_tbtt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, [x0, #24]
	ldr	w8, [x0]
	lsl	w8, w8, #10
	mov	w9, #35757
	movk	w9, #26843, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #42
	add	w8, w8, w9
	sxtw	x22, w8
	add	x21, x0, #16
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	x2, [x19, #8]
	cmp	x2, x22
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_msync_dbg
	mov	x8, #0
	ldr	x22, [x19, #8]
	b	LBB0_3
LBB0_2:
	str	x22, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_msync_dbg
	ldr	x8, [x19, #8]
	sub	x8, x8, x22
LBB0_3:
	str	x8, [x19, #8]
	mov	x0, x21
	bl	_spin_unlock_bh
	mov	x0, x20
	mov	x1, x19
	bl	_drv_get_tsf
	cmn	x0, #1
	b.eq	LBB0_5
; %bb.4:
	sub	x2, x0, x22
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_drv_set_tsf
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TBTT : max clockdrift=%lld; adjusting\n"

l_.str.1:                               ; @.str.1
	.asciz	"TBTT : max clockdrift=%lld; adjusting by %llu\n"

.subsections_via_symbols
