	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opus_packet_assembler
_opus_packet_assembler:                 ## @opus_packet_assembler
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rsi), %rsi
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	callq	_opus_gen_toc
	cmpl	$0, -40(%rbp)
	movl	16(%r15), %ecx
	je	LBB0_4
## %bb.1:
	cmpl	$2, %ecx
	jl	LBB0_4
## %bb.2:
	movl	-36(%rbp), %eax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%eax, %rdi
	addq	8(%r14), %rdi
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	sarl	$3, %esi
	callq	_write_opuslacing
	addl	-36(%rbp), %eax
	movl	%eax, -36(%rbp)
	incq	%rbx
	movslq	16(%r15), %rcx
	leaq	-1(%rcx), %rdx
	cmpq	%rdx, %rbx
	jl	LBB0_3
LBB0_4:
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.7:
	movl	-36(%rbp), %eax
	movq	(%r15), %rcx
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	addq	%rbx, %rdi
	movslq	%eax, %rsi
	addq	8(%r14), %rsi
	movl	(%rcx,%rbx), %edx
	sarl	$3, %edx
	callq	_ff_opus_rc_enc_end
	movq	(%r15), %rcx
	movl	(%rcx,%rbx), %eax
	sarl	$3, %eax
	addl	-36(%rbp), %eax
	movl	%eax, -36(%rbp)
	incq	%r12
	movslq	16(%r15), %rdx
	addq	$4, %rbx
	cmpq	%rdx, %r12
	jl	LBB0_8
	jmp	LBB0_6
LBB0_5:
	movl	-36(%rbp), %eax
LBB0_6:
	movl	%eax, (%r14)
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_opus_packet_assembler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opus_packet_assembler
_opus_packet_assembler:                 ; @opus_packet_assembler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x1, [x1, #8]
	add	x2, sp, #12
	add	x3, sp, #8
	bl	_opus_gen_toc
	ldr	w8, [sp, #8]
	ldr	w9, [x20, #16]
	cmp	w8, #0
	ccmp	w9, #1, #4, ne
	b.le	LBB0_3
; %bb.1:
	mov	x21, #0
	ldr	w8, [sp, #12]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	add	x0, x9, w8, sxtw
	ldr	x8, [x20]
	ldr	w8, [x8, x21, lsl #2]
	asr	w1, w8, #3
	bl	_write_opuslacing
	ldr	w8, [sp, #12]
	add	w8, w8, w0
	str	w8, [sp, #12]
	add	x21, x21, #1
	ldrsw	x9, [x20, #16]
	sub	x10, x9, #1
	cmp	x21, x10
	b.lt	LBB0_2
LBB0_3:
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x21, #0
	mov	x22, #0
	ldr	w8, [sp, #12]
	ldr	x9, [x20]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x20, #8]
	add	x0, x10, x21
	ldr	x10, [x19, #8]
	add	x1, x10, w8, sxtw
	ldr	w8, [x9, x21]
	asr	w2, w8, #3
	bl	_ff_opus_rc_enc_end
	ldr	x9, [x20]
	ldr	w8, [x9, x21]
	ldr	w10, [sp, #12]
	add	w8, w10, w8, asr #3
	str	w8, [sp, #12]
	add	x22, x22, #1
	ldrsw	x10, [x20, #16]
	add	x21, x21, #4
	cmp	x22, x10
	b.lt	LBB0_5
	b	LBB0_7
LBB0_6:
	ldr	w8, [sp, #12]
LBB0_7:
	str	w8, [x19]
	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
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_opus_packet_assembler
.subsections_via_symbols
