	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmd_decode
_vmd_decode:                            ## @vmd_decode
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	addq	$24, %rdi
	callq	_AV_RL16
	movl	%eax, %r14d
	movq	(%rbx), %rdi
	addq	$32, %rdi
	callq	_AV_RL16
	movl	%eax, %r15d
	movq	(%rbx), %rdi
	addq	$40, %rdi
	callq	_AV_RL16
                                        ## kill: def $eax killed $eax def $rax
	subl	%r14d, %eax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	leal	1(%rax), %r12d
	movq	(%rbx), %rdi
	addq	$48, %rdi
	callq	_AV_RL16
	movq	%rbx, %r10
	movq	%r12, %r8
                                        ## kill: def $eax killed $eax def $rax
	subl	%r15d, %eax
	leal	1(%rax), %r12d
	movq	40(%rbx), %rdi
	movl	(%rdi), %r13d
	cmpl	%r13d, %r8d
	jne	LBB0_4
## %bb.1:
	cmpl	4(%rdi), %r12d
	jne	LBB0_4
## %bb.2:
	movl	%r14d, %ecx
	orl	%r15d, %ecx
	je	LBB0_4
## %bb.3:
	movl	%r14d, 8(%r10)
	movl	%r15d, 12(%r10)
LBB0_4:
	movl	8(%r10), %r11d
	movl	%r14d, %ebx
	subl	%r11d, %ebx
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	js	LBB0_24
## %bb.5:
	cmpl	$-1, %edx
	jl	LBB0_24
## %bb.6:
	cmpl	%r13d, %ebx
	jge	LBB0_24
## %bb.7:
	cmpl	%r13d, %edx
	jge	LBB0_24
## %bb.8:
	leal	(%rbx,%r8), %edx
	cmpl	%r13d, %edx
	jg	LBB0_24
## %bb.9:
	movl	12(%r10), %edx
	movl	%r15d, %ecx
	subl	%edx, %ecx
	js	LBB0_29
## %bb.10:
	cmpl	$-1, %eax
	jl	LBB0_29
## %bb.11:
	movl	4(%rdi), %r9d
	cmpl	%r9d, %ecx
	jge	LBB0_29
## %bb.12:
	cmpl	%r9d, %eax
	jge	LBB0_29
## %bb.13:
	leal	(%rcx,%r12), %esi
	cmpl	%r9d, %esi
	jg	LBB0_29
## %bb.14:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	32(%r10), %rsi
	movq	(%rsi), %rsi
	movq	(%rsi), %rsi
	testq	%rsi, %rsi
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%r10, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_20
## %bb.15:
	cmpl	%r11d, %r14d
	jne	LBB0_19
## %bb.16:
	cmpl	%edx, %r15d
	jne	LBB0_19
## %bb.17:
	cmpl	%r13d, %r8d
	jne	LBB0_19
## %bb.18:
	cmpl	%r9d, %r12d
	je	LBB0_20
LBB0_19:
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	movq	(%rax), %rdi
	movb	(%rcx), %al
	mulb	%r9b
	movzbl	%al, %edx
	callq	_memcpy
	movq	-56(%rbp), %r10                 ## 8-byte Reload
LBB0_20:
	movq	%r12, -120(%rbp)                ## 8-byte Spill
	movq	(%r10), %rsi
	addq	$64, %rsi
	movl	16(%r10), %edx
	addl	$-16, %edx
	leaq	-48(%rbp), %rdi
	movq	%r10, %rbx
	callq	_bytestream2_init
	movq	(%rbx), %rax
	testb	$2, 60(%rax)
	je	LBB0_33
## %bb.21:
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_bytestream2_skip
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	56(%rbx), %r13
	movq	%r14, %rdi
	callq	_bytestream2_get_bytes_left
	movzbl	%al, %ecx
	movq	_PALETTE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,2), %edx
	cmpl	%ecx, %edx
	jle	LBB0_30
## %bb.22:
	movq	40(%rbx), %rdi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_23:
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_27
LBB0_24:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %ecx
LBB0_25:
                                        ## kill: def $r8d killed $r8d killed $r8
LBB0_26:
	xorl	%eax, %eax
	callq	_av_log
