	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vf610_adc_calculate_rates
_vf610_adc_calculate_rates:             ## @vf610_adc_calculate_rates
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	callq	_clk_get_rate
	movq	%rax, %rbx
	movq	(%r14), %rax
	movq	24(%r14), %rcx
	movq	(%rax,%rcx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_5
LBB0_1:
	movl	$8, %esi
	jmp	LBB0_6
LBB0_3:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_5:
	incl	%eax
	movl	%eax, %edi
	callq	_fls
	movl	$1, %esi
	movl	%eax, %ecx
	shll	%cl, %esi
LBB0_6:
	movl	%esi, 32(%r14)
	movslq	%esi, %rcx
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_7
## %bb.8:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r13
	jmp	LBB0_9
LBB0_7:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %r13d
LBB0_9:
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rcx
	orq	%r13, %rcx
	shrq	$32, %rcx
	je	LBB0_10
## %bb.11:
	xorl	%edx, %edx
	divq	%r13
	movq	%rax, %rcx
	jmp	LBB0_12
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r13d
	movl	%eax, %ecx
LBB0_12:
	movl	36(%r14), %eax
	cltd
	idivl	%ecx
	movl	%eax, %r15d
	movq	_vf610_lst_adder@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_17
## %bb.13:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	cmpl	%r15d, (%rdi,%rbx,4)
	jg	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_14
	jmp	LBB0_17
LBB0_15:
	movl	%ebx, 40(%r14)
LBB0_17:
	movq	_vf610_hw_avgs@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_23
## %bb.18:
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%rcx
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	8(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_23
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movslq	(%rdi,%rbx,4), %rax
	movq	(%r12), %rcx
	movslq	40(%r14), %rdx
	movslq	(%rcx,%rdx,4), %rcx
	addq	$25, %rcx
	imulq	%rax, %rcx
	addq	$6, %rcx
	movq	%r13, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_22
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NSEC_PER_SEC,8,3               ## @NSEC_PER_SEC
	.comm	_vf610_lst_adder,8,3            ## @vf610_lst_adder
	.comm	_vf610_hw_avgs,8,3              ## @vf610_hw_avgs
	.no_dead_strip	_vf610_adc_calculate_rates
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vf610_adc_calculate_rates
_vf610_adc_calculate_rates:             ; @vf610_adc_calculate_rates
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_clk_get_rate
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x9, [x19, #24]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_2
; %bb.1:
	udiv	x8, x20, x8
	add	w0, w8, #1
	bl	_fls
	mov	w8, #1
	lsl	w8, w8, w0
	b	LBB0_3
LBB0_2:
	mov	w8, #8
LBB0_3:
	str	w8, [x19, #32]
	sxtw	x8, w8
Lloh0:
	adrp	x9, _NSEC_PER_SEC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x9]
	ldr	w23, [x19, #36]
Lloh3:
	adrp	x21, _vf610_lst_adder@GOTPAGE
Lloh4:
	ldr	x21, [x21, _vf610_lst_adder@GOTPAGEOFF]
	ldr	x0, [x21]
	udiv	x20, x20, x8
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x22, #0
	udiv	x8, x24, x20
	sdiv	w23, w23, w8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	ldr	w8, [x0, x22, lsl #2]
	cmp	w8, w23
	b.gt	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_5
	b	LBB0_8
LBB0_7:
	str	w22, [x19, #40]
LBB0_8:
Lloh5:
	adrp	x22, _vf610_hw_avgs@GOTPAGE
Lloh6:
	ldr	x22, [x22, _vf610_hw_avgs@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x23, #0
	orr	x24, xzr, #0x6
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldrsw	x8, [x0, x23, lsl #2]
	ldr	x9, [x21]
	ldrsw	x10, [x19, #40]
	ldrsw	x9, [x9, x10, lsl #2]
	add	x9, x9, #25
	madd	x8, x9, x8, x24
	udiv	x8, x20, x8
	ldr	x9, [x19, #8]
	str	x8, [x9, x23, lsl #3]
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.lt	LBB0_10
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_NSEC_PER_SEC,8,3               ; @NSEC_PER_SEC
	.comm	_vf610_lst_adder,8,3            ; @vf610_lst_adder
	.comm	_vf610_hw_avgs,8,3              ; @vf610_hw_avgs
	.no_dead_strip	_vf610_adc_calculate_rates
.subsections_via_symbols
