	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipath_reg_phys_mr              ## -- Begin function ipath_reg_phys_mr
	.p2align	4, 0x90
_ipath_reg_phys_mr:                     ## @ipath_reg_phys_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	%r8, %r12
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	movl	(%rdi), %edi
	callq	_to_idev
	movl	%r14d, %edi
	movq	%rax, %rsi
	callq	_alloc_mr
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%r13, 56(%rax)
	movq	(%r12), %rcx
	movq	%rcx, 48(%rax)
	movq	(%r12), %rcx
	movq	%rcx, 40(%rax)
	movq	$0, 16(%rax)
	movq	$0, 32(%rax)
	movl	%ebx, 8(%rax)
	movl	%r14d, 12(%rax)
	movq	$0, 64(%rax)
	testl	%r14d, %r14d
	jle	LBB0_5
## %bb.2:
	movq	24(%rax), %r11
	movq	_IPATH_SEGSZ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movl	%r14d, %r10d
	shlq	$4, %r10
	xorl	%r8d, %r8d
	xorl	%edx, %edx
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15,%rdx), %r14
	movl	%esi, %ecx
	movq	(%r11,%rcx,8), %rdi
	movq	(%rdi), %r13
	movslq	%ebx, %rbx
	movq	%rbx, %rdi
	shlq	$4, %rdi
	movq	%r14, 8(%r13,%rdi)
	movq	(%r15,%rdx), %r14
	movq	(%r11,%rcx,8), %rcx
	movq	(%rcx), %rcx
	movq	%r14, (%rcx,%rdi)
	addq	%r14, %r12
	incl	%ebx
	xorl	%ecx, %ecx
	cmpl	%r9d, %ebx
	cmovel	%r8d, %ebx
	sete	%cl
	addl	%ecx, %esi
	addq	$16, %rdx
	cmpq	%rdx, %r10
	jne	LBB0_3
## %bb.4:
	movq	%r12, 16(%rax)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IPATH_SEGSZ,4,2                ## @IPATH_SEGSZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipath_reg_phys_mr              ; -- Begin function ipath_reg_phys_mr
	.p2align	2
_ipath_reg_phys_mr:                     ; @ipath_reg_phys_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	x22, x4
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x23, x0
	ldr	w0, [x0]
	bl	_to_idev
	mov	x1, x0
	mov	x0, x20
	bl	_alloc_mr
	cbz	x0, LBB0_6
; %bb.1:
	str	x23, [x0, #56]
	ldr	x8, [x22]
	str	x8, [x0, #48]
	ldr	x8, [x22]
	str	xzr, [x0, #16]
	stp	xzr, x8, [x0, #32]
	stp	w21, w20, [x0, #8]
	str	xzr, [x0, #64]
	cmp	w20, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x8, #0
	mov	w9, #0
	mov	w10, #0
	ldr	x11, [x0, #24]
Lloh0:
	adrp	x12, _IPATH_SEGSZ@GOTPAGE
Lloh1:
	ldr	x12, [x12, _IPATH_SEGSZ@GOTPAGEOFF]
Lloh2:
	ldr	w12, [x12]
	mov	w13, w20
	add	x14, x19, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w15, w9
	lsl	x15, x15, #3
	ldr	x16, [x11, x15]
	ldr	x17, [x14]
	ldr	x16, [x16]
	sbfiz	x1, x10, #4, #32
	add	x16, x16, x1
	str	x17, [x16, #8]
	ldur	x16, [x14, #-8]
	ldr	x15, [x11, x15]
	ldr	x15, [x15]
	str	x16, [x15, x1]
	add	x8, x8, x16
	add	w15, w10, #1
	cmp	w15, w12
	csinc	w10, wzr, w10, eq
	cinc	w9, w9, eq
	add	x14, x14, #16
	subs	x13, x13, #1
	b.ne	LBB0_3
; %bb.4:
	str	x8, [x0, #16]
LBB0_5:
	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_6:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	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	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IPATH_SEGSZ,4,2                ; @IPATH_SEGSZ
.subsections_via_symbols
