	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvrdma_dereg_mr                ## -- Begin function pvrdma_dereg_mr
	.p2align	4, 0x90
_pvrdma_dereg_mr:                       ## @pvrdma_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_vmr
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_to_vdev
	movq	%rax, %r14
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_PVRDMA_CMD_DESTROY_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movl	16(%r15), %eax
	movl	%eax, -32(%rbp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_pvrdma_cmd_post
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_2:
	movq	%r15, %rsi
	addq	$12, %rsi
	movq	%r14, %rdi
	callq	_pvrdma_page_dir_cleanup
	movl	8(%r15), %edi
	callq	_ib_umem_release
	movq	(%r15), %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_kfree
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PVRDMA_CMD_DESTROY_MR,4,2      ## @PVRDMA_CMD_DESTROY_MR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not deregister mem region, error: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvrdma_dereg_mr                ; -- Begin function pvrdma_dereg_mr
	.p2align	2
_pvrdma_dereg_mr:                       ; @pvrdma_dereg_mr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	bl	_to_vmr
	mov	x19, x0
	ldr	w0, [x20]
	bl	_to_vdev
	mov	x20, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x8, _PVRDMA_CMD_DESTROY_MR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PVRDMA_CMD_DESTROY_MR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	stp	w9, w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	bl	_pvrdma_cmd_post
	tbz	w0, #31, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	x0, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_2:
	add	x1, x19, #12
	mov	x0, x20
	bl	_pvrdma_page_dir_cleanup
	ldr	w0, [x19, #8]
	bl	_ib_umem_release
	ldr	x0, [x19]
	bl	_kfree
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PVRDMA_CMD_DESTROY_MR,4,2      ; @PVRDMA_CMD_DESTROY_MR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not deregister mem region, error: %d\n"

.subsections_via_symbols
