	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iser_fast_reg_mr
_iser_fast_reg_mr:                      ## @iser_fast_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
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rdi), %rbx
	movq	8(%rdx), %r15
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rdx)
	je	LBB0_2
## %bb.1:
	leaq	12(%r12), %rdi
	leaq	32(%r12), %rcx
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_iser_inv_rkey
LBB0_2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	8(%r15), %edi
	callq	_ib_inc_rkey
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_ib_update_fast_reg_key
	movl	(%r14), %edx
	movl	4(%r14), %esi
	movq	_SIZE_4K@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_ib_map_mr_sg
	movl	%eax, %r13d
	xorl	%edi, %edi
	cmpl	(%r14), %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	callq	_iser_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	testl	%r13d, %r13d
	cmovsl	%r13d, %ebx
	jmp	LBB0_5
LBB0_4:
	leaq	8(%r12), %rax
	movq	%rax, 64(%r12)
	movq	_IB_WR_REG_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r12)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 48(%r12)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%r12)
	movq	%r15, 24(%r12)
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movq	_IB_ACCESS_REMOTE_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_IB_ACCESS_REMOTE_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 16(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movl	12(%r15), %esi
	movl	(%r15), %r8d
	movl	4(%r15), %ecx
	movdqu	(%r15), %xmm0
	pextrd	$2, %xmm0, 20(%r12)
	pextrd	$2, %xmm0, %edx
	pshufd	$180, %xmm0, %xmm0              ## xmm0 = xmm0[0,1,3,2]
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movdqu	%xmm0, (%rax)
	leaq	L_.str.1(%rip), %rdi
	callq	_iser_dbg
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_4K,4,2                    ## @SIZE_4K
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to map sg (%d/%d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_WR_REG_MR,4,2               ## @IB_WR_REG_MR
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ## @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ## @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ## @IB_ACCESS_REMOTE_READ
L_.str.1:                               ## @.str.1
	.asciz	"lkey=0x%x rkey=0x%x addr=0x%llx length=0x%x\n"

	.no_dead_strip	_iser_fast_reg_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iser_fast_reg_mr
_iser_fast_reg_mr:                      ; @iser_fast_reg_mr
	.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	x19, x3
	mov	x20, x2
	mov	x24, x1
	mov	x22, x0
	ldr	x23, [x0]
	ldr	x21, [x2, #8]
	ldr	w8, [x2]
	cbz	w8, LBB0_2
; %bb.1:
	add	x0, x22, #12
	add	x3, x22, #32
	mov	x1, x21
	mov	x2, x23
	bl	_iser_inv_rkey
LBB0_2:
	ldr	w0, [x21, #8]
	bl	_ib_inc_rkey
	mov	x1, x0
	mov	x0, x21
	bl	_ib_update_fast_reg_key
	ldp	w2, w1, [x24]
Lloh0:
	adrp	x8, _SIZE_4K@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_4K@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x0, x21
	mov	x3, #0
	bl	_ib_map_mr_sg
	mov	x25, x0
	ldr	w8, [x24]
	cmp	w0, w8
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w2, [x24]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x25
	bl	_iser_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w25, #0
	csneg	w0, w25, w8, lt
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _IB_WR_REG_MR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IB_WR_REG_MR@GOTPAGEOFF]
	add	x9, x22, #8
	str	x9, [x22, #64]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x22, #56]
	stp	xzr, x23, [x22, #40]
	stp	x21, xzr, [x22, #24]
Lloh11:
	adrp	x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _IB_ACCESS_REMOTE_READ@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_READ@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldp	w2, w1, [x21, #8]
	stp	w8, w2, [x22, #16]
	mov	w8, #1
	str	w8, [x20]
	stp	w1, w2, [x19, #8]
	ldp	w4, w3, [x21]
	stp	w4, w3, [x19]
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_iser_dbg
	mov	w0, #0
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_4K,4,2                    ; @SIZE_4K
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to map sg (%d/%d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_WR_REG_MR,4,2               ; @IB_WR_REG_MR
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ; @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ; @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ; @IB_ACCESS_REMOTE_READ
l_.str.1:                               ; @.str.1
	.asciz	"lkey=0x%x rkey=0x%x addr=0x%llx length=0x%x\n"

	.no_dead_strip	_iser_fast_reg_mr
.subsections_via_symbols
