	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function calc_stereo_rms
LCPI0_0:
	.quad	0x3c9cd2b297d889bc              ## double 9.9999999999999997E-17
LCPI0_1:
	.quad	0x4056800000000000              ## double 90
LCPI0_2:
	.quad	0xc008000000000000              ## double -3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_calc_stereo_rms:                       ## @calc_stereo_rms
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	testb	$1, %sil
	jne	LBB0_4
## %bb.3:
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movl	%esi, %eax
	cmpl	$1, %esi
	jne	LBB0_6
	jmp	LBB0_8
LBB0_1:
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	jmp	LBB0_8
LBB0_4:
	leal	-1(%rsi), %eax
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	4(%rdi), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm1
	mulss	%xmm0, %xmm0
	addss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	LCPI0_0(%rip), %xmm0
	addq	$8, %rdi
	cmpl	$1, %esi
	je	LBB0_8
LBB0_6:
	movl	%eax, %eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,8), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movss	4(%rdi,%rcx,8), %xmm2           ## xmm2 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm2
	mulss	%xmm1, %xmm1
	addss	%xmm2, %xmm1
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	movss	8(%rdi,%rcx,8), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	movss	12(%rdi,%rcx,8), %xmm2          ## xmm2 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm2
	mulss	%xmm0, %xmm0
	addss	%xmm2, %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	addq	$2, %rcx
	cmpl	%ecx, %eax
	jne	LBB0_7
LBB0_8:
	xorps	%xmm1, %xmm1
	cvtsi2sd	%esi, %xmm1
	divsd	%xmm1, %xmm0
	callq	_log10
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	addsd	LCPI0_1(%rip), %xmm0
	addsd	LCPI0_2(%rip), %xmm0
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_calc_stereo_rms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_stereo_rms
_calc_stereo_rms:                       ; @calc_stereo_rms
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cbz	w1, LBB0_3
; %bb.1:
	sub	w8, w1, #1
	cmp	w8, #15
	b.hs	LBB0_4
; %bb.2:
	mov	x8, #35260
	movk	x8, #38872, lsl #16
	movk	x8, #53938, lsl #32
	movk	x8, #15516, lsl #48
	fmov	d0, x8
	mov	x8, x1
	mov	x9, x0
	b	LBB0_7
LBB0_3:
	mov	x8, #35260
	movk	x8, #38872, lsl #16
	movk	x8, #53938, lsl #32
	movk	x8, #15516, lsl #48
	fmov	d0, x8
	b	LBB0_8
LBB0_4:
	add	x10, x8, #1
	and	x11, x10, #0x1fffffff0
	sub	w8, w1, w11
	add	x9, x0, x11, lsl #3
	add	x12, x0, #64
	mov	x13, #35260
	movk	x13, #38872, lsl #16
	movk	x13, #53938, lsl #32
	movk	x13, #15516, lsl #48
	fmov	d0, x13
	mov	x13, x11
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	x14, x12, #64
	ld2.4s	{ v1, v2 }, [x14]
	sub	x14, x12, #32
	ld2.4s	{ v3, v4 }, [x14]
	mov	x14, x12
	ld2.4s	{ v5, v6 }, [x14], #32
	ld2.4s	{ v16, v17 }, [x14]
	fmul.4s	v7, v2, v2
	fmul.4s	v18, v4, v4
	fmul.4s	v19, v6, v6
	fmul.4s	v20, v17, v17
	fmla.4s	v7, v1, v1
	fmla.4s	v18, v3, v3
	fmla.4s	v19, v5, v5
	fmla.4s	v20, v16, v16
	fcvtl2	v1.2d, v7.4s
	mov	d2, v1[1]
	fcvtl	v3.2d, v7.2s
	mov	d4, v3[1]
	fcvtl2	v5.2d, v18.4s
	mov	d6, v5[1]
	fcvtl	v7.2d, v18.2s
	mov	d16, v7[1]
	fcvtl2	v17.2d, v19.4s
	mov	d18, v17[1]
	fcvtl	v19.2d, v19.2s
	mov	d21, v19[1]
	fcvtl2	v22.2d, v20.4s
	mov	d23, v22[1]
	fcvtl	v20.2d, v20.2s
	mov	d24, v20[1]
	fadd	d0, d0, d3
	fadd	d0, d0, d4
	fadd	d0, d0, d1
	fadd	d0, d0, d2
	fadd	d0, d0, d7
	fadd	d0, d0, d16
	fadd	d0, d0, d5
	fadd	d0, d0, d6
	fadd	d0, d0, d19
	fadd	d0, d0, d21
	fadd	d0, d0, d17
	fadd	d0, d0, d18
	fadd	d0, d0, d20
	fadd	d0, d0, d24
	fadd	d0, d0, d22
	fadd	d0, d0, d23
	add	x12, x12, #128
	subs	x13, x13, #16
	b.ne	LBB0_5
; %bb.6:
	cmp	x10, x11
	b.eq	LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	s1, s2, [x9], #8
	fmul	s2, s2, s2
	fmadd	s1, s1, s1, s2
	fcvt	d1, s1
	fadd	d0, d0, d1
	subs	w8, w8, #1
	b.ne	LBB0_7
LBB0_8:
	scvtf	d1, w1
	fdiv	d0, d0, d1
	bl	_log10
	add	w8, w0, w0, lsl #2
	lsl	w8, w8, #1
	scvtf	d0, w8
	mov	x8, #140737488355328
	movk	x8, #16470, lsl #48
	fmov	d1, x8
	fadd	d0, d0, d1
	fmov	d1, #-3.00000000
	fadd	d0, d0, d1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_calc_stereo_rms
.subsections_via_symbols
