	.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_replaygain
LCPI0_0:
	.quad	0xbff0000000000000              ## double -1
LCPI0_1:
	.quad	0xc059000000000000              ## double -100
LCPI0_2:
	.quad	0x4050228f5c28f5c3              ## double 64.540000000000006
LCPI0_3:
	.quad	0xc038000000000000              ## double -24
LCPI0_4:
	.quad	0x4050000000000000              ## double 64
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_calc_replaygain:                       ## @calc_replaygain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_HISTOGRAM_SLOTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	cmpl	$8, %eax
	jae	LBB0_5
## %bb.3:
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_4
LBB0_1:
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_5:
	movl	%eax, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rsi
	movq	%rsi, %r9
	shrq	$3, %r9
	incq	%r9
	movl	%r9d, %r8d
	andl	$3, %r8d
	cmpq	$24, %rsi
	jae	LBB0_7
## %bb.6:
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	jmp	LBB0_9
LBB0_7:
	andq	$-4, %r9
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rsi,4), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	16(%rdi,%rsi,4), %xmm0
	paddd	%xmm1, %xmm0
	movdqu	32(%rdi,%rsi,4), %xmm1
	movdqu	48(%rdi,%rsi,4), %xmm3
	movdqu	64(%rdi,%rsi,4), %xmm4
	paddd	%xmm1, %xmm4
	paddd	%xmm2, %xmm4
	movdqu	80(%rdi,%rsi,4), %xmm2
	paddd	%xmm3, %xmm2
	paddd	%xmm0, %xmm2
	movdqu	96(%rdi,%rsi,4), %xmm0
	paddd	%xmm4, %xmm0
	movdqu	112(%rdi,%rsi,4), %xmm1
	paddd	%xmm2, %xmm1
	addq	$32, %rsi
	addq	$-4, %r9
	jne	LBB0_8
LBB0_9:
	testq	%r8, %r8
	je	LBB0_12
## %bb.10:
	leaq	(%rdi,%rsi,4), %r9
	addq	$16, %r9
	shlq	$5, %r8
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%r9,%rsi), %xmm2
	paddd	%xmm2, %xmm0
	movdqu	(%r9,%rsi), %xmm2
	paddd	%xmm2, %xmm1
	addq	$32, %rsi
	cmpq	%rsi, %r8
	jne	LBB0_11
LBB0_12:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %esi
	cmpq	%rax, %rdx
	je	LBB0_13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	addl	(%rdi,%rdx,4), %esi
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_4
LBB0_13:
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	subq	$1, %rax
	jb	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	addl	(%rdi,%rax,4), %ecx
	leal	(,%rcx,4), %edx
	leal	(%rdx,%rdx,4), %edx
	cmpl	%esi, %edx
	jl	LBB0_14
## %bb.16:
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
LBB0_17:
	divsd	LCPI0_1(%rip), %xmm0
	addsd	LCPI0_2(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movsd	LCPI0_3(%rip), %xmm1            ## xmm1 = mem[0],zero
	movsd	LCPI0_4(%rip), %xmm2            ## xmm2 = mem[0],zero
	popq	%rbp
	jmp	_av_clipf                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HISTOGRAM_SLOTS,4,2            ## @HISTOGRAM_SLOTS
	.no_dead_strip	_calc_replaygain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_replaygain
_calc_replaygain:                       ; @calc_replaygain
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _HISTOGRAM_SLOTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HISTOGRAM_SLOTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	cmp	w8, #16
	b.hs	LBB0_4
; %bb.2:
	mov	x10, #0
	mov	w9, #0
	b	LBB0_7
LBB0_3:
	mov	w9, #0
	mov	x8, #0
	b	LBB0_9
LBB0_4:
	and	x10, x8, #0xfffffff0
	add	x9, x0, #32
	movi.2d	v0, #0000000000000000
	mov	x11, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x9, #-32]
	ldp	q6, q7, [x9], #64
	add.4s	v0, v4, v0
	add.4s	v1, v5, v1
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	subs	x11, x11, #16
	b.ne	LBB0_5
; %bb.6:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w9, s0
	cmp	x10, x8
	b.eq	LBB0_9
LBB0_7:
	add	x11, x0, x10, lsl #2
	sub	x10, x8, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11], #4
	add	w9, w12, w9
	subs	x10, x10, #1
	b.ne	LBB0_8
LBB0_9:
	mov	w10, #0
	sub	x11, x0, #4
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	cbz	x8, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w13, [x11, x8, lsl #2]
	sub	x12, x8, #1
	add	w10, w13, w10
	add	w8, w10, w10, lsl #2
	lsl	w13, w8, #2
	mov	x8, x12
	cmp	w13, w9
	b.lt	LBB0_10
; %bb.12:
	scvtf	d0, w12
	b	LBB0_14
LBB0_13:
	fmov	d0, #-1.00000000
LBB0_14:
	mov	x8, #-4586634745500139520
	fmov	d1, x8
	fdiv	d0, d0, d1
	mov	x8, #62915
	movk	x8, #23592, lsl #16
	movk	x8, #8847, lsl #32
	movk	x8, #16464, lsl #48
	fmov	d1, x8
	fadd	d0, d0, d1
	fcvt	s0, d0
	mov	x8, #4634204016564240384
	fmov	d2, x8
	fmov	d1, #-24.00000000
	b	_av_clipf
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HISTOGRAM_SLOTS,4,2            ; @HISTOGRAM_SLOTS
	.no_dead_strip	_calc_replaygain
.subsections_via_symbols
