	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alac_stereo_decorrelation
_alac_stereo_decorrelation:             ## @alac_stereo_decorrelation
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	8(%rax), %rbx
	movl	8(%rdi), %r12d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_estimate_stereo_mode
	xorl	%ecx, %ecx
	cmpl	$130, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.3:
	movl	$31, %ecx
	movl	$1, %r8d
	testl	%r12d, %r12d
	jle	LBB0_48
## %bb.4:
	cmpl	$8, %r12d
	jb	LBB0_5
## %bb.13:
	leaq	(%r15,%r12,4), %rdx
	cmpq	%rdx, %rbx
	jae	LBB0_22
## %bb.14:
	leaq	(%rbx,%r12,4), %rdx
	cmpq	%rdx, %r15
	jae	LBB0_22
LBB0_5:
	xorl	%edx, %edx
LBB0_25:
	movq	%rdx, %rsi
	notq	%rsi
	testb	$1, %r12b
	je	LBB0_27
## %bb.26:
	movl	(%rbx,%rdx,4), %edi
	movl	(%r15,%rdx,4), %eax
	subl	%edi, %eax
	movl	%eax, (%rbx,%rdx,4)
	sarl	$31, %eax
	addl	%edi, %eax
	movl	%eax, (%r15,%rdx,4)
	orq	$1, %rdx
LBB0_27:
	addq	%r12, %rsi
	je	LBB0_48
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rdx,4), %eax
	movl	(%r15,%rdx,4), %esi
	subl	%eax, %esi
	movl	%esi, (%rbx,%rdx,4)
	sarl	$31, %esi
	addl	%eax, %esi
	movl	%esi, (%r15,%rdx,4)
	movl	4(%rbx,%rdx,4), %eax
	movl	4(%r15,%rdx,4), %esi
	subl	%eax, %esi
	movl	%esi, 4(%rbx,%rdx,4)
	sarl	$31, %esi
	addl	%eax, %esi
	movl	%esi, 4(%r15,%rdx,4)
	addq	$2, %rdx
	cmpq	%rdx, %r12
	jne	LBB0_28
	jmp	LBB0_48
LBB0_6:
	xorl	%r8d, %r8d
	jmp	LBB0_48
LBB0_7:
	movl	$1, %r8d
	testl	%r12d, %r12d
	jle	LBB0_48
## %bb.8:
	cmpl	$8, %r12d
	jb	LBB0_9
## %bb.16:
	leaq	(%r15,%r12,4), %rax
	cmpq	%rax, %rbx
	jae	LBB0_29
## %bb.17:
	leaq	(%rbx,%r12,4), %rax
	cmpq	%rax, %r15
	jae	LBB0_29
LBB0_9:
	xorl	%edx, %edx
LBB0_44:
	movq	%rdx, %rsi
	notq	%rsi
	addq	%r12, %rsi
	movq	%r12, %rcx
	andq	$3, %rcx
	je	LBB0_46
	.p2align	4, 0x90
LBB0_45:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rdx,4), %eax
	subl	(%rbx,%rdx,4), %eax
	movl	%eax, (%rbx,%rdx,4)
	incq	%rdx
	decq	%rcx
	jne	LBB0_45
LBB0_46:
	xorl	%ecx, %ecx
	cmpq	$3, %rsi
	jb	LBB0_48
	.p2align	4, 0x90
