	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function RingQueue_Allocate
_RingQueue_Allocate:                    ## @RingQueue_Allocate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setg	%dil
	callq	_assert
	movl	$-1, %eax
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	leal	2(%rax), %ecx
	movl	%ebx, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	incl	%eax
	testl	%edx, %edx
	jne	LBB0_1
## %bb.2:
	movl	$1, %edi
	movl	$1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	incb	%al
	movl	%eax, %ecx
	shll	%cl, %edi
	cmpl	%ebx, %edx
	cmovel	%ebx, %edi
	movl	%edi, (%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
	callq	_usbvideo_rvmalloc
	movq	%rax, 8(%r14)
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_assert                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_RingQueue_Allocate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RingQueue_Allocate
_RingQueue_Allocate:                    ; @RingQueue_Allocate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	w19, #0
	cset	w0, gt
	bl	_assert
	clz	w8, w19
	mov	w9, #32
	sub	w8, w9, w8
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	sub	w9, w8, #1
	mov	w10, #1
	lsl	w9, w10, w9
	lsl	w8, w10, w8
	cmp	w9, w19
	csel	w0, w19, w8, eq
	str	w0, [x20]
	stp	xzr, xzr, [x20, #16]
	bl	_usbvideo_rvmalloc
	str	x0, [x20, #8]
	cmp	x0, #0
	cset	w0, ne
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_assert
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_RingQueue_Allocate
.subsections_via_symbols
