	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmv_decode_frame
_cmv_decode_frame:                      ## @cmv_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	8(%rcx), %ebx
	movq	_EA_PREAMBLE_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_3
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_2
LBB0_3:
	movq	%rdi, %r13
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %r14
	movq	(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movslq	%ebx, %r12
	leaq	(%r14,%r12,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_AV_RL32
	movq	_MVIh_TAG@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_AV_RB32
	cmpq	(%r15), %rax
	jne	LBB0_8
LBB0_5:
	leaq	16(%r14), %rdi
	callq	_AV_RL32
	movq	%rax, %r15
	movq	_EA_PREAMBLE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%r14,%rax,4), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_cmv_process_header
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:
	movl	%r15d, %eax
	movq	_EA_PREAMBLE_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	subq	%rcx, %r12
	cmpq	%r12, %rax
	jg	LBB0_1
## %bb.7:
	leaq	(%r14,%rax,4), %r14
LBB0_8:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	20(%r12), %edi
	movl	12(%r12), %ecx
	movl	16(%r12), %esi
	xorl	%edx, %edx
	callq	_av_image_check_size
	testl	%eax, %eax
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	js	LBB0_12
## %bb.9:
	movq	_AV_GET_BUFFER_FLAG_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_12
## %bb.10:
	movq	8(%r15), %rax
	movl	4(%rax), %edi
	movl	8(%r12), %esi
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movq	_EA_PREAMBLE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%r14,%rax,4), %rdx
	testb	$1, (%r14,%rax,4)
	jne	LBB0_15
## %bb.11:
	movl	$1, (%r15)
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	addq	$8, %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_cmv_decode_intra
	jmp	LBB0_16
LBB0_15:
	addq	$8, %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_cmv_decode_inter
	movl	$0, (%r15)
	movq	_AV_PICTURE_TYPE_P@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
LBB0_16:
	movl	4(%r12), %edi
	callq	_av_frame_unref
	movl	(%r12), %esi
	movl	4(%r12), %edi
	callq	_av_frame_move_ref
	movl	(%r12), %edi
	movq	%r15, %rsi
	callq	_av_frame_ref
	testl	%eax, %eax
	js	LBB0_12
## %bb.17:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_2
LBB0_12:
	movl	%eax, %ebx
LBB0_2:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EA_PREAMBLE_SIZE,4,2           ## @EA_PREAMBLE_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_MVIh_TAG,8,3                   ## @MVIh_TAG
	.comm	_AV_GET_BUFFER_FLAG_REF,4,2     ## @AV_GET_BUFFER_FLAG_REF
	.comm	_AVPALETTE_SIZE,4,2             ## @AVPALETTE_SIZE
	.comm	_AV_PICTURE_TYPE_P,4,2          ## @AV_PICTURE_TYPE_P
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.no_dead_strip	_cmv_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmv_decode_frame
_cmv_decode_frame:                      ; @cmv_decode_frame
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w26, [x3, #8]
Lloh0:
	adrp	x27, _EA_PREAMBLE_SIZE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _EA_PREAMBLE_SIZE@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	w26, w8
	b.ge	LBB0_3
LBB0_1:
Lloh2:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
LBB0_2:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x19, x2
	mov	x20, x1
	mov	x24, x0
	ldr	x23, [x3]
	ldr	x21, [x0]
	add	x22, x23, w26, sxtw #2
	mov	x0, x23
	bl	_AV_RL32
Lloh5:
	adrp	x25, _MVIh_TAG@GOTPAGE
Lloh6:
	ldr	x25, [x25, _MVIh_TAG@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x23
	bl	_AV_RB32
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_8
LBB0_5:
	add	x0, x23, #16
	bl	_AV_RL32
	mov	x25, x0
	ldrsw	x8, [x27]
	add	x1, x23, x8, lsl #2
	mov	x0, x21
	mov	x2, x22
	bl	_cmv_process_header
	tbnz	w0, #31, LBB0_2
; %bb.6:
	sxtw	x9, w26
	and	x8, x25, #0xffffffff
	ldrsw	x10, [x27]
	sub	x9, x9, x10
	cmp	x8, x9
	b.gt	LBB0_1
; %bb.7:
	add	x23, x23, x8, lsl #2
LBB0_8:
	ldp	w1, w0, [x21, #16]
	ldr	w3, [x21, #12]
	mov	w2, #0
	bl	_av_image_check_size
	tbnz	w0, #31, LBB0_2
; %bb.9:
Lloh7:
	adrp	x8, _AV_GET_BUFFER_FLAG_REF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_GET_BUFFER_FLAG_REF@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x24
	mov	x1, x20
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_2
; %bb.10:
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #4]
	ldr	w1, [x21, #8]
Lloh10:
	adrp	x8, _AVPALETTE_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVPALETTE_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	bl	_memcpy
	ldrsw	x8, [x27]
	add	x8, x23, x8, lsl #2
	ldr	w9, [x8]
	tbnz	w9, #0, LBB0_12
; %bb.11:
	mov	w9, #1
	str	w9, [x20]
Lloh13:
	adrp	x9, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	str	w9, [x20, #4]
	add	x2, x8, #8
	mov	x0, x21
	mov	x1, x20
	mov	x3, x22
	bl	_cmv_decode_intra
	b	LBB0_13
LBB0_12:
	add	x2, x8, #8
	mov	x0, x21
	mov	x1, x20
	mov	x3, x22
	bl	_cmv_decode_inter
	str	wzr, [x20]
Lloh16:
	adrp	x8, _AV_PICTURE_TYPE_P@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_PICTURE_TYPE_P@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x20, #4]
LBB0_13:
	ldr	w0, [x21, #4]
	bl	_av_frame_unref
	ldp	w1, w0, [x21]
	bl	_av_frame_move_ref
	ldr	w0, [x21]
	mov	x1, x20
	bl	_av_frame_ref
	tbnz	w0, #31, LBB0_2
; %bb.14:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x26
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EA_PREAMBLE_SIZE,4,2           ; @EA_PREAMBLE_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_MVIh_TAG,8,3                   ; @MVIh_TAG
	.comm	_AV_GET_BUFFER_FLAG_REF,4,2     ; @AV_GET_BUFFER_FLAG_REF
	.comm	_AVPALETTE_SIZE,4,2             ; @AVPALETTE_SIZE
	.comm	_AV_PICTURE_TYPE_P,4,2          ; @AV_PICTURE_TYPE_P
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.no_dead_strip	_cmv_decode_frame
.subsections_via_symbols
