	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function estimate_dcs
_estimate_dcs:                          ## @estimate_dcs
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$-16384, %ecx                   ## imm = 0xC000
	movl	(%rsi), %eax
	addl	%ecx, %eax
	cltd
	idivl	%r15d
	movl	%eax, %edi
	movq	_FIRST_DC_CB@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	_MAKE_CODE
	movl	%r14d, %edi
	movl	$-16384, %r14d                  ## imm = 0xC000
	movl	%eax, %esi
	callq	_estimate_vlc
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	256(%r12), %edi
	addl	%r14d, %edi
	callq	_FFABS
	cltd
	idivl	%r15d
	addl	%edx, (%rbx)
	cmpl	$2, %r13d
	jl	LBB0_3
## %bb.1:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	$256, %rcx                      ## imm = 0x100
	decl	%r13d
	movl	$3, %eax
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %edi
	movl	$-16384, %eax                   ## imm = 0xC000
	addl	%eax, %edi
	movl	%edi, %eax
	cltd
	idivl	%r15d
	movl	%eax, %ebx
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	callq	_FFABS
	cltd
	idivl	%r15d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addl	%edx, (%rax)
	subl	%r14d, %ebx
	movl	%ebx, %edi
	callq	_GET_SIGN
	movl	%eax, %r14d
	xorl	%r12d, %ebx
	subl	%r12d, %ebx
	movl	%ebx, %edi
	movl	-60(%rbp), %r15d                ## 4-byte Reload
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	callq	_MAKE_CODE
	movl	%eax, %ebx
	movq	_ff_prores_dc_codebook@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	-64(%rbp), %rcx                 ## 4-byte Folded Reload
	movl	(%rax,%rcx,4), %edi
	movl	%ebx, %esi
	callq	_estimate_vlc
	addl	%eax, -48(%rbp)                 ## 4-byte Folded Spill
	movl	%ebx, %edi
	andl	$1, %edi
	addl	%ebx, %edi
	sarl	%edi
	movl	$3, %esi
	callq	_FFMIN
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	$256, %rcx                      ## imm = 0x100
	movl	%r14d, %r12d
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	decl	%r13d
	jne	LBB0_2
LBB0_3:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIRST_DC_CB,4,2                ## @FIRST_DC_CB
	.comm	_ff_prores_dc_codebook,8,3      ## @ff_prores_dc_codebook
	.no_dead_strip	_estimate_dcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function estimate_dcs
_estimate_dcs:                          ; @estimate_dcs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
	ldr	w8, [x1]
	sub	w8, w8, #4, lsl #12             ; =16384
Lloh0:
	adrp	x9, _FIRST_DC_CB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FIRST_DC_CB@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x9]
	sdiv	w22, w8, w3
	mov	x0, x22
	bl	_MAKE_CODE
	mov	x1, x0
	mov	x0, x21
	bl	_estimate_vlc
	mov	x21, x0
	ldr	w8, [x24, #256]
	sub	w0, w8, #4, lsl #12             ; =16384
	bl	_FFABS
	sdiv	w8, w0, w19
	msub	w8, w8, w19, w0
	ldr	w9, [x20]
	add	w8, w9, w8
	str	w8, [x20]
	cmp	w23, #2
	b.lt	LBB0_3
; %bb.1:
	mov	w28, #0
	add	x25, x24, #256
	sub	w26, w23, #1
	mov	w23, #3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	sub	w0, w8, #4, lsl #12             ; =16384
	sdiv	w27, w0, w19
	bl	_FFABS
	sdiv	w8, w0, w19
	msub	w8, w8, w19, w0
	ldr	w9, [x20]
	add	w8, w9, w8
	str	w8, [x20]
	sub	w22, w27, w22
	mov	x0, x22
	bl	_GET_SIGN
	mov	x24, x0
	eor	w8, w22, w28
	sub	w0, w8, w28
	bl	_MAKE_CODE
	mov	x22, x0
Lloh3:
	adrp	x8, _ff_prores_dc_codebook@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ff_prores_dc_codebook@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w0, [x8, w23, sxtw #2]
	mov	x1, x22
	bl	_estimate_vlc
	add	w21, w0, w21
	and	w8, w22, #0x1
	add	w8, w8, w22
	asr	w0, w8, #1
	mov	w1, #3
	bl	_FFMIN
	mov	x23, x0
	add	x25, x25, #256
	mov	x28, x24
	mov	x22, x27
	subs	w26, w26, #1
	b.ne	LBB0_2
LBB0_3:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FIRST_DC_CB,4,2                ; @FIRST_DC_CB
	.comm	_ff_prores_dc_codebook,8,3      ; @ff_prores_dc_codebook
	.no_dead_strip	_estimate_dcs
.subsections_via_symbols
