	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function cng_encode_frame
LCPI0_0:
	.quad	0x41d01c1b75c00000              ## double 1081109975
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_cng_encode_frame:                      ## @cng_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	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdx), %rax
	movq	(%rax), %r15
	movl	(%r14), %ecx
	incl	%ecx
	movl	%ecx, %edx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	movl	%eax, %r13d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	jmp	LBB0_15
LBB0_1:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	xorpd	%xmm1, %xmm1
	xorpd	%xmm0, %xmm0
	testl	%eax, %eax
	jle	LBB0_9
## %bb.2:
	movq	8(%r14), %rcx
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.3:
	xorpd	%xmm0, %xmm0
	xorl	%edx, %edx
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %esi
	andl	$-2, %esi
	xorpd	%xmm0, %xmm0
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movsd	(%r15,%rdx,8), %xmm2            ## xmm2 = mem[0],zero
	movsd	%xmm2, (%rcx,%rdx,8)
	movsd	(%r15,%rdx,8), %xmm2            ## xmm2 = mem[0],zero
	movsd	8(%r15,%rdx,8), %xmm3           ## xmm3 = mem[0],zero
	mulsd	%xmm2, %xmm2
	addsd	%xmm0, %xmm2
	movsd	%xmm3, 8(%rcx,%rdx,8)
	movsd	8(%r15,%rdx,8), %xmm0           ## xmm0 = mem[0],zero
	mulsd	%xmm0, %xmm0
	addsd	%xmm2, %xmm0
	addq	$2, %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_6
LBB0_7:
	testb	$1, %al
	je	LBB0_9
## %bb.8:
	movsd	(%r15,%rdx,8), %xmm2            ## xmm2 = mem[0],zero
	movsd	%xmm2, (%rcx,%rdx,8)
	movsd	(%r15,%rdx,8), %xmm2            ## xmm2 = mem[0],zero
	mulsd	%xmm2, %xmm2
	addsd	%xmm2, %xmm0
LBB0_9:
	xorps	%xmm2, %xmm2
	cvtsi2sd	%eax, %xmm2
	divsd	%xmm2, %xmm0
	movl	$127, %ebx
	ucomisd	%xmm1, %xmm0
	jbe	LBB0_11
## %bb.10:
	divsd	LCPI0_0(%rip), %xmm0
	callq	_log10
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	callq	_floor
	negl	%eax
	movl	%eax, %edi
	movl	$7, %esi
	callq	_av_clip_uintp2
	movl	%eax, %ebx
LBB0_11:
	leaq	24(%r14), %rdi
	movq	8(%r14), %rsi
	movl	(%r14), %edx
	movq	16(%r14), %rcx
	callq	_ff_lpc_calc_ref_coefs
	movq	(%r12), %rax
	movl	%ebx, (%rax)
	cmpl	$0, (%r14)
	jle	LBB0_14
## %bb.12:
	movq	16(%r14), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdx,4), %esi
	movl	%esi, %edi
	shll	$7, %edi
	subl	%esi, %edi
	addl	$127, %edi
	movl	%edi, 4(%rax,%rdx,4)
	incq	%rdx
	movslq	(%r14), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_13
LBB0_14:
	movl	$1, (%r13)
	movl	(%r14), %eax
	incl	%eax
	xorl	%edi, %edi
	cmpl	%eax, 8(%r12)
	sete	%dil
	callq	_av_assert1
	xorl	%r13d, %r13d
LBB0_15:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error getting output packet\n"

	.no_dead_strip	_cng_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cng_encode_frame
_cng_encode_frame:                      ; @cng_encode_frame
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x24, [x0]
	ldr	x8, [x2, #8]
	ldr	x25, [x8]
	ldr	w8, [x24]
	add	w2, w8, #1
	mov	x3, x2
	bl	_ff_alloc_packet2
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
	b	LBB0_19
LBB0_2:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.3:
	ldr	x9, [x24, #8]
	movi	d0, #0000000000000000
	cmp	w8, #8
	b.lo	LBB0_8
; %bb.4:
	lsl	x10, x8, #3
	add	x11, x9, x10
	add	x10, x25, x10
	cmp	x9, x10
	ccmp	x25, x11, #2, lo
	b.lo	LBB0_8
; %bb.5:
	and	x10, x8, #0xfffffff8
	add	x11, x9, #32
	add	x12, x25, #32
	movi	d0, #0000000000000000
	mov	x13, x10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x12, #-32]
	ldp	q3, q4, [x12], #64
	stp	q1, q2, [x11, #-32]
	stp	q3, q4, [x11], #64
	fmul.2d	v1, v1, v1
	mov	d5, v1[1]
	fmul.2d	v2, v2, v2
	mov	d6, v2[1]
	fmul.2d	v3, v3, v3
	mov	d7, v3[1]
	fmul.2d	v4, v4, v4
	mov	d16, v4[1]
	fadd	d0, d0, d1
	fadd	d0, d0, d5
	fadd	d0, d0, d2
	fadd	d0, d0, d6
	fadd	d0, d0, d3
	fadd	d0, d0, d7
	fadd	d0, d0, d4
	fadd	d0, d0, d16
	subs	x13, x13, #8
	b.ne	LBB0_6
; %bb.7:
	cmp	x10, x8
	b.ne	LBB0_9
	b	LBB0_12
LBB0_8:
	mov	x10, #0
LBB0_9:
	lsl	x11, x10, #3
	add	x9, x9, x11
	add	x11, x25, x11
	sub	x10, x8, x10
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	d1, [x11]
	str	d1, [x9], #8
	ldr	d1, [x11], #8
	fmadd	d0, d1, d1, d0
	subs	x10, x10, #1
	b.ne	LBB0_10
	b	LBB0_12
LBB0_11:
	movi	d0, #0000000000000000
LBB0_12:
	scvtf	d1, w8
	fdiv	d0, d0, d1
	fcmp	d0, #0.0
	b.le	LBB0_14
; %bb.13:
	mov	x8, #1975517184
	movk	x8, #7195, lsl #32
	movk	x8, #16848, lsl #48
	fmov	d1, x8
	fdiv	d0, d0, d1
	bl	_log10
	add	w8, w0, w0, lsl #2
	lsl	w8, w8, #1
	scvtf	d0, w8
	bl	_floor
	neg	w0, w0
	mov	w1, #7
	bl	_av_clip_uintp2
	mov	x21, x0
	b	LBB0_15
LBB0_14:
	mov	w21, #127
LBB0_15:
	add	x0, x24, #24
	ldr	w2, [x24]
	ldp	x1, x3, [x24, #8]
	bl	_ff_lpc_calc_ref_coefs
	ldr	x10, [x20]
	str	w21, [x10]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
	mov	x8, #0
	ldr	x9, [x24, #16]
	add	x10, x10, #4
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	lsl	x11, x8, #2
	ldr	w12, [x9, x11]
	lsl	w13, w12, #7
	sub	w12, w13, w12
	add	w12, w12, #127
	add	x8, x8, #1
	str	w12, [x10, x11]
	ldrsw	x11, [x24]
	cmp	x8, x11
	b.lt	LBB0_17
LBB0_18:
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [x20, #8]
	ldr	w9, [x24]
	add	w9, w9, #1
	cmp	w8, w9
	cset	w0, eq
	bl	_av_assert1
	mov	w23, #0
LBB0_19:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error getting output packet\n"

	.no_dead_strip	_cng_encode_frame
.subsections_via_symbols
