	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_sc_mr_reg_shared
_i40iw_sc_mr_reg_shared:                ## @i40iw_sc_mr_reg_shared
	.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
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movl	(%rsi), %r15d
	movq	_I40IW_ACCESS_FLAGS_REMOTEREAD_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_I40IW_ACCESS_FLAGS_REMOTEWRITE_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %esi
	callq	_i40iw_sc_cqp_get_next_send_wqe
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	orl	%r12d, %ebx
	xorl	%eax, %eax
	testl	%r15d, %ebx
	setne	%al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	32(%r14), %eax
	movq	8(%r14), %rcx
	movq	_I40IW_ADDR_TYPE_VA_BASED@GOTPCREL(%rip), %r15
	movl	%eax, %edx
	andl	$4095, %edx                     ## imm = 0xFFF
	cmpq	(%r15), %rcx
	cmovel	%eax, %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_set_64bit_val
	movl	16(%r14), %edi
	movq	_I40IW_CQPSQ_STAG_PDID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movq	%r13, %rdi
	movl	$8, %esi
	movl	%eax, %edx
	callq	_set_64bit_val
	movl	20(%r14), %edi
	movq	_I40IW_CQPSQ_STAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%eax, %ebx
	movl	24(%r14), %edi
	movq	_I40IW_CQPSQ_STAG_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	orl	%eax, %ebx
	movl	28(%r14), %edi
	movq	_I40IW_CQPSQ_STAG_PARENTSTAGIDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	orl	%eax, %ebx
	movq	%r13, %rdi
	movl	$16, %esi
	movl	%ebx, %edx
	callq	_set_64bit_val
	movq	8(%r14), %rax
	xorl	%r12d, %r12d
	cmpq	(%r15), %rax
	sete	%r12b
	movq	_I40IW_CQP_OP_REG_SMR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_I40IW_CQPSQ_OPCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%eax, %r15d
	movq	_I40IW_CQPSQ_STAG_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	callq	_LS_64
	orl	%eax, %r15d
	movl	(%r14), %edi
	movq	_I40IW_CQPSQ_STAG_ARIGHTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	orl	%eax, %r15d
	movq	_I40IW_CQPSQ_STAG_REMACCENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_LS_64
	movl	%eax, %r14d
	movq	_I40IW_CQPSQ_STAG_VABASEDTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_LS_64
	orl	%eax, %r15d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	movq	_I40IW_CQPSQ_WQEVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	orl	%eax, %r15d
	orl	%r14d, %r15d
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_i40iw_insert_wqe_hdr
	movq	_I40IW_DEBUG_WQE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_I40IW_CQP_WQE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	shll	$3, %r8d
	leaq	L_.str(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	_i40iw_debug_buf
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_i40iw_sc_cqp_post_sq
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_I40IW_ERR_RING_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_ACCESS_FLAGS_REMOTEREAD_ONLY,4,2 ## @I40IW_ACCESS_FLAGS_REMOTEREAD_ONLY
	.comm	_I40IW_ACCESS_FLAGS_REMOTEWRITE_ONLY,4,2 ## @I40IW_ACCESS_FLAGS_REMOTEWRITE_ONLY
	.comm	_I40IW_ERR_RING_FULL,4,2        ## @I40IW_ERR_RING_FULL
	.comm	_I40IW_ADDR_TYPE_VA_BASED,8,3   ## @I40IW_ADDR_TYPE_VA_BASED
	.comm	_I40IW_CQPSQ_STAG_PDID,4,2      ## @I40IW_CQPSQ_STAG_PDID
	.comm	_I40IW_CQPSQ_STAG_KEY,4,2       ## @I40IW_CQPSQ_STAG_KEY
	.comm	_I40IW_CQPSQ_STAG_IDX,4,2       ## @I40IW_CQPSQ_STAG_IDX
	.comm	_I40IW_CQPSQ_STAG_PARENTSTAGIDX,4,2 ## @I40IW_CQPSQ_STAG_PARENTSTAGIDX
	.comm	_I40IW_CQP_OP_REG_SMR,4,2       ## @I40IW_CQP_OP_REG_SMR
	.comm	_I40IW_CQPSQ_OPCODE,4,2         ## @I40IW_CQPSQ_OPCODE
	.comm	_I40IW_CQPSQ_STAG_MR,4,2        ## @I40IW_CQPSQ_STAG_MR
	.comm	_I40IW_CQPSQ_STAG_ARIGHTS,4,2   ## @I40IW_CQPSQ_STAG_ARIGHTS
	.comm	_I40IW_CQPSQ_STAG_REMACCENABLED,4,2 ## @I40IW_CQPSQ_STAG_REMACCENABLED
	.comm	_I40IW_CQPSQ_STAG_VABASEDTO,4,2 ## @I40IW_CQPSQ_STAG_VABASEDTO
	.comm	_I40IW_CQPSQ_WQEVALID,4,2       ## @I40IW_CQPSQ_WQEVALID
	.comm	_I40IW_DEBUG_WQE,4,2            ## @I40IW_DEBUG_WQE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MR_REG_SHARED WQE"

	.comm	_I40IW_CQP_WQE_SIZE,4,2         ## @I40IW_CQP_WQE_SIZE
	.no_dead_strip	_i40iw_sc_mr_reg_shared
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_sc_mr_reg_shared
_i40iw_sc_mr_reg_shared:                ; @i40iw_sc_mr_reg_shared
	.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, x3
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _I40IW_ACCESS_FLAGS_REMOTEREAD_ONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I40IW_ACCESS_FLAGS_REMOTEREAD_ONLY@GOTPAGEOFF]
	ldr	w24, [x1]
