	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qedr_gsi_post_recv             ## -- Begin function qedr_gsi_post_recv
	.p2align	4, 0x90
_qedr_gsi_post_recv:                    ## @qedr_gsi_post_recv
	.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	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_get_qedr_dev
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_get_qedr_qp
	movq	%rax, %r13
	movq	(%rax), %rdx
	movq	_QED_ROCE_QP_STATE_RTR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_3
## %bb.1:
	movq	_QED_ROCE_QP_STATE_RTS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_3
## %bb.2:
	movq	%rbx, (%r12)
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_DP_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_3:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%r13), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.4:
	movq	%r13, %r14
	addq	$16, %r14
	movq	_QEDR_GSI_MAX_RECV_SGE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdx
	movq	(%r12), %rcx
	cmpq	%rcx, %rdx
	jg	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r15), %rax
	movl	(%r15), %esi
	movl	4(%r15), %edi
	movq	24(%rbx), %rdx
	movl	(%rdx), %ecx
	movl	4(%rdx), %edx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%r13), %rdi
	shlq	$4, %rdi
	addq	24(%r13), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	16(%r13), %rax
	movq	24(%r13), %rcx
	shlq	$4, %rax
	movq	8(%rcx,%rax), %rax
	movq	24(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movl	16(%rbx), %eax
	movq	16(%r13), %rcx
	movq	24(%r13), %rdx
	shlq	$4, %rcx
	movl	%eax, (%rdx,%rcx)
	movq	%r14, %rdi
	callq	_qedr_inc_sw_prod
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_5
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_DP_ERR
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DP_ERR
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QED_ROCE_QP_STATE_RTR,8,3      ## @QED_ROCE_QP_STATE_RTR
	.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_RTR/S\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QEDR_GSI_MAX_RECV_SGE,8,3      ## @QEDR_GSI_MAX_RECV_SGE
L_.str.1:                               ## @.str.1
	.asciz	"gsi post recv: failed to post rx buffer. too many sges %d>%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"gsi post recv: failed to post rx buffer (rc=%d)\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qedr_gsi_post_recv             ; -- Begin function qedr_gsi_post_recv
	.p2align	2
_qedr_gsi_post_recv:                    ; @qedr_gsi_post_recv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w0, [x0]
	bl	_get_qedr_dev
	mov	x21, x0
	mov	x0, x22
	bl	_get_qedr_qp
	ldr	x2, [x0]
Lloh0:
	adrp	x8, _QED_ROCE_QP_STATE_RTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QED_ROCE_QP_STATE_RTR@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _QED_ROCE_QP_STATE_RTS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QED_ROCE_QP_STATE_RTS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x2, x8
	ccmp	x2, x9, #4, ne
	b.ne	LBB0_7
; %bb.1:
	mov	x23, x0
	add	x22, x0, #8
	mov	x0, x22
	bl	_spin_lock_irqsave
	cbz	x20, LBB0_6
; %bb.2:
	add	x24, x23, #16
Lloh6:
	adrp	x25, _QEDR_GSI_MAX_RECV_SGE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _QEDR_GSI_MAX_RECV_SGE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x20]
	ldr	x8, [x25]
	cmp	x2, x8
	b.gt	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldp	w1, w0, [x21]
	ldr	x9, [x20, #24]
	ldp	w3, w2, [x9]
	mov	x4, #0
	mov	w5, #1
	blr	x8
	cbnz	w0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x9, x8, [x23, #16]
	add	x0, x8, x9, lsl #4
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldp	x9, x8, [x23, #16]
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	ldr	x9, [x20, #24]
	ldr	x9, [x9]
	str	x9, [x8]
	ldr	w8, [x20, #16]
	ldp	x10, x9, [x23, #16]
	lsl	x10, x10, #4
	str	w8, [x9, x10]
	mov	x0, x24
	bl	_qedr_inc_sw_prod
	ldr	x20, [x20, #8]
	cbnz	x20, LBB0_3
LBB0_6:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_12
LBB0_7:
	str	x20, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_DP_ERR
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	b	LBB0_10
LBB0_9:
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
LBB0_10:
	bl	_DP_ERR
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	str	x20, [x19]
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_QED_ROCE_QP_STATE_RTR,8,3      ; @QED_ROCE_QP_STATE_RTR
	.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_RTR/S\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QEDR_GSI_MAX_RECV_SGE,8,3      ; @QEDR_GSI_MAX_RECV_SGE
l_.str.1:                               ; @.str.1
	.asciz	"gsi post recv: failed to post rx buffer. too many sges %d>%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"gsi post recv: failed to post rx buffer (rc=%d)\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
