	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_lkey_ok                    ## -- Begin function rvt_lkey_ok
	.p2align	4, 0x90
_rvt_lkey_ok:                           ## @rvt_lkey_ok
	.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, %r14
	movq	%rcx, %rbx
	movq	%rsi, %r13
	cmpq	$0, (%r8)
	je	LBB0_1
## %bb.6:
	movl	%r9d, %r12d
	movq	%rdi, %r15
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_rvt_sge_adjacent
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_32
## %bb.7:
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movq	8(%r15), %rax
	movq	(%r14), %rdx
	movb	(%r15), %cl
	sarq	%cl, %rdx
	movl	(%rax,%rdx,4), %edi
	callq	_rcu_dereference
	testq	%rax, %rax
	je	LBB0_30
## %bb.8:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_rvt_get_mr
	movl	60(%r15), %edi
	callq	_READ_ONCE
	testl	%eax, %eax
	je	LBB0_29
## %bb.9:
	movq	%r15, %rdi
	addq	$56, %rdi
	callq	_atomic_read
	movl	$1, %edi
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:
	movq	(%r15), %rax
	cmpq	(%r14), %rax
	jne	LBB0_12
## %bb.11:
	xorl	%edi, %edi
	cmpq	%r13, 48(%r15)
	setne	%dil
LBB0_12:
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_29
## %bb.13:
	movq	8(%r14), %rbx
	movl	$1, %edi
	subq	8(%r15), %rbx
	jb	LBB0_16
## %bb.14:
	movq	16(%r14), %rax
	addq	%rbx, %rax
	cmpq	16(%r15), %rax
	ja	LBB0_16
## %bb.15:
	movl	24(%r15), %eax
	notl	%eax
	xorl	%edi, %edi
	testl	%eax, %r12d
	setne	%dil
LBB0_16:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_17
LBB0_29:
	movq	%r15, %rdi
	callq	_rvt_put_mr
LBB0_30:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_31
LBB0_1:
	movq	%rdx, %r12
	movl	(%r13), %edi
	callq	_ib_to_rvt
	cmpq	$0, 8(%r13)
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_31:
	subl	(%rax), %ebx
LBB0_32:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_rvt_sge_adjacent
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_32
## %bb.4:
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movl	(%r15), %edi
	callq	_rcu_dereference
	testq	%rax, %rax
	je	LBB0_30
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_rvt_get_mr
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movq	%r12, %rdi
	movq	%rbx, 32(%r12)
	movq	8(%r14), %rax
	movq	%rax, 24(%r12)
	movq	16(%r14), %rcx
	movq	%rcx, (%r12)
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	jmp	LBB0_28
LBB0_17:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	addq	40(%r15), %rbx
	movl	28(%r15), %ecx
	testq	%rcx, %rcx
	je	LBB0_18
## %bb.20:
	movq	%rbx, %rax
	shrq	%cl, %rax
	movq	%rax, %rsi
                                        ## kill: def $cl killed $cl killed $rcx
	shlq	%cl, %rsi
	movq	_RVT_SEGSZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_21
## %bb.22:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %r13
	jmp	LBB0_23
LBB0_18:
	movq	32(%r15), %r8
	movq	(%r8), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, %rbx
	jae	LBB0_24
## %bb.19:
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_21:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %r13d
                                        ## kill: def $eax killed $eax def $rax
LBB0_23:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	subq	%rsi, %rbx
	movq	32(%r15), %r8
	jmp	LBB0_27
LBB0_24:
	movq	_RVT_SEGSZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	xorl	%eax, %eax
	xorl	%r13d, %r13d
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	subq	%rsi, %rbx
	incl	%r13d
	xorl	%esi, %esi
	cmpq	%r13, %rcx
	cmovbel	%edx, %r13d
	setbe	%sil
	addl	%esi, %eax
	movq	(%r8,%rax,8), %rsi
	movq	(%rsi), %rsi
	movq	%r13, %rdi
	shlq	$4, %rdi
	movq	(%rsi,%rdi), %rsi
	cmpq	%rsi, %rbx
	jae	LBB0_25
LBB0_26:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_27:
	movq	%r15, 32(%rdi)
	movl	%eax, %ecx
	movq	(%r8,%rcx,8), %rdx
	movq	(%rdx), %rdx
	movl	%r13d, %esi
	shlq	$4, %rsi
	movq	8(%rdx,%rsi), %rdx
	addq	%rbx, %rdx
	movq	%rdx, 24(%rdi)
	movq	(%r8,%rcx,8), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rsi), %rcx
	subq	%rbx, %rcx
	movq	%rcx, (%rdi)
	movq	16(%r14), %rcx
LBB0_28:
	movq	%rcx, 8(%rdi)
	movl	%eax, 16(%rdi)
	movl	%r13d, 20(%rdi)
	movq	%r14, %rsi
	callq	_trace_rvt_sge_new
	movl	$1, %ebx
	jmp	LBB0_32
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RVT_SEGSZ,8,3                  ## @RVT_SEGSZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_lkey_ok                    ; -- Begin function rvt_lkey_ok
	.p2align	2
