	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mss4_decode_frame
_mss4_decode_frame:                     ## @mss4_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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rax
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -48(%rbp)
	movl	(%rax), %ebx
	movq	_HEADER_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_2
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %r8d
	jmp	LBB0_7
LBB0_2:
	movq	%rsi, -144(%rbp)                ## 8-byte Spill
	movq	%rdx, -136(%rbp)                ## 8-byte Spill
	movq	8(%rax), %rsi
	movq	8(%r14), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	-124(%rbp), %r13
	movq	%r13, %rdi
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	movl	%ebx, %edx
	callq	_bytestream2_init
	movq	%r13, %rdi
	callq	_bytestream2_get_be16
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_bytestream2_get_be16
	movl	%eax, %r12d
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_bytestream2_skip
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
	cmpl	(%r14), %r15d
	jg	LBB0_6
## %bb.3:
	cmpl	4(%r14), %r12d
	jne	LBB0_6
## %bb.4:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	leal	-101(%rcx), %edx
	cmpl	$-101, %edx
	ja	LBB0_11
## %bb.5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	jmp	LBB0_13
LBB0_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	movl	%r12d, %r8d
LBB0_7:
	xorl	%eax, %eax
	callq	_av_log
LBB0_8:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_51
## %bb.10:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	cmpl	$3, %eax
	jb	LBB0_14
## %bb.12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %ecx
LBB0_13:
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_8
LBB0_14:
	movq	_SKIP_FRAME@GOTPCREL(%rip), %rcx
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	cmpl	(%rcx), %eax
	je	LBB0_16
## %bb.15:
	leaq	-124(%rbp), %rdi
	callq	_bytestream2_get_bytes_left
	testl	%eax, %eax
	je	LBB0_42
LBB0_16:
	movl	%r15d, %edi
	movl	$16, %esi
	callq	_FFALIGN
	movl	%eax, %r13d
	movl	%eax, -120(%rbp)                ## 4-byte Spill
	sarl	$4, %r13d
	movl	%r12d, %edi
	movl	$16, %esi
	callq	_FFALIGN
	movl	%eax, %esi
	movl	%eax, %r15d
	sarl	$4, %r15d
	movl	-92(%rbp), %eax                 ## 4-byte Reload
	movq	_SKIP_FRAME@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_18
## %bb.17:
	leal	(,%rbx,8), %eax
	movq	_HEADER_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r15d, %edx
	imull	%r13d, %edx
	leal	(%rdx,%rcx,8), %ecx
	cmpl	%ecx, %eax
	jl	LBB0_8
LBB0_18:
	movl	%esi, -116(%rbp)                ## 4-byte Spill
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movq	8(%r12), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_ff_reget_buffer
	testl	%eax, %eax
	js	LBB0_21
## %bb.19:
	movq	_INTRA_FRAME@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	movl	-92(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rdx), %ecx
	sete	%al
	movq	8(%r12), %rsi
	movl	%eax, (%rsi)
	cmpl	(%rdx), %ecx
	jne	LBB0_22
## %bb.20:
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_22:
	movq	_AV_PICTURE_TYPE_P@GOTPCREL(%rip), %rax
LBB0_23:
	movl	(%rax), %eax
	movl	%eax, 24(%rsi)
	movq	_SKIP_FRAME@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_25
## %bb.24:
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movl	$1, (%rax)
	movq	-144(%rbp), %rdi                ## 8-byte Reload
	callq	_av_frame_ref
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	jmp	LBB0_9
LBB0_25:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	cmpl	%ecx, (%r12)
	je	LBB0_27
## %bb.26:
	movl	%ecx, (%r12)
	movq	24(%r12), %rax
	movl	(%rax), %edi
	movq	%rcx, %rsi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$1, %edx
	callq	_ff_mss34_gen_quant_mat
	movq	24(%r12), %rax
	movl	4(%rax), %edi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%edx, %edx
	callq	_ff_mss34_gen_quant_mat
