	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv9_reader_open                ## -- Begin function rv9_reader_open
	.p2align	4, 0x90
_rv9_reader_open:                       ## @rv9_reader_open
	.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, %r15
	xorl	%esi, %esi
	callq	_rv9_read_file_header
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_1
## %bb.2:
	movl	$8, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	8(%r15), %rax
	movq	%rbx, 16(%rax)
	movl	$1, (%r15)
	movq	%rbx, 16(%r15)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_vc_container_allocate_track
	movq	16(%r15), %rcx
	movq	%rax, (%rcx)
	movq	16(%r15), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.6:
	movq	_VC_CONTAINER_ES_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rsi), %rcx
	movl	%eax, 4(%rcx)
	movq	_VC_CONTAINER_CODEC_RV40@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	movl	$1, (%rsi)
	movq	%r15, %rdi
	callq	_rv9_read_file_header
	movq	%rax, %r14
	cmpq	(%r12), %rax
	jne	LBB0_5
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movq	8(%r15), %rax
	movq	_rv9_reader_close@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	_rv9_reader_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movq	_rv9_reader_seek@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	(%r12), %r14
	jmp	LBB0_9
LBB0_1:
	movq	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_9
LBB0_8:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	jmp	LBB0_9
LBB0_4:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movq	%r15, %rdi
	callq	_rv9_reader_close
LBB0_9:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ## @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_VC_CONTAINER_ES_TYPE_VIDEO,4,2 ## @VC_CONTAINER_ES_TYPE_VIDEO
	.comm	_VC_CONTAINER_CODEC_RV40,4,2    ## @VC_CONTAINER_CODEC_RV40
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"using rv9 reader"

	.comm	_rv9_reader_read,4,2            ## @rv9_reader_read
	.comm	_rv9_reader_seek,4,2            ## @rv9_reader_seek
L_.str.1:                               ## @.str.1
	.asciz	"rv9: error opening stream (%i)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv9_reader_open                ; -- Begin function rv9_reader_open
	.p2align	2
_rv9_reader_open:                       ; @rv9_reader_open
	.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	x19, x0
	mov	x1, #0
	bl	_rv9_read_file_header
Lloh0:
	adrp	x21, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.1:
	mov	w0, #8
	bl	_malloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x19, #8]
	str	x20, [x8, #16]
	mov	w22, #1
	str	w22, [x19]
	str	x20, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_vc_container_allocate_track
	ldr	x8, [x19, #16]
	str	x0, [x8]
	ldr	x8, [x19, #16]
	ldr	x1, [x8]
	cbz	x1, LBB0_7
; %bb.3:
Lloh2:
	adrp	x8, _VC_CONTAINER_ES_TYPE_VIDEO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VC_CONTAINER_ES_TYPE_VIDEO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	x9, [x1, #8]
Lloh5:
	adrp	x10, _VC_CONTAINER_CODEC_RV40@GOTPAGE
Lloh6:
	ldr	x10, [x10, _VC_CONTAINER_CODEC_RV40@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	stp	w10, w8, [x9]
	str	w22, [x1]
	mov	x0, x19
	bl	_rv9_read_file_header
	mov	x20, x0
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.4:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	ldr	x8, [x19, #8]
Lloh10:
	adrp	x9, _rv9_reader_close@GOTPAGE
Lloh11:
	ldr	x9, [x9, _rv9_reader_close@GOTPAGEOFF]
	str	x9, [x8, #8]
Lloh12:
	adrp	x9, _rv9_reader_read@GOTPAGE
Lloh13:
	ldr	x9, [x9, _rv9_reader_read@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _rv9_reader_seek@GOTPAGE
Lloh16:
	ldr	x10, [x10, _rv9_reader_seek@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	stp	w10, w9, [x8]
	ldr	x20, [x21]
	b	LBB0_9
LBB0_5:
Lloh18:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGEOFF]
Lloh20:
	ldr	x20, [x8]
	b	LBB0_9
LBB0_6:
Lloh21:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh23:
	ldr	x20, [x8]
	str	x20, [sp]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	b	LBB0_9
LBB0_7:
Lloh26:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh28:
	ldr	x20, [x8]
LBB0_8:
	str	x20, [sp]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	mov	x0, x19
	bl	_rv9_reader_close
LBB0_9:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ; @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_VC_CONTAINER_ES_TYPE_VIDEO,4,2 ; @VC_CONTAINER_ES_TYPE_VIDEO
	.comm	_VC_CONTAINER_CODEC_RV40,4,2    ; @VC_CONTAINER_CODEC_RV40
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using rv9 reader"

	.comm	_rv9_reader_read,4,2            ; @rv9_reader_read
	.comm	_rv9_reader_seek,4,2            ; @rv9_reader_seek
l_.str.1:                               ; @.str.1
	.asciz	"rv9: error opening stream (%i)"

.subsections_via_symbols
