	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RingQueue_Enqueue              ## -- Begin function RingQueue_Enqueue
	.p2align	4, 0x90
_RingQueue_Enqueue:                     ## @RingQueue_Enqueue
	.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, %r13d
	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
	xorl	%edi, %edi
	cmpq	$0, (%r15)
	setg	%dil
	callq	_assert
	xorl	%r12d, %r12d
	testl	%r13d, %r13d
	jg	LBB0_1
LBB0_4:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setg	%dil
	callq	_assert
	cmpl	%ebx, %r13d
	cmovll	%r13d, %ebx
	movl	8(%r15), %edi
	addl	12(%r15), %edi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	_wi@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_RING_QUEUE_ADVANCE_INDEX
	movslq	%ebx, %rax
	addq	%rax, %r14
	addl	%eax, %r12d
	subl	%eax, %r13d
	jle	LBB0_4
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %eax
	movl	%eax, %ebx
	subl	8(%r15), %ebx
	testl	%ebx, %ebx
	jg	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, 8(%r15)
	movl	%eax, %ebx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_wi,4,2                         ## @wi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RingQueue_Enqueue              ; -- Begin function RingQueue_Enqueue
	.p2align	2
_RingQueue_Enqueue:                     ; @RingQueue_Enqueue
	.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, x2
	mov	x20, x1
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	x20, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w0, gt
	bl	_assert
	cmp	w19, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w22, #0
Lloh0:
	adrp	x24, _wi@GOTPAGE
Lloh1:
	ldr	x24, [x24, _wi@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	w23, #0
	cset	w0, gt
	bl	_assert
	cmp	w19, w23
	csel	w23, w19, w23, lt
	ldp	w9, w8, [x21, #8]
	add	w0, w9, w8
	mov	x1, x20
	mov	x2, x23
	bl	_memcpy
	ldr	w1, [x24]
	mov	x0, x21
	mov	x2, x23
	bl	_RING_QUEUE_ADVANCE_INDEX
	add	x20, x20, w23, sxtw
	add	w22, w23, w22
	sub	w19, w19, w23
	cmp	w19, #0
	b.le	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	ldr	w9, [x21, #8]
	sub	w23, w8, w9
	cmp	w23, #0
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x21, #8]
	mov	x23, x8
	b	LBB0_2
LBB0_5:
	mov	w22, #0
LBB0_6:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_wi,4,2                         ; @wi
.subsections_via_symbols
