	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dereg_mr
_dereg_mr:                              ## @dereg_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
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	(%rsi), %r14d
	movq	16(%rsi), %rbx
	movq	%rsi, %rdi
	callq	_is_odp_mr
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	callq	_to_ib_umem_odp
	movq	%rax, %r12
	movl	12(%r13), %edi
	xorl	%esi, %esi
	callq	_WRITE_ONCE
	leaq	8(%r15), %rdi
	callq	_synchronize_srcu
	leaq	8(%r13), %rbx
	movq	%rbx, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_system_unbound_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_flush_workqueue
LBB0_3:
	movq	%rbx, %rdi
	callq	_atomic_read
	movq	%rax, %rdi
	callq	_WARN_ON
	cmpl	$0, (%r12)
	je	LBB0_4
## %bb.5:
	movq	%r13, %rdi
	callq	_mlx5_ib_free_implicit_mr
	jmp	LBB0_6
LBB0_4:
	movq	%r12, %rdi
	callq	_ib_umem_start
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_ib_umem_end
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mlx5_ib_invalidate_range
LBB0_6:
	movq	%r12, %rdi
	callq	_ib_umem_odp_release
	movq	(%r15), %rsi
	movl	%r14d, %edi
	callq	_atomic_sub
	xorl	%ebx, %ebx
LBB0_7:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_clean_mr
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_mlx5_mr_cache_free
	movq	%rbx, %rdi
	callq	_ib_umem_release
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.8:
	movq	(%r15), %rsi
	movl	%r14d, %edi
	callq	_atomic_sub
LBB0_9:
	cmpl	$0, 4(%r13)
	je	LBB0_11
## %bb.10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_system_unbound_wq,4,2          ## @system_unbound_wq
	.no_dead_strip	_dereg_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dereg_mr
_dereg_mr:                              ; @dereg_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	x19, x1
	mov	x21, x0
	ldr	w20, [x1]
	ldr	x22, [x1, #16]
	mov	x0, x1
	bl	_is_odp_mr
	cbz	x0, LBB0_7
; %bb.1:
	mov	x0, x22
	bl	_to_ib_umem_odp
	mov	x22, x0
	ldr	w0, [x19, #12]
	mov	w1, #0
	bl	_WRITE_ONCE
	add	x0, x21, #8
	bl	_synchronize_srcu
	add	x23, x19, #8
	mov	x0, x23
	bl	_atomic_read
	cbz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _system_unbound_wq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _system_unbound_wq@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_flush_workqueue
LBB0_3:
	mov	x0, x23
	bl	_atomic_read
	bl	_WARN_ON
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_mlx5_ib_free_implicit_mr
	b	LBB0_6
LBB0_5:
	mov	x0, x22
	bl	_ib_umem_start
	mov	x23, x0
	mov	x0, x22
	bl	_ib_umem_end
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_mlx5_ib_invalidate_range
LBB0_6:
	mov	x0, x22
	bl	_ib_umem_odp_release
	ldr	x1, [x21]
	mov	x0, x20
	bl	_atomic_sub
	mov	x22, #0
LBB0_7:
	mov	x0, x21
	mov	x1, x19
	bl	_clean_mr
	mov	x0, x21
	mov	x1, x19
	bl	_mlx5_mr_cache_free
	mov	x0, x22
	bl	_ib_umem_release
	cbz	x22, LBB0_9
; %bb.8:
	ldr	x1, [x21]
	mov	x0, x20
	bl	_atomic_sub
LBB0_9:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_11
; %bb.10:
	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
	ret
LBB0_11:
	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	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_system_unbound_wq,4,2          ; @system_unbound_wq
	.no_dead_strip	_dereg_mr
.subsections_via_symbols
