	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp4_reader_open                ## -- Begin function mp4_reader_open
	.p2align	4, 0x90
_mp4_reader_open:                       ## @mp4_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-80(%rbp), %rsi
	movl	$8, %edx
	callq	_PEEK_BYTES
	cmpl	$8, %eax
	jne	LBB0_1
## %bb.2:
	movl	-64(%rbp), %edi
	movl	-60(%rbp), %esi
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %ecx
	callq	_VC_FOURCC
	addl	$-128, %eax
	cmpl	$10, %eax
	jae	LBB0_1
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_LOG_DEBUG
	movl	$32, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	8(%r13), %rax
	movq	%r14, 16(%rax)
	movq	24(%r14), %rax
	movq	%rax, 16(%r13)
	movq	%r13, %rdi
	callq	_STREAM_STATUS
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_18
## %bb.6:
	leaq	-84(%rbp), %r12
	jmp	LBB0_7
LBB0_1:
	movq	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	callq	_STREAM_STATUS
	cmpq	(%r15), %rax
	jne	LBB0_18
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	$-1, %edi
	callq	_INT64_C
	movq	%r13, %rdi
	movl	%eax, %esi
	leaq	-88(%rbp), %rdx
	movq	%r12, %rcx
	callq	_mp4_read_box_header
	cmpq	(%r15), %rax
	jne	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	-88(%rbp), %eax
	cmpl	$134, %eax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$135, %eax
	jne	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	callq	_STREAM_POSITION
	movq	%rax, 8(%r14)
	movl	-84(%rbp), %eax
	movl	%eax, 16(%r14)
	cmpl	$0, (%r14)
	je	LBB0_14
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	$1, (%r14)
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	-88(%rbp), %esi
	movl	-84(%rbp), %edx
	movq	_MP4_BOX_TYPE_ROOT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	_mp4_read_box_data
	cmpq	(%r15), %rax
	jne	LBB0_8
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, (%r14)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, 8(%r14)
	je	LBB0_17
LBB0_18:
	cmpl	$0, (%r13)
	je	LBB0_21
## %bb.19:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_mp4_read_sample_header
	incq	%rbx
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jb	LBB0_20
LBB0_21:
	movq	8(%r14), %rsi
	movq	%r13, %rdi
	callq	_SEEK
	movq	%rax, %rbx
	cmpq	(%r15), %rax
	jne	LBB0_9
## %bb.22:
	movq	8(%r13), %rax
	movq	_mp4_reader_close@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	_mp4_reader_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movq	_mp4_reader_seek@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	%r13, %rdi
	callq	_STREAM_SEEKABLE
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movq	_VC_CONTAINER_CAPS_CAN_SEEK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r13)
LBB0_24:
	movq	(%r15), %rbx
	jmp	LBB0_25
LBB0_4:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_LOG_DEBUG
	jmp	LBB0_25
LBB0_8:
	movq	%rax, %rbx
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_LOG_DEBUG
	movq	%r13, %rdi
	callq	_mp4_reader_close
	jmp	LBB0_25
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ## @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"using mp4 reader"

	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_MP4_BOX_TYPE_ROOT,4,2          ## @MP4_BOX_TYPE_ROOT
	.comm	_mp4_reader_read,4,2            ## @mp4_reader_read
	.comm	_mp4_reader_seek,4,2            ## @mp4_reader_seek
	.comm	_VC_CONTAINER_CAPS_CAN_SEEK,4,2 ## @VC_CONTAINER_CAPS_CAN_SEEK
L_.str.1:                               ## @.str.1
	.asciz	"mp4: error opening stream"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp4_reader_open                ; -- Begin function mp4_reader_open
	.p2align	2
_mp4_reader_open:                       ; @mp4_reader_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	add	x1, sp, #8
	mov	w2, #8
	bl	_PEEK_BYTES
	cmp	w0, #8
	b.ne	LBB0_5
