	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nes_post_recv
_nes_post_recv:                         ## @nes_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_to_nesvnic
	movq	(%rax), %r13
	movq	%r14, %rdi
	callq	_to_nesqp
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_IB_QPS_RTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	testl	%r14d, %r14d
	jne	LBB0_22
	jmp	LBB0_23
LBB0_2:
	movl	16(%r15), %r12d
	leaq	8(%r15), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.4:
	movl	20(%r15), %r14d
	leal	(%r12,%r12), %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leal	-1(%r12), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r12, %rsi
	xorl	%r12d, %r12d
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r14d, %r14d
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %edi
	movq	_NES_IWARP_RQ_WQE_TOTAL_PAYLOAD_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r14d, %edx
	callq	_set_wqe_32bit_value
	movq	8(%rbx), %rbx
	movq	-112(%rbp), %r14                ## 8-byte Reload
	incl	%r14d
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	incl	%r12d
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	cmpl	%esi, %r14d
	movl	$0, %eax
	cmovgel	%eax, %r14d
	testq	%rbx, %rbx
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_16
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	cmpq	$0, 40(%r15)
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rbx), %ecx
	movq	8(%r13), %rax
	cmpl	(%rax), %ecx
	jg	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	addl	%r14d, %eax
	subl	24(%r15), %eax
	cltd
	idivl	%esi
	cmpl	-52(%rbp), %edx                 ## 4-byte Folded Reload
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movq	_NES_DBG_IW_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	callq	_nes_debug
	movq	32(%r15), %r12
	movq	%r14, -112(%rbp)                ## 8-byte Spill
	movslq	%r14d, %r14
	movq	%r15, %rsi
	leaq	(%r12,%r14,4), %r15
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_nes_fill_init_qp_wqe
	movq	24(%rbx), %rdx
	movl	(%r12,%r14,4), %edi
	movq	_NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_set_wqe_64bit_value
	cmpl	$0, (%rbx)
	jle	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rbx), %rax
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %edi
	movq	_NES_IWARP_RQ_WQE_FRAG0_LOW_IDX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	%r12, %rsi
	movq	8(%rax,%r12,4), %rdx
	callq	_set_wqe_64bit_value
	movl	(%r15), %edi
	movq	_NES_IWARP_RQ_WQE_LENGTH0_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	movq	16(%rbx), %rax
	movl	(%rax,%r12,4), %edx
	callq	_set_wqe_32bit_value
	movl	(%r15), %edi
	movq	_NES_IWARP_RQ_WQE_STAG0_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	movq	16(%rbx), %rax
	movl	4(%rax,%r12,4), %edx
	callq	_set_wqe_32bit_value
	movq	16(%rbx), %rax
	addl	(%rax,%r12,4), %r14d
	incq	%r13
	movslq	(%rbx), %rcx
	addq	$4, %r12
	cmpq	%rcx, %r13
	jl	LBB0_14
	jmp	LBB0_15
LBB0_3:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_barrier
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_16:
	movl	%r14d, 20(%r15)
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_barrier
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%r14d, 20(%r15)
	movq	%rcx, %r14
	xorl	%eax, %eax
	callq	_barrier
	testl	%r12d, %r12d
	je	LBB0_20
LBB0_17:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %r14
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movl	$255, %esi
	callq	_min
	movq	_NES_WQE_ALLOC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%r13), %rdi
	movl	%eax, %r15d
	movl	%eax, %esi
	shll	$24, %esi
	orl	28(%r14), %esi
	callq	_nes_write32
	subl	%r15d, %r12d
	jne	LBB0_18
## %bb.19:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_20:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	testl	%r14d, %r14d
	je	LBB0_23
