	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_frame
_encode_frame:                          ## @encode_frame
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	24(%rdi), %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	(%r13), %eax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movl	12(%r13), %ecx
	movslq	4(%r13), %rsi
	imull	8(%r13), %ecx
	leal	-200(%rsi), %eax
	incl	%ecx
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, 88(%r13)
	movq	_AV_INPUT_BUFFER_MIN_SIZE@GOTPCREL(%rip), %rax
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movq	%rsi, %rdx
	addq	(%rax), %rdx
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_36
## %bb.1:
	movq	%r12, -200(%rbp)                ## 8-byte Spill
	movq	(%r15), %rax
	addq	$16, %rax
	movq	%rax, -80(%rbp)
	movq	_FRAME_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rdi
	callq	_bytestream_put_be32
	movq	-80(%rbp), %rax
	movq	%rax, -160(%rbp)
	addq	$8, %rax
	movq	%rax, -72(%rbp)
	leaq	-72(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_be16
	movl	80(%r13), %esi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_bytestream_put_buffer
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_bytestream_put_be16
	movl	4(%rbx), %esi
	movq	%r12, %rdi
	callq	_bytestream_put_be16
	movl	16(%r13), %esi
	shll	$6, %esi
	movq	_AV_CODEC_FLAG_INTERLACED_DCT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	movq	%rbx, -152(%rbp)                ## 8-byte Spill
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	cmpq	$0, 16(%r14)
	sete	%al
	leal	4(,%rax,4), %eax
	orl	%eax, %esi
LBB0_3:
	leaq	-72(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_bytestream_put_byte
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_byte
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_bytestream_put_byte
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_bytestream_put_byte
	movq	%r14, -136(%rbp)                ## 8-byte Spill
	movl	8(%r14), %esi
	movq	%rbx, %rdi
	callq	_bytestream_put_byte
	movl	20(%r13), %esi
	sarl	$3, %esi
	orl	$64, %esi
	movq	%rbx, %rdi
	callq	_bytestream_put_byte
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_byte
	movq	24(%r13), %rax
	movq	_QUANT_MAT_DEFAULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.8:
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_byte
	jmp	LBB0_9
LBB0_4:
	leaq	-72(%rbp), %r14
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_bytestream_put_byte
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_bytestream_put_byte
	incq	%rbx
	cmpq	$64, %rbx
	jne	LBB0_5
## %bb.6:
	xorl	%ebx, %ebx
	leaq	-72(%rbp), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_bytestream_put_byte
	incq	%rbx
	cmpq	$64, %rbx
	jne	LBB0_7
LBB0_9:
	movq	-72(%rbp), %rsi
	subq	-80(%rbp), %rsi
	shrq	$2, %rsi
	leaq	-160(%rbp), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bytestream_put_be16
	movl	$0, 40(%r13)
	cmpl	$0, 8(%r13)
	movq	-136(%rbp), %r14                ## 8-byte Reload
	jle	LBB0_35
## %bb.10:
	movq	-144(%rbp), %rax                ## 8-byte Reload
	leal	(%rax,%rax), %ecx
	shll	$4, %eax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movq	%rcx, -192(%rbp)                ## 8-byte Spill
	leal	-1(%rcx), %eax
	cltq
	movq	%rax, -216(%rbp)                ## 8-byte Spill
	leaq	-72(%rbp), %rdi
	leaq	-104(%rbp), %r12
	movq	%r15, -184(%rbp)                ## 8-byte Spill
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
                                        ##       Child Loop BB0_18 Depth 3
                                        ##         Child Loop BB0_21 Depth 4
                                        ##         Child Loop BB0_31 Depth 4
	movq	-72(%rbp), %rax
	addq	$4, %rax
	movq	%rax, -128(%rbp)
	movl	$64, %esi
	movq	%rdi, %rbx
	callq	_bytestream_put_byte
	addq	$16, -72(%rbp)
	movl	12(%r13), %esi
	movq	%rbx, %rdi
	callq	_bytestream_put_be16
	movl	44(%r13), %edi
	callq	_av_log2
	shll	$4, %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_bytestream_put_byte
	movq	-72(%rbp), %rax
	movq	%rax, -168(%rbp)
	movslq	12(%r13), %rcx
	leaq	(%rax,%rcx,8), %rax
	movq	%rax, -72(%rbp)
	cmpl	$0, 48(%r13)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_find_quant_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	52(%r13), %r8d
	movq	-152(%rbp), %rdi                ## 8-byte Reload
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	*16(%rdi)
	testl	%eax, %eax
	jne	LBB0_36
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$0, 52(%r13)
	jle	LBB0_34
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$0, -84(%rbp)                   ## 4-byte Folded Spill
LBB0_15:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_18 Depth 3
                                        ##         Child Loop BB0_21 Depth 4
                                        ##         Child Loop BB0_31 Depth 4
	movl	56(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	44(%r13), %r15d
	xorl	%esi, %esi
	xorl	%edi, %edi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_18 Depth=3
	leaq	-104(%rbp), %r14
LBB0_32:                                ##   in Loop: Header=BB0_18 Depth=3
	leaq	-168(%rbp), %rdi
	movl	%r12d, %esi
	callq	_bytestream_put_be16
	movl	%r12d, %eax
	subl	-192(%rbp), %eax                ## 4-byte Folded Reload
	cltq
	shlq	$2, %rax
	addq	%rax, -72(%rbp)
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	cmpl	%r12d, %ebx
	cmovlel	%r12d, %ebx
	movl	-108(%rbp), %esi                ## 4-byte Reload
	addl	%r15d, %esi
	movl	-172(%rbp), %edi                ## 4-byte Reload
	incl	%edi
	movl	56(%r13), %eax
	cmpl	%esi, %eax
	movq	%r14, %r12
	jle	LBB0_33
LBB0_18:                                ##   Parent Loop BB0_11 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_21 Depth 4
                                        ##         Child Loop BB0_31 Depth 4
	movl	48(%r13), %r14d
	testl	%r14d, %r14d
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=3
	movq	64(%r13), %rcx
	movl	72(%r13), %edx
	imull	-84(%rbp), %edx                 ## 4-byte Folded Reload
	addl	%edi, %edx
	movslq	%edx, %rdx
	movl	(%rcx,%rdx,4), %r14d
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=3
	movl	%edi, -172(%rbp)                ## 4-byte Spill
	movl	%esi, -108(%rbp)                ## 4-byte Spill
	subl	%esi, %eax
	movl	%r15d, %ecx
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_11 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ##       Parent Loop BB0_18 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movl	%ecx, %r15d
	sarl	%ecx
	cmpl	%r15d, %eax
	jl	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=3
	leaq	-72(%rbp), %rdi
	movq	-144(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bytestream_put_byte
	movq	-72(%rbp), %rax
	movq	%rax, -104(%rbp)
	movq	-216(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rsi
	movq	%rsi, -72(%rbp)
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movslq	%eax, %r9
	movq	%rsi, %rcx
	subq	-80(%rbp), %rcx
	movq	%rcx, %rdi
	sarq	$2, %rdi
	leal	(%rbx,%rbx), %r8d
	movq	%rbx, %rdx
	movslq	%r8d, %rbx
	addq	%rdi, %rbx
	cmpq	%r9, %rbx
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	jl	LBB0_27
## %bb.23:                              ##   in Loop: Header=BB0_18 Depth=3
	movq	%r14, -208(%rbp)                ## 8-byte Spill
	movq	-184(%rbp), %r14                ## 8-byte Reload
	movq	(%r14), %r12
	movl	12(%r13), %edi
	imull	8(%r13), %edi
	incl	%edi
	imull	%edx, %edi
	subl	%eax, %edi
	addl	$200, %edi
	movl	%r8d, %esi
	callq	_FFMAX
	movl	%eax, %ebx
	addl	%eax, 4(%r13)
	cmpl	$0, 76(%r13)
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_18 Depth=3
	movq	-152(%rbp), %rdi                ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movq	-120(%rbp), %rdx                ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%ebx, %ecx
	movq	-96(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_avpriv_request_sample
	movl	$1, 76(%r13)
LBB0_25:                                ##   in Loop: Header=BB0_18 Depth=3
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_av_grow_packet
	testl	%eax, %eax
	js	LBB0_36
## %bb.26:                              ##   in Loop: Header=BB0_18 Depth=3
	movq	-120(%rbp), %rax                ## 8-byte Reload
	addl	%ebx, %eax
	movq	(%r14), %rcx
	movq	-80(%rbp), %rdi
	subq	%r12, %rdi
	addq	%rcx, %rdi
	movq	%rdi, -80(%rbp)
	movq	-72(%rbp), %rsi
	subq	%r12, %rsi
	addq	%rcx, %rsi
	movq	%rsi, -72(%rbp)
	movq	-128(%rbp), %rdx
	subq	%r12, %rdx
	addq	%rcx, %rdx
	movq	%rdx, -128(%rbp)
	movq	-168(%rbp), %rdx
	subq	%r12, %rdx
	addq	%rcx, %rdx
	movq	%rdx, -168(%rbp)
	movq	-104(%rbp), %rdx
	subq	%r12, %rdx
	addq	%rcx, %rdx
	movq	%rdx, -104(%rbp)
	movq	-160(%rbp), %rdx
	subq	%r12, %rdx
	addq	%rcx, %rdx
	movq	%rdx, -160(%rbp)
	movq	%rsi, %rcx
	subq	%rdi, %rcx
	leaq	-104(%rbp), %r12
	movq	-208(%rbp), %r14                ## 8-byte Reload
LBB0_27:                                ##   in Loop: Header=BB0_18 Depth=3
	shrq	$2, %rcx
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movl	%eax, %edx
	subl	%ecx, %edx
	leaq	-220(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_init_put_bits
	movq	-152(%rbp), %rdi                ## 8-byte Reload
	movq	-136(%rbp), %rsi                ## 8-byte Reload
	movq	%rbx, %rdx
	leaq	-64(%rbp), %rcx
	movl	-108(%rbp), %r8d                ## 4-byte Reload
	movl	-84(%rbp), %r9d                 ## 4-byte Reload
	pushq	%r15
	pushq	%r14
	callq	_encode_slice
	addq	$16, %rsp
	testl	%eax, %eax
	js	LBB0_36
## %bb.28:                              ##   in Loop: Header=BB0_18 Depth=3
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bytestream_put_byte
	movslq	(%r13), %rax
	movl	-68(%rbp,%rax,4), %r12d
	addl	-192(%rbp), %r12d               ## 4-byte Folded Reload
	cmpq	$2, %rax
	jl	LBB0_29
## %bb.30:                              ##   in Loop: Header=BB0_18 Depth=3
	xorl	%ebx, %ebx
	leaq	-104(%rbp), %r14
	.p2align	4, 0x90
LBB0_31:                                ##   Parent Loop BB0_11 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ##       Parent Loop BB0_18 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movl	-64(%rbp,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_bytestream_put_be16
	addl	-64(%rbp,%rbx,4), %r12d
	incq	%rbx
	movslq	(%r13), %rax
	decq	%rax
	cmpq	%rax, %rbx
	jl	LBB0_31
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
LBB0_33:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	cmpl	52(%r13), %eax
	movq	-184(%rbp), %r15                ## 8-byte Reload
	movq	-136(%rbp), %r14                ## 8-byte Reload
	jl	LBB0_15
	.p2align	4, 0x90
LBB0_34:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-72(%rbp), %rsi
	subq	-128(%rbp), %rsi
	addq	$4, %rsi
	shrq	$2, %rsi
	leaq	-128(%rbp), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bytestream_put_be32
	movl	40(%r13), %eax
	incl	%eax
	movl	%eax, 40(%r13)
	cmpl	8(%r13), %eax
	leaq	-72(%rbp), %rdi
	jl	LBB0_11
LBB0_35:
	movq	-80(%rbp), %rax
	addq	$-32, %rax
	movq	%rax, -80(%rbp)
	movq	-72(%rbp), %rbx
	subq	%rax, %rbx
	shrq	$2, %rbx
	leaq	-80(%rbp), %rdi
	movl	%ebx, %esi
	callq	_bytestream_put_be32
	movl	%ebx, 8(%r15)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%r15)
	movq	-200(%rbp), %rax                ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_36:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_38
## %bb.37:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_38:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_INPUT_BUFFER_MIN_SIZE,8,3   ## @AV_INPUT_BUFFER_MIN_SIZE
	.comm	_FRAME_ID,4,2                   ## @FRAME_ID
	.comm	_AV_CODEC_FLAG_INTERLACED_DCT,4,2 ## @AV_CODEC_FLAG_INTERLACED_DCT
	.comm	_QUANT_MAT_DEFAULT,8,3          ## @QUANT_MAT_DEFAULT
	.comm	_find_quant_thread,4,2          ## @find_quant_thread
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Packet too small: is %i, needs %i (slice: %i). Correct allocation"

	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_frame
_encode_frame:                          ; @encode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x28, x27, [sp, #144]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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	x23, x3
	mov	x27, x2
	mov	x25, x1
	mov	x26, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x24, [x0, #24]
	stp	xzr, xzr, [x29, #-104]
	ldp	w19, w9, [x24]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	ldp	w20, w21, [x24, #8]
	str	x2, [x24, #88]
Lloh3:
	adrp	x8, _AV_INPUT_BUFFER_MIN_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_INPUT_BUFFER_MIN_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x9, [sp, #56]                   ; 8-byte Folded Spill
	add	x2, x8, x9
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_34
; %bb.1:
	ldr	x8, [x25]
	add	x8, x8, #16
	str	x8, [sp, #112]
Lloh6:
	adrp	x8, _FRAME_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FRAME_ID@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #112
	bl	_bytestream_put_be32
	ldr	x8, [sp, #112]
	str	x8, [sp, #80]
	add	x8, x8, #8
	str	x8, [sp, #104]
	add	x0, sp, #104
	mov	w1, #0
	bl	_bytestream_put_be16
	ldr	w1, [x24, #80]
	mov	w22, #4
	add	x0, sp, #104
	mov	w2, #4
	bl	_bytestream_put_buffer
	ldr	w1, [x26]
	add	x0, sp, #104
	bl	_bytestream_put_be16
	ldr	w1, [x26, #4]
	add	x0, sp, #104
	bl	_bytestream_put_be16
	ldr	w8, [x24, #16]
	lsl	w1, w8, #6
	ldr	w8, [x26, #8]
Lloh9:
	adrp	x9, _AV_CODEC_FLAG_INTERLACED_DCT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AV_CODEC_FLAG_INTERLACED_DCT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x27, #16]
	cmp	x8, #0
	mov	w8, #8
	csel	w8, w8, w22, eq
	orr	w1, w8, w1
LBB0_3:
	add	x0, sp, #104
	bl	_bytestream_put_byte
	add	x0, sp, #104
	mov	w1, #0
	bl	_bytestream_put_byte
	ldr	w1, [x27]
	add	x0, sp, #104
	bl	_bytestream_put_byte
	ldr	w1, [x27, #4]
	add	x0, sp, #104
	bl	_bytestream_put_byte
	ldr	w1, [x27, #8]
	add	x0, sp, #104
	bl	_bytestream_put_byte
	ldr	w8, [x24, #20]
	asr	w8, w8, #3
	orr	w1, w8, #0x40
	add	x0, sp, #104
	bl	_bytestream_put_byte
	add	x0, sp, #104
	mov	w1, #0
	bl	_bytestream_put_byte
	ldr	x8, [x24, #24]
Lloh12:
	adrp	x9, _QUANT_MAT_DEFAULT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _QUANT_MAT_DEFAULT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	str	x25, [sp, #16]                  ; 8-byte Folded Spill
	str	x26, [sp, #40]                  ; 8-byte Folded Spill
	str	x23, [sp]                       ; 8-byte Folded Spill
	add	x0, sp, #104
	b.ne	LBB0_5
; %bb.4:
	mov	w1, #0
	bl	_bytestream_put_byte
	b	LBB0_9
LBB0_5:
	mov	w1, #3
	bl	_bytestream_put_byte
	mov	x22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #32]
	ldr	w1, [x8, x22]
	add	x0, sp, #104
	bl	_bytestream_put_byte
	add	x22, x22, #4
	cmp	x22, #256
	b.ne	LBB0_6
; %bb.7:
	mov	x22, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #32]
	ldr	w1, [x8, x22]
	add	x0, sp, #104
	bl	_bytestream_put_byte
	add	x22, x22, #4
	cmp	x22, #256
	b.ne	LBB0_8
LBB0_9:
	ldp	x8, x9, [sp, #104]
	sub	x8, x8, x9
	lsr	x1, x8, #2
	add	x0, sp, #80
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_bytestream_put_be16
	str	wzr, [x24, #40]
	ldr	w8, [x24, #8]
	cmp	w8, #1
	b.lt	LBB0_33
; %bb.10:
	orr	w8, wzr, #0x1
	ldr	x9, [sp, #56]                   ; 8-byte Folded Reload
	sub	w9, w9, #200
	madd	w8, w21, w20, w8
	lsl	w10, w19, #1
	lsl	w11, w19, #4
	str	w11, [sp, #36]                  ; 4-byte Folded Spill
	str	w10, [sp, #52]                  ; 4-byte Folded Spill
	sub	w10, w10, #1
	sxtw	x10, w10
	str	x10, [sp, #24]                  ; 8-byte Folded Spill
	sub	x20, x29, #104
	sdiv	w26, w9, w8
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
                                        ;       Child Loop BB0_19 Depth 3
                                        ;         Child Loop BB0_22 Depth 4
                                        ;         Child Loop BB0_31 Depth 4
	ldr	x8, [sp, #104]
	add	x8, x8, #4
	str	x8, [sp, #72]
	add	x0, sp, #104
	mov	w1, #64
	bl	_bytestream_put_byte
	ldr	x8, [sp, #104]
	add	x8, x8, #16
	str	x8, [sp, #104]
	ldr	w1, [x24, #12]
	add	x0, sp, #104
	bl	_bytestream_put_be16
	ldr	w0, [x24, #44]
	bl	_av_log2
	lsl	w1, w0, #4
	add	x0, sp, #104
	bl	_bytestream_put_byte
	ldr	x8, [sp, #104]
	str	x8, [sp, #88]
	ldrsw	x9, [x24, #12]
	add	x8, x8, x9, lsl #3
	str	x8, [sp, #104]
	ldr	w8, [x24, #48]
	cbnz	w8, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	ldr	x8, [x0, #16]
Lloh15:
	adrp	x9, _find_quant_thread@GOTPAGE
Lloh16:
	ldr	x9, [x9, _find_quant_thread@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x9]
	ldr	w4, [x24, #52]
	mov	x2, x27
	mov	x3, #0
	blr	x8
	cbnz	w0, LBB0_34
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x24, #52]
	cmp	w8, #1
	b.lt	LBB0_32
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	str	wzr, [sp, #48]                  ; 4-byte Folded Spill
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=2
	ldr	w9, [sp, #48]                   ; 4-byte Folded Reload
	add	w9, w9, #1
	ldr	w8, [x24, #52]
	str	w9, [sp, #48]                   ; 4-byte Folded Spill
	cmp	w9, w8
	b.ge	LBB0_32
LBB0_16:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_19 Depth 3
                                        ;         Child Loop BB0_22 Depth 4
                                        ;         Child Loop BB0_31 Depth 4
	ldr	w8, [x24, #56]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	mov	w28, #0
	mov	w22, #0
	ldr	w19, [x24, #44]
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=3
	add	x0, sp, #88
	mov	x1, x25
	bl	_bytestream_put_be16
	ldr	w8, [sp, #52]                   ; 4-byte Folded Reload
	sub	w8, w25, w8
	ldr	x9, [sp, #104]
	add	x8, x9, w8, sxtw #2
	str	x8, [sp, #104]
	cmp	w26, w25
	csel	w26, w26, w25, gt
	add	w22, w22, #1
	ldr	w8, [x24, #56]
	add	w28, w19, w28
	cmp	w8, w28
	b.le	LBB0_15
LBB0_19:                                ;   Parent Loop BB0_11 Depth=1
                                        ;     Parent Loop BB0_16 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_22 Depth 4
                                        ;         Child Loop BB0_31 Depth 4
	ldr	w25, [x24, #48]
	cbnz	w25, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=3
	ldr	x9, [x24, #64]
	ldr	w10, [x24, #72]
	ldr	w11, [sp, #48]                  ; 4-byte Folded Reload
	madd	w10, w10, w11, w22
	ldr	w25, [x9, w10, sxtw #2]
LBB0_21:                                ;   in Loop: Header=BB0_19 Depth=3
	sub	w8, w8, w28
	mov	x9, x19
LBB0_22:                                ;   Parent Loop BB0_11 Depth=1
                                        ;     Parent Loop BB0_16 Depth=2
                                        ;       Parent Loop BB0_19 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	mov	x19, x9
	asr	w9, w9, #1
	cmp	w8, w19
	b.lt	LBB0_22
; %bb.23:                               ;   in Loop: Header=BB0_19 Depth=3
	add	x0, sp, #104
	ldr	w1, [sp, #36]                   ; 4-byte Folded Reload
	bl	_bytestream_put_byte
	ldr	x8, [sp, #104]
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	add	x1, x8, x9, lsl #2
	stp	x8, x1, [sp, #96]
	ldr	x8, [sp, #112]
	sub	x9, x1, x8
	asr	x10, x9, #2
	lsl	w8, w26, #1
	add	x10, x10, w8, sxtw
	ldr	x11, [sp, #56]                  ; 8-byte Folded Reload
	cmp	x10, w11, sxtw
	b.lt	LBB0_28
; %bb.24:                               ;   in Loop: Header=BB0_19 Depth=3
	ldr	x27, [sp, #16]                  ; 8-byte Folded Reload
	ldr	x23, [x27]
	ldp	w9, w10, [x24, #8]
	mul	w9, w10, w9
	madd	w9, w26, w9, w26
	sub	w9, w9, w11
	add	w0, w9, #200
	mov	x1, x8
	bl	_FFMAX
	mov	x21, x0
	ldr	w8, [x24, #4]
	add	w8, w8, w0
	str	w8, [x24, #4]
	ldr	w8, [x24, #76]
	cbnz	w8, LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_19 Depth=3
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	ldr	x2, [sp, #56]                   ; 8-byte Folded Reload
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x21
	mov	x4, x26
	bl	_avpriv_request_sample
	mov	w8, #1
	str	w8, [x24, #76]
LBB0_26:                                ;   in Loop: Header=BB0_19 Depth=3
	mov	x0, x27
	mov	x1, x21
	bl	_av_grow_packet
	tbnz	w0, #31, LBB0_34
; %bb.27:                               ;   in Loop: Header=BB0_19 Depth=3
	ldr	x11, [sp, #56]                  ; 8-byte Folded Reload
	add	w11, w21, w11
	ldr	x8, [x27]
	ldp	x10, x9, [sp, #104]
	sub	x9, x9, x23
	add	x9, x8, x9
	sub	x10, x10, x23
	add	x1, x8, x10
	stp	x1, x9, [sp, #104]
	ldr	x10, [sp, #72]
	sub	x10, x10, x23
	add	x10, x8, x10
	str	x10, [sp, #72]
	ldr	x10, [sp, #88]
	sub	x10, x10, x23
	add	x10, x8, x10
	str	x10, [sp, #88]
	ldr	x10, [sp, #96]
	sub	x10, x10, x23
	add	x10, x8, x10
	str	x10, [sp, #96]
	ldr	x10, [sp, #80]
	sub	x10, x10, x23
	add	x8, x8, x10
	sub	x9, x1, x9
	str	x8, [sp, #80]
	ldr	x27, [sp, #8]                   ; 8-byte Folded Reload
LBB0_28:                                ;   in Loop: Header=BB0_19 Depth=3
	lsr	x8, x9, #2
	str	x11, [sp, #56]                  ; 8-byte Folded Spill
	sub	w2, w11, w8
	add	x0, sp, #68
	bl	_init_put_bits
	add	x2, sp, #68
	sub	x3, x29, #104
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	mov	x1, x27
	mov	x4, x28
	ldr	w5, [sp, #48]                   ; 4-byte Folded Reload
	mov	x6, x25
	mov	x7, x19
	bl	_encode_slice
	tbnz	w0, #31, LBB0_34
; %bb.29:                               ;   in Loop: Header=BB0_19 Depth=3
	add	x0, sp, #96
	mov	x1, x25
	bl	_bytestream_put_byte
	ldr	w8, [x24]
	sub	w9, w8, #1
	ldr	w9, [x20, w9, sxtw #2]
	ldr	w10, [sp, #52]                  ; 4-byte Folded Reload
	add	w25, w9, w10
	cmp	w8, #2
	b.lt	LBB0_18
; %bb.30:                               ;   in Loop: Header=BB0_19 Depth=3
	mov	x21, #0
LBB0_31:                                ;   Parent Loop BB0_11 Depth=1
                                        ;     Parent Loop BB0_16 Depth=2
                                        ;       Parent Loop BB0_19 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	lsl	x23, x21, #2
	ldr	w1, [x20, x23]
	add	x0, sp, #96
	bl	_bytestream_put_be16
	ldr	w8, [x20, x23]
	add	w25, w8, w25
	add	x21, x21, #1
	ldrsw	x8, [x24]
	sub	x8, x8, #1
	cmp	x21, x8
	b.lt	LBB0_31
	b	LBB0_18
LBB0_32:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [sp, #104]
	ldr	x9, [sp, #72]
	sub	x8, x8, x9
	add	x8, x8, #4
	lsr	x1, x8, #2
	add	x0, sp, #72
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_bytestream_put_be32
	ldr	w8, [x24, #40]
	add	w8, w8, #1
	str	w8, [x24, #40]
	ldr	w9, [x24, #8]
	cmp	w8, w9
	b.lt	LBB0_11
LBB0_33:
	ldp	x9, x8, [sp, #104]
	sub	x8, x8, #32
	str	x8, [sp, #112]
	sub	x8, x9, x8
	lsr	x19, x8, #2
	add	x0, sp, #112
	mov	x1, x19
	bl	_bytestream_put_be32
	mov	w0, #0
Lloh20:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	x10, [sp, #16]                  ; 8-byte Folded Reload
	ldr	w9, [x10, #12]
	orr	w8, w9, w8
	stp	w19, w8, [x10, #8]
	mov	w8, #1
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	str	w8, [x9]
LBB0_34:
	ldur	x8, [x29, #-88]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_36
; %bb.35:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_36:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_INPUT_BUFFER_MIN_SIZE,8,3   ; @AV_INPUT_BUFFER_MIN_SIZE
	.comm	_FRAME_ID,4,2                   ; @FRAME_ID
	.comm	_AV_CODEC_FLAG_INTERLACED_DCT,4,2 ; @AV_CODEC_FLAG_INTERLACED_DCT
	.comm	_QUANT_MAT_DEFAULT,8,3          ; @QUANT_MAT_DEFAULT
	.comm	_find_quant_thread,4,2          ; @find_quant_thread
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Packet too small: is %i, needs %i (slice: %i). Correct allocation"

	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_encode_frame
.subsections_via_symbols
