	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_drift
_read_drift:                            ## @read_drift
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	leaq	L_.str.1(%rip), %rsi
	leaq	-16(%rbp), %rdx
	leaq	-12(%rbp), %rcx
	movq	%rax, %rdi
	callq	_fscanf
	movq	%rbx, %rdi
	callq	_fclose
	movslq	-16(%rbp), %rsi
	movl	-12(%rbp), %edx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_LPRINTF
	movl	-16(%rbp), %eax
	movq	_USECSCALE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	-12(%rbp), %edx
	shll	%cl, %edx
	movslq	%edx, %rdx
	imulq	$274877907, %rdx, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$38, %rdx
	addl	%esi, %edx
	movl	%edx, -12(%rbp)
	movl	$1, %esi
	shll	%cl, %esi
	andl	%edx, %esi
	addl	%eax, %esi
	movq	_accum_drift@GOTPCREL(%rip), %rax
	movl	%esi, (%rax)
	movslq	%esi, %rsi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_LPRINTF
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

L_.str.1:                               ## @.str.1
	.asciz	"%4d.%03d"

L_.str.2:                               ## @.str.2
	.asciz	"read_drift: %d.%03d ppm "

	.comm	_USECSCALE,4,2                  ## @USECSCALE
	.comm	_accum_drift,4,2                ## @accum_drift
L_.str.3:                               ## @.str.3
	.asciz	"read_drift: drift_comp %ld "

	.no_dead_strip	_read_drift
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_drift
_read_drift:                            ; @read_drift
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	str	xzr, [sp, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #12
	add	x3, sp, #8
	bl	_fscanf
	mov	x0, x19
	bl	_fclose
	ldp	w8, w1, [sp, #8]
                                        ; kill: def $w1 killed $w1 def $x1
	sxtw	x1, w1
	str	x8, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_LPRINTF
	ldp	w10, w8, [sp, #8]
Lloh6:
	adrp	x9, _USECSCALE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _USECSCALE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	lsl	w10, w10, w9
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	smull	x10, w10, w11
	mov	w11, #1
	lsl	w9, w11, w9
	lsr	x11, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w11
	and	w9, w10, w9
	str	w10, [sp, #8]
	add	w8, w9, w8
Lloh9:
	adrp	x9, _accum_drift@GOTPAGE
Lloh10:
	ldr	x9, [x9, _accum_drift@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
	sxtw	x1, w8
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_LPRINTF
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

l_.str.1:                               ; @.str.1
	.asciz	"%4d.%03d"

l_.str.2:                               ; @.str.2
	.asciz	"read_drift: %d.%03d ppm "

	.comm	_USECSCALE,4,2                  ; @USECSCALE
	.comm	_accum_drift,4,2                ; @accum_drift
l_.str.3:                               ; @.str.3
	.asciz	"read_drift: drift_comp %ld "

	.no_dead_strip	_read_drift
.subsections_via_symbols
