	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_map_phys_fmr               ## -- Begin function rvt_map_phys_fmr
	.p2align	4, 0x90
_rvt_map_phys_fmr:                      ## @rvt_map_phys_fmr
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_to_ifmr
	movq	%rax, %r12
	movl	(%rbx), %edi
	callq	_ib_to_rvt
	movq	%rax, %rbx
	leaq	40(%r12), %rdi
	callq	_atomic_long_read
	cmpq	$3, %rax
	jb	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	cmpl	%r13d, (%r12)
	jge	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, 32(%r12)
	movq	%r15, 24(%r12)
	movb	4(%r12), %cl
	movl	$1, %r15d
	shll	%cl, %r15d
	movl	%r13d, %eax
	shll	%cl, %eax
	movl	%eax, 8(%r12)
	testl	%r13d, %r13d
	je	LBB0_8
## %bb.6:
	movq	%r12, %rdi
	movq	%r14, %r12
	movslq	%r13d, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%r14,8), %r8
	movq	16(%rdi), %rcx
	movl	%r13d, %edx
	movq	(%rcx,%rdx,8), %rsi
	movq	(%rsi), %rax
	movslq	%ebx, %rbx
	movq	%rbx, %rsi
	shlq	$4, %rsi
	movq	%r8, 8(%rax,%rsi)
	movq	(%rcx,%rdx,8), %rax
	movq	(%rax), %rax
	movl	%r15d, (%rax,%rsi)
	movq	(%r12,%r14,8), %rcx
	movl	%r13d, %esi
	movl	%ebx, %edx
	movl	%r15d, %r8d
	callq	_trace_rvt_mr_fmr_seg
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	incl	%ebx
	xorl	%eax, %eax
	movq	_RVT_SEGSZ@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	movl	$0, %ecx
	cmovel	%ecx, %ebx
	sete	%al
	addl	%eax, %r13d
	incq	%r14
	cmpq	%r14, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_7
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RVT_SEGSZ,4,2                  ## @RVT_SEGSZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_map_phys_fmr               ; -- Begin function rvt_map_phys_fmr
	.p2align	2
_rvt_map_phys_fmr:                      ; @rvt_map_phys_fmr
	.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
	mov	x22, x3
	mov	x25, x2
	mov	x19, x1
	mov	x21, x0
	bl	_to_ifmr
	mov	x20, x0
	ldr	w0, [x21]
	bl	_ib_to_rvt
	mov	x21, x0
	add	x0, x20, #40
	bl	_atomic_long_read
	cmp	x0, #3
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	w8, [x20]
	cmp	w8, w25
	b.ge	LBB0_5
; %bb.3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	mov	x0, x21
	bl	_spin_lock_irqsave
	stp	x22, x22, [x20, #24]
	ldr	w8, [x20, #4]
	lsl	w9, w25, w8
	str	w9, [x20, #8]
	cbz	w25, LBB0_8
; %bb.6:
	mov	w22, #0
	mov	w23, #0
	mov	w9, #1
	lsl	w24, w9, w8
	sxtw	x25, w25
Lloh4:
	adrp	x26, _RVT_SEGSZ@GOTPAGE
Lloh5:
	ldr	x26, [x26, _RVT_SEGSZ@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x20, #16]
	mov	w10, w23
	lsl	x10, x10, #3
	ldr	x11, [x9, x10]
	ldr	x11, [x11]
	sbfiz	x12, x22, #4, #32
	add	x11, x11, x12
	str	x8, [x11, #8]
	ldr	x8, [x9, x10]
	ldr	x8, [x8]
	str	w24, [x8, x12]
	ldr	x3, [x19], #8
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	mov	x4, x24
	bl	_trace_rvt_mr_fmr_seg
	add	w8, w22, #1
	ldr	w9, [x26]
	cmp	w8, w9
	cinc	w23, w23, eq
	csinc	w22, wzr, w22, eq
	subs	x25, x25, #1
	b.ne	LBB0_7
LBB0_8:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RVT_SEGSZ,4,2                  ; @RVT_SEGSZ
.subsections_via_symbols
