	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_codec_context
_open_codec_context:                    ## @open_codec_context
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	leaq	-48(%rbp), %r8
	movl	$-1, %edx
	movl	$-1, %ecx
	xorl	%r9d, %r9d
	callq	_av_find_best_stream
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	(%r15), %rax
	movl	%ebx, %r13d
	movq	(%rax,%r13,8), %rbx
	movq	-48(%rbp), %rdi
	callq	_avcodec_alloc_context3
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movl	(%rbx), %esi
	movq	%rax, %rdi
	callq	_avcodec_parameters_to_context
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.4(%rip), %rdx
	leaq	-56(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	callq	_av_dict_set
	movq	-48(%rbp), %rsi
	movq	%r12, %rdi
	leaq	-56(%rbp), %rdx
	callq	_avcodec_open2
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	_video_stream_idx@GOTPCREL(%rip), %rax
	movq	%r13, (%rax)
	movq	(%r15), %rax
	movq	(%rax,%r13,8), %rax
	movq	_video_stream@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_video_dec_ctx@GOTPCREL(%rip), %rax
	movq	%r12, (%rax)
	jmp	LBB0_9
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r14d, %edi
	callq	_av_get_media_type_string
	movq	_src_filename@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_9
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_5:
	movl	%eax, %ebx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %r15d
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	callq	_av_get_media_type_string
	leaq	L_.str.5(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	%r15d, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not find %s stream in input file '%s'\n"

	.comm	_src_filename,8,3               ## @src_filename
L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate codec\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Failed to copy codec parameters to codec context\n"

L_.str.3:                               ## @.str.3
	.asciz	"flags2"

L_.str.4:                               ## @.str.4
	.asciz	"+export_mvs"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to open %s codec\n"

	.comm	_video_stream_idx,8,3           ## @video_stream_idx
	.comm	_video_stream,8,3               ## @video_stream
	.comm	_video_dec_ctx,8,3              ## @video_dec_ctx
	.no_dead_strip	_open_codec_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_codec_context
_open_codec_context:                    ; @open_codec_context
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x21, x0
	stp	xzr, xzr, [sp, #16]
	add	x4, sp, #24
	mov	w2, #-1
	mov	w3, #-1
	mov	w5, #0
	bl	_av_find_best_stream
	mov	x19, x0
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	x8, [x21]
	ldr	x23, [x8, w19, uxtw #3]
	ldr	x0, [sp, #24]
	bl	_avcodec_alloc_context3
	cbz	x0, LBB0_6
; %bb.2:
	mov	x22, x0
	ldr	w1, [x23]
	bl	_avcodec_parameters_to_context
	tbnz	w0, #31, LBB0_7
; %bb.3:
Lloh0:
	adrp	x1, l_.str.3@PAGE
Lloh1:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh2:
	adrp	x2, l_.str.4@PAGE
Lloh3:
	add	x2, x2, l_.str.4@PAGEOFF
	add	x0, sp, #16
	mov	w3, #0
	bl	_av_dict_set
	ldr	x1, [sp, #24]
	add	x2, sp, #16
	mov	x0, x22
	bl	_avcodec_open2
	tbnz	w0, #31, LBB0_8
; %bb.4:
	mov	w8, w19
Lloh4:
	adrp	x9, _video_stream_idx@GOTPAGE
Lloh5:
	ldr	x9, [x9, _video_stream_idx@GOTPAGEOFF]
Lloh6:
	str	x8, [x9]
	ldr	x9, [x21]
	ldr	x8, [x9, x8, lsl #3]
Lloh7:
	adrp	x9, _video_stream@GOTPAGE
Lloh8:
	ldr	x9, [x9, _video_stream@GOTPAGEOFF]
Lloh9:
	str	x8, [x9]
Lloh10:
	adrp	x8, _video_dec_ctx@GOTPAGE
Lloh11:
	ldr	x8, [x8, _video_dec_ctx@GOTPAGEOFF]
Lloh12:
	str	x22, [x8]
	mov	w19, #0
	b	LBB0_10
LBB0_5:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_av_get_media_type_string
Lloh16:
	adrp	x8, _src_filename@GOTPAGE
Lloh17:
	ldr	x8, [x8, _src_filename@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	stp	x0, x8, [sp]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	b	LBB0_10
LBB0_6:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x19, x0
	b	LBB0_10
LBB0_7:
	mov	x23, x0
Lloh29:
	adrp	x8, _stderr@GOTPAGE
Lloh30:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
	mov	x23, x0
Lloh34:
	adrp	x8, _stderr@GOTPAGE
Lloh35:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w19, [x8]
	mov	x0, x20
	bl	_av_get_media_type_string
	str	x0, [sp]
Lloh37:
	adrp	x1, l_.str.5@PAGE
Lloh38:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
LBB0_9:
	bl	_fprintf
	mov	x19, x23
LBB0_10:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not find %s stream in input file '%s'\n"

	.comm	_src_filename,8,3               ; @src_filename
l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate codec\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Failed to copy codec parameters to codec context\n"

l_.str.3:                               ; @.str.3
	.asciz	"flags2"

l_.str.4:                               ; @.str.4
	.asciz	"+export_mvs"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to open %s codec\n"

	.comm	_video_stream_idx,8,3           ; @video_stream_idx
	.comm	_video_stream,8,3               ; @video_stream
	.comm	_video_dec_ctx,8,3              ; @video_dec_ctx
	.no_dead_strip	_open_codec_context
.subsections_via_symbols
