	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rdma_rw_init_one_mr
_rdma_rw_init_one_mr:                   ## @rdma_rw_init_one_mr
	.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	%r8d, %r14d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	%r9d, -48(%rbp)
	movq	16(%rdi), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_rdma_rw_fr_page_list_len
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_min
	movl	%eax, %r13d
	leaq	4(%rbx), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ib_mr_pool_get
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%r15, %rdi
	callq	_rdma_rw_inv_key
	movq	%rax, %r12
	movq	(%r15), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-48(%rbp), %rcx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_ib_map_mr_sg
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	cmpl	%r13d, %eax
	jl	LBB0_5
## %bb.6:
	movq	_IB_WR_REG_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movq	(%r15), %rax
	movq	%rax, 24(%r15)
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movl	(%rbx), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_rdma_protocol_iwarp
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_IB_ACCESS_REMOTE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r15)
LBB0_8:
	incl	%r12d
	movq	(%r15), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 12(%r15)
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	jmp	LBB0_9
LBB0_1:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	(%r15), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ib_mr_pool_put
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_WR_REG_MR,4,2               ## @IB_WR_REG_MR
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ## @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ## @IB_ACCESS_REMOTE_WRITE
	.no_dead_strip	_rdma_rw_init_one_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rdma_rw_init_one_mr
_rdma_rw_init_one_mr:                   ; @rdma_rw_init_one_mr
	.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	x23, x4
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	str	w5, [sp, #12]
	ldr	x8, [x0, #16]
	ldr	w0, [x8]
	ldr	w1, [x20, #8]
	bl	_rdma_rw_fr_page_list_len
	mov	x1, x0
	mov	x0, x23
	bl	_min
	mov	x25, x0
	add	x24, x20, #4
	mov	x0, x20
	mov	x1, x24
	bl	_ib_mr_pool_get
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_rdma_rw_inv_key
	mov	x23, x0
	ldr	x0, [x19]
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	add	x3, sp, #12
	mov	x1, x22
	mov	x2, x25
	bl	_ib_map_mr_sg
	tbnz	w0, #31, LBB0_7
; %bb.2:
	cmp	w0, w25
	b.lt	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _IB_WR_REG_MR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_WR_REG_MR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	ldr	x8, [x19]
	str	x8, [x19, #24]
Lloh6:
	adrp	x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	w0, [x20]
	mov	x1, x21
	bl	_rdma_protocol_iwarp
	cbz	x0, LBB0_5
; %bb.4:
Lloh9:
	adrp	x8, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
LBB0_5:
	add	w0, w23, #1
	ldr	x8, [x19]
	ldr	d0, [x8]
	str	d0, [x19, #8]
	b	LBB0_9
LBB0_6:
Lloh12:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	ldr	x2, [x19]
	mov	x0, x20
	mov	x1, x24
	bl	_ib_mr_pool_put
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_WR_REG_MR,4,2               ; @IB_WR_REG_MR
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ; @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ; @IB_ACCESS_REMOTE_WRITE
	.no_dead_strip	_rdma_rw_init_one_mr
.subsections_via_symbols
