	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clock_rate_calc
_clock_rate_calc:                       ## @clock_rate_calc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	$0, (%rdx)
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r8
	movl	%esi, %r9d
	movl	%esi, %eax
	cltd
	idivl	%edi
	cmpl	$256, %eax                      ## imm = 0x100
	jge	LBB0_4
## %bb.3:
	movl	%eax, %ecx
	xorl	%eax, %eax
	movl	$1, %esi
	jmp	LBB0_22
LBB0_1:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_4:
	movl	%r9d, %eax
	shrl	$31, %eax
	addl	%r9d, %eax
	sarl	%eax
	cltd
	idivl	%edi
	cmpl	$256, %eax                      ## imm = 0x100
	jge	LBB0_6
## %bb.5:
	movl	%eax, %ecx
	movl	$1, %eax
	movl	$2, %esi
	jmp	LBB0_22
LBB0_6:
	leal	3(%r9), %eax
	testl	%r9d, %r9d
	cmovnsl	%r9d, %eax
	sarl	$2, %eax
	cltd
	idivl	%edi
	cmpl	$256, %eax                      ## imm = 0x100
	jge	LBB0_8
## %bb.7:
	movl	%eax, %ecx
	movl	$2, %eax
	movl	$4, %esi
	jmp	LBB0_22
LBB0_8:
	leal	7(%r9), %eax
	testl	%r9d, %r9d
	cmovnsl	%r9d, %eax
	sarl	$3, %eax
	cltd
	idivl	%edi
	cmpl	$256, %eax                      ## imm = 0x100
	jge	LBB0_10
## %bb.9:
	movl	%eax, %ecx
	movl	$3, %eax
	movl	$8, %esi
	jmp	LBB0_22
LBB0_10:
	leal	15(%r9), %eax
	testl	%r9d, %r9d
	cmovnsl	%r9d, %eax
	sarl	$4, %eax
	cltd
	idivl	%edi
	cmpl	$256, %eax                      ## imm = 0x100
	jge	LBB0_12
## %bb.11:
	movl	%eax, %ecx
	movl	$4, %eax
	movl	$16, %esi
	jmp	LBB0_22
LBB0_12:
	leal	31(%r9), %eax
	testl	%r9d, %r9d
	cmovnsl	%r9d, %eax
	sarl	$5, %eax
	cltd
	idivl	%edi
	cmpl	$256, %eax                      ## imm = 0x100
	jge	LBB0_14
## %bb.13:
	movl	%eax, %ecx
	movl	$5, %eax
	movl	$32, %esi
	jmp	LBB0_22
LBB0_14:
	leal	63(%r9), %eax
	testl	%r9d, %r9d
	cmovnsl	%r9d, %eax
	sarl	$6, %eax
	cltd
	idivl	%edi
	cmpl	$256, %eax                      ## imm = 0x100
	jge	LBB0_16
## %bb.15:
	movl	%eax, %ecx
	movl	$6, %eax
	movl	$64, %esi
	jmp	LBB0_22
LBB0_16:
	leal	127(%r9), %eax
	testl	%r9d, %r9d
	cmovnsl	%r9d, %eax
	sarl	$7, %eax
	cltd
	idivl	%edi
	cmpl	$256, %eax                      ## imm = 0x100
	jge	LBB0_18
## %bb.17:
	movl	%eax, %ecx
	movl	$7, %eax
	movl	$128, %esi
	jmp	LBB0_22
LBB0_18:
	leal	255(%r9), %eax
	testl	%r9d, %r9d
	cmovnsl	%r9d, %eax
	sarl	$8, %eax
	cltd
	idivl	%edi
	cmpl	$256, %eax                      ## imm = 0x100
	jge	LBB0_20
## %bb.19:
	movl	%eax, %ecx
	movl	$8, %eax
	movl	$256, %esi                      ## imm = 0x100
	jmp	LBB0_22
LBB0_20:
	leal	511(%r9), %eax
	testl	%r9d, %r9d
	cmovnsl	%r9d, %eax
	sarl	$9, %eax
	cltd
	idivl	%edi
	movl	%eax, %ecx
	movl	$-1, %eax
	cmpl	$255, %ecx
	jg	LBB0_23
## %bb.21:
	movl	$9, %eax
	movl	$512, %esi                      ## imm = 0x200
