	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nes_bind_mw
_nes_bind_mw:                           ## @nes_bind_mw
	.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	$40, %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, %r12
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_nesvnic
	movq	(%rax), %r14
	movq	%rbx, %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	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_2:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	addq	$8, %rbx
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	movslq	16(%r15), %r12
	movl	20(%r15), %r14d
	movl	%r12d, %eax
	subl	%r14d, %eax
	leal	(%rax,%r14,2), %eax
	cltd
	idivl	%r14d
	leal	-1(%r14), %eax
	cmpl	%eax, %edx
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	32(%r15), %r13
	leaq	(,%r12,8), %rdi
	addq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_nes_fill_init_qp_wqe
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	32(%rbx), %rdx
	movq	(%r13,%r12,8), %rdi
	movq	_NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_set_wqe_64bit_value
	movq	_NES_IWARP_SQ_OP_BIND@GOTPCREL(%rip), %rcx
	movq	_NES_IWARP_SQ_WQE_LOCAL_FENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IB_SEND_SIGNALED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	je	LBB0_6
## %bb.5:
	movq	_NES_IWARP_SQ_WQE_SIGNALED_COMPL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	orl	(%rcx), %edx
	movl	8(%rbx), %esi
	movq	_IB_ACCESS_REMOTE_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%esi, %ecx
	je	LBB0_8
## %bb.7:
	movq	_NES_CQP_STAG_RIGHTS_REMOTE_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_8:
	orl	%eax, %edx
	movq	_IB_ACCESS_REMOTE_READ@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	je	LBB0_10
## %bb.9:
	movq	_NES_CQP_STAG_RIGHTS_REMOTE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_10:
	orl	%esi, %ecx
	orl	%ecx, %edx
	movq	(%r13,%r12,8), %rdi
	movq	_NES_IWARP_SQ_WQE_MISC_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_set_wqe_32bit_value
	movq	(%r13,%r12,8), %rdi
	movq	_NES_IWARP_SQ_BIND_WQE_MR_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%rbx), %rax
	movl	(%rax), %edx
	callq	_set_wqe_32bit_value
	movq	(%r13,%r12,8), %rdi
	movq	_NES_IWARP_SQ_BIND_WQE_MW_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	callq	_set_wqe_32bit_value
	movq	(%r13,%r12,8), %rdi
	movq	_NES_IWARP_SQ_BIND_WQE_LENGTH_LOW_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%rbx), %edx
	callq	_set_wqe_32bit_value
	movq	(%r13,%r12,8), %rdi
	movq	_NES_IWARP_SQ_BIND_WQE_LENGTH_HIGH_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$0, (%rdi,%rax,8)
	movq	16(%rbx), %rdx
	movq	_NES_IWARP_SQ_BIND_WQE_VA_FBO_LOW_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_set_wqe_64bit_value
	leal	1(%r12), %eax
	xorl	%r13d, %r13d
	cmpl	%r14d, %eax
	cmovgel	%r13d, %eax
	movl	%eax, 16(%r15)
	xorl	%eax, %eax
	callq	_barrier
	movq	_NES_WQE_ALLOC@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rdi
	movl	$25165824, %esi                 ## imm = 0x1800000
	orl	24(%r15), %esi
	callq	_nes_write32
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
LBB0_11:
	movl	%r13d, %eax
	addq	$40, %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_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX,4,2 ## @NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX
	.comm	_NES_IWARP_SQ_OP_BIND,4,2       ## @NES_IWARP_SQ_OP_BIND
	.comm	_NES_IWARP_SQ_WQE_LOCAL_FENCE,4,2 ## @NES_IWARP_SQ_WQE_LOCAL_FENCE
	.comm	_IB_SEND_SIGNALED,4,2           ## @IB_SEND_SIGNALED
	.comm	_NES_IWARP_SQ_WQE_SIGNALED_COMPL,4,2 ## @NES_IWARP_SQ_WQE_SIGNALED_COMPL
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ## @IB_ACCESS_REMOTE_WRITE
	.comm	_NES_CQP_STAG_RIGHTS_REMOTE_WRITE,4,2 ## @NES_CQP_STAG_RIGHTS_REMOTE_WRITE
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ## @IB_ACCESS_REMOTE_READ
	.comm	_NES_CQP_STAG_RIGHTS_REMOTE_READ,4,2 ## @NES_CQP_STAG_RIGHTS_REMOTE_READ
	.comm	_NES_IWARP_SQ_WQE_MISC_IDX,4,2  ## @NES_IWARP_SQ_WQE_MISC_IDX
	.comm	_NES_IWARP_SQ_BIND_WQE_MR_IDX,4,2 ## @NES_IWARP_SQ_BIND_WQE_MR_IDX
	.comm	_NES_IWARP_SQ_BIND_WQE_MW_IDX,4,2 ## @NES_IWARP_SQ_BIND_WQE_MW_IDX
	.comm	_NES_IWARP_SQ_BIND_WQE_LENGTH_LOW_IDX,4,2 ## @NES_IWARP_SQ_BIND_WQE_LENGTH_LOW_IDX
	.comm	_NES_IWARP_SQ_BIND_WQE_LENGTH_HIGH_IDX,8,3 ## @NES_IWARP_SQ_BIND_WQE_LENGTH_HIGH_IDX
	.comm	_NES_IWARP_SQ_BIND_WQE_VA_FBO_LOW_IDX,4,2 ## @NES_IWARP_SQ_BIND_WQE_VA_FBO_LOW_IDX
	.comm	_NES_WQE_ALLOC,8,3              ## @NES_WQE_ALLOC
	.no_dead_strip	_nes_bind_mw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nes_bind_mw