LBB0_47:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rdx,4), %eax
	subl	(%rbx,%rdx,4), %eax
	movl	%eax, (%rbx,%rdx,4)
	movl	4(%r15,%rdx,4), %eax
	subl	4(%rbx,%rdx,4), %eax
	movl	%eax, 4(%rbx,%rdx,4)
	movl	8(%r15,%rdx,4), %eax
	subl	8(%rbx,%rdx,4), %eax
	movl	%eax, 8(%rbx,%rdx,4)
	movl	12(%r15,%rdx,4), %eax
	subl	12(%rbx,%rdx,4), %eax
	movl	%eax, 12(%rbx,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %r12
	jne	LBB0_47
	jmp	LBB0_48
LBB0_10:
	movl	$1, %r8d
	testl	%r12d, %r12d
	jle	LBB0_39
## %bb.11:
	cmpl	$8, %r12d
	jb	LBB0_12
## %bb.19:
	leaq	(%rbx,%r12,4), %rax
	cmpq	%rax, %r15
	jae	LBB0_32
## %bb.20:
	leaq	(%r15,%r12,4), %rax
	cmpq	%rax, %rbx
	jae	LBB0_32
LBB0_12:
	xorl	%ecx, %ecx
LBB0_35:
	movq	%rcx, %rdx
	notq	%rdx
	testb	$1, %r12b
	je	LBB0_37
## %bb.36:
	movl	(%r15,%rcx,4), %eax
	movl	(%rbx,%rcx,4), %esi
	addl	%eax, %esi
	sarl	%esi
	movl	%esi, (%r15,%rcx,4)
	subl	(%rbx,%rcx,4), %eax
	movl	%eax, (%rbx,%rcx,4)
	orq	$1, %rcx
LBB0_37:
	addq	%r12, %rdx
	je	LBB0_39
	.p2align	4, 0x90
LBB0_38:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rcx,4), %eax
	movl	(%rbx,%rcx,4), %edx
	addl	%eax, %edx
	sarl	%edx
	movl	%edx, (%r15,%rcx,4)
	subl	(%rbx,%rcx,4), %eax
	movl	%eax, (%rbx,%rcx,4)
	movl	4(%r15,%rcx,4), %eax
	movl	4(%rbx,%rcx,4), %edx
	addl	%eax, %edx
	sarl	%edx
	movl	%edx, 4(%r15,%rcx,4)
	subl	4(%rbx,%rcx,4), %eax
	movl	%eax, 4(%rbx,%rcx,4)
	addq	$2, %rcx
	cmpq	%rcx, %r12
	jne	LBB0_38
	jmp	LBB0_39
LBB0_22:
	movl	%r12d, %edx
	andl	$-8, %edx
	leaq	(,%r12,4), %rsi
	andq	$-32, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rbx,%rdi), %xmm0
	movdqu	16(%rbx,%rdi), %xmm1
	movdqu	(%r15,%rdi), %xmm2
	movdqu	16(%r15,%rdi), %xmm3
	psubd	%xmm0, %xmm2
	psubd	%xmm1, %xmm3
	movdqu	%xmm2, (%rbx,%rdi)
	movdqu	%xmm3, 16(%rbx,%rdi)
	psrad	$31, %xmm2
	psrad	$31, %xmm3
	paddd	%xmm0, %xmm2
	paddd	%xmm1, %xmm3
	movdqu	%xmm2, (%r15,%rdi)
	movdqu	%xmm3, 16(%r15,%rdi)
	addq	$32, %rdi
	cmpq	%rdi, %rsi
	jne	LBB0_23
## %bb.24:
	cmpq	%r12, %rdx
	je	LBB0_48
	jmp	LBB0_25
LBB0_29:
	movl	%r12d, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rax
	movq	%rax, %rsi
	shrq	$3, %rsi
	incq	%rsi
	testq	%rax, %rax
	je	LBB0_40
## %bb.30:
	movq	%rsi, %rdi
	andq	$-2, %rdi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r15,%rcx,4), %xmm0
	movdqu	16(%r15,%rcx,4), %xmm1
	movdqu	(%rbx,%rcx,4), %xmm2
	psubd	%xmm2, %xmm0
	movdqu	16(%rbx,%rcx,4), %xmm2
	psubd	%xmm2, %xmm1
	movdqu	32(%rbx,%rcx,4), %xmm2
	movdqu	48(%rbx,%rcx,4), %xmm3
	movdqu	%xmm0, (%rbx,%rcx,4)
	movdqu	%xmm1, 16(%rbx,%rcx,4)
	movdqu	32(%r15,%rcx,4), %xmm0
	psubd	%xmm2, %xmm0
	movdqu	48(%r15,%rcx,4), %xmm1
	psubd	%xmm3, %xmm1
	movdqu	%xmm0, 32(%rbx,%rcx,4)
	movdqu	%xmm1, 48(%rbx,%rcx,4)
	addq	$16, %rcx
	addq	$-2, %rdi
	jne	LBB0_31
	jmp	LBB0_41
