	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qedr_can_post_send
_qedr_can_post_send:                    ## @qedr_can_post_send
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	24(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r14
	addq	$8, %rdi
	callq	_qedr_wq_is_full
	movl	%eax, %r13d
	leaq	16(%rbx), %rdi
	callq	_qed_chain_get_elem_left_u32
	movq	_QEDR_MAX_SQE_ELEMENTS_PER_SQE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	testl	%r13d, %r13d
	jne	LBB0_3
## %bb.1:
	cmpq	%r15, %r14
	jg	LBB0_3
## %bb.2:
	movl	$1, %r12d
	cmpq	%rdx, %rax
	jge	LBB0_12
LBB0_3:
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.4:
	movq	_QEDR_QP_ERR_SQ_FULL@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_5
LBB0_6:
	cmpq	%r15, %r14
	jle	LBB0_9
LBB0_7:
	movq	_QEDR_QP_ERR_BAD_SR@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%ecx, (%rbx)
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdx, %r12
	movq	%rbx, %rdx
	movq	%rax, %r15
	callq	_DP_ERR
	movq	%r12, %rdx
	movq	%r15, %rax
	movl	(%r14), %ecx
	orl	%ecx, (%rbx)
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	movq	%rax, %r13
	callq	_DP_ERR
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rax
	movl	(%r12), %ecx
	orl	%ecx, (%rbx)
	cmpq	%r15, %r14
	jg	LBB0_7
LBB0_9:
	xorl	%r12d, %r12d
	cmpq	%rdx, %rax
	jge	LBB0_12
## %bb.10:
	movq	_QEDR_QP_ERR_SQ_PBL_FULL@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_DP_ERR
	movl	(%r14), %eax
	orl	%eax, (%rbx)
LBB0_12:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QEDR_MAX_SQE_ELEMENTS_PER_SQE,8,3 ## @QEDR_MAX_SQE_ELEMENTS_PER_SQE
	.comm	_QEDR_QP_ERR_SQ_FULL,4,2        ## @QEDR_QP_ERR_SQ_FULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error: WQ is full. Post send on QP %p failed (this error appears only once)\n"

	.comm	_QEDR_QP_ERR_BAD_SR,4,2         ## @QEDR_QP_ERR_BAD_SR
L_.str.1:                               ## @.str.1
	.asciz	"error: WR is bad. Post send on QP %p failed (this error appears only once)\n"

	.comm	_QEDR_QP_ERR_SQ_PBL_FULL,4,2    ## @QEDR_QP_ERR_SQ_PBL_FULL
L_.str.2:                               ## @.str.2
	.asciz	"error: WQ PBL is full. Post send on QP %p failed (this error appears only once)\n"

	.no_dead_strip	_qedr_can_post_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qedr_can_post_send
_qedr_can_post_send:                    ; @qedr_can_post_send
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	mov	x21, x0
	ldr	x24, [x21, #8]!
	ldr	x20, [x21, #16]
	ldr	x25, [x1]
	mov	x0, x21
	bl	_qedr_wq_is_full
	mov	x22, x0
	add	x0, x21, #8
	bl	_qed_chain_get_elem_left_u32
	mov	x21, x0
Lloh0:
	adrp	x8, _QEDR_MAX_SQE_ELEMENTS_PER_SQE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QEDR_MAX_SQE_ELEMENTS_PER_SQE@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	cbnz	w22, LBB0_3
; %bb.1:
	cmp	x25, x24
	ccmp	x21, x23, #8, le
	b.lt	LBB0_3
; %bb.2:
	mov	w0, #1
	b	LBB0_12
LBB0_3:
	cbz	w22, LBB0_5
; %bb.4:
	ldr	w8, [x19]
Lloh3:
	adrp	x22, _QEDR_QP_ERR_SQ_FULL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _QEDR_QP_ERR_SQ_FULL@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_8
LBB0_5:
	cmp	x25, x24
	b.le	LBB0_9
LBB0_6:
	ldr	w8, [x19]
Lloh5:
	adrp	x22, _QEDR_QP_ERR_BAD_SR@GOTPAGE
Lloh6:
	ldr	x22, [x22, _QEDR_QP_ERR_BAD_SR@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.7:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_DP_ERR
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_9
LBB0_8:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_DP_ERR
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	cmp	x25, x24
	b.gt	LBB0_6
LBB0_9:
	cmp	x21, x23
	b.ge	LBB0_11
; %bb.10:
	ldr	w8, [x19]
Lloh11:
	adrp	x21, _QEDR_QP_ERR_SQ_PBL_FULL@GOTPAGE
Lloh12:
	ldr	x21, [x21, _QEDR_QP_ERR_SQ_PBL_FULL@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_13
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_DP_ERR
	mov	w0, #0
	ldr	w8, [x21]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_QEDR_MAX_SQE_ELEMENTS_PER_SQE,8,3 ; @QEDR_MAX_SQE_ELEMENTS_PER_SQE
	.comm	_QEDR_QP_ERR_SQ_FULL,4,2        ; @QEDR_QP_ERR_SQ_FULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error: WQ is full. Post send on QP %p failed (this error appears only once)\n"

	.comm	_QEDR_QP_ERR_BAD_SR,4,2         ; @QEDR_QP_ERR_BAD_SR
l_.str.1:                               ; @.str.1
	.asciz	"error: WR is bad. Post send on QP %p failed (this error appears only once)\n"

	.comm	_QEDR_QP_ERR_SQ_PBL_FULL,4,2    ; @QEDR_QP_ERR_SQ_PBL_FULL
l_.str.2:                               ; @.str.2
	.asciz	"error: WQ PBL is full. Post send on QP %p failed (this error appears only once)\n"

	.no_dead_strip	_qedr_can_post_send
.subsections_via_symbols
