	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function channel_decorrelation
_channel_decorrelation:                 ## @channel_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, %r15
	cmpl	$2, (%rdi)
	jne	LBB0_8
## %bb.1:
	movl	16(%r15), %r14d
	movq	32(%r15), %rcx
	movq	(%rcx), %r12
	movq	16(%rcx), %rbx
	movq	8(%r15), %rax
	testq	%rax, %rax
	jns	LBB0_3
## %bb.2:
	movb	12(%rcx), %cl
	movl	$1, %eax
	shll	%cl, %eax
	addl	$-2, %eax
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_estimate_stereo_mode
LBB0_3:
	movq	%rax, 24(%r15)
	movq	_FLAC_CHMODE_INDEPENDENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_56
## %bb.4:
	movq	_FLAC_CHMODE_MID_SIDE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.5:
	testl	%r14d, %r14d
	jle	LBB0_46
## %bb.6:
	cmpl	$8, %r14d
	jb	LBB0_7
## %bb.16:
	leaq	(%rbx,%r14,4), %rax
	cmpq	%rax, %r12
	jae	LBB0_25
## %bb.17:
	leaq	(%r12,%r14,4), %rax
	cmpq	%rax, %rbx
	jae	LBB0_25
LBB0_7:
	xorl	%eax, %eax
LBB0_28:
	movq	%rax, %rcx
	notq	%rcx
	testb	$1, %r14b
	je	LBB0_30
## %bb.29:
	movl	(%r12,%rax,4), %edx
	movl	(%rbx,%rax,4), %esi
	addl	%edx, %esi
	sarl	%esi
	movl	%esi, (%r12,%rax,4)
	subl	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%rax,4)
	orq	$1, %rax
LBB0_30:
	addq	%r14, %rcx
	je	LBB0_46
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rax,4), %ecx
	movl	(%rbx,%rax,4), %edx
	addl	%ecx, %edx
	sarl	%edx
	movl	%edx, (%r12,%rax,4)
	subl	(%rbx,%rax,4), %ecx
	movl	%ecx, (%rbx,%rax,4)
	movl	4(%r12,%rax,4), %ecx
	movl	4(%rbx,%rax,4), %edx
	addl	%ecx, %edx
	sarl	%edx
	movl	%edx, 4(%r12,%rax,4)
	subl	4(%rbx,%rax,4), %ecx
	movl	%ecx, 4(%rbx,%rax,4)
	addq	$2, %rax
	cmpq	%rax, %r14
	jne	LBB0_31
	jmp	LBB0_46
LBB0_8:
	movq	_FLAC_CHMODE_INDEPENDENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r15)
	jmp	LBB0_56
LBB0_9:
	movq	_FLAC_CHMODE_LEFT_SIDE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.10:
	testl	%r14d, %r14d
	jle	LBB0_46
## %bb.11:
	cmpl	$8, %r14d
	jb	LBB0_12
## %bb.19:
	leaq	(%r12,%r14,4), %rax
	cmpq	%rax, %rbx
	jae	LBB0_32
## %bb.20:
	leaq	(%rbx,%r14,4), %rax
	cmpq	%rax, %r12
	jae	LBB0_32
LBB0_12:
	xorl	%eax, %eax
LBB0_42:
	movq	%rax, %rcx
	notq	%rcx
	addq	%r14, %rcx
	movq	%r14, %rdx
	andq	$3, %rdx
	je	LBB0_44
	.p2align	4, 0x90
LBB0_43:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rax,4), %esi
	subl	(%rbx,%rax,4), %esi
	movl	%esi, (%rbx,%rax,4)
	incq	%rax
	decq	%rdx
	jne	LBB0_43
LBB0_44:
	cmpq	$3, %rcx
	jb	LBB0_46
	.p2align	4, 0x90
LBB0_45:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rax,4), %ecx
	subl	(%rbx,%rax,4), %ecx
	movl	%ecx, (%rbx,%rax,4)
	movl	4(%r12,%rax,4), %ecx
	subl	4(%rbx,%rax,4), %ecx
	movl	%ecx, 4(%rbx,%rax,4)
	movl	8(%r12,%rax,4), %ecx
	subl	8(%rbx,%rax,4), %ecx
	movl	%ecx, 8(%rbx,%rax,4)
	movl	12(%r12,%rax,4), %ecx
	subl	12(%rbx,%rax,4), %ecx
	movl	%ecx, 12(%rbx,%rax,4)
	addq	$4, %rax
	cmpq	%rax, %r14
	jne	LBB0_45
	jmp	LBB0_46
