	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_reader_read
_mkv_reader_read:                       ## @mkv_reader_read
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	16(%rdi), %rax
	movq	(%rax), %rbx
	movl	$0, -48(%rbp)
	movl	$0, -52(%rbp)
	movq	_VC_CONTAINER_READ_FLAG_FORCE_TRACK@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	8(%r15), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
LBB0_2:
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	_VC_CONTAINER_ERROR_EOS@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_4:
	cmpl	$0, 4(%rbx)
	je	LBB0_6
## %bb.5:
	movq	_VC_CONTAINER_ERROR_CORRUPTED@GOTPCREL(%rip), %rax
LBB0_21:
	movq	(%rax), %rax
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	-52(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mkv_read_next_frame_header
	movq	_VC_CONTAINER_ERROR_EOS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movl	$1, (%rbx)
LBB0_8:
	movq	_VC_CONTAINER_ERROR_CORRUPTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movl	$1, 4(%rbx)
LBB0_10:
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_22
## %bb.11:
	movslq	-52(%rbp), %rax
	cmpl	(%r15), %eax
	jge	LBB0_19
## %bb.12:
	movq	8(%r15), %rcx
	movq	(%rcx,%rax,8), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_19
## %bb.13:
	movq	_VC_CONTAINER_READ_FLAG_SKIP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	testl	%r12d, %r9d
	je	LBB0_15
## %bb.14:
	movq	_VC_CONTAINER_READ_FLAG_INFO@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	je	LBB0_18
LBB0_15:
	movl	32(%rbx), %edx
	movl	%edx, 24(%r14)
	movl	%edx, 28(%r14)
	movsbl	8(%rbx), %edx
	sarl	$7, %edx
	movq	_VC_CONTAINER_PACKET_FLAG_KEYFRAME@GOTPCREL(%rip), %r8
	movq	16(%rbx), %rdi
	movq	24(%rbx), %rcx
	xorl	%esi, %esi
	andl	(%r8), %edx
	cmpl	$0, (%rcx,%rdi,4)
	jne	LBB0_17
## %bb.16:
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_17:
	orl	%esi, %edx
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movl	%edx, 16(%r14)
	movl	-44(%rbp), %ecx
	movl	%ecx, 8(%r14)
	movq	%rax, (%r14)
	testl	%r12d, %r9d
	je	LBB0_23
LBB0_18:
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_mkv_read_frame_data
	jmp	LBB0_22
LBB0_19:
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_mkv_read_frame_data
	cmpq	(%r13), %rax
	jne	LBB0_22
## %bb.20:
	movq	_VC_CONTAINER_ERROR_CONTINUE@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_23:
	movq	_VC_CONTAINER_READ_FLAG_INFO@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_25
## %bb.24:
	movq	(%r13), %rax
	jmp	LBB0_22
LBB0_25:
	movq	%rsi, %r12
	movl	12(%r14), %eax
	movl	%eax, -48(%rbp)
	movl	20(%r14), %edx
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mkv_read_frame_data
	cmpq	(%r13), %rax
	jne	LBB0_22
## %bb.26:
	movl	-48(%rbp), %ecx
	movl	%ecx, 8(%r14)
	cmpl	-44(%rbp), %ecx
	je	LBB0_22
## %bb.27:
	movl	(%r12), %ecx
	notl	%ecx
	andl	%ecx, 16(%r14)
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_READ_FLAG_FORCE_TRACK,4,2 ## @VC_CONTAINER_READ_FLAG_FORCE_TRACK
	.comm	_VC_CONTAINER_ERROR_EOS,8,3     ## @VC_CONTAINER_ERROR_EOS
	.comm	_VC_CONTAINER_ERROR_CORRUPTED,8,3 ## @VC_CONTAINER_ERROR_CORRUPTED
	.comm	_VC_CONTAINER_ERROR_CONTINUE,8,3 ## @VC_CONTAINER_ERROR_CONTINUE
	.comm	_VC_CONTAINER_READ_FLAG_SKIP,4,2 ## @VC_CONTAINER_READ_FLAG_SKIP
	.comm	_VC_CONTAINER_READ_FLAG_INFO,4,2 ## @VC_CONTAINER_READ_FLAG_INFO
	.comm	_VC_CONTAINER_PACKET_FLAG_KEYFRAME,4,2 ## @VC_CONTAINER_PACKET_FLAG_KEYFRAME
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_START,4,2 ## @VC_CONTAINER_PACKET_FLAG_FRAME_START
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_END,4,2 ## @VC_CONTAINER_PACKET_FLAG_FRAME_END
	.no_dead_strip	_mkv_reader_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkv_reader_read
_mkv_reader_read:                       ; @mkv_reader_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x21, [x8]
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _VC_CONTAINER_READ_FLAG_FORCE_TRACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC_CONTAINER_READ_FLAG_FORCE_TRACK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	ldr	x21, [x8]
LBB0_2:
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _VC_CONTAINER_ERROR_EOS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_EOS@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x8]
	b	LBB0_18
LBB0_4:
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _VC_CONTAINER_ERROR_CORRUPTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_CORRUPTED@GOTPAGEOFF]
Lloh8:
	ldr	x0, [x8]
	b	LBB0_18
