	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __key_instantiate_and_link
___key_instantiate_and_link:            ## @__key_instantiate_and_link
	.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	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_key_check
	movq	%r12, %rdi
	callq	_key_check
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_key_construction_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_KEY_FLAG_INSTANTIATED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	16(%r13), %rax
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	*(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
LBB0_9:
	movq	_key_construction_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	8(%r13), %rdi
	callq	_atomic_inc
	movq	_KEY_FLAG_INSTANTIATED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_set_bit
	movq	_KEY_FLAG_USER_CONSTRUCT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%r13, %rsi
	callq	_test_and_clear_bit
	movq	%rax, %r14
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	___key_link
LBB0_4:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_key_revoke
LBB0_6:
	movq	_key_construction_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_wake_up_bit
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_key_construction_mutex,4,2     ## @key_construction_mutex
	.comm	_KEY_FLAG_INSTANTIATED,4,2      ## @KEY_FLAG_INSTANTIATED
	.comm	_KEY_FLAG_USER_CONSTRUCT,4,2    ## @KEY_FLAG_USER_CONSTRUCT
	.no_dead_strip	___key_instantiate_and_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __key_instantiate_and_link
___key_instantiate_and_link:            ; @__key_instantiate_and_link
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x5
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	bl	_key_check
	mov	x0, x22
	bl	_key_check
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
Lloh3:
	adrp	x0, _key_construction_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _key_construction_mutex@GOTPAGEOFF]
	bl	_mutex_lock
Lloh5:
	adrp	x25, _KEY_FLAG_INSTANTIATED@GOTPAGE
Lloh6:
	ldr	x25, [x25, _KEY_FLAG_INSTANTIATED@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	x1, x19
	bl	_test_bit
	cbz	w0, LBB0_2
; %bb.1:
	neg	w23, w26
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	blr	x8
	mov	x23, x0
	cbz	w0, LBB0_5
LBB0_3:
Lloh7:
	adrp	x0, _key_construction_mutex@GOTPAGE
Lloh8:
	ldr	x0, [x0, _key_construction_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_4:
	mov	x0, x23
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x0, [x19, #8]
	bl	_atomic_inc
	ldr	w0, [x25]
	mov	x1, x19
	bl	_set_bit
Lloh9:
	adrp	x24, _KEY_FLAG_USER_CONSTRUCT@GOTPAGE
Lloh10:
	ldr	x24, [x24, _KEY_FLAG_USER_CONSTRUCT@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x1, x19
	bl	_test_and_clear_bit
	mov	x23, x0
	cbz	x22, LBB0_7
; %bb.6:
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	bl	___key_link
LBB0_7:
	cbz	x20, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_key_revoke
LBB0_9:
Lloh11:
	adrp	x0, _key_construction_mutex@GOTPAGE
Lloh12:
	ldr	x0, [x0, _key_construction_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	cbz	x23, LBB0_4
; %bb.10:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_wake_up_bit
	mov	w23, #0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_key_construction_mutex,4,2     ; @key_construction_mutex
	.comm	_KEY_FLAG_INSTANTIATED,4,2      ; @KEY_FLAG_INSTANTIATED
	.comm	_KEY_FLAG_USER_CONSTRUCT,4,2    ; @KEY_FLAG_USER_CONSTRUCT
	.no_dead_strip	___key_instantiate_and_link
.subsections_via_symbols