LBB0_13:
	testl	%r14d, %r14d
	jle	LBB0_55
## %bb.14:
	cmpl	$8, %r14d
	jb	LBB0_15
## %bb.22:
	leaq	(%rbx,%r14,4), %rax
	cmpq	%rax, %r12
	jae	LBB0_35
## %bb.23:
	leaq	(%r12,%r14,4), %rax
	cmpq	%rax, %rbx
	jae	LBB0_35
LBB0_15:
	xorl	%eax, %eax
LBB0_51:
	movq	%rax, %rcx
	notq	%rcx
	addq	%r14, %rcx
	movq	%r14, %rdx
	andq	$3, %rdx
	je	LBB0_53
	.p2align	4, 0x90
LBB0_52:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rax,4), %esi
	subl	%esi, (%r12,%rax,4)
	incq	%rax
	decq	%rdx
	jne	LBB0_52
LBB0_53:
	cmpq	$3, %rcx
	jb	LBB0_55
	.p2align	4, 0x90
LBB0_54:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rax,4), %ecx
	subl	%ecx, (%r12,%rax,4)
	movl	4(%rbx,%rax,4), %ecx
	subl	%ecx, 4(%r12,%rax,4)
	movl	8(%rbx,%rax,4), %ecx
	subl	%ecx, 8(%r12,%rax,4)
	movl	12(%rbx,%rax,4), %ecx
	subl	%ecx, 12(%r12,%rax,4)
	addq	$4, %rax
	cmpq	%rax, %r14
	jne	LBB0_54
	jmp	LBB0_55
LBB0_25:
	movl	%r14d, %eax
	andl	$-8, %eax
	leaq	(,%r14,4), %rcx
	andq	$-32, %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r12,%rdx), %xmm0
	movdqu	16(%r12,%rdx), %xmm1
	movdqu	(%rbx,%rdx), %xmm2
	movdqu	16(%rbx,%rdx), %xmm3
	paddd	%xmm0, %xmm2
	paddd	%xmm1, %xmm3
	psrad	$1, %xmm2
	psrad	$1, %xmm3
	movdqu	%xmm2, (%r12,%rdx)
	movdqu	%xmm3, 16(%r12,%rdx)
	movdqu	(%rbx,%rdx), %xmm2
	movdqu	16(%rbx,%rdx), %xmm3
	psubd	%xmm2, %xmm0
	psubd	%xmm3, %xmm1
	movdqu	%xmm0, (%rbx,%rdx)
	movdqu	%xmm1, 16(%rbx,%rdx)
	addq	$32, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_26
## %bb.27:
	cmpq	%r14, %rax
	je	LBB0_46
	jmp	LBB0_28
LBB0_32:
	movl	%r14d, %eax
	andl	$-8, %eax
	leaq	-8(%rax), %rcx
	movq	%rcx, %rdx
	shrq	$3, %rdx
	incq	%rdx
	testq	%rcx, %rcx
	je	LBB0_38
## %bb.33:
	movq	%rdx, %rsi
	andq	$-2, %rsi
	xorl	%ecx, %ecx
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r12,%rcx,4), %xmm0
	movdqu	16(%r12,%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(%r12,%rcx,4), %xmm0
	psubd	%xmm2, %xmm0
	movdqu	48(%r12,%rcx,4), %xmm1
	psubd	%xmm3, %xmm1
	movdqu	%xmm0, 32(%rbx,%rcx,4)
	movdqu	%xmm1, 48(%rbx,%rcx,4)
	addq	$16, %rcx
	addq	$-2, %rsi
	jne	LBB0_34
	jmp	LBB0_39
LBB0_35:
	movl	%r14d, %eax
	andl	$-8, %eax
	leaq	-8(%rax), %rcx
	movq	%rcx, %rdx
	shrq	$3, %rdx
	incq	%rdx
	testq	%rcx, %rcx
	je	LBB0_47
## %bb.36:
	movq	%rdx, %rsi
	andq	$-2, %rsi
	xorl	%ecx, %ecx
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rbx,%rcx,4), %xmm0
	movdqu	16(%rbx,%rcx,4), %xmm1
	movdqu	(%r12,%rcx,4), %xmm2
	psubd	%xmm0, %xmm2
	movdqu	16(%r12,%rcx,4), %xmm0
	psubd	%xmm1, %xmm0
	movdqu	32(%r12,%rcx,4), %xmm1
	movdqu	48(%r12,%rcx,4), %xmm3
	movdqu	%xmm2, (%r12,%rcx,4)
	movdqu	%xmm0, 16(%r12,%rcx,4)
	movdqu	32(%rbx,%rcx,4), %xmm0
	psubd	%xmm0, %xmm1
	movdqu	48(%rbx,%rcx,4), %xmm0
	psubd	%xmm0, %xmm3
	movdqu	%xmm1, 32(%r12,%rcx,4)
	movdqu	%xmm3, 48(%r12,%rcx,4)
	addq	$16, %rcx
	addq	$-2, %rsi
	jne	LBB0_37
	jmp	LBB0_48
