	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_keys
_check_keys:                            ## @check_keys
	.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	%rcx, %r12
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_bth_pkey
	movl	%eax, %ebx
	movl	$0, (%r15)
	cmpl	$1, %r14d
	jne	LBB0_7
## %bb.1:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	cmpl	$0, 8(%r13)
	jle	LBB0_5
## %bb.2:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%r14,4), %esi
	movl	%ebx, %edi
	callq	_pkey_match
	testq	%rax, %rax
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movslq	8(%r13), %rax
	cmpq	%rax, %r14
	jl	LBB0_3
LBB0_5:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_6
LBB0_7:
	movq	(%r13), %rax
	movq	(%r12), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	%ebx, %edi
	callq	_pkey_match
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
LBB0_6:
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_warn_ratelimited
	movq	%r13, %rdi
	callq	_set_bad_pkey_cntr
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	(%r12), %r14
LBB0_10:
	movl	%r14d, (%r15)
	movq	%r12, %rdi
	callq	_qp_type
	movq	_IB_QPT_UD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_12
## %bb.11:
	movq	%r12, %rdi
	callq	_qp_type
	movq	_IB_QPT_GSI@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_19
LBB0_12:
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r15)
	je	LBB0_19
## %bb.13:
	cmpl	$1, %r14d
	jne	LBB0_14
## %bb.15:
	movq	_GSI_QKEY@GOTPCREL(%rip), %r12
	jmp	LBB0_16
LBB0_14:
	addq	$8, %r12
LBB0_16:
	movl	(%r12), %r12d
	movq	%r15, %rdi
	callq	_deth_qkey
	xorl	%edi, %edi
	cmpl	%r12d, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	movq	%r15, %rdi
	callq	_deth_qkey
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_pr_warn_ratelimited
	movq	%r13, %rdi
	callq	_set_qkey_viol_cntr
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad pkey = 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"bad pkey = 0x%0x\n"

	.comm	_IB_QPT_UD,8,3                  ## @IB_QPT_UD
	.comm	_IB_QPT_GSI,8,3                 ## @IB_QPT_GSI
	.comm	_GSI_QKEY,4,2                   ## @GSI_QKEY
L_.str.2:                               ## @.str.2
	.asciz	"bad qkey, got 0x%x expected 0x%x for qpn 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_check_keys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_keys
_check_keys:                            ; @check_keys
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_bth_pkey
	mov	x23, x0
	str	wzr, [x21]
	cmp	w20, #1
	b.ne	LBB0_6
; %bb.1:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x24, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w1, [x8, x24, lsl #2]
	mov	x0, x23
	bl	_pkey_match
	cbnz	x0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x19, #8]
	cmp	x24, x8
	b.lt	LBB0_3
LBB0_5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_6:
	ldr	x8, [x19]
	ldr	x9, [x22]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x23
	bl	_pkey_match
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.7:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	mov	x1, x23
	bl	_pr_warn_ratelimited
	mov	x0, x19
	bl	_set_bad_pkey_cntr
LBB0_9:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_10:
	ldr	x24, [x22]
LBB0_11:
	str	w24, [x21]
	mov	x0, x22
	bl	_qp_type
Lloh7:
	adrp	x8, _IB_QPT_UD@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IB_QPT_UD@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.12:
	mov	x0, x22
	bl	_qp_type
Lloh10:
	adrp	x8, _IB_QPT_GSI@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IB_QPT_GSI@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_16
LBB0_13:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_16
; %bb.14:
	add	x8, x22, #8
Lloh13:
	adrp	x9, _GSI_QKEY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _GSI_QKEY@GOTPAGEOFF]
	cmp	w20, #1
	csel	x8, x9, x8, eq
	ldr	w22, [x8]
	mov	x0, x21
	bl	_deth_qkey
	cmp	w0, w22
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_17
; %bb.15:
	mov	x0, x21
	bl	_deth_qkey
	mov	x1, x0
	stp	x22, x20, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_warn_ratelimited
	mov	x0, x19
	bl	_set_qkey_viol_cntr
	b	LBB0_9
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad pkey = 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"bad pkey = 0x%0x\n"

	.comm	_IB_QPT_UD,8,3                  ; @IB_QPT_UD
	.comm	_IB_QPT_GSI,8,3                 ; @IB_QPT_GSI
	.comm	_GSI_QKEY,4,2                   ; @GSI_QKEY
l_.str.2:                               ; @.str.2
	.asciz	"bad qkey, got 0x%x expected 0x%x for qpn 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_check_keys
.subsections_via_symbols
