	.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_calc_relative_threshold
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
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ebur128_calc_relative_threshold:       ## @ebur128_calc_relative_threshold
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	$0, (%rdx)
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.1:
	movq	_histogram_energies@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	xorl	%r8d, %r8d
	xorpd	%xmm0, %xmm0
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [1127219200,1160773632,0,0]
	movapd	LCPI0_1(%rip), %xmm2            ## xmm2 = [4.503599627370496E+15,1.9342813113834067E+25]
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	(%rdi,%r8,8), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %r10
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-8(%r10,%rcx,8), %r11
	movq	-8(%r9,%rcx,8), %rbx
	imulq	%r11, %rbx
	addl	%eax, %r11d
	movq	(%r10,%rcx,8), %rax
	movq	%rbx, %xmm3
	punpckldq	%xmm1, %xmm3            ## xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
	subpd	%xmm2, %xmm3
	movapd	%xmm3, %xmm4
	unpckhpd	%xmm3, %xmm4                    ## xmm4 = xmm4[1],xmm3[1]
	addsd	%xmm3, %xmm4
	addsd	%xmm0, %xmm4
	movq	(%r9,%rcx,8), %rbx
	imulq	%rax, %rbx
	movq	%rbx, %xmm3
	punpckldq	%xmm1, %xmm3            ## xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
	subpd	%xmm2, %xmm3
	movapd	%xmm3, %xmm0
	unpckhpd	%xmm3, %xmm0                    ## xmm0 = xmm0[1],xmm3[1]
	addsd	%xmm3, %xmm0
	addsd	%xmm4, %xmm0
                                        ## kill: def $eax killed $eax killed $rax
	addl	%r11d, %eax
	addq	$2, %rcx
	cmpq	$1001, %rcx                     ## imm = 0x3E9
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r8
	cmpq	%rsi, %r8
	jne	LBB0_2
## %bb.5:
	movsd	%xmm0, (%rdx)
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, (%rdx)
	movq	_RELATIVE_GATE_FACTOR@GOTPCREL(%rip), %rcx
	mulsd	(%rcx), %xmm0
	movsd	%xmm0, (%rdx)
	jmp	LBB0_9
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_histogram_energies,8,3         ## @histogram_energies
	.comm	_RELATIVE_GATE_FACTOR,8,3       ## @RELATIVE_GATE_FACTOR
	.no_dead_strip	_ebur128_calc_relative_threshold
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ebur128_calc_relative_threshold
_ebur128_calc_relative_threshold:       ; @ebur128_calc_relative_threshold
	.cfi_startproc
; %bb.0:
	str	xzr, [x2]
	cbz	x1, LBB0_8
; %bb.1:
	mov	x8, x0
	mov	x9, #0
	mov	w0, #0
Lloh0:
	adrp	x10, _histogram_energies@GOTPAGE
Lloh1:
	ldr	x10, [x10, _histogram_energies@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	movi	d0, #0000000000000000
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	mov	x11, #0
	ldr	x12, [x8, x9, lsl #3]
	ldr	x12, [x12]
	ldr	x12, [x12]
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x13, x11, #3
	ldr	x14, [x12, x13]
	ldr	x13, [x10, x13]
	mul	x13, x13, x14
	ucvtf	d1, x13
	fadd	d0, d0, d1
	add	w0, w0, w14
	add	x11, x11, #1
	cmp	x11, #1000
	b.ne	LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	cmp	x9, x1
	b.ne	LBB0_2
; %bb.5:
	str	d0, [x2]
	cbz	w0, LBB0_7
; %bb.6:
	scvtf	d1, w0
	fdiv	d0, d0, d1
	str	d0, [x2]
Lloh3:
	adrp	x8, _RELATIVE_GATE_FACTOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RELATIVE_GATE_FACTOR@GOTPAGEOFF]
Lloh5:
	ldr	d1, [x8]
	fmul	d0, d0, d1
	str	d0, [x2]
LBB0_7:
	ret
LBB0_8:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_histogram_energies,8,3         ; @histogram_energies
	.comm	_RELATIVE_GATE_FACTOR,8,3       ; @RELATIVE_GATE_FACTOR
	.no_dead_strip	_ebur128_calc_relative_threshold
.subsections_via_symbols
