	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rv9_reader_read
_rv9_reader_read:                       ## @rv9_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_rv9_read_frame_header
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_16
## %bb.2:
	movq	$1, (%rbx)
LBB0_3:
	movl	8(%rbx), %esi
	movl	%esi, (%r12)
	movl	12(%rbx), %eax
	cmpl	$2, %eax
	jg	LBB0_5
## %bb.4:
	imulq	$1000, 16(%rbx), %rcx           ## imm = 0x3E8
	jmp	LBB0_6
LBB0_5:
	movq	_VC_CONTAINER_TIME_UNKNOWN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
LBB0_6:
	movq	%rcx, 8(%r12)
	movq	%rcx, 16(%r12)
	movq	$0, 48(%r12)
	xorl	%ecx, %ecx
	cmpl	$2, %eax
	jge	LBB0_8
## %bb.7:
	movq	_VC_CONTAINER_PACKET_FLAG_KEYFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_8:
	movl	%ecx, 24(%r12)
	movl	4(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 24(%r12)
LBB0_10:
	movq	_VC_CONTAINER_READ_FLAG_SKIP@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	je	LBB0_14
## %bb.11:
	subl	%eax, %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_rv9_get_frame_data
	movl	4(%rbx), %eax
	cmpl	8(%rbx), %eax
	jne	LBB0_13
## %bb.12:
	movq	$0, (%rbx)
LBB0_13:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_STREAM_STATUS                  ## TAILCALL
LBB0_14:
	movq	_VC_CONTAINER_READ_FLAG_INFO@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	jne	LBB0_15
## %bb.17:
	subl	%eax, %esi
	movl	40(%r12), %eax
	movl	%esi, %edi
	movl	%eax, %esi
	callq	_MIN
	movq	32(%r12), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rv9_get_frame_data
	movl	4(%rbx), %ecx
	cmpl	8(%rbx), %ecx
	jne	LBB0_19
## %bb.18:
	movq	$0, (%rbx)
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 24(%r12)
LBB0_19:
	movl	%eax, (%r12)
	testl	%eax, %eax
	je	LBB0_13
LBB0_15:
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,4,2       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_TIME_UNKNOWN,8,3  ## @VC_CONTAINER_TIME_UNKNOWN
	.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_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_FRAME_END,4,2 ## @VC_CONTAINER_PACKET_FLAG_FRAME_END
	.no_dead_strip	_rv9_reader_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function rv9_reader_read
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_rv9_reader_read:                       ; @rv9_reader_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x22, [x8]
	ldr	w8, [x22]
	cbnz	w8, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_rv9_read_frame_header
Lloh0:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_17
; %bb.2:
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x22]
LBB0_3:
	ldp	w8, w9, [x22, #8]
	str	w8, [x20]
	cmp	w9, #2
	b.gt	LBB0_5
; %bb.4:
	ldr	x10, [x22, #16]
	mov	w11, #1000
	mul	x10, x10, x11
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x10, _VC_CONTAINER_TIME_UNKNOWN@GOTPAGE
Lloh6:
	ldr	x10, [x10, _VC_CONTAINER_TIME_UNKNOWN@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
LBB0_6:
	stp	x10, x10, [x20, #8]
Lloh8:
	adrp	x10, _VC_CONTAINER_PACKET_FLAG_KEYFRAME@GOTPAGE
Lloh9:
	ldr	x10, [x10, _VC_CONTAINER_PACKET_FLAG_KEYFRAME@GOTPAGEOFF]
	str	xzr, [x20, #48]
Lloh10:
	ldr	w10, [x10]
	cmp	w9, #2
	csel	w10, w10, wzr, lt
	str	w10, [x20, #24]
	ldr	w9, [x22, #4]
	cbnz	w9, LBB0_8
; %bb.7:
Lloh11:
	adrp	x11, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGE
Lloh12:
	ldr	x11, [x11, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	orr	w10, w11, w10
	str	w10, [x20, #24]
LBB0_8:
Lloh14:
	adrp	x10, _VC_CONTAINER_READ_FLAG_SKIP@GOTPAGE
Lloh15:
	ldr	x10, [x10, _VC_CONTAINER_READ_FLAG_SKIP@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	tst	w10, w21
	b.eq	LBB0_12
; %bb.9:
	sub	w1, w8, w9
	mov	x0, x19
	mov	x2, #0
	bl	_rv9_get_frame_data
	ldp	w8, w9, [x22, #4]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.10:
	str	xzr, [x22]
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_STREAM_STATUS
LBB0_12:
Lloh17:
	adrp	x10, _VC_CONTAINER_READ_FLAG_INFO@GOTPAGE
Lloh18:
	ldr	x10, [x10, _VC_CONTAINER_READ_FLAG_INFO@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	tst	w10, w21
	b.ne	LBB0_16
; %bb.13:
	sub	w0, w8, w9
	ldr	w1, [x20, #40]
	bl	_MIN
	mov	x1, x0
	ldr	x2, [x20, #32]
	mov	x0, x19
	bl	_rv9_get_frame_data
	ldp	w8, w9, [x22, #4]
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.14:
	str	xzr, [x22]
Lloh20:
	adrp	x8, _VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	w9, [x20, #24]
	orr	w8, w9, w8
	str	w8, [x20, #24]
LBB0_15:
	str	w0, [x20]
	cbz	w0, LBB0_11
LBB0_16:
Lloh23:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
LBB0_17:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,4,2       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_TIME_UNKNOWN,8,3  ; @VC_CONTAINER_TIME_UNKNOWN
	.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_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_FRAME_END,4,2 ; @VC_CONTAINER_PACKET_FLAG_FRAME_END
	.no_dead_strip	_rv9_reader_read
.subsections_via_symbols
