	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vx_calc_clock_from_freq
_vx_calc_clock_from_freq:               ## @vx_calc_clock_from_freq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	xorl	%edi, %edi
	testl	%esi, %esi
	setle	%dil
	callq	_snd_BUG_ON
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	xorl	%r15d, %r15d
	movl	$282240000, %eax                ## imm = 0x10D2A400
	xorl	%edx, %edx
	idivl	%ebx
	movl	%eax, %r14d
	xorl	%edi, %edi
	cmpl	$5125, %eax                     ## imm = 0x1405
	setl	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	leal	5(%r14), %eax
	cmpl	$10234, %r14d                   ## imm = 0x27FA
	jg	LBB0_4
## %bb.3:
	cltq
	imulq	$1717986919, %rax, %r15         ## imm = 0x66666667
	movq	%r15, %rax
	shrq	$63, %rax
	sarq	$34, %r15
	addl	%eax, %r15d
	addl	$-513, %r15d                    ## imm = 0xFDFF
	jmp	LBB0_8
LBB0_4:
	cmpl	$20474, %r14d                   ## imm = 0x4FFA
	ja	LBB0_6
## %bb.5:
	movzwl	%ax, %eax
	imull	$52429, %eax, %r15d             ## imm = 0xCCCD
	shrl	$20, %r15d
	decl	%r15d
	jmp	LBB0_8
LBB0_6:
	movl	$1534, %r15d                    ## imm = 0x5FE
	cmpl	$40954, %r14d                   ## imm = 0x9FFA
	ja	LBB0_8
## %bb.7:
	movzwl	%ax, %eax
	imull	$52429, %eax, %r15d             ## imm = 0xCCCD
	shrl	$21, %r15d
	addl	$511, %r15d                     ## imm = 0x1FF
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_vx_calc_clock_from_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vx_calc_clock_from_freq
_vx_calc_clock_from_freq:               ; @vx_calc_clock_from_freq
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	cmp	w1, #1
	cset	w0, lt
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_2
; %bb.1:
	mov	w8, #41984
	movk	w8, #4306, lsl #16
	sdiv	w19, w8, w19
	mov	w8, #5125
	cmp	w19, w8
	cset	w0, lt
	bl	_snd_BUG_ON
	cbz	x0, LBB0_4
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	add	w8, w19, #5
	mov	w9, #10234
	cmp	w19, w9
	b.gt	LBB0_6
; %bb.5:
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w9
	sub	w0, w8, #513
	b	LBB0_3
LBB0_6:
	mov	w9, #20474
	cmp	w19, w9
	b.hi	LBB0_8
; %bb.7:
	and	w8, w8, #0xffff
	mov	w9, #52429
	mul	w8, w8, w9
	lsr	w8, w8, #20
	sub	w0, w8, #1
	b	LBB0_3
LBB0_8:
	mov	w9, #40954
	cmp	w19, w9
	b.hi	LBB0_10
; %bb.9:
	and	w8, w8, #0xffff
	mov	w9, #52429
	mul	w8, w8, w9
	lsr	w8, w8, #21
	add	w0, w8, #511
	b	LBB0_3
LBB0_10:
	mov	w0, #1534
	b	LBB0_3
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_vx_calc_clock_from_freq
.subsections_via_symbols
