	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_vq
_handle_vq:                             ## @handle_vq
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	(%rax,%rsi,8), %r12
	movq	%r12, %rdi
	callq	_c2_mq_consume
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_vq_repbuf_alloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r13
	movl	(%r12), %edx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_memcpy
	movq	%r13, %r14
	jmp	LBB0_4
LBB0_2:
	leaq	-88(%rbp), %r13
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_memcpy
	xorl	%r14d, %r14d
LBB0_4:
	movq	%r12, %rdi
	callq	_c2_mq_free
	movq	(%r13), %r12
	testq	%r12, %r12
	je	LBB0_5
## %bb.6:
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_c2_errno
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_10
LBB0_5:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_vq_repbuf_free
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
	jmp	LBB0_15
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%eax, %eax
	jne	LBB0_14
LBB0_10:
	movl	(%r12), %eax
	cmpl	$129, %eax
	je	LBB0_13
## %bb.11:
	cmpl	$128, %eax
	jne	LBB0_14
## %bb.12:
	movl	24(%r12), %edi
	movq	_C2_QP_STATE_RTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_c2_set_qp_state
	movabsq	$549755814016, %rax             ## imm = 0x8000000080
	movq	%rax, -80(%rbp)
	movl	(%r12), %eax
LBB0_13:
	movl	%eax, -72(%rbp)
	movl	$0, -48(%rbp)
	movq	16(%r12), %rdi
	movl	12(%rdi), %eax
	movl	%eax, -52(%rbp)
	movl	8(%rdi), %eax
	movl	%eax, -56(%rbp)
	movq	$0, -64(%rbp)
	movl	$0, -68(%rbp)
	leaq	-80(%rbp), %rsi
	callq	*(%rdi)
LBB0_14:
	movl	%r14d, 12(%r12)
	leaq	8(%r12), %rdi
	movl	$1, %esi
	callq	_atomic_set
	leaq	4(%r12), %rdi
	callq	_wake_up
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_vq_req_put
LBB0_15:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"handle_vq: no repbufs!\n"

L_.str.1:                               ## @.str.1
	.asciz	"handle_vq: UNEXPECTEDLY got NULL req\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_C2_QP_STATE_RTS,4,2            ## @C2_QP_STATE_RTS
	.no_dead_strip	_handle_vq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_vq
_handle_vq:                             ; @handle_vq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	ldr	x8, [x0]
	ldr	x20, [x8, x1, lsl #3]
	mov	x0, x20
	bl	_c2_mq_consume
	cbz	x0, LBB0_14
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	bl	_vq_repbuf_alloc
	cbz	x0, LBB0_3
; %bb.2:
	mov	x22, x0
	ldr	w2, [x20]
	mov	x1, x21
	bl	_memcpy
	mov	x21, x22
	b	LBB0_4
LBB0_3:
	add	x22, sp, #40
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	add	x0, sp, #40
	mov	x1, x21
	mov	w2, #8
	bl	_memcpy
	mov	x21, #0
LBB0_4:
	mov	x0, x20
	bl	_c2_mq_free
	ldr	x20, [x22]
	cbz	x20, LBB0_7
; %bb.5:
	cbz	x21, LBB0_8
; %bb.6:
	mov	x0, x21
	bl	_c2_errno
	cbnz	w0, LBB0_13
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	mov	x1, x22
	bl	_vq_repbuf_free
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	b	LBB0_14
LBB0_8:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	cbnz	w0, LBB0_13
LBB0_9:
	ldr	w8, [x20]
	cmp	w8, #129
	b.eq	LBB0_12
; %bb.10:
	cmp	w8, #128
	b.ne	LBB0_13
; %bb.11:
	ldr	w0, [x20, #24]
Lloh7:
	adrp	x8, _C2_QP_STATE_RTS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _C2_QP_STATE_RTS@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_c2_set_qp_state
	movi.2s	v0, #128
	str	d0, [sp]
	ldr	w8, [x20]
LBB0_12:
	str	w8, [sp, #8]
	str	wzr, [sp, #32]
	ldr	x0, [x20, #16]
	ldr	d0, [x0, #8]
	str	d0, [sp, #24]
	str	xzr, [sp, #16]
	str	wzr, [sp, #12]
	ldr	x8, [x0]
	mov	x1, sp
	blr	x8
LBB0_13:
	str	w21, [x20, #12]
	add	x0, x20, #8
	mov	w1, #1
	bl	_atomic_set
	add	x0, x20, #4
	bl	_wake_up
	mov	x0, x19
	mov	x1, x20
	bl	_vq_req_put
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"handle_vq: no repbufs!\n"

l_.str.1:                               ; @.str.1
	.asciz	"handle_vq: UNEXPECTEDLY got NULL req\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_C2_QP_STATE_RTS,4,2            ; @C2_QP_STATE_RTS
	.no_dead_strip	_handle_vq
.subsections_via_symbols
