	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_set_ctxt_jkey             ## -- Begin function hfi1_set_ctxt_jkey
	.p2align	4, 0x90
_hfi1_set_ctxt_jkey:                    ## @hfi1_set_ctxt_jkey
	.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
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r15
	movq	8(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movl	%edx, %r13d
	movq	%rdi, %r14
	movq	_SEND_CTXT_CHECK_JOB_KEY_VALUE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	andl	%edx, %ebx
	movq	_SEND_CTXT_CHECK_JOB_KEY_VALUE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	movq	_SEND_CTXT_CHECK_JOB_KEY_MASK_SMASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movl	(%rax), %r12d
	movl	4(%r15), %edi
	movq	_ALLOW_PERM_JKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_HFI1_CAP_KGET_MASK
	xorl	%ecx, %ecx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_SEND_CTXT_CHECK_JOB_KEY_ALLOW_PERMISSIVE_SMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_5:
	orl	%ecx, %ebx
	movq	_SEND_CTXT_CHECK_JOB_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %ecx
	callq	_write_kctxt_csr
	movq	%r14, %rdi
	callq	_is_ax
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_SEND_CTXT_CHECK_ENABLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_read_kctxt_csr
	movq	_SEND_CTXT_CHECK_ENABLE_CHECK_JOB_KEY_SMASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %ecx
	callq	_write_kctxt_csr
LBB0_7:
	movq	_RCV_KEY_CTRL_JOB_KEY_VALUE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movq	_RCV_KEY_CTRL_JOB_KEY_VALUE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r13d
	movq	_RCV_KEY_CTRL_JOB_KEY_ENABLE_SMASK@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movl	(%r15), %esi
	movq	_RCV_KEY_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r13d, %ecx
	callq	_write_kctxt_csr
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SEND_CTXT_CHECK_JOB_KEY_MASK_SMASK,4,2 ## @SEND_CTXT_CHECK_JOB_KEY_MASK_SMASK
	.comm	_SEND_CTXT_CHECK_JOB_KEY_VALUE_MASK,4,2 ## @SEND_CTXT_CHECK_JOB_KEY_VALUE_MASK
	.comm	_SEND_CTXT_CHECK_JOB_KEY_VALUE_SHIFT,4,2 ## @SEND_CTXT_CHECK_JOB_KEY_VALUE_SHIFT
	.comm	_ALLOW_PERM_JKEY,4,2            ## @ALLOW_PERM_JKEY
	.comm	_SEND_CTXT_CHECK_JOB_KEY_ALLOW_PERMISSIVE_SMASK,4,2 ## @SEND_CTXT_CHECK_JOB_KEY_ALLOW_PERMISSIVE_SMASK
	.comm	_SEND_CTXT_CHECK_JOB_KEY,4,2    ## @SEND_CTXT_CHECK_JOB_KEY
	.comm	_SEND_CTXT_CHECK_ENABLE,4,2     ## @SEND_CTXT_CHECK_ENABLE
	.comm	_SEND_CTXT_CHECK_ENABLE_CHECK_JOB_KEY_SMASK,4,2 ## @SEND_CTXT_CHECK_ENABLE_CHECK_JOB_KEY_SMASK
	.comm	_RCV_KEY_CTRL_JOB_KEY_ENABLE_SMASK,4,2 ## @RCV_KEY_CTRL_JOB_KEY_ENABLE_SMASK
	.comm	_RCV_KEY_CTRL_JOB_KEY_VALUE_MASK,4,2 ## @RCV_KEY_CTRL_JOB_KEY_VALUE_MASK
	.comm	_RCV_KEY_CTRL_JOB_KEY_VALUE_SHIFT,4,2 ## @RCV_KEY_CTRL_JOB_KEY_VALUE_SHIFT
	.comm	_RCV_KEY_CTRL,4,2               ## @RCV_KEY_CTRL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_set_ctxt_jkey             ; -- Begin function hfi1_set_ctxt_jkey
	.p2align	2
_hfi1_set_ctxt_jkey:                    ; @hfi1_set_ctxt_jkey
	.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
	cbz	x1, LBB0_5
; %bb.1:
	mov	x20, x1
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x21, x2
	mov	x19, x0
	ldr	w22, [x8]
Lloh0:
	adrp	x8, _SEND_CTXT_CHECK_JOB_KEY_MASK_SMASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEND_CTXT_CHECK_JOB_KEY_MASK_SMASK@GOTPAGEOFF]
Lloh2:
	adrp	x9, _SEND_CTXT_CHECK_JOB_KEY_VALUE_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SEND_CTXT_CHECK_JOB_KEY_VALUE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	and	w9, w9, w2
