	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amf_load_library
_amf_load_library:                      ## @amf_load_library
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	xorl	%eax, %eax
	callq	_av_frame_alloc
	movl	%eax, 44(%r12)
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	(%rbx), %eax
	leal	64(,%rax,4), %edi
	callq	_av_fifo_alloc
	movl	%eax, 40(%r12)
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	$0, 32(%r12)
	movq	_AMF_DLL_NAMEA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rax, %rbx
	movq	_RTLD_NOW@GOTPCREL(%rip), %rax
	movq	_RTLD_LOCAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_dlopen
	movq	%rax, 24(%r12)
	xorl	%esi, %esi
	testq	%rax, %rax
	setne	%sil
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	(%rbx), %r8
	movq	%rbx, %r13
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_AMF_RETURN_IF_FALSE
	movq	24(%r12), %rdi
	movq	_AMF_INIT_FUNCTION_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rax, %rbx
	callq	_dlsym
	movq	%rax, %r15
	xorl	%esi, %esi
	testq	%rax, %rax
	setne	%sil
	movl	(%r14), %edx
	movq	(%r13), %r8
	movl	(%rbx), %r9d
	leaq	L_.str.1(%rip), %rcx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_AMF_RETURN_IF_FALSE
	movq	24(%r12), %rdi
	movq	_AMF_QUERY_VERSION_FUNCTION_NAME@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_dlsym
	movq	%rax, %rbx
	xorl	%esi, %esi
	testq	%rax, %rax
	setne	%sil
	movl	(%r14), %edx
	movq	_AMF_DLL_NAMEA@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movl	(%r13), %r9d
	movq	%r12, %rdi
	leaq	L_.str.1(%rip), %rcx
	xorl	%eax, %eax
	callq	_AMF_RETURN_IF_FALSE
	leaq	20(%r12), %rdi
	callq	*%rbx
	movq	_AMF_OK@GOTPCREL(%rip), %rbx
	xorl	%esi, %esi
	cmpq	(%rbx), %rax
	sete	%sil
	movl	(%r14), %edx
	movslq	(%r13), %r8
	leaq	L_.str.2(%rip), %r13
	movq	%r12, %rdi
	movq	%r13, %rcx
	movq	%rax, %r9
	xorl	%eax, %eax
	callq	_AMF_RETURN_IF_FALSE
	movq	_AMF_FULL_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r12), %rsi
	callq	*%r15
	xorl	%esi, %esi
	cmpq	(%rbx), %rax
	sete	%sil
	movl	(%r14), %edx
	movq	_AMF_INIT_FUNCTION_NAME@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %r8
	movq	%r12, %rdi
	movq	%r13, %rcx
	movq	%rax, %r9
	xorl	%eax, %eax
	callq	_AMF_RETURN_IF_FALSE
	movq	8(%r12), %rdi
	movq	(%rdi), %rax
	leaq	16(%r12), %rsi
	callq	*(%rax)
	xorl	%esi, %esi
	cmpq	(%rbx), %rax
	sete	%sil
	movl	(%r14), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	%r12, %rdi
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_AMF_RETURN_IF_FALSE
	movq	8(%r12), %rdi
	movq	(%rdi), %rax
	movq	%r12, %rsi
	callq	*8(%rax)
	xorl	%esi, %esi
	cmpq	(%rbx), %rax
	sete	%sil
	movl	(%r14), %edx
	leaq	L_.str.4(%rip), %rcx
	movq	%r12, %rdi
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_AMF_RETURN_IF_FALSE
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AMF_DLL_NAMEA,8,3              ## @AMF_DLL_NAMEA
	.comm	_RTLD_NOW,4,2                   ## @RTLD_NOW
	.comm	_RTLD_LOCAL,4,2                 ## @RTLD_LOCAL
	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DLL %s failed to open\n"

	.comm	_AMF_INIT_FUNCTION_NAME,4,2     ## @AMF_INIT_FUNCTION_NAME
L_.str.1:                               ## @.str.1
	.asciz	"DLL %s failed to find function %s\n"

	.comm	_AMF_QUERY_VERSION_FUNCTION_NAME,4,2 ## @AMF_QUERY_VERSION_FUNCTION_NAME
	.comm	_AMF_OK,8,3                     ## @AMF_OK
L_.str.2:                               ## @.str.2
	.asciz	"%s failed with error %d\n"

	.comm	_AMF_FULL_VERSION,4,2           ## @AMF_FULL_VERSION
