	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function celt_decode_final_energy
LCPI0_0:
	.long	0xbf000000                      ## float -0.5
LCPI0_1:
	.long	0x38800000                      ## float 6.10351563E-5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_celt_decode_final_energy:              ## @celt_decode_final_energy
	.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
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	(%rdi), %r15d
	movq	%rsi, %rdi
	callq	_opus_rc_tell
	subl	%eax, %r15d
	movl	4(%r12), %ecx
	movl	8(%r12), %eax
	cmpl	%eax, %ecx
	jge	LBB0_11
## %bb.1:
	movslq	%ecx, %rbx
	movl	12(%r12), %ecx
	movq	_CELT_MAX_FINE_BITS@GOTPCREL(%rip), %rsi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rdx
	cmpq	%rdx, %rbx
	jge	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	cmpl	%ecx, %r15d
	jl	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rdx
	cmpl	$0, (%rdx,%rbx,4)
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r12), %rdx
	movq	(%rdx,%rbx,8), %rdx
	cmpq	(%rsi), %rdx
	jge	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_ff_opus_rc_get_raw
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	addss	%xmm1, %xmm0
	movq	24(%r12), %rax
	movq	32(%r12), %rdx
	movb	$13, %cl
	subb	(%rax,%rbx,8), %cl
	movl	$1, %eax
	shll	%cl, %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	mulss	%xmm0, %xmm1
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movq	(%rdx,%r13,8), %rax
	addss	(%rax,%rbx,4), %xmm1
	movss	%xmm1, (%rax,%rbx,4)
	incq	%r13
	movslq	12(%r12), %rcx
	cmpq	%rcx, %r13
	jl	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r12), %eax
	subl	%r13d, %r15d
	movq	_CELT_MAX_FINE_BITS@GOTPCREL(%rip), %rsi
	jmp	LBB0_9
LBB0_10:
	movl	4(%r12), %ecx
LBB0_11:
	cmpl	%eax, %ecx
	jge	LBB0_21
## %bb.12:
	movslq	%ecx, %rbx
	movl	12(%r12), %ecx
	movq	_CELT_MAX_FINE_BITS@GOTPCREL(%rip), %rsi
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rbx
	movslq	%eax, %rdx
	cmpq	%rdx, %rbx
	jge	LBB0_21
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_18 Depth 2
	cmpl	%ecx, %r15d
	jl	LBB0_21
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	16(%r12), %rdx
	cmpl	$1, (%rdx,%rbx,4)
	jne	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	24(%r12), %rdx
	movq	(%rdx,%rbx,8), %rdx
	cmpq	(%rsi), %rdx
	jge	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	testl	%ecx, %ecx
	jle	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_ff_opus_rc_get_raw
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	addss	%xmm1, %xmm0
	movq	24(%r12), %rax
	movq	32(%r12), %rdx
	movb	$13, %cl
	subb	(%rax,%rbx,8), %cl
	movl	$1, %eax
	shll	%cl, %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	mulss	%xmm0, %xmm1
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movq	(%rdx,%r13,8), %rax
	addss	(%rax,%rbx,4), %xmm1
	movss	%xmm1, (%rax,%rbx,4)
	incq	%r13
	movslq	12(%r12), %rcx
	cmpq	%rcx, %r13
	jl	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	8(%r12), %eax
	subl	%r13d, %r15d
	movq	_CELT_MAX_FINE_BITS@GOTPCREL(%rip), %rsi
	jmp	LBB0_20
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CELT_MAX_FINE_BITS,8,3         ## @CELT_MAX_FINE_BITS
	.no_dead_strip	_celt_decode_final_energy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function celt_decode_final_energy
_celt_decode_final_energy:              ; @celt_decode_final_energy
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x19, x1
	mov	x20, x0
	ldr	w21, [x0]
	mov	x0, x1
	bl	_opus_rc_tell
	sub	w21, w21, w0
	ldp	w9, w8, [x20, #4]
Lloh0:
	adrp	x22, _CELT_MAX_FINE_BITS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CELT_MAX_FINE_BITS@GOTPAGEOFF]
	cmp	w9, w8
	b.ge	LBB0_11
; %bb.1:
	sxtw	x23, w9
	ldr	w9, [x20, #12]
	mov	w24, #1
	fmov	s8, #-0.50000000
	mov	w25, #13
	mov	w26, #947912704
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	cmp	w21, w9
	b.lt	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x20, #16]
	ldr	w10, [x10, x23, lsl #2]
	cbnz	w10, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x20, #24]
	ldr	x10, [x10, x23, lsl #3]
	ldr	x11, [x22]
	cmp	x10, x11
	b.ge	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w9, #1
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x27, #0
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	w1, #1
	bl	_ff_opus_rc_get_raw
	scvtf	s0, w0
	fadd	s0, s0, s8
	ldp	x8, x9, [x20, #24]
	ldr	x8, [x8, x23, lsl #3]
	sub	w8, w25, w8
	lsl	w8, w24, w8
	scvtf	s1, w8
	fmul	s0, s0, s1
	fmov	s1, w26
	fmul	s0, s0, s1
	ldr	x8, [x9, x27, lsl #3]
	lsl	x9, x23, #2
	ldr	s1, [x8, x9]
	fadd	s0, s1, s0
	str	s0, [x8, x9]
	add	x27, x27, #1
	ldrsw	x9, [x20, #12]
	cmp	x27, x9
	b.lt	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20, #8]
	sub	w21, w21, w27
	b	LBB0_2
LBB0_10:
	ldr	w9, [x20, #4]
LBB0_11:
	cmp	w9, w8
	b.ge	LBB0_21
; %bb.12:
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	sxtw	x23, w9
	ldr	w9, [x20, #12]
	mov	w24, #1
	fmov	s8, #-0.50000000
	mov	w25, #13
	mov	w26, #947912704
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_21
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
	cmp	w21, w9
	b.lt	LBB0_21
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x10, [x20, #16]
	ldr	w10, [x10, x23, lsl #2]
	cmp	w10, #1
	b.ne	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x10, [x20, #24]
	ldr	x10, [x10, x23, lsl #3]
	ldr	x11, [x22]
	cmp	x10, x11
	b.ge	LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x27, #0
LBB0_19:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	w1, #1
	bl	_ff_opus_rc_get_raw
	scvtf	s0, w0
	fadd	s0, s0, s8
	ldp	x8, x9, [x20, #24]
	ldr	x8, [x8, x23, lsl #3]
	sub	w8, w25, w8
	lsl	w8, w24, w8
	scvtf	s1, w8
	fmul	s0, s0, s1
	fmov	s1, w26
	fmul	s0, s0, s1
	ldr	x8, [x9, x27, lsl #3]
	lsl	x9, x23, #2
	ldr	s1, [x8, x9]
	fadd	s0, s1, s0
	str	s0, [x8, x9]
	add	x27, x27, #1
	ldrsw	x9, [x20, #12]
	cmp	x27, x9
	b.lt	LBB0_19
; %bb.20:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x20, #8]
	sub	w21, w21, w27
	b	LBB0_13
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CELT_MAX_FINE_BITS,8,3         ; @CELT_MAX_FINE_BITS
	.no_dead_strip	_celt_decode_final_energy
.subsections_via_symbols
