	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rdma_rw_init_mr_wrs
_rdma_rw_init_mr_wrs:                   ## @rdma_rw_init_mr_wrs
	.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
	movl	%r9d, %r12d
	movl	%r8d, %r14d
	movq	%rcx, %r13
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	16(%rsi), %rax
	movl	(%rax), %edi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	8(%rsi), %esi
	callq	_rdma_rw_fr_page_list_len
	movl	%eax, %ecx
	leal	(%r14,%rcx), %eax
	decl	%eax
	cltd
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	idivl	%ecx
	movl	%eax, (%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$80, %esi
	callq	_kcalloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_26
## %bb.1:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rbx)
	jle	LBB0_2
## %bb.3:
	movq	%rax, %r15
	movl	%r14d, %edi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_min
	movl	%eax, %ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	%r15, %rdx
	movq	%r13, %rcx
	movl	%r14d, %r8d
	movl	%r12d, %r9d
	callq	_rdma_rw_init_one_mr
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_4
## %bb.9:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	xorl	%ecx, %ecx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %edi
	xorl	%esi, %esi
	xorl	%r14d, %r14d
	movq	%r15, %r12
	.p2align	4, 0x90
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r15), %rcx
	xorl	%edx, %edx
	cmpq	$0, 8(%rcx)
	setne	%dl
	leaq	(%r14,%r14,4), %rcx
	shlq	$4, %rcx
	addq	%r12, %rcx
	leaq	(%rcx,%rdx,8), %rcx
	addq	$64, %rcx
	movq	%rcx, 24(%rsi)
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r15, -112(%rbp)                ## 8-byte Spill
	leaq	(%r14,%r14,4), %r15
	shlq	$4, %r15
	leaq	(%r12,%r15), %rax
	addq	$16, %rax
	movq	%rax, 64(%r12,%r15)
	leaq	56(%r12,%r15), %rbx
	movq	%rbx, 40(%r12,%r15)
	movl	$1, 16(%r12,%r15)
	movl	%edi, 48(%r12,%r15)
	movl	24(%rbp), %eax
	movl	%eax, 8(%r12,%r15)
	movl	32(%rbp), %eax
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_IB_WR_RDMA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r12,%r15)
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_rdma_cap_read_inv
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_IB_WR_RDMA_READ_WITH_INV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r12,%r15)
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12,%r15)
	jmp	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_IB_WR_RDMA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r12,%r15)
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	addl	(%rbx), %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	jle	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	callq	_sg_next
	movq	%rax, %r13
	decl	%ebx
	jne	LBB0_19
LBB0_20:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	addl	%eax, %edx
	incl	%edx
	incq	%r14
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %rax
	cmpq	%rax, %r14
	jge	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	subl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	8(%rcx), %r12
	leaq	(%r14,%r14,4), %r15
	shlq	$4, %r15
	addq	%r12, %r15
	movl	%ebx, %edi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_min
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	%r15, %rdx
	movq	%r13, %rcx
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r8d
	xorl	%r9d, %r9d
	callq	_rdma_rw_init_one_mr
                                        ## kill: def $eax killed $eax def $rax
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	testl	%eax, %eax
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	jns	LBB0_10
	jmp	LBB0_5
LBB0_26:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_25
LBB0_2:
	xorl	%edx, %edx
	jmp	LBB0_24
LBB0_4:
	xorl	%r14d, %r14d
LBB0_5:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_8
## %bb.6:
	leaq	1(%r14), %r15
	leaq	(%r14,%r14,4), %rbx
	shlq	$4, %rbx
	addq	$-80, %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%rbx), %rdx
	movq	%r13, %rdi
	movq	%r13, %rsi
	callq	_ib_mr_pool_put
	decq	%r15
	addq	$-80, %rbx
	cmpq	$1, %r15
	jg	LBB0_7
LBB0_8:
	movq	8(%r12), %rdi
	callq	_kfree
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_22:
	testq	%r12, %r12
	je	LBB0_24
## %bb.23:
	movq	$0, 24(%r12,%r15)
LBB0_24:
	movq	_RDMA_RW_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 16(%rcx)
	movl	%edx, %eax
LBB0_25:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_IB_WR_RDMA_WRITE,4,2           ## @IB_WR_RDMA_WRITE
	.comm	_IB_WR_RDMA_READ,4,2            ## @IB_WR_RDMA_READ
	.comm	_IB_WR_RDMA_READ_WITH_INV,4,2   ## @IB_WR_RDMA_READ_WITH_INV
	.comm	_RDMA_RW_MR,4,2                 ## @RDMA_RW_MR
	.no_dead_strip	_rdma_rw_init_mr_wrs