_nes_bind_mw:                           ; @nes_bind_mw
	.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	x21, x2
	mov	x23, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_to_nesvnic
	ldr	x25, [x0]
	mov	x0, x19
	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]
	b	LBB0_4
LBB0_2:
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	mov	x1, #0
	bl	_spin_lock_irqsave
	ldp	w22, w26, [x20, #16]
                                        ; kill: def $w22 killed $w22 def $x22
	sxtw	x22, w22
	sub	w8, w22, w26
	add	w8, w8, w26, lsl #1
	sdiv	w9, w8, w26
	msub	w8, w9, w26, w8
	sub	w9, w26, #1
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, #0
	bl	_spin_unlock_irqrestore
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	ldr	x8, [x20, #32]
	add	x24, x8, x22, lsl #3
	mov	x0, x24
	mov	x1, x20
	mov	x2, x22
	bl	_nes_fill_init_qp_wqe
	ldr	x2, [x21, #32]
	ldr	x0, [x24]
Lloh7:
	adrp	x8, _NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_set_wqe_64bit_value
Lloh10:
	adrp	x8, _NES_IWARP_SQ_OP_BIND@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NES_IWARP_SQ_OP_BIND@GOTPAGEOFF]
Lloh12:
	adrp	x9, _NES_IWARP_SQ_WQE_LOCAL_FENCE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NES_IWARP_SQ_WQE_LOCAL_FENCE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x21]
Lloh16:
	adrp	x10, _IB_SEND_SIGNALED@GOTPAGE
Lloh17:
	ldr	x10, [x10, _IB_SEND_SIGNALED@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
Lloh19:
	adrp	x11, _NES_IWARP_SQ_WQE_SIGNALED_COMPL@GOTPAGE
Lloh20:
	ldr	x11, [x11, _NES_IWARP_SQ_WQE_SIGNALED_COMPL@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w8, w8, w9
	ldr	w9, [x21, #8]
Lloh22:
	adrp	x10, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh23:
	ldr	x10, [x10, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
Lloh24:
	adrp	x11, _NES_CQP_STAG_RIGHTS_REMOTE_WRITE@GOTPAGE
Lloh25:
	ldr	x11, [x11, _NES_CQP_STAG_RIGHTS_REMOTE_WRITE@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
Lloh27:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w10, wzr, w11, eq
Lloh28:
	adrp	x11, _IB_ACCESS_REMOTE_READ@GOTPAGE
Lloh29:
	ldr	x11, [x11, _IB_ACCESS_REMOTE_READ@GOTPAGEOFF]
	orr	w8, w8, w10
Lloh30:
	ldr	w10, [x11]
Lloh31:
	adrp	x11, _NES_CQP_STAG_RIGHTS_REMOTE_READ@GOTPAGE
Lloh32:
	ldr	x11, [x11, _NES_CQP_STAG_RIGHTS_REMOTE_READ@GOTPAGEOFF]
Lloh33:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w2, w8, w9
	ldr	x0, [x24]
Lloh34:
	adrp	x8, _NES_IWARP_SQ_WQE_MISC_IDX@GOTPAGE
Lloh35:
	ldr	x8, [x8, _NES_IWARP_SQ_WQE_MISC_IDX@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	bl	_set_wqe_32bit_value
	ldr	x0, [x24]
Lloh37:
	adrp	x8, _NES_IWARP_SQ_BIND_WQE_MR_IDX@GOTPAGE
Lloh38:
	ldr	x8, [x8, _NES_IWARP_SQ_BIND_WQE_MR_IDX@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	ldr	x8, [x21, #24]
	ldr	w2, [x8]
	bl	_set_wqe_32bit_value
	ldr	x0, [x24]
Lloh40:
	adrp	x8, _NES_IWARP_SQ_BIND_WQE_MW_IDX@GOTPAGE
Lloh41:
	ldr	x8, [x8, _NES_IWARP_SQ_BIND_WQE_MW_IDX@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	ldr	w2, [x23]
	bl	_set_wqe_32bit_value
	ldr	x0, [x24]
Lloh43:
	adrp	x8, _NES_IWARP_SQ_BIND_WQE_LENGTH_LOW_IDX@GOTPAGE
Lloh44:
	ldr	x8, [x8, _NES_IWARP_SQ_BIND_WQE_LENGTH_LOW_IDX@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	ldr	w2, [x21, #12]
	bl	_set_wqe_32bit_value
	ldr	x0, [x24]
Lloh46:
	adrp	x8, _NES_IWARP_SQ_BIND_WQE_LENGTH_HIGH_IDX@GOTPAGE
Lloh47:
	ldr	x8, [x8, _NES_IWARP_SQ_BIND_WQE_LENGTH_HIGH_IDX@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
	str	xzr, [x0, x8, lsl #3]
	ldr	x2, [x21, #16]
Lloh49:
	adrp	x8, _NES_IWARP_SQ_BIND_WQE_VA_FBO_LOW_IDX@GOTPAGE
Lloh50:
	ldr	x8, [x8, _NES_IWARP_SQ_BIND_WQE_VA_FBO_LOW_IDX@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	bl	_set_wqe_64bit_value
	add	w8, w22, #1
	cmp	w8, w26
	csinc	w8, wzr, w22, ge
	str	w8, [x20, #16]
	bl	_barrier
	ldr	x8, [x25]
Lloh52:
	adrp	x9, _NES_WQE_ALLOC@GOTPAGE
Lloh53:
	ldr	x9, [x9, _NES_WQE_ALLOC@GOTPAGEOFF]
Lloh54:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldr	w8, [x20, #24]
	orr	w1, w8, #0x1800000
	bl	_nes_write32
	mov	x0, x19
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.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_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX,4,2 ; @NES_IWARP_SQ_WQE_COMP_SCRATCH_LOW_IDX
	.comm	_NES_IWARP_SQ_OP_BIND,4,2       ; @NES_IWARP_SQ_OP_BIND
	.comm	_NES_IWARP_SQ_WQE_LOCAL_FENCE,4,2 ; @NES_IWARP_SQ_WQE_LOCAL_FENCE
	.comm	_IB_SEND_SIGNALED,4,2           ; @IB_SEND_SIGNALED
	.comm	_NES_IWARP_SQ_WQE_SIGNALED_COMPL,4,2 ; @NES_IWARP_SQ_WQE_SIGNALED_COMPL
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ; @IB_ACCESS_REMOTE_WRITE
	.comm	_NES_CQP_STAG_RIGHTS_REMOTE_WRITE,4,2 ; @NES_CQP_STAG_RIGHTS_REMOTE_WRITE
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ; @IB_ACCESS_REMOTE_READ
	.comm	_NES_CQP_STAG_RIGHTS_REMOTE_READ,4,2 ; @NES_CQP_STAG_RIGHTS_REMOTE_READ
	.comm	_NES_IWARP_SQ_WQE_MISC_IDX,4,2  ; @NES_IWARP_SQ_WQE_MISC_IDX
	.comm	_NES_IWARP_SQ_BIND_WQE_MR_IDX,4,2 ; @NES_IWARP_SQ_BIND_WQE_MR_IDX
	.comm	_NES_IWARP_SQ_BIND_WQE_MW_IDX,4,2 ; @NES_IWARP_SQ_BIND_WQE_MW_IDX
	.comm	_NES_IWARP_SQ_BIND_WQE_LENGTH_LOW_IDX,4,2 ; @NES_IWARP_SQ_BIND_WQE_LENGTH_LOW_IDX
	.comm	_NES_IWARP_SQ_BIND_WQE_LENGTH_HIGH_IDX,8,3 ; @NES_IWARP_SQ_BIND_WQE_LENGTH_HIGH_IDX
	.comm	_NES_IWARP_SQ_BIND_WQE_VA_FBO_LOW_IDX,4,2 ; @NES_IWARP_SQ_BIND_WQE_VA_FBO_LOW_IDX
	.comm	_NES_WQE_ALLOC,8,3              ; @NES_WQE_ALLOC
	.no_dead_strip	_nes_bind_mw
.subsections_via_symbols