LBB0_6:
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x19
	mov	x1, x21
	bl	_mkv_read_next_frame_header
Lloh9:
	adrp	x8, _VC_CONTAINER_ERROR_EOS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_EOS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
	mov	w8, #1
	str	w8, [x21]
LBB0_8:
Lloh12:
	adrp	x8, _VC_CONTAINER_ERROR_CORRUPTED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_CORRUPTED@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.9:
	mov	w8, #1
	str	w8, [x21, #4]
LBB0_10:
Lloh15:
	adrp	x23, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh16:
	ldr	x23, [x23, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_18
; %bb.11:
	ldrsw	x8, [sp, #8]
	ldr	w9, [x19]
	cmp	w8, w9
	b.ge	LBB0_17
; %bb.12:
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x8, lsl #3]
	ldr	w9, [x9]
	cbz	w9, LBB0_17
; %bb.13:
Lloh17:
	adrp	x9, _VC_CONTAINER_READ_FLAG_SKIP@GOTPAGE
Lloh18:
	ldr	x9, [x9, _VC_CONTAINER_READ_FLAG_SKIP@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	ands	w9, w9, w22
	b.eq	LBB0_15
; %bb.14:
Lloh20:
	adrp	x10, _VC_CONTAINER_READ_FLAG_INFO@GOTPAGE
Lloh21:
	ldr	x10, [x10, _VC_CONTAINER_READ_FLAG_INFO@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	tst	w10, w22
	b.eq	LBB0_16
LBB0_15:
	ldr	w10, [x21, #32]
	stp	w10, w10, [x20, #24]
	ldr	w10, [x21, #8]
	lsl	w10, w10, #24
Lloh23:
	adrp	x11, _VC_CONTAINER_PACKET_FLAG_KEYFRAME@GOTPAGE
Lloh24:
	ldr	x11, [x11, _VC_CONTAINER_PACKET_FLAG_KEYFRAME@GOTPAGEOFF]
Lloh25:
	ldr	w11, [x11]
	and	w10, w11, w10, asr #31
	ldp	x12, x11, [x21, #16]
	ldr	w11, [x11, x12, lsl #2]
Lloh26:
	adrp	x12, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGE
Lloh27:
	ldr	x12, [x12, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGEOFF]
Lloh28:
	ldr	w12, [x12]
	cmp	w11, #0
	csel	w11, w12, wzr, eq
	orr	w10, w10, w11
Lloh29:
	adrp	x24, _VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPAGE
Lloh30:
	ldr	x24, [x24, _VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPAGEOFF]
	ldr	w11, [x24]
	orr	w10, w10, w11
	str	w10, [x20, #16]
	ldr	w10, [sp, #4]
	str	w10, [x20, #8]
	str	x8, [x20]
	cbz	w9, LBB0_19
LBB0_16:
	add	x3, sp, #4
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_mkv_read_frame_data
	b	LBB0_18
LBB0_17:
	add	x3, sp, #4
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_mkv_read_frame_data
	ldr	x8, [x23]
Lloh31:
	adrp	x9, _VC_CONTAINER_ERROR_CONTINUE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _VC_CONTAINER_ERROR_CONTINUE@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x0, x8
	csel	x0, x9, x0, eq
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_19:
Lloh34:
	adrp	x8, _VC_CONTAINER_READ_FLAG_INFO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _VC_CONTAINER_READ_FLAG_INFO@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_21
; %bb.20:
	ldr	x0, [x23]
	b	LBB0_18
LBB0_21:
	ldr	w8, [x20, #12]
	str	w8, [sp, #12]
	ldr	w2, [x20, #20]
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x21
	bl	_mkv_read_frame_data
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_18
; %bb.22:
	ldr	w8, [sp, #12]
	str	w8, [x20, #8]
	ldr	w9, [sp, #4]
	cmp	w8, w9
	b.eq	LBB0_18
; %bb.23:
	ldr	w8, [x24]
	ldr	w9, [x20, #16]
	bic	w8, w9, w8
	str	w8, [x20, #16]
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_READ_FLAG_FORCE_TRACK,4,2 ; @VC_CONTAINER_READ_FLAG_FORCE_TRACK
	.comm	_VC_CONTAINER_ERROR_EOS,8,3     ; @VC_CONTAINER_ERROR_EOS
	.comm	_VC_CONTAINER_ERROR_CORRUPTED,8,3 ; @VC_CONTAINER_ERROR_CORRUPTED
	.comm	_VC_CONTAINER_ERROR_CONTINUE,8,3 ; @VC_CONTAINER_ERROR_CONTINUE
	.comm	_VC_CONTAINER_READ_FLAG_SKIP,4,2 ; @VC_CONTAINER_READ_FLAG_SKIP
	.comm	_VC_CONTAINER_READ_FLAG_INFO,4,2 ; @VC_CONTAINER_READ_FLAG_INFO
	.comm	_VC_CONTAINER_PACKET_FLAG_KEYFRAME,4,2 ; @VC_CONTAINER_PACKET_FLAG_KEYFRAME
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_START,4,2 ; @VC_CONTAINER_PACKET_FLAG_FRAME_START
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_END,4,2 ; @VC_CONTAINER_PACKET_FLAG_FRAME_END
	.no_dead_strip	_mkv_reader_read
.subsections_via_symbols