; %bb.1:
	ldp	w0, w1, [sp, #24]
	ldp	w2, w3, [sp, #32]
	bl	_VC_FOURCC
	sub	w8, w0, #128
	cmp	w8, #10
	b.hs	LBB0_5
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	mov	w0, #32
	bl	_malloc
	cbz	x0, LBB0_24
; %bb.3:
	mov	x20, x0
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	x8, [x19, #8]
	str	x20, [x8, #16]
	ldr	x8, [x20, #24]
	str	x8, [x19, #16]
	mov	x0, x19
	bl	_STREAM_STATUS
Lloh5:
	adrp	x22, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.4:
	mov	w23, #1
Lloh7:
	adrp	x24, _MP4_BOX_TYPE_ROOT@GOTPAGE
Lloh8:
	ldr	x24, [x24, _MP4_BOX_TYPE_ROOT@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh9:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGEOFF]
Lloh11:
	ldr	x21, [x8]
LBB0_6:
	ldr	x8, [sp, #40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.7:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	bl	_STREAM_STATUS
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_17
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #-1
	bl	_INT64_C
	mov	x1, x0
	add	x2, sp, #4
	mov	x3, sp
	mov	x0, x19
	bl	_mp4_read_box_header
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_25
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp, #4]
	cmp	w8, #134
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w8, #135
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	bl	_STREAM_POSITION
	str	x0, [x20, #8]
	ldr	w8, [sp]
	str	w8, [x20, #16]
	ldr	w8, [x20]
	cbz	w8, LBB0_14
	b	LBB0_17
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	str	w23, [x20]
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=1
	ldp	w2, w1, [sp]
	ldr	w3, [x24]
	mov	x0, x19
	bl	_mp4_read_box_data
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_25
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x20]
	cbz	w8, LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
LBB0_17:
	ldr	w8, [x19]
	cbz	w8, LBB0_20
; %bb.18:
	mov	x21, #0
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x21, lsl #3]
	ldr	x8, [x8]
	ldr	x2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_mp4_read_sample_header
	add	x21, x21, #1
	ldr	w8, [x19]
	cmp	x21, x8
	b.lo	LBB0_19
LBB0_20:
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_SEEK
	mov	x21, x0
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_26
; %bb.21:
	ldr	x8, [x19, #8]
Lloh15:
	adrp	x9, _mp4_reader_close@GOTPAGE
Lloh16:
	ldr	x9, [x9, _mp4_reader_close@GOTPAGEOFF]
	str	x9, [x8, #8]
Lloh17:
	adrp	x9, _mp4_reader_read@GOTPAGE
Lloh18:
	ldr	x9, [x9, _mp4_reader_read@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _mp4_reader_seek@GOTPAGE
Lloh21:
	ldr	x10, [x10, _mp4_reader_seek@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	stp	w10, w9, [x8]
	mov	x0, x19
	bl	_STREAM_SEEKABLE
	cbz	x0, LBB0_23
; %bb.22:
Lloh23:
	adrp	x8, _VC_CONTAINER_CAPS_CAN_SEEK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VC_CONTAINER_CAPS_CAN_SEEK@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_23:
	ldr	x21, [x22]
	b	LBB0_6
LBB0_24:
Lloh26:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh28:
	ldr	x21, [x8]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	b	LBB0_6
LBB0_25:
	mov	x21, x0
LBB0_26:
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	mov	x0, x19
	bl	_mp4_reader_close
	b	LBB0_6
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ; @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using mp4 reader"

	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_MP4_BOX_TYPE_ROOT,4,2          ; @MP4_BOX_TYPE_ROOT
	.comm	_mp4_reader_read,4,2            ; @mp4_reader_read
	.comm	_mp4_reader_seek,4,2            ; @mp4_reader_seek
	.comm	_VC_CONTAINER_CAPS_CAN_SEEK,4,2 ; @VC_CONTAINER_CAPS_CAN_SEEK
l_.str.1:                               ; @.str.1
	.asciz	"mp4: error opening stream"

.subsections_via_symbols
