	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function estimate_acs
_estimate_acs:                          ## @estimate_acs
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -120(%rbp)                 ## 8-byte Spill
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	shll	$6, %edx
	movq	_ff_prores_run_to_cb_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	16(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_ff_prores_lev_to_cb_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movslq	%edx, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	$1, %esi
	xorl	%eax, %eax
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-68(%rbp), %edx                 ## 4-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%rsi
	cmpq	$64, %rsi
	je	LBB0_9
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	(%r8,%rsi,8), %rcx
	cmpl	%ecx, %edx
	jle	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	%ecx, %r14
	addq	$64, %r14
	movq	%r8, %r15
	movq	%rsi, %r12
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movl	-256(%rax,%r14,4), %edi
	movl	%edi, %eax
	cltd
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	idivl	(%rbx,%rcx,4)
	movl	%eax, %r13d
	callq	_FFABS
	movq	(%r15,%r12,8), %rcx
	cltd
	idivl	(%rbx,%rcx,4)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	addl	%edx, (%rax)
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	%r13d, %edi
	callq	_FFABS
	movl	%eax, %r13d
	movq	_ff_prores_ac_codebook@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movslq	-52(%rbp), %rcx                 ## 4-byte Folded Reload
	movl	(%rax,%rcx,4), %edi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	callq	_estimate_vlc
	movq	%rax, %rbx
	movq	(%r15), %rax
	movslq	-48(%rbp), %rcx                 ## 4-byte Folded Reload
	movl	(%rax,%rcx,4), %edi
	leal	-1(%r13), %esi
	callq	_estimate_vlc
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	addl	%ebx, %ecx
	addl	%eax, %ecx
	incl	%ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	_ff_prores_run_to_cb_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	%r12d, %edi
	movl	$15, %esi
	callq	_FFMIN
	movl	(%rbx,%rax,4), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_ff_prores_lev_to_cb_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	%r13d, %edi
	movl	$9, %esi
	callq	_FFMIN
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movl	(%rbx,%rax,4), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	cmpq	-96(%rbp), %r14                 ## 8-byte Folded Reload
	jl	LBB0_10
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=2
	movq	%r15, %r8
	movq	%r12, %rsi
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cmpq	-96(%rbp), %r14                 ## 8-byte Folded Reload
	jge	LBB0_7
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=2
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%r8,%rsi,8), %rcx
	addq	$64, %r14
	movq	%r8, %r15
	movq	%rsi, %r12
	jmp	LBB0_3
LBB0_9:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_prores_run_to_cb_index,8,3  ## @ff_prores_run_to_cb_index
	.comm	_ff_prores_lev_to_cb_index,8,3  ## @ff_prores_lev_to_cb_index
	.comm	_ff_prores_ac_codebook,8,3      ## @ff_prores_ac_codebook
	.no_dead_strip	_estimate_acs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function estimate_acs
_estimate_acs:                          ; @estimate_acs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	stp	x5, x1, [sp, #8]                ; 16-byte Folded Spill
	mov	x20, x4
	mov	x22, x0
	mov	w23, #0
	mov	w24, #0
	lsl	w8, w2, #6
Lloh0:
	adrp	x9, _ff_prores_run_to_cb_index@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ff_prores_run_to_cb_index@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w26, [x9, #16]
Lloh3:
	adrp	x9, _ff_prores_lev_to_cb_index@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ff_prores_lev_to_cb_index@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w21, [x9, #8]
	sxtw	x8, w8
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	mov	w28, #1
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x28, x28, #1
	cmp	x28, #64
	b.eq	LBB0_9
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	ldr	x8, [x20, x28, lsl #3]
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	cmp	w9, w8
	b.le	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sxtw	x27, w8
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	x19, x9, [sp, #8]               ; 16-byte Folded Reload
	ldr	w0, [x9, x27, lsl #2]
	ldr	w8, [x19, x8, lsl #2]
	sdiv	w25, w0, w8
	bl	_FFABS
	ldr	x8, [x20, x28, lsl #3]
	ldr	w8, [x19, x8, lsl #2]
	sdiv	w9, w0, w8
	msub	w8, w9, w8, w0
	ldr	w9, [x22]
	add	w8, w9, w8
	str	w8, [x22]
	cbz	w25, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	x0, x25
	bl	_FFABS
	mov	x25, x0
Lloh6:
	adrp	x19, _ff_prores_ac_codebook@GOTPAGE
Lloh7:
	ldr	x19, [x19, _ff_prores_ac_codebook@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w0, [x8, w26, sxtw #2]
	mov	x1, x24
	bl	_estimate_vlc
	mov	x26, x0
	ldr	x8, [x19]
	ldr	w0, [x8, w21, sxtw #2]
	sub	w1, w25, #1
	bl	_estimate_vlc
	add	w8, w23, w26
	add	w8, w8, w0
	add	w23, w8, #1
Lloh8:
	adrp	x8, _ff_prores_run_to_cb_index@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ff_prores_run_to_cb_index@GOTPAGEOFF]
Lloh10:
	ldr	x21, [x8]
	mov	x0, x24
	mov	w1, #15
	bl	_FFMIN
	ldr	w26, [x21, x0, lsl #2]
Lloh11:
	adrp	x8, _ff_prores_lev_to_cb_index@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ff_prores_lev_to_cb_index@GOTPAGEOFF]
Lloh13:
	ldr	x21, [x8]
	mov	x0, x25
	mov	w1, #9
	bl	_FFMIN
	mov	w24, #0
	ldr	w21, [x21, x0, lsl #2]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=2
	add	w24, w24, #1
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=2
	add	x27, x27, #64
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cmp	x27, x8
	b.ge	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	x8, [x20, x28, lsl #3]
	b	LBB0_4
LBB0_9:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_prores_run_to_cb_index,8,3  ; @ff_prores_run_to_cb_index
	.comm	_ff_prores_lev_to_cb_index,8,3  ; @ff_prores_lev_to_cb_index
	.comm	_ff_prores_ac_codebook,8,3      ; @ff_prores_ac_codebook
	.no_dead_strip	_estimate_acs
.subsections_via_symbols
