	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ocrdma_mbx_reg_mr
_ocrdma_mbx_reg_mr:                     ## @ocrdma_mbx_reg_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_OCRDMA_CMD_REGISTER_NSMR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$56, %esi
	callq	_ocrdma_init_emb_mqe
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %eax
	movq	_OCRDMA_REG_NSMR_NUM_PBL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%r15d, %eax
	movl	%eax, (%r12)
	movl	56(%r14), %eax
	movl	%eax, 48(%r12)
	movq	_OCRDMA_REG_NSMR_REMOTE_WR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	4(%r14), %eax
	movl	8(%r14), %edx
	shll	%cl, %eax
	movq	_OCRDMA_REG_NSMR_REMOTE_RD_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movl	12(%r14), %esi
	movq	_OCRDMA_REG_NSMR_LOCAL_WR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movl	16(%r14), %edi
	movq	_OCRDMA_REG_NSMR_REMOTE_ATOMIC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	orl	4(%r12), %eax
	movq	_OCRDMA_REG_NSMR_BIND_MEMWIN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	20(%r14), %ebx
	shll	%cl, %ebx
	orl	%edx, %esi
	orl	%esi, %edi
	orl	%edi, %ebx
	movq	_OCRDMA_REG_NSMR_LAST_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r13d
	orl	%ebx, %r13d
	orl	%eax, %r13d
	movl	24(%r14), %eax
	movq	_OCRDMA_MIN_HPAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cltd
	idivl	%ecx
	movl	%eax, %esi
	orl	%r13d, %esi
	movl	28(%r14), %eax
	cltd
	idivl	%ecx
	movq	_OCRDMA_REG_NSMR_HPAGE_SIZE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%esi, %eax
	movl	%eax, 4(%r12)
	movl	32(%r14), %edi
	movl	%edi, 8(%r12)
	callq	_upper_32_bits
	movq	%rax, 40(%r12)
	movl	36(%r14), %edi
	movl	%edi, 12(%r12)
	callq	_upper_32_bits
	movl	%eax, 16(%r12)
	movl	40(%r14), %edi
	movl	%edi, 20(%r12)
	callq	_upper_32_bits
	movl	%eax, 24(%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:
	movl	%eax, %r15d
	movq	32(%r12), %rcx
	shlq	$2, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%r14), %rax
	movl	(%rax,%rbx), %edi
	movl	%edi, (%rcx,%rbx,4)
	callq	_upper_32_bits
	movq	32(%r12), %rcx
	movq	%rax, 8(%rcx,%rbx,4)
	addq	$4, %rbx
	cmpq	%rbx, %r15
	jne	LBB0_4
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_ocrdma_mbx_cmd
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	(%r12), %eax
	movl	%eax, 44(%r14)
LBB0_7:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OCRDMA_CMD_REGISTER_NSMR,4,2   ## @OCRDMA_CMD_REGISTER_NSMR
	.comm	_OCRDMA_REG_NSMR_NUM_PBL_SHIFT,4,2 ## @OCRDMA_REG_NSMR_NUM_PBL_SHIFT
	.comm	_OCRDMA_REG_NSMR_REMOTE_WR_SHIFT,4,2 ## @OCRDMA_REG_NSMR_REMOTE_WR_SHIFT
	.comm	_OCRDMA_REG_NSMR_REMOTE_RD_SHIFT,4,2 ## @OCRDMA_REG_NSMR_REMOTE_RD_SHIFT
	.comm	_OCRDMA_REG_NSMR_LOCAL_WR_SHIFT,4,2 ## @OCRDMA_REG_NSMR_LOCAL_WR_SHIFT
	.comm	_OCRDMA_REG_NSMR_REMOTE_ATOMIC_SHIFT,4,2 ## @OCRDMA_REG_NSMR_REMOTE_ATOMIC_SHIFT
	.comm	_OCRDMA_REG_NSMR_BIND_MEMWIN_SHIFT,4,2 ## @OCRDMA_REG_NSMR_BIND_MEMWIN_SHIFT
	.comm	_OCRDMA_REG_NSMR_LAST_SHIFT,4,2 ## @OCRDMA_REG_NSMR_LAST_SHIFT
	.comm	_OCRDMA_MIN_HPAGE_SIZE,4,2      ## @OCRDMA_MIN_HPAGE_SIZE
	.comm	_OCRDMA_REG_NSMR_HPAGE_SIZE_SHIFT,4,2 ## @OCRDMA_REG_NSMR_HPAGE_SIZE_SHIFT
	.no_dead_strip	_ocrdma_mbx_reg_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ocrdma_mbx_reg_mr
