	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_reg_phys_mr                ## -- Begin function qib_reg_phys_mr
	.p2align	4, 0x90
_qib_reg_phys_mr:                       ## @qib_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, %r13
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rsi
	movl	%edx, %edi
	callq	_alloc_mr
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movq	(%r13), %rax
	movq	%rax, 32(%rbx)
	movq	(%r13), %rax
	movq	%rax, 24(%rbx)
	movl	%r14d, 8(%rbx)
	testl	%r15d, %r15d
	jle	LBB0_5
## %bb.2:
	movq	16(%rbx), %r11
	movq	_QIB_SEGSZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	12(%rbx), %r14d
	movl	%r15d, %r10d
	shlq	$4, %r10
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	xorl	%edx, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12,%rdi), %r15
	movl	%edx, %eax
	movq	(%r11,%rax,8), %rbx
	movq	(%rbx), %r13
	movslq	%esi, %rsi
	movq	%rsi, %rbx
	shlq	$4, %rbx
	movq	%r15, 8(%r13,%rbx)
	movq	(%r12,%rdi), %rcx
	movq	(%r11,%rax,8), %rax
	movq	(%rax), %rax
	movq	%rcx, (%rax,%rbx)
	addl	%ecx, %r14d
	incl	%esi
	xorl	%eax, %eax
	cmpl	%r9d, %esi
	cmovel	%r8d, %esi
	sete	%al
	addl	%eax, %edx
	addq	$16, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_3
## %bb.4:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%r14d, 12(%rbx)
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QIB_SEGSZ,4,2                  ## @QIB_SEGSZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_reg_phys_mr                ; -- Begin function qib_reg_phys_mr
	.p2align	2
_qib_reg_phys_mr:                       ; @qib_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	x23, x4
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x1, x0
	mov	x0, x2
	bl	_alloc_mr
	mov	x19, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x23]
	str	x8, [x19, #32]
	ldr	x8, [x23]
	str	x8, [x19, #24]
	str	w22, [x19, #8]
	cmp	w21, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w8, #0
	mov	w9, #0
	ldr	x10, [x19, #16]
Lloh0:
	adrp	x11, _QIB_SEGSZ@GOTPAGE
Lloh1:
	ldr	x11, [x11, _QIB_SEGSZ@GOTPAGEOFF]
Lloh2:
	ldr	w12, [x11]
	ldr	w11, [x19, #12]
	mov	w13, w21
	add	x14, x20, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w15, w8
	lsl	x15, x15, #3
	ldr	x16, [x10, x15]
	ldr	x17, [x14]
	ldr	x16, [x16]
	sbfiz	x0, x9, #4, #32
	add	x16, x16, x0
	str	x17, [x16, #8]
	ldur	x16, [x14, #-8]
	ldr	x15, [x10, x15]
	ldr	x15, [x15]
	str	x16, [x15, x0]
	add	w11, w11, w16
	add	w15, w9, #1
	cmp	w15, w12
	csinc	w9, wzr, w9, eq
	cinc	w8, w8, eq
	add	x14, x14, #16
	subs	x13, x13, #1
	b.ne	LBB0_3
; %bb.4:
	str	w11, [x19, #12]
LBB0_5:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_QIB_SEGSZ,4,2                  ; @QIB_SEGSZ
.subsections_via_symbols
