	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rds_ib_free_mr                 ## -- Begin function rds_ib_free_mr
	.p2align	4, 0x90
_rds_ib_free_mr:                        ## @rds_ib_free_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	(%r14), %r13
	movl	8(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_rdsdebug
	movq	(%rbx), %rax
	xorl	%ecx, %ecx
	cmpq	32(%r13), %rax
	setge	%cl
	leaq	12(%rbx), %rdi
	leaq	20(,%rcx,4), %rsi
	addq	%r13, %rsi
	callq	_llist_add
	movl	8(%rbx), %edi
	leaq	16(%r13), %rbx
	movq	%rbx, %rsi
	callq	_atomic_add
	leaq	12(%r13), %r12
	movq	%r12, %rdi
	callq	_atomic_inc
	movq	%rbx, %rdi
	callq	_atomic_read
	cmpl	(%r13), %eax
	jge	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_atomic_read
	movslq	4(%r13), %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	cmpl	%ecx, %eax
	jl	LBB0_3
LBB0_2:
	leaq	8(%r13), %rdi
	movl	$10, %esi
	callq	_schedule_delayed_work
LBB0_3:
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.4:
	xorl	%eax, %eax
	callq	_in_interrupt
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_rds_ib_flush_mr_pool
	jmp	LBB0_7
LBB0_6:
	addq	$8, %r13
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_schedule_delayed_work
LBB0_7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rds_ib_dev_put                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RDS/IB: free_mr nents %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rds_ib_free_mr                 ; -- Begin function rds_ib_free_mr
	.p2align	2
_rds_ib_free_mr:                        ; @rds_ib_free_mr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x22, x0
	ldr	x19, [x0, #16]
	ldr	x20, [x19]
	ldr	w1, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_rdsdebug
	ldr	x8, [x22]
	ldr	x9, [x20, #32]
	add	x0, x22, #12
	add	x10, x20, #20
	add	x11, x20, #24
	cmp	x8, x9
	csel	x1, x10, x11, lt
	bl	_llist_add
	ldr	w0, [x22, #8]
	add	x23, x20, #16
	mov	x1, x23
	bl	_atomic_add
	add	x22, x20, #12
	mov	x0, x22
	bl	_atomic_inc
	mov	x0, x23
	bl	_atomic_read
	ldr	w8, [x20]
	cmp	w0, w8
	b.ge	LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_atomic_read
	ldrsw	x8, [x20, #4]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w9
	cmp	w0, w8
	b.lt	LBB0_3
LBB0_2:
	add	x0, x20, #8
	mov	w1, #10
	bl	_schedule_delayed_work
LBB0_3:
	cbz	w21, LBB0_7
; %bb.4:
	bl	_in_interrupt
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x20
	mov	w1, #0
	mov	x2, #0
	bl	_rds_ib_flush_mr_pool
	b	LBB0_7
LBB0_6:
	add	x0, x20, #8
	mov	w1, #10
	bl	_schedule_delayed_work
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_rds_ib_dev_put
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RDS/IB: free_mr nents %u\n"

.subsections_via_symbols
