	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_pkeys
_set_pkeys:                             ## @set_pkeys
	.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	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r14
	movslq	%esi, %rbx
	movq	-8(%r14,%rbx,8), %rdi
	callq	_ARRAY_SIZE
	movl	$1, %r13d
	testl	%eax, %eax
	jle	LBB0_13
## %bb.1:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	leaq	(%r14,%rbx,8), %r14
	addq	$-8, %r14
	xorl	%ebx, %ebx
	movq	_LIM_MGMT_P_KEY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx,8), %rax
	cmpq	(%r15), %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_2
	jmp	LBB0_13
LBB0_4:
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_12
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx,8), %rax
	movq	(%r14), %rdi
	cmpq	(%rdi,%rbx,8), %rax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, (%rdi,%rbx,8)
	movl	$1, %r13d
	jmp	LBB0_6
LBB0_9:
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.10:
	movq	_HFI1_IB_CFG_PKEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_hfi1_set_ib_cfg
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_hfi1_event_pkey_change
	jmp	LBB0_13
LBB0_12:
	xorl	%r13d, %r13d
LBB0_13:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIM_MGMT_P_KEY,8,3             ## @LIM_MGMT_P_KEY
	.comm	_HFI1_IB_CFG_PKEYS,4,2          ## @HFI1_IB_CFG_PKEYS
	.no_dead_strip	_set_pkeys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_pkeys
_set_pkeys:                             ; @set_pkeys
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	sub	w9, w1, #1
	add	x21, x8, w9, sxtw #3
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x23, #0
Lloh0:
	adrp	x24, _LIM_MGMT_P_KEY@GOTPAGE
Lloh1:
	ldr	x24, [x24, _LIM_MGMT_P_KEY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, x23, lsl #3]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.lt	LBB0_2
LBB0_4:
	mov	w0, #1
	b	LBB0_13
LBB0_5:
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.6:
	mov	x23, #0
	mov	w24, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.ge	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x9, x23, #3
	ldr	x8, [x22, x9]
	ldr	x0, [x21]
	ldr	x9, [x0, x9]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	str	x8, [x0, x23, lsl #3]
	mov	w24, #1
	b	LBB0_7
LBB0_10:
	cbz	w24, LBB0_12
; %bb.11:
Lloh2:
	adrp	x8, _HFI1_IB_CFG_PKEYS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HFI1_IB_CFG_PKEYS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_hfi1_set_ib_cfg
	mov	x0, x20
	mov	x1, x19
	bl	_hfi1_event_pkey_change
LBB0_12:
	mov	w0, #0
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_LIM_MGMT_P_KEY,8,3             ; @LIM_MGMT_P_KEY
	.comm	_HFI1_IB_CFG_PKEYS,4,2          ; @HFI1_IB_CFG_PKEYS
	.no_dead_strip	_set_pkeys
.subsections_via_symbols
