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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_dcs
_encode_dcs:                            ; @encode_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	x21, x2
	mov	x23, 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	w24, [x9]
	sdiv	w22, w8, w3
	mov	x0, x22
	bl	_MAKE_CODE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x24
	bl	_encode_vlc_codeword
	cmp	w21, #2
	b.lt	LBB0_3
; %bb.1:
	mov	w27, #0
	add	x24, x23, #256
	sub	w25, w21, #1
	mov	w21, #3
Lloh3:
	adrp	x26, _ff_prores_dc_codebook@GOTPAGE
Lloh4:
	ldr	x26, [x26, _ff_prores_dc_codebook@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	sub	w8, w8, #4, lsl #12             ; =16384
	sdiv	w28, w8, w19
	sub	w22, w28, w22
	mov	x0, x22
	bl	_GET_SIGN
	mov	x23, x0
	eor	w8, w22, w27
	sub	w0, w8, w27
	bl	_MAKE_CODE
	mov	x22, x0
	ldr	x8, [x26]
	ldr	w1, [x8, w21, sxtw #2]
	mov	x0, x20
	mov	x2, x22
	bl	_encode_vlc_codeword
	and	w8, w22, #0x1
	add	w8, w8, w22
	asr	w0, w8, #1
	mov	w1, #3
	bl	_FFMIN
	mov	x21, x0
	add	x24, x24, #256
	mov	x27, x23
	mov	x22, x28
	subs	w25, w25, #1
	b.ne	LBB0_2
LBB0_3:
	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 AdrpLdrGot	Lloh3, Lloh4
	.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	_encode_dcs
.subsections_via_symbols
