	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function generate_new_codebooks
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
LCPI0_2:
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	3                               ## 0x3
LCPI0_3:
	.long	2863311531                      ## 0xaaaaaaab
	.long	2863311531                      ## 0xaaaaaaab
	.long	2863311531                      ## 0xaaaaaaab
	.long	2863311531                      ## 0xaaaaaaab
LCPI0_4:
	.long	6                               ## 0x6
	.long	6                               ## 0x6
	.long	6                               ## 0x6
	.long	6                               ## 0x6
LCPI0_5:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
LCPI0_6:
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_generate_new_codebooks:                ## @generate_new_codebooks
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -152(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	4(%rdi), %ebx
	movq	%rdi, -112(%rbp)                ## 8-byte Spill
	imull	(%rdi), %ebx
	leal	15(%rbx), %r14d
	testl	%ebx, %ebx
	cmovnsl	%ebx, %r14d
	sarl	$4, %r14d
	movq	_MAX_CBS_4x4@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$4, %edi
	callq	_av_malloc
	movq	%rax, %r15
	movl	%r14d, %edi
	movl	$96, %esi
	callq	_av_malloc_array
	movq	%rax, %r13
	movl	%r14d, %edi
	movl	$96, %esi
	callq	_av_malloc_array
	movq	%rax, %r12
	movq	%r15, -136(%rbp)                ## 8-byte Spill
	testq	%r15, %r15
	je	LBB0_34
## %bb.1:
	testq	%r13, %r13
	je	LBB0_34
## %bb.2:
	testq	%r12, %r12
	je	LBB0_34
## %bb.3:
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movl	32(%rax), %edi
	movl	(%rax), %esi
	movl	4(%rax), %edx
	movq	%r13, %rcx
	callq	_create_clusters
	cmpl	$16, %ebx
	movq	_MAX_CBS_4x4@GOTPCREL(%rip), %r15
	jl	LBB0_22
## %bb.4:
	leal	(,%r14,8), %eax
	leal	(%rax,%rax,2), %eax
	cmpl	$2, %eax
	movl	$1, %r9d
	cmovgel	%eax, %r9d
	cmpl	$8, %r9d
	jae	LBB0_6
## %bb.5:
	xorl	%ecx, %ecx
LBB0_11:
	movq	%rcx, %rdx
	notq	%rdx
	testb	$1, %r9b
	je	LBB0_15
## %bb.12:
	movl	$2863311531, %eax               ## imm = 0xAAAAAAAB
	imulq	%rcx, %rax
	shrq	$34, %rax
	addl	%eax, %eax
	leal	(%rax,%rax,2), %eax
	movl	%ecx, %edi
	subl	%eax, %edi
	movl	$1, %esi
	cmpl	$4, %edi
	jb	LBB0_14
## %bb.13:
	movq	_CHROMA_BIAS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_14:
	imull	(%r13,%rcx,4), %esi
	movl	%esi, (%r12,%rcx,4)
	orq	$1, %rcx
LBB0_15:
	negq	%r9
	cmpq	%r9, %rdx
	je	LBB0_22
## %bb.16:
	leaq	1(%rcx), %rdx
	movl	$2863311531, %r10d              ## imm = 0xAAAAAAAB
	movq	_CHROMA_BIAS@GOTPCREL(%rip), %r8
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	imull	(%r13,%rdx,4), %ebx
	movl	%ebx, (%r12,%rdx,4)
	leaq	(%r9,%rdx), %rax
	addq	$2, %rax
	addq	$2, %rdx
	addl	$2, %ecx
	cmpq	$1, %rax
	je	LBB0_22
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %eax
	imulq	%r10, %rax
	shrq	$34, %rax
	addl	%eax, %eax
	leal	(%rax,%rax,2), %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	movl	%edx, %eax
	imulq	%r10, %rax
	shrq	$34, %rax
	addl	%eax, %eax
	leal	(%rax,%rax,2), %eax
	movl	%edx, %edi
	subl	%eax, %edi
	movl	$1, %ebx
	movl	$1, %eax
	cmpl	$4, %esi
	jb	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	(%r8), %eax
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	imull	-4(%r13,%rdx,4), %eax
	movl	%eax, -4(%r12,%rdx,4)
	cmpl	$4, %edi
	jb	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	(%r8), %ebx
	jmp	LBB0_21
LBB0_6:
	leaq	(%r12,%r9,4), %rax
	leaq	(,%r9,4), %rcx
	addq	%r13, %rcx
	movq	_CHROMA_BIAS@GOTPCREL(%rip), %rdi
	leaq	4(%rdi), %rsi
	cmpq	%rsi, %r12
	setb	%sil
	cmpq	%rdi, %rax
	seta	%dl
	cmpq	%rcx, %r12
	setb	%bl
	cmpq	%rax, %r13
	setb	%al
	xorl	%ecx, %ecx
	testb	%dl, %sil
	jne	LBB0_11
## %bb.7:
	andb	%al, %bl
	jne	LBB0_11
## %bb.8:
	movl	%r9d, %ecx
	andl	$2147483640, %ecx               ## imm = 0x7FFFFFF8
	movd	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm2                ## xmm2 = xmm0[0,0,0,0]
	movdqa	LCPI0_0(%rip), %xmm7            ## xmm7 = [0,1,2,3]
	xorl	%edx, %edx
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = [4,4,4,4]
	movdqa	LCPI0_2(%rip), %xmm10           ## xmm10 = [3,3,3,3]
	movdqa	LCPI0_3(%rip), %xmm6            ## xmm6 = [2863311531,2863311531,2863311531,2863311531]
	movdqa	LCPI0_4(%rip), %xmm11           ## xmm11 = [6,6,6,6]
	movaps	LCPI0_5(%rip), %xmm4            ## xmm4 = [1,1,1,1]
	movdqa	LCPI0_6(%rip), %xmm9            ## xmm9 = [8,8,8,8]
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm7, %xmm3
	paddd	%xmm8, %xmm3
	pshufd	$245, %xmm7, %xmm0              ## xmm0 = xmm7[1,1,3,3]
	pmuludq	%xmm6, %xmm0
	movdqa	%xmm7, %xmm1
	pmuludq	%xmm6, %xmm1
	pshufd	$245, %xmm1, %xmm1              ## xmm1 = xmm1[1,1,3,3]
	pblendw	$204, %xmm0, %xmm1              ## xmm1 = xmm1[0,1],xmm0[2,3],xmm1[4,5],xmm0[6,7]
	psrld	$2, %xmm1
	pmulld	%xmm11, %xmm1
	movdqa	%xmm7, %xmm5
	psubd	%xmm1, %xmm5
	pshufd	$245, %xmm3, %xmm0              ## xmm0 = xmm3[1,1,3,3]
	pmuludq	%xmm6, %xmm0
	movdqa	%xmm3, %xmm1
	pmuludq	%xmm6, %xmm1
	pshufd	$245, %xmm1, %xmm1              ## xmm1 = xmm1[1,1,3,3]
	pblendw	$204, %xmm0, %xmm1              ## xmm1 = xmm1[0,1],xmm0[2,3],xmm1[4,5],xmm0[6,7]
	psrld	$2, %xmm1
	pmulld	%xmm11, %xmm1
	psubd	%xmm1, %xmm3
	movdqa	%xmm5, %xmm0
	pminud	%xmm10, %xmm0
	pcmpeqd	%xmm5, %xmm0
	movdqa	%xmm3, %xmm1
	pminud	%xmm10, %xmm1
	movdqa	%xmm2, %xmm5
	blendvps	%xmm0, %xmm4, %xmm5
	pcmpeqd	%xmm3, %xmm1
	movdqa	%xmm2, %xmm3
	movdqa	%xmm1, %xmm0
	blendvps	%xmm0, %xmm4, %xmm3
	movdqu	(%r13,%rdx,4), %xmm0
	pmulld	%xmm5, %xmm0
	movdqu	16(%r13,%rdx,4), %xmm1
	pmulld	%xmm3, %xmm1
	movdqu	%xmm0, (%r12,%rdx,4)
	movdqu	%xmm1, 16(%r12,%rdx,4)
	addq	$8, %rdx
	paddd	%xmm9, %xmm7
	cmpq	%rdx, %rcx
	jne	LBB0_9
## %bb.10:
	cmpq	%r9, %rcx
	jne	LBB0_11
LBB0_22:
	movl	(%r15), %eax
	movq	%r12, %rdx
	movq	-112(%rbp), %r12                ## 8-byte Reload
	cmpq	$1, 24(%r12)
	adcl	$-1, %eax
	movl	%eax, (%rsp)
	movq	%r12, %rdi
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movl	%r14d, %ecx
	movq	-136(%rbp), %r8                 ## 8-byte Reload
	movl	$4, %r9d
	callq	_generate_codebook
	testl	%eax, %eax
	js	LBB0_23
## %bb.24:
	cmpq	$1, 24(%r12)
	movl	(%r15), %eax
	adcl	$-1, %eax
	movl	%eax, 8(%rbx)
	movl	%r14d, %edi
	movl	$16, %esi
	callq	_av_malloc_array
	movq	%rax, (%rbx)
	testq	%rax, %rax
	movq	-104(%rbp), %r12                ## 8-byte Reload
	je	LBB0_34
## %bb.25:
	shll	$2, %r14d
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movq	8(%rdi), %r8
	movq	_MAX_CBS_2x2@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, (%rsp)
	movq	%r12, %rdx
	movq	-152(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r14d, %ecx
	movl	$2, %r9d
	callq	_generate_codebook
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_26
## %bb.27:
	movl	%ebx, -124(%rbp)                ## 4-byte Spill
	movq	%r13, -144(%rbp)                ## 8-byte Spill
	movl	(%r15), %eax
	movl	%eax, 12(%r12)
	testl	%eax, %eax
	movq	-112(%rbp), %r13                ## 8-byte Reload
	jle	LBB0_30
## %bb.28:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rdi
	addq	%r15, %rdi
	movq	16(%r12), %rsi
	addq	%r14, %rsi
	callq	_unpack_roq_cell
	incq	%rbx
	movslq	12(%r12), %rax
	addq	$4, %r15
	addq	$48, %r14
	cmpq	%rax, %rbx
	jl	LBB0_29
LBB0_30:
	cmpl	$0, 8(%r12)
	jle	LBB0_31
## %bb.32:
	xorl	%r15d, %r15d
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdx, -168(%rbp)                ## 8-byte Spill
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	leaq	-96(%rbp), %r14
	movq	%r14, %rsi
	callq	_unpack_roq_cell
	movq	16(%r12), %rsi
	movl	12(%r12), %edx
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	16(%rbx), %rax
	movq	(%rax,%r15), %rcx
	movq	%r14, %rdi
	movl	$2, %r8d
	callq	_index_mb
	movq	-120(%rbp), %rax                ## 8-byte Reload
	leaq	4(%rax), %rdi
	movq	%r14, %rsi
	callq	_unpack_roq_cell
	movq	16(%r12), %rsi
	movl	12(%r12), %edx
	movq	16(%rbx), %rax
	movq	(%rax,%r15), %rcx
	addq	$4, %rcx
	movq	%r14, %rdi
	movl	$2, %r8d
	callq	_index_mb
	movq	-120(%rbp), %rax                ## 8-byte Reload
	leaq	8(%rax), %rdi
	movq	%r14, %rsi
	callq	_unpack_roq_cell
	movq	16(%r12), %rsi
	movl	12(%r12), %edx
	movq	16(%rbx), %rax
	movq	(%rax,%r15), %rcx
	addq	$8, %rcx
	movq	%r14, %rdi
	movl	$2, %r8d
	callq	_index_mb
	movq	-120(%rbp), %rax                ## 8-byte Reload
	leaq	12(%rax), %rdi
	movq	%r14, %rsi
	callq	_unpack_roq_cell
	movq	16(%r12), %rsi
	movl	12(%r12), %edx
	movq	16(%rbx), %rax
	movq	(%rax,%r15), %rcx
	addq	$12, %rcx
	movq	%r14, %rdi
	movl	$2, %r8d
	callq	_index_mb
	movq	16(%r12), %rdi
	movq	16(%rbx), %rsi
	addq	%r15, %rsi
	movq	%r13, %rbx
	andl	$-16, %r13d
	movq	32(%r12), %rdx
	addq	%r13, %rdx
	callq	_unpack_roq_qcell
	addq	32(%r12), %r13
	movq	-160(%rbp), %r14                ## 8-byte Reload
	movl	%r14d, %esi
	andl	$-64, %esi
	addq	24(%r12), %rsi
	movq	%r13, %rdi
	movq	%rbx, %r13
	callq	_enlarge_roq_mb4
	movq	-168(%rbp), %rdx                ## 8-byte Reload
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	incq	%rdx
	movslq	8(%r12), %rax
	addq	$192, %r14
	movq	%r14, -160(%rbp)                ## 8-byte Spill
	addq	$48, %r13
	addq	$16, %rcx
	addq	$8, %r15
	cmpq	%rax, %rdx
	jl	LBB0_33
LBB0_31:
	movq	-144(%rbp), %r13                ## 8-byte Reload
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movl	-124(%rbp), %ebx                ## 4-byte Reload
	jmp	LBB0_36
LBB0_34:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_35
LBB0_23:
	movq	-104(%rbp), %r12                ## 8-byte Reload
LBB0_35:
	movl	%eax, %ebx
LBB0_36:
	movq	%r13, %rdi
	callq	_av_free
	movq	%r12, %rdi
	callq	_av_free
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	callq	_av_free
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_38
## %bb.37:
	movl	%ebx, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movq	-104(%rbp), %r12                ## 8-byte Reload
	jmp	LBB0_36
LBB0_38:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CBS_4x4,4,2                ## @MAX_CBS_4x4
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CHROMA_BIAS,4,2                ## @CHROMA_BIAS
	.comm	_MAX_CBS_2x2,4,2                ## @MAX_CBS_2x2
	.no_dead_strip	_generate_new_codebooks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function generate_new_codebooks
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_generate_new_codebooks:                ; @generate_new_codebooks
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #72]
	ldp	w8, w9, [x0]
	mul	w19, w9, w8
	add	w8, w19, #15
	cmp	w19, #0
	csel	w8, w8, w19, lt
	asr	w25, w8, #4
Lloh3:
	adrp	x26, _MAX_CBS_4x4@GOTPAGE
Lloh4:
	ldr	x26, [x26, _MAX_CBS_4x4@GOTPAGEOFF]
	ldr	w8, [x26]
	lsl	w0, w8, #4
	bl	_av_malloc
	mov	x20, x0
	mov	x0, x25
	mov	w1, #96
	bl	_av_malloc_array
	mov	x27, x0
	mov	x0, x25
	mov	w1, #96
	bl	_av_malloc_array
	mov	x23, x0
	cmp	x20, #0
	ccmp	x27, #0, #4, ne
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
LBB0_1:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_22
LBB0_2:
	ldr	w0, [x22, #32]
	ldp	w1, w2, [x22]
	mov	x3, x27
	bl	_create_clusters
	cmp	w19, #16
	b.lt	LBB0_12
; %bb.3:
	add	w8, w25, w25, lsl #1
	lsl	w8, w8, #3
	cmp	w8, #1
	csinc	w10, w8, wzr, gt
Lloh8:
	adrp	x8, _CHROMA_BIAS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CHROMA_BIAS@GOTPAGEOFF]
	cmp	w10, #4
	b.hs	LBB0_5
; %bb.4:
	mov	x9, #0
	b	LBB0_10
LBB0_5:
	mov	x9, #0
	lsl	x11, x10, #2
	add	x12, x8, #4
	add	x13, x27, x11
	cmp	x23, x13
	add	x13, x23, x11
	ccmp	x27, x13, #2, lo
	cset	w11, lo
	cmp	x13, x8
	ccmp	x23, x12, #2, hi
	b.lo	LBB0_10
; %bb.6:
	tbnz	w11, #0, LBB0_10
; %bb.7:
	and	x9, x10, #0x7ffffff8
Lloh10:
	adrp	x11, lCPI0_0@PAGE
Lloh11:
	ldr	q5, [x11, lCPI0_0@PAGEOFF]
	ld1r.4s	{ v0 }, [x8]
	mov	w11, #43691
	movk	w11, #43690, lsl #16
	dup.4s	v1, w11
	movi.4s	v2, #6
	movi.4s	v3, #4
	movi.4s	v4, #1
	mov	x11, x9
	mov	x12, x23
	mov	x13, x27
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	umull2.2d	v6, v5, v1
	umull.2d	v7, v5, v1
	uzp2.4s	v6, v7, v6
	ushr.4s	v6, v6, #2
	add.4s	v7, v5, v3
	mls.4s	v5, v6, v2
	cmhi.4s	v5, v3, v5
	ldr	q6, [x13], #16
	bsl.16b	v5, v4, v0
	mul.4s	v5, v5, v6
	str	q5, [x12], #16
	mov.16b	v5, v7
	subs	x11, x11, #4
	b.ne	LBB0_8
; %bb.9:
	cmp	x9, x10
	b.eq	LBB0_12
LBB0_10:
	lsl	x12, x9, #2
	add	x11, x23, x12
	add	x12, x27, x12
	sub	x10, x10, x9
	mov	w13, #43691
	movk	w13, #43690, lsl #16
	mov	w14, #6
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	umull	x15, w9, w13
	lsr	x15, x15, #34
	msub	w15, w15, w14, w9
	ldr	w16, [x8]
	cmp	w15, #4
	ldr	w15, [x12], #4
	csinc	w16, w16, wzr, hs
	mul	w15, w16, w15
	str	w15, [x11], #4
	add	w9, w9, #1
	subs	x10, x10, #1
	b.ne	LBB0_11
LBB0_12:
	ldr	x8, [x22, #24]
	cmp	x8, #0
	cset	w8, ne
	ldr	w9, [x26]
	sub	w6, w9, w8
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	mov	x3, x25
	mov	x4, x20
	mov	w5, #4
	bl	_generate_codebook
	tbnz	w0, #31, LBB0_22
; %bb.13:
	ldr	x8, [x22, #24]
	cmp	x8, #0
	cset	w8, ne
	ldr	w9, [x26]
	sub	w8, w9, w8
	str	w8, [x21, #8]
	mov	x0, x25
	mov	w1, #16
	bl	_av_malloc_array
	str	x0, [x21]
	cbz	x0, LBB0_1
; %bb.14:
	lsl	w3, w25, #2
	ldr	x4, [x22, #8]
Lloh12:
	adrp	x19, _MAX_CBS_2x2@GOTPAGE
Lloh13:
	ldr	x19, [x19, _MAX_CBS_2x2@GOTPAGEOFF]
	ldr	w6, [x19]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	mov	w5, #2
	bl	_generate_codebook
	mov	x24, x0
	tbnz	w0, #31, LBB0_23
; %bb.15:
	ldr	w8, [x19]
	str	w8, [x21, #12]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
	mov	x19, #0
	mov	x25, #0
	mov	x26, #0
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	add	x0, x8, x25
	ldr	x8, [x21, #16]
	add	x1, x8, x19
	bl	_unpack_roq_cell
	add	x26, x26, #1
	ldrsw	x8, [x21, #12]
	add	x25, x25, #4
	add	x19, x19, #48
	cmp	x26, x8
	b.lt	LBB0_17
LBB0_18:
	ldr	w8, [x21, #8]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.19:
	stp	x27, x20, [sp, #8]              ; 16-byte Folded Spill
	mov	x26, #0
	mov	x27, #0
	mov	x28, #0
	mov	x19, #0
	mov	x25, x20
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #24
	mov	x0, x25
	bl	_unpack_roq_cell
	ldr	x1, [x21, #16]
	ldr	w2, [x21, #12]
	ldr	x8, [x22, #16]
	ldr	x3, [x8, x26]
	add	x0, sp, #24
	mov	w4, #2
	bl	_index_mb
	add	x0, x25, #4
	add	x1, sp, #24
	bl	_unpack_roq_cell
	ldr	x1, [x21, #16]
	ldr	w2, [x21, #12]
	ldr	x8, [x22, #16]
	ldr	x8, [x8, x26]
	add	x3, x8, #4
	add	x0, sp, #24
	mov	w4, #2
	bl	_index_mb
	add	x0, x25, #8
	add	x1, sp, #24
	bl	_unpack_roq_cell
	ldr	x1, [x21, #16]
	ldr	w2, [x21, #12]
	ldr	x8, [x22, #16]
	ldr	x8, [x8, x26]
	add	x3, x8, #8
	add	x0, sp, #24
	mov	w4, #2
	bl	_index_mb
	add	x0, x25, #12
	add	x1, sp, #24
	bl	_unpack_roq_cell
	ldr	x1, [x21, #16]
	ldr	w2, [x21, #12]
	ldr	x8, [x22, #16]
	ldr	x8, [x8, x26]
	add	x3, x8, #12
	add	x0, sp, #24
	mov	w4, #2
	bl	_index_mb
	ldr	x0, [x21, #16]
	ldr	x8, [x22, #16]
	add	x1, x8, x26
	ldr	x8, [x21, #32]
	and	x20, x27, #0xfffffff0
	add	x2, x8, x20
	bl	_unpack_roq_qcell
	ldp	x9, x8, [x21, #24]
	add	x0, x8, x20
	and	x8, x28, #0xffffffc0
	add	x1, x9, x8
	bl	_enlarge_roq_mb4
	add	x19, x19, #1
	add	x28, x28, #192
	ldrsw	x8, [x21, #8]
	add	x27, x27, #48
	add	x25, x25, #16
	add	x26, x26, #8
	cmp	x19, x8
	b.lt	LBB0_20
; %bb.21:
	ldp	x27, x20, [sp, #8]              ; 16-byte Folded Reload
	b	LBB0_23
LBB0_22:
	mov	x24, x0
LBB0_23:
	mov	x0, x27
	bl	_av_free
	mov	x0, x23
	bl	_av_free
	mov	x0, x20
	bl	_av_free
	ldr	x8, [sp, #72]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	mov	x0, x24
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CBS_4x4,4,2                ; @MAX_CBS_4x4
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CHROMA_BIAS,4,2                ; @CHROMA_BIAS
	.comm	_MAX_CBS_2x2,4,2                ; @MAX_CBS_2x2
	.no_dead_strip	_generate_new_codebooks
.subsections_via_symbols