Lloh2:
	ldr	w25, [x8]
Lloh3:
	adrp	x8, _I40IW_ACCESS_FLAGS_REMOTEWRITE_ONLY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40IW_ACCESS_FLAGS_REMOTEWRITE_ONLY@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
	ldr	x20, [x0]
	mov	x0, x20
	mov	x1, x2
	bl	_i40iw_sc_cqp_get_next_send_wqe
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	orr	w8, w26, w25
	tst	w8, w24
	cset	w24, ne
	ldr	w8, [x23, #32]
	ldr	x9, [x23, #8]
Lloh6:
	adrp	x26, _I40IW_ADDR_TYPE_VA_BASED@GOTPAGE
Lloh7:
	ldr	x26, [x26, _I40IW_ADDR_TYPE_VA_BASED@GOTPAGEOFF]
	ldr	x10, [x26]
	and	w11, w8, #0xfff
	cmp	x9, x10
	csel	w2, w8, w11, eq
	mov	w1, #0
	bl	_set_64bit_val
	ldr	w0, [x23, #16]
Lloh8:
	adrp	x8, _I40IW_CQPSQ_STAG_PDID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I40IW_CQPSQ_STAG_PDID@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_LS_64
	mov	x2, x0
	mov	x0, x22
	mov	w1, #8
	bl	_set_64bit_val
	ldr	w0, [x23, #20]
Lloh11:
	adrp	x8, _I40IW_CQPSQ_STAG_KEY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I40IW_CQPSQ_STAG_KEY@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_LS_64
	mov	x25, x0
	ldr	w0, [x23, #24]
Lloh14:
	adrp	x8, _I40IW_CQPSQ_STAG_IDX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _I40IW_CQPSQ_STAG_IDX@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w25, w0, w25
	ldr	w0, [x23, #28]
Lloh17:
	adrp	x8, _I40IW_CQPSQ_STAG_PARENTSTAGIDX@GOTPAGE
Lloh18:
	ldr	x8, [x8, _I40IW_CQPSQ_STAG_PARENTSTAGIDX@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w2, w25, w0
	mov	x0, x22
	mov	w1, #16
	bl	_set_64bit_val
	ldr	x8, [x23, #8]
	ldr	x9, [x26]
	cmp	x8, x9
	cset	w25, eq
Lloh20:
	adrp	x8, _I40IW_CQP_OP_REG_SMR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _I40IW_CQP_OP_REG_SMR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _I40IW_CQPSQ_OPCODE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _I40IW_CQPSQ_OPCODE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_LS_64
	mov	x26, x0
Lloh26:
	adrp	x8, _I40IW_CQPSQ_STAG_MR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _I40IW_CQPSQ_STAG_MR@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	w0, #1
	bl	_LS_64
	orr	w26, w0, w26
	ldr	w0, [x23]
Lloh29:
	adrp	x8, _I40IW_CQPSQ_STAG_ARIGHTS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _I40IW_CQPSQ_STAG_ARIGHTS@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w23, w26, w0
Lloh32:
	adrp	x8, _I40IW_CQPSQ_STAG_REMACCENABLED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _I40IW_CQPSQ_STAG_REMACCENABLED@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_LS_64
	orr	w23, w23, w0
Lloh35:
	adrp	x8, _I40IW_CQPSQ_STAG_VABASEDTO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _I40IW_CQPSQ_STAG_VABASEDTO@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x25
	bl	_LS_64
	orr	w23, w23, w0
	ldr	w0, [x20]
Lloh38:
	adrp	x8, _I40IW_CQPSQ_WQEVALID@GOTPAGE
Lloh39:
	ldr	x8, [x8, _I40IW_CQPSQ_WQEVALID@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w1, w23, w0
	mov	x0, x22
	bl	_i40iw_insert_wqe_hdr
Lloh41:
	adrp	x8, _I40IW_DEBUG_WQE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _I40IW_DEBUG_WQE@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
Lloh44:
	adrp	x8, _I40IW_CQP_WQE_SIZE@GOTPAGE
Lloh45:
	ldr	x8, [x8, _I40IW_CQP_WQE_SIZE@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	lsl	w4, w8, #3
Lloh47:
	adrp	x2, l_.str@PAGE
Lloh48:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x22
	bl	_i40iw_debug_buf
	cbz	w19, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_i40iw_sc_cqp_post_sq
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh49:
	adrp	x8, _I40IW_ERR_RING_FULL@GOTPAGE
Lloh50:
	ldr	x8, [x8, _I40IW_ERR_RING_FULL@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
LBB0_5:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_ACCESS_FLAGS_REMOTEREAD_ONLY,4,2 ; @I40IW_ACCESS_FLAGS_REMOTEREAD_ONLY
	.comm	_I40IW_ACCESS_FLAGS_REMOTEWRITE_ONLY,4,2 ; @I40IW_ACCESS_FLAGS_REMOTEWRITE_ONLY
	.comm	_I40IW_ERR_RING_FULL,4,2        ; @I40IW_ERR_RING_FULL
	.comm	_I40IW_ADDR_TYPE_VA_BASED,8,3   ; @I40IW_ADDR_TYPE_VA_BASED
	.comm	_I40IW_CQPSQ_STAG_PDID,4,2      ; @I40IW_CQPSQ_STAG_PDID
	.comm	_I40IW_CQPSQ_STAG_KEY,4,2       ; @I40IW_CQPSQ_STAG_KEY
	.comm	_I40IW_CQPSQ_STAG_IDX,4,2       ; @I40IW_CQPSQ_STAG_IDX
	.comm	_I40IW_CQPSQ_STAG_PARENTSTAGIDX,4,2 ; @I40IW_CQPSQ_STAG_PARENTSTAGIDX
	.comm	_I40IW_CQP_OP_REG_SMR,4,2       ; @I40IW_CQP_OP_REG_SMR
	.comm	_I40IW_CQPSQ_OPCODE,4,2         ; @I40IW_CQPSQ_OPCODE
	.comm	_I40IW_CQPSQ_STAG_MR,4,2        ; @I40IW_CQPSQ_STAG_MR
	.comm	_I40IW_CQPSQ_STAG_ARIGHTS,4,2   ; @I40IW_CQPSQ_STAG_ARIGHTS
	.comm	_I40IW_CQPSQ_STAG_REMACCENABLED,4,2 ; @I40IW_CQPSQ_STAG_REMACCENABLED
	.comm	_I40IW_CQPSQ_STAG_VABASEDTO,4,2 ; @I40IW_CQPSQ_STAG_VABASEDTO
	.comm	_I40IW_CQPSQ_WQEVALID,4,2       ; @I40IW_CQPSQ_WQEVALID
	.comm	_I40IW_DEBUG_WQE,4,2            ; @I40IW_DEBUG_WQE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MR_REG_SHARED WQE"

	.comm	_I40IW_CQP_WQE_SIZE,4,2         ; @I40IW_CQP_WQE_SIZE
	.no_dead_strip	_i40iw_sc_mr_reg_shared
.subsections_via_symbols
