	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_acs
_encode_acs:                            ## @encode_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -96(%rbp)                  ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%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, -44(%rbp)                 ## 4-byte Spill
	movq	_ff_prores_lev_to_cb_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rax), %r14d
	movslq	%edx, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movl	$1, %edi
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-48(%rbp), %edx                 ## 4-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%rdi
	cmpq	$64, %rdi
	je	LBB0_9
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rdi,8), %rbx
	cmpl	%ebx, %edx
	jle	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	%ebx, %rcx
	addq	$64, %rcx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	-256(%rax,%rcx,4), %eax
	cltd
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	idivl	(%rsi,%rbx,4)
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	%eax, %r12d
	movl	%eax, %edi
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	callq	_FFABS
	movl	%eax, %r13d
	movq	_ff_prores_ac_codebook@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	-44(%rbp), %rcx                 ## 4-byte Folded Reload
	movl	(%rax,%rcx,4), %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_encode_vlc_codeword
	movq	_ff_prores_ac_codebook@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	movl	(%rax,%rcx,4), %esi
	leal	-1(%r13), %edx
	movq	%rbx, %rdi
	callq	_encode_vlc_codeword
	movl	%r12d, %edi
	callq	_GET_SIGN
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	callq	_put_sbits
	movq	_ff_prores_run_to_cb_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	%r15d, %edi
	movl	$15, %esi
	callq	_FFMIN
	movl	(%rbx,%rax,4), %eax
	movl	%eax, -44(%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	-104(%rbp), %rcx                ## 8-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rbx,%rax,4), %r14d
	xorl	%r15d, %r15d
	cmpq	-80(%rbp), %rcx                 ## 8-byte Folded Reload
	jl	LBB0_10
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=2
	incl	%r15d
	cmpq	-80(%rbp), %rcx                 ## 8-byte Folded Reload
	jge	LBB0_7
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rdi,8), %rbx
	addq	$64, %rcx
	jmp	LBB0_3
LBB0_9:
	addq	$72, %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	_encode_acs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_acs
_encode_acs:                            ; @encode_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, x4, [sp, #16]               ; 16-byte Folded Spill
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	mov	x22, x0
	mov	w23, #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	w27, [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	w19, [x9, #8]
	sxtw	x28, w8
	mov	w26, #1
Lloh6:
	adrp	x20, _ff_prores_ac_codebook@GOTPAGE
Lloh7:
	ldr	x20, [x20, _ff_prores_ac_codebook@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x26, x26, #1
	cmp	x26, #64
	b.eq	LBB0_9
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x8, [x8, x26, lsl #3]
	cmp	w28, w8
	b.le	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sxtw	x21, w8
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	x9, x10, [sp, #8]               ; 16-byte Folded Reload
	ldr	w9, [x9, x21, lsl #2]
	ldr	w8, [x10, x8, lsl #2]
	sdiv	w24, w9, w8
	cbz	w24, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	x0, x24
	bl	_FFABS
	mov	x25, x0
	ldr	x8, [x20]
	ldr	w1, [x8, w27, sxtw #2]
	mov	x0, x22
	mov	x2, x23
	bl	_encode_vlc_codeword
	ldr	x8, [x20]
	ldr	w1, [x8, w19, sxtw #2]
	sub	w2, w25, #1
	mov	x0, x22
	bl	_encode_vlc_codeword
	mov	x0, x24
	bl	_GET_SIGN
	mov	x2, x0
	mov	x0, x22
	mov	w1, #1
	bl	_put_sbits
Lloh8:
	adrp	x8, _ff_prores_run_to_cb_index@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ff_prores_run_to_cb_index@GOTPAGEOFF]
Lloh10:
	ldr	x19, [x8]
	mov	x0, x23
	mov	w1, #15
	bl	_FFMIN
	ldr	w27, [x19, 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	x19, [x8]
	mov	x0, x25
	mov	w1, #9
	bl	_FFMIN
	mov	w23, #0
	ldr	w19, [x19, x0, lsl #2]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=2
	add	w23, w23, #1
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=2
	add	x21, x21, #64
	cmp	x21, x28
	b.ge	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x8, [x8, x26, lsl #3]
	b	LBB0_4
LBB0_9:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.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	_encode_acs
.subsections_via_symbols