.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_mr_wrs
_rdma_rw_init_mr_wrs:                   ; @rdma_rw_init_mr_wrs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	w7, [sp, #16]                   ; 4-byte Folded Spill
	mov	x22, x6
	mov	x27, x5
	mov	x23, x4
	mov	x25, x3
	str	w2, [sp, #32]                   ; 4-byte Folded Spill
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1, #16]
	ldr	w0, [x8]
	ldr	w1, [x1, #8]
	bl	_rdma_rw_fr_page_list_len
	add	w8, w23, w0
	sub	w8, w8, #1
	str	w0, [sp, #20]                   ; 4-byte Folded Spill
	sdiv	w0, w8, w0
	str	w0, [x19]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #80
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_17
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.2:
	mov	x21, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	mov	x0, x23
	ldr	w1, [sp, #20]                   ; 4-byte Folded Reload
	bl	_min
	mov	x28, x0
	str	x20, [sp, #24]                  ; 8-byte Folded Spill
	mov	x0, x20
	ldr	w1, [sp, #32]                   ; 4-byte Folded Reload
	mov	x2, x21
	mov	x3, x25
	mov	x4, x23
	mov	x5, x27
	bl	_rdma_rw_init_one_mr
	mov	x27, x0
	tbnz	w0, #31, LBB0_19
; %bb.3:
	mov	x8, #0
	str	wzr, [sp, #36]                  ; 4-byte Folded Spill
	mov	x20, #0
	ldr	w9, [x29, #16]
	str	w9, [sp, #4]                    ; 4-byte Folded Spill
	mov	x26, x21
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	mov	x12, x21
	mov	w21, #80
	cbz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x12]
	ldr	x9, [x9, #8]
	madd	x10, x20, x21, x26
	add	x11, x10, #72
	add	x10, x10, #64
	cmp	x9, #0
	csel	x9, x10, x11, eq
	str	x9, [x8, #24]
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	x12, [sp, #40]                  ; 8-byte Folded Spill
	madd	x8, x20, x21, x26
	mov	w9, #1
	str	w9, [x8, #16]!
	str	x8, [x8, #48]
	add	x19, x8, #40
	str	x19, [x8, #24]
	str	w22, [x8, #32]
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	stur	w9, [x8, #-8]
Lloh3:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh6:
	adrp	x8, _IB_WR_RDMA_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_WR_RDMA_WRITE@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w0, [x8, #4]
	ldr	w1, [sp, #32]                   ; 4-byte Folded Reload
	bl	_rdma_cap_read_inv
	cbz	w0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh8:
	adrp	x8, _IB_WR_RDMA_READ_WITH_INV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IB_WR_RDMA_READ_WITH_INV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	mov	w24, #80
	madd	x9, x20, x21, x26
	ldr	x10, [sp, #40]                  ; 8-byte Folded Reload
	ldr	x10, [x10]
	ldr	w10, [x10]
	stp	w10, w8, [x9, #32]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh11:
	adrp	x8, _IB_WR_RDMA_READ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IB_WR_RDMA_READ@GOTPAGEOFF]
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x8]
	mov	w24, #80
	madd	x9, x20, x21, x26
	str	w8, [x9, #36]
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w21, [x19]
	cmp	w28, #1
	b.lt	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x19, x28
LBB0_14:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x25
	bl	_sg_next
	mov	x25, x0
	subs	w19, w19, #1
	b.ne	LBB0_14
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #36]                   ; 4-byte Folded Reload
	add	w8, w8, w27
	add	w27, w8, #1
	add	x19, x20, #1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldrsw	x8, [x9]
	cmp	x19, x8
	b.ge	LBB0_24
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	str	w27, [sp, #36]                  ; 4-byte Folded Spill
	sub	w23, w23, w28
	add	w22, w22, w21
	ldr	x26, [x9, #8]
	madd	x21, x19, x24, x26
	mov	x0, x23
	ldr	w1, [sp, #20]                   ; 4-byte Folded Reload
	bl	_min
	mov	x28, x0
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w1, [sp, #32]                   ; 4-byte Folded Reload
	mov	x2, x21
	mov	x3, x25
	mov	x4, x23
	mov	w5, #0
	bl	_rdma_rw_init_one_mr
	mov	x27, x0
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	mov	x20, x19
	tbz	w0, #31, LBB0_4
	b	LBB0_20
LBB0_17:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_28
LBB0_18:
	mov	w27, #0
	b	LBB0_27
LBB0_19:
	mov	x19, #0
LBB0_20:
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	cbz	w19, LBB0_23
; %bb.21:
	add	x20, x19, #1
	mov	w8, #80
	mul	x8, x19, x8
	sub	x19, x8, #80
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	x2, [x8, x19]
	mov	x0, x22
	mov	x1, x22
	bl	_ib_mr_pool_put
	sub	x20, x20, #1
	sub	x19, x19, #80
	cmp	x20, #1
	b.gt	LBB0_22
LBB0_23:
	ldr	x0, [x21, #8]
	bl	_kfree
	b	LBB0_28
LBB0_24:
	cbz	x26, LBB0_26
; %bb.25:
	mov	w8, #80
	madd	x8, x20, x8, x26
	str	xzr, [x8, #24]
LBB0_26:
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
LBB0_27:
Lloh16:
	adrp	x8, _RDMA_RW_MR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RDMA_RW_MR@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #16]
LBB0_28:
	mov	x0, x27
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_IB_WR_RDMA_WRITE,4,2           ; @IB_WR_RDMA_WRITE
	.comm	_IB_WR_RDMA_READ,4,2            ; @IB_WR_RDMA_READ
	.comm	_IB_WR_RDMA_READ_WITH_INV,4,2   ; @IB_WR_RDMA_READ_WITH_INV
	.comm	_RDMA_RW_MR,4,2                 ; @RDMA_RW_MR
	.no_dead_strip	_rdma_rw_init_mr_wrs
.subsections_via_symbols
