	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vaapi_encode_mjpeg_write_extra_buffer
_vaapi_encode_mjpeg_write_extra_buffer: ## @vaapi_encode_mjpeg_write_extra_buffer
	.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
	movq	%r8, %r12
	movq	(%rdi), %r14
	cmpl	$1, %edx
	je	LBB0_10
## %bb.1:
	testl	%edx, %edx
	jne	LBB0_41
## %bb.2:
	cmpq	$39, (%r9)
	jbe	LBB0_43
## %bb.3:
	movq	_VAQMatrixBufferType@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	movq	$40, (%r9)
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	$1, (%r12)
	movq	16(%r14), %rcx
	movq	24(%r14), %rdx
	movq	(%rdx), %rax
	movq	(%rcx,%rax,8), %rax
	movq	32(%r12), %rsi
	movq	%rsi, %rdi
	subq	%rax, %rdi
	cmpq	$15, %rdi
	ja	LBB0_44
## %bb.4:
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdi,4), %ebx
	movl	%ebx, (%rsi,%rdi,4)
	movl	4(%rax,%rdi,4), %ebx
	movl	%ebx, 4(%rsi,%rdi,4)
	movl	8(%rax,%rdi,4), %ebx
	movl	%ebx, 8(%rsi,%rdi,4)
	movl	12(%rax,%rdi,4), %ebx
	movl	%ebx, 12(%rsi,%rdi,4)
	addq	$4, %rdi
	cmpq	$64, %rdi
	jne	LBB0_5
	jmp	LBB0_6
LBB0_10:
	cmpq	$39, (%r9)
	ja	LBB0_11
