	.file	"extr_vp6.c_vp6_parse_coeff_models.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vp6_parse_coeff_models, @function
vp6_parse_coeff_models:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	esi, 128
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	lea	r13, 56[rdi]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	r14, QWORD PTR 48[rdi]
	mov	QWORD PTR [rsp], rdi
	lea	rdi, 16[rsp]
	mov	rdx, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rdx
	xor	edx, edx
	mov	edx, 44
	mov	QWORD PTR 8[rsp], rdi
	call	memset@PLT
.L2:
	xor	ebx, ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR [rsp]
	mov	rdx, QWORD PTR VP56_FRAME_CURRENT[rip]
	mov	rax, QWORD PTR 40[rax]
	mov	rax, QWORD PTR [rax+rdx*8]
	cmp	QWORD PTR [rax], 0
	je	.L4
	mov	rax, QWORD PTR 8[rsp]
	mov	edx, DWORD PTR [rax+rbx]
	mov	rax, QWORD PTR [r14]
	mov	rax, QWORD PTR [rax+rbp]
	mov	DWORD PTR [rax+rbx], edx
.L4:
	add	rbx, 4
	cmp	rbx, 44
	je	.L54
.L5:
	mov	rax, QWORD PTR vp6_dccv_pct[rip]
	mov	rdi, r13
	mov	rax, QWORD PTR [rax+rbp]
	mov	esi, DWORD PTR [rax+rbx]
	call	vp56_rac_get_prob_branchy@PLT
	test	rax, rax
	je	.L3
	mov	esi, 7
	mov	rdi, r13
	call	vp56_rac_gets_nn@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	DWORD PTR [rdx+rbx], eax
	mov	rdx, QWORD PTR [r14]
	mov	rdx, QWORD PTR [rdx+rbp]
	mov	DWORD PTR [rdx+rbx], eax
	add	rbx, 4
	cmp	rbx, 44
	jne	.L5
.L54:
	add	rbp, 8
	cmp	rbp, 16
	jne	.L2
	mov	rdi, r13
	call	vp56_rac_get@PLT
	test	rax, rax
	je	.L7
	mov	ebx, 4
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	add	rbx, 4
	cmp	rbx, 256
	je	.L55
.L9:
	mov	rax, QWORD PTR vp6_coeff_reorder_pct[rip]
	mov	rdi, r13
	mov	esi, DWORD PTR [rax+rbx]
	call	vp56_rac_get_prob_branchy@PLT
	test	rax, rax
	je	.L8
	mov	rbp, QWORD PTR 32[r14]
	mov	esi, 4
	mov	rdi, r13
	call	vp56_rac_gets@PLT
	add	rbp, rbx
	add	rbx, 4
	mov	DWORD PTR 0[rbp], eax
	cmp	rbx, 256
	jne	.L9
.L55:
	mov	rdi, QWORD PTR [rsp]
	call	vp6_coeff_order_table_init@PLT
.L7:
	xor	ebp, ebp
.L12:
	xor	ebx, ebx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	add	rbx, 4
	cmp	rbx, 56
	je	.L56
.L11:
	mov	rax, QWORD PTR vp6_runv_pct[rip]
	mov	rdi, r13
	mov	rax, QWORD PTR [rax+rbp]
	mov	esi, DWORD PTR [rax+rbx]
	call	vp56_rac_get_prob_branchy@PLT
	test	rax, rax
	je	.L10
	mov	esi, 7
	mov	rdi, r13
	call	vp56_rac_gets_nn@PLT
	mov	r8, rax
	mov	rax, QWORD PTR 8[r14]
	mov	rax, QWORD PTR [rax+rbp]
	mov	DWORD PTR [rax+rbx], r8d
	add	rbx, 4
	cmp	rbx, 56
	jne	.L11
.L56:
	add	rbp, 8
	cmp	rbp, 16
	jne	.L12
	xor	r12d, r12d
.L13:
	xor	ebp, ebp