LBB0_22:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
LBB0_23:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QPS_RTS,8,3                 ## @IB_QPS_RTS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NES_DBG_IW_RX,4,2              ## @NES_DBG_IW_RX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ibwr sge count = %u.\n"

	.comm	_NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX,8,3 ## @NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX
	.comm	_NES_IWARP_RQ_WQE_FRAG0_LOW_IDX,8,3 ## @NES_IWARP_RQ_WQE_FRAG0_LOW_IDX
	.comm	_NES_IWARP_RQ_WQE_LENGTH0_IDX,8,3 ## @NES_IWARP_RQ_WQE_LENGTH0_IDX
	.comm	_NES_IWARP_RQ_WQE_STAG0_IDX,8,3 ## @NES_IWARP_RQ_WQE_STAG0_IDX
	.comm	_NES_IWARP_RQ_WQE_TOTAL_PAYLOAD_IDX,8,3 ## @NES_IWARP_RQ_WQE_TOTAL_PAYLOAD_IDX
	.comm	_NES_WQE_ALLOC,8,3              ## @NES_WQE_ALLOC
	.no_dead_strip	_nes_post_recv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nes_post_recv
_nes_post_recv:                         ; @nes_post_recv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_to_nesvnic
	ldr	x24, [x0]
	mov	x0, x21
	bl	_to_nesqp
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _IB_QPS_RTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_QPS_RTS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w25, w8
	cbnz	w25, LBB0_20
	b	LBB0_21