LBB0_22:
	movl	%eax, (%r8)
	movl	%r9d, %eax
	cltd
	idivl	%esi
	cltd
	idivl	%edi
	movl	%edi, %edx
	subl	%eax, %edx
	movl	%edx, %eax
	cltd
	idivl	%edi
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	addl	$-11, %eax
	cmpl	$-21, %eax
	movl	$-1, %eax
	cmovael	%ecx, %eax
LBB0_23:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_clock_rate_calc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clock_rate_calc
_clock_rate_calc:                       ; @clock_rate_calc
	.cfi_startproc
; %bb.0:
	str	wzr, [x2]
	cbz	w0, LBB0_22
; %bb.1:
	sdiv	w8, w1, w0
	cmp	w8, #256
	b.ge	LBB0_3
; %bb.2:
	mov	w9, #0
	mov	w10, #1
	b	LBB0_21
LBB0_3:
	cmp	w1, #0
	cinc	w8, w1, lt
	asr	w8, w8, #1
	sdiv	w8, w8, w0
	cmp	w8, #256
	b.ge	LBB0_5
; %bb.4:
	mov	w9, #1
	mov	w10, #2
	b	LBB0_21
LBB0_5:
	add	w8, w1, #3
	cmp	w1, #0
	csel	w8, w8, w1, lt
	asr	w8, w8, #2
	sdiv	w8, w8, w0
	cmp	w8, #256
	b.ge	LBB0_7
; %bb.6:
	mov	w9, #2
	mov	w10, #4
	b	LBB0_21
LBB0_7:
	add	w8, w1, #7
	cmp	w1, #0
	csel	w8, w8, w1, lt
	asr	w8, w8, #3
	sdiv	w8, w8, w0
	cmp	w8, #256
	b.ge	LBB0_9
; %bb.8:
	mov	w9, #3
	mov	w10, #8
	b	LBB0_21
LBB0_9:
	add	w8, w1, #15
	cmp	w1, #0
	csel	w8, w8, w1, lt
	asr	w8, w8, #4
	sdiv	w8, w8, w0
	cmp	w8, #256
	b.ge	LBB0_11
; %bb.10:
	mov	w9, #4
	mov	w10, #16
	b	LBB0_21
LBB0_11:
	add	w8, w1, #31
	cmp	w1, #0
	csel	w8, w8, w1, lt
	asr	w8, w8, #5
	sdiv	w8, w8, w0
	cmp	w8, #256
	b.ge	LBB0_13
; %bb.12:
	mov	w9, #5
	mov	w10, #32
	b	LBB0_21
LBB0_13:
	add	w8, w1, #63
	cmp	w1, #0
	csel	w8, w8, w1, lt
	asr	w8, w8, #6
	sdiv	w8, w8, w0
	cmp	w8, #256
	b.ge	LBB0_15
; %bb.14:
	mov	w9, #6
	mov	w10, #64
	b	LBB0_21
LBB0_15:
	add	w8, w1, #127
	cmp	w1, #0
	csel	w8, w8, w1, lt
	asr	w8, w8, #7
	sdiv	w8, w8, w0
	cmp	w8, #256
	b.ge	LBB0_17
; %bb.16:
	mov	w9, #7
	mov	w10, #128
	b	LBB0_21
LBB0_17:
	add	w8, w1, #255
	cmp	w1, #0
	csel	w8, w8, w1, lt
	asr	w8, w8, #8
	sdiv	w8, w8, w0
	cmp	w8, #256
	b.ge	LBB0_19
; %bb.18:
	mov	w9, #8
	mov	w10, #256
	b	LBB0_21
LBB0_19:
	add	w8, w1, #511
	cmp	w1, #0
	csel	w8, w8, w1, lt
	asr	w8, w8, #9
	sdiv	w8, w8, w0
	cmp	w8, #255
	b.gt	LBB0_23
; %bb.20:
	mov	w9, #9
	mov	w10, #512
LBB0_21:
	str	w9, [x2]
	sdiv	w9, w1, w10
	sdiv	w9, w9, w0
	sub	w9, w0, w9
	sdiv	w9, w9, w0
	mov	w10, #1000
	mul	w9, w9, w10
	sub	w9, w9, #11
	cmn	w9, #21
	csinv	w0, w8, wzr, hs
LBB0_22:
	ret
LBB0_23:
	mov	w0, #-1
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_clock_rate_calc
.subsections_via_symbols
