	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function ready_codebook
LCPI0_0:
	.quad	0x3fe0000000000000              ## double 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ready_codebook:                        ## @ready_codebook
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	60(%rdi), %edi
	movl	(%r15), %edx
	movl	56(%r15), %esi
	callq	_ff_vorbis_len2vlc
	movl	4(%r15), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	movl	(%r15), %edx
	movl	24(%r15), %esi
	callq	_cb_lookup_vals
	movl	%eax, %r14d
	movl	(%r15), %edi
	movl	24(%r15), %esi
	shll	$2, %esi
	callq	_av_malloc_array
	movq	%rax, 16(%r15)
	movl	(%r15), %edi
	movl	$4, %esi
	callq	_av_mallocz_array
	movq	%rax, 8(%r15)
	movq	16(%r15), %r8
	testq	%r8, %r8
	je	LBB0_17
## %bb.3:
	movq	%rax, %r11
	testq	%rax, %rax
	je	LBB0_17
## %bb.4:
	cmpl	$0, (%r15)
	jle	LBB0_16
## %bb.5:
	xorl	%esi, %esi
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r11,%rsi,4), %eax
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	mulsd	%xmm0, %xmm1
	cvttsd2si	%xmm1, %eax
	movl	%eax, (%r11,%rsi,4)
	incq	%rsi
	movslq	(%r15), %rax
	cmpq	%rax, %rsi
	jge	LBB0_16
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	24(%r15), %ebx
	testl	%ebx, %ebx
	jle	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	32(%r15), %r9
	movq	48(%r15), %r10
	xorps	%xmm1, %xmm1
	xorl	%edi, %edi
	movl	$1, %ecx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=2
	xorps	%xmm3, %xmm3
	cvtsi2ssl	(%r11,%rsi,4), %xmm3
	mulss	%xmm2, %xmm2
	addss	%xmm3, %xmm2
	cvttss2si	%xmm2, %eax
	movl	%eax, (%r11,%rsi,4)
	imull	%r14d, %ecx
	incl	%edi
	movl	24(%r15), %ebx
	cmpl	%ebx, %edi
	jge	LBB0_15
LBB0_9:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$1, 4(%r15)
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	%esi, %eax
	cltd
	idivl	%ecx
	cltd
	idivl	%r14d
	imull	%esi, %ebx
	addl	%edi, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=2
	movl	%esi, %edx
	imull	%ebx, %edx
	imull	%esi, %ebx
	addl	%edi, %ebx
	addl	%edi, %edx
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=2
	movslq	%edx, %rax
	movl	40(%r15), %edx
	imull	(%r9,%rax,4), %edx
	movss	28(%r15), %xmm3                 ## xmm3 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm3
	xorps	%xmm2, %xmm2
	cvtsi2ss	%edx, %xmm2
	addss	%xmm3, %xmm2
	movslq	%ebx, %rax
	movss	%xmm2, (%r8,%rax,4)
	testq	%r10, %r10
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=2
	movaps	%xmm2, %xmm1
	jmp	LBB0_14
LBB0_1:
	xorpd	%xmm0, %xmm0
	movupd	%xmm0, 8(%r15)
LBB0_16:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ready_codebook
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ready_codebook
_ready_codebook:                        ; @ready_codebook
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #60]
	ldr	w1, [x19, #56]
	ldr	w2, [x19]
	bl	_ff_vorbis_len2vlc
	ldr	w0, [x19, #4]
	cbz	w0, LBB0_13
; %bb.1:
	ldr	w1, [x19, #24]
	ldr	w2, [x19]
	bl	_cb_lookup_vals
	mov	x20, x0
	ldr	w0, [x19]
	ldr	w8, [x19, #24]
	lsl	w1, w8, #2
	bl	_av_malloc_array
	str	x0, [x19, #16]
	ldr	w0, [x19]
	mov	w1, #4
	bl	_av_mallocz_array
	str	x0, [x19, #8]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_15
; %bb.2:
	cbz	x0, LBB0_15
; %bb.3:
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.4:
	mov	x9, #0
	fmov	d0, #0.50000000
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w15, [x0, x9, lsl #2]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	scvtf	d1, w15
	fmul	d1, d1, d0
	fcvtzs	w10, d1
	str	w10, [x0, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x10, [x19]
	cmp	x9, x10
	b.ge	LBB0_14
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldr	w14, [x19, #24]
	cmp	w14, #0
	b.le	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w10, #0
	ldr	x11, [x19, #32]
	ldr	x12, [x19, #48]
	movi	d1, #0000000000000000
	mov	w13, #1
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=2
	madd	w15, w14, w9, w10
	madd	w16, w9, w14, w10
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	ldr	s2, [x19, #28]
	fadd	s2, s1, s2
	ldr	w14, [x11, w16, sxtw #2]
	ldr	w16, [x19, #40]
	mul	w14, w16, w14
	scvtf	s3, w14
	fadd	s2, s2, s3
	str	s2, [x8, w15, sxtw #2]
	cmp	x12, #0
	fcsel	s1, s1, s2, eq
	lsl	x14, x9, #2
	ldr	s3, [x0, x14]
	scvtf	s3, s3
	fmadd	s2, s2, s2, s3
	fcvtzs	w15, s2
	str	w15, [x0, x14]
	mul	w13, w13, w20
	add	w10, w10, #1
	ldr	w14, [x19, #24]
	cmp	w10, w14
	b.ge	LBB0_6
LBB0_11:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w15, [x19, #4]
	cmp	w15, #1
	b.ne	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	sdiv	w15, w9, w13
	sdiv	w16, w15, w20
	msub	w16, w16, w20, w15
	madd	w15, w9, w14, w10
	b	LBB0_10
LBB0_13:
	stp	xzr, xzr, [x19, #8]
LBB0_14:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ready_codebook
.subsections_via_symbols