LBB0_43:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_41:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_42
LBB0_11:
	movq	_VAHuffmanTableBufferType@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	movq	$40, (%r9)
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_39:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	incq	%r15
	xorl	%eax, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	cmpl	$2, 8(%r14)
	setge	%al
	incq	%rax
	cmpq	%rax, %r15
	jae	LBB0_40
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
                                        ##     Child Loop BB0_23 Depth 2
                                        ##     Child Loop BB0_25 Depth 2
                                        ##     Child Loop BB0_33 Depth 2
                                        ##     Child Loop BB0_36 Depth 2
                                        ##     Child Loop BB0_38 Depth 2
	movq	8(%r12), %rax
	movl	$1, (%rax,%r15,4)
	movq	(%r14), %r14
	leaq	(%r15,%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	shlq	$5, %r15
	movq	(%r14,%r15), %rax
	movq	16(%r12), %rcx
	movq	(%rcx,%r15), %rcx
	movl	(%rax), %edx
	movl	%edx, (%rcx)
	movl	4(%rax), %ebx
	movl	%ebx, 4(%rcx)
	addl	%edx, %ebx
	movl	8(%rax), %edx
	movl	%edx, 8(%rcx)
	addl	%edx, %ebx
	movl	12(%rax), %edx
	movl	%edx, 12(%rcx)
	addl	%edx, %ebx
	movl	16(%rax), %edx
	movl	%edx, 16(%rcx)
	addl	%edx, %ebx
	movl	20(%rax), %edx
	movl	%edx, 20(%rcx)
	addl	%edx, %ebx
	movl	24(%rax), %edx
	movl	%edx, 24(%rcx)
	addl	%edx, %ebx
	movl	28(%rax), %edx
	movl	%edx, 28(%rcx)
	addl	%edx, %ebx
	movl	32(%rax), %edx
	movl	%edx, 32(%rcx)
	addl	%edx, %ebx
	movl	36(%rax), %edx
	movl	%edx, 36(%rcx)
	addl	%edx, %ebx
	movl	40(%rax), %edx
	movl	%edx, 40(%rcx)
	addl	%edx, %ebx
	movl	44(%rax), %edx
	movl	%edx, 44(%rcx)
	addl	%edx, %ebx
	movl	48(%rax), %edx
	movl	%edx, 48(%rcx)
	addl	%edx, %ebx
	movl	52(%rax), %edx
	movl	%edx, 52(%rcx)
	addl	%edx, %ebx
	movl	56(%rax), %edx
	movl	%edx, 56(%rcx)
	addl	%edx, %ebx
	movq	%r12, %r13
	movl	60(%rax), %r12d
	movl	%r12d, 60(%rcx)
	leal	(%r12,%rbx), %eax
	xorl	%edi, %edi
	cmpl	$9, %eax
	setb	%dil
	callq	_av_assert0
	addl	%r12d, %ebx
	jle	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	movq	%r11, %rax
	shlq	$4, %rax
	movq	8(%r14,%rax), %rcx
	movq	16(%r13), %r8
	movq	24(%r8,%r15), %rdx
	movl	%ebx, %r10d
	cmpl	$8, %ebx
	movq	%r11, %r13
	jb	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	$0, %edi
	cmpq	$32, %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jb	LBB0_25
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%r10d, %edi
	andl	$-8, %edi
	leaq	-8(%rdi), %rax
	movq	%rax, %rbx
	shrq	$3, %rbx
	incq	%rbx
	movl	%ebx, %r9d
	andl	$3, %r9d
	cmpq	$24, %rax
	jae	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	16(%r13), %r8
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	xorl	%edi, %edi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_19:                                ##   in Loop: Header=BB0_12 Depth=1
	movabsq	$4611686018427387900, %rax      ## imm = 0x3FFFFFFFFFFFFFFC
	andq	%rax, %rbx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%rcx,%rax,4), %xmm0
	movups	16(%rcx,%rax,4), %xmm1
	movups	%xmm0, (%rdx,%rax,4)
	movups	%xmm1, 16(%rdx,%rax,4)
	movups	32(%rcx,%rax,4), %xmm0
	movups	48(%rcx,%rax,4), %xmm1
	movups	%xmm0, 32(%rdx,%rax,4)
	movups	%xmm1, 48(%rdx,%rax,4)
	movups	64(%rcx,%rax,4), %xmm0
	movups	80(%rcx,%rax,4), %xmm1
	movups	%xmm0, 64(%rdx,%rax,4)
	movups	%xmm1, 80(%rdx,%rax,4)
	movups	96(%rcx,%rax,4), %xmm0
	movups	112(%rcx,%rax,4), %xmm1
	movups	%xmm0, 96(%rdx,%rax,4)
	movups	%xmm1, 112(%rdx,%rax,4)
	addq	$32, %rax
	addq	$-4, %rbx
	jne	LBB0_20
LBB0_21:                                ##   in Loop: Header=BB0_12 Depth=1
	testq	%r9, %r9
	je	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	(%rdx,%rax,4), %rbx
	addq	$16, %rbx
	leaq	(%rcx,%rax,4), %rax
	addq	$16, %rax
	shlq	$5, %r9
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rax,%rsi), %xmm0
	movups	(%rax,%rsi), %xmm1
	movups	%xmm0, -16(%rbx,%rsi)
	movups	%xmm1, (%rbx,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %r9
	jne	LBB0_23
LBB0_24:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpq	%r10, %rdi
	je	LBB0_26
	.p2align	4, 0x90
LBB0_25:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rcx,%rdi,4), %eax
	movl	%eax, (%rdx,%rdi,4)
	incq	%rdi
	cmpq	%r10, %rdi
	jb	LBB0_25