LBB0_2:
	mov	x27, x0
	ldr	w26, [x0, #16]
	add	x21, x0, #8
	mov	x0, x21
	mov	x1, #0
	bl	_spin_lock_irqsave
	cbz	x20, LBB0_12
; %bb.3:
	stp	x21, x22, [sp, #8]              ; 16-byte Folded Spill
	mov	w23, #0
	ldr	w19, [x27, #20]
	lsl	w9, w26, #1
	sub	w8, w26, #1
	stp	w8, w9, [sp, #52]               ; 8-byte Folded Spill
Lloh6:
	adrp	x21, _NES_IWARP_RQ_WQE_FRAG0_LOW_IDX@GOTPAGE
Lloh7:
	ldr	x21, [x21, _NES_IWARP_RQ_WQE_FRAG0_LOW_IDX@GOTPAGEOFF]
Lloh8:
	adrp	x25, _NES_IWARP_RQ_WQE_LENGTH0_IDX@GOTPAGE
Lloh9:
	ldr	x25, [x25, _NES_IWARP_RQ_WQE_LENGTH0_IDX@GOTPAGEOFF]
Lloh10:
	adrp	x28, _NES_IWARP_RQ_WQE_STAG0_IDX@GOTPAGE
Lloh11:
	ldr	x28, [x28, _NES_IWARP_RQ_WQE_STAG0_IDX@GOTPAGEOFF]
	stp	x27, x24, [sp, #32]             ; 16-byte Folded Spill
	str	w26, [sp, #28]                  ; 4-byte Folded Spill
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w27, #0
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x26]
Lloh12:
	adrp	x8, _NES_IWARP_RQ_WQE_TOTAL_PAYLOAD_IDX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NES_IWARP_RQ_WQE_TOTAL_PAYLOAD_IDX@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
	mov	x2, x27
	bl	_set_wqe_32bit_value
	ldr	x20, [x20, #8]
	ldr	w19, [sp, #60]                  ; 4-byte Folded Reload
	add	w8, w19, #1
	add	w23, w23, #1
	ldr	w26, [sp, #28]                  ; 4-byte Folded Reload
	cmp	w8, w26
	csinc	w19, wzr, w19, ge
	ldp	x27, x24, [sp, #32]             ; 16-byte Folded Reload
	cbz	x20, LBB0_14
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldr	x8, [x27, #40]
	cbnz	x8, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w2, [x20]
	ldr	x8, [x24, #8]
	ldr	w8, [x8]
	cmp	w2, w8
	b.gt	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27, #24]
	ldr	w9, [sp, #56]                   ; 4-byte Folded Reload
	add	w9, w19, w9
	sub	w8, w9, w8
	sdiv	w9, w8, w26
	msub	w8, w9, w26, w8
	ldr	w9, [sp, #52]                   ; 4-byte Folded Reload
	cmp	w8, w9
	b.eq	LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh15:
	adrp	x8, _NES_DBG_IW_RX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NES_DBG_IW_RX@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_nes_debug
	ldr	x8, [x27, #32]
	add	x26, x8, w19, sxtw #2
	mov	x0, x26
	mov	x1, x27
	mov	x2, x19
	bl	_nes_fill_init_qp_wqe
	ldr	x2, [x20, #24]
	ldr	w0, [x26]
Lloh20:
	adrp	x8, _NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX@GOTPAGEOFF]
Lloh22:
	ldr	x1, [x8]
	bl	_set_wqe_64bit_value
	ldr	w8, [x20]
	cmp	w8, #1
	str	w19, [sp, #60]                  ; 4-byte Folded Spill
	b.lt	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x19, #0
	mov	w27, #0
	ldr	x8, [x20, #16]
LBB0_11:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x26]
	ldr	x9, [x21]
	lsl	x22, x19, #2
	add	x1, x9, x22
	lsl	x24, x19, #4
	add	x8, x8, x24
	ldr	x2, [x8, #8]
	bl	_set_wqe_64bit_value
	ldr	w0, [x26]
	ldr	x8, [x25]
	add	x1, x8, x22
	ldr	x8, [x20, #16]
	ldr	w2, [x8, x24]
	bl	_set_wqe_32bit_value
	ldr	w0, [x26]
	ldr	x8, [x28]
	add	x1, x8, x22
	ldr	x8, [x20, #16]
	add	x8, x8, x24
	ldr	w2, [x8, #4]
	bl	_set_wqe_32bit_value
	ldr	x8, [x20, #16]
	ldr	w9, [x8, x24]
	add	w27, w9, w27
	add	x19, x19, #1
	ldrsw	x9, [x20]
	cmp	x19, x9
	b.lt	LBB0_11
	b	LBB0_5
LBB0_12:
	bl	_barrier
	mov	w25, #0
	b	LBB0_19
LBB0_13:
	ldp	x21, x22, [sp, #8]              ; 16-byte Folded Reload
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
	str	w19, [x27, #20]
	bl	_barrier
	mov	w25, #0
	ldp	x21, x22, [sp, #8]              ; 16-byte Folded Reload
	b	LBB0_17
LBB0_15:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	ldp	x21, x22, [sp, #8]              ; 16-byte Folded Reload
LBB0_16:
	ldr	w8, [x8]
	neg	w25, w8
	str	w19, [x27, #20]
	bl	_barrier
	cbz	w23, LBB0_19
LBB0_17:
Lloh27:
	adrp	x19, _NES_WQE_ALLOC@GOTPAGE
Lloh28:
	ldr	x19, [x19, _NES_WQE_ALLOC@GOTPAGEOFF]
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	w1, #255
	bl	_min
	sub	w23, w23, w0
	ldr	x8, [x24]
	ldr	x9, [x19]
	add	x8, x9, x8
	ldr	w9, [x27, #28]
	orr	w1, w9, w0, lsl #24
	mov	x0, x8
	bl	_nes_write32
	cbnz	w23, LBB0_18
LBB0_19:
	mov	x0, x21
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	cbz	w25, LBB0_21
LBB0_20:
	str	x20, [x22]
LBB0_21:
	mov	x0, x25
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QPS_RTS,8,3                 ; @IB_QPS_RTS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NES_DBG_IW_RX,4,2              ; @NES_DBG_IW_RX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ibwr sge count = %u.\n"

	.comm	_NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX,8,3 ; @NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX
	.comm	_NES_IWARP_RQ_WQE_FRAG0_LOW_IDX,8,3 ; @NES_IWARP_RQ_WQE_FRAG0_LOW_IDX
	.comm	_NES_IWARP_RQ_WQE_LENGTH0_IDX,8,3 ; @NES_IWARP_RQ_WQE_LENGTH0_IDX
	.comm	_NES_IWARP_RQ_WQE_STAG0_IDX,8,3 ; @NES_IWARP_RQ_WQE_STAG0_IDX
	.comm	_NES_IWARP_RQ_WQE_TOTAL_PAYLOAD_IDX,8,3 ; @NES_IWARP_RQ_WQE_TOTAL_PAYLOAD_IDX
	.comm	_NES_WQE_ALLOC,8,3              ; @NES_WQE_ALLOC
	.no_dead_strip	_nes_post_recv
.subsections_via_symbols