_ocrdma_mbx_reg_mr:                     ; @ocrdma_mbx_reg_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, x5
	mov	x22, x3
	mov	x24, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _OCRDMA_CMD_REGISTER_NSMR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OCRDMA_CMD_REGISTER_NSMR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #56
	bl	_ocrdma_init_emb_mqe
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _OCRDMA_REG_NSMR_NUM_PBL_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OCRDMA_REG_NSMR_NUM_PBL_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldp	w9, w10, [x19]
	lsl	w8, w9, w8
	orr	w8, w8, w24
	str	w8, [x0]
	ldr	w8, [x19, #56]
	str	w8, [x0, #48]
Lloh6:
	adrp	x8, _OCRDMA_REG_NSMR_REMOTE_WR_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OCRDMA_REG_NSMR_REMOTE_WR_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w8, w10, w8
	ldr	w9, [x0, #4]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _OCRDMA_REG_NSMR_REMOTE_RD_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _OCRDMA_REG_NSMR_REMOTE_RD_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ldp	w10, w11, [x19, #8]
	lsl	w9, w10, w9
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _OCRDMA_REG_NSMR_LOCAL_WR_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _OCRDMA_REG_NSMR_LOCAL_WR_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	lsl	w9, w11, w9
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _OCRDMA_REG_NSMR_REMOTE_ATOMIC_SHIFT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _OCRDMA_REG_NSMR_REMOTE_ATOMIC_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	ldp	w10, w11, [x19, #16]
	lsl	w9, w10, w9
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _OCRDMA_REG_NSMR_BIND_MEMWIN_SHIFT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _OCRDMA_REG_NSMR_BIND_MEMWIN_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	lsl	w9, w11, w9
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _OCRDMA_REG_NSMR_LAST_SHIFT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _OCRDMA_REG_NSMR_LAST_SHIFT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	lsl	w9, w23, w9
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _OCRDMA_MIN_HPAGE_SIZE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _OCRDMA_MIN_HPAGE_SIZE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	ldp	w10, w11, [x19, #24]
	sdiv	w10, w10, w9
	orr	w8, w10, w8
	sdiv	w9, w11, w9
Lloh27:
	adrp	x10, _OCRDMA_REG_NSMR_HPAGE_SIZE_SHIFT@GOTPAGE
Lloh28:
	ldr	x10, [x10, _OCRDMA_REG_NSMR_HPAGE_SIZE_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	ldr	w0, [x19, #32]
	orr	w8, w9, w8
	stp	w8, w0, [x20, #4]
	bl	_upper_32_bits
	str	x0, [x20, #40]
	ldr	w0, [x19, #36]
	str	w0, [x20, #12]
	bl	_upper_32_bits
	ldr	w8, [x19, #40]
	stp	w0, w8, [x20, #16]
	mov	x0, x8
	bl	_upper_32_bits
	str	w0, [x20, #24]
	cmp	w22, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x23, #0
	mov	w9, w22
	ldr	x8, [x20, #32]
	lsl	x22, x9, #2
	mov	w24, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #48]
	ldr	w0, [x9, x23]
	str	w0, [x8, x23, lsl #2]
	bl	_upper_32_bits
	ldr	x8, [x20, #32]
	str	x0, [x8, x24]
	add	x23, x23, #4
	add	x24, x24, #16
	cmp	x22, x23
	b.ne	LBB0_3
LBB0_4:
	mov	x0, x21
	mov	x1, x20
	bl	_ocrdma_mbx_cmd
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w8, [x20]
	str	w8, [x19, #44]
LBB0_6:
	mov	x0, x20
	bl	_kfree
	b	LBB0_8
LBB0_7:
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OCRDMA_CMD_REGISTER_NSMR,4,2   ; @OCRDMA_CMD_REGISTER_NSMR
	.comm	_OCRDMA_REG_NSMR_NUM_PBL_SHIFT,4,2 ; @OCRDMA_REG_NSMR_NUM_PBL_SHIFT
	.comm	_OCRDMA_REG_NSMR_REMOTE_WR_SHIFT,4,2 ; @OCRDMA_REG_NSMR_REMOTE_WR_SHIFT
	.comm	_OCRDMA_REG_NSMR_REMOTE_RD_SHIFT,4,2 ; @OCRDMA_REG_NSMR_REMOTE_RD_SHIFT
	.comm	_OCRDMA_REG_NSMR_LOCAL_WR_SHIFT,4,2 ; @OCRDMA_REG_NSMR_LOCAL_WR_SHIFT
	.comm	_OCRDMA_REG_NSMR_REMOTE_ATOMIC_SHIFT,4,2 ; @OCRDMA_REG_NSMR_REMOTE_ATOMIC_SHIFT
	.comm	_OCRDMA_REG_NSMR_BIND_MEMWIN_SHIFT,4,2 ; @OCRDMA_REG_NSMR_BIND_MEMWIN_SHIFT
	.comm	_OCRDMA_REG_NSMR_LAST_SHIFT,4,2 ; @OCRDMA_REG_NSMR_LAST_SHIFT
	.comm	_OCRDMA_MIN_HPAGE_SIZE,4,2      ; @OCRDMA_MIN_HPAGE_SIZE
	.comm	_OCRDMA_REG_NSMR_HPAGE_SIZE_SHIFT,4,2 ; @OCRDMA_REG_NSMR_HPAGE_SIZE_SHIFT
	.no_dead_strip	_ocrdma_mbx_reg_mr
.subsections_via_symbols