LBB0_26:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r14), %r14
	orq	$1, %r13
	shlq	$4, %r13
	movq	(%r14,%r13), %rcx
	movq	8(%r8,%r15), %rax
	movl	(%rcx), %edx
	movl	%edx, (%rax)
	movl	4(%rcx), %ebx
	movl	%ebx, 4(%rax)
	addl	%edx, %ebx
	movl	8(%rcx), %edx
	movl	%edx, 8(%rax)
	addl	%edx, %ebx
	movl	12(%rcx), %edx
	movl	%edx, 12(%rax)
	addl	%edx, %ebx
	movl	16(%rcx), %edx
	movl	%edx, 16(%rax)
	addl	%edx, %ebx
	movl	20(%rcx), %edx
	movl	%edx, 20(%rax)
	addl	%edx, %ebx
	movl	24(%rcx), %edx
	movl	%edx, 24(%rax)
	addl	%edx, %ebx
	movl	28(%rcx), %edx
	movl	%edx, 28(%rax)
	addl	%edx, %ebx
	movl	32(%rcx), %edx
	movl	%edx, 32(%rax)
	addl	%edx, %ebx
	movl	36(%rcx), %edx
	movl	%edx, 36(%rax)
	addl	%edx, %ebx
	movl	40(%rcx), %edx
	movl	%edx, 40(%rax)
	addl	%edx, %ebx
	movl	44(%rcx), %edx
	movl	%edx, 44(%rax)
	addl	%edx, %ebx
	movl	48(%rcx), %edx
	movl	%edx, 48(%rax)
	addl	%edx, %ebx
	movl	52(%rcx), %edx
	movl	%edx, 52(%rax)
	addl	%edx, %ebx
	movl	56(%rcx), %edx
	movl	%edx, 56(%rax)
	addl	%edx, %ebx
	movl	60(%rcx), %r12d
	movl	%r12d, 60(%rax)
	leal	(%r12,%rbx), %eax
	xorl	%edi, %edi
	cmpl	$9, %eax
	setb	%dil
	callq	_av_assert0
	addl	%r12d, %ebx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jle	LBB0_39
## %bb.27:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	8(%r14,%r13), %rax
	movq	16(%r12), %rcx
	movq	16(%rcx,%r15), %rcx
	movl	%ebx, %r9d
	cmpl	$8, %ebx
	jb	LBB0_28
## %bb.29:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%rcx, %rdx
	subq	%rax, %rdx
	movl	$0, %esi
	cmpq	$32, %rdx
	jb	LBB0_38
## %bb.30:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%r9d, %esi
	andl	$-8, %esi
	leaq	-8(%rsi), %rdx
	movq	%rdx, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r8d
	andl	$3, %r8d
	cmpq	$24, %rdx
	jae	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_12 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_34
LBB0_28:                                ##   in Loop: Header=BB0_12 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_38
LBB0_32:                                ##   in Loop: Header=BB0_12 Depth=1
	movabsq	$4611686018427387900, %rdx      ## imm = 0x3FFFFFFFFFFFFFFC
	andq	%rdx, %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_33:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%rax,%rbx,4), %xmm0
	movups	16(%rax,%rbx,4), %xmm1
	movups	%xmm0, (%rcx,%rbx,4)
	movups	%xmm1, 16(%rcx,%rbx,4)
	movups	32(%rax,%rbx,4), %xmm0
	movups	48(%rax,%rbx,4), %xmm1
	movups	%xmm0, 32(%rcx,%rbx,4)
	movups	%xmm1, 48(%rcx,%rbx,4)
	movups	64(%rax,%rbx,4), %xmm0
	movups	80(%rax,%rbx,4), %xmm1
	movups	%xmm0, 64(%rcx,%rbx,4)
	movups	%xmm1, 80(%rcx,%rbx,4)
	movups	96(%rax,%rbx,4), %xmm0
	movups	112(%rax,%rbx,4), %xmm1
	movups	%xmm0, 96(%rcx,%rbx,4)
	movups	%xmm1, 112(%rcx,%rbx,4)
	addq	$32, %rbx
	addq	$-4, %rdi
	jne	LBB0_33
LBB0_34:                                ##   in Loop: Header=BB0_12 Depth=1
	testq	%r8, %r8
	je	LBB0_37
## %bb.35:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	(%rcx,%rbx,4), %rdi
	addq	$16, %rdi
	leaq	(%rax,%rbx,4), %rbx
	addq	$16, %rbx
	shlq	$5, %r8
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_36:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rbx,%rdx), %xmm0
	movups	(%rbx,%rdx), %xmm1
	movups	%xmm0, -16(%rdi,%rdx)
	movups	%xmm1, (%rdi,%rdx)
	addq	$32, %rdx
	cmpq	%rdx, %r8
	jne	LBB0_36
