	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function compute_stream_rate
_compute_stream_rate:                   ## @compute_stream_rate
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_NDURSAMPLES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%eax, %eax
	andl	$-8, %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	$0, (%r13)
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	cmpl	$2, %r12d
	jl	LBB0_10
## %bb.1:
	leal	-1(%r12), %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r9d
	shrl	$3, %r9d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	24(%rax), %r11
	movl	$1, %esi
	xorl	%r10d, %r10d
	movl	%r9d, %edi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rsi
	incl	%edi
	addq	$16, %r11
	cmpq	-72(%rbp), %r10                 ## 8-byte Folded Reload
	je	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%r10, %rdx
	cmpl	%edi, %r12d
	movl	%edi, %ecx
	cmovll	%r12d, %ecx
	leal	(%r9,%r10), %eax
	cmpl	%r12d, %eax
	cmovgel	%r12d, %eax
	incq	%r10
	cltq
	cmpq	%rax, %r10
	jge	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	shlq	$4, %rdx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx,%rdx), %rax
	leaq	(%rbx,%rdx), %r8
	addq	$8, %r8
	movq	%r11, %rdx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	addq	$16, %rdx
	decq	%rcx
	cmpq	%rcx, %rsi
	je	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-8(%rdx), %r15
	movq	%r15, %r14
	subq	%rax, %r14
	cmpq	$1944000000, %r14               ## imm = 0x73DF1600
	jg	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpq	%rax, %r15
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	(%rdx), %rbx
	subq	(%r8), %rbx
	jle	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sd	%rbx, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, (%r13)
	addq	$8, %r13
	jmp	LBB0_8
LBB0_10:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	subq	%rbx, %r13
	shrq	$3, %r13
	movq	_dur_compare@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	$8, %edx
	callq	_qsort
	sarl	%r13d
	movslq	%r13d, %rax
	movsd	(%rbx,%rax,8), %xmm0            ## xmm0 = mem[0],zero
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NDURSAMPLES,4,2                ## @NDURSAMPLES
	.comm	_dur_compare,4,2                ## @dur_compare
	.no_dead_strip	_compute_stream_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compute_stream_rate
_compute_stream_rate:                   ; @compute_stream_rate
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _NDURSAMPLES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NDURSAMPLES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mul	w8, w8, w8
	and	w8, w8, #0xfffffff8
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	str	xzr, [x19]
	mov	x13, x19
	cmp	w1, #2
	b.lt	LBB0_10
; %bb.1:
	mov	x17, #0
	sub	w8, w1, #1
	lsr	w9, w1, #3
	add	x10, x0, #24
	mov	w11, #1
	mov	w12, #5632
	movk	w12, #29663, lsl #16
	mov	x14, x9
	mov	x13, x19
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x11, #1
	add	w14, w14, #1
	add	x10, x10, #16
	mov	x17, x15
	cmp	x15, x8
	b.eq	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cmp	w1, w14
	csel	w16, w1, w14, lt
	add	w15, w9, w17
	cmp	w15, w1
	csel	w2, w15, w1, lt
	add	x15, x17, #1
	cmp	x15, w2, sxtw
	b.ge	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x17, x0, x17, lsl #4
	ldr	x2, [x17], #8
	mov	x3, x10
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x3, x3, #16
	sub	x16, x16, #1
	cmp	x11, x16
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	x5, [x3, #-8]
	sub	x4, x5, x2
	cmp	x4, x12
	b.gt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	cmp	x5, x2
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x5, [x3]
	ldr	x6, [x17]
	subs	x5, x5, x6
	b.le	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	scvtf	d0, x4
	scvtf	d1, x5
	fdiv	d0, d0, d1
	str	d0, [x13], #8
	b	LBB0_5
LBB0_10:
	sub	x8, x13, x19
	lsr	x20, x8, #3
Lloh8:
	adrp	x8, _dur_compare@GOTPAGE
Lloh9:
	ldr	x8, [x8, _dur_compare@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #8
	bl	_qsort
	asr	w8, w20, #1
	ldr	d0, [x19, w8, sxtw #3]
	ldur	x8, [x29, #-24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #16
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_NDURSAMPLES,4,2                ; @NDURSAMPLES
	.comm	_dur_compare,4,2                ; @dur_compare
	.no_dead_strip	_compute_stream_rate
.subsections_via_symbols