LBB0_32:
	movl	%r12d, %ecx
	andl	$-8, %ecx
	leaq	(,%r12,4), %rdx
	andq	$-32, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r15,%rsi), %xmm0
	movdqu	16(%r15,%rsi), %xmm1
	movdqu	(%rbx,%rsi), %xmm2
	movdqu	16(%rbx,%rsi), %xmm3
	paddd	%xmm0, %xmm2
	paddd	%xmm1, %xmm3
	psrad	$1, %xmm2
	psrad	$1, %xmm3
	movdqu	%xmm2, (%r15,%rsi)
	movdqu	%xmm3, 16(%r15,%rsi)
	movdqu	(%rbx,%rsi), %xmm2
	movdqu	16(%rbx,%rsi), %xmm3
	psubd	%xmm2, %xmm0
	psubd	%xmm3, %xmm1
	movdqu	%xmm0, (%rbx,%rsi)
	movdqu	%xmm1, 16(%rbx,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_33
## %bb.34:
	cmpq	%r12, %rcx
	jne	LBB0_35
LBB0_39:
	movl	$1, %ecx
LBB0_48:
	movl	%r8d, 12(%r14)
	movl	%ecx, 16(%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_40:
	xorl	%ecx, %ecx
LBB0_41:
	testb	$1, %sil
	je	LBB0_43
## %bb.42:
	movdqu	(%r15,%rcx,4), %xmm0
	movdqu	16(%r15,%rcx,4), %xmm1
	movdqu	(%rbx,%rcx,4), %xmm2
	psubd	%xmm2, %xmm0
	movdqu	16(%rbx,%rcx,4), %xmm2
	psubd	%xmm2, %xmm1
	movdqu	%xmm0, (%rbx,%rcx,4)
	movdqu	%xmm1, 16(%rbx,%rcx,4)
LBB0_43:
	xorl	%ecx, %ecx
	cmpq	%r12, %rdx
	je	LBB0_48
	jmp	LBB0_44
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_alac_stereo_decorrelation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function alac_stereo_decorrelation
lCPI0_0:
	.long	1                               ; 0x1
	.long	31                              ; 0x1f
lCPI0_1:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_alac_stereo_decorrelation:             ; @alac_stereo_decorrelation
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	ldr	x8, [x0]
	ldp	x21, x22, [x8]
	ldr	w20, [x0, #8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_estimate_stereo_mode
	cmp	w0, #130
	b.eq	LBB0_9
; %bb.1:
	cmp	w0, #129
	b.eq	LBB0_10
; %bb.2:
	cmp	w0, #128
	b.ne	LBB0_16
; %bb.3:
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	cmp	w20, #1
	b.lt	LBB0_31
; %bb.4:
	cmp	w20, #8
	b.lo	LBB0_22
; %bb.5:
	lsl	x8, x20, #2
	add	x9, x22, x8
	add	x8, x21, x8
	cmp	x22, x8
	ccmp	x21, x9, #2, lo
	b.lo	LBB0_22
; %bb.6:
	and	x8, x20, #0xfffffff8
	add	x9, x22, #16
	add	x10, x21, #16
	mov	x11, x8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x9, #-16]
	ldp	q3, q4, [x10, #-16]
	sub.4s	v3, v3, v1
	sub.4s	v4, v4, v2
	stp	q3, q4, [x9, #-16]
	ssra.4s	v1, v3, #31
	ssra.4s	v2, v4, #31
	stp	q1, q2, [x10, #-16]
	add	x9, x9, #32
	add	x10, x10, #32
	subs	x11, x11, #8
	b.ne	LBB0_7
; %bb.8:
	cmp	x8, x20
	b.ne	LBB0_23
	b	LBB0_31
LBB0_9:
	movi.2d	v0, #0000000000000000
	b	LBB0_31
LBB0_10:
Lloh2:
	adrp	x8, lCPI0_1@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	cmp	w20, #1
	b.lt	LBB0_31
; %bb.11:
	cmp	w20, #16
	b.lo	LBB0_25
; %bb.12:
	lsl	x8, x20, #2
	add	x9, x22, x8
	add	x8, x21, x8
	cmp	x22, x8
	ccmp	x21, x9, #2, lo
	b.lo	LBB0_25
; %bb.13:
	and	x8, x20, #0xfffffff0
	add	x9, x22, #32
	add	x10, x21, #32
	mov	x11, x8
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x10, #-32]
	ldp	q3, q4, [x10], #64
	ldp	q5, q6, [x9, #-32]
	ldp	q7, q16, [x9]
	sub.4s	v1, v1, v5
	sub.4s	v2, v2, v6
	sub.4s	v3, v3, v7
	sub.4s	v4, v4, v16
	stp	q1, q2, [x9, #-32]
	stp	q3, q4, [x9], #64
	subs	x11, x11, #16
	b.ne	LBB0_14
; %bb.15:
	cmp	x8, x20
	b.ne	LBB0_26
	b	LBB0_31
LBB0_16:
	movi.2s	v0, #1
	cmp	w20, #1
	b.lt	LBB0_31
; %bb.17:
	cmp	w20, #8
	b.lo	LBB0_28
; %bb.18:
	lsl	x8, x20, #2
	add	x9, x21, x8
	add	x8, x22, x8
	cmp	x21, x8
	ccmp	x22, x9, #2, lo
	b.lo	LBB0_28
; %bb.19:
	and	x8, x20, #0xfffffff8
	add	x9, x21, #16
	add	x10, x22, #16
	mov	x11, x8
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x9, #-16]
	ldp	q3, q4, [x10, #-16]
	add.4s	v5, v3, v1
	add.4s	v6, v4, v2
	sshr.4s	v5, v5, #1
	sshr.4s	v6, v6, #1
	stp	q5, q6, [x9, #-16]
	sub.4s	v1, v1, v3
	sub.4s	v2, v2, v4
	stp	q1, q2, [x10, #-16]
	add	x9, x9, #32
	add	x10, x10, #32
	subs	x11, x11, #8
	b.ne	LBB0_20
; %bb.21:
	cmp	x8, x20
	b.ne	LBB0_29
	b	LBB0_31
LBB0_22:
	mov	x8, #0
LBB0_23:
	lsl	x10, x8, #2
	add	x9, x21, x10
	add	x10, x22, x10
	sub	x8, x20, x8
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	ldr	w12, [x9]
	sub	w12, w12, w11
	str	w12, [x10], #4
	add	w11, w11, w12, asr #31
	str	w11, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_24
	b	LBB0_31
LBB0_25:
	mov	x8, #0
LBB0_26:
	lsl	x10, x8, #2
	add	x9, x22, x10
	add	x10, x21, x10
	sub	x8, x20, x8
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10], #4
	ldr	w12, [x9]
	sub	w11, w11, w12
	str	w11, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_27
	b	LBB0_31
LBB0_28:
	mov	x8, #0
LBB0_29:
	lsl	x10, x8, #2
	add	x9, x22, x10
	add	x10, x21, x10
	sub	x8, x20, x8
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	ldr	w12, [x9]
	add	w12, w12, w11
	asr	w12, w12, #1
	str	w12, [x10], #4
	ldr	w12, [x9]
	sub	w11, w11, w12
	str	w11, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_30
LBB0_31:
	stur	d0, [x19, #12]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_alac_stereo_decorrelation
.subsections_via_symbols
