	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipath_rkey_ok                  ## -- Begin function ipath_rkey_ok
	.p2align	4, 0x90
_ipath_rkey_ok:                         ## @ipath_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, %r12d
	movl	%r8d, %r13d
	movq	%rcx, %rbx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	callq	_to_idev
	testl	%r13d, %r13d
	je	LBB0_1
## %bb.3:
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	_ib_ipath_lkey_table_size@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	movb	(%rcx), %dl
	xorl	%ecx, %ecx
	subb	%dl, %cl
	movl	%r13d, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	movslq	%edx, %rcx
	movq	(%rax,%rcx,8), %r15
	movl	$1, %edi
	testq	%r15, %r15
	je	LBB0_6
## %bb.4:
	cmpl	%r13d, (%r15)
	jne	LBB0_6
## %bb.5:
	movq	(%r14), %rax
	xorl	%edi, %edi
	cmpq	8(%r15), %rax
	setne	%dil
LBB0_6:
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_17
## %bb.7:
	movl	$1, %edi
	subq	16(%r15), %rbx
	jl	LBB0_10
## %bb.8:
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	addq	%rbx, %rax
	movslq	24(%r15), %rcx
	cmpq	%rcx, %rax
	ja	LBB0_10
## %bb.9:
	xorl	%edi, %edi
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, 28(%r15)
	sete	%dil
LBB0_10:
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_17
## %bb.11:
	addq	40(%r15), %rbx
	movq	32(%r15), %r9
	movq	(%r9), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rdi
	xorl	%ecx, %ecx
	cmpq	%rdi, %rbx
	jae	LBB0_13
## %bb.12:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_1:
	movq	(%r14), %rdi
	callq	_to_ipd
	xorl	%r12d, %r12d
	cmpq	$0, (%rax)
	jne	LBB0_17
## %bb.2:
	movq	$0, 40(%r15)
	movq	%rbx, 32(%r15)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%r15)
	movl	%eax, 20(%r15)
	jmp	LBB0_16
LBB0_13:
	movq	_IPATH_SEGSZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	subq	%rdi, %rbx
	incl	%eax
	cmpl	%esi, %eax
	cmovael	%r8d, %eax
	sbbl	$-1, %ecx
	movq	(%r9,%rcx,8), %rdi
	movq	(%rdi), %rdi
	movq	%rax, %rdx
	shlq	$4, %rdx
	movq	(%rdi,%rdx), %rdi
	cmpq	%rdi, %rbx
	jae	LBB0_14
LBB0_15:
	movl	%ecx, %edx
	movl	%eax, %r8d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, 40(%rsi)
	movq	%rsi, %r15
	movq	(%r9,%rdx,8), %rdi
	movq	(%rdi), %rdi
	shlq	$4, %r8
	movq	8(%rdi,%r8), %rdi
	addq	%rbx, %rdi
	movq	%rdi, 32(%rsi)
	movq	(%r9,%rdx,8), %rdx
	movq	(%rdx), %rdx
	movl	(%rdx,%r8), %edx
	subl	%ebx, %edx
	movl	%edx, 16(%rsi)
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, 20(%rsi)
	movl	%ecx, 24(%rsi)
	movl	%eax, 28(%rsi)
LBB0_16:
	movq	$0, 8(%r15)
	movl	$1, (%r15)
	movl	$1, %r12d
LBB0_17:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ib_ipath_lkey_table_size,4,2   ## @ib_ipath_lkey_table_size
	.comm	_IPATH_SEGSZ,4,2                ## @IPATH_SEGSZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipath_rkey_ok                  ; -- Begin function ipath_rkey_ok
	.p2align	2
_ipath_rkey_ok:                         ; @ipath_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	x22, x5
	mov	x24, x4
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x23, x0
	ldr	w0, [x0, #8]
	bl	_to_idev
	cbz	w24, LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _ib_ipath_lkey_table_size@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ib_ipath_lkey_table_size@GOTPAGEOFF]
	ldr	x9, [x0]
Lloh2:
	ldr	w8, [x8]
	neg	w8, w8
	asr	w8, w24, w8
	ldr	x25, [x9, w8, sxtw #3]
	cbz	x25, LBB0_4
; %bb.2:
	ldr	w8, [x25]
	cmp	w8, w24
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x23]
	ldr	x9, [x25, #8]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_9
	b	LBB0_5
LBB0_4:
	mov	w0, #1
	bl	_unlikely
	cbnz	x0, LBB0_9
LBB0_5:
	ldr	x8, [x25, #16]
	subs	x21, x21, x8
	b.lt	LBB0_7
; %bb.6:
	add	x8, x21, w20, sxtw
	ldrsw	x9, [x25, #24]
	cmp	x8, x9
	b.ls	LBB0_11
LBB0_7:
	mov	w0, #1
	bl	_unlikely
	cbnz	x0, LBB0_9
	b	LBB0_12
LBB0_8:
	ldr	x0, [x23]
	bl	_to_ipd
	ldr	x8, [x0]
	cbz	x8, LBB0_10
LBB0_9:
	mov	w0, #0
	b	LBB0_18
LBB0_10:
	stp	x21, xzr, [x19, #32]
	stp	w20, w20, [x19, #16]
	b	LBB0_17
LBB0_11:
	ldr	w8, [x25, #28]
	tst	w8, w22
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_9
LBB0_12:
	ldp	x8, x9, [x25, #32]
	ldr	x10, [x8]
	ldr	x10, [x10]
	ldr	x12, [x10]
	add	x9, x9, x21
	cmp	x9, x12
	b.hs	LBB0_14
; %bb.13:
	mov	w10, #0
	mov	w11, #0
	b	LBB0_16
LBB0_14:
	mov	w10, #0
	mov	w11, #0
Lloh3:
	adrp	x13, _IPATH_SEGSZ@GOTPAGE
Lloh4:
	ldr	x13, [x13, _IPATH_SEGSZ@GOTPAGEOFF]
Lloh5:
	ldr	w13, [x13]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	w14, w11, #1
	cmp	w14, w13
	csinc	w11, wzr, w11, hs
	cinc	w10, w10, hs
	ldr	x14, [x8, w10, uxtw #3]
	ldr	x14, [x14]
	lsl	x15, x11, #4
	sub	x9, x9, x12
	ldr	x12, [x14, x15]
	cmp	x9, x12
	b.hs	LBB0_15
LBB0_16:
	mov	w12, w10
	lsl	x12, x12, #3
	str	x25, [x19, #40]
	ldr	x13, [x8, x12]
	mov	w14, w11
	ldr	x13, [x13]
	lsl	x14, x14, #4
	add	x13, x13, x14
	ldr	x13, [x13, #8]
	add	x13, x13, x9
	str	x13, [x19, #32]
	ldr	x8, [x8, x12]
	ldr	x8, [x8]
	ldr	w8, [x8, x14]
	sub	w8, w8, w9
	stp	w8, w20, [x19, #16]
	stp	w10, w11, [x19, #24]
LBB0_17:
	str	xzr, [x19, #8]
	mov	w0, #1
	str	w0, [x19]
LBB0_18:
	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	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ib_ipath_lkey_table_size,4,2   ; @ib_ipath_lkey_table_size
	.comm	_IPATH_SEGSZ,4,2                ; @IPATH_SEGSZ
.subsections_via_symbols
