	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rds_iw_free_mr                 ## -- Begin function rds_iw_free_mr
	.p2align	4, 0x90
_rds_iw_free_mr:                        ## @rds_iw_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_rdsdebug
	testq	%r15, %r15
	je	LBB0_7
## %bb.1:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_rds_iw_free_fastreg
	leaq	16(%r15), %rdi
	callq	_atomic_read
	cmpl	(%r15), %eax
	jge	LBB0_3
## %bb.2:
	leaq	12(%r15), %rdi
	callq	_atomic_read
	movslq	4(%r15), %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	cmpl	%ecx, %eax
	jl	LBB0_4
LBB0_3:
	movq	_rds_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r15), %rsi
	callq	_queue_work
LBB0_4:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.5:
	xorl	%eax, %eax
	callq	_in_interrupt
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%r15, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rds_iw_flush_mr_pool           ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_rds_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %r15
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_queue_work                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RDS/IW: free_mr nents %u\n"

	.comm	_rds_wq,4,2                     ## @rds_wq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rds_iw_free_mr                 ; -- Begin function rds_iw_free_mr
	.p2align	2
_rds_iw_free_mr:                        ; @rds_iw_free_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
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
	ldr	w1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_rdsdebug
	cbz	x19, LBB0_7
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	bl	_rds_iw_free_fastreg
	add	x0, x19, #16
	bl	_atomic_read
	ldr	w8, [x19]
	cmp	w0, w8
	b.ge	LBB0_3
; %bb.2:
	add	x0, x19, #12
	bl	_atomic_read
	ldrsw	x8, [x19, #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_4
LBB0_3:
Lloh2:
	adrp	x8, _rds_wq@GOTPAGE
Lloh3:
	ldr	x8, [x8, _rds_wq@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_queue_work
LBB0_4:
	cbz	w20, LBB0_7
; %bb.5:
	bl	_in_interrupt
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x19
	mov	w1, #0
	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	_rds_iw_flush_mr_pool
LBB0_7:
	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_8:
Lloh5:
	adrp	x8, _rds_wq@GOTPAGE
Lloh6:
	ldr	x8, [x8, _rds_wq@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x19, #8
	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	_queue_work
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RDS/IW: free_mr nents %u\n"

	.comm	_rds_wq,4,2                     ; @rds_wq
.subsections_via_symbols
