	.file	"extr_dca_core.c_alloc_sample_buffer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	alloc_sample_buffer, @function
alloc_sample_buffer:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	lea	rsi, 4[rdi]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, DWORD PTR DCA_CHANNELS[rip]
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	add	rdi, 16
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, DWORD PTR DCA_ADPCM_COEFFS[rip]
	mov	eax, DWORD PTR -16[rdi]
	mov	r14d, DWORD PTR -12[rdi]
	add	ebx, eax
	mov	edx, eax
	imul	r12d, ebx
	shr	edx, 31
	imul	r12d, DWORD PTR DCA_SUBBANDS[rip]
	add	edx, eax
	sar	edx
	add	edx, DWORD PTR DCA_LFE_HISTORY[rip]
	add	edx, r12d
	sal	edx, 2
	call	av_fast_mallocz@PLT
	mov	r13, QWORD PTR 16[rbp]
	test	r13, r13
	je	.L14
	cmp	DWORD PTR 4[rbp], r14d
	je	.L3
	mov	eax, DWORD PTR DCA_CHANNELS[rip]
	test	eax, eax
	jle	.L4
	sub	eax, 1
	mov	edi, DWORD PTR DCA_SUBBANDS[rip]
	xor	r10d, r10d
	xor	esi, esi
	movsx	r9, DWORD PTR DCA_ADPCM_COEFFS[rip]
	lea	r11, 8[0+rax*8]
	.p2align 4,,10
	.p2align 3
.L5:
	test	edi, edi
	jle	.L9
	mov	rax, QWORD PTR 32[rbp]
	xor	edx, edx
	mov	r8, QWORD PTR [rax+r10]
	.p2align 4,,10
	.p2align 3
.L7:
	lea	eax, [rsi+rdx]
	movsx	rcx, edx
	add	edx, 1
	imul	eax, ebx
	cdqe
	add	rax, r13
	add	rax, r9
	mov	QWORD PTR [r8+rcx*8], rax
	mov	r13, QWORD PTR 16[rbp]
	cmp	edx, edi
	jl	.L7
.L9:
	add	r10, 8
	add	esi, edi
	cmp	r11, r10
	jne	.L5
.L4:
	movsx	rax, r12d
	add	rax, r13
	mov	QWORD PTR 24[rbp], rax
.L3:
	mov	eax, DWORD PTR 8[rbp]
	test	eax, eax
	je	.L15
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	mov	rdi, rbp
	call	erase_adpcm_history@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	mov	edi, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	AVERROR@PLT
	.cfi_endproc
.LFE0:
	.size	alloc_sample_buffer, .-alloc_sample_buffer
	.comm	ENOMEM,4,4
	.comm	DCA_SUBBANDS,4,4
	.comm	DCA_LFE_HISTORY,4,4
	.comm	DCA_CHANNELS,4,4
	.comm	DCA_ADPCM_COEFFS,4,4
	.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_dca_core.c_alloc_sample_buffer.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	alloc_sample_buffer, %function
alloc_sample_buffer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r1, r0
	mov	r4, r0
	ldr	r10, .L16
	ldr	r9, .L16+4
	ldr	r3, [r0]
	ldr	r5, [r10]
	ldr	r6, [r9]
	add	r5, r3, r5
	mul	r6, r5, r6
	ldr	r8, .L16+8
	ldr	r2, .L16+12
	ldr	r0, [r8]
	ldr	r2, [r2]
	mul	r6, r0, r6
	add	r3, r3, r3, lsr #31
	add	r2, r2, r3, asr #1
	add	r2, r2, r6
	ldr	r7, [r1, #4]!
	lsl	r2, r2, #2
	add	r0, r4, #12
	bl	av_fast_mallocz
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L14
	ldr	r2, [r4, #4]
	cmp	r2, r7
	beq	.L3
	ldr	r9, [r9]
	cmp	r9, #0
	ble	.L4
	mov	r7, #0
	mov	lr, r7
	ldr	r8, [r8]
	ldr	r0, [r10]
	mul	fp, r8, r5
	lsl	r10, r8, #2
	sub	r10, r10, #4
.L5:
	cmp	r8, #0
	ble	.L9
	mov	r1, r7
	ldr	r2, [r4, #20]
	ldr	ip, [r2, lr, lsl #2]
	sub	r2, ip, #4
	add	ip, ip, r10
.L7:
	add	r3, r1, r3
	add	r3, r3, r0
	str	r3, [r2, #4]!
	cmp	r2, ip
	ldr	r3, [r4, #12]
	add	r1, r1, r5
	bne	.L7
.L9:
	add	lr, lr, #1
	cmp	lr, r9
	add	r7, r7, fp
	bne	.L5
.L4:
	add	r3, r6, r3
	str	r3, [r4, #16]
.L3:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L15
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r0, r4
	bl	erase_adpcm_history
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	ldr	r3, .L16+16
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	AVERROR
.L17:
	.align	2
.L16:
	.word	DCA_ADPCM_COEFFS
	.word	DCA_CHANNELS
	.word	DCA_SUBBANDS
	.word	DCA_LFE_HISTORY
	.word	ENOMEM
	.size	alloc_sample_buffer, .-alloc_sample_buffer
	.comm	ENOMEM,4,4
	.comm	DCA_SUBBANDS,4,4
	.comm	DCA_LFE_HISTORY,4,4
	.comm	DCA_CHANNELS,4,4
	.comm	DCA_ADPCM_COEFFS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
