	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function estimate_stereo_mode
_estimate_stereo_mode:                  ## @estimate_stereo_mode
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	cmpl	$3, 8(%rdi)
	jl	LBB0_1
## %bb.2:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	$2, %r13d
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %eax
	leal	-1(%r13), %ecx
	imull	%eax, %ecx
	leal	-2(%r13), %edx
	imull	%eax, %edx
	imull	%r13d, %eax
	cltq
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	movq	(%rsi,%rax,4), %xmm0            ## xmm0 = mem[0],zero
	movq	(%rsi,%rcx,4), %xmm1            ## xmm1 = mem[0],zero
	paddd	%xmm1, %xmm1
	psubd	%xmm1, %xmm0
	movq	(%rsi,%rdx,4), %xmm1            ## xmm1 = mem[0],zero
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, -128(%rbp)               ## 16-byte Spill
	movd	%xmm1, %ebx
	movl	%ebx, %edi
	callq	_FFABS
	addq	%rax, %r12
	movaps	-128(%rbp), %xmm0               ## 16-byte Reload
	extractps	$1, %xmm0, %r15d
	movl	%r15d, %edi
	callq	_FFABS
	addq	%rax, %r14
	leal	(%r15,%rbx), %edi
	sarl	%edi
	callq	_FFABS
	addq	%rax, -88(%rbp)                 ## 8-byte Folded Spill
	subl	%r15d, %ebx
	movl	%ebx, %edi
	callq	_FFABS
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	addq	%rax, %rdx
	incl	%r13d
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	cmpl	8(%rax), %r13d
	jl	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%edx, %edx
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
LBB0_4:
	leaq	(%r12,%r14), %rax
	movq	_MLP_CHMODE_LEFT_RIGHT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, -80(%rbp,%rcx,8)
	addq	%rdx, %r12
	movq	_MLP_CHMODE_LEFT_SIDE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r12, -80(%rbp,%rax,8)
	addq	%rdx, %r14
	movq	_MLP_CHMODE_RIGHT_SIDE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r14, -80(%rbp,%rax,8)
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addq	%rdx, %rcx
	movq	_MLP_CHMODE_MID_SIDE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rcx, -80(%rbp,%rax,8)
	movq	-72(%rbp), %rax
	xorl	%ecx, %ecx
	cmpq	-80(%rbp), %rax
	movq	-64(%rbp), %rax
	setl	%cl
	cmpq	-80(%rbp,%rcx,8), %rax
	movl	$2, %eax
	cmovgel	%ecx, %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MLP_CHMODE_LEFT_RIGHT,8,3      ## @MLP_CHMODE_LEFT_RIGHT
	.comm	_MLP_CHMODE_LEFT_SIDE,8,3       ## @MLP_CHMODE_LEFT_SIDE
	.comm	_MLP_CHMODE_RIGHT_SIDE,8,3      ## @MLP_CHMODE_RIGHT_SIDE
	.comm	_MLP_CHMODE_MID_SIDE,8,3        ## @MLP_CHMODE_MID_SIDE
	.no_dead_strip	_estimate_stereo_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function estimate_stereo_mode
_estimate_stereo_mode:                  ; @estimate_stereo_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	w8, [x0, #8]
	cmp	w8, #3
	b.lt	LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x25, #0
	mov	x24, #0
	mov	x23, #0
	mov	x22, #0
	ldr	x26, [x0]
	mov	w27, #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #12]
	mul	w9, w8, w27
	sbfiz	x9, x9, #2, #32
	sub	w10, w27, #1
	mul	w10, w8, w10
	sbfiz	x10, x10, #2, #32
	sub	w11, w27, #2
	mul	w8, w8, w11
	sbfiz	x8, x8, #2, #32
	ldr	d0, [x26, x9]
	ldr	d1, [x26, x10]
	shl.2s	v1, v1, #1
	sub.2s	v0, v0, v1
	ldr	d1, [x26, x8]
	add.2s	v0, v0, v1
	str	q0, [sp]                        ; 16-byte Folded Spill
	fmov	w20, s0
	mov	x0, x20
	bl	_FFABS
	add	x25, x0, x25
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	mov.s	w21, v0[1]
	mov	x0, x21
	bl	_FFABS
	add	x24, x0, x24
	add	w8, w21, w20
	asr	w0, w8, #1
	bl	_FFABS
	add	x23, x0, x23
	sub	w0, w20, w21
	bl	_FFABS
	add	x22, x0, x22
	add	w27, w27, #1
	ldr	w8, [x19, #8]
	cmp	w27, w8
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x22, #0
	mov	x23, #0
	mov	x24, #0
	mov	x25, #0
LBB0_4:
Lloh3:
	adrp	x8, _MLP_CHMODE_LEFT_RIGHT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLP_CHMODE_LEFT_RIGHT@GOTPAGEOFF]
	add	x9, x25, x24
Lloh5:
	ldr	x8, [x8]
	add	x10, sp, #24
	str	x9, [x10, x8, lsl #3]
	add	x8, x25, x22
Lloh6:
	adrp	x9, _MLP_CHMODE_LEFT_SIDE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLP_CHMODE_LEFT_SIDE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	str	x8, [x10, x9, lsl #3]
	add	x8, x24, x22
Lloh9:
	adrp	x9, _MLP_CHMODE_RIGHT_SIDE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MLP_CHMODE_RIGHT_SIDE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	str	x8, [x10, x9, lsl #3]
	add	x8, x23, x22
Lloh12:
	adrp	x9, _MLP_CHMODE_MID_SIDE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MLP_CHMODE_MID_SIDE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	str	x8, [x10, x9, lsl #3]
	ldp	x9, x8, [sp, #24]
	cmp	x8, x9
	cset	w8, lt
	ldr	x9, [sp, #40]
	ldr	x10, [x10, w8, uxtw #3]
	cmp	x9, x10
	mov	w9, #2
	csel	w0, w9, w8, lt
	ldr	x8, [sp, #56]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MLP_CHMODE_LEFT_RIGHT,8,3      ; @MLP_CHMODE_LEFT_RIGHT
	.comm	_MLP_CHMODE_LEFT_SIDE,8,3       ; @MLP_CHMODE_LEFT_SIDE
	.comm	_MLP_CHMODE_RIGHT_SIDE,8,3      ; @MLP_CHMODE_RIGHT_SIDE
	.comm	_MLP_CHMODE_MID_SIDE,8,3        ; @MLP_CHMODE_MID_SIDE
	.no_dead_strip	_estimate_stereo_mode
.subsections_via_symbols
