	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_machclk                   ## -- Begin function init_machclk
	.p2align	4, 0x90
_init_machclk:                          ## @init_machclk
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpb	$0, _init_machclk.called(%rip)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_init_machclk_setup
	movb	$1, _init_machclk.called(%rip)
LBB0_2:
	movq	_machclk_usepcc@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.4:
	movq	_tsc_freq@GOTPCREL(%rip), %rdi
	callq	_atomic_load_acq_64
	movq	_machclk_freq@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	leaq	-48(%rbp), %rdi
	callq	_microtime
	xorl	%eax, %eax
	callq	_read_machclk
	movl	%eax, %r14d
	movq	_hz@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_PWAIT@GOTPCREL(%rip), %rax
	movq	_PCATCH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rax), %esi
	leaq	_init_machclk.wait(%rip), %rdi
	leaq	L_.str(%rip), %rdx
	callq	_tsleep
	leaq	-32(%rbp), %rdi
	callq	_microtime
	xorl	%eax, %eax
	callq	_read_machclk
	movl	-24(%rbp), %ecx
	subl	-40(%rbp), %ecx
	imull	$1000000, %ecx, %ecx            ## imm = 0xF4240
	addl	-32(%rbp), %ecx
	subl	-48(%rbp), %ecx
	jne	LBB0_7
## %bb.6:
	movl	(%rbx), %eax
	jmp	LBB0_8
LBB0_3:
	movq	_MACHCLK_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1000000, %eax                  ## imm = 0xF4240
	shll	%cl, %eax
	movq	_machclk_freq@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_8
LBB0_7:
	subl	%r14d, %eax
	imull	$1000000, %eax, %eax            ## imm = 0xF4240
	cltd
	idivl	%ecx
	movl	%eax, (%rbx)
LBB0_8:
	movq	_hz@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	_machclk_per_tick@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_init_machclk.called,1,2 ## @init_machclk.called
	.comm	_machclk_usepcc,8,3             ## @machclk_usepcc
	.comm	_MACHCLK_SHIFT,4,2              ## @MACHCLK_SHIFT
	.comm	_machclk_freq,4,2               ## @machclk_freq
	.comm	_hz,4,2                         ## @hz
	.comm	_machclk_per_tick,4,2           ## @machclk_per_tick
	.comm	_tsc_freq,4,2                   ## @tsc_freq
.zerofill __DATA,__bss,_init_machclk.wait,4,2 ## @init_machclk.wait
	.comm	_PWAIT,4,2                      ## @PWAIT
	.comm	_PCATCH,4,2                     ## @PCATCH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init_machclk"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_machclk                   ; -- Begin function init_machclk
	.p2align	2
_init_machclk:                          ; @init_machclk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	adrp	x19, _init_machclk.called@PAGE
	ldrb	w8, [x19, _init_machclk.called@PAGEOFF]
	tbnz	w8, #0, LBB0_2
; %bb.1:
	bl	_init_machclk_setup
	mov	w8, #1
	strb	w8, [x19, _init_machclk.called@PAGEOFF]
LBB0_2:
Lloh0:
	adrp	x8, _machclk_usepcc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _machclk_usepcc@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x20, _hz@GOTPAGE
Lloh4:
	ldr	x20, [x20, _hz@GOTPAGEOFF]
	cbz	x8, LBB0_6
; %bb.3:
Lloh5:
	adrp	x21, _machclk_freq@GOTPAGE
Lloh6:
	ldr	x21, [x21, _machclk_freq@GOTPAGEOFF]
	ldr	w8, [x21]
	cbnz	w8, LBB0_8
; %bb.4:
	mov	w22, #16960
	movk	w22, #15, lsl #16
	add	x0, sp, #16
	bl	_microtime
	bl	_read_machclk
	mov	x19, x0
Lloh7:
	adrp	x8, _PWAIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PWAIT@GOTPAGEOFF]
	ldr	w3, [x20]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _PCATCH@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PCATCH@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh13:
	adrp	x0, _init_machclk.wait@PAGE
Lloh14:
	add	x0, x0, _init_machclk.wait@PAGEOFF
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	bl	_tsleep
	mov	x0, sp
	bl	_microtime
	bl	_read_machclk
	ldr	w8, [sp, #8]
	ldr	w9, [sp]
	ldr	w10, [sp, #24]
	ldr	w11, [sp, #16]
	sub	w8, w8, w10
	madd	w8, w8, w22, w9
	subs	w8, w8, w11
	b.ne	LBB0_7
; %bb.5:
	ldr	w8, [x21]
	b	LBB0_8
LBB0_6:
Lloh17:
	adrp	x8, _MACHCLK_SHIFT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MACHCLK_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	mov	w9, #16960
	movk	w9, #15, lsl #16
	lsl	w8, w9, w8
Lloh20:
	adrp	x9, _machclk_freq@GOTPAGE
Lloh21:
	ldr	x9, [x9, _machclk_freq@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
	b	LBB0_8
LBB0_7:
	sub	w9, w0, w19
	mul	w9, w9, w22
	sdiv	w8, w9, w8
	str	w8, [x21]
LBB0_8:
	ldr	w9, [x20]
	sdiv	w8, w8, w9
Lloh23:
	adrp	x9, _machclk_per_tick@GOTPAGE
Lloh24:
	ldr	x9, [x9, _machclk_per_tick@GOTPAGEOFF]
Lloh25:
	str	w8, [x9]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_init_machclk.called,1,2 ; @init_machclk.called
	.comm	_machclk_usepcc,8,3             ; @machclk_usepcc
	.comm	_MACHCLK_SHIFT,4,2              ; @MACHCLK_SHIFT
	.comm	_machclk_freq,4,2               ; @machclk_freq
	.comm	_hz,4,2                         ; @hz
	.comm	_machclk_per_tick,4,2           ; @machclk_per_tick
.zerofill __DATA,__bss,_init_machclk.wait,4,2 ; @init_machclk.wait
	.comm	_PWAIT,4,2                      ; @PWAIT
	.comm	_PCATCH,4,2                     ; @PCATCH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init_machclk"

	.comm	_tsc_freq,4,2                   ; @tsc_freq
.subsections_via_symbols
