	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function celt_encode_frame
_celt_encode_frame:                     ## @celt_encode_frame
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_ff_opus_rc_enc_init
	leaq	16(%r14), %r13
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_ff_opus_psy_celt_frame_init
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_celt_frame_setup_input
	cmpq	$0, 64(%rbx)
	je	LBB0_6
## %bb.1:
	cmpl	$16, (%rbx)
	jl	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$15, %edx
	callq	_ff_opus_rc_enc_log
LBB0_3:
	cmpl	$0, (%r14)
	jle	LBB0_38
## %bb.4:
	xorl	%ebx, %ebx
	movq	_CELT_MAX_BANDS@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	movl	(%r15), %esi
	shll	$2, %esi
	pxor	%xmm0, %xmm0
	callq	_memset
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
	jmp	LBB0_38
LBB0_6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_celt_apply_preemph_filter
	cmpq	$0, 56(%rbx)
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$15, %edx
	callq	_ff_opus_rc_enc_log
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_celt_enc_quant_pfilter
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_celt_frame_mdct
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_ff_opus_psy_celt_frame_process
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:
	movq	%r15, %rdi
	callq	_ff_opus_rc_enc_init
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$15, %edx
	callq	_ff_opus_rc_enc_log
	cmpl	$0, 48(%rbx)
	jne	LBB0_12
## %bb.10:
	movq	%r15, %rdi
	callq	_opus_rc_tell
	addl	$16, %eax
	cmpl	(%rbx), %eax
	jg	LBB0_12
## %bb.11:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_celt_enc_quant_pfilter
LBB0_12:
	cmpq	$0, 40(%rbx)
	je	LBB0_15
## %bb.13:
	movq	%r15, %rdi
	callq	_opus_rc_tell
	addl	$3, %eax
	cmpl	(%rbx), %eax
	jg	LBB0_15
## %bb.14:
	movl	4(%rbx), %esi
	movq	%r15, %rdi
	movl	$3, %edx
	callq	_ff_opus_rc_enc_log
LBB0_15:
	movq	8(%r14), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_celt_quant_coarse
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_celt_enc_tf
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_ff_celt_bitalloc
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_celt_quant_fine
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ff_celt_quant_bands
	cmpq	$0, 32(%rbx)
	je	LBB0_17
## %bb.16:
	movl	24(%rbx), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_ff_opus_rc_put_raw
LBB0_17:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_celt_quant_final
	movl	8(%rbx), %r12d
	testl	%r12d, %r12d
	jle	LBB0_38
## %bb.18:
	movq	16(%rbx), %r13
	movq	_CELT_MAX_BANDS@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	movl	%r11d, %r10d
	andl	$-4, %r10d
	leaq	-4(%r10), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rcx
	shrq	$2, %rcx
	incq	%rcx
	movq	%rcx, %rax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	andq	$-2, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%r11d, %r15d
	andl	$3, %r15d
	xorl	%r9d, %r9d
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_20 Depth=1
	incq	%r9
	cmpq	%r12, %r9
	je	LBB0_38
LBB0_20:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_32 Depth 2
                                        ##     Child Loop BB0_25 Depth 2
                                        ##     Child Loop BB0_27 Depth 2
	testl	%r11d, %r11d
	jle	LBB0_19
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%r9, %rax
	shlq	$4, %rax
	movq	(%r13,%rax), %rsi
	movq	8(%r13,%rax), %rbx
	movq	8(%r14), %rax
	movq	(%rax,%r9,8), %rax
	cmpl	$4, %r11d
	jae	LBB0_28
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	xorl	%ecx, %ecx
LBB0_23:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%rcx, %r8
	notq	%r8
	addq	%r11, %r8
	testq	%r15, %r15
	je	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%r15, %rdx
	.p2align	4, 0x90
LBB0_25:                                ##   Parent Loop BB0_20 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rsi,%rcx,8), %rdi
	addq	(%rbx,%rcx,8), %rdi
	movq	%rdi, (%rax,%rcx,8)
	incq	%rcx
	decq	%rdx
	jne	LBB0_25