.L21:
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L19:
	xor	r15d, r15d
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR [rsp]
	mov	rcx, QWORD PTR VP56_FRAME_CURRENT[rip]
	mov	rax, QWORD PTR 40[rax]
	mov	rax, QWORD PTR [rax+rcx*8]
	cmp	QWORD PTR [rax], 0
	je	.L15
	mov	rax, QWORD PTR 8[rsp]
	mov	ecx, DWORD PTR [rax+r15]
	mov	rax, QWORD PTR 16[r14]
	mov	rax, QWORD PTR [rax+rbp]
	mov	rax, QWORD PTR [rax+r12]
	mov	rax, QWORD PTR [rax+rbx]
	mov	DWORD PTR [rax+r15], ecx
.L15:
	add	r15, 4
	cmp	r15, 44
	je	.L57
.L16:
	mov	rax, QWORD PTR vp6_ract_pct[rip]
	mov	rdi, r13
	mov	rax, QWORD PTR [rax+r12]
	mov	rax, QWORD PTR [rax+rbp]
	mov	rax, QWORD PTR [rax+rbx]
	mov	esi, DWORD PTR [rax+r15]
	call	vp56_rac_get_prob_branchy@PLT
	test	rax, rax
	je	.L14
	mov	esi, 7
	mov	rdi, r13
	call	vp56_rac_gets_nn@PLT
	mov	rcx, QWORD PTR 16[r14]
	mov	rdx, QWORD PTR 8[rsp]
	mov	rcx, QWORD PTR [rcx+rbp]
	mov	DWORD PTR [rdx+r15], eax
	mov	rcx, QWORD PTR [rcx+r12]
	mov	rcx, QWORD PTR [rcx+rbx]
	mov	DWORD PTR [rcx+r15], eax
	add	r15, 4
	cmp	r15, 44
	jne	.L16
.L57:
	add	rbx, 8
	cmp	rbx, 48
	jne	.L19
	add	rbp, 8
	cmp	rbp, 16
	jne	.L21
	add	r12, 8
	cmp	r12, 24
	jne	.L13
	mov	rax, QWORD PTR [rsp]
	cmp	QWORD PTR 32[rax], 0
	je	.L33
	xor	r13d, r13d
.L27:
	mov	rbx, QWORD PTR [rsp]
	mov	rax, QWORD PTR [r14]
	mov	ecx, 12
	lea	r12, [r13+r13]
	mov	edx, DWORD PTR vp6_huff_coeff_map[rip]
	mov	r8, QWORD PTR 24[rbx]
	mov	rsi, QWORD PTR [rax+r13*2]
	mov	rdi, rbx
	add	r8, r13
	call	vp6_build_huff_tree@PLT
	test	rax, rax
	jne	.L23
	mov	rax, QWORD PTR 8[r14]
	mov	r8, QWORD PTR 16[rbx]
	mov	ecx, 9
	mov	rdi, rbx
	mov	edx, DWORD PTR vp6_huff_run_map[rip]
	mov	rsi, QWORD PTR [rax+r13*2]
	add	r8, r13
	call	vp6_build_huff_tree@PLT
	test	rax, rax
	jne	.L23
	xor	ebp, ebp
.L24:
	xor	ebx, ebx
.L25:
	mov	rdi, QWORD PTR [rsp]
	mov	rdx, QWORD PTR 16[r14]
	mov	ecx, 12
	mov	rax, QWORD PTR 8[rdi]
	mov	rdx, QWORD PTR [rdx+r12]
	mov	rax, QWORD PTR [rax+r12]
	mov	rdx, QWORD PTR [rdx+rbp]
	mov	r8, QWORD PTR [rax+rbp]
	mov	rsi, QWORD PTR [rdx+rbx*2]
	mov	edx, DWORD PTR vp6_huff_coeff_map[rip]
	add	r8, rbx
	call	vp6_build_huff_tree@PLT
	test	rax, rax
	jne	.L23
	add	rbx, 4
	cmp	rbx, 24
	jne	.L25
	add	rbp, 8
	cmp	rbp, 24
	jne	.L24
	add	r13, 4
	cmp	r13, 8
	jne	.L27
	mov	rax, QWORD PTR [rsp]
	mov	edx, 8
	xor	esi, esi
	mov	rdi, QWORD PTR [rax]
	call	memset@PLT
	xor	eax, eax
	jmp	.L1
