	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qedr_gsi_post_send             ## -- Begin function qedr_gsi_post_send
	.p2align	4, 0x90
_qedr_gsi_post_send:                    ## @qedr_gsi_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	$0, -64(%rbp)
	callq	_get_qedr_qp
	movq	%rax, %r13
	movq	(%rax), %rdx
	movq	16(%rax), %r15
	movq	_QED_ROCE_QP_STATE_RTS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_1
## %bb.3:
	movq	(%r12), %rdx
	movq	_RDMA_MAX_SGE_PER_SQ_WQE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %rdx
	jle	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
	jmp	LBB0_5
LBB0_1:
	movq	%r12, (%r14)
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	movq	8(%r12), %rdx
	movq	_IB_WR_SEND@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_7
## %bb.8:
	leaq	8(%r13), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	leaq	-64(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_qedr_gsi_build_packet
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_10:
	movq	%r12, (%r14)
LBB0_11:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	-64(%rbp), %rsi
	movq	%r15, %rdi
	callq	_qedr_ll2_post_tx
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DP_ERR
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	%r12, (%r14)
	jmp	LBB0_15
LBB0_13:
	movl	24(%r12), %eax
	movq	24(%r13), %rcx
	movq	32(%r13), %rdx
	movq	%r13, %rdi
	addq	$24, %rdi
	movl	%eax, (%rdx,%rcx,4)
	callq	_qedr_inc_sw_prod
	movq	16(%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_QEDR_MSG_GSI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	8(%r12), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_in_irq
	movl	%eax, %r13d
	xorl	%eax, %eax
	callq	_irqs_disabled
	movl	24(%r12), %ecx
	movl	%ecx, (%rsp)
	leaq	L_.str.3(%rip), %rdx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%r13d, %r8d
	movl	%eax, %r9d
	callq	_DP_DEBUG
LBB0_15:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	cmpq	$0, 16(%r12)
	je	LBB0_11
## %bb.16:
	leaq	L_.str.5(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
	movq	16(%r12), %rax
	movq	%rax, (%r14)
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_QED_ROCE_QP_STATE_RTS,8,3      ## @QED_ROCE_QP_STATE_RTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gsi post recv: failed to post rx buffer. state is %d and not QED_ROCE_QP_STATE_RTS\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RDMA_MAX_SGE_PER_SQ_WQE,8,3    ## @RDMA_MAX_SGE_PER_SQ_WQE
L_.str.1:                               ## @.str.1
	.asciz	"gsi post send: num_sge is too large (%d>%d)\n"

	.comm	_IB_WR_SEND,8,3                 ## @IB_WR_SEND
L_.str.2:                               ## @.str.2
	.asciz	"gsi post send: failed due to unsupported opcode %d\n"

	.comm	_QEDR_MSG_GSI,4,2               ## @QEDR_MSG_GSI
L_.str.3:                               ## @.str.3
	.asciz	"gsi post send: opcode=%d, in_irq=%ld, irqs_disabled=%d, wr_id=%llx\n"

L_.str.4:                               ## @.str.4
	.asciz	"gsi post send: failed to transmit (rc=%d)\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.5:                               ## @.str.5
	.asciz	"gsi post send: failed second WR. Only one WR may be passed at a time\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qedr_gsi_post_send             ; -- Begin function qedr_gsi_post_send
	.p2align	2
_qedr_gsi_post_send:                    ; @qedr_gsi_post_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x2
	mov	x20, x1
	str	xzr, [sp, #24]
	bl	_get_qedr_qp
	ldr	x21, [x0, #16]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _QED_ROCE_QP_STATE_RTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QED_ROCE_QP_STATE_RTS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _RDMA_MAX_SGE_PER_SQ_WQE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RDMA_MAX_SGE_PER_SQ_WQE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_5
; %bb.2:
	stp	x8, x9, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_3:
	str	x20, [x19]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_DP_ERR
LBB0_4:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_11
LBB0_5:
	ldr	x8, [x20, #8]
Lloh13:
	adrp	x9, _IB_WR_SEND@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IB_WR_SEND@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	mov	x23, x0
	add	x22, x0, #8
	mov	x0, x22
	bl	_spin_lock_irqsave
	add	x3, sp, #24
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_qedr_gsi_build_packet
	cbz	w0, LBB0_12
; %bb.7:
	mov	x24, x0
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	b	LBB0_10
LBB0_8:
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x21
	bl	_DP_ERR
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_10:
	str	x20, [x19]
LBB0_11:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
	ldr	x1, [sp, #24]
	mov	x0, x21
	bl	_qedr_ll2_post_tx
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_14
; %bb.13:
	str	x0, [sp]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_DP_ERR
Lloh23:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w24, w8
	str	x20, [x19]
	b	LBB0_15
LBB0_14:
	ldr	w8, [x20, #24]
	ldp	x9, x10, [x23, #24]!
	str	w8, [x10, x9, lsl #2]
	mov	x0, x23
	bl	_qedr_inc_sw_prod
	ldur	x23, [x23, #-8]
Lloh26:
	adrp	x8, _QEDR_MSG_GSI@GOTPAGE
Lloh27:
	ldr	x8, [x8, _QEDR_MSG_GSI@GOTPAGEOFF]
Lloh28:
	ldr	w24, [x8]
	ldr	x25, [x20, #8]
	bl	_in_irq
	mov	x26, x0
	bl	_irqs_disabled
	mov	x5, x0
	ldr	w6, [x20, #24]
Lloh29:
	adrp	x2, l_.str.3@PAGE
Lloh30:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x23
	mov	x1, x24
	mov	x3, x25
	mov	x4, x26
	bl	_DP_DEBUG
	mov	w24, #0
LBB0_15:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_11
; %bb.16:
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_DP_ERR
	ldr	x8, [x20, #16]
	str	x8, [x19]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_QED_ROCE_QP_STATE_RTS,8,3      ; @QED_ROCE_QP_STATE_RTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gsi post recv: failed to post rx buffer. state is %d and not QED_ROCE_QP_STATE_RTS\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RDMA_MAX_SGE_PER_SQ_WQE,8,3    ; @RDMA_MAX_SGE_PER_SQ_WQE
l_.str.1:                               ; @.str.1
	.asciz	"gsi post send: num_sge is too large (%d>%d)\n"

	.comm	_IB_WR_SEND,8,3                 ; @IB_WR_SEND
l_.str.2:                               ; @.str.2
	.asciz	"gsi post send: failed due to unsupported opcode %d\n"

	.comm	_QEDR_MSG_GSI,4,2               ; @QEDR_MSG_GSI
l_.str.3:                               ; @.str.3
	.asciz	"gsi post send: opcode=%d, in_irq=%ld, irqs_disabled=%d, wr_id=%llx\n"

l_.str.4:                               ; @.str.4
	.asciz	"gsi post send: failed to transmit (rc=%d)\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.5:                               ; @.str.5
	.asciz	"gsi post send: failed second WR. Only one WR may be passed at a time\n"

.subsections_via_symbols
