	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_frame
_encode_frame:                          ## @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
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.1:
	movq	%rdx, %r13
	movq	(%rdx), %rax
	movq	(%rax), %r14
	testq	%r14, %r14
	je	LBB0_6
## %bb.2:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$2, (%r12)
	jne	LBB0_4
## %bb.3:
	movl	20(%rbx), %esi
	leaq	12(%rbx), %rdx
	movq	%r14, %rdi
	callq	_speex_encode_stereo_int
LBB0_4:
	movl	16(%rbx), %edi
	leaq	12(%rbx), %rdx
	movq	%r14, %rsi
	callq	_speex_encode_int
	incl	(%rbx)
	leaq	8(%rbx), %rdi
	movq	%r13, %rsi
	callq	_ff_af_queue_add
	testl	%eax, %eax
	js	LBB0_15
## %bb.5:
	movl	(%rbx), %eax
	movl	4(%rbx), %ecx
	jmp	LBB0_10
LBB0_6:
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_13
## %bb.7:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_10
## %bb.8:
	leaq	12(%rbx), %r14
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$15, %esi
	movl	$5, %edx
	callq	_speex_bits_pack
	movl	(%rbx), %eax
	movl	4(%rbx), %ecx
	incl	%eax
	movl	%eax, (%rbx)
	cmpl	%ecx, %eax
	jl	LBB0_9
LBB0_10:
	xorl	%r13d, %r13d
	cmpl	%ecx, %eax
	jne	LBB0_16
## %bb.11:
	movl	$0, (%rbx)
	leaq	12(%rbx), %r14
	movq	%r14, %rdi
	callq	_speex_bits_nbytes
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_15
## %bb.12:
	movl	(%r15), %edx
	movl	12(%r15), %esi
	movq	%r14, %rdi
	callq	_speex_bits_write
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_speex_bits_reset
	movl	4(%r12), %esi
	imull	4(%rbx), %esi
	addq	$8, %rbx
	leaq	8(%r15), %rdx
	leaq	4(%r15), %rcx
	movq	%rbx, %rdi
	callq	_ff_af_queue_remove
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_16
LBB0_15:
	movl	%eax, %r13d
	jmp	LBB0_16
LBB0_13:
	xorl	%r13d, %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_frame
_encode_frame:                          ; @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	x19, x3
	mov	x20, x1
	mov	x21, x0
	ldr	x24, [x0, #8]
	cbz	x2, LBB0_6
; %bb.1:
	mov	x22, x2
	ldr	x8, [x2]
	ldr	x23, [x8]
	cbz	x23, LBB0_6
; %bb.2:
	ldr	w8, [x21]
	cmp	w8, #2
	b.ne	LBB0_4
; %bb.3:
	ldr	w1, [x24, #20]
	add	x2, x24, #12
	mov	x0, x23
	bl	_speex_encode_stereo_int
LBB0_4:
	ldr	w0, [x24, #16]
	add	x2, x24, #12
	mov	x1, x23
	bl	_speex_encode_int
	ldr	w8, [x24]
	add	w8, w8, #1
	str	w8, [x24]
	add	x0, x24, #8
	mov	x1, x22
	bl	_ff_af_queue_add
	tbnz	w0, #31, LBB0_14
; %bb.5:
	ldp	w8, w9, [x24]
	b	LBB0_10
LBB0_6:
	ldr	w8, [x24]
	cbz	w8, LBB0_13
; %bb.7:
	ldr	w9, [x24, #4]
	cmp	w8, w9
	b.ge	LBB0_10
; %bb.8:
	add	x22, x24, #12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	w1, #15
	mov	w2, #5
	bl	_speex_bits_pack
	ldp	w8, w9, [x24]
	add	w8, w8, #1
	str	w8, [x24]
	cmp	w8, w9
	b.lt	LBB0_9
LBB0_10:
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.11:
	mov	x22, x24
	str	wzr, [x22], #12
	mov	x0, x22
	bl	_speex_bits_nbytes
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_14
; %bb.12:
	ldr	w1, [x20, #12]
	ldr	w2, [x20]
	mov	x0, x22
	bl	_speex_bits_write
	mov	x23, x0
	mov	x0, x22
	bl	_speex_bits_reset
	add	x0, x24, #8
	ldr	w8, [x24, #4]
	ldr	w9, [x21, #4]
	mul	w1, w9, w8
	add	x2, x20, #8
	add	x3, x20, #4
	bl	_ff_af_queue_remove
	mov	w0, #0
	str	w23, [x20]
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_14
LBB0_13:
	mov	w0, #0
LBB0_14:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_encode_frame
.subsections_via_symbols
