	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ebur128_gated_loudness
LCPI0_0:
	.long	1127219200                      ## 0x43300000
	.long	1160773632                      ## 0x45300000
	.long	0                               ## 0x0
	.long	0                               ## 0x0
LCPI0_1:
	.quad	0x4330000000000000              ## double 4503599627370496
	.quad	0x4530000000000000              ## double 1.9342813113834067E+25
LCPI0_3:
	.quad	0x8000000000000000              ## double -0
	.quad	0x8000000000000000              ## double -0
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_2:
	.quad	0x43e0000000000000              ## double 9.2233720368547758E+18
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ebur128_gated_loudness:                ## @ebur128_gated_loudness
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	_FF_EBUR128_MODE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rcx,8), %rdx
	movl	(%rdx), %edx
	notl	%edx
	testl	%edx, %eax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	cmpq	%rcx, %r12
	jne	LBB0_3
LBB0_5:
	leaq	-40(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ebur128_calc_relative_threshold
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movsd	-40(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movq	_histogram_energy_boundaries@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_9:
	callq	_find_histogram_index
	movsd	-40(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movq	_histogram_energies@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	ucomisd	(%rcx,%rax,8), %xmm0
	jbe	LBB0_11
## %bb.10:
	incq	%rax
LBB0_11:
	testq	%r12, %r12
	je	LBB0_6
## %bb.12:
	movq	_histogram_energies@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r11
	leaq	1(%rax), %r8
	xorpd	%xmm0, %xmm0
	xorl	%r10d, %r10d
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [1127219200,1160773632,0,0]
	movapd	LCPI0_1(%rip), %xmm2            ## xmm2 = [4.503599627370496E+15,1.9342813113834067E+25]
	movsd	LCPI0_2(%rip), %xmm3            ## xmm3 = mem[0],zero
	movapd	LCPI0_1(%rip), %xmm8            ## xmm8 = [4.503599627370496E+15,1.9342813113834067E+25]
	xorl	%edx, %edx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r10
	cmpq	%r12, %r10
	je	LBB0_21
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	cmpq	$999, %rax                      ## imm = 0x3E7
	ja	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	(%r15,%r10,8), %rdi
	movq	8(%rdi), %rdi
	movq	(%rdi), %rdi
	testb	$1, %al
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rax, %rbx
	cmpq	$999, %rax                      ## imm = 0x3E7
	je	LBB0_20
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movsd	(%rdi,%rax,8), %xmm5            ## xmm5 = mem[0],zero
	movsd	(%r11,%rax,8), %xmm6            ## xmm6 = mem[0],zero
	mulsd	%xmm5, %xmm6
	addsd	%xmm6, %xmm0
	movq	%rdx, %xmm6
	punpckldq	%xmm1, %xmm6            ## xmm6 = xmm6[0],xmm1[0],xmm6[1],xmm1[1]
	subpd	%xmm8, %xmm6
	movapd	%xmm6, %xmm7
	unpckhpd	%xmm6, %xmm7                    ## xmm7 = xmm7[1],xmm6[1]
	addsd	%xmm6, %xmm7
	addsd	%xmm5, %xmm7
	cvttsd2si	%xmm7, %r9
	movq	%r9, %rbx
	sarq	$63, %rbx
	subsd	%xmm3, %xmm7
	cvttsd2si	%xmm7, %rdx
	andq	%rbx, %rdx
	orq	%r9, %rdx
	movq	%r8, %rbx
	cmpq	$999, %rax                      ## imm = 0x3E7
	je	LBB0_20
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rbx
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsd	-8(%rdi,%rbx,8), %xmm6          ## xmm6 = mem[0],zero
	movsd	(%rdi,%rbx,8), %xmm5            ## xmm5 = mem[0],zero
	movsd	-8(%r11,%rbx,8), %xmm7          ## xmm7 = mem[0],zero
	mulsd	%xmm6, %xmm7
	addsd	%xmm0, %xmm7
	movq	%rdx, %xmm4
	punpckldq	%xmm1, %xmm4            ## xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
	subpd	%xmm2, %xmm4
	movapd	%xmm4, %xmm0
	unpckhpd	%xmm4, %xmm0                    ## xmm0 = xmm0[1],xmm4[1]
	addsd	%xmm4, %xmm0
	addsd	%xmm6, %xmm0
	cvttsd2si	%xmm0, %rsi
	movq	%rsi, %rdx
	sarq	$63, %rdx
	subsd	%xmm3, %xmm0
	cvttsd2si	%xmm0, %rcx
	andq	%rdx, %rcx
	orq	%rsi, %rcx
	movsd	(%r11,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	mulsd	%xmm5, %xmm0
	addsd	%xmm7, %xmm0
	movq	%rcx, %xmm4
	punpckldq	%xmm1, %xmm4            ## xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
	subpd	%xmm2, %xmm4
	movapd	%xmm4, %xmm6
	unpckhpd	%xmm4, %xmm6                    ## xmm6 = xmm6[1],xmm4[1]
	addsd	%xmm4, %xmm6
	addsd	%xmm5, %xmm6
	cvttsd2si	%xmm6, %rcx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subsd	%xmm3, %xmm6
	cvttsd2si	%xmm6, %rdx
	andq	%rsi, %rdx
	orq	%rcx, %rdx
	addq	$2, %rbx
	cmpq	$1001, %rbx                     ## imm = 0x3E9
	jne	LBB0_19
	jmp	LBB0_20
LBB0_21:
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.22:
	movq	%rdx, %xmm1
	punpckldq	LCPI0_0(%rip), %xmm1    ## xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
	subpd	LCPI0_1(%rip), %xmm1
	movapd	%xmm1, %xmm2
	unpckhpd	%xmm1, %xmm2                    ## xmm2 = xmm2[1],xmm1[1]
	addsd	%xmm1, %xmm2
	divsd	%xmm2, %xmm0
	callq	_ebur128_energy_to_loudness
	movsd	%xmm0, (%r14)
	jmp	LBB0_23
LBB0_6:
	movq	_HUGE_VAL@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	xorpd	LCPI0_3(%rip), %xmm0
	movlpd	%xmm0, (%r14)
LBB0_23:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FF_EBUR128_MODE_I,4,2          ## @FF_EBUR128_MODE_I
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HUGE_VAL,8,3                   ## @HUGE_VAL
	.comm	_histogram_energy_boundaries,8,3 ## @histogram_energy_boundaries
	.comm	_histogram_energies,8,3         ## @histogram_energies
	.no_dead_strip	_ebur128_gated_loudness
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ebur128_gated_loudness
_ebur128_gated_loudness:                ; @ebur128_gated_loudness
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	cbz	x1, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _FF_EBUR128_MODE_I@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FF_EBUR128_MODE_I@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	x9, x21
	mov	x10, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9]
	ldr	w11, [x11]
	bics	wzr, w8, w11
	b.ne	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #8
	subs	x10, x10, #1
	b.ne	LBB0_2
LBB0_4:
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x20
	bl	_ebur128_calc_relative_threshold
	cbz	w0, LBB0_18
; %bb.5:
Lloh3:
	adrp	x8, _histogram_energy_boundaries@GOTPAGE
Lloh4:
	ldr	x8, [x8, _histogram_energy_boundaries@GOTPAGEOFF]
	ldr	d0, [sp, #8]
Lloh5:
	ldr	x8, [x8]
	ldr	d1, [x8]
	fcmp	d0, d1
Lloh6:
	adrp	x22, _histogram_energies@GOTPAGE
Lloh7:
	ldr	x22, [x22, _histogram_energies@GOTPAGEOFF]
	b.pl	LBB0_8
; %bb.6:
	mov	x0, #0
	b	LBB0_10
LBB0_7:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	b	_AVERROR
LBB0_8:
	bl	_find_histogram_index
	ldr	d0, [sp, #8]
	ldr	x8, [x22]
	ldr	d1, [x8, x0, lsl #3]
	fcmp	d0, d1
	b.le	LBB0_10
; %bb.9:
	add	x0, x0, #1
LBB0_10:
	cbz	x20, LBB0_18
; %bb.11:
	mov	x9, #0
	mov	x8, #0
	ldr	x10, [x22]
	movi	d0, #0000000000000000
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x9, x9, #1
	cmp	x9, x20
	b.eq	LBB0_16
LBB0_13:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	cmp	x0, #999
	b.hi	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x11, [x21, x9, lsl #3]
	ldr	x11, [x11, #8]
	ldr	x11, [x11]
	mov	x12, x0
LBB0_15:                                ;   Parent Loop BB0_13 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x13, x12, #3
	ldr	d1, [x11, x13]
	ldr	d2, [x10, x13]
	ucvtf	d3, x8
	fmadd	d0, d1, d2, d0
	fadd	d1, d1, d3
	fcvtzu	x8, d1
	add	x12, x12, #1
	cmp	x12, #1000
	b.ne	LBB0_15
	b	LBB0_12
LBB0_16:
	cbz	x8, LBB0_18
; %bb.17:
	ucvtf	d1, x8
	fdiv	d0, d0, d1
	bl	_ebur128_energy_to_loudness
	b	LBB0_19
LBB0_18:
Lloh11:
	adrp	x8, _HUGE_VAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HUGE_VAL@GOTPAGEOFF]
Lloh13:
	ldr	d0, [x8]
	fneg	d0, d0
LBB0_19:
	str	d0, [x19]
	mov	w0, #0
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FF_EBUR128_MODE_I,4,2          ; @FF_EBUR128_MODE_I
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HUGE_VAL,8,3                   ; @HUGE_VAL
	.comm	_histogram_energy_boundaries,8,3 ; @histogram_energy_boundaries
	.comm	_histogram_energies,8,3         ; @histogram_energies
	.no_dead_strip	_ebur128_gated_loudness
.subsections_via_symbols
