	.file	"extr_flacenc.c_channel_decorrelation.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	channel_decorrelation, @function
channel_decorrelation:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	DWORD PTR [rdi], 2
	je	.L2
	mov	rax, QWORD PTR FLAC_CHMODE_INDEPENDENT[rip]
	mov	QWORD PTR 24[rdi], rax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdx, QWORD PTR 32[rdi]
	mov	rax, QWORD PTR 8[rdi]
	mov	r13d, DWORD PTR 16[rdi]
	mov	r12, QWORD PTR [rdx]
	mov	rbp, QWORD PTR 16[rdx]
	test	rax, rax
	js	.L25
	mov	QWORD PTR 24[rdi], rax
.L5:
	cmp	QWORD PTR FLAC_CHMODE_INDEPENDENT[rip], rax
	je	.L1
	cmp	QWORD PTR FLAC_CHMODE_MID_SIDE[rip], rax
	je	.L26
	cmp	QWORD PTR FLAC_CHMODE_LEFT_SIDE[rip], rax
	lea	ecx, -1[r13]
	mov	eax, 0
	je	.L10
	test	r13d, r13d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edx, DWORD PTR 0[rbp+rax*4]
	sub	DWORD PTR [r12+rax*4], edx
	mov	rdx, rax
	add	rax, 1
	cmp	rcx, rdx
	jne	.L15
.L16:
	mov	rax, QWORD PTR 32[rbx]
	add	DWORD PTR 8[rax], 1
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	test	r13d, r13d
	jle	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edx, DWORD PTR [r12+rax*4]
	sub	edx, DWORD PTR 0[rbp+rax*4]
	mov	DWORD PTR 0[rbp+rax*4], edx
	mov	rdx, rax
	add	rax, 1
	cmp	rcx, rdx
	jne	.L13
.L14:
	mov	rax, QWORD PTR 32[rbx]
	add	DWORD PTR 24[rax], 1
.L27:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	lea	esi, -1[r13]
	xor	eax, eax
	test	r13d, r13d
	jle	.L14
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edx, DWORD PTR [r12+rax*4]
	mov	ecx, DWORD PTR 0[rbp+rax*4]
	add	ecx, edx
	sar	ecx
	mov	DWORD PTR [r12+rax*4], ecx
	sub	edx, DWORD PTR 0[rbp+rax*4]
	mov	DWORD PTR 0[rbp+rax*4], edx
	mov	rdx, rax
	add	rax, 1
	cmp	rdx, rsi
	jne	.L8
	mov	rax, QWORD PTR 32[rbx]
	add	DWORD PTR 24[rax], 1
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L25:
	mov	ecx, DWORD PTR 12[rdx]
	mov	eax, 1
	mov	edx, r13d
	mov	rsi, rbp
	mov	rdi, r12
	sal	eax, cl
	lea	ecx, -2[rax]
	call	estimate_stereo_mode@PLT
	mov	QWORD PTR 24[rbx], rax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	channel_decorrelation, .-channel_decorrelation
	.comm	FLAC_CHMODE_MID_SIDE,8,8
	.comm	FLAC_CHMODE_LEFT_SIDE,8,8
	.comm	FLAC_CHMODE_INDEPENDENT,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_flacenc.c_channel_decorrelation.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	channel_decorrelation, %function
channel_decorrelation:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r3, #2
	mov	r4, r0
	beq	.L2
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [r0, #12]
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r0, [r0, #4]
	ldr	r2, [r4, #16]
	cmp	r0, #0
	ldr	r7, [r2]
	ldr	r6, [r2, #12]
	ldr	r5, [r4, #8]
	strge	r0, [r4, #12]
	blt	.L22
.L5:
	ldr	r3, .L24
	ldr	r3, [r3]
	cmp	r3, r0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L24+4
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L23
	ldr	r3, .L24+8
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L10
	cmp	r5, #0
	addgt	r0, r7, r5, lsl #2
	subgt	r0, r0, #4
	subgt	r3, r7, #4
	subgt	r1, r6, #4
	ble	.L16
.L15:
	ldr	r2, [r3, #4]!
	ldr	ip, [r1, #4]!
	cmp	r3, r0
	sub	r2, r2, ip
	str	r2, [r3]
	bne	.L15
.L16:
	ldr	r2, [r4, #16]
	ldr	r3, [r2, #4]
	add	r3, r3, #1
	str	r3, [r2, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	cmp	r5, #0
	addgt	r5, r7, r5, lsl #2
	subgt	r5, r5, #4
	subgt	r3, r7, #4
	subgt	r1, r6, #4
	ble	.L14
.L13:
	ldr	r2, [r3, #4]!
	ldr	r0, [r1, #4]!
	cmp	r3, r5
	sub	r2, r2, r0
	str	r2, [r1]
	bne	.L13
.L14:
	ldr	r2, [r4, #16]
	ldr	r3, [r2, #16]
	add	r3, r3, #1
	str	r3, [r2, #16]
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	cmp	r5, #0
	addgt	r5, r7, r5, lsl #2
	subgt	r5, r5, #4
	subgt	r3, r7, #4
	subgt	r1, r6, #4
	ble	.L14
.L8:
	ldr	r0, [r3, #4]!
	ldr	r2, [r1, #4]!
	cmp	r5, r3
	add	r2, r0, r2
	asr	r2, r2, #1
	str	r2, [r3]
	ldr	r2, [r1]
	sub	r0, r0, r2
	str	r0, [r1]
	bne	.L8
	b	.L14
.L22:
	mov	r3, #1
	ldr	r1, [r2, #8]
	mov	r0, r7
	lsl	r3, r3, r1
	mov	r2, r5
	mov	r1, r6
	sub	r3, r3, #2
	bl	estimate_stereo_mode
	str	r0, [r4, #12]
	b	.L5
.L25:
	.align	2
.L24:
	.word	FLAC_CHMODE_INDEPENDENT
	.word	FLAC_CHMODE_MID_SIDE
	.word	FLAC_CHMODE_LEFT_SIDE
	.size	channel_decorrelation, .-channel_decorrelation
	.comm	FLAC_CHMODE_MID_SIDE,4,4
	.comm	FLAC_CHMODE_LEFT_SIDE,4,4
	.comm	FLAC_CHMODE_INDEPENDENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
