	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_rkey_ok                    ## -- Begin function rvt_rkey_ok
	.p2align	4, 0x90
_rvt_rkey_ok:                           ## @rvt_rkey_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
	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
	movq	%r8, %r15
	movq	%rcx, %r12
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	callq	_ib_to_rvt
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_rcu_read_lock
	testq	%r15, %r15
	je	LBB0_1
## %bb.4:
	movq	16(%rbx), %rax
	movb	8(%rbx), %cl
	movq	%r15, %rdx
	shrq	%cl, %rdx
	movl	(%rax,%rdx,4), %edi
	callq	_rcu_dereference
	testq	%rax, %rax
	je	LBB0_25
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_rvt_get_mr
	movl	60(%rbx), %edi
	callq	_READ_ONCE
	testl	%eax, %eax
	je	LBB0_24
## %bb.6:
	movq	%rbx, %rdi
	addq	$56, %rdi
	callq	_atomic_read
	movl	$1, %edi
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	cmpq	%r15, (%rbx)
	jne	LBB0_9
## %bb.8:
	movq	(%r14), %rax
	xorl	%edi, %edi
	cmpq	8(%rbx), %rax
	setne	%dil
LBB0_9:
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_24
## %bb.10:
	movl	$1, %edi
	subq	16(%rbx), %r12
	jl	LBB0_13
## %bb.11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%r12, %rax
	cmpq	24(%rbx), %rax
	ja	LBB0_13
## %bb.12:
	xorl	%edi, %edi
	testl	%r13d, 32(%rbx)
	sete	%dil
LBB0_13:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_14
LBB0_24:
	movq	%rbx, %rdi
	callq	_rvt_put_mr
	jmp	LBB0_25
LBB0_1:
	movq	(%r14), %rdi
	callq	_ibpd_to_rvtpd
	movq	%rax, %rbx
	movl	8(%rax), %edi
	callq	_ib_to_rvt
	cmpq	$0, (%rbx)
	je	LBB0_2
LBB0_25:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_rcu_read_unlock
LBB0_26:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%rax), %edi
	callq	_rcu_dereference
	testq	%rax, %rax
	je	LBB0_25
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_rvt_get_mr
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, 32(%rax)
	movq	%r12, 24(%rax)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	%rcx, 8(%rax)
	movq	$0, 16(%rax)
	movl	$1, %ebx
	jmp	LBB0_26
LBB0_14:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	addq	48(%rbx), %r12
	movl	36(%rbx), %ecx
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.17:
	movq	%r12, %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_18
## %bb.19:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r13
	jmp	LBB0_20
LBB0_15:
	movq	40(%rbx), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rdi
	cmpq	%rdi, %r12
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	jae	LBB0_21
## %bb.16:
	xorl	%edx, %edx
	jmp	LBB0_23
LBB0_18:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	movl	%eax, %r13d
LBB0_20:
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	subq	%rsi, %r12
	movq	40(%rbx), %rax
	jmp	LBB0_23
LBB0_21:
	movq	_RVT_SEGSZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%r8d, %r8d
	xorl	%edx, %edx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	subq	%rdi, %r12
	incl	%edx
	xorl	%edi, %edi
	cmpq	%rdx, %rcx
	cmovbel	%r8d, %edx
	setbe	%dil
	addl	%edi, %r13d
	movq	(%rax,%r13,8), %rdi
	movq	(%rdi), %rdi
	movq	%rdx, %rsi
	shlq	$4, %rsi
	movq	(%rdi,%rsi), %rdi
	cmpq	%rdi, %r12
	jae	LBB0_22
LBB0_23:
	movq	%rbx, 32(%r9)
	movl	%r13d, %ecx
	movq	(%rax,%rcx,8), %rsi
	movq	(%rsi), %rsi
	movl	%edx, %edi
	shlq	$4, %rdi
	movq	8(%rsi,%rdi), %rsi
	addq	%r12, %rsi
	movq	%rsi, 24(%r9)
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rax
	movq	(%rax,%rdi), %rax
	subq	%r12, %rax
	movq	%rax, (%r9)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r9)
	movl	%r13d, 16(%r9)
	movl	%edx, 20(%r9)
	movl	$1, %ebx
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.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_rkey_ok                    ; -- Begin function rvt_rkey_ok
	.p2align	2