LBB0_37:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpq	%r9, %rsi
	je	LBB0_39
	.p2align	4, 0x90
LBB0_38:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rax,%rsi,4), %edx
	movl	%edx, (%rcx,%rsi,4)
	incq	%rsi
	cmpq	%r9, %rsi
	jb	LBB0_38
	jmp	LBB0_39
LBB0_40:
	xorl	%eax, %eax
	jmp	LBB0_42
LBB0_44:
	movups	(%rax), %xmm0
	movups	%xmm0, (%rsi)
	movups	16(%rax), %xmm0
	movups	%xmm0, 16(%rsi)
	movups	32(%rax), %xmm0
	movups	%xmm0, 32(%rsi)
	movups	48(%rax), %xmm0
	movups	%xmm0, 48(%rsi)
	movups	64(%rax), %xmm0
	movups	%xmm0, 64(%rsi)
	movups	80(%rax), %xmm0
	movups	%xmm0, 80(%rsi)
	movups	96(%rax), %xmm0
	movups	%xmm0, 96(%rsi)
	movups	112(%rax), %xmm0
	movups	%xmm0, 112(%rsi)
	movups	128(%rax), %xmm0
	movups	%xmm0, 128(%rsi)
	movups	144(%rax), %xmm0
	movups	%xmm0, 144(%rsi)
	movups	160(%rax), %xmm0
	movups	%xmm0, 160(%rsi)
	movups	176(%rax), %xmm0
	movups	%xmm0, 176(%rsi)
	movups	192(%rax), %xmm0
	movups	%xmm0, 192(%rsi)
	movups	208(%rax), %xmm0
	movups	%xmm0, 208(%rsi)
	movups	224(%rax), %xmm0
	movups	%xmm0, 224(%rsi)
	movups	240(%rax), %xmm0
	movups	%xmm0, 240(%rsi)
LBB0_6:
	xorl	%eax, %eax
	cmpl	$2, 32(%r14)
	jl	LBB0_42
## %bb.7:
	movl	$1, 4(%r12)
	movq	8(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	24(%r12), %rdx
	movq	%rdx, %rsi
	subq	%rcx, %rsi
	cmpq	$15, %rsi
	ja	LBB0_45
## %bb.8:
	xorl	%eax, %eax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rsi,4), %edi
	movl	%edi, (%rdx,%rsi,4)
	movl	4(%rcx,%rsi,4), %edi
	movl	%edi, 4(%rdx,%rsi,4)
	movl	8(%rcx,%rsi,4), %edi
	movl	%edi, 8(%rdx,%rsi,4)
	movl	12(%rcx,%rsi,4), %edi
	movl	%edi, 12(%rdx,%rsi,4)
	addq	$4, %rsi
	cmpq	$64, %rsi
	jne	LBB0_9
	jmp	LBB0_42
LBB0_45:
	movups	(%rcx), %xmm0
	movups	%xmm0, (%rdx)
	movups	16(%rcx), %xmm0
	movups	%xmm0, 16(%rdx)
	movups	32(%rcx), %xmm0
	movups	%xmm0, 32(%rdx)
	movups	48(%rcx), %xmm0
	movups	%xmm0, 48(%rdx)
	movups	64(%rcx), %xmm0
	movups	%xmm0, 64(%rdx)
	movups	80(%rcx), %xmm0
	movups	%xmm0, 80(%rdx)
	movups	96(%rcx), %xmm0
	movups	%xmm0, 96(%rdx)
	movups	112(%rcx), %xmm0
	movups	%xmm0, 112(%rdx)
	movups	128(%rcx), %xmm0
	movups	%xmm0, 128(%rdx)
	movups	144(%rcx), %xmm0
	movups	%xmm0, 144(%rdx)
	movups	160(%rcx), %xmm0
	movups	%xmm0, 160(%rdx)
	movups	176(%rcx), %xmm0
	movups	%xmm0, 176(%rdx)
	movups	192(%rcx), %xmm0
	movups	%xmm0, 192(%rdx)
	movups	208(%rcx), %xmm0
	movups	%xmm0, 208(%rdx)
	movups	224(%rcx), %xmm0
	movups	%xmm0, 224(%rdx)
	movups	240(%rcx), %xmm0
	movups	%xmm0, 240(%rdx)
