	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_mr_cache_free             ## -- Begin function mlx5_mr_cache_free
	.p2align	4, 0x90
_mlx5_mr_cache_free:                    ## @mlx5_mr_cache_free
	.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
	cmpl	$0, (%rsi)
	je	LBB0_7
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	8(%rsi), %esi
	callq	_order2idx
	movl	%eax, %r15d
	testl	%eax, %eax
	sets	%al
	movq	_MAX_MR_CACHE_ENTRIES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	setge	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_WARN_ON
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_unreg_umr
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	$0, (%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_destroy_mkey
	movq	8(%r14), %rax
	movslq	%r15d, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movl	(%rax,%rcx,4), %edx
	cmpl	4(%rax,%rcx,4), %edx
	jge	LBB0_7
## %bb.3:
	movl	(%r14), %edi
	leaq	(%rax,%rcx,4), %rsi
	addq	$8, %rsi
	jmp	LBB0_4
LBB0_5:
	movq	8(%r14), %r12
	movslq	%r15d, %rax
	leaq	(%rax,%rax,4), %r13
	leaq	(%r12,%r13,4), %rdi
	addq	$12, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irq
	addq	$4, %rbx
	leaq	(%r12,%r13,4), %rsi
	addq	$16, %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movl	(%r12,%r13,4), %ebx
	movl	4(%r12,%r13,4), %r15d
	leal	1(%rbx), %eax
	movl	%eax, (%r12,%r13,4)
	addl	%r15d, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irq
	cmpl	%r15d, %ebx
	jge	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r14), %edi
	leaq	(%r12,%r13,4), %rsi
	addq	$8, %rsi
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_queue_work                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_MR_CACHE_ENTRIES,4,2       ## @MAX_MR_CACHE_ENTRIES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_mr_cache_free             ; -- Begin function mlx5_mr_cache_free
	.p2align	2
_mlx5_mr_cache_free:                    ; @mlx5_mr_cache_free
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x1]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	ldr	w1, [x1, #8]
	bl	_order2idx
	mov	x20, x0
	cmp	w0, #0
Lloh0:
	adrp	x8, _MAX_MR_CACHE_ENTRIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_MR_CACHE_ENTRIES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w0, w8, #0, ge
	cset	w0, ge
	bl	_WARN_ON
	mov	x0, x19
	mov	x1, x21
	bl	_unreg_umr
	cbz	x0, LBB0_4
; %bb.2:
	str	wzr, [x21]
	mov	x0, x19
	mov	x1, x21
	bl	_destroy_mkey
	ldr	x8, [x19, #8]
	mov	w9, #20
	smaddl	x9, w20, w9, x8
	ldp	w10, w9, [x9]
	cmp	w10, w9
	b.ge	LBB0_5
; %bb.3:
	sxtw	x9, w20
	ldr	w0, [x19]
	mov	w10, #20
	madd	x8, x9, x10, x8
	b	LBB0_7
LBB0_4:
	ldr	x23, [x19, #8]
	mov	w8, #20
	smaddl	x24, w20, w8, x23
	add	x22, x24, #12
	mov	x0, x22
	bl	_spin_lock_irq
	add	x0, x21, #4
	add	x1, x24, #16
	bl	_list_add_tail
	ldp	w21, w25, [x24]
	add	w8, w21, #1
	str	w8, [x24]
	mov	x0, x22
	bl	_spin_unlock_irq
	cmp	w21, w25, lsl #1
	b.ge	LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	sxtw	x8, w20
	ldr	w0, [x19]
	mov	w9, #20
	madd	x8, x8, x9, x23
LBB0_7:
	add	x1, x8, #8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_queue_work
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_MR_CACHE_ENTRIES,4,2       ; @MAX_MR_CACHE_ENTRIES
.subsections_via_symbols