_rvt_rkey_ok:                           ; @rvt_rkey_ok
	.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	x23, x5
	mov	x25, x4
	mov	x22, x3
	mov	x20, x2
	mov	x19, x1
	mov	x24, x0
	ldr	w0, [x0, #8]
	bl	_ib_to_rvt
	mov	x21, x0
	bl	_rcu_read_lock
	cbz	x25, LBB0_6
; %bb.1:
	ldp	x9, x8, [x21, #8]
	lsr	x9, x25, x9
	ldr	w0, [x8, x9, lsl #2]
	bl	_rcu_dereference
	cbz	x0, LBB0_14
; %bb.2:
	mov	x21, x0
	bl	_rvt_get_mr
	ldr	w0, [x21, #60]
	bl	_READ_ONCE
	cbz	w0, LBB0_13
; %bb.3:
	add	x0, x21, #56
	bl	_atomic_read
	cbnz	x0, LBB0_9
; %bb.4:
	ldr	x8, [x21]
	cmp	x8, x25
	b.ne	LBB0_9
; %bb.5:
	ldr	x8, [x24]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_13
	b	LBB0_10
LBB0_6:
	ldr	x0, [x24]
	bl	_ibpd_to_rvtpd
	mov	x21, x0
	ldr	w0, [x0, #8]
	bl	_ib_to_rvt
	ldr	x8, [x21]
	cbnz	x8, LBB0_14
; %bb.7:
	ldr	w0, [x0]
	bl	_rcu_dereference
	cbz	x0, LBB0_14
; %bb.8:
	mov	x21, x0
	bl	_rvt_get_mr
	bl	_rcu_read_unlock
	stp	x22, x21, [x19, #24]
	stp	x20, x20, [x19]
	mov	w0, #1
	str	xzr, [x19, #16]
	b	LBB0_15
LBB0_9:
	mov	w0, #1
	bl	_unlikely
	cbnz	x0, LBB0_13
LBB0_10:
	ldr	x8, [x21, #16]
	subs	x22, x22, x8
	b.lt	LBB0_12
; %bb.11:
	ldr	x8, [x21, #24]
	add	x9, x22, x20
	cmp	x9, x8
	b.ls	LBB0_16
LBB0_12:
	mov	w0, #1
	bl	_unlikely
	cbz	x0, LBB0_17
LBB0_13:
	mov	x0, x21
	bl	_rvt_put_mr
LBB0_14:
	bl	_rcu_read_unlock
	mov	w0, #0
LBB0_15:
	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
LBB0_16:
	ldr	w8, [x21, #32]
	tst	w8, w23
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_13
LBB0_17:
	bl	_rcu_read_unlock
	ldr	x8, [x21, #48]
	add	x8, x8, x22
	ldr	w9, [x21, #36]
	cbz	w9, LBB0_19
; %bb.18:
	lsr	x10, x8, x9
	lsl	x9, x10, x9
	sub	x8, x8, x9
Lloh0:
	adrp	x9, _RVT_SEGSZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RVT_SEGSZ@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x9]
	udiv	x9, x10, x11
	msub	w11, w9, w11, w10
	ldr	x10, [x21, #40]
	b	LBB0_23
LBB0_19:
	ldr	x10, [x21, #40]
	ldr	x9, [x10]
	ldr	x9, [x9]
	ldr	x12, [x9]
	cmp	x8, x12
	b.hs	LBB0_21
; %bb.20:
	mov	w9, #0
	mov	w11, #0
	b	LBB0_23
LBB0_21:
	mov	w11, #0
	mov	w9, #0
Lloh3:
	adrp	x13, _RVT_SEGSZ@GOTPAGE
Lloh4:
	ldr	x13, [x13, _RVT_SEGSZ@GOTPAGEOFF]
Lloh5:
	ldr	x13, [x13]
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	add	w14, w11, #1
	cmp	x13, x14
	cinc	w9, w9, ls
	csinc	w11, wzr, w11, ls
	ldr	x14, [x10, w9, uxtw #3]
	ldr	x14, [x14]
	lsl	x15, x11, #4
	sub	x8, x8, x12
	ldr	x12, [x14, x15]
	cmp	x8, x12
	b.hs	LBB0_22
LBB0_23:
	str	x21, [x19, #32]
	mov	w12, w9
	lsl	x12, x12, #3
	ldr	x13, [x10, x12]
	ldr	x13, [x13]
	mov	w14, w11
	lsl	x14, x14, #4
	add	x13, x13, x14
	ldr	x13, [x13, #8]
	add	x13, x13, x8
	str	x13, [x19, #24]
	ldr	x10, [x10, x12]
	ldr	x10, [x10]
	ldr	x10, [x10, x14]
	sub	x8, x10, x8
	stp	x8, x20, [x19]
	stp	w9, w11, [x19, #16]
	mov	w0, #1
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RVT_SEGSZ,8,3                  ; @RVT_SEGSZ
.subsections_via_symbols
