	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_frame
_decode_frame:                          ## @decode_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	16(%rdi), %r14
	leaq	16(%r14), %r12
	movl	(%rcx), %edx
	movl	4(%rcx), %esi
	movq	%r12, %rdi
	callq	_bytestream2_init
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rcx
	cmpl	$11, %eax
	jl	LBB0_74
## %bb.1:
	movq	%r12, %rdi
	callq	_bytestream2_get_le16u
	cmpl	$4660, %eax                     ## imm = 0x1234
	jne	LBB0_10
## %bb.2:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_bytestream2_get_le16u
	movl	%eax, (%r14)
	movq	%r12, %rdi
	callq	_bytestream2_get_le16u
	movl	%eax, 4(%r14)
	movq	%r12, %rdi
	movl	$4, %esi
	callq	_bytestream2_skip
	movq	%r12, %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %ebx
	andl	$15, %eax
	sarl	$4, %ebx
	incl	%ebx
	movl	%ebx, 8(%r14)
	cmpl	$8, %eax
	ja	LBB0_11
## %bb.3:
	imull	%eax, %ebx
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.4:
	cmpl	$33, %ebx
	jge	LBB0_11
## %bb.5:
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%r15, -120(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	callq	_bytestream2_peek_byte
	cmpl	$255, %eax
	je	LBB0_12
## %bb.6:
	cmpl	$1, %ebx
	je	LBB0_12
## %bb.7:
	cmpl	$4, %ebx
	je	LBB0_12
## %bb.8:
	cmpl	$8, %ebx
	je	LBB0_12
## %bb.9:
	movl	$0, -84(%rbp)                   ## 4-byte Folded Spill
	movl	$-1, -48(%rbp)                  ## 4-byte Folded Spill
	jmp	LBB0_15
LBB0_11:
	leaq	L_.str(%rip), %rsi
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_avpriv_request_sample
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rcx
	jmp	LBB0_74
LBB0_12:
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_bytestream2_skip
	movq	%r12, %rdi
	callq	_bytestream2_get_le16
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_bytestream2_get_le16
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%r15d, %eax
	jge	LBB0_14
LBB0_10:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rcx
LBB0_74:
	movl	(%rcx), %eax
LBB0_75:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	%r15d, -84(%rbp)                ## 4-byte Spill
LBB0_15:
	movq	_AV_PIX_FMT_PAL8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movl	%eax, 8(%r15)
	movl	(%r14), %edi
	movl	4(%r14), %esi
	xorl	%edx, %edx
	movq	%r15, %rcx
	callq	_av_image_check_size
	testq	%rax, %rax
	js	LBB0_24
## %bb.16:
	movl	(%r14), %esi
	movl	4(%r14), %edx
	cmpl	(%r15), %esi
	jne	LBB0_18
## %bb.17:
	cmpl	4(%r15), %edx
	je	LBB0_19
LBB0_18:
	movq	%r15, %rdi
	callq	_ff_set_dimensions
	testl	%eax, %eax
	js	LBB0_75
LBB0_19:
	movq	%r15, %rdi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_75
## %bb.20:
	movq	(%r15), %rax
	movq	8(%r15), %rcx
	movq	(%rax), %rdi
	movl	(%rcx), %edx
	imull	4(%r14), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	movl	$1, 16(%r15)
	movq	%r12, %rdi
	callq	_bytestream2_tell
	movl	-84(%rbp), %edi                 ## 4-byte Reload
	addl	%edi, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rax
	movq	8(%rax), %r15
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	$1, %eax
	movq	%r13, -112(%rbp)                ## 8-byte Spill
	jne	LBB0_25
## %bb.21:
	cmpl	$2, %edi
	jl	LBB0_25
## %bb.22:
	movq	%r12, %rdi
	callq	_bytestream2_peek_byte
	cmpl	$5, %eax
	jg	LBB0_38
## %bb.23:
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	movq	_ff_cga_palette@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_cga_mode45_index@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cltq
	movq	(%rdx,%rax,8), %rax
	movq	(%rax), %rdx
	movl	(%rcx,%rdx,4), %edx
	movl	%edx, (%r15)
	movq	8(%rax), %rdx
	movl	(%rcx,%rdx,4), %edx
	movl	%edx, 4(%r15)
	movq	16(%rax), %rdx
	movl	(%rcx,%rdx,4), %edx
	movl	%edx, 8(%r15)
	movq	24(%rax), %rax
	movl	(%rcx,%rax,4), %eax
	jmp	LBB0_42
LBB0_24:
	movl	$-1, %eax
	jmp	LBB0_75
LBB0_25:
	cmpl	$3, %eax
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_30
## %bb.26:
	cmpl	$2, %eax
	jne	LBB0_33
## %bb.27:
	movl	$16, %esi
	callq	_FFMIN
	testl	%eax, %eax
	jle	LBB0_44
## %bb.28:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %r13d
	xorl	%ebx, %ebx
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	movq	_ff_cga_palette@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	movl	%eax, %edi
	movl	$15, %esi
	callq	_FFMIN
	cltq
	movl	(%r15,%rax,4), %eax
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_29
	jmp	LBB0_37
LBB0_30:
	movl	$16, %esi
	callq	_FFMIN
	testl	%eax, %eax
	jle	LBB0_44
## %bb.31:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %r13d
	xorl	%ebx, %ebx
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	movq	_ff_ega_palette@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	movl	%eax, %edi
	movl	$63, %esi
	callq	_FFMIN
	cltq
	movl	(%r15,%rax,4), %eax
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_32
	jmp	LBB0_37
LBB0_33:
	andl	$-2, %eax
	cmpl	$4, %eax
	jne	LBB0_38
## %bb.34:
	movslq	%edi, %rax
	imulq	$1431655766, %rax, %rdi         ## imm = 0x55555556
	movq	%rdi, %rax
	shrq	$63, %rax
	shrq	$32, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_FFMIN
	testl	%eax, %eax
	jle	LBB0_44
## %bb.35:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %r13d
	xorl	%ebx, %ebx
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_be24
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %ecx
	shrl	$4, %eax
	andl	$197379, %eax                   ## imm = 0x30303
	orl	%ecx, %eax
	orl	$-16777216, %eax                ## imm = 0xFF000000
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_36
LBB0_37:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_45
LBB0_38:
	cmpl	$1, %ebx
	jne	LBB0_40
## %bb.39:
	movq	$-16777216, (%r15)              ## imm = 0xFF000000
	movl	$2, %eax
	jmp	LBB0_44
LBB0_40:
	movq	_ff_cga_palette@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpl	$2, %ebx
	jne	LBB0_43
## %bb.41:
	movq	_cga_mode45_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	movl	(%rsi,%rcx,4), %ecx
	movl	%ecx, (%r15)
	movq	8(%rax), %rcx
	movl	(%rsi,%rcx,4), %ecx
	movl	%ecx, 4(%r15)
	movq	16(%rax), %rcx
	movl	(%rsi,%rcx,4), %ecx
	movl	%ecx, 8(%r15)
	movq	24(%rax), %rax
	movl	(%rsi,%rax,4), %eax
LBB0_42:
	movl	%eax, 12(%r15)
	movl	$4, %eax
	jmp	LBB0_44
LBB0_43:
	movq	%r15, %rdi
	movl	$64, %edx
	callq	_memcpy
	movl	$16, %eax
LBB0_44:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_45:
	cltq
	leaq	(%r15,%rax,4), %rdi
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	shll	$2, %eax
	subl	%eax, %edx
	movl	$0, -72(%rbp)                   ## 4-byte Folded Spill
	xorl	%esi, %esi
	callq	_memset
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_bytestream2_seek
	movl	4(%r14), %r13d
	leal	-1(%r13), %eax
	movl	%eax, -52(%rbp)
	movq	%r12, %rdi
	callq	_bytestream2_get_le16
	testl	%eax, %eax
	je	LBB0_62
## %bb.46:
	movl	$0, -60(%rbp)
	movl	$0, -56(%rbp)
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	movl	$0, %r15d
	cmpl	$6, %eax
	jl	LBB0_67
## %bb.47:
	xorl	%r15d, %r15d
	jmp	LBB0_49
LBB0_48:                                ##   in Loop: Header=BB0_49 Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$5, %eax
	jle	LBB0_66
LBB0_49:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_53 Depth 2
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_bytestream2_get_le16
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_FFMIN
	movl	%eax, %r13d
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_bytestream2_skip
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	movl	-56(%rbp), %ecx
	cmpl	8(%r14), %ecx
	jge	LBB0_48
## %bb.50:                              ##   in Loop: Header=BB0_49 Depth=1
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	subl	%r13d, %ebx
	jmp	LBB0_53
LBB0_51:                                ##   in Loop: Header=BB0_53 Depth=2
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movl	%r13d, %ecx
	leaq	-60(%rbp), %r8
	leaq	-52(%rbp), %r9
	pushq	%rax
	leaq	-56(%rbp), %rax
	pushq	%rax
	callq	_picmemset
	addq	$16, %rsp
LBB0_52:                                ##   in Loop: Header=BB0_53 Depth=2
	movl	-56(%rbp), %eax
	cmpl	8(%r14), %eax
	jge	LBB0_48
LBB0_53:                                ##   Parent Loop BB0_49 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%ebx, %eax
	jle	LBB0_48
## %bb.54:                              ##   in Loop: Header=BB0_53 Depth=2
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	cmpl	-72(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_58
## %bb.55:                              ##   in Loop: Header=BB0_53 Depth=2
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_57
## %bb.56:                              ##   in Loop: Header=BB0_53 Depth=2
	movq	%r12, %rdi
	callq	_bytestream2_get_le16
	movl	%eax, %r13d
LBB0_57:                                ##   in Loop: Header=BB0_53 Depth=2
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %r15d
	jmp	LBB0_59
LBB0_58:                                ##   in Loop: Header=BB0_53 Depth=2
	movl	%eax, %r15d
	movl	$1, %r13d
LBB0_59:                                ##   in Loop: Header=BB0_53 Depth=2
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	testl	%eax, %eax
	je	LBB0_48
## %bb.60:                              ##   in Loop: Header=BB0_53 Depth=2
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, %rdi
	cmpl	$8, %eax
	jne	LBB0_51
## %bb.61:                              ##   in Loop: Header=BB0_53 Depth=2
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movl	%r13d, %ecx
	leaq	-60(%rbp), %r8
	leaq	-52(%rbp), %r9
	callq	_picmemset_8bpp
	cmpl	$0, -52(%rbp)
	jns	LBB0_52
	jmp	LBB0_73
LBB0_62:
	testl	%r13d, %r13d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_73
## %bb.63:
	movq	-104(%rbp), %r14                ## 8-byte Reload
LBB0_64:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	testl	%eax, %eax
	jle	LBB0_73
## %bb.65:                              ##   in Loop: Header=BB0_64 Depth=1
	leal	-1(%r13), %eax
	movq	(%rbx), %rcx
	movq	8(%rbx), %rdx
	movslq	(%rdx), %rdx
	movslq	%eax, %rbx
	imulq	%rdx, %rbx
	shlq	$2, %rbx
	addq	(%rcx), %rbx
	movq	(%r12), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	(%r14), %r15d
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_FFMIN
	movq	%rbx, %rdi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_memcpy
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_bytestream2_skip
	leal	-2(%r13), %eax
	movl	%eax, -52(%rbp)
	decl	%r13d
	jg	LBB0_64
	jmp	LBB0_73
LBB0_66:
	movl	-56(%rbp), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
LBB0_67:
	movl	8(%r14), %eax
	movl	%eax, %ecx
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	subl	%edx, %ecx
	cmpl	$1, %ecx
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rcx
	jg	LBB0_74
## %bb.68:
	cmpl	%edx, %eax
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	jle	LBB0_73
## %bb.69:
	movl	-60(%rbp), %eax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	jge	LBB0_73
## %bb.70:
	movl	-52(%rbp), %ecx
	incl	%ecx
	imull	%edx, %ecx
	subl	%eax, %ecx
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	cmpl	$8, %ebx
	jne	LBB0_72
## %bb.71:
	leaq	-60(%rbp), %r8
	leaq	-52(%rbp), %r9
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_picmemset_8bpp
	jmp	LBB0_73
LBB0_72:
	movl	$8, %eax
	xorl	%edx, %edx
	divl	%ebx
	movl	%eax, %edi
	movl	%ecx, %eax
	cltd
	idivl	%edi
	leaq	-56(%rbp), %r10
	leaq	-60(%rbp), %r8
	leaq	-52(%rbp), %r9
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	pushq	%rbx
	pushq	%r10
	callq	_picmemset
	addq	$16, %rsp
LBB0_73:
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movl	$1, (%rax)
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	jmp	LBB0_74
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported bit depth"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
	.comm	_AV_PIX_FMT_PAL8,4,2            ## @AV_PIX_FMT_PAL8
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_ff_cga_palette,8,3             ## @ff_cga_palette
	.comm	_cga_mode45_index,8,3           ## @cga_mode45_index
	.comm	_ff_ega_palette,8,3             ## @ff_ega_palette
	.comm	_AVPALETTE_SIZE,4,2             ## @AVPALETTE_SIZE
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_frame
_decode_frame:                          ; @decode_frame
	.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, x3
	mov	x27, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x24, [x0, #16]
	add	x23, x24, #16
	ldp	w2, w1, [x3]
	mov	x0, x23
	bl	_bytestream2_init
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w0, #11
	b.lt	LBB0_9
; %bb.1:
	mov	x0, x23
	bl	_bytestream2_get_le16u
	mov	w8, #4660
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.2:
	mov	x0, x23
	bl	_bytestream2_get_le16u
	str	w0, [x24]
	mov	x0, x23
	bl	_bytestream2_get_le16u
	str	w0, [x24, #4]
	mov	x0, x23
	mov	w1, #4
	bl	_bytestream2_skip
	mov	x0, x23
	bl	_bytestream2_get_byteu
	and	w25, w0, #0xf
	asr	w8, w0, #4
	add	w8, w8, #1
	str	w8, [x24, #8]
	mul	w20, w8, w25
	cmp	w25, #8
	ccmp	w20, #1, #8, ls
	b.lt	LBB0_7
; %bb.3:
	cmp	w20, #33
	b.ge	LBB0_7
; %bb.4:
	mov	x0, x23
	bl	_bytestream2_peek_byte
	cmp	w0, #255
	b.eq	LBB0_8
; %bb.5:
	cmp	w20, #1
	ccmp	w20, #4, #4, ne
	ccmp	w20, #8, #4, ne
	b.eq	LBB0_8
; %bb.6:
	mov	w28, #0
	mov	w26, #-1
	b	LBB0_12
LBB0_7:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_avpriv_request_sample
Lloh2:
	adrp	x19, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh3:
	ldr	x19, [x19, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	mov	x0, x23
	mov	w1, #2
	bl	_bytestream2_skip
	mov	x0, x23
	bl	_bytestream2_get_le16
	mov	x26, x0
	mov	x0, x23
	bl	_bytestream2_get_le16
	mov	x28, x0
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w0, w28
	b.ge	LBB0_12
LBB0_9:
Lloh4:
	adrp	x19, _AVERROR_INVALIDDATA@GOTPAGE
Lloh5:
	ldr	x19, [x19, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x19]
LBB0_11:
	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_12:
Lloh6:
	adrp	x8, _AV_PIX_FMT_PAL8@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_PIX_FMT_PAL8@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x22, #8]
	ldp	w0, w1, [x24]
	mov	w2, #0
	mov	x3, x22
	bl	_av_image_check_size
	tbnz	x0, #63, LBB0_21
; %bb.13:
	ldr	w8, [x22]
	ldp	w1, w2, [x24]
	cmp	w1, w8
	b.ne	LBB0_15
; %bb.14:
	ldr	w8, [x22, #4]
	cmp	w2, w8
	b.eq	LBB0_16
LBB0_15:
	mov	x0, x22
	bl	_ff_set_dimensions
	tbnz	w0, #31, LBB0_11
LBB0_16:
	mov	x0, x22
	mov	x1, x21
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_11
; %bb.17:
	ldp	x8, x9, [x21]
	ldr	x0, [x8]
	ldr	w8, [x24, #4]
	ldr	w9, [x9]
	mul	w2, w9, w8
	mov	w1, #0
	bl	_memset
Lloh9:
	adrp	x8, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w9, w8, [x21, #16]
	mov	x0, x23
	bl	_bytestream2_tell
	add	w8, w0, w28
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	cmp	w26, #1
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
	b.ne	LBB0_22
; %bb.18:
	cmp	w28, #2
	b.lt	LBB0_22
; %bb.19:
	mov	x0, x23
	bl	_bytestream2_peek_byte
	cmp	w0, #5
	b.gt	LBB0_35
; %bb.20:
	mov	x0, x23
	bl	_bytestream2_get_byte
Lloh12:
	adrp	x8, _ff_cga_palette@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ff_cga_palette@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _cga_mode45_index@GOTPAGE
Lloh16:
	ldr	x9, [x9, _cga_mode45_index@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	ldr	x9, [x9, w0, sxtw #3]
	ldp	x10, x11, [x9]
	ldr	w10, [x8, x10, lsl #2]
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	str	w10, [x27]
	ldr	w10, [x8, x11, lsl #2]
	str	w10, [x27, #4]
	ldp	x10, x9, [x9, #16]
	ldr	w10, [x8, x10, lsl #2]
	str	w10, [x27, #8]
	ldr	w8, [x8, x9, lsl #2]
	b	LBB0_39
LBB0_21:
	mov	w0, #-1
	b	LBB0_11
LBB0_22:
	cmp	w26, #3
	b.eq	LBB0_27
; %bb.23:
	cmp	w26, #2
	b.ne	LBB0_31
; %bb.24:
	mov	x0, x28
	mov	w1, #16
	bl	_FFMIN
	mov	x28, x0
	cmp	w0, #1
	b.lt	LBB0_40
; %bb.25:
	str	w28, [sp, #4]                   ; 4-byte Folded Spill
	mov	w20, w28
Lloh18:
	adrp	x26, _ff_cga_palette@GOTPAGE
Lloh19:
	ldr	x26, [x26, _ff_cga_palette@GOTPAGEOFF]
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_bytestream2_get_byte
	ldr	x28, [x26]
	mov	w1, #15
	bl	_FFMIN
	ldr	w8, [x28, w0, sxtw #2]
	str	w8, [x27], #4
	subs	x20, x20, #1
	b.ne	LBB0_26
	b	LBB0_30
LBB0_27:
	mov	x0, x28
	mov	w1, #16
	bl	_FFMIN
	mov	x28, x0
	cmp	w0, #1
	b.lt	LBB0_40
; %bb.28:
	str	w28, [sp, #4]                   ; 4-byte Folded Spill
	mov	w20, w28
Lloh20:
	adrp	x26, _ff_ega_palette@GOTPAGE
Lloh21:
	ldr	x26, [x26, _ff_ega_palette@GOTPAGEOFF]
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_bytestream2_get_byte
	ldr	x28, [x26]
	mov	w1, #63
	bl	_FFMIN
	ldr	w8, [x28, w0, sxtw #2]
	str	w8, [x27], #4
	subs	x20, x20, #1
	b.ne	LBB0_29
LBB0_30:
	ldr	w20, [sp, #20]                  ; 4-byte Folded Reload
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	ldr	w28, [sp, #4]                   ; 4-byte Folded Reload
	b	LBB0_43
LBB0_31:
	and	w8, w26, #0xfffffffe
	cmp	w8, #4
	b.ne	LBB0_35
; %bb.32:
	mov	w8, #21846
	movk	w8, #21845, lsl #16
	smull	x8, w28, w8
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w0, w8, w9
	mov	w1, #256
	bl	_FFMIN
	mov	x28, x0
	cmp	w0, #1
	b.lt	LBB0_40
; %bb.33:
	mov	w20, w28
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	mov	x26, x27
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_bytestream2_get_be24
	lsr	w8, w0, #4
	and	w8, w8, #0x3030303
	orr	w8, w8, w0, lsl #2
	orr	w8, w8, #0xff000000
	str	w8, [x26], #4
	subs	x20, x20, #1
	b.ne	LBB0_34
	b	LBB0_42
LBB0_35:
	cmp	w20, #1
	b.ne	LBB0_37
; %bb.36:
	movi	d0, #0xffffffffff000000
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	str	d0, [x27]
	mov	w28, #2
	b	LBB0_42
LBB0_37:
Lloh22:
	adrp	x8, _ff_cga_palette@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ff_cga_palette@GOTPAGEOFF]
Lloh24:
	ldr	x1, [x8]
	cmp	w20, #2
	b.ne	LBB0_41
; %bb.38:
Lloh25:
	adrp	x8, _cga_mode45_index@GOTPAGE
Lloh26:
	ldr	x8, [x8, _cga_mode45_index@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldp	x9, x10, [x8]
	ldr	w9, [x1, x9, lsl #2]
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	str	w9, [x27]
	ldr	w9, [x1, x10, lsl #2]
	str	w9, [x27, #4]
	ldp	x9, x8, [x8, #16]
	ldr	w9, [x1, x9, lsl #2]
	str	w9, [x27, #8]
	ldr	w8, [x1, x8, lsl #2]
LBB0_39:
	str	w8, [x27, #12]
	mov	w28, #4
	b	LBB0_42
LBB0_40:
	ldr	w20, [sp, #20]                  ; 4-byte Folded Reload
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	b	LBB0_43
LBB0_41:
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	mov	x0, x27
	mov	w2, #64
	bl	_memcpy
	mov	w28, #16
LBB0_42:
	ldr	w20, [sp, #20]                  ; 4-byte Folded Reload
LBB0_43:
	add	x0, x27, w28, sxtw #2
Lloh28:
	adrp	x8, _AVPALETTE_SIZE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AVPALETTE_SIZE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	sub	w2, w8, w28, lsl #2
	mov	w1, #0
	bl	_memset
Lloh31:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x20
	bl	_bytestream2_seek
	ldr	w26, [x24, #4]
	sub	w8, w26, #1
	str	w8, [sp, #40]
	mov	x0, x23
	bl	_bytestream2_get_le16
	cbz	w0, LBB0_60
; %bb.44:
	str	wzr, [sp, #44]
	str	wzr, [sp, #36]
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	mov	w8, #0
	mov	w26, #0
	cmp	w0, #6
	b.lt	LBB0_64
; %bb.45:
	mov	w26, #0
	b	LBB0_47
LBB0_46:                                ;   in Loop: Header=BB0_47 Depth=1
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w0, #5
	b.le	LBB0_63
LBB0_47:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_51 Depth 2
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	mov	x28, x0
	mov	x0, x23
	bl	_bytestream2_get_le16
	mov	x1, x0
	mov	x0, x28
	bl	_FFMIN
	mov	x20, x0
	mov	x0, x23
	mov	w1, #2
	bl	_bytestream2_skip
	mov	x0, x23
	bl	_bytestream2_get_byte
	ldr	w8, [sp, #36]
	ldr	w9, [x24, #8]
	cmp	w8, w9
	b.ge	LBB0_46
; %bb.48:                               ;   in Loop: Header=BB0_47 Depth=1
	mov	x27, x0
	sub	w20, w28, w20
	b	LBB0_51
LBB0_49:                                ;   in Loop: Header=BB0_51 Depth=2
	add	x6, sp, #36
	mov	x0, x24
	mov	x1, x21
	mov	x2, x26
	mov	x3, x28
	mov	x7, x25
	bl	_picmemset
LBB0_50:                                ;   in Loop: Header=BB0_51 Depth=2
	ldr	w8, [sp, #36]
	ldr	w9, [x24, #8]
	cmp	w8, w9
	b.ge	LBB0_46
LBB0_51:                                ;   Parent Loop BB0_47 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w0, w20
	b.le	LBB0_46
; %bb.52:                               ;   in Loop: Header=BB0_51 Depth=2
	mov	x0, x23
	bl	_bytestream2_get_byte
	cmp	w0, w27
	b.ne	LBB0_56
; %bb.53:                               ;   in Loop: Header=BB0_51 Depth=2
	mov	x0, x23
	bl	_bytestream2_get_byte
	mov	x28, x0
	cbnz	w0, LBB0_55
; %bb.54:                               ;   in Loop: Header=BB0_51 Depth=2
	mov	x0, x23
	bl	_bytestream2_get_le16
	mov	x28, x0
LBB0_55:                                ;   in Loop: Header=BB0_51 Depth=2
	mov	x0, x23
	bl	_bytestream2_get_byte
	mov	x26, x0
	b	LBB0_57
LBB0_56:                                ;   in Loop: Header=BB0_51 Depth=2
	mov	x26, x0
	mov	w28, #1
LBB0_57:                                ;   in Loop: Header=BB0_51 Depth=2
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cbz	w0, LBB0_46
; %bb.58:                               ;   in Loop: Header=BB0_51 Depth=2
	add	x4, sp, #44
	add	x5, sp, #40
	cmp	w25, #8
	b.ne	LBB0_49
; %bb.59:                               ;   in Loop: Header=BB0_51 Depth=2
	mov	x0, x24
	mov	x1, x21
	mov	x2, x26
	mov	x3, x28
	bl	_picmemset_8bpp
	ldr	w8, [sp, #40]
	tbz	w8, #31, LBB0_50
	b	LBB0_70
LBB0_60:
	cmp	w26, #1
	b.lt	LBB0_70
LBB0_61:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w0, #1
	b.lt	LBB0_70
; %bb.62:                               ;   in Loop: Header=BB0_61 Depth=1
	sub	w27, w26, #1
	ldp	x8, x9, [x21]
	ldr	x8, [x8]
	ldr	w9, [x9]
	mul	w9, w9, w27
	add	x20, x8, w9, sxtw #2
	ldr	x24, [x23]
	ldr	w25, [x22]
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	mov	x1, x0
	mov	x0, x25
	bl	_FFMIN
	mov	x2, x0
	mov	x0, x20
	mov	x1, x24
	bl	_memcpy
	ldr	w1, [x22]
	mov	x0, x23
	bl	_bytestream2_skip
	sub	w8, w26, #2
	str	w8, [sp, #40]
	mov	x26, x27
	cmp	w27, #0
	b.gt	LBB0_61
	b	LBB0_70
LBB0_63:
	ldr	w8, [sp, #36]
LBB0_64:
	ldr	w9, [x24, #8]
	sub	w10, w9, w8
	cmp	w10, #1
	b.gt	LBB0_9
; %bb.65:
	cmp	w9, w8
	b.le	LBB0_70
; %bb.66:
	ldr	w8, [sp, #44]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ge	LBB0_70
; %bb.67:
	ldr	w10, [sp, #40]
	madd	w9, w9, w10, w9
	sub	w3, w9, w8
	cmp	w25, #8
	b.ne	LBB0_69
; %bb.68:
	add	x4, sp, #44
	add	x5, sp, #40
	mov	x0, x24
	mov	x1, x21
	mov	x2, x26
	bl	_picmemset_8bpp
	b	LBB0_70
LBB0_69:
	mov	w8, #8
	udiv	w8, w8, w25
	sdiv	w3, w3, w8
	add	x4, sp, #44
	add	x5, sp, #40
	add	x6, sp, #36
	mov	x0, x24
	mov	x1, x21
	mov	x2, x26
	mov	x7, x25
	bl	_picmemset
LBB0_70:
	mov	w8, #1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported bit depth"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
	.comm	_AV_PIX_FMT_PAL8,4,2            ; @AV_PIX_FMT_PAL8
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_ff_cga_palette,8,3             ; @ff_cga_palette
	.comm	_cga_mode45_index,8,3           ; @cga_mode45_index
	.comm	_ff_ega_palette,8,3             ; @ff_ega_palette
	.comm	_AVPALETTE_SIZE,4,2             ; @AVPALETTE_SIZE
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_decode_frame
.subsections_via_symbols
