	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_clear_ctxt_pkey           ## -- Begin function hfi1_clear_ctxt_pkey
	.p2align	4, 0x90
_hfi1_clear_ctxt_pkey:                  ## @hfi1_clear_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	(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rdi, %r15
	movl	(%rax), %r14d
	movq	_SEND_CTXT_CHECK_ENABLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	%r14d, %esi
	callq	_read_kctxt_csr
	movq	_SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_write_kctxt_csr
	movq	_SEND_CTXT_CHECK_PARTITION_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	callq	_write_kctxt_csr
	jmp	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	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_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_PARTITION_KEY,4,2 ## @SEND_CTXT_CHECK_PARTITION_KEY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_clear_ctxt_pkey           ; -- Begin function hfi1_clear_ctxt_pkey
	.p2align	2
_hfi1_clear_ctxt_pkey:                  ; @hfi1_clear_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	x21, _SEND_CTXT_CHECK_ENABLE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SEND_CTXT_CHECK_ENABLE@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x1, x20
	bl	_read_kctxt_csr
Lloh2:
	adrp	x8, _SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEND_CTXT_CHECK_ENABLE_CHECK_PARTITION_KEY_SMASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w3, w0, w8
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_write_kctxt_csr
Lloh5:
	adrp	x8, _SEND_CTXT_CHECK_PARTITION_KEY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SEND_CTXT_CHECK_PARTITION_KEY@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_write_kctxt_csr
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.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_PARTITION_KEY,4,2 ; @SEND_CTXT_CHECK_PARTITION_KEY
.subsections_via_symbols
