	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_set_ctxt_pkey             ## -- Begin function hfi1_set_ctxt_pkey
	.p2align	4, 0x90
_hfi1_set_ctxt_pkey:                    ## @hfi1_set_ctxt_pkey
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rdx, %rax
	movq	(%rsi), %rdx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movq	_SEND_CTXT_CHECK_PARTITION_KEY_VALUE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_SEND_CTXT_CHECK_PARTITION_KEY_VALUE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	(%rdx), %r14d
	movq	_SEND_CTXT_CHECK_PARTITION_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r14d, %esi
	movl	%eax, %ecx
	callq	_write_kctxt_csr
	movq	_SEND_CTXT_CHECK_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_read_kctxt_csr
	movq	_SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SEND_CTXT_CHECK_ENABLE_DISALLOW_KDETH_PACKETS_SMASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_write_kctxt_csr
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SEND_CTXT_CHECK_PARTITION_KEY_VALUE_MASK,4,2 ## @SEND_CTXT_CHECK_PARTITION_KEY_VALUE_MASK
	.comm	_SEND_CTXT_CHECK_PARTITION_KEY_VALUE_SHIFT,4,2 ## @SEND_CTXT_CHECK_PARTITION_KEY_VALUE_SHIFT
	.comm	_SEND_CTXT_CHECK_PARTITION_KEY,4,2 ## @SEND_CTXT_CHECK_PARTITION_KEY
	.comm	_SEND_CTXT_CHECK_ENABLE,4,2     ## @SEND_CTXT_CHECK_ENABLE
	.comm	_SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK,4,2 ## @SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK
	.comm	_SEND_CTXT_CHECK_ENABLE_DISALLOW_KDETH_PACKETS_SMASK,4,2 ## @SEND_CTXT_CHECK_ENABLE_DISALLOW_KDETH_PACKETS_SMASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_set_ctxt_pkey             ; -- Begin function hfi1_set_ctxt_pkey
	.p2align	2
_hfi1_set_ctxt_pkey:                    ; @hfi1_set_ctxt_pkey
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x1, LBB0_3
; %bb.1:
	ldr	x8, [x1]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x19, x0
	ldr	w20, [x8]
Lloh0:
	adrp	x8, _SEND_CTXT_CHECK_PARTITION_KEY_VALUE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEND_CTXT_CHECK_PARTITION_KEY_VALUE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SEND_CTXT_CHECK_PARTITION_KEY_VALUE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SEND_CTXT_CHECK_PARTITION_KEY_VALUE_SHIFT@GOTPAGEOFF]
	and	w8, w8, w2
Lloh5:
	ldr	w9, [x9]
	lsl	w3, w8, w9
Lloh6:
	adrp	x8, _SEND_CTXT_CHECK_PARTITION_KEY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEND_CTXT_CHECK_PARTITION_KEY@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_write_kctxt_csr
Lloh9:
	adrp	x21, _SEND_CTXT_CHECK_ENABLE@GOTPAGE
Lloh10:
	ldr	x21, [x21, _SEND_CTXT_CHECK_ENABLE@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_read_kctxt_csr
Lloh11:
	adrp	x8, _SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh14:
	adrp	x9, _SEND_CTXT_CHECK_ENABLE_DISALLOW_KDETH_PACKETS_SMASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SEND_CTXT_CHECK_ENABLE_DISALLOW_KDETH_PACKETS_SMASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	bic	w3, w8, w9
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_write_kctxt_csr
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SEND_CTXT_CHECK_PARTITION_KEY_VALUE_MASK,4,2 ; @SEND_CTXT_CHECK_PARTITION_KEY_VALUE_MASK
	.comm	_SEND_CTXT_CHECK_PARTITION_KEY_VALUE_SHIFT,4,2 ; @SEND_CTXT_CHECK_PARTITION_KEY_VALUE_SHIFT
	.comm	_SEND_CTXT_CHECK_PARTITION_KEY,4,2 ; @SEND_CTXT_CHECK_PARTITION_KEY
	.comm	_SEND_CTXT_CHECK_ENABLE,4,2     ; @SEND_CTXT_CHECK_ENABLE
	.comm	_SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK,4,2 ; @SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK
	.comm	_SEND_CTXT_CHECK_ENABLE_DISALLOW_KDETH_PACKETS_SMASK,4,2 ; @SEND_CTXT_CHECK_ENABLE_DISALLOW_KDETH_PACKETS_SMASK
.subsections_via_symbols
