	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_acelp_update_past_gain      ## -- Begin function ff_acelp_update_past_gain
	.p2align	4, 0x90
_ff_acelp_update_past_gain:             ## @ff_acelp_update_past_gain
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movq	%rdi, %r14
	movl	$-1, %r10d
	shll	%cl, %r10d
	movl	%r10d, %eax
	notl	%eax
	movslq	%eax, %rdx
	movl	(%rdi,%rdx,4), %edi
	cmpl	$-2, %r10d
	jg	LBB0_20
## %bb.1:
	movl	%eax, %ebx
	cmpl	$-9, %r10d
	jbe	LBB0_2
LBB0_18:
	incq	%rbx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %eax
	movl	(%r14,%rax,4), %eax
	addl	%eax, %edi
	movl	%eax, -4(%r14,%rbx,4)
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_19
LBB0_20:
	testl	%r8d, %r8d
	je	LBB0_22
## %bb.21:
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edi
	movl	$-10240, %esi                   ## imm = 0xD800
	callq	_FFMAX
	addl	$-4096, %eax                    ## imm = 0xF000
	jmp	LBB0_23
LBB0_22:
	movl	%esi, %edi
	callq	_ff_log2_q15
	sarl	$2, %eax
	imull	$6165, %eax, %eax               ## imm = 0x1815
	addl	$-656547840, %eax               ## imm = 0xD8DDE000
	sarl	$13, %eax
LBB0_23:
	movl	%eax, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	-1(%rbx), %r9
	movl	$-2, %r11d
	subl	%r10d, %r11d
	movl	$4, %edx
	movq	%r9, %rax
	mulq	%rdx
	seto	%r15b
	cmpl	%r9d, %r11d
	jb	LBB0_18
## %bb.3:
	shrq	$32, %r9
	jne	LBB0_18
## %bb.4:
	leaq	(%r14,%rbx,4), %r9
	movq	%r9, %rdx
	subq	%rax, %rdx
	cmpq	%r9, %rdx
	ja	LBB0_18
## %bb.5:
	testb	%r15b, %r15b
	jne	LBB0_18
## %bb.6:
	leaq	(%r14,%r11,4), %r11
	movq	%r11, %rdx
	subq	%rax, %rdx
	cmpq	%r11, %rdx
	ja	LBB0_18
## %bb.7:
	testb	%r15b, %r15b
	jne	LBB0_18
## %bb.8:
	movl	$-2, %eax
	subl	%r10d, %eax
	leaq	(%r14,%rax,4), %rax
	subq	%r9, %rax
	cmpq	$32, %rax
	jb	LBB0_18
## %bb.9:
	movl	$4294967295, %r9d               ## imm = 0xFFFFFFFF
	movl	%ebx, %r10d
	andl	$-8, %r10d
	movd	%edi, %xmm0
	leaq	-8(%r10), %rax
	movq	%rax, %r11
	shrq	$3, %r11
	incq	%r11
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%r11, %rdi
	andq	$-2, %rdi
	leaq	(%r14,%rbx,4), %r13
	addq	$-12, %r13
	leaq	(%rbx,%r9), %r15
	addq	$-8, %r15
	leaq	(%rbx,%r9), %r12
	pxor	%xmm1, %xmm1
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	leal	(%r12,%rdx), %eax
	movdqu	-28(%r14,%rax,4), %xmm2
	movdqu	-12(%r14,%rax,4), %xmm3
	pshufd	$27, %xmm3, %xmm4               ## xmm4 = xmm3[3,2,1,0]
	paddd	%xmm0, %xmm4
	pshufd	$27, %xmm2, %xmm5               ## xmm5 = xmm2[3,2,1,0]
	paddd	%xmm1, %xmm5
	movdqu	%xmm3, (%r13,%rdx,4)
	movdqu	%xmm2, -16(%r13,%rdx,4)
	leal	(%r15,%rdx), %eax
	movdqu	-28(%r14,%rax,4), %xmm2
	movdqu	-12(%r14,%rax,4), %xmm3
	pshufd	$27, %xmm3, %xmm0               ## xmm0 = xmm3[3,2,1,0]
	paddd	%xmm4, %xmm0
	pshufd	$27, %xmm2, %xmm1               ## xmm1 = xmm2[3,2,1,0]
	paddd	%xmm5, %xmm1
	movdqu	%xmm3, -32(%r13,%rdx,4)
	movdqu	%xmm2, -48(%r13,%rdx,4)
	addq	$-16, %rdx
	addq	$-2, %rdi
	jne	LBB0_12
## %bb.13:
	negq	%rdx
	testb	$1, %r11b
	je	LBB0_16
