	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rvt_qp_is_avail
_rvt_qp_is_avail:                       ## @rvt_qp_is_avail
	.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, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r13
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_smp_mb__before_atomic
	movl	%ebx, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	addq	$40, %r13
	movq	%r13, %rdi
	callq	_atomic_read
	cmpq	(%r14), %rax
	jl	LBB0_9
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_3:
	movl	(%r13), %edi
	callq	_likely
	testq	%rax, %rax
	jne	LBB0_9
## %bb.4:
	leaq	20(%r13), %rdi
	callq	_smp_load_acquire
	movq	%rax, %r12
	subq	8(%r13), %r12
	jg	LBB0_6
## %bb.5:
	movslq	16(%r13), %rax
	addq	%rax, %r12
LBB0_6:
	leaq	40(%r13), %rdi
	callq	_atomic_read
	movq	(%r14), %rcx
	subq	%rcx, %rax
	addq	%r12, %rax
	decq	%rax
	testq	%rax, %rax
	jle	LBB0_2
## %bb.7:
	movl	%eax, (%r13)
	cltq
	movslq	16(%r13), %rdx
	notq	%rcx
	addq	%rdx, %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	setg	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	36(%r13), %edx
	movl	16(%r13), %ecx
	movl	(%r13), %r8d
	movq	8(%r13), %r9
	movl	32(%r13), %r10d
	movl	28(%r13), %r11d
	movl	24(%r13), %eax
	movl	20(%r13), %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	pushq	%rbx
	pushq	%rax
	pushq	%r11
	pushq	%r10
	callq	_rvt_pr_err
	addq	$32, %rsp
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"More avail entries than QP RB size.\nQP: %u, size: %u, avail: %u\nhead: %u, tail: %u, cur: %u, acked: %u, last: %u"

	.no_dead_strip	_rvt_qp_is_avail
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rvt_qp_is_avail
_rvt_qp_is_avail:                       ; @rvt_qp_is_avail
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_smp_mb__before_atomic
	mov	x0, x21
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.1:
	add	x0, x20, #40
	bl	_atomic_read
	ldr	x8, [x19]
	cmp	x0, x8
	b.lt	LBB0_9
LBB0_2:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_3:
	ldr	w0, [x20]
	bl	_likely
	cbnz	x0, LBB0_9
; %bb.4:
	add	x0, x20, #20
	bl	_smp_load_acquire
	ldr	x8, [x20, #8]
	subs	x21, x0, x8
	b.gt	LBB0_6
; %bb.5:
	ldrsw	x8, [x20, #16]
	add	x21, x21, x8
LBB0_6:
	add	x0, x20, #40
	bl	_atomic_read
	ldr	x8, [x19]
	sub	x9, x0, x8
	add	x9, x21, x9
	sub	x9, x9, #1
	cmp	x9, #0
	b.le	LBB0_2
; %bb.7:
	str	w9, [x20]
	ldrsw	x10, [x20, #16]
	mvn	x8, x8
	add	x8, x8, x10
	cmp	x8, w9, sxtw
	cset	w0, lt
	bl	_WARN_ON
	cbz	x0, LBB0_10
; %bb.8:
	ldr	w4, [x20]
	ldr	x5, [x20, #8]
	ldp	w6, w2, [x20, #32]
	ldp	w8, w7, [x20, #24]
	ldp	w3, w9, [x20, #16]
	stp	w8, w9, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_rvt_pr_err
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"More avail entries than QP RB size.\nQP: %u, size: %u, avail: %u\nhead: %u, tail: %u, cur: %u, acked: %u, last: %u"

	.no_dead_strip	_rvt_qp_is_avail
.subsections_via_symbols
