	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wqs_next_block
_wqs_next_block:                        ## @wqs_next_block
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_down
	movq	(%rbx), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%rbx)
	testq	%rax, %rax
	jle	LBB0_1
## %bb.2:
	movslq	24(%rbx), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 24(%rbx)
	movq	_WQS_MAX_NUM_BLOCKS@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	decq	%rcx
	andq	%rax, %rcx
	movq	16(%rbx), %rax
	movl	(%rax,%rcx,8), %edx
	movl	%edx, (%r15)
	movl	4(%rax,%rcx,8), %edx
	movl	%edx, (%r14)
	movq	$-1, (%rax,%rcx,8)
	movq	%r12, %rdi
	callq	_up
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	%rax, (%rbx)
	movq	%r12, %rdi
	callq	_up
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_WQS_MAX_NUM_BLOCKS,4,2         ## @WQS_MAX_NUM_BLOCKS
	.no_dead_strip	_wqs_next_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wqs_next_block
_wqs_next_block:                        ; @wqs_next_block
	.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, x2
	mov	x21, x1
	mov	x22, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_down
	ldr	x8, [x22]
	sub	x9, x8, #1
	str	x9, [x22]
	cmp	x8, #0
	b.le	LBB0_2
; %bb.1:
	ldr	w8, [x22, #24]
	add	w9, w8, #1
Lloh0:
	adrp	x10, _WQS_MAX_NUM_BLOCKS@GOTPAGE
Lloh1:
	ldr	x10, [x10, _WQS_MAX_NUM_BLOCKS@GOTPAGEOFF]
	str	w9, [x22, #24]
Lloh2:
	ldr	w9, [x10]
	sub	w9, w9, #1
	and	w8, w9, w8
	ldr	x9, [x22, #16]
	add	x8, x9, w8, sxtw #3
	ldr	w9, [x8]
	str	w9, [x21]
	ldr	w9, [x8, #4]
	str	w9, [x20]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x8]
	mov	x0, x19
	bl	_up
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	str	x8, [x22]
	mov	x0, x19
	bl	_up
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_WQS_MAX_NUM_BLOCKS,4,2         ; @WQS_MAX_NUM_BLOCKS
	.no_dead_strip	_wqs_next_block
.subsections_via_symbols
