	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tvtohz                         ## -- Begin function tvtohz
	.p2align	4, 0x90
_tvtohz:                                ## @tvtohz
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	$4, -24(%rbp)
	leaq	L_.str(%rip), %rdi
	leaq	-12(%rbp), %rsi
	leaq	-24(%rbp), %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sysctlbyname
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	movslq	-12(%rbp), %r9
	movl	$1000000, %eax                  ## imm = 0xF4240
	xorl	%edx, %edx
	idivl	%r9d
	movq	8(%rbx), %rdi
	leaq	1000000(%rdi), %rcx
	testq	%rdi, %rdi
	cmovnsq	%rdi, %rcx
	sarq	$63, %rdi
	addq	(%rbx), %rdi
	js	LBB0_3
## %bb.4:
	movl	%eax, %r8d
	movq	_LONG_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	imulq	$1125899907, %rsi, %rax         ## imm = 0x431BDE83
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$50, %rax
	addl	%edx, %eax
	cltq
	cmpq	%rax, %rdi
	jle	LBB0_5
## %bb.8:
	movl	%esi, %eax
	cltd
	idivl	%r9d
	cltq
	cmpq	%rax, %rdi
	jg	LBB0_13
## %bb.9:
	imulq	%r9, %rdi
	movslq	%r8d, %rsi
	leaq	(%rsi,%rcx), %rax
	decq	%rax
	movq	%rax, %rcx
	orq	%rsi, %rcx
	shrq	$32, %rcx
	je	LBB0_10
## %bb.11:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_12
LBB0_3:
	movl	$1, %esi
	jmp	LBB0_13
LBB0_5:
	imulq	$1000000, %rdi, %rax            ## imm = 0xF4240
	movslq	%r8d, %rsi
	addq	%rsi, %rcx
	addq	%rcx, %rax
	decq	%rax
	movq	%rax, %rcx
	orq	%rsi, %rcx
	shrq	$32, %rcx
	je	LBB0_6
## %bb.7:
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %rsi
	incq	%rsi
	jmp	LBB0_13
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r8d
	movl	%eax, %esi
	incq	%rsi
	jmp	LBB0_13
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r8d
                                        ## kill: def $eax killed $eax def $rax
LBB0_12:
	leaq	(%rdi,%rax), %rsi
	incq	%rsi
LBB0_13:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rsi
	cmovbq	%rsi, %rax
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kern.hz"

L_.str.1:                               ## @.str.1
	.asciz	"sysctlbyname kern.hz"

	.comm	_LONG_MAX,4,2                   ## @LONG_MAX
	.comm	_INT_MAX,8,3                    ## @INT_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tvtohz                         ; -- Begin function tvtohz
	.p2align	2
_tvtohz:                                ; @tvtohz
	.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
	mov	x19, x0
	mov	w8, #4
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #12
	mov	x2, sp
	mov	x3, #0
	mov	w4, #0
	bl	_sysctlbyname
	cbz	w0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	mov	w13, #16960
	movk	w13, #15, lsl #16
	ldp	x8, x9, [x19]
	add	x10, x9, x13
	cmp	x9, #0
	csel	x10, x10, x9, lt
	adds	x9, x8, x9, asr #63
	b.mi	LBB0_6
; %bb.3:
	ldrsw	x12, [sp, #12]
	sdiv	w11, w13, w12
Lloh4:
	adrp	x8, _LONG_MAX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LONG_MAX@GOTPAGEOFF]
Lloh6:
	ldrsw	x8, [x8]
	sdiv	w14, w8, w13
	cmp	x9, w14, sxtw
	b.le	LBB0_7
; %bb.4:
	sdiv	w13, w8, w12
	cmp	x9, w13, sxtw
	b.gt	LBB0_9
; %bb.5:
	sub	w8, w11, #1
	add	x8, x10, w8, sxtw
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	sxtw	x10, w11
	udiv	x8, x8, x10
	madd	x8, x9, x12, x8
	b	LBB0_8
LBB0_6:
	mov	w8, #1
	b	LBB0_9
LBB0_7:
	sub	w8, w11, #1
	add	x8, x10, w8, sxtw
	madd	x8, x9, x13, x8
	sxtw	x9, w11
	udiv	x8, x8, x9
LBB0_8:
	add	x8, x8, #1
LBB0_9:
Lloh7:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh8:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x0, x8, x9, lo
                                        ; kill: def $w0 killed $w0 killed $x0
	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	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kern.hz"

l_.str.1:                               ; @.str.1
	.asciz	"sysctlbyname kern.hz"

	.comm	_LONG_MAX,4,2                   ; @LONG_MAX
	.comm	_INT_MAX,8,3                    ; @INT_MAX
.subsections_via_symbols