Lloh6:
	adrp	x10, _SEND_CTXT_CHECK_JOB_KEY_VALUE_SHIFT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SEND_CTXT_CHECK_JOB_KEY_VALUE_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w23, w9, w8
	ldr	w0, [x20, #4]
Lloh9:
	adrp	x8, _ALLOW_PERM_JKEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ALLOW_PERM_JKEY@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_HFI1_CAP_KGET_MASK
Lloh12:
	adrp	x8, _SEND_CTXT_CHECK_JOB_KEY_ALLOW_PERMISSIVE_SMASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SEND_CTXT_CHECK_JOB_KEY_ALLOW_PERMISSIVE_SMASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w3, w23, w8
Lloh15:
	adrp	x8, _SEND_CTXT_CHECK_JOB_KEY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SEND_CTXT_CHECK_JOB_KEY@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_write_kctxt_csr
	mov	x0, x19
	bl	_is_ax
	cbnz	w0, LBB0_4
; %bb.3:
Lloh18:
	adrp	x23, _SEND_CTXT_CHECK_ENABLE@GOTPAGE
Lloh19:
	ldr	x23, [x23, _SEND_CTXT_CHECK_ENABLE@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x22
	bl	_read_kctxt_csr
Lloh20:
	adrp	x8, _SEND_CTXT_CHECK_ENABLE_CHECK_JOB_KEY_SMASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SEND_CTXT_CHECK_ENABLE_CHECK_JOB_KEY_SMASK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	orr	w3, w8, w0
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x22
	bl	_write_kctxt_csr
LBB0_4:
Lloh23:
	adrp	x8, _RCV_KEY_CTRL_JOB_KEY_ENABLE_SMASK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RCV_KEY_CTRL_JOB_KEY_ENABLE_SMASK@GOTPAGEOFF]
Lloh25:
	adrp	x9, _RCV_KEY_CTRL_JOB_KEY_VALUE_MASK@GOTPAGE
Lloh26:
	ldr	x9, [x9, _RCV_KEY_CTRL_JOB_KEY_VALUE_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	ldr	w9, [x9]
	and	w9, w9, w21
Lloh29:
	adrp	x10, _RCV_KEY_CTRL_JOB_KEY_VALUE_SHIFT@GOTPAGE
Lloh30:
	ldr	x10, [x10, _RCV_KEY_CTRL_JOB_KEY_VALUE_SHIFT@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w3, w9, w8
	ldr	w1, [x20]
Lloh32:
	adrp	x8, _RCV_KEY_CTRL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _RCV_KEY_CTRL@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_write_kctxt_csr
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh35:
	adrp	x8, _EINVAL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SEND_CTXT_CHECK_JOB_KEY_MASK_SMASK,4,2 ; @SEND_CTXT_CHECK_JOB_KEY_MASK_SMASK
	.comm	_SEND_CTXT_CHECK_JOB_KEY_VALUE_MASK,4,2 ; @SEND_CTXT_CHECK_JOB_KEY_VALUE_MASK
	.comm	_SEND_CTXT_CHECK_JOB_KEY_VALUE_SHIFT,4,2 ; @SEND_CTXT_CHECK_JOB_KEY_VALUE_SHIFT
	.comm	_ALLOW_PERM_JKEY,4,2            ; @ALLOW_PERM_JKEY
	.comm	_SEND_CTXT_CHECK_JOB_KEY_ALLOW_PERMISSIVE_SMASK,4,2 ; @SEND_CTXT_CHECK_JOB_KEY_ALLOW_PERMISSIVE_SMASK
	.comm	_SEND_CTXT_CHECK_JOB_KEY,4,2    ; @SEND_CTXT_CHECK_JOB_KEY
	.comm	_SEND_CTXT_CHECK_ENABLE,4,2     ; @SEND_CTXT_CHECK_ENABLE
	.comm	_SEND_CTXT_CHECK_ENABLE_CHECK_JOB_KEY_SMASK,4,2 ; @SEND_CTXT_CHECK_ENABLE_CHECK_JOB_KEY_SMASK
	.comm	_RCV_KEY_CTRL_JOB_KEY_ENABLE_SMASK,4,2 ; @RCV_KEY_CTRL_JOB_KEY_ENABLE_SMASK
	.comm	_RCV_KEY_CTRL_JOB_KEY_VALUE_MASK,4,2 ; @RCV_KEY_CTRL_JOB_KEY_VALUE_MASK
	.comm	_RCV_KEY_CTRL_JOB_KEY_VALUE_SHIFT,4,2 ; @RCV_KEY_CTRL_JOB_KEY_VALUE_SHIFT
	.comm	_RCV_KEY_CTRL,4,2               ; @RCV_KEY_CTRL
.subsections_via_symbols
