	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_dereg_mr                   ## -- Begin function qib_dereg_mr
	.p2align	4, 0x90
_qib_dereg_mr:                          ## @qib_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_to_imr
	movq	%rax, %r14
	leaq	8(%rax), %rbx
	movq	%rbx, %rdi
	callq	_qib_free_lkey
	movq	%rbx, %rdi
	callq	_qib_put_mr
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %esi
	movq	%rbx, %rdi
	callq	_wait_for_completion_timeout
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	callq	_deinit_qib_mregion
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_ib_umem_release
LBB0_4:
	movq	%r14, %rdi
	callq	_kfree
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	callq	_qib_get_mr
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ,4,2                         ## @HZ
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_dereg_mr                   ; -- Begin function qib_dereg_mr
	.p2align	2
_qib_dereg_mr:                          ; @qib_dereg_mr
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_to_imr
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_qib_free_lkey
	mov	x0, x20
	bl	_qib_put_mr
Lloh0:
	adrp	x8, _HZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w1, w8, w8, lsl #2
	mov	x0, x20
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_deinit_qib_mregion
	ldr	x0, [x19]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_ib_umem_release
LBB0_3:
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_qib_get_mr
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ,4,2                         ; @HZ
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
