	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_get_dma_mr                 ## -- Begin function rvt_get_dma_mr
	.p2align	4, 0x90
_rvt_get_dma_mr:                        ## @rvt_get_dma_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
	callq	_ibpd_to_rvtpd
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.10:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_rvt_init_mregion
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %edi
	jmp	LBB0_5
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_5:
	callq	_ERR_PTR
	movq	%rax, %rbx
LBB0_8:
	movq	%r15, %rdi
	callq	_kfree
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_rvt_alloc_lkey
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:
	movl	%eax, %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_rvt_deinit_mregion
	jmp	LBB0_8
LBB0_11:
	movl	%r14d, (%r15)
	addq	$4, %r15
	movq	%r15, %rbx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_get_dma_mr                 ; -- Begin function rvt_get_dma_mr
	.p2align	2
_rvt_get_dma_mr:                        ; @rvt_get_dma_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
	bl	_ibpd_to_rvtpd
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EPERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	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	_ERR_PTR
LBB0_2:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	w3, #0
	bl	_rvt_init_mregion
	cbnz	w0, LBB0_7
; %bb.4:
	mov	x0, x19
	mov	w1, #1
	bl	_rvt_alloc_lkey
	cbz	w0, LBB0_10
; %bb.5:
	bl	_ERR_PTR
	mov	x20, x0
	mov	x0, x19
	bl	_rvt_deinit_mregion
	b	LBB0_8
LBB0_6:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	bl	_ERR_PTR
	mov	x20, x0
LBB0_8:
	mov	x0, x19
	bl	_kfree
LBB0_9:
	mov	x0, x20
	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_10:
	str	w20, [x19], #4
	mov	x20, x19
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
