	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rawvideo_reader_read
_rawvideo_reader_read:                  ## @rawvideo_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	movq	(%rbx), %rax
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_21
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	cmpq	$0, 24(%rbx)
	je	LBB0_6
## %bb.2:
	cmpl	$0, 8(%rbx)
	jne	LBB0_6
## %bb.3:
	cmpl	$0, 12(%rbx)
	je	LBB0_4
LBB0_6:
	cmpl	$0, 8(%rbx)
	je	LBB0_7
LBB0_8:
	movq	_VC_CONTAINER_TIME_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_4:
	movq	%r14, %rdi
	callq	_read_yuv4mpeg2_frame_header
	movq	%rax, (%rbx)
	cmpq	(%r13), %rax
	jne	LBB0_21
## %bb.5:
	movl	$1, 12(%rbx)
	cmpl	$0, 8(%rbx)
	jne	LBB0_8
LBB0_7:
	movl	16(%rbx), %r13d
	movl	$1000000, %edi                  ## imm = 0xF4240
	callq	_INT64_C
	imull	%r13d, %eax
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r13
	movq	(%r14), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	imull	(%rcx), %eax
	cltd
	idivl	4(%rcx)
LBB0_9:
	movl	%eax, 4(%r12)
	movl	%eax, (%r12)
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPCREL(%rip), %rax
	movq	_VC_CONTAINER_PACKET_FLAG_KEYFRAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 8(%r12)
	movl	8(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 8(%r12)
LBB0_11:
	movl	20(%rbx), %esi
	movl	%esi, 12(%r12)
	subl	%eax, %esi
	movl	%esi, 16(%r12)
	movq	$0, 32(%r12)
	movq	_VC_CONTAINER_READ_FLAG_SKIP@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_14
## %bb.12:
	movq	%r14, %rdi
	callq	_SKIP_BYTES
	movq	$0, 8(%rbx)
	incl	16(%rbx)
LBB0_13:
	movq	%r14, %rdi
	callq	_STREAM_STATUS
LBB0_20:
	movq	%rax, (%rbx)
	jmp	LBB0_21
LBB0_14:
	movq	_VC_CONTAINER_READ_FLAG_INFO@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_16
## %bb.15:
	movq	(%r13), %rax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	24(%r12), %eax
	movl	%esi, %edi
	movl	%eax, %esi
	callq	_MIN
	movl	20(%r12), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_READ_BYTES
	movl	8(%rbx), %ecx
	addl	%eax, %ecx
	movl	%ecx, 8(%rbx)
	movl	%eax, 16(%r12)
	cmpl	20(%rbx), %ecx
	jne	LBB0_18
## %bb.17:
	movq	$0, 8(%rbx)
	incl	16(%rbx)
LBB0_18:
	testl	%eax, %eax
	je	LBB0_13
## %bb.19:
	movq	(%r13), %rax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_TIME_UNKNOWN,4,2  ## @VC_CONTAINER_TIME_UNKNOWN
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_END,4,2 ## @VC_CONTAINER_PACKET_FLAG_FRAME_END
	.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
	.no_dead_strip	_rawvideo_reader_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rawvideo_reader_read
_rawvideo_reader_read:                  ; @rawvideo_reader_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x22, [x8]
	ldr	x0, [x22]
Lloh0:
	adrp	x23, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.1:
	mov	x21, x2
	mov	x20, x1
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w8, [x22, #8]
	cbnz	w8, LBB0_4
; %bb.3:
	ldr	w8, [x22, #12]
	cbz	w8, LBB0_6
LBB0_4:
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_8
LBB0_5:
Lloh2:
	adrp	x8, _VC_CONTAINER_TIME_UNKNOWN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VC_CONTAINER_TIME_UNKNOWN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_read_yuv4mpeg2_frame_header
	str	x0, [x22]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.7:
	mov	w8, #1
	str	w8, [x22, #12]
	ldr	w8, [x22, #8]
	cbnz	w8, LBB0_5
LBB0_8:
	ldr	w24, [x22, #16]
	mov	w0, #16960
	movk	w0, #15, lsl #16
	bl	_INT64_C
	mul	w8, w0, w24
	ldr	x9, [x19]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldp	w10, w9, [x9]
	mul	w8, w8, w10
	sdiv	w8, w8, w9
LBB0_9:
	stp	w8, w8, [x20]
Lloh5:
	adrp	x8, _VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _VC_CONTAINER_PACKET_FLAG_KEYFRAME@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VC_CONTAINER_PACKET_FLAG_KEYFRAME@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w9, w9, w8
	str	w9, [x20, #8]
	ldr	w8, [x22, #8]
	cbnz	w8, LBB0_11
; %bb.10:
Lloh11:
	adrp	x10, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGE
Lloh12:
	ldr	x10, [x10, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x20, #8]
LBB0_11:
	ldr	w9, [x22, #20]
	sub	w1, w9, w8
	stp	w9, w1, [x20, #12]
	str	xzr, [x20, #32]
Lloh14:
	adrp	x8, _VC_CONTAINER_READ_FLAG_SKIP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VC_CONTAINER_READ_FLAG_SKIP@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_15
; %bb.12:
	mov	x0, x19
	bl	_SKIP_BYTES
	ldr	w8, [x22, #16]
	add	w8, w8, #1
	str	w8, [x22, #16]
	str	xzr, [x22, #8]
LBB0_13:
	mov	x0, x19
	bl	_STREAM_STATUS
LBB0_14:
	str	x0, [x22]
	b	LBB0_17
LBB0_15:
Lloh17:
	adrp	x8, _VC_CONTAINER_READ_FLAG_INFO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VC_CONTAINER_READ_FLAG_INFO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_18
; %bb.16:
	ldr	x0, [x23]
LBB0_17:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_18:
	ldr	w8, [x20, #24]
	mov	x0, x1
	mov	x1, x8
	bl	_MIN
	mov	x2, x0
	ldr	w1, [x20, #20]
	mov	x0, x19
	bl	_READ_BYTES
	ldr	w8, [x22, #8]
	ldr	w9, [x22, #20]
	add	w8, w8, w0
	cmp	w8, w9
	str	w8, [x22, #8]
	str	w0, [x20, #16]
	b.ne	LBB0_20
; %bb.19:
	str	xzr, [x22, #8]
	ldr	w8, [x22, #16]
	add	w8, w8, #1
	str	w8, [x22, #16]
LBB0_20:
	cbz	w0, LBB0_13
; %bb.21:
	ldr	x0, [x23]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_TIME_UNKNOWN,4,2  ; @VC_CONTAINER_TIME_UNKNOWN
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_END,4,2 ; @VC_CONTAINER_PACKET_FLAG_FRAME_END
	.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
	.no_dead_strip	_rawvideo_reader_read
.subsections_via_symbols