.L33:
	xor	r12d, r12d
.L22:
	xor	ebp, ebp
.L31:
	xor	ebx, ebx
.L29:
	mov	rdx, QWORD PTR 24[r14]
	mov	rax, QWORD PTR vp6_dccv_lc[rip]
	mov	esi, 1
	mov	rdx, QWORD PTR [rdx+r12]
	mov	rax, QWORD PTR [rax+rbp]
	mov	r13, QWORD PTR [rdx+rbp]
	mov	rdx, QWORD PTR [r14]
	mov	rax, QWORD PTR [rax+rbx*2]
	mov	rdx, QWORD PTR [rdx+r12]
	add	r13, rbx
	mov	edi, DWORD PTR [rdx+rbx]
	imul	edi, DWORD PTR [rax]
	mov	edx, 255
	add	rbx, 4
	sub	edi, -128
	sar	edi, 8
	add	edi, DWORD PTR 4[rax]
	call	av_clip@PLT
	mov	DWORD PTR 0[r13], eax
	cmp	rbx, 20
	jne	.L29
	add	rbp, 8
	cmp	rbp, 24
	jne	.L31
	add	r12, 8
	cmp	r12, 16
	jne	.L22
	xor	eax, eax
.L1:
	mov	rdx, QWORD PTR 72[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L58
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	mov	eax, -1
	jmp	.L1
.L58:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vp6_parse_coeff_models, .-vp6_parse_coeff_models
	.comm	vp6_runv_pct,8,8
	.comm	vp6_ract_pct,8,8
	.comm	vp6_huff_run_map,4,4
	.comm	vp6_huff_coeff_map,4,4
	.comm	vp6_dccv_pct,8,8
	.comm	vp6_dccv_lc,8,8
	.comm	vp6_coeff_reorder_pct,8,8
	.comm	VP56_FRAME_CURRENT,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_vp6.c_vp6_parse_coeff_models.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vp6_parse_coeff_models, %function
vp6_parse_coeff_models:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r0
	ldr	r3, .L67
	sub	sp, sp, #68
	ldr	r3, [r3]
	str	r3, [sp, #60]
	mov	r3,#0
	ldr	r3, [r10, #24]
	mov	r2, #44
	mov	r1, #128
	add	r0, sp, #16
	str	r3, [sp, #12]
	mov	r5, #0
	bl	memset
	ldr	r6, .L67+4
	ldr	r8, .L67+8
	add	r7, r10, #28
.L2:
	mov	r4, #0
	b	.L5
.L3:
	ldr	r2, [r8]
	ldr	r3, [r10, #20]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L4
	ldr	r3, [sp, #12]
	add	r2, sp, #16
	ldr	r3, [r3]
	ldr	r2, [r2, r4]
	ldr	r3, [r3, r5]
	str	r2, [r3, r4]
.L4:
	add	r4, r4, #4
	cmp	r4, #44
	beq	.L62
.L5:
	ldr	r3, [r6]
	mov	r0, r7
	ldr	r3, [r3, r5]
	ldr	r1, [r3, r4]
	bl	vp56_rac_get_prob_branchy
	cmp	r0, #0
	beq	.L3
	mov	r1, #7
	mov	r0, r7
	bl	vp56_rac_gets_nn
	ldr	r3, [sp, #12]
	add	r2, sp, #16
	ldr	r3, [r3]
	str	r0, [r2, r4]
	ldr	r3, [r3, r5]
	str	r0, [r3, r4]
	add	r4, r4, #4
	cmp	r4, #44
	bne	.L5
.L62:
	add	r5, r5, #4
	cmp	r5, #8
	bne	.L2
	mov	r0, r7
	bl	vp56_rac_get
	cmp	r0, #0
	beq	.L7
	mov	r4, #4
	ldr	r5, .L67+12
	b	.L9
.L8:
	add	r4, r4, #4
	cmp	r4, #256
	beq	.L63
.L9:
	ldr	r3, [r5]
	mov	r0, r7
	ldr	r1, [r3, r4]
	bl	vp56_rac_get_prob_branchy
	cmp	r0, #0
	beq	.L8
	ldr	r3, [sp, #12]
	mov	r1, #4
	mov	r0, r7
	ldr	r6, [r3, #16]
	bl	vp56_rac_gets
	str	r0, [r6, r4]
	add	r4, r4, #4
	cmp	r4, #256
	bne	.L9
.L63:
	mov	r0, r10
	bl	vp6_coeff_order_table_init
.L7:
	mov	r5, #0
	ldr	r6, .L67+16
.L12:
	mov	r4, #0
	b	.L11
.L10:
	add	r4, r4, #4
	cmp	r4, #56
	beq	.L64
.L11:
	ldr	r3, [r6]
	mov	r0, r7
	ldr	r3, [r3, r5]
	ldr	r1, [r3, r4]
	bl	vp56_rac_get_prob_branchy
	cmp	r0, #0
	beq	.L10
	mov	r1, #7
	mov	r0, r7
	bl	vp56_rac_gets_nn
	ldr	r3, [sp, #12]
	ldr	r3, [r3, #4]
	ldr	r3, [r3, r5]
	str	r0, [r3, r4]
	add	r4, r4, #4
	cmp	r4, #56
	bne	.L11
.L64:
	add	r5, r5, #4
	cmp	r5, #8
	bne	.L12
	mov	r6, #0
	ldr	r8, .L67+20
	ldr	fp, .L67+8
.L13:
	mov	r5, #0
.L21:
	mov	r4, #0
.L19:
	mov	r9, #0
	b	.L16
.L14:
	ldr	r1, [fp]
	ldr	r2, [r10, #20]
	ldr	r2, [r2, r1, lsl #2]
	ldr	r2, [r2]
	cmp	r2, #0
	beq	.L15
	ldr	r3, [sp, #12]
	ldr	r2, [r3, #8]
	add	r3, sp, #16
	ldr	r2, [r2, r5]
	ldr	r1, [r3, r9]
	ldr	r2, [r2, r6]
	ldr	r2, [r2, r4]
	str	r1, [r2, r9]
.L15:
	add	r9, r9, #4
	cmp	r9, #44
	beq	.L65
.L16:
	ldr	r2, [r8]
	mov	r0, r7
	ldr	r2, [r2, r6]
	ldr	r2, [r2, r5]
	ldr	r2, [r2, r4]
	ldr	r1, [r2, r9]
	bl	vp56_rac_get_prob_branchy
	cmp	r0, #0
	beq	.L14
	mov	r1, #7
	mov	r0, r7
	bl	vp56_rac_gets_nn
	ldr	r3, [sp, #12]
	ldr	r2, [r3, #8]
	add	r3, sp, #16
	ldr	r2, [r2, r5]
	str	r0, [r3, r9]
	ldr	r2, [r2, r6]
	ldr	r2, [r2, r4]
	str	r0, [r2, r9]
	add	r9, r9, #4
	cmp	r9, #44
	bne	.L16
.L65:
	add	r4, r4, #4
	cmp	r4, #24
	bne	.L19
	add	r5, r5, #4
	cmp	r5, #8
	bne	.L21
	add	r6, r6, #4
	cmp	r6, #12
	bne	.L13
	ldr	r6, [r10, #16]
	cmp	r6, #0
	beq	.L33
	mov	r7, #0
	ldr	r8, .L67+24
	ldr	fp, .L67+28
.L27:
	ldr	r4, [sp, #12]
	ldr	r3, [r10, #12]
	ldr	r2, [r4]
	add	r3, r3, r7
	ldr	r1, [r2, r7]
	str	r3, [sp]
	mov	r0, r10
	mov	r3, #12
	ldr	r2, [r8]
	bl	vp6_build_huff_tree
	cmp	r0, #0
	bne	.L23
	ldr	r3, [r10, #8]
	ldr	r2, [r4, #4]
	add	r3, r3, r7
	ldr	r1, [r2, r7]
	str	r3, [sp]
	mov	r0, r10
	mov	r3, #9
	ldr	r2, [fp]
	bl	vp6_build_huff_tree
	cmp	r0, #0
	bne	.L23
	mov	r5, r0
.L24:
	mov	r4, #0
.L25:
	ldr	r3, [sp, #12]
	mov	r0, r10
	ldr	r2, [r3, #8]
	ldr	r3, [r10, #4]
	ldr	r2, [r2, r7]
	ldr	r3, [r3, r7]
	ldr	r2, [r2, r5]
	ldr	r3, [r3, r5]
	ldr	r1, [r2, r4]
	add	r3, r3, r4
	str	r3, [sp]
	ldr	r2, [r8]
	mov	r3, #12
	bl	vp6_build_huff_tree
	subs	r6, r0, #0
	bne	.L23
	add	r4, r4, #4
	cmp	r4, #24
	bne	.L25
	add	r5, r5, #4
	cmp	r5, #12
	bne	.L24
	add	r7, r7, #4
	cmp	r7, #8
	bne	.L27
	ldr	r3, [r10]
	strb	r6, [r3]
	strb	r6, [r3, #1]
	strb	r6, [r3, #2]
	strb	r6, [r3, #3]
	b	.L1
.L33:
	mov	r7, r6
	ldr	r8, .L67+32
.L22:
	mov	r5, #0
.L31:
	mov	r4, #0
.L29:
	ldr	r1, [sp, #12]
	ldr	r2, [r8]
	ldr	r3, [r1]
	ldr	r2, [r2, r5]
	ldr	r3, [r3, r7]
	ldr	r2, [r2, r4]
	ldr	r3, [r3, r4]
	ldr	r0, [r2]
	ldr	r1, [r1, #12]
	mul	r3, r0, r3
	ldr	r0, [r2, #4]
	ldr	ip, [r1, r7]
	add	r3, r3, #128
	mov	r2, #255
	mov	r1, #1
	add	r0, r0, r3, asr #8
	ldr	r10, [ip, r5]
	bl	av_clip
	str	r0, [r10, r4]
	add	r4, r4, #4
	cmp	r4, #20
	bne	.L29
	add	r5, r5, #4
	cmp	r5, #12
	bne	.L31
	add	r7, r7, #4
	cmp	r7, #8
	bne	.L22
.L1:
	ldr	r3, .L67
	ldr	r2, [r3]
	ldr	r3, [sp, #60]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L66
	mov	r0, r6
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	mvn	r6, #0
	b	.L1
.L66:
	bl	__stack_chk_fail
.L68:
	.align	2
.L67:
	.word	.LC0
	.word	vp6_dccv_pct
	.word	VP56_FRAME_CURRENT
	.word	vp6_coeff_reorder_pct
	.word	vp6_runv_pct
	.word	vp6_ract_pct
	.word	vp6_huff_coeff_map
	.word	vp6_huff_run_map
	.word	vp6_dccv_lc
	.size	vp6_parse_coeff_models, .-vp6_parse_coeff_models
	.comm	vp6_runv_pct,4,4
	.comm	vp6_ract_pct,4,4
	.comm	vp6_huff_run_map,4,4
	.comm	vp6_huff_coeff_map,4,4
	.comm	vp6_dccv_pct,4,4
	.comm	vp6_dccv_lc,4,4
	.comm	vp6_coeff_reorder_pct,4,4
	.comm	VP56_FRAME_CURRENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
