	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpeg_decode_frame
_mpeg_decode_frame:                     ## @mpeg_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
	movq	%rdx, %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rcx), %r15
	movq	%r15, -64(%rbp)
	movl	(%rcx), %ebx
	movl	%ebx, -44(%rbp)
	movq	24(%rdi), %r12
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r13
	cmpl	$4, %ebx
	jne	LBB0_8
## %bb.2:
	movq	%r15, %rdi
	callq	_AV_RB32
	movq	_SEQ_END_CODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_3:
	cmpq	$0, 24(%r12)
	jne	LBB0_29
## %bb.4:
	movq	72(%r12), %rax
	testq	%rax, %rax
	je	LBB0_29
## %bb.5:
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_frame_ref
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	$0, 72(%r12)
	movl	$1, (%r14)
	jmp	LBB0_29
LBB0_8:
	movq	64(%r12), %rax
	movq	_AV_CODEC_FLAG_TRUNCATED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_11
## %bb.9:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	leaq	56(%r12), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_ff_mpeg1_find_frame_end
	leaq	-64(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_ff_combine_frame
	testq	%rax, %rax
	js	LBB0_10
LBB0_11:
	movl	16(%r13), %edi
	callq	_avpriv_toupper4
	movq	%rax, 32(%r12)
	cmpq	$0, (%r12)
	jne	LBB0_15
## %bb.12:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_AV_RL32
	cmpq	%rax, %rbx
	je	LBB0_14
## %bb.13:
	movq	32(%r12), %rbx
	leaq	L_.str.1(%rip), %rdi
	callq	_AV_RL32
	cmpq	%rax, %rbx
	jne	LBB0_15
LBB0_14:
	movq	%r13, %rdi
	callq	_vcr2_init_sequence
LBB0_15:
	movq	$0, 16(%r12)
	movq	8(%r13), %rcx
	testq	%rcx, %rcx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_22
## %bb.16:
	cmpl	$0, 8(%r12)
	jne	LBB0_22
## %bb.17:
	movl	(%r13), %r8d
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_decode_chunks
	movl	%eax, %ebx
	cmpl	$0, (%r14)
	je	LBB0_19
## %bb.18:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	callq	_av_log
	movq	%r15, %rdi
	callq	_av_frame_unref
	movl	$0, (%r14)
LBB0_19:
	movl	$1, 8(%r12)
	testl	%ebx, %ebx
	js	LBB0_20
LBB0_22:
	movq	-64(%rbp), %rcx
	movl	-44(%rbp), %r8d
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_decode_chunks
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_24
## %bb.23:
	cmpl	$0, (%r14)
	je	LBB0_29
LBB0_24:
	movq	$0, 48(%r12)
	cmpl	$-1, 40(%r12)
	je	LBB0_29
## %bb.25:
	cmpl	$0, (%r14)
	je	LBB0_29
## %bb.26:
	movq	_AV_FRAME_DATA_GOP_TIMECODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_av_frame_new_side_data
	testq	%rax, %rax
	je	LBB0_27
## %bb.28:
	addq	$40, %r12
	movl	(%rax), %edi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	$-1, (%r12)
	jmp	LBB0_29
LBB0_10:
	movl	-44(%rbp), %ebx
	jmp	LBB0_29
LBB0_6:
	movl	%eax, %ebx
	jmp	LBB0_29
LBB0_27:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_29
LBB0_20:
	movq	_AV_EF_EXPLODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	je	LBB0_22
## %bb.21:
	movq	$0, 48(%r12)
LBB0_29:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEQ_END_CODE,8,3               ## @SEQ_END_CODE
	.comm	_AV_CODEC_FLAG_TRUNCATED,4,2    ## @AV_CODEC_FLAG_TRUNCATED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VCR2"

L_.str.1:                               ## @.str.1
	.asciz	"BW10"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"picture in extradata\n"

	.comm	_AV_EF_EXPLODE,4,2              ## @AV_EF_EXPLODE
	.comm	_AV_FRAME_DATA_GOP_TIMECODE,4,2 ## @AV_FRAME_DATA_GOP_TIMECODE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mpeg_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpeg_decode_frame
_mpeg_decode_frame:                     ; @mpeg_decode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	ldr	x24, [x3, #8]
	str	x24, [sp, #8]
	ldr	w22, [x3]
	str	w22, [sp, #4]
	ldr	x19, [x0, #24]
	cbz	w22, LBB0_3
; %bb.1:
	mov	x23, x0
	cmp	w22, #4
	b.ne	LBB0_7
; %bb.2:
	mov	x0, x24
	bl	_AV_RB32
Lloh0:
	adrp	x8, _SEQ_END_CODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEQ_END_CODE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
LBB0_3:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_29
; %bb.4:
	ldr	x8, [x19, #72]
	cbz	x8, LBB0_29
; %bb.5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_av_frame_ref
	tbnz	w0, #31, LBB0_25
; %bb.6:
	str	xzr, [x19, #72]
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_29
LBB0_7:
	ldr	x8, [x19, #64]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AV_CODEC_FLAG_TRUNCATED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_CODEC_FLAG_TRUNCATED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	add	x25, x19, #56
	mov	x0, x25
	mov	x1, x24
	mov	x2, x22
	mov	x3, #0
	bl	_ff_mpeg1_find_frame_end
	mov	x1, x0
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x25
	bl	_ff_combine_frame
	tbnz	x0, #63, LBB0_24
LBB0_9:
	ldr	w0, [x23, #16]
	bl	_avpriv_toupper4
	str	x0, [x19, #32]
	ldr	x8, [x19]
	cbnz	x8, LBB0_13
; %bb.10:
	mov	x22, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_AV_RL32
	cmp	x22, x0
	b.eq	LBB0_12
; %bb.11:
	ldr	x22, [x19, #32]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_AV_RL32
	cmp	x22, x0
	b.ne	LBB0_13
LBB0_12:
	mov	x0, x23
	bl	_vcr2_init_sequence
LBB0_13:
	str	xzr, [x19, #16]
	ldr	x3, [x23, #8]
	cbz	x3, LBB0_18
; %bb.14:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_18
; %bb.15:
	ldr	w4, [x23]
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_decode_chunks
	mov	x22, x0
	ldr	w8, [x20]
	cbz	w8, LBB0_17
; %bb.16:
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
	mov	x0, x23
	bl	_av_log
	mov	x0, x21
	bl	_av_frame_unref
	str	wzr, [x20]
LBB0_17:
	mov	w8, #1
	str	w8, [x19, #8]
	tbnz	w22, #31, LBB0_27
LBB0_18:
	ldr	x3, [sp, #8]
	ldr	w4, [sp, #4]
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_decode_chunks
	mov	x22, x0
	tbnz	w0, #31, LBB0_20
; %bb.19:
	ldr	w8, [x20]
	cbz	w8, LBB0_29
LBB0_20:
	ldr	w8, [x19, #40]!
	str	xzr, [x19, #8]
	cmn	w8, #1
	b.eq	LBB0_29
; %bb.21:
	ldr	w8, [x20]
	cbz	w8, LBB0_29
; %bb.22:
Lloh15:
	adrp	x8, _AV_FRAME_DATA_GOP_TIMECODE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_FRAME_DATA_GOP_TIMECODE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #4
	bl	_av_frame_new_side_data
	cbz	x0, LBB0_26
; %bb.23:
	ldr	w0, [x0]
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
	mov	w8, #-1
	str	w8, [x19]
	b	LBB0_29
LBB0_24:
	ldr	w22, [sp, #4]
	b	LBB0_29
LBB0_25:
	mov	x22, x0
	b	LBB0_29
LBB0_26:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x22, x0
	b	LBB0_29
LBB0_27:
	ldr	w8, [x23, #4]
Lloh21:
	adrp	x9, _AV_EF_EXPLODE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AV_EF_EXPLODE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.28:
	str	xzr, [x19, #48]
LBB0_29:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_SEQ_END_CODE,8,3               ; @SEQ_END_CODE
	.comm	_AV_CODEC_FLAG_TRUNCATED,4,2    ; @AV_CODEC_FLAG_TRUNCATED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VCR2"

l_.str.1:                               ; @.str.1
	.asciz	"BW10"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"picture in extradata\n"

	.comm	_AV_EF_EXPLODE,4,2              ; @AV_EF_EXPLODE
	.comm	_AV_FRAME_DATA_GOP_TIMECODE,4,2 ; @AV_FRAME_DATA_GOP_TIMECODE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mpeg_decode_frame
.subsections_via_symbols
