	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_stream
_open_stream:                           ## @open_stream
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_avcodec_find_decoder
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_avcodec_alloc_context3
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	8(%rbx), %rcx
	movq	(%rcx), %rsi
	movq	%rax, %rdi
	callq	_avcodec_parameters_to_context
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	(%rbx), %rax
	movl	$1, (%rax)
	movq	%r14, %rdi
	callq	_ff_filter_get_nb_threads
	movq	(%rbx), %rdi
	movl	%eax, 4(%rdi)
	xorl	%r12d, %r12d
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_avcodec_open2
	testl	%eax, %eax
	jns	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movl	%ebx, %r12d
	jmp	LBB0_9
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	movl	%eax, %r12d
LBB0_9:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to find any codec\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to open codec\n"

	.no_dead_strip	_open_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_stream
_open_stream:                           ; @open_stream
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_avcodec_find_decoder
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
	bl	_avcodec_alloc_context3
	str	x0, [x20]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	x1, [x8]
	bl	_avcodec_parameters_to_context
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	x8, [x20]
	mov	w9, #1
	str	w9, [x8]
	mov	x0, x19
	bl	_ff_filter_get_nb_threads
	ldr	x8, [x20]
	str	w0, [x8, #4]
	mov	x0, x8
	mov	x1, x21
	mov	x2, #0
	bl	_avcodec_open2
	tbnz	w0, #31, LBB0_9
; %bb.4:
	mov	w22, #0
	b	LBB0_10
LBB0_5:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_8:
	mov	x22, x0
	b	LBB0_10
LBB0_9:
	mov	x22, x0
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to find any codec\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to open codec\n"

	.no_dead_strip	_open_stream
.subsections_via_symbols