LBB0_42:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_VAQMatrixBufferType,4,2        ## @VAQMatrixBufferType
	.comm	_VAHuffmanTableBufferType,4,2   ## @VAHuffmanTableBufferType
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_vaapi_encode_mjpeg_write_extra_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vaapi_encode_mjpeg_write_extra_buffer
_vaapi_encode_mjpeg_write_extra_buffer: ; @vaapi_encode_mjpeg_write_extra_buffer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x4
	ldr	x20, [x0]
	cmp	w2, #1
	b.eq	LBB0_6
; %bb.1:
	cbnz	w2, LBB0_8
; %bb.2:
	ldr	x8, [x5]
	cmp	x8, #39
	b.ls	LBB0_7
; %bb.3:
Lloh0:
	adrp	x8, _VAQMatrixBufferType@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VAQMatrixBufferType@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x3]
	mov	w8, #40
	str	x8, [x5]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	mov	w8, #1
	str	w8, [x19]
	ldp	x8, x9, [x20, #16]
	ldr	x10, [x9]
	ldr	x10, [x8, x10, lsl #3]
	ldr	x11, [x19, #32]
	sub	x12, x11, x10
	cmp	x12, #15
	b.hi	LBB0_26
; %bb.4:
	mov	x12, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x10, x12]
	str	w13, [x11, x12]
	add	x12, x12, #4
	cmp	x12, #256
	b.ne	LBB0_5
	b	LBB0_27
LBB0_6:
	ldr	x8, [x5]
	cmp	x8, #39
	b.hi	LBB0_9
LBB0_7:
Lloh3:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_8:
Lloh6:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_32
LBB0_9:
Lloh9:
	adrp	x8, _VAHuffmanTableBufferType@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VAHuffmanTableBufferType@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x3]
	mov	w8, #40
	str	x8, [x5]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	mov	x21, #0
	mov	w22, #1
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x21, x21, #1
	ldr	w8, [x20, #8]
	cmp	w8, #1
	cinc	x8, x22, gt
	cmp	x21, x8
	b.hs	LBB0_31
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
                                        ;     Child Loop BB0_17 Depth 2
                                        ;     Child Loop BB0_23 Depth 2
                                        ;     Child Loop BB0_25 Depth 2
	ldp	x8, x9, [x19, #8]
	str	w22, [x8, x21, lsl #2]
	ldr	x25, [x20]
	lsl	x23, x21, #1
	lsl	x8, x21, #5
	ldr	x10, [x25, x8]
	ldr	x8, [x9, x8]
	ldr	w9, [x10]
	str	w9, [x8]
	ldr	w11, [x10, #4]
	str	w11, [x8, #4]
	ldr	w12, [x10, #8]
	str	w12, [x8, #8]
	add	w9, w11, w9
	add	w9, w12, w9
	ldr	w11, [x10, #12]
	str	w11, [x8, #12]
	ldr	w12, [x10, #16]
	str	w12, [x8, #16]
	add	w9, w11, w9
	add	w9, w12, w9
	ldr	w11, [x10, #20]
	str	w11, [x8, #20]
	ldr	w12, [x10, #24]
	str	w12, [x8, #24]
	add	w9, w11, w9
	add	w9, w12, w9
	ldr	w11, [x10, #28]
	str	w11, [x8, #28]
	ldr	w12, [x10, #32]
	str	w12, [x8, #32]
	add	w9, w11, w9
	add	w9, w12, w9
	ldr	w11, [x10, #36]
	str	w11, [x8, #36]
	ldr	w12, [x10, #40]
	str	w12, [x8, #40]
	add	w9, w11, w9
	add	w9, w12, w9
	ldr	w11, [x10, #44]
	str	w11, [x8, #44]
	ldr	w12, [x10, #48]
	str	w12, [x8, #48]
	add	w9, w11, w9
	add	w9, w12, w9
	ldr	w11, [x10, #52]
	str	w11, [x8, #52]
	ldr	w12, [x10, #56]
	str	w12, [x8, #56]
	add	w9, w11, w9
	add	w9, w12, w9
	ldr	w10, [x10, #60]
	str	w10, [x8, #60]
	add	w24, w10, w9
	cmp	w24, #9
	cset	w0, lo
	bl	_av_assert0
	cmp	w24, #0
	b.le	LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x9, #0
	add	x8, x25, x23, lsl #4
	ldr	x10, [x8, #8]
	ldr	x8, [x19, #16]
	add	x11, x8, x21, lsl #5
	ldr	x11, [x11, #24]
	cmp	w24, #16
	b.lo	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	sub	x12, x11, x10
	cmp	x12, #64
	b.lo	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	and	x9, x24, #0xfffffff0
	add	x12, x11, #32
	add	x13, x10, #32
	mov	x14, x9
LBB0_15:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x13, #-32]
	ldp	q2, q3, [x13], #64
	stp	q0, q1, [x12, #-32]
	stp	q2, q3, [x12], #64
	subs	x14, x14, #16
	b.ne	LBB0_15
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	x9, x24
	b.eq	LBB0_19
LBB0_17:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x12, x9, #2
	ldr	w13, [x10, x12]
	str	w13, [x11, x12]
	add	x9, x9, #1
	cmp	x9, x24
	b.lo	LBB0_17
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x19, #16]
LBB0_19:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x24, [x20]
	orr	x25, x23, #0x1
	lsl	x9, x25, #4
	ldr	x9, [x24, x9]
	add	x8, x8, x21, lsl #5
	ldr	x8, [x8, #8]
	ldr	w10, [x9]
	str	w10, [x8]
	ldr	w11, [x9, #4]
	str	w11, [x8, #4]
	ldr	w12, [x9, #8]
	str	w12, [x8, #8]
	add	w10, w11, w10
	add	w10, w12, w10
	ldr	w11, [x9, #12]
	str	w11, [x8, #12]
	ldr	w12, [x9, #16]
	str	w12, [x8, #16]
	add	w10, w11, w10
	add	w10, w12, w10
	ldr	w11, [x9, #20]
	str	w11, [x8, #20]
	ldr	w12, [x9, #24]
	str	w12, [x8, #24]
	add	w10, w11, w10
	add	w10, w12, w10
	ldr	w11, [x9, #28]
	str	w11, [x8, #28]
	ldr	w12, [x9, #32]
	str	w12, [x8, #32]
	add	w10, w11, w10
	add	w10, w12, w10
	ldr	w11, [x9, #36]
	str	w11, [x8, #36]
	ldr	w12, [x9, #40]
	str	w12, [x8, #40]
	add	w10, w11, w10
	add	w10, w12, w10
	ldr	w11, [x9, #44]
	str	w11, [x8, #44]
	ldr	w12, [x9, #48]
	str	w12, [x8, #48]
	add	w10, w11, w10
	add	w10, w12, w10
	ldr	w11, [x9, #52]
	str	w11, [x8, #52]
	ldr	w12, [x9, #56]
	str	w12, [x8, #56]
	add	w10, w11, w10
	add	w10, w12, w10
	ldr	w9, [x9, #60]
	str	w9, [x8, #60]
	add	w23, w9, w10
	cmp	w23, #9
	cset	w0, lo
	bl	_av_assert0
	cmp	w23, #1
	b.lt	LBB0_10
; %bb.20:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x8, #0
	add	x9, x24, x25, lsl #4
	ldr	x9, [x9, #8]
	ldr	x10, [x19, #16]
	add	x10, x10, x21, lsl #5
	ldr	x10, [x10, #16]
	cmp	w23, #16
	b.lo	LBB0_25
; %bb.21:                               ;   in Loop: Header=BB0_11 Depth=1
	sub	x11, x10, x9
	cmp	x11, #64
	b.lo	LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_11 Depth=1
	and	x8, x23, #0xfffffff0
	add	x11, x10, #32
	add	x12, x9, #32
	mov	x13, x8
LBB0_23:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #16
	b.ne	LBB0_23
; %bb.24:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	x8, x23
	b.eq	LBB0_10
LBB0_25:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x11, x8, #2
	ldr	w12, [x9, x11]
	str	w12, [x10, x11]
	add	x8, x8, #1
	cmp	x8, x23
	b.lo	LBB0_25
	b	LBB0_10
LBB0_26:
	ldr	q0, [x10]
	str	q0, [x11]
	ldr	q0, [x10, #16]
	str	q0, [x11, #16]
	ldr	q0, [x10, #32]
	str	q0, [x11, #32]
	ldr	q0, [x10, #48]
	str	q0, [x11, #48]
	ldr	q0, [x10, #64]
	str	q0, [x11, #64]
	ldr	q0, [x10, #80]
	str	q0, [x11, #80]
	ldr	q0, [x10, #96]
	str	q0, [x11, #96]
	ldr	q0, [x10, #112]
	str	q0, [x11, #112]
	ldr	q0, [x10, #128]
	str	q0, [x11, #128]
	ldr	q0, [x10, #144]
	str	q0, [x11, #144]
	ldr	q0, [x10, #160]
	str	q0, [x11, #160]
	ldr	q0, [x10, #176]
	str	q0, [x11, #176]
	ldr	q0, [x10, #192]
	str	q0, [x11, #192]
	ldr	q0, [x10, #208]
	str	q0, [x11, #208]
	ldr	q0, [x10, #224]
	str	q0, [x11, #224]
	ldr	q0, [x10, #240]
	str	q0, [x11, #240]
LBB0_27:
	ldr	w10, [x20, #32]
	cmp	w10, #2
	b.lt	LBB0_31
; %bb.28:
	mov	w10, #1
	str	w10, [x19, #4]
	ldr	x9, [x9, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x9, [x19, #24]
	sub	x10, x9, x8
	cmp	x10, #15
	b.hi	LBB0_33
; %bb.29:
	mov	x10, #0
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x8, x10]
	str	w11, [x9, x10]
	add	x10, x10, #4
	cmp	x10, #256
	b.ne	LBB0_30
LBB0_31:
	mov	w0, #0
LBB0_32:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_33:
	mov	w0, #0
	ldr	q0, [x8]
	str	q0, [x9]
	ldr	q0, [x8, #16]
	str	q0, [x9, #16]
	ldr	q0, [x8, #32]
	str	q0, [x9, #32]
	ldr	q0, [x8, #48]
	str	q0, [x9, #48]
	ldr	q0, [x8, #64]
	str	q0, [x9, #64]
	ldr	q0, [x8, #80]
	str	q0, [x9, #80]
	ldr	q0, [x8, #96]
	str	q0, [x9, #96]
	ldr	q0, [x8, #112]
	str	q0, [x9, #112]
	ldr	q0, [x8, #128]
	str	q0, [x9, #128]
	ldr	q0, [x8, #144]
	str	q0, [x9, #144]
	ldr	q0, [x8, #160]
	str	q0, [x9, #160]
	ldr	q0, [x8, #176]
	str	q0, [x9, #176]
	ldr	q0, [x8, #192]
	str	q0, [x9, #192]
	ldr	q0, [x8, #208]
	str	q0, [x9, #208]
	ldr	q0, [x8, #224]
	str	q0, [x9, #224]
	ldr	q0, [x8, #240]
	str	q0, [x9, #240]
	b	LBB0_32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_VAQMatrixBufferType,4,2        ; @VAQMatrixBufferType
	.comm	_VAHuffmanTableBufferType,4,2   ; @VAHuffmanTableBufferType
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_vaapi_encode_mjpeg_write_extra_buffer
.subsections_via_symbols