LBB0_38:
	xorl	%ecx, %ecx
LBB0_39:
	testb	$1, %dl
	je	LBB0_41
## %bb.40:
	movdqu	(%r12,%rcx,4), %xmm0
	movdqu	16(%r12,%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_41:
	cmpq	%r14, %rax
	jne	LBB0_42
LBB0_46:
	movq	32(%r15), %rax
	incl	24(%rax)
	jmp	LBB0_56
LBB0_47:
	xorl	%ecx, %ecx
LBB0_48:
	testb	$1, %dl
	je	LBB0_50
## %bb.49:
	movdqu	(%rbx,%rcx,4), %xmm0
	movdqu	16(%rbx,%rcx,4), %xmm1
	movdqu	(%r12,%rcx,4), %xmm2
	psubd	%xmm0, %xmm2
	movdqu	16(%r12,%rcx,4), %xmm0
	psubd	%xmm1, %xmm0
	movdqu	%xmm2, (%r12,%rcx,4)
	movdqu	%xmm0, 16(%r12,%rcx,4)
LBB0_50:
	cmpq	%r14, %rax
	jne	LBB0_51
LBB0_55:
	movq	32(%r15), %rax
	incl	8(%rax)
LBB0_56:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAC_CHMODE_INDEPENDENT,8,3    ## @FLAC_CHMODE_INDEPENDENT
	.comm	_FLAC_CHMODE_MID_SIDE,8,3       ## @FLAC_CHMODE_MID_SIDE
	.comm	_FLAC_CHMODE_LEFT_SIDE,8,3      ## @FLAC_CHMODE_LEFT_SIDE
	.no_dead_strip	_channel_decorrelation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function channel_decorrelation
_channel_decorrelation:                 ; @channel_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	w8, [x0]
	cmp	w8, #2
	b.ne	LBB0_11
; %bb.1:
	ldr	w20, [x19, #16]
	ldr	x8, [x19, #32]
	ldr	x21, [x8]
	ldr	x22, [x8, #16]
	ldr	x0, [x19, #8]
	tbz	x0, #63, LBB0_3
; %bb.2:
	ldr	w8, [x8, #12]
	mov	w9, #1
	lsl	w8, w9, w8
	sub	w3, w8, #2
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_estimate_stereo_mode
LBB0_3:
	str	x0, [x19, #24]
Lloh0:
	adrp	x8, _FLAC_CHMODE_INDEPENDENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FLAC_CHMODE_INDEPENDENT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_36
; %bb.4:
Lloh3:
	adrp	x8, _FLAC_CHMODE_MID_SIDE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FLAC_CHMODE_MID_SIDE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.5:
	cmp	w20, #1
	b.lt	LBB0_31
; %bb.6:
	cmp	w20, #8
	b.lo	LBB0_25
; %bb.7:
	lsl	x8, x20, #2
	add	x9, x21, x8
	add	x8, x22, x8
	cmp	x21, x8
	ccmp	x22, x9, #2, lo
	b.lo	LBB0_25
; %bb.8:
	and	x8, x20, #0xfffffff8
	add	x9, x21, #16
	add	x10, x22, #16
	mov	x11, x8
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x9, #-16]
	ldp	q2, q3, [x10, #-16]
	add.4s	v4, v2, v0
	add.4s	v5, v3, v1
	sshr.4s	v4, v4, #1
	sshr.4s	v5, v5, #1
	stp	q4, q5, [x9, #-16]
	sub.4s	v0, v0, v2
	sub.4s	v1, v1, v3
	stp	q0, q1, [x10, #-16]
	add	x9, x9, #32
	add	x10, x10, #32
	subs	x11, x11, #8
	b.ne	LBB0_9
; %bb.10:
	cmp	x8, x20
	b.ne	LBB0_26
	b	LBB0_31
LBB0_11:
Lloh6:
	adrp	x8, _FLAC_CHMODE_INDEPENDENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FLAC_CHMODE_INDEPENDENT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	b	LBB0_36
LBB0_12:
Lloh9:
	adrp	x8, _FLAC_CHMODE_LEFT_SIDE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FLAC_CHMODE_LEFT_SIDE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.13:
	cmp	w20, #1
	b.lt	LBB0_31
; %bb.14:
	cmp	w20, #16
	b.lo	LBB0_28
; %bb.15:
	lsl	x8, x20, #2
	add	x9, x22, x8
	add	x8, x21, x8
	cmp	x22, x8
	ccmp	x21, x9, #2, lo
	b.lo	LBB0_28
; %bb.16:
	and	x8, x20, #0xfffffff0
	add	x9, x22, #32
	add	x10, x21, #32
	mov	x11, x8
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x10, #-32]
	ldp	q2, q3, [x10], #64
	ldp	q4, q5, [x9, #-32]
	ldp	q6, q7, [x9]
	sub.4s	v0, v0, v4
	sub.4s	v1, v1, v5
	sub.4s	v2, v2, v6
	sub.4s	v3, v3, v7
	stp	q0, q1, [x9, #-32]
	stp	q2, q3, [x9], #64
	subs	x11, x11, #16
	b.ne	LBB0_17
; %bb.18:
	cmp	x8, x20
	b.ne	LBB0_29
	b	LBB0_31
LBB0_19:
	cmp	w20, #1
	b.lt	LBB0_35
; %bb.20:
	cmp	w20, #16
	b.lo	LBB0_32
; %bb.21:
	lsl	x8, x20, #2
	add	x9, x21, x8
	add	x8, x22, x8
	cmp	x21, x8
	ccmp	x22, x9, #2, lo
	b.lo	LBB0_32
; %bb.22:
	and	x8, x20, #0xfffffff0
	add	x9, x21, #32
	add	x10, x22, #32
	mov	x11, x8
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x10, #-32]
	ldp	q2, q3, [x10], #64
	ldp	q4, q5, [x9, #-32]
	ldp	q6, q7, [x9]
	sub.4s	v0, v4, v0
	sub.4s	v1, v5, v1
	sub.4s	v2, v6, v2
	sub.4s	v3, v7, v3
	stp	q0, q1, [x9, #-32]
	stp	q2, q3, [x9], #64
	subs	x11, x11, #16
	b.ne	LBB0_23
; %bb.24:
	cmp	x8, x20
	b.ne	LBB0_33
	b	LBB0_35
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]
	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_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], #4
	ldr	w12, [x9]
	sub	w11, w11, w12
	str	w11, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_30
LBB0_31:
	ldr	x8, [x19, #32]
	ldr	w9, [x8, #24]
	add	w9, w9, #1
	str	w9, [x8, #24]
	b	LBB0_36
LBB0_32:
	mov	x8, #0
LBB0_33:
	lsl	x10, x8, #2
	add	x9, x21, x10
	add	x10, x22, x10
	sub	x8, x20, x8
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10], #4
	ldr	w12, [x9]
	sub	w11, w12, w11
	str	w11, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_34
LBB0_35:
	ldr	x8, [x19, #32]
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
LBB0_36:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAC_CHMODE_INDEPENDENT,8,3    ; @FLAC_CHMODE_INDEPENDENT
	.comm	_FLAC_CHMODE_MID_SIDE,8,3       ; @FLAC_CHMODE_MID_SIDE
	.comm	_FLAC_CHMODE_LEFT_SIDE,8,3      ; @FLAC_CHMODE_LEFT_SIDE
	.no_dead_strip	_channel_decorrelation
.subsections_via_symbols
