	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_for_key_construction      ## -- Begin function wait_for_key_construction
	.p2align	4, 0x90
_wait_for_key_construction:             ## @wait_for_key_construction
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	8(%rdi), %rbx
	testl	%esi, %esi
	movq	_key_wait_bit_intr@GOTPCREL(%rip), %rax
	cmoveq	_key_wait_bit@GOTPCREL(%rip), %rax
	movq	_KEY_FLAG_USER_CONSTRUCT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	cmoveq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_wait_on_bit
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	_KEY_FLAG_NEGATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	_smp_rmb
	movq	(%r14), %rax
	movl	(%rax), %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_key_validate                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_FLAG_USER_CONSTRUCT,4,2    ## @KEY_FLAG_USER_CONSTRUCT
	.comm	_key_wait_bit_intr,4,2          ## @key_wait_bit_intr
	.comm	_key_wait_bit,4,2               ## @key_wait_bit
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.comm	_KEY_FLAG_NEGATIVE,4,2          ## @KEY_FLAG_NEGATIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_for_key_construction      ; -- Begin function wait_for_key_construction
	.p2align	2
_wait_for_key_construction:             ; @wait_for_key_construction
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x20, x0, #8
Lloh0:
	adrp	x8, _KEY_FLAG_USER_CONSTRUCT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KEY_FLAG_USER_CONSTRUCT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _key_wait_bit_intr@GOTPAGE
Lloh3:
	ldr	x9, [x9, _key_wait_bit_intr@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x10, _key_wait_bit@GOTPAGE
Lloh6:
	ldr	x10, [x10, _key_wait_bit@GOTPAGEOFF]
	cmp	w1, #0
	csel	x9, x10, x9, eq
	ldr	w2, [x9]
Lloh7:
	adrp	x9, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh9:
	adrp	x10, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
	csel	x9, x10, x9, eq
	ldr	w3, [x9]
	mov	x0, x20
	mov	x1, x8
	bl	_wait_on_bit
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh11:
	adrp	x8, _KEY_FLAG_NEGATIVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KEY_FLAG_NEGATIVE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_4
; %bb.2:
	bl	_smp_rmb
	ldr	x8, [x19]
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_key_validate
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_FLAG_USER_CONSTRUCT,4,2    ; @KEY_FLAG_USER_CONSTRUCT
	.comm	_key_wait_bit_intr,4,2          ; @key_wait_bit_intr
	.comm	_key_wait_bit,4,2               ; @key_wait_bit
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.comm	_KEY_FLAG_NEGATIVE,4,2          ; @KEY_FLAG_NEGATIVE
.subsections_via_symbols
