	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usbvideo_CollectRawData
_usbvideo_CollectRawData:               ## @usbvideo_CollectRawData
	.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	%rsi, %r14
	movq	%rdi, %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	leaq	12(%r15), %r12
	movq	%r12, %rdi
	callq	_RingQueue_GetLength
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movl	(%r15), %ebx
	movl	(%r14), %esi
	subl	%esi, %ebx
	addl	4(%r14), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_RingQueue_Dequeue
	addl	(%r14), %ebx
	movl	%ebx, (%r14)
	cmpl	(%r15), %ebx
	jl	LBB0_5
LBB0_4:
	movq	_FrameState_Done@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movl	$-1, 4(%r15)
	incl	8(%r15)
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%r14), %ebx
	cmpl	(%r15), %ebx
	jge	LBB0_4
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_FrameState_Done,4,2            ## @FrameState_Done
	.no_dead_strip	_usbvideo_CollectRawData
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usbvideo_CollectRawData
_usbvideo_CollectRawData:               ; @usbvideo_CollectRawData
	.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	x20, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	x20, #0
	cset	w0, ne
	bl	_assert
	add	x21, x19, #12
	mov	x0, x21
	bl	_RingQueue_GetLength
	cmp	w0, #0
	b.le	LBB0_2
; %bb.1:
	ldr	w8, [x19]
	ldp	w9, w10, [x20]
	sub	w22, w8, w9
	add	w1, w10, w9
	mov	x0, x21
	mov	x2, x22
	bl	_RingQueue_Dequeue
	ldr	w8, [x20]
	add	w8, w8, w22
	str	w8, [x20]
	b	LBB0_3
LBB0_2:
	ldr	w8, [x20]
LBB0_3:
	ldr	w9, [x19]
	cmp	w8, w9
	b.lt	LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _FrameState_Done@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FrameState_Done@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	mov	w8, #-1
	ldr	w9, [x19, #8]
	add	w9, w9, #1
	stp	w8, w9, [x19, #4]
LBB0_5:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_FrameState_Done,4,2            ; @FrameState_Done
	.no_dead_strip	_usbvideo_CollectRawData
.subsections_via_symbols