L_.str.3:                               ## @.str.3
	.asciz	"GetTrace() failed with error %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"GetDebug() failed with error %d\n"

	.no_dead_strip	_amf_load_library
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amf_load_library
_amf_load_library:                      ; @amf_load_library
	.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, x0
	ldr	x19, [x0, #8]
	bl	_av_frame_alloc
	str	w0, [x19, #44]
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x20]
	lsl	w8, w8, #2
	add	w0, w8, #64
	bl	_av_fifo_alloc
	str	w0, [x19, #40]
	cbz	w0, LBB0_3
; %bb.2:
	str	xzr, [x19, #32]
Lloh0:
	adrp	x25, _AMF_DLL_NAMEA@GOTPAGE
Lloh1:
	ldr	x25, [x25, _AMF_DLL_NAMEA@GOTPAGEOFF]
Lloh2:
	adrp	x8, _RTLD_NOW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RTLD_NOW@GOTPAGEOFF]
	ldr	x0, [x25]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _RTLD_LOCAL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RTLD_LOCAL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_dlopen
	str	x0, [x19, #24]
	cmp	x0, #0
	cset	w1, ne
Lloh8:
	adrp	x23, _AVERROR_UNKNOWN@GOTPAGE
Lloh9:
	ldr	x23, [x23, _AVERROR_UNKNOWN@GOTPAGEOFF]
	ldr	w2, [x23]
	ldr	x4, [x25]
Lloh10:
	adrp	x3, l_.str@PAGE
Lloh11:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_AMF_RETURN_IF_FALSE
	ldr	x0, [x19, #24]
Lloh12:
	adrp	x24, _AMF_INIT_FUNCTION_NAME@GOTPAGE
Lloh13:
	ldr	x24, [x24, _AMF_INIT_FUNCTION_NAME@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_dlsym
	mov	x20, x0
	cmp	x0, #0
	cset	w1, ne
	ldr	w2, [x23]
	ldr	x4, [x25]
	ldr	w8, [x24]
Lloh14:
	adrp	x21, l_.str.1@PAGE
Lloh15:
	add	x21, x21, l_.str.1@PAGEOFF
	str	x8, [sp]
	mov	x0, x19
	mov	x3, x21
	bl	_AMF_RETURN_IF_FALSE
	ldr	x0, [x19, #24]
Lloh16:
	adrp	x26, _AMF_QUERY_VERSION_FUNCTION_NAME@GOTPAGE
Lloh17:
	ldr	x26, [x26, _AMF_QUERY_VERSION_FUNCTION_NAME@GOTPAGEOFF]
	ldr	w1, [x26]
	bl	_dlsym
	mov	x22, x0
	cmp	x0, #0
	cset	w1, ne
	ldr	w2, [x23]
	ldr	x4, [x25]
	ldr	w8, [x26]
	str	x8, [sp]
	mov	x0, x19
	mov	x3, x21
	bl	_AMF_RETURN_IF_FALSE
	add	x0, x19, #20
	blr	x22
Lloh18:
	adrp	x22, _AMF_OK@GOTPAGE
Lloh19:
	ldr	x22, [x22, _AMF_OK@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w1, eq
	ldr	w2, [x23]
	ldrsw	x4, [x26]
Lloh20:
	adrp	x21, l_.str.2@PAGE
Lloh21:
	add	x21, x21, l_.str.2@PAGEOFF
	str	x0, [sp]
	mov	x0, x19
	mov	x3, x21
	bl	_AMF_RETURN_IF_FALSE
Lloh22:
	adrp	x8, _AMF_FULL_VERSION@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AMF_FULL_VERSION@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	add	x1, x19, #8
	blr	x20
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w1, eq
	ldr	w2, [x23]
	ldrsw	x4, [x24]
	str	x0, [sp]
	mov	x0, x19
	mov	x3, x21
	bl	_AMF_RETURN_IF_FALSE
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	ldr	x8, [x8]
	add	x1, x19, #16
	blr	x8
	mov	x4, x0
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w1, eq
	ldr	w2, [x23]
Lloh25:
	adrp	x3, l_.str.3@PAGE
Lloh26:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_AMF_RETURN_IF_FALSE
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	ldr	x8, [x8, #8]
	mov	x1, x19
	blr	x8
	mov	x4, x0
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w1, eq
	ldr	w2, [x23]
Lloh27:
	adrp	x3, l_.str.4@PAGE
Lloh28:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_AMF_RETURN_IF_FALSE
	mov	w0, #0
	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
LBB0_3:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	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
	b	_AVERROR
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AMF_DLL_NAMEA,8,3              ; @AMF_DLL_NAMEA
	.comm	_RTLD_NOW,4,2                   ; @RTLD_NOW
	.comm	_RTLD_LOCAL,4,2                 ; @RTLD_LOCAL
	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DLL %s failed to open\n"

	.comm	_AMF_INIT_FUNCTION_NAME,4,2     ; @AMF_INIT_FUNCTION_NAME
l_.str.1:                               ; @.str.1
	.asciz	"DLL %s failed to find function %s\n"

	.comm	_AMF_QUERY_VERSION_FUNCTION_NAME,4,2 ; @AMF_QUERY_VERSION_FUNCTION_NAME
	.comm	_AMF_OK,8,3                     ; @AMF_OK
l_.str.2:                               ; @.str.2
	.asciz	"%s failed with error %d\n"

	.comm	_AMF_FULL_VERSION,4,2           ; @AMF_FULL_VERSION
l_.str.3:                               ; @.str.3
	.asciz	"GetTrace() failed with error %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"GetDebug() failed with error %d\n"

	.no_dead_strip	_amf_load_library
.subsections_via_symbols
