	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_check_send_wqe             ## -- Begin function qib_check_send_wqe
	.p2align	4, 0x90
_qib_check_send_wqe:                    ## @qib_check_send_wqe
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	4(%rdi), %eax
	xorl	%r15d, %r15d
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_8
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	$21, %ecx
	btl	%eax, %ecx
	jae	LBB0_2
## %bb.6:
	movq	%rbx, %rdi
	callq	_rvt_get_swqe_ah
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	%eax, (%rbx)
	jg	LBB0_3
## %bb.7:
	movl	$1, (%r14)
	jmp	LBB0_8
LBB0_2:
	movl	(%rbx), %eax
	cmpl	$-2147483647, %eax              ## imm = 0x80000001
	jb	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpl	(%rdi), %eax
	jle	LBB0_8
## %bb.5:
	movl	$0, (%r14)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_check_send_wqe             ; -- Begin function qib_check_send_wqe
	.p2align	2
_qib_check_send_wqe:                    ; @qib_check_send_wqe
	.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
	ldr	w8, [x0, #4]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_8
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	w21, #1
	lsl	w8, w21, w8
	mov	w9, #21
	tst	w8, w9
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_rvt_get_swqe_ah
	ldr	w8, [x20]
	ldr	w9, [x0]
	lsl	w9, w21, w9
	cmp	w8, w9
	b.gt	LBB0_5
; %bb.3:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_9
LBB0_4:
	ldr	w8, [x20]
	mov	w9, #-2147483647
	cmp	w8, w9
	b.lo	LBB0_6
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_6:
	ldr	w9, [x0]
	cmp	w8, w9
	b.le	LBB0_8
; %bb.7:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
