	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avisynth_open_file
_avisynth_open_file:                    ## @avisynth_open_file
	.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	%rdi, %r12
	movq	8(%rdi), %r14
	callq	_avisynth_context_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	(%r12), %rdi
	callq	_avs_new_value_string
	movq	_avs_library@GOTPCREL(%rip), %rbx
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	*32(%rbx)
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_avs_is_error
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_avs_as_error
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_5:
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movq	%r14, %rdi
	callq	_avisynth_context_destroy
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%r15d, %edi
	callq	_avs_is_clip
	testl	%eax, %eax
	je	LBB0_4
## %bb.7:
	movl	8(%r14), %esi
	movl	%r15d, %edi
	callq	*24(%rbx)
	movl	%eax, (%r14)
	movl	%eax, %edi
	callq	*16(%rbx)
	movl	%eax, 4(%r14)
	movl	%r15d, %edi
	callq	*8(%rbx)
	movq	%r12, %rdi
	callq	_avisynth_create_stream
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_avs_library,40,3               ## @avs_library
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Import"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"%s\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
L_.str.2:                               ## @.str.2
	.asciz	"AviSynth script did not return a clip\n"

	.comm	_CP_THREAD_ACP,4,2              ## @CP_THREAD_ACP
	.comm	_CP_UTF8,4,2                    ## @CP_UTF8
	.comm	_MAX_PATH,4,2                   ## @MAX_PATH
	.no_dead_strip	_avisynth_open_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avisynth_open_file
_avisynth_open_file:                    ; @avisynth_open_file
	.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, x0
	ldr	x19, [x0, #8]
	bl	_avisynth_context_create
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x0, [x20]
	bl	_avs_new_value_string
	mov	x2, x0
Lloh0:
	adrp	x22, _avs_library@GOTPAGE
Lloh1:
	ldr	x22, [x22, _avs_library@GOTPAGEOFF]
	ldr	x8, [x22, #32]
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w3, #0
	blr	x8
	mov	x21, x0
	bl	_avs_is_error
	cbz	x0, LBB0_6
; %bb.2:
Lloh4:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_avs_as_error
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x22
LBB0_3:
	bl	_av_log
Lloh9:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
LBB0_4:
	mov	x0, x19
	bl	_avisynth_context_destroy
LBB0_5:
	mov	x0, x21
	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:
	mov	x0, x21
	bl	_avs_is_clip
	cbz	w0, LBB0_8
; %bb.7:
	ldr	x8, [x22, #24]
	ldr	w1, [x19, #8]
	mov	x0, x21
	blr	x8
	str	w0, [x19]
	ldr	x8, [x22, #16]
	blr	x8
	str	w0, [x19, #4]
	ldr	x8, [x22, #8]
	mov	x0, x21
	blr	x8
	mov	x0, x20
	bl	_avisynth_create_stream
	mov	x21, x0
	cbnz	w0, LBB0_4
	b	LBB0_5
LBB0_8:
Lloh12:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	b	LBB0_3
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_avs_library,40,3               ; @avs_library
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Import"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"%s\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
l_.str.2:                               ; @.str.2
	.asciz	"AviSynth script did not return a clip\n"

	.comm	_CP_THREAD_ACP,4,2              ; @CP_THREAD_ACP
	.comm	_CP_UTF8,4,2                    ; @CP_UTF8
	.comm	_MAX_PATH,4,2                   ; @MAX_PATH
	.no_dead_strip	_avisynth_open_file
.subsections_via_symbols
