	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asyncQueueAdvance
_asyncQueueAdvance:                     ## @asyncQueueAdvance
	.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	%esi, %ebx
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_QUEUE_POS_PAGE
	movl	%eax, %r15d
	movl	(%r14), %edi
	callq	_QUEUE_POS_OFFSET
	addl	%eax, %ebx
	movq	_QUEUE_PAGESIZE@GOTPCREL(%rip), %r13
	xorl	%edi, %edi
	cmpl	(%r13), %ebx
	setle	%dil
	callq	_Assert
	movq	_AsyncQueueEntryEmptySize@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_QUEUEALIGN
	addl	%ebx, %eax
	movq	_QUEUE_MAX_PAGE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	(%rcx), %r15d
	leal	1(%r15), %esi
	cmovgel	%edx, %esi
	xorl	%r12d, %r12d
	cmpl	(%r13), %eax
	cmovlel	%r15d, %esi
	setg	%r12b
	cmovgl	%edx, %ebx
	movl	(%r14), %edi
	movl	%ebx, %edx
	callq	_SET_QUEUE_POS
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QUEUE_PAGESIZE,4,2             ## @QUEUE_PAGESIZE
	.comm	_AsyncQueueEntryEmptySize,4,2   ## @AsyncQueueEntryEmptySize
	.comm	_QUEUE_MAX_PAGE,4,2             ## @QUEUE_MAX_PAGE
	.no_dead_strip	_asyncQueueAdvance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asyncQueueAdvance
_asyncQueueAdvance:                     ; @asyncQueueAdvance
	.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, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_QUEUE_POS_PAGE
	mov	x21, x0
	ldr	w0, [x20]
	bl	_QUEUE_POS_OFFSET
Lloh0:
	adrp	x22, _QUEUE_PAGESIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _QUEUE_PAGESIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w23, w0, w19
	cmp	w23, w8
	cset	w0, le
	bl	_Assert
Lloh2:
	adrp	x8, _AsyncQueueEntryEmptySize@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AsyncQueueEntryEmptySize@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_QUEUEALIGN
	ldr	w8, [x22]
Lloh5:
	adrp	x9, _QUEUE_MAX_PAGE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _QUEUE_MAX_PAGE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w21, w9
	csinc	w9, wzr, w21, ge
	add	w10, w0, w23
	cmp	w10, w8
	cset	w19, gt
	csel	w1, w9, w21, gt
	csel	w2, wzr, w23, gt
	ldr	w0, [x20]
	bl	_SET_QUEUE_POS
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_QUEUE_PAGESIZE,4,2             ; @QUEUE_PAGESIZE
	.comm	_AsyncQueueEntryEmptySize,4,2   ; @AsyncQueueEntryEmptySize
	.comm	_QUEUE_MAX_PAGE,4,2             ; @QUEUE_MAX_PAGE
	.no_dead_strip	_asyncQueueAdvance
.subsections_via_symbols
