	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_video
_open_video:                            ## @open_video
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	24(%rdx), %rbx
	movq	$0, -40(%rbp)
	leaq	-40(%rbp), %r12
	movq	%r12, %rdi
	movq	%rcx, %rsi
	xorl	%edx, %edx
	callq	_av_dict_copy
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_avcodec_open2
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_av_dict_free
	testl	%r15d, %r15d
	js	LBB0_10
## %bb.1:
	movq	(%rbx), %rdi
	movl	12(%rbx), %esi
	movl	8(%rbx), %edx
	callq	_alloc_picture
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	$0, 8(%r14)
	movq	_AV_PIX_FMT_YUV420P@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	cmpq	%rdi, (%rbx)
	je	LBB0_7
## %bb.5:
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	callq	_alloc_picture
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	movq	(%r14), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_avcodec_parameters_from_context
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_av_err2str
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_3
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_3:
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not open video codec: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not allocate video frame\n"

	.comm	_AV_PIX_FMT_YUV420P,8,3         ## @AV_PIX_FMT_YUV420P
L_.str.2:                               ## @.str.2
	.asciz	"Could not allocate temporary picture\n"

L_.str.3:                               ## @.str.3
	.asciz	"Could not copy the stream parameters\n"

	.no_dead_strip	_open_video
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_video
_open_video:                            ; @open_video
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	ldr	x19, [x2, #24]
	str	xzr, [sp, #8]
	add	x0, sp, #8
	mov	x1, x3
	mov	w2, #0
	bl	_av_dict_copy
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	bl	_avcodec_open2
	mov	x21, x0
	add	x0, sp, #8
	bl	_av_dict_free
	tbnz	w21, #31, LBB0_6
; %bb.1:
	ldr	x0, [x19]
	ldp	w2, w1, [x19, #8]
	bl	_alloc_picture
	str	x0, [x20, #16]
	cbz	x0, LBB0_7
; %bb.2:
	str	xzr, [x20, #8]
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _AV_PIX_FMT_YUV420P@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PIX_FMT_YUV420P@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x9]
	cmp	x8, x0
	b.eq	LBB0_4
; %bb.3:
	ldp	w2, w1, [x19, #8]
	bl	_alloc_picture
	str	x0, [x20, #8]
	cbz	x0, LBB0_9
LBB0_4:
	ldr	x8, [x20]
	ldr	w0, [x8]
	mov	x1, x19
	bl	_avcodec_parameters_from_context
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	mov	x0, x21
	bl	_av_err2str
	str	x0, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	b	LBB0_10
LBB0_7:
Lloh8:
	adrp	x8, _stderr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh18:
	adrp	x8, _stderr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not open video codec: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not allocate video frame\n"

	.comm	_AV_PIX_FMT_YUV420P,8,3         ; @AV_PIX_FMT_YUV420P
l_.str.2:                               ; @.str.2
	.asciz	"Could not allocate temporary picture\n"

l_.str.3:                               ; @.str.3
	.asciz	"Could not copy the stream parameters\n"

	.no_dead_strip	_open_video
.subsections_via_symbols
