	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_plane
_encode_plane:                          ## @encode_plane
	.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
	pushq	%rax
	movl	$4168, %eax                     ## imm = 0x1048
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movl	%r8d, %ebx
	movl	%ecx, -4148(%rbp)               ## 4-byte Spill
	movq	%rdx, %r14
	movq	%rsi, -4168(%rbp)               ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r12
	leaq	-2096(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	___bzero
	movl	$-1, %r9d
	testl	%ebx, %ebx
	jne	LBB0_2
## %bb.1:
	movq	(%r15), %rdx
	movq	_AV_PIX_FMT_YUV420P@GOTPCREL(%rip), %rcx
	xorl	%r9d, %r9d
	cmpq	(%rcx), %rdx
	sete	%r9b
	notl	%r9d
LBB0_2:
	movl	16(%rbp), %edx
	movl	(%r12), %ecx
	cmpl	$128, %ecx
	movl	%r9d, -4152(%rbp)               ## 4-byte Spill
	je	LBB0_11
## %bb.3:
	cmpl	$130, %ecx
	je	LBB0_8
## %bb.4:
	cmpl	$129, %ecx
	jne	LBB0_40
## %bb.5:
	movl	4(%r12), %r8d
	testl	%r8d, %r8d
	movq	%r12, %r10
	movl	%r13d, %r11d
	movq	%r14, %rdi
	movl	-4148(%rbp), %ecx               ## 4-byte Reload
	movq	-4168(%rbp), %rsi               ## 8-byte Reload
	jle	LBB0_14
## %bb.6:
	xorl	%ebx, %ebx
	movl	%edx, %r14d
	xorl	%r12d, %r12d
	movq	%rdi, -4176(%rbp)               ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	incl	%r12d
	movl	%r14d, %eax
	cltd
	idivl	%r8d
	movl	%eax, %r15d
	andl	%r9d, %r15d
	movl	%ebx, %eax
	imull	%ecx, %eax
	cltq
	leaq	(%rsi,%rax,4), %rsi
	movl	%r15d, %r9d
	subl	%ebx, %r9d
	imull	%r11d, %ebx
	movslq	%ebx, %rax
	leaq	(%rdi,%rax,4), %rdx
	movq	%r10, %rdi
	movl	%r11d, %r8d
	movq	%r10, %r13
	movl	%r11d, %ebx
	callq	_median_predict
	movq	-4168(%rbp), %rsi               ## 8-byte Reload
	movl	-4152(%rbp), %r9d               ## 4-byte Reload
	movl	%ebx, %r11d
	movl	-4148(%rbp), %ecx               ## 4-byte Reload
	movq	%r13, %r10
	movq	-4176(%rbp), %rdi               ## 8-byte Reload
	movl	16(%rbp), %edx
	movl	4(%r13), %r8d
	addl	%edx, %r14d
	movl	%r15d, %ebx
	cmpl	%r8d, %r12d
	jl	LBB0_7
	jmp	LBB0_14
LBB0_11:
	movl	4(%r12), %r8d
	testl	%r8d, %r8d
	movq	%r12, %r10
	movl	%r13d, %r11d
	movq	%r14, %rdi
	movl	-4148(%rbp), %ecx               ## 4-byte Reload
	movq	-4168(%rbp), %r12               ## 8-byte Reload
	jle	LBB0_14
## %bb.12:
	xorl	%esi, %esi
	movl	%edx, %r14d
	xorl	%ebx, %ebx
	movq	%rdi, -4176(%rbp)               ## 8-byte Spill
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movl	%r14d, %eax
	cltd
	idivl	%r8d
	movl	%eax, %r15d
	andl	%r9d, %r15d
	movl	%esi, %eax
	imull	%r11d, %eax
	cltq
	leaq	(%rdi,%rax,4), %rdi
	movl	%r15d, %r9d
	subl	%esi, %r9d
	imull	%ecx, %esi
	movslq	%esi, %rax
	leaq	(%r12,%rax,4), %rdx
	movl	%r11d, %esi
	movl	%r11d, %r8d
	movq	%r10, %r13
	movl	%r11d, %r12d
	callq	_av_image_copy_plane
	movl	-4152(%rbp), %r9d               ## 4-byte Reload
	movl	%r12d, %r11d
	movq	-4168(%rbp), %r12               ## 8-byte Reload
	movl	-4148(%rbp), %ecx               ## 4-byte Reload
	movq	%r13, %r10
	movq	-4176(%rbp), %rdi               ## 8-byte Reload
	movl	16(%rbp), %edx
	movl	4(%r13), %r8d
	addl	%edx, %r14d
	movl	%r15d, %esi
	cmpl	%r8d, %ebx
	jl	LBB0_13
	jmp	LBB0_14
LBB0_8:
	movl	4(%r12), %ebx
	testl	%ebx, %ebx
	movq	%r12, %r10
	movl	%r13d, %r11d
	movq	%r14, %rdi
	movl	-4148(%rbp), %eax               ## 4-byte Reload
	movq	-4168(%rbp), %rsi               ## 8-byte Reload
	jle	LBB0_14
## %bb.9:
	xorl	%ecx, %ecx
	movl	%edx, %r14d
	xorl	%r13d, %r13d
	movq	%rdi, -4176(%rbp)               ## 8-byte Spill
	movl	%r11d, -4156(%rbp)              ## 4-byte Spill
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r12d
	incl	%r13d
	movl	%r14d, %eax
	cltd
	idivl	%ebx
	movl	%eax, %r15d
	andl	%r9d, %r15d
	movl	%ecx, %eax
	imull	%r11d, %eax
	cltq
	leaq	(%rdi,%rax,4), %rdi
	movl	%r15d, %r8d
	subl	%ecx, %r8d
	movl	%r12d, %edx
	imull	%r12d, %ecx
	movslq	%ecx, %rax
	movq	%rsi, %r12
	leaq	(%rsi,%rax,4), %rsi
	movl	%r11d, %ecx
	movq	%r10, %rbx
	callq	*24(%r10)
	movq	%r12, %rsi
	movl	-4148(%rbp), %eax               ## 4-byte Reload
	movl	-4152(%rbp), %r9d               ## 4-byte Reload
	movl	-4156(%rbp), %r11d              ## 4-byte Reload
	movq	%rbx, %r10
	movq	-4176(%rbp), %rdi               ## 8-byte Reload
	movl	16(%rbp), %edx
	movl	4(%rbx), %ebx
	addl	%edx, %r14d
	movl	%r15d, %ecx
	cmpl	%ebx, %r13d
	jl	LBB0_10
LBB0_14:
	movq	%r10, %r12
	leaq	-2096(%rbp), %rcx
	movl	%r11d, %esi
	movq	%rdi, %rbx
	movl	%r11d, %r13d
	callq	_count_usage
	movl	16(%rbp), %ecx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	-2096(%rbp,%r15,4), %eax
	testl	%eax, %eax
	jne	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	-2092(%rbp,%r15,4), %eax
	testl	%eax, %eax
	jne	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	-2088(%rbp,%r15,4), %eax
	testl	%eax, %eax
	jne	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	-2084(%rbp,%r15,4), %eax
	testl	%eax, %eax
	jne	LBB0_19
## %bb.28:                              ##   in Loop: Header=BB0_15 Depth=1
	addq	$4, %r15
	cmpq	$256, %r15                      ## imm = 0x100
	jne	LBB0_15
	jmp	LBB0_29
LBB0_40:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
	movq	_AVERROR_OPTION_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_38
LBB0_20:
	incq	%r15
	jmp	LBB0_22
LBB0_21:
	addq	$2, %r15
	jmp	LBB0_22
LBB0_19:
	addq	$3, %r15
LBB0_22:
	imull	%r13d, %ecx
	cmpl	%ecx, %eax
	jne	LBB0_29
## %bb.23:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	movq	24(%rbp), %r13
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, %r15d
	movl	$255, %esi
	cmovel	%r14d, %esi
	movq	%r13, %rdi
	callq	_bytestream2_put_byte
	incl	%ebx
	cmpl	$256, %ebx                      ## imm = 0x100
	jne	LBB0_24
## %bb.25:
	cmpl	$0, 4(%r12)
	jle	LBB0_37
## %bb.26:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_bytestream2_put_le32
	incl	%ebx
	cmpl	4(%r12), %ebx
	jl	LBB0_27
	jmp	LBB0_38
LBB0_29:
	leaq	-1072(%rbp), %rdi
	leaq	-2096(%rbp), %rsi
	movl	$256, %edx                      ## imm = 0x100
	movl	$1, %ecx
	callq	_ff_huff_gen_len_table
	testl	%eax, %eax
	js	LBB0_30
## %bb.31:
	movq	%rbx, %r15
	movl	%r13d, %r14d
	xorl	%ebx, %ebx
	movq	24(%rbp), %r13
	.p2align	4, 0x90
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	movl	-1072(%rbp,%rbx,4), %esi
	movq	%r13, %rdi
	callq	_bytestream2_put_byte
	movl	-1072(%rbp,%rbx,4), %eax
	movl	%eax, -4144(%rbp,%rbx,8)
	movl	%ebx, -4140(%rbp,%rbx,8)
	incq	%rbx
	cmpq	$256, %rbx                      ## imm = 0x100
	jne	LBB0_32
## %bb.33:
	leaq	-4144(%rbp), %rdi
	callq	_calculate_codes
	movq	%r12, %rbx
	movl	4(%r12), %ecx
	movl	$0, %esi
	testl	%ecx, %ecx
	movl	%r14d, -4156(%rbp)              ## 4-byte Spill
	movq	%r15, -4176(%rbp)               ## 8-byte Spill
	movl	-4152(%rbp), %r8d               ## 4-byte Reload
	movl	16(%rbp), %r12d
	jle	LBB0_36
## %bb.34:
	movl	%r12d, %eax
	imull	-4156(%rbp), %eax               ## 4-byte Folded Reload
	addl	$4, %eax
	movl	%eax, -4184(%rbp)               ## 4-byte Spill
	xorl	%edi, %edi
	movl	$4, -4168(%rbp)                 ## 4-byte Folded Spill
	movl	$-1, -4180(%rbp)                ## 4-byte Folded Spill
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, -4148(%rbp)              ## 4-byte Spill
	incl	%eax
	movl	%eax, -4192(%rbp)               ## 4-byte Spill
	movl	-4148(%rbp), %eax               ## 4-byte Reload
	cltd
	idivl	%ecx
	andl	%r8d, %eax
	movl	%eax, -4188(%rbp)               ## 4-byte Spill
	movl	%eax, %r8d
	subl	%edi, %r8d
	movl	-4156(%rbp), %ecx               ## 4-byte Reload
	imull	%ecx, %edi
	movslq	%edi, %rax
	movq	-4176(%rbp), %rdx               ## 8-byte Reload
	leaq	(%rdx,%rax,4), %rdi
	movq	8(%rbx), %rsi
	movl	-4184(%rbp), %edx               ## 4-byte Reload
	leaq	-4144(%rbp), %r9
	callq	_write_huff_codes
	movq	24(%rbp), %r12
	movl	%eax, %r15d
	sarl	$3, %r15d
	leal	(%r15,%r14), %r13d
	movq	%r13, -4200(%rbp)               ## 8-byte Spill
	movq	8(%rbx), %rdi
	sarl	$5, %eax
	movq	%rdi, %rsi
	movl	%eax, %edx
	callq	*16(%rbx)
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_bytestream2_put_le32
	movl	4(%rbx), %eax
	movl	-4180(%rbp), %r13d              ## 4-byte Reload
	addl	%r13d, %eax
	leal	(%r14,%rax,4), %esi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_bytestream2_seek_p
	movq	8(%rbx), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_bytestream2_put_buffer
	movl	4(%rbx), %eax
	movq	-4200(%rbp), %r15               ## 8-byte Reload
	leal	(%r15,%rax,4), %eax
	movl	-4168(%rbp), %r14d              ## 4-byte Reload
	movl	%r14d, %esi
	subl	%eax, %esi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_bytestream2_seek_p
	movq	%r15, %rsi
	movl	-4192(%rbp), %eax               ## 4-byte Reload
	movl	-4148(%rbp), %r12d              ## 4-byte Reload
	movl	-4152(%rbp), %r8d               ## 4-byte Reload
	movl	4(%rbx), %ecx
	addl	$4, %r14d
	movl	%r14d, -4168(%rbp)              ## 4-byte Spill
	addl	16(%rbp), %r12d
	decl	%r13d
	movl	%r13d, -4180(%rbp)              ## 4-byte Spill
	movl	-4188(%rbp), %edi               ## 4-byte Reload
	movl	%esi, %r14d
	cmpl	%ecx, %eax
	jl	LBB0_35
LBB0_36:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	24(%rbp), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bytestream2_seek_p
LBB0_37:
	xorl	%r14d, %r14d
	jmp	LBB0_38
LBB0_30:
	movl	%eax, %r14d
LBB0_38:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_41
## %bb.39:
	movl	%r14d, %eax
	addq	$4168, %rsp                     ## imm = 0x1048
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_41:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_YUV420P,8,3         ## @AV_PIX_FMT_YUV420P
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown prediction mode: %d\n"

	.comm	_AVERROR_OPTION_NOT_FOUND,4,2   ## @AVERROR_OPTION_NOT_FOUND
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.no_dead_strip	_encode_plane
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_plane
_encode_plane:                          ; @encode_plane
	.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	w9, #4144
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #48
	mov	x27, x7
	mov	x22, x6
	mov	x28, x5
	mov	x21, x4
	mov	x24, x3
	str	x2, [sp, #16]                   ; 8-byte Folded Spill
	mov	x25, x1
	mov	x26, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldr	x20, [x0, #8]
	add	x0, sp, #2080
	mov	w1, #1024
	bl	_bzero
	cbz	w21, LBB0_2
; %bb.1:
	mov	w8, #-1
	b	LBB0_3
LBB0_2:
	ldr	x8, [x26]
Lloh5:
	adrp	x9, _AV_PIX_FMT_YUV420P@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AV_PIX_FMT_YUV420P@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
	mvn	w8, w8
LBB0_3:
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	ldr	w3, [x20]
	cmp	w3, #128
	b.eq	LBB0_9
; %bb.4:
	cmp	w3, #130
	b.eq	LBB0_12
; %bb.5:
	cmp	w3, #129
	b.ne	LBB0_30
; %bb.6:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
	b.lt	LBB0_15
; %bb.7:
	mov	w9, #0
	mov	w19, #0
	mov	x21, x22
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	w19, w19, #1
	sdiv	w8, w21, w8
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	and	w23, w8, w10
	mul	w8, w9, w24
	add	x1, x25, w8, sxtw #2
	mul	w8, w9, w28
	add	x2, x26, w8, sxtw #2
	sub	w5, w23, w9
	mov	x0, x20
	mov	x3, x24
	mov	x4, x28
	bl	_median_predict
	ldr	w8, [x20, #4]
	add	w21, w21, w22
	mov	x9, x23
	cmp	w19, w8
	b.lt	LBB0_8
	b	LBB0_15
LBB0_9:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
	b.lt	LBB0_15
; %bb.10:
	mov	w9, #0
	mov	w19, #0
	mov	x21, x22
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w19, w19, #1
	sdiv	w8, w21, w8
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	and	w23, w8, w10
	mul	w8, w9, w28
	add	x0, x26, w8, sxtw #2
	mul	w8, w9, w24
	add	x2, x25, w8, sxtw #2
	sub	w5, w23, w9
	mov	x1, x28
	mov	x3, x24
	mov	x4, x28
	bl	_av_image_copy_plane
	ldr	w8, [x20, #4]
	add	w21, w21, w22
	mov	x9, x23
	cmp	w19, w8
	b.lt	LBB0_11
	b	LBB0_15
LBB0_12:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
	b.lt	LBB0_15
; %bb.13:
	mov	w9, #0
	mov	w19, #0
	mov	x21, x22
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	w19, w19, #1
	sdiv	w8, w21, w8
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	and	w23, w8, w10
	ldr	x8, [x20, #24]
	mul	w10, w9, w28
	add	x0, x26, w10, sxtw #2
	mul	w10, w9, w24
	add	x1, x25, w10, sxtw #2
	sub	w4, w23, w9
	mov	x2, x24
	mov	x3, x28
	blr	x8
	ldr	w8, [x20, #4]
	add	w21, w21, w22
	mov	x9, x23
	cmp	w19, w8
	b.lt	LBB0_14
LBB0_15:
	add	x21, sp, #2080
	add	x3, sp, #2080
	mov	x0, x26
	mov	x1, x28
	mov	x2, x22
	bl	_count_usage
	mov	x19, #0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, x19, lsl #2]
	cbnz	w8, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x19, x19, #1
	cmp	x19, #256
	b.ne	LBB0_16
	b	LBB0_24
LBB0_18:
	mul	w9, w22, w28
	cmp	w8, w9
	b.ne	LBB0_24
; %bb.19:
	mov	w21, #256
	mov	w22, #255
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	cmp	w19, #0
	csel	w1, wzr, w22, eq
	mov	x0, x27
	bl	_bytestream2_put_byte
	sub	w19, w19, #1
	sub	w21, w21, #1
	cbnz	w21, LBB0_20
; %bb.21:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_33
; %bb.22:
	mov	w19, #0
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x27
	mov	w1, #0
	bl	_bytestream2_put_le32
	add	w19, w19, #1
	ldr	w8, [x20, #4]
	cmp	w19, w8
	b.lt	LBB0_23
	b	LBB0_33
LBB0_24:
	add	x19, sp, #3104
	add	x0, sp, #3104
	add	x1, sp, #2080
	mov	w2, #256
	mov	w3, #1
	bl	_ff_huff_gen_len_table
	tbnz	w0, #31, LBB0_34
; %bb.25:
	mov	x21, #0
	add	x8, sp, #32
	orr	x23, x8, #0x4
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	lsl	x24, x21, #2
	ldr	w1, [x19, x24]
	mov	x0, x27
	bl	_bytestream2_put_byte
	ldr	w8, [x19, x24]
	stp	w8, w21, [x23, #-4]
	add	x21, x21, #1
	add	x23, x23, #8
	cmp	x21, #256
	b.ne	LBB0_26
; %bb.27:
	add	x0, sp, #32
	bl	_calculate_codes
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_31
; %bb.28:
	mov	w9, #0
	mov	x12, x28
	mov	w28, #0
	mov	w19, #0
	orr	w10, wzr, #0x4
	madd	w10, w22, w12, w10
	stp	w10, w12, [sp, #8]              ; 8-byte Folded Spill
	mov	w24, #4
	mov	w23, #-1
	mov	x21, x22
	str	w22, [sp, #4]                   ; 4-byte Folded Spill
	mov	x22, x27
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	add	w28, w28, #1
	sdiv	w8, w21, w8
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	and	w27, w8, w10
	ldp	w2, w3, [sp, #8]                ; 8-byte Folded Reload
	mul	w8, w9, w3
	add	x0, x26, w8, sxtw #2
	ldr	x1, [x20, #8]
	sub	w4, w27, w9
	add	x5, sp, #32
	bl	_write_huff_codes
	asr	w26, w0, #3
	add	w25, w26, w19
	ldp	x1, x8, [x20, #8]
	asr	w2, w0, #5
	mov	x0, x1
	blr	x8
	mov	x0, x22
	mov	x1, x25
	bl	_bytestream2_put_le32
	ldr	w8, [x20, #4]
	add	w8, w23, w8
	add	w1, w19, w8, lsl #2
Lloh8:
	adrp	x19, _SEEK_CUR@GOTPAGE
Lloh9:
	ldr	x19, [x19, _SEEK_CUR@GOTPAGEOFF]
	ldr	w2, [x19]
	mov	x0, x22
	bl	_bytestream2_seek_p
	ldr	x1, [x20, #8]
	mov	x0, x22
	mov	x2, x26
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
	bl	_bytestream2_put_buffer
	ldr	w8, [x20, #4]
	add	w8, w25, w8, lsl #2
	sub	w1, w24, w8
	ldr	w2, [x19]
	mov	x0, x22
	bl	_bytestream2_seek_p
	add	w24, w24, #4
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	add	w21, w21, w8
	ldr	w8, [x20, #4]
	sub	w23, w23, #1
	mov	x9, x27
	mov	x19, x25
	cmp	w28, w8
	b.lt	LBB0_29
	b	LBB0_32
LBB0_30:
Lloh10:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x26
	bl	_av_log
Lloh15:
	adrp	x8, _AVERROR_OPTION_NOT_FOUND@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AVERROR_OPTION_NOT_FOUND@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	b	LBB0_34
LBB0_31:
	mov	w25, #0
	mov	x22, x27
LBB0_32:
Lloh18:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x25
	bl	_bytestream2_seek_p
LBB0_33:
	mov	w0, #0
LBB0_34:
	ldur	x8, [x29, #-96]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_36
; %bb.35:
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #48
	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
LBB0_36:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_YUV420P,8,3         ; @AV_PIX_FMT_YUV420P
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown prediction mode: %d\n"

	.comm	_AVERROR_OPTION_NOT_FOUND,4,2   ; @AVERROR_OPTION_NOT_FOUND
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.no_dead_strip	_encode_plane
.subsections_via_symbols