_rvt_lkey_ok:                           ; @rvt_lkey_ok
	.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	x19, x4
	mov	x21, x3
	mov	x20, x2
	mov	x23, x1
	ldr	x8, [x4]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x22, x5
	mov	x24, x0
	mov	x0, x21
	mov	x1, x19
	bl	_rvt_sge_adjacent
	cbz	x0, LBB0_7
LBB0_2:
	mov	w0, #0
	b	LBB0_20
LBB0_3:
	ldr	w0, [x23]
	bl	_ib_to_rvt
	ldr	x8, [x23, #8]
	cbnz	x8, LBB0_19
; %bb.4:
	mov	x22, x0
	mov	x0, x21
	mov	x1, x19
	bl	_rvt_sge_adjacent
	cbnz	x0, LBB0_2
; %bb.5:
	bl	_rcu_read_lock
	ldr	w0, [x22]
	bl	_rcu_dereference
	cbz	x0, LBB0_18
; %bb.6:
	mov	x21, x0
	bl	_rvt_get_mr
	bl	_rcu_read_unlock
	mov	w9, #0
	mov	w10, #0
	ldp	x11, x8, [x19, #8]
	stp	x11, x21, [x20, #24]
	str	x8, [x20]
	b	LBB0_29
LBB0_7:
	bl	_rcu_read_lock
	ldr	x8, [x19]
	ldp	x10, x9, [x24]
	asr	x8, x8, x10
	ldr	w0, [x9, x8, lsl #2]
	bl	_rcu_dereference
	cbz	x0, LBB0_18
; %bb.8:
	mov	x21, x0
	bl	_rvt_get_mr
	ldr	w0, [x21, #60]
	bl	_READ_ONCE
	cbz	w0, LBB0_17
; %bb.9:
	add	x0, x21, #56
	bl	_atomic_read
	cbnz	x0, LBB0_12
; %bb.10:
	ldr	x8, [x21]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	ldr	x8, [x21, #48]
	cmp	x8, x23
	cset	w0, ne
	b	LBB0_13
LBB0_12:
	mov	w0, #1
LBB0_13:
	bl	_unlikely
	cbnz	x0, LBB0_17
; %bb.14:
	ldr	x8, [x19, #8]
	ldr	x9, [x21, #8]
	subs	x23, x8, x9
	b.lo	LBB0_16
; %bb.15:
	ldr	x8, [x19, #16]
	ldr	x9, [x21, #16]
	add	x8, x8, x23
	cmp	x8, x9
	b.ls	LBB0_21
LBB0_16:
	mov	w0, #1
	bl	_unlikely
	cbz	x0, LBB0_22
LBB0_17:
	mov	x0, x21
	bl	_rvt_put_mr
LBB0_18:
	bl	_rcu_read_unlock
LBB0_19:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	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_21:
	ldr	w8, [x21, #24]
	bics	wzr, w22, w8
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_17
LBB0_22:
	bl	_rcu_read_unlock
	ldr	x8, [x21, #40]
	add	x8, x8, x23
	ldr	w9, [x21, #28]
	cbz	w9, LBB0_24
; %bb.23:
	lsr	x10, x8, x9
	lsl	x9, x10, x9
	sub	x8, x8, x9
Lloh3:
	adrp	x9, _RVT_SEGSZ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RVT_SEGSZ@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x9]
	udiv	x9, x10, x11
	msub	w10, w9, w11, w10
	ldr	x11, [x21, #32]
	b	LBB0_28
LBB0_24:
	ldr	x11, [x21, #32]
	ldr	x9, [x11]
	ldr	x9, [x9]
	ldr	x12, [x9]
	cmp	x8, x12
	b.hs	LBB0_26
; %bb.25:
	mov	w10, #0
	mov	w9, #0
	b	LBB0_28
LBB0_26:
	mov	w9, #0
	mov	w10, #0
Lloh6:
	adrp	x13, _RVT_SEGSZ@GOTPAGE
Lloh7:
	ldr	x13, [x13, _RVT_SEGSZ@GOTPAGEOFF]
Lloh8:
	ldr	x13, [x13]
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	add	w14, w10, #1
	cmp	x13, x14
	csinc	w10, wzr, w10, ls
	cinc	w9, w9, ls
	ldr	x14, [x11, w9, uxtw #3]
	ldr	x14, [x14]
	lsl	x15, x10, #4
	sub	x8, x8, x12
	ldr	x12, [x14, x15]
	cmp	x8, x12
	b.hs	LBB0_27
LBB0_28:
	str	x21, [x20, #32]
	mov	w12, w9
	lsl	x12, x12, #3
	ldr	x13, [x11, x12]
	ldr	x13, [x13]
	mov	w14, w10
	lsl	x14, x14, #4
	add	x13, x13, x14
	ldr	x13, [x13, #8]
	add	x13, x13, x8
	str	x13, [x20, #24]
	ldr	x11, [x11, x12]
	ldr	x11, [x11]
	ldr	x11, [x11, x14]
	sub	x8, x11, x8
	str	x8, [x20]
	ldr	x8, [x19, #16]
LBB0_29:
	str	x8, [x20, #8]
	stp	w9, w10, [x20, #16]
	mov	x0, x20
	mov	x1, x19
	bl	_trace_rvt_sge_new
	mov	w0, #1
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RVT_SEGSZ,8,3                  ; @RVT_SEGSZ
.subsections_via_symbols