LBB0_15:
	movq	%rbx, %rax
	subq	%rdx, %rax
	addl	%eax, %r9d
	movdqu	-28(%r14,%r9,4), %xmm2
	movdqu	-12(%r14,%r9,4), %xmm3
	pshufd	$27, %xmm3, %xmm4               ## xmm4 = xmm3[3,2,1,0]
	paddd	%xmm4, %xmm0
	pshufd	$27, %xmm2, %xmm4               ## xmm4 = xmm2[3,2,1,0]
	paddd	%xmm4, %xmm1
	movdqu	%xmm3, -12(%r14,%rax,4)
	movdqu	%xmm2, -28(%r14,%rax,4)
LBB0_16:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edi
	cmpq	%rbx, %r10
	je	LBB0_20
## %bb.17:
	andl	$7, %ebx
	jmp	LBB0_18
LBB0_10:
	pxor	%xmm1, %xmm1
	xorl	%edx, %edx
	testb	$1, %r11b
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_acelp_update_past_gain      ; -- Begin function ff_acelp_update_past_gain
	.p2align	2
_ff_acelp_update_past_gain:             ; @ff_acelp_update_past_gain
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	w8, #-1
	lsl	w10, w8, w2
	mvn	w8, w10
	ldr	w9, [x0, w8, sxtw #2]
	cmn	w10, #2
	b.gt	LBB0_21
; %bb.1:
	cmn	w10, #17
	b.ls	LBB0_3
; %bb.2:
	mov	x10, x8
	b	LBB0_20
LBB0_3:
	sub	x13, x8, #1
	mov	w12, #-2
	cmp	xzr, x13, lsr #62
	cset	w11, ne
	sub	w12, w12, w10
	cmp	w12, w13
	b.lo	LBB0_16
; %bb.4:
	lsr	x14, x13, #32
	cbnz	x14, LBB0_17
; %bb.5:
	add	x14, x19, x8, lsl #2
	lsl	x13, x13, #2
	sub	x15, x14, x13
	cmp	x15, x14
	b.hi	LBB0_19
; %bb.6:
	tbnz	w11, #0, LBB0_18
; %bb.7:
	add	x12, x19, w12, uxtw #2
	sub	x13, x12, x13
	cmp	x13, x12
	b.hi	LBB0_14
; %bb.8:
	tbnz	w11, #0, LBB0_15
; %bb.9:
	mov	w11, #-2
	sub	w10, w11, w10
	add	x10, x19, w10, uxtw #2
	add	x12, x19, x8, lsl #2
	sub	x10, x10, x12
	cmp	x10, #64
	b.hs	LBB0_11
; %bb.10:
	mov	x10, x8
	b	LBB0_20
LBB0_11:
	and	x11, x8, #0xfffffff0
	and	x10, x8, #0xf
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.s	v1[0], w9
	mov	w9, #-1
	add	x9, x8, x9
	sub	x12, x12, #28
	mov	x13, x11
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x14, x19, w9, uxtw #2
	ldur	q4, [x14, #-12]
	rev64.4s	v5, v4
	ext.16b	v5, v5, v5, #8
	ldur	q6, [x14, #-28]
	rev64.4s	v7, v6
	ext.16b	v7, v7, v7, #8
	ldur	q16, [x14, #-44]
	rev64.4s	v17, v16
	ext.16b	v17, v17, v17, #8
	ldur	q18, [x14, #-60]
	rev64.4s	v19, v18
	ext.16b	v19, v19, v19, #8
	add.4s	v1, v5, v1
	add.4s	v0, v7, v0
	add.4s	v2, v17, v2
	stp	q6, q4, [x12]
	add.4s	v3, v19, v3
	stp	q18, q16, [x12, #-32]
	sub	x9, x9, #16
	sub	x12, x12, #64
	sub	x13, x13, #16
	cbnz	x13, LBB0_12
; %bb.13:
	add.4s	v0, v0, v1
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w9, s0
	cmp	x11, x8
	b.ne	LBB0_20
	b	LBB0_21
LBB0_14:
	mov	x10, x8
	b	LBB0_20
LBB0_15:
	mov	x10, x8
	b	LBB0_20
LBB0_16:
	mov	x10, x8
	b	LBB0_20
LBB0_17:
	mov	x10, x8
	b	LBB0_20
LBB0_18:
	mov	x10, x8
	b	LBB0_20
LBB0_19:
	mov	x10, x8
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	subs	x8, x10, #1
	ldr	w11, [x19, w8, uxtw #2]
	add	w9, w11, w9
	str	w11, [x19, x10, lsl #2]
	mov	x10, x8
	b.hi	LBB0_20
LBB0_21:
	cbz	w3, LBB0_23
; %bb.22:
	asr	w0, w9, w2
	mov	w1, #-10240
	bl	_FFMAX
	sub	w8, w0, #1, lsl #12             ; =4096
	b	LBB0_24
LBB0_23:
	mov	x0, x1
	bl	_ff_log2_q15
	asr	w8, w0, #2
	mov	w9, #6165
	mov	w10, #57344
	movk	w10, #55517, lsl #16
	madd	w8, w8, w9, w10
	asr	w8, w8, #13
LBB0_24:
	str	w8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
