	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	$0, -24(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	cmpl	$2, %edi
	jne	LBB0_8
## %bb.1:
	movq	8(%rsi), %r14
	leaq	-32(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_av_file_map
	testl	%eax, %eax
	js	LBB0_10
## %bb.2:
	movq	-32(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -80(%rbp)
	xorl	%eax, %eax
	callq	_avformat_alloc_context
	movq	%rax, -24(%rbp)
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %rbx
	movl	$4096, %edi                     ## imm = 0x1000
	callq	_av_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	$0, (%rsp)
	movq	_read_packet@GOTPCREL(%rip), %r8
	leaq	-80(%rbp), %rcx
	movl	$4096, %esi                     ## imm = 0x1000
	movq	%rax, %rdi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_avio_alloc_context
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	%rax, (%rbx)
	leaq	-24(%rbp), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_avformat_open_input
	testl	%eax, %eax
	js	LBB0_17
## %bb.6:
	movq	-24(%rbp), %rdi
	xorl	%esi, %esi
	callq	_avformat_find_stream_info
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_18
## %bb.7:
	movq	-24(%rbp), %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_av_dump_format
	jmp	LBB0_11
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rsi), %rdx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_15
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_10:
	movl	%eax, %ebx
LBB0_11:
	leaq	-24(%rbp), %rdi
	callq	_avformat_close_input
	movq	-40(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_av_freep
LBB0_13:
	leaq	-40(%rbp), %rdi
	callq	_avio_context_free
	movq	-32(%rbp), %rdi
	movq	-48(%rbp), %rsi
	callq	_av_file_unmap
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jns	LBB0_16
## %bb.14:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_av_err2str
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
LBB0_15:
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %eax
LBB0_16:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_17:
	movl	%eax, %ebx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_19
LBB0_18:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_19:
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usage: %s input_file\nAPI example program to show how to read from a custom buffer accessed through AVIOContext.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_read_packet,4,2                ## @read_packet
L_.str.1:                               ## @.str.1
	.asciz	"Could not open input\n"

L_.str.2:                               ## @.str.2
	.asciz	"Could not find stream information\n"

L_.str.3:                               ## @.str.3
	.asciz	"Error occurred: %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	stp	xzr, xzr, [x29, #-32]
	str	xzr, [sp, #40]
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
	cmp	w0, #2
	b.ne	LBB0_8
; %bb.1:
	ldr	x19, [x1, #8]
	add	x1, sp, #40
	add	x2, sp, #32
	mov	x0, x19
	mov	w3, #0
	mov	x4, #0
	bl	_av_file_map
	tbnz	w0, #31, LBB0_10
; %bb.2:
	ldp	x9, x8, [sp, #32]
	stp	x9, x8, [sp, #8]
	bl	_avformat_alloc_context
	stur	x0, [x29, #-24]
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
	mov	w0, #4096
	bl	_av_malloc
	cbz	x0, LBB0_9
; %bb.4:
Lloh0:
	adrp	x4, _read_packet@GOTPAGE
Lloh1:
	ldr	x4, [x4, _read_packet@GOTPAGEOFF]
	add	x3, sp, #8
	mov	w1, #4096
	mov	w2, #0
	mov	x5, #0
	mov	x6, #0
	bl	_avio_alloc_context
	stur	x0, [x29, #-32]
	cbz	x0, LBB0_9
; %bb.5:
	str	x0, [x20]
	sub	x0, x29, #24
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_avformat_open_input
	tbnz	w0, #31, LBB0_18
; %bb.6:
	ldur	x0, [x29, #-24]
	mov	x1, #0
	bl	_avformat_find_stream_info
	mov	x20, x0
	tbnz	w0, #31, LBB0_19
; %bb.7:
	ldur	x0, [x29, #-24]
	mov	w1, #0
	mov	x2, x19
	mov	w3, #0
	bl	_av_dump_format
	b	LBB0_11
LBB0_8:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x8, [x1]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_9:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_10:
	mov	x20, x0
LBB0_11:
	sub	x0, x29, #24
	bl	_avformat_close_input
	ldur	x0, [x29, #-32]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_av_freep
LBB0_13:
	sub	x0, x29, #32
	bl	_avio_context_free
	ldp	x1, x0, [sp, #32]
	bl	_av_file_unmap
	tbnz	w20, #31, LBB0_15
; %bb.14:
	mov	w0, #0
	b	LBB0_17
LBB0_15:
Lloh10:
	adrp	x8, _stderr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
	mov	x0, x20
	bl	_av_err2str
	str	x0, [sp]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
LBB0_16:
	bl	_fprintf
	mov	w0, #1
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_18:
	mov	x20, x0
Lloh15:
	adrp	x8, _stderr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	b	LBB0_11
LBB0_19:
Lloh20:
	adrp	x8, _stderr@GOTPAGE
Lloh21:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usage: %s input_file\nAPI example program to show how to read from a custom buffer accessed through AVIOContext.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_read_packet,4,2                ; @read_packet
l_.str.1:                               ; @.str.1
	.asciz	"Could not open input\n"

l_.str.2:                               ; @.str.2
	.asciz	"Could not find stream information\n"

l_.str.3:                               ; @.str.3
	.asciz	"Error occurred: %s\n"

.subsections_via_symbols
