	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RingQueue_Dequeue              ## -- Begin function RingQueue_Dequeue
	.p2align	4, 0x90
_RingQueue_Dequeue:                     ## @RingQueue_Dequeue
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	xorl	%edi, %edi
	testq	%r13, %r13
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	movq	%r13, %rdi
	callq	_RingQueue_GetLength
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cmpl	%r14d, %eax
	cmovll	%eax, %r14d
	movl	(%r13), %eax
	cmpl	4(%r13), %eax
	jle	LBB0_3
## %bb.4:
	movslq	%eax, %rsi
	movl	8(%r13), %ebx
	subl	%eax, %ebx
	cmpl	%ebx, %r14d
	cmovll	%r14d, %ebx
	addq	16(%r13), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	movl	%r14d, %r12d
	subl	%ebx, %r12d
	movslq	%ebx, %rcx
	addq	%rcx, %r15
	addl	(%r13), %ecx
	movl	8(%r13), %eax
	decl	%eax
	andl	%ecx, %eax
	movl	%eax, (%r13)
	testl	%r12d, %r12d
	jne	LBB0_6
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_3:
	movl	%r14d, %r12d
	testl	%r12d, %r12d
	je	LBB0_7
LBB0_6:
	movslq	%eax, %rsi
	addq	16(%r13), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_memcpy
	addl	(%r13), %r12d
	movl	8(%r13), %eax
	decl	%eax
	andl	%r12d, %eax
	movl	%eax, (%r13)
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RingQueue_Dequeue              ; -- Begin function RingQueue_Dequeue
	.p2align	2
_RingQueue_Dequeue:                     ; @RingQueue_Dequeue
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	x20, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x19
	bl	_RingQueue_GetLength
	cbz	w0, LBB0_3
; %bb.1:
	cmp	w0, w21
	csel	w21, w0, w21, lt
	ldp	w8, w9, [x19]
	cmp	w8, w9
	b.le	LBB0_4
; %bb.2:
	sxtw	x9, w8
	ldr	w10, [x19, #8]
	sub	w8, w10, w8
	cmp	w21, w8
	csel	w23, w21, w8, lt
	ldr	x8, [x19, #16]
	add	x1, x8, x9
	mov	x0, x20
	mov	x2, x23
	bl	_memcpy
	sub	w22, w21, w23
	add	x20, x20, w23, sxtw
	ldr	w8, [x19]
	ldr	w9, [x19, #8]
	sub	w9, w9, #1
	add	w8, w8, w23
	and	w8, w9, w8
	str	w8, [x19]
	cbnz	w22, LBB0_5
	b	LBB0_6
LBB0_3:
	mov	w21, #0
	b	LBB0_6
LBB0_4:
	mov	x22, x21
	cbz	w22, LBB0_6
LBB0_5:
	ldr	x9, [x19, #16]
	add	x1, x9, w8, sxtw
	mov	x0, x20
	mov	x2, x22
	bl	_memcpy
	ldr	w8, [x19]
	ldr	w9, [x19, #8]
	sub	w9, w9, #1
	add	w8, w8, w22
	and	w8, w9, w8
	str	w8, [x19]
LBB0_6:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