LBB0_27:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_28:
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r12d, %r8d
	jmp	LBB0_26
LBB0_30:
	testl	%eax, %eax
	jle	LBB0_33
## %bb.31:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %ebx
	shll	$18, %ebx
	movq	%r12, %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %r15d
	shll	$10, %r15d
	movq	%r12, %rdi
	callq	_bytestream2_get_byteu
	movq	_PALETTE_COUNT@GOTPCREL(%rip), %rdx
                                        ## kill: def $eax killed $eax def $rax
	movzwl	%r15w, %ecx
	orl	%ebx, %ecx
	andl	$63, %eax
	leal	(%rcx,%rax,4), %eax
	movl	%eax, %ecx
	shrl	$6, %ecx
	andl	$197379, %ecx                   ## imm = 0x30303
	orl	%eax, %ecx
	orl	$-16777216, %ecx                ## imm = 0xFF000000
	movl	%ecx, (%r13,%r14,4)
	incq	%r14
	movslq	(%rdx), %rax
	cmpq	%rax, %r14
	jl	LBB0_32
LBB0_33:
	xorl	%r15d, %r15d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 16(%rax)
	je	LBB0_28
## %bb.34:
	leaq	-48(%rbp), %rdi
	callq	_bytestream2_get_bytes_left
	testb	%al, %al
	movq	-104(%rbp), %r14                ## 8-byte Reload
	je	LBB0_27
## %bb.35:
	leaq	-48(%rbp), %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %ebx
	testb	$-128, %bl
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_39
## %bb.36:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	cmpl	$0, 48(%r12)
	je	LBB0_58
## %bb.37:
	movl	-48(%rbp), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	leaq	-48(%rbp), %rdi
	callq	_bytestream2_get_bytes_left
	movq	24(%r12), %rdx
	movl	48(%r12), %ecx
	movzbl	%al, %esi
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_lz_unpack
	testl	%eax, %eax
	js	LBB0_74
## %bb.38:
	andl	$127, %ebx
	movq	24(%r12), %rsi
	leaq	-48(%rbp), %rdi
	movl	%eax, %edx
	callq	_bytestream2_init