LBB0_26:                                ##   in Loop: Header=BB0_20 Depth=1
	cmpq	$3, %r8
	jb	LBB0_19
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_20 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rsi,%rcx,8), %rdx
	addq	(%rbx,%rcx,8), %rdx
	movq	%rdx, (%rax,%rcx,8)
	movq	8(%rsi,%rcx,8), %rdx
	addq	8(%rbx,%rcx,8), %rdx
	movq	%rdx, 8(%rax,%rcx,8)
	movq	16(%rsi,%rcx,8), %rdx
	addq	16(%rbx,%rcx,8), %rdx
	movq	%rdx, 16(%rax,%rcx,8)
	movq	24(%rsi,%rcx,8), %rdx
	addq	24(%rbx,%rcx,8), %rdx
	movq	%rdx, 24(%rax,%rcx,8)
	addq	$4, %rcx
	cmpq	%rcx, %r11
	jne	LBB0_27
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%rax, %rcx
	subq	%rbx, %rcx
	cmpq	$32, %rcx
	jb	LBB0_22
## %bb.29:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%rax, %rdx
	subq	%rsi, %rdx
	movl	$0, %ecx
	cmpq	$32, %rdx
	jb	LBB0_23
## %bb.30:                              ##   in Loop: Header=BB0_20 Depth=1
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_37
## %bb.31:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_32:                                ##   Parent Loop BB0_20 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rbx,%rcx,8), %xmm0
	movdqu	16(%rbx,%rcx,8), %xmm1
	movdqu	(%rsi,%rcx,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	16(%rsi,%rcx,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	%xmm2, (%rax,%rcx,8)
	movdqu	%xmm0, 16(%rax,%rcx,8)
	movdqu	32(%rbx,%rcx,8), %xmm0
	movdqu	48(%rbx,%rcx,8), %xmm1
	movdqu	32(%rsi,%rcx,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	48(%rsi,%rcx,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	%xmm2, 32(%rax,%rcx,8)
	movdqu	%xmm0, 48(%rax,%rcx,8)
	addq	$8, %rcx
	addq	$-2, %r8
	jne	LBB0_32
## %bb.33:                              ##   in Loop: Header=BB0_20 Depth=1
	testb	$1, -56(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_35
LBB0_34:                                ##   in Loop: Header=BB0_20 Depth=1
	movdqu	(%rbx,%rcx,8), %xmm0
	movdqu	16(%rbx,%rcx,8), %xmm1
	movdqu	(%rsi,%rcx,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	16(%rsi,%rcx,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	%xmm2, (%rax,%rcx,8)
	movdqu	%xmm0, 16(%rax,%rcx,8)
LBB0_35:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%r10, %rcx
	cmpq	%r11, %r10
	je	LBB0_19
	jmp	LBB0_23
LBB0_37:                                ##   in Loop: Header=BB0_20 Depth=1
	xorl	%ecx, %ecx
	testb	$1, -56(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_34
	jmp	LBB0_35
LBB0_38:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CELT_MAX_BANDS,4,2             ## @CELT_MAX_BANDS
	.no_dead_strip	_celt_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function celt_encode_frame
_celt_encode_frame:                     ; @celt_encode_frame
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_ff_opus_rc_enc_init
	add	x23, x19, #16
	mov	x0, x23
	mov	x1, x20
	mov	x2, x22
	bl	_ff_opus_psy_celt_frame_init
	mov	x0, x19
	mov	x1, x20
	bl	_celt_frame_setup_input
	ldr	x8, [x20, #64]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #16
	b.lt	LBB0_3
; %bb.2:
	mov	x0, x21
	mov	w1, #1
	mov	w2, #15
	bl	_ff_opus_rc_enc_log
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.4:
	mov	x20, #0
Lloh0:
	adrp	x21, _CELT_MAX_BANDS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CELT_MAX_BANDS@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x20, lsl #3]
	ldr	w8, [x21]
	lsl	w1, w8, #2
	movi	d0, #0000000000000000
	bl	_memset
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_5
	b	LBB0_30
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_celt_apply_preemph_filter
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #15
	bl	_ff_opus_rc_enc_log
	mov	x0, x21
	mov	x1, x20
	bl	_celt_enc_quant_pfilter
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_celt_frame_mdct
	mov	x0, x23
	mov	x1, x20
	mov	x2, x22
	bl	_ff_opus_psy_celt_frame_process
	cbnz	x0, LBB0_8
; %bb.9:
	mov	x0, x21
	bl	_ff_opus_rc_enc_init
	mov	x0, x21
	mov	w1, #0
	mov	w2, #15
	bl	_ff_opus_rc_enc_log
	ldr	w8, [x20, #48]
	cbnz	w8, LBB0_12
; %bb.10:
	mov	x0, x21
	bl	_opus_rc_tell
	add	w8, w0, #16
	ldr	w9, [x20]
	cmp	w8, w9
	b.gt	LBB0_12
; %bb.11:
	mov	x0, x21
	mov	x1, x20
	bl	_celt_enc_quant_pfilter
LBB0_12:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_15
; %bb.13:
	mov	x0, x21
	bl	_opus_rc_tell
	add	w8, w0, #3
	ldr	w9, [x20]
	cmp	w8, w9
	b.gt	LBB0_15
; %bb.14:
	ldr	w1, [x20, #4]
	mov	x0, x21
	mov	w2, #3
	bl	_ff_opus_rc_enc_log
LBB0_15:
	ldr	x2, [x19, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_celt_quant_coarse
	mov	x0, x20
	mov	x1, x21
	bl	_celt_enc_tf
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_ff_celt_bitalloc
	mov	x0, x20
	mov	x1, x21
	bl	_celt_quant_fine
	mov	x0, x20
	mov	x1, x21
	bl	_ff_celt_quant_bands
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_17
; %bb.16:
	ldr	w1, [x20, #24]
	mov	x0, x21
	mov	w2, #1
	bl	_ff_opus_rc_put_raw
LBB0_17:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_celt_quant_final
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.18:
	mov	x9, #0
	ldr	x10, [x20, #16]
Lloh2:
	adrp	x11, _CELT_MAX_BANDS@GOTPAGE
Lloh3:
	ldr	x11, [x11, _CELT_MAX_BANDS@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x11]
	and	x12, x11, #0xfffffff8
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x9, x9, #1
	cmp	x9, x8
	b.eq	LBB0_30
LBB0_20:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_28 Depth 2
                                        ;     Child Loop BB0_24 Depth 2
	cmp	w11, #1
	b.lt	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x14, x10, x9, lsl #4
	ldp	x14, x13, [x14]
	ldr	x15, [x19, #8]
	ldr	x15, [x15, x9, lsl #3]
	cmp	w11, #8
	b.hs	LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x16, #0
LBB0_23:                                ;   in Loop: Header=BB0_20 Depth=1
	lsl	x17, x16, #3
	add	x15, x15, x17
	add	x14, x14, x17
	add	x13, x13, x17
	sub	x16, x11, x16
LBB0_24:                                ;   Parent Loop BB0_20 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x17, [x13], #8
	ldr	x0, [x14], #8
	add	x17, x0, x17
	str	x17, [x15], #8
	subs	x16, x16, #1
	b.ne	LBB0_24
	b	LBB0_19
LBB0_25:                                ;   in Loop: Header=BB0_20 Depth=1
	mov	x16, #0
	sub	x17, x15, x13
	cmp	x17, #64
	b.lo	LBB0_23
; %bb.26:                               ;   in Loop: Header=BB0_20 Depth=1
	sub	x17, x15, x14
	cmp	x17, #64
	b.lo	LBB0_23
; %bb.27:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x16, x15, #32
	add	x17, x13, #32
	add	x0, x14, #32
	mov	x1, x12
LBB0_28:                                ;   Parent Loop BB0_20 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x17, #-32]
	ldp	q2, q3, [x17], #64
	ldp	q4, q5, [x0, #-32]
	ldp	q6, q7, [x0], #64
	add.2d	v0, v4, v0
	add.2d	v1, v5, v1
	add.2d	v2, v6, v2
	add.2d	v3, v7, v3
	stp	q0, q1, [x16, #-32]
	stp	q2, q3, [x16], #64
	subs	x1, x1, #8
	b.ne	LBB0_28
; %bb.29:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x16, x12
	cmp	x12, x11
	b.eq	LBB0_19
	b	LBB0_23
LBB0_30:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CELT_MAX_BANDS,4,2             ; @CELT_MAX_BANDS
	.no_dead_strip	_celt_encode_frame
.subsections_via_symbols