LBB0_27:
	movq	_HEADER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	movl	%ebx, %edx
	subl	%eax, %edx
	leaq	-96(%rbp), %rdi
	callq	_init_get_bits8
	testl	%eax, %eax
	js	LBB0_21
## %bb.28:
	movq	8(%r12), %rax
	movq	16(%rax), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	8(%r12), %rax
	movq	16(%rax), %rax
	movq	16(%rax), %rax
	movq	%rax, -64(%rbp)
	movl	20(%r12), %edi
	movl	$0, -88(%rbp)                   ## 4-byte Folded Spill
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	cmpl	$16, -116(%rbp)                 ## 4-byte Folded Reload
	jl	LBB0_45
## %bb.29:
	cmpl	$2, %r13d
	movl	$1, %eax
	cmovll	%eax, %r13d
	cmpl	$2, %r15d
	cmovgel	%r15d, %eax
	movl	%eax, -112(%rbp)                ## 4-byte Spill
	jmp	LBB0_31
LBB0_30:                                ##   in Loop: Header=BB0_31 Depth=1
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movq	8(%r12), %rax
	movq	8(%rax), %rax
	movslq	(%rax), %rcx
	shlq	$6, %rcx
	addq	%rcx, -80(%rbp)
	movslq	4(%rax), %rax
	shlq	$6, %rax
	addq	%rax, -72(%rbp)
	movq	8(%r12), %rax
	movq	8(%rax), %rax
	movslq	8(%rax), %rax
	shlq	$6, %rax
	addq	%rax, -64(%rbp)
	movl	-88(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	cmpl	-112(%rbp), %eax                ## 4-byte Folded Reload
	je	LBB0_45
LBB0_31:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_36 Depth 2
	movl	16(%r12), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	cmpl	$16, -120(%rbp)                 ## 4-byte Folded Reload
	movq	_INTRA_FRAME@GOTPCREL(%rip), %r12
	jl	LBB0_30
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=1
	xorl	%r15d, %r15d
	jmp	LBB0_36
LBB0_33:                                ##   in Loop: Header=BB0_36 Depth=2
	movl	-92(%rbp), %eax                 ## 4-byte Reload
	cmpl	(%r12), %eax
	je	LBB0_48
LBB0_34:                                ##   in Loop: Header=BB0_36 Depth=2
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	%r15d, %esi
	callq	_mss4_update_dc_cache
LBB0_35:                                ##   in Loop: Header=BB0_36 Depth=2
	incl	%r15d
	cmpl	%r15d, %r13d
	je	LBB0_30
LBB0_36:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	-96(%rbp), %rdi
	callq	_decode012
	cmpl	$128, %eax
	je	LBB0_33
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=2
	cmpl	$129, %eax
	je	LBB0_40
## %bb.38:                              ##   in Loop: Header=BB0_36 Depth=2
	cmpl	$130, %eax
	jne	LBB0_34
## %bb.39:                              ##   in Loop: Header=BB0_36 Depth=2
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	leaq	-96(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	movl	%r15d, %ecx
	movl	-88(%rbp), %r8d                 ## 4-byte Reload
	callq	_mss4_decode_dct_block
	testl	%eax, %eax
	jns	LBB0_35
	jmp	LBB0_49
LBB0_40:                                ##   in Loop: Header=BB0_36 Depth=2
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	leaq	-96(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	movl	%r15d, %ecx
	movl	-88(%rbp), %r8d                 ## 4-byte Reload
	callq	_mss4_decode_image_block
	testl	%eax, %eax
	jns	LBB0_34
## %bb.41:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	jmp	LBB0_50
LBB0_42:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
LBB0_43:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_8
LBB0_45:
	movq	8(%r12), %rsi
	movq	-144(%rbp), %rdi                ## 8-byte Reload
	callq	_av_frame_ref
	testl	%eax, %eax
	js	LBB0_21
## %bb.46:
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_9
LBB0_21:
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_48:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdx
	jmp	LBB0_43
LBB0_49:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
LBB0_50:
	movq	%r14, %rdi
	movl	%r15d, %ecx
	movl	-88(%rbp), %r8d                 ## 4-byte Reload
	jmp	LBB0_7
LBB0_51:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HEADER_SIZE,4,2                ## @HEADER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Frame should have at least %d bytes, got %d instead\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Invalid frame dimensions %dx%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid quality setting %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid frame type %d\n"

	.comm	_SKIP_FRAME,4,2                 ## @SKIP_FRAME
L_.str.4:                               ## @.str.4
	.asciz	"Empty frame found but it is not a skip frame.\n"

	.comm	_INTRA_FRAME,4,2                ## @INTRA_FRAME
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_P,4,2          ## @AV_PICTURE_TYPE_P
L_.str.5:                               ## @.str.5
	.asciz	"Error decoding DCT block %d,%d\n"

L_.str.6:                               ## @.str.6
	.asciz	"Error decoding VQ block %d,%d\n"

L_.str.7:                               ## @.str.7
	.asciz	"Skip block in intra frame\n"

	.no_dead_strip	_mss4_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mss4_decode_frame
_mss4_decode_frame:                     ; @mss4_decode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #72]
	ldr	w19, [x3]
Lloh3:
	adrp	x23, _HEADER_SIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _HEADER_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w19, w8
	b.ge	LBB0_2
; %bb.1:
Lloh5:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x9]
	stp	x8, x19, [sp]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_7
LBB0_2:
	mov	x21, x2
	mov	x22, x1
	ldr	x26, [x3, #8]
	ldr	x24, [x20, #8]
	add	x0, sp, #40
	mov	x1, x26
	mov	x2, x19
	bl	_bytestream2_init
	add	x0, sp, #40
	bl	_bytestream2_get_be16
	mov	x25, x0
	add	x0, sp, #40
	bl	_bytestream2_get_be16
	mov	x28, x0
	add	x0, sp, #40
	mov	w1, #2
	bl	_bytestream2_skip
	add	x0, sp, #40
	bl	_bytestream2_get_byte
	mov	x27, x0
	add	x0, sp, #40
	bl	_bytestream2_get_byte
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x20]
	cmp	w25, w8
	b.gt	LBB0_6
; %bb.3:
	ldr	w8, [x20, #4]
	cmp	w28, w8
	b.ne	LBB0_6
; %bb.4:
	sub	w8, w27, #101
	cmn	w8, #101
	b.hi	LBB0_11
; %bb.5:
Lloh10:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	str	x27, [sp]
Lloh13:
	adrp	x2, l_.str.2@PAGE
Lloh14:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	stp	x25, x28, [sp]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x20
	bl	_av_log
LBB0_8:
Lloh20:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh22:
	ldr	w19, [x8]
LBB0_9:
	ldr	x8, [sp, #72]
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_43
; %bb.10:
	mov	x0, x19
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_11:
	cmp	w0, #3
	b.lo	LBB0_13
; %bb.12:
Lloh26:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh29:
	adrp	x2, l_.str.3@PAGE
Lloh30:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_13:
Lloh31:
	adrp	x8, _SKIP_FRAME@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SKIP_FRAME@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
	cmp	w0, w8
	b.eq	LBB0_15
; %bb.14:
	add	x0, sp, #40
	bl	_bytestream2_get_bytes_left
	cbz	w0, LBB0_37
LBB0_15:
	mov	x0, x25
	mov	w1, #16
	bl	_FFALIGN
	str	w0, [sp, #28]                   ; 4-byte Folded Spill
	asr	w25, w0, #4
	mov	x0, x28
	mov	w1, #16
	bl	_FFALIGN
	mov	x28, x0
	asr	w10, w0, #4
Lloh34:
	adrp	x8, _SKIP_FRAME@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SKIP_FRAME@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	cmp	w9, w8
	b.eq	LBB0_17
; %bb.16:
	ldr	w8, [x23]
	mul	w9, w10, w25
	add	w8, w9, w8, lsl #3
	cmp	w8, w19, lsl #3
	b.gt	LBB0_8
LBB0_17:
	stp	w10, w25, [sp, #20]             ; 8-byte Folded Spill
	mov	x25, x24
	ldr	x1, [x24, #8]
	mov	x0, x20
	mov	w2, #0
	bl	_ff_reget_buffer
	tbnz	w0, #31, LBB0_40
; %bb.18:
Lloh37:
	adrp	x9, _INTRA_FRAME@GOTPAGE
Lloh38:
	ldr	x9, [x9, _INTRA_FRAME@GOTPAGEOFF]
	ldr	w8, [x9]
	ldr	x11, [sp, #32]                  ; 8-byte Folded Reload
	cmp	w11, w8
	cset	w8, eq
	ldr	x1, [x25, #8]
	str	w8, [x1]
	ldr	w8, [x9]
Lloh39:
	adrp	x9, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh40:
	ldr	x9, [x9, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh41:
	adrp	x10, _AV_PICTURE_TYPE_P@GOTPAGE
Lloh42:
	ldr	x10, [x10, _AV_PICTURE_TYPE_P@GOTPAGEOFF]
	cmp	w11, w8
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x1, #24]
Lloh43:
	adrp	x8, _SKIP_FRAME@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SKIP_FRAME@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	cmp	w11, w8
	b.ne	LBB0_20
; %bb.19:
	mov	w8, #1
	str	w8, [x21]
	mov	x0, x22
	bl	_av_frame_ref
	cmp	w0, #0
	csel	w19, w0, w19, lt
	b	LBB0_9
LBB0_20:
	ldr	w8, [x25]
	cmp	w8, w27
	b.eq	LBB0_22
; %bb.21:
	mov	x25, x24
	str	w27, [x24]
	ldr	x8, [x24, #24]
	ldr	w0, [x8]
	mov	x1, x27
	mov	w2, #1
	bl	_ff_mss34_gen_quant_mat
	ldr	x8, [x24, #24]
	ldr	w0, [x8, #4]
	mov	x1, x27
	mov	w2, #0
	bl	_ff_mss34_gen_quant_mat
LBB0_22:
	ldrsw	x8, [x23]
	add	x1, x26, x8, lsl #2
	sub	w2, w19, w8
	add	x0, sp, #44
	bl	_init_get_bits8
	tbnz	w0, #31, LBB0_40
; %bb.23:
	ldr	x8, [x24, #8]
	ldr	x8, [x8, #16]
	ldp	x9, x8, [x8]
	stp	x9, x8, [sp, #48]
	ldr	x8, [x24, #8]
	ldr	x8, [x8, #16]
	ldr	x8, [x8, #16]
	str	x8, [sp, #64]
	ldr	w0, [x24, #20]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	cmp	w28, #16
	mov	x28, x24
	ldr	w24, [sp, #28]                  ; 4-byte Folded Reload
	b.lt	LBB0_38
; %bb.24:
	mov	w26, #0
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	cmp	w8, #1
	csinc	w23, w8, wzr, gt
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w8, #1
	csinc	w25, w8, wzr, gt
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=1
	ldr	x8, [x28, #8]
	ldr	x8, [x8, #8]
	ldrsw	x9, [x8]
	ldp	x10, x11, [sp, #48]
	add	x9, x10, x9, lsl #6
	str	x9, [sp, #48]
	ldrsw	x8, [x8, #4]
	add	x8, x11, x8, lsl #6
	str	x8, [sp, #56]
	ldr	x8, [x28, #8]
	ldr	x8, [x8, #8]
	ldrsw	x8, [x8, #8]
	ldr	x9, [sp, #64]
	add	x8, x9, x8, lsl #6
	str	x8, [sp, #64]
	add	w26, w26, #1
	cmp	w26, w25
	b.eq	LBB0_38
LBB0_26:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_31 Depth 2
	ldr	w0, [x28, #16]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	cmp	w24, #16
	b.lt	LBB0_25
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	mov	w27, #0
	b	LBB0_31
LBB0_28:                                ;   in Loop: Header=BB0_31 Depth=2
Lloh46:
	adrp	x8, _INTRA_FRAME@GOTPAGE
Lloh47:
	ldr	x8, [x8, _INTRA_FRAME@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	cmp	w9, w8
	b.eq	LBB0_41
LBB0_29:                                ;   in Loop: Header=BB0_31 Depth=2
	mov	x0, x28
	mov	x1, x27
	bl	_mss4_update_dc_cache
LBB0_30:                                ;   in Loop: Header=BB0_31 Depth=2
	add	w27, w27, #1
	cmp	w23, w27
	b.eq	LBB0_25
LBB0_31:                                ;   Parent Loop BB0_26 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #44
	bl	_decode012
	cmp	w0, #128
	b.eq	LBB0_28
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=2
	cmp	w0, #129
	b.eq	LBB0_35
; %bb.33:                               ;   in Loop: Header=BB0_31 Depth=2
	cmp	w0, #130
	b.ne	LBB0_29
; %bb.34:                               ;   in Loop: Header=BB0_31 Depth=2
	add	x1, sp, #44
	add	x2, sp, #48
	mov	x0, x28
	mov	x3, x27
	mov	x4, x26
	bl	_mss4_decode_dct_block
	tbz	w0, #31, LBB0_30
	b	LBB0_42
LBB0_35:                                ;   in Loop: Header=BB0_31 Depth=2
	add	x1, sp, #44
	add	x2, sp, #48
	mov	x0, x28
	mov	x3, x27
	mov	x4, x26
	bl	_mss4_decode_image_block
	tbz	w0, #31, LBB0_29
; %bb.36:
Lloh49:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh50:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
                                        ; kill: def $w27 killed $w27 killed $x27 def $x27
	stp	x27, x26, [sp]
Lloh52:
	adrp	x2, l_.str.6@PAGE
Lloh53:
	add	x2, x2, l_.str.6@PAGEOFF
	b	LBB0_7
LBB0_37:
Lloh54:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh55:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
Lloh57:
	adrp	x2, l_.str.4@PAGE
Lloh58:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_38:
	ldr	x1, [x28, #8]
	mov	x0, x22
	bl	_av_frame_ref
	tbnz	w0, #31, LBB0_40
; %bb.39:
	mov	w8, #1
	str	w8, [x21]
	b	LBB0_9
LBB0_40:
	mov	x19, x0
	b	LBB0_9
LBB0_41:
Lloh59:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh60:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh61:
	ldr	w1, [x8]
Lloh62:
	adrp	x2, l_.str.7@PAGE
Lloh63:
	add	x2, x2, l_.str.7@PAGEOFF
	b	LBB0_7
LBB0_42:
Lloh64:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh65:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh66:
	ldr	w1, [x8]
	stp	x27, x26, [sp]
Lloh67:
	adrp	x2, l_.str.5@PAGE
Lloh68:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_7
LBB0_43:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.cfi_endproc
                                        ; -- End function
	.comm	_HEADER_SIZE,4,2                ; @HEADER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Frame should have at least %d bytes, got %d instead\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Invalid frame dimensions %dx%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid quality setting %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid frame type %d\n"

	.comm	_SKIP_FRAME,4,2                 ; @SKIP_FRAME
l_.str.4:                               ; @.str.4
	.asciz	"Empty frame found but it is not a skip frame.\n"

	.comm	_INTRA_FRAME,4,2                ; @INTRA_FRAME
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_P,4,2          ; @AV_PICTURE_TYPE_P
l_.str.5:                               ; @.str.5
	.asciz	"Error decoding DCT block %d,%d\n"

l_.str.6:                               ; @.str.6
	.asciz	"Error decoding VQ block %d,%d\n"

l_.str.7:                               ; @.str.7
	.asciz	"Skip block in intra frame\n"

	.no_dead_strip	_mss4_decode_frame
.subsections_via_symbols