LBB0_39:
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movzbl	(%rcx), %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	imull	%edx, %ecx
	addl	%r13d, %ecx
	movslq	%ecx, %r12
	addq	(%rax), %r12
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	32(%rax), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	imull	(%rax), %edx
	addl	%r13d, %edx
	movslq	%edx, %rax
	addq	(%rcx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	cmpb	$1, %bl
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_59
## %bb.40:
	cmpb	$2, %bl
	je	LBB0_71
## %bb.41:
	cmpb	$3, %bl
	jne	LBB0_28
## %bb.42:
	testl	%ecx, %ecx
	js	LBB0_28
## %bb.43:
	xorl	%eax, %eax
	leaq	-48(%rbp), %r13
LBB0_44:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_48 Depth 2
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	xorl	%r15d, %r15d
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_48
LBB0_45:                                ##   in Loop: Header=BB0_48 Depth=2
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
	movl	-48(%rbp), %eax
	movl	%eax, -96(%rbp)                 ## 4-byte Spill
	movslq	%r15d, %r14
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	addq	%rbx, %r14
	movq	%r13, %rdi
	callq	_bytestream2_get_bytes_left
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, %r8d
	subl	%r15d, %r8d
	movzbl	%al, %ecx
	movl	-96(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_rle_unpack
	addl	%r12d, %r15d
	movq	%rbx, %r12
	movzbl	%al, %esi
	movq	%r13, %rdi
	callq	_bytestream2_skip
LBB0_46:                                ##   in Loop: Header=BB0_48 Depth=2
	movq	-104(%rbp), %r14                ## 8-byte Reload
	cmpl	-112(%rbp), %r15d               ## 4-byte Folded Reload
	jg	LBB0_56
LBB0_48:                                ##   Parent Loop BB0_44 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %ebx
	testb	$-128, %al
	jne	LBB0_52
## %bb.49:                              ##   in Loop: Header=BB0_48 Depth=2
	movzbl	%bl, %ebx
	leal	(%r15,%rbx), %eax
	cmpl	-112(%rbp), %eax                ## 4-byte Folded Reload
	jg	LBB0_27
## %bb.50:                              ##   in Loop: Header=BB0_48 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	32(%rax), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_27
## %bb.51:                              ##   in Loop: Header=BB0_48 Depth=2
	movslq	%r15d, %rsi
	leaq	(%r12,%rsi), %rdi
	addq	-80(%rbp), %rsi                 ## 8-byte Folded Reload
	leal	1(%rbx), %eax
	movzbl	%al, %edx
	callq	_memcpy
	addl	%ebx, %r15d
	incl	%r15d
	cmpl	-112(%rbp), %r15d               ## 4-byte Folded Reload
	jle	LBB0_48
	jmp	LBB0_56
LBB0_52:                                ##   in Loop: Header=BB0_48 Depth=2
	andb	$127, %bl
	leal	1(%rbx), %r14d
	movq	%r13, %rdi
	callq	_bytestream2_peek_byte
	movzbl	%r14b, %r12d
	cmpl	$255, %eax
	je	LBB0_45
## %bb.53:                              ##   in Loop: Header=BB0_48 Depth=2
	leal	(%r15,%r12), %r14d
	cmpl	-88(%rbp), %r14d                ## 4-byte Folded Reload
	jg	LBB0_27
## %bb.54:                              ##   in Loop: Header=BB0_48 Depth=2
	movq	%r13, %rdi
	callq	_bytestream2_get_bytes_left
	cmpb	%bl, %al
	jbe	LBB0_27
## %bb.55:                              ##   in Loop: Header=BB0_48 Depth=2
	movslq	%r15d, %rsi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	movq	%rax, %r12
	callq	_bytestream2_get_buffer
	movl	%r14d, %r15d
	jmp	LBB0_46
LBB0_56:                                ##   in Loop: Header=BB0_44 Depth=1
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	cmpl	%r8d, %r15d
	jg	LBB0_75
## %bb.57:                              ##   in Loop: Header=BB0_44 Depth=1
	movq	8(%r14), %rax
	movzbl	(%rax), %eax
	addq	%rax, %r12
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	32(%rax), %rax
	movq	8(%rax), %rax
	movslq	(%rax), %rax
	addq	%rax, -80(%rbp)                 ## 8-byte Folded Spill
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	xorl	%r15d, %r15d
	cmpl	-120(%rbp), %eax                ## 4-byte Folded Reload
	jne	LBB0_44
	jmp	LBB0_28
LBB0_58:
	movq	40(%r12), %rdi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_23
LBB0_59:
	testl	%ecx, %ecx
	js	LBB0_28
## %bb.60:
	incl	%ecx
	xorl	%eax, %eax
	leaq	-48(%rbp), %r13
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
LBB0_61:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_63 Depth 2
	movl	%eax, -120(%rbp)                ## 4-byte Spill
	xorl	%r15d, %r15d
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
LBB0_63:                                ##   Parent Loop BB0_61 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %ebx
	testb	$-128, %al
	jne	LBB0_66
## %bb.64:                              ##   in Loop: Header=BB0_63 Depth=2
	movzbl	%bl, %ebx
	leal	(%r15,%rbx), %eax
	cmpl	-112(%rbp), %eax                ## 4-byte Folded Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jg	LBB0_27
## %bb.65:                              ##   in Loop: Header=BB0_63 Depth=2
	movq	32(%rax), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_27
## %bb.62:                              ##   in Loop: Header=BB0_63 Depth=2
	movslq	%r15d, %rsi
	leaq	(%r12,%rsi), %rdi
	addq	-80(%rbp), %rsi                 ## 8-byte Folded Reload
	leal	1(%rbx), %eax
	movzbl	%al, %edx
	callq	_memcpy
	addl	%ebx, %r15d
	incl	%r15d
	cmpl	-112(%rbp), %r15d               ## 4-byte Folded Reload
	jle	LBB0_63
	jmp	LBB0_69
LBB0_66:                                ##   in Loop: Header=BB0_63 Depth=2
	movq	%r15, %rcx
	andb	$127, %bl
	leal	1(%rbx), %eax
	movzbl	%al, %r12d
	leal	(%r15,%r12), %r14d
	cmpl	-88(%rbp), %r14d                ## 4-byte Folded Reload
	jg	LBB0_27
## %bb.67:                              ##   in Loop: Header=BB0_63 Depth=2
	movq	%r13, %rdi
	callq	_bytestream2_get_bytes_left
	cmpb	%bl, %al
	jbe	LBB0_27
## %bb.68:                              ##   in Loop: Header=BB0_63 Depth=2
	movslq	%r15d, %rsi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	addq	%r15, %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	movq	%r15, %r12
	callq	_bytestream2_get_bufferu
	movl	%r14d, %r15d
	movq	-104(%rbp), %r14                ## 8-byte Reload
	cmpl	-112(%rbp), %r15d               ## 4-byte Folded Reload
	jle	LBB0_63
LBB0_69:                                ##   in Loop: Header=BB0_61 Depth=1
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	cmpl	%r8d, %r15d
	jg	LBB0_75
## %bb.70:                              ##   in Loop: Header=BB0_61 Depth=1
	movq	8(%r14), %rax
	movzbl	(%rax), %eax
	addq	%rax, %r12
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	32(%rax), %rax
	movq	8(%rax), %rax
	movslq	(%rax), %rax
	addq	%rax, -80(%rbp)                 ## 8-byte Folded Spill
	movl	-120(%rbp), %eax                ## 4-byte Reload
	incl	%eax
	xorl	%r15d, %r15d
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	cmpl	%ecx, %eax
	jne	LBB0_61
	jmp	LBB0_28
LBB0_71:
	testl	%ecx, %ecx
	js	LBB0_28
## %bb.72:
	movq	%r14, %r13
	movq	%r12, %r14
	movzbl	%al, %r12d
	movq	-120(%rbp), %rbx                ## 8-byte Reload
LBB0_73:                                ## =>This Inner Loop Header: Depth=1
	leaq	-48(%rbp), %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_bytestream2_get_buffer
	movq	8(%r13), %rax
	movzbl	(%rax), %eax
	addq	%rax, %r14
	decl	%ebx
	jne	LBB0_73
	jmp	LBB0_28
LBB0_74:
	movl	%eax, %r15d
	jmp	LBB0_28
LBB0_75:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	40(%rax), %rdi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movl	%r15d, %ecx
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid horizontal range %d-%d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Invalid vertical range %d-%d\n"

	.comm	_PALETTE_COUNT,4,2              ## @PALETTE_COUNT
L_.str.2:                               ## @.str.2
	.asciz	"Incomplete palette\n"

L_.str.3:                               ## @.str.3
	.asciz	"Trying to unpack LZ-compressed frame with no LZ buffer\n"

L_.str.4:                               ## @.str.4
	.asciz	"offset > width (%d > %d)\n"

	.no_dead_strip	_vmd_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmd_decode
_vmd_decode:                            ; @vmd_decode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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, x1
	mov	x20, x0
	ldr	x8, [x0]
	add	x0, x8, #24
	bl	_AV_RL16
	mov	x21, x0
	ldr	x8, [x20]
	add	x0, x8, #32
	bl	_AV_RL16
	mov	x22, x0
	ldr	x8, [x20]
	add	x0, x8, #40
	bl	_AV_RL16
	sub	w26, w0, w21
	add	w25, w26, #1
	ldr	x8, [x20]
	add	x0, x8, #48
	bl	_AV_RL16
	sub	w23, w0, w22
	add	w8, w23, #1
	ldr	x0, [x20, #40]
	ldr	w9, [x0]
	cmp	w25, w9
	b.ne	LBB0_3
; %bb.1:
	ldr	w10, [x0, #4]
	cmp	w8, w10
	orr	w10, w21, w22
	ccmp	w10, #0, #4, eq
	b.eq	LBB0_3
; %bb.2:
	stp	w21, w22, [x20, #8]
LBB0_3:
	ldr	w10, [x20, #8]
	sub	w24, w21, w10
	tbnz	w24, #31, LBB0_5
; %bb.4:
	cmn	w26, #1
	add	w11, w24, w25
	ccmp	w24, w9, #0, ge
	ccmp	w26, w9, #0, lt
	ccmp	w11, w9, #0, lt
	b.le	LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	stp	x24, x25, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
LBB0_6:
	bl	_av_log
LBB0_7:
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
LBB0_8:
	mov	x0, x2
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_9:
	ldr	w12, [x20, #12]
	sub	w14, w22, w12
	tbnz	w14, #31, LBB0_23
; %bb.10:
	cmn	w23, #1
	b.lt	LBB0_23
; %bb.11:
	ldr	w11, [x0, #4]
	cmp	w14, w11
	b.ge	LBB0_23
; %bb.12:
	cmp	w23, w11
	b.ge	LBB0_23
; %bb.13:
	add	w13, w14, w8
	cmp	w13, w11
	b.gt	LBB0_23
; %bb.14:
	str	x14, [sp, #24]                  ; 8-byte Folded Spill
	ldr	x13, [x20, #32]
	ldr	x13, [x13]
	ldr	x1, [x13]
	cbz	x1, LBB0_20
; %bb.15:
	cmp	w21, w10
	b.ne	LBB0_19
; %bb.16:
	cmp	w22, w12
	b.ne	LBB0_19
; %bb.17:
	cmp	w25, w9
	b.ne	LBB0_19
; %bb.18:
	cmp	w8, w11
	b.eq	LBB0_20
LBB0_19:
	ldp	x8, x9, [x19]
	ldr	x0, [x8]
	ldrb	w8, [x9]
	mul	w8, w8, w11
	and	w2, w8, #0xff
	bl	_memcpy
LBB0_20:
	str	x19, [sp, #32]                  ; 8-byte Folded Spill
	ldr	x8, [x20]
	add	x1, x8, #64
	ldr	w8, [x20, #16]
	sub	w2, w8, #16
	add	x0, sp, #40
	bl	_bytestream2_init
	ldr	x8, [x20]
	ldrb	w8, [x8, #60]
	tbz	w8, #1, LBB0_27
; %bb.21:
	add	x0, sp, #40
	mov	w1, #2
	bl	_bytestream2_skip
	ldr	x27, [x20, #56]
	add	x0, sp, #40
	bl	_bytestream2_get_bytes_left
Lloh8:
	adrp	x22, _PALETTE_COUNT@GOTPAGE
Lloh9:
	ldr	x22, [x22, _PALETTE_COUNT@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w9, w8, w8, lsl #1
	cmp	w9, w0
	b.le	LBB0_24
; %bb.22:
	ldr	x0, [x20, #40]
Lloh10:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x2, l_.str.2@PAGE
Lloh14:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_23:
Lloh15:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x9]
	stp	x14, x8, [sp]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_24:
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.25:
	mov	x19, #0
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #40
	bl	_bytestream2_get_byteu
	lsl	w28, w0, #18
	add	x0, sp, #40
	bl	_bytestream2_get_byteu
	mov	x21, x0
	add	x0, sp, #40
	bl	_bytestream2_get_byteu
	bfi	w28, w21, #10, #6
	bfi	w28, w0, #2, #6
	lsr	w8, w28, #6
	and	w8, w8, #0x3030303
	orr	w8, w28, w8
	orr	w8, w8, #0xff000000
	str	w8, [x27, x19, lsl #2]
	add	x19, x19, #1
	ldrsw	x8, [x22]
	cmp	x19, x8
	b.lt	LBB0_26
LBB0_27:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_67
; %bb.28:
	add	x0, sp, #40
	bl	_bytestream2_get_bytes_left
	ldr	x28, [sp, #32]                  ; 8-byte Folded Reload
	cbz	w0, LBB0_7
; %bb.29:
	add	x0, sp, #40
	bl	_bytestream2_get_byteu
	mov	x22, x0
	tbz	w0, #7, LBB0_33
; %bb.30:
	ldr	w8, [x20, #48]
	cbz	w8, LBB0_51
; %bb.31:
	ldr	w21, [sp, #40]
	add	x0, sp, #40
	bl	_bytestream2_get_bytes_left
	mov	x1, x0
	ldr	x2, [x20, #24]
	ldr	w3, [x20, #48]
	mov	x0, x21
	bl	_lz_unpack
	mov	x2, x0
	tbnz	w0, #31, LBB0_8
; %bb.32:
	and	w22, w22, #0x7f
	ldr	x1, [x20, #24]
	add	x0, sp, #40
	bl	_bytestream2_init
LBB0_33:
	ldp	x8, x9, [x28]
	ldr	x8, [x8]
	ldrb	w9, [x9]
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
                                        ; kill: def $w27 killed $w27 killed $x27 def $x27
	sxtw	x10, w27
	sxtw	x11, w24
	madd	x9, x10, x9, x11
	add	x21, x8, x9
	ldr	x8, [x20, #32]
	ldp	x9, x8, [x8]
	ldr	x9, [x9]
	ldrsw	x8, [x8]
	madd	x8, x8, x10, x11
	add	x27, x9, x8
	and	w8, w22, #0xff
	cmp	w8, #1
	b.eq	LBB0_52
; %bb.34:
	cmp	w8, #2
	b.eq	LBB0_64
; %bb.35:
	cmp	w8, #3
	b.ne	LBB0_67
; %bb.36:
	tbnz	w23, #31, LBB0_67
; %bb.37:
	add	w8, w23, #1
	stp	w8, wzr, [sp, #20]              ; 8-byte Folded Spill
LBB0_38:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_41 Depth 2
	mov	w28, #0
	b	LBB0_41
LBB0_39:                                ;   in Loop: Header=BB0_41 Depth=2
	add	x0, sp, #40
	bl	_bytestream2_get_byte
	ldr	w23, [sp, #40]
	add	x24, x21, w28, sxtw
	add	x0, sp, #40
	bl	_bytestream2_get_bytes_left
	mov	x3, x0
	sub	w4, w25, w28
	mov	x0, x23
	mov	x1, x24
	mov	x2, x22
	bl	_rle_unpack
	mov	x1, x0
	add	w28, w28, w22
	add	x0, sp, #40
	bl	_bytestream2_skip
LBB0_40:                                ;   in Loop: Header=BB0_41 Depth=2
	cmp	w28, w26
	b.gt	LBB0_49
LBB0_41:                                ;   Parent Loop BB0_38 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #40
	bl	_bytestream2_get_byte
	tbnz	w0, #7, LBB0_45
; %bb.42:                               ;   in Loop: Header=BB0_41 Depth=2
	add	w8, w28, w0
	cmp	w8, w26
	b.gt	LBB0_7
; %bb.43:                               ;   in Loop: Header=BB0_41 Depth=2
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.44:                               ;   in Loop: Header=BB0_41 Depth=2
	sxtw	x9, w28
	add	x8, x21, x9
	add	x1, x27, x9
	add	w19, w0, #1
	and	w2, w19, #0xff
	mov	x0, x8
	bl	_memcpy
	add	w28, w19, w28
	b	LBB0_40
LBB0_45:                                ;   in Loop: Header=BB0_41 Depth=2
	and	w19, w0, #0x7f
	add	w22, w19, #1
	add	x0, sp, #40
	bl	_bytestream2_peek_byte
	cmp	w0, #255
	b.eq	LBB0_39
; %bb.46:                               ;   in Loop: Header=BB0_41 Depth=2
	add	w23, w28, w22
	cmp	w23, w25
	b.gt	LBB0_7
; %bb.47:                               ;   in Loop: Header=BB0_41 Depth=2
	add	x0, sp, #40
	bl	_bytestream2_get_bytes_left
	cmp	w0, w19
	b.ls	LBB0_7
; %bb.48:                               ;   in Loop: Header=BB0_41 Depth=2
	add	x1, x21, w28, sxtw
	add	x0, sp, #40
	mov	x2, x22
	bl	_bytestream2_get_buffer
	mov	x28, x23
	b	LBB0_40
LBB0_49:                                ;   in Loop: Header=BB0_38 Depth=1
	cmp	w28, w25
	b.gt	LBB0_68
; %bb.50:                               ;   in Loop: Header=BB0_38 Depth=1
	mov	w2, #0
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	x8, [x8, #8]
	ldrb	w8, [x8]
	add	x21, x21, x8
	ldr	x8, [x20, #32]
	ldr	x8, [x8, #8]
	ldrsw	x8, [x8]
	add	x27, x27, x8
	ldp	w9, w8, [sp, #20]               ; 8-byte Folded Reload
	add	w8, w8, #1
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
	cmp	w8, w9
	b.ne	LBB0_38
	b	LBB0_8
LBB0_51:
	ldr	x0, [x20, #40]
Lloh20:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str.3@PAGE
Lloh24:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_52:
	tbnz	w23, #31, LBB0_67
; %bb.53:
	mov	w24, #0
	add	w8, w23, #1
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
LBB0_54:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_55 Depth 2
	mov	w28, #0
LBB0_55:                                ;   Parent Loop BB0_54 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #40
	bl	_bytestream2_get_byte
	tbnz	w0, #7, LBB0_59
; %bb.56:                               ;   in Loop: Header=BB0_55 Depth=2
	add	w8, w28, w0
	cmp	w8, w26
	b.gt	LBB0_7
; %bb.57:                               ;   in Loop: Header=BB0_55 Depth=2
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.58:                               ;   in Loop: Header=BB0_55 Depth=2
	sxtw	x9, w28
	add	x8, x21, x9
	add	x1, x27, x9
	add	w19, w0, #1
	and	w2, w19, #0xff
	mov	x0, x8
	bl	_memcpy
	add	w28, w19, w28
	cmp	w28, w26
	b.le	LBB0_55
	b	LBB0_62
LBB0_59:                                ;   in Loop: Header=BB0_55 Depth=2
	and	w23, w0, #0x7f
	add	w22, w23, #1
	add	w19, w28, w22
	cmp	w19, w25
	b.gt	LBB0_7
; %bb.60:                               ;   in Loop: Header=BB0_55 Depth=2
	add	x0, sp, #40
	bl	_bytestream2_get_bytes_left
	cmp	w0, w23
	b.ls	LBB0_7
; %bb.61:                               ;   in Loop: Header=BB0_55 Depth=2
	add	x1, x21, w28, sxtw
	add	x0, sp, #40
	mov	x2, x22
	bl	_bytestream2_get_bufferu
	mov	x28, x19
	cmp	w28, w26
	b.le	LBB0_55
LBB0_62:                                ;   in Loop: Header=BB0_54 Depth=1
	cmp	w28, w25
	b.gt	LBB0_68
; %bb.63:                               ;   in Loop: Header=BB0_54 Depth=1
	mov	w2, #0
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	x8, [x8, #8]
	ldrb	w8, [x8]
	add	x21, x21, x8
	ldr	x8, [x20, #32]
	ldr	x8, [x8, #8]
	ldrsw	x8, [x8]
	add	x27, x27, x8
	add	w24, w24, #1
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	cmp	w24, w8
	b.ne	LBB0_54
	b	LBB0_8
LBB0_64:
	tbnz	w23, #31, LBB0_67
; %bb.65:
	add	w19, w23, #1
LBB0_66:                                ; =>This Inner Loop Header: Depth=1
	and	w2, w25, #0xff
	add	x0, sp, #40
	mov	x1, x21
	bl	_bytestream2_get_buffer
	mov	w2, #0
	ldr	x8, [x28, #8]
	ldrb	w8, [x8]
	add	x21, x21, x8
	subs	w19, w19, #1
	b.ne	LBB0_66
	b	LBB0_8
LBB0_67:
	mov	w2, #0
	b	LBB0_8
LBB0_68:
	ldr	x0, [x20, #40]
Lloh25:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
                                        ; kill: def $w28 killed $w28 killed $x28 def $x28
	stp	x28, x25, [sp]
Lloh28:
	adrp	x2, l_.str.4@PAGE
Lloh29:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid horizontal range %d-%d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Invalid vertical range %d-%d\n"

	.comm	_PALETTE_COUNT,4,2              ; @PALETTE_COUNT
l_.str.2:                               ; @.str.2
	.asciz	"Incomplete palette\n"

l_.str.3:                               ; @.str.3
	.asciz	"Trying to unpack LZ-compressed frame with no LZ buffer\n"

l_.str.4:                               ; @.str.4
	.asciz	"offset > width (%d > %d)\n"

	.no_dead_strip	_vmd_decode
.subsections_via_symbols
