	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rds_iw_alloc_mr
_rds_iw_alloc_mr:                       ## @rds_iw_alloc_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	%r15, %rdi
	callq	_rds_iw_reuse_fmr
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
LBB0_10:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_atomic_inc_return
	cmpq	(%r15), %rax
	jle	LBB0_6
## %bb.2:
	movq	%r14, %rdi
	callq	_atomic_dec
	movq	_s_iw_rdma_mr_pool_wait@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_rds_iw_stats_inc
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_rds_iw_flush_mr_pool
	movq	%r15, %rdi
	callq	_rds_iw_reuse_fmr
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.3:
	movq	%r14, %rdi
	callq	_atomic_inc_return
	cmpq	(%r15), %rax
	jle	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_atomic_dec
	movl	(%r12), %edi
	callq	_rds_iw_stats_inc
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_rds_iw_flush_mr_pool
	movq	%r15, %rdi
	callq	_rds_iw_reuse_fmr
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.5:
	movq	%r14, %rdi
	callq	_atomic_inc_return
	cmpq	(%r15), %rax
	jle	LBB0_6
## %bb.14:
	movq	%r14, %rdi
	callq	_atomic_dec
	movq	_s_iw_rdma_mr_pool_depleted@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rds_iw_stats_inc
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_13
LBB0_6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rbx
	leaq	12(%rax), %rdi
	callq	_spin_lock_init
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, (%rbx)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_rds_iw_init_fastreg
	testl	%eax, %eax
	je	LBB0_9
## %bb.11:
	movl	%eax, %r12d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_rds_iw_destroy_fastreg
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_12
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_12:
	movq	%r14, %rdi
	callq	_atomic_dec
	movl	%r12d, %edi
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_9:
	movq	_s_iw_rdma_mr_alloc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rds_iw_stats_inc
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_s_iw_rdma_mr_pool_depleted,4,2 ## @s_iw_rdma_mr_pool_depleted
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_s_iw_rdma_mr_pool_wait,4,2     ## @s_iw_rdma_mr_pool_wait
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_s_iw_rdma_mr_alloc,4,2         ## @s_iw_rdma_mr_alloc
	.no_dead_strip	_rds_iw_alloc_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rds_iw_alloc_mr
_rds_iw_alloc_mr:                       ; @rds_iw_alloc_mr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x20, [x0]
	mov	x0, x20
	bl	_rds_iw_reuse_fmr
	mov	x21, x0
	cbz	x0, LBB0_2
LBB0_1:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	add	x19, x20, #8
	mov	x0, x19
	bl	_atomic_inc_return
	ldr	x8, [x20]
	cmp	x0, x8
	b.le	LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_atomic_dec
Lloh0:
	adrp	x22, _s_iw_rdma_mr_pool_wait@GOTPAGE
Lloh1:
	ldr	x22, [x22, _s_iw_rdma_mr_pool_wait@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_rds_iw_stats_inc
	mov	x0, x20
	mov	w1, #0
	bl	_rds_iw_flush_mr_pool
	mov	x0, x20
	bl	_rds_iw_reuse_fmr
	mov	x21, x0
	cbnz	x0, LBB0_1
; %bb.4:
	mov	x0, x19
	bl	_atomic_inc_return
	ldr	x8, [x20]
	cmp	x0, x8
	b.le	LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_atomic_dec
	ldr	w0, [x22]
	bl	_rds_iw_stats_inc
	mov	x0, x20
	mov	w1, #0
	bl	_rds_iw_flush_mr_pool
	mov	x0, x20
	bl	_rds_iw_reuse_fmr
	mov	x21, x0
	cbnz	x0, LBB0_1
; %bb.6:
	mov	x0, x19
	bl	_atomic_inc_return
	ldr	x8, [x20]
	cmp	x0, x8
	b.le	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_atomic_dec
Lloh2:
	adrp	x8, _s_iw_rdma_mr_pool_depleted@GOTPAGE
Lloh3:
	ldr	x8, [x8, _s_iw_rdma_mr_pool_depleted@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_rds_iw_stats_inc
Lloh5:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_8:
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.9:
	mov	x21, x0
	add	x0, x0, #12
	bl	_spin_lock_init
	add	x0, x21, #8
	bl	_INIT_LIST_HEAD
	str	x21, [x21]
	mov	x0, x20
	mov	x1, x21
	bl	_rds_iw_init_fastreg
	cbz	w0, LBB0_14
; %bb.10:
	mov	x22, x0
	mov	x0, x20
	mov	x1, x21
	bl	_rds_iw_destroy_fastreg
	mov	x0, x21
	bl	_kfree
	b	LBB0_12
LBB0_11:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	mov	x0, x19
	bl	_atomic_dec
	mov	x0, x22
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_14:
Lloh14:
	adrp	x8, _s_iw_rdma_mr_alloc@GOTPAGE
Lloh15:
	ldr	x8, [x8, _s_iw_rdma_mr_alloc@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_rds_iw_stats_inc
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_s_iw_rdma_mr_pool_depleted,4,2 ; @s_iw_rdma_mr_pool_depleted
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_s_iw_rdma_mr_pool_wait,4,2     ; @s_iw_rdma_mr_pool_wait
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_s_iw_rdma_mr_alloc,4,2         ; @s_iw_rdma_mr_alloc
	.no_dead_strip	_rds_iw_alloc_mr
.subsections_via_symbols
