	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_reject_and_link            ## -- Begin function key_reject_and_link
	.p2align	4, 0x90
_key_reject_and_link:                   ## @key_reject_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_key_check
	movq	%r15, %rdi
	callq	_key_check
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	subl	(%rcx), %r13d
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	movl	8(%r12), %esi
	movl	32(%r12), %edx
	leaq	-56(%rbp), %rcx
	movq	%r15, %rdi
	callq	___key_link_begin
LBB0_2:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_key_construction_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_KEY_FLAG_INSTANTIATED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %r14
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.3:
	xorl	%r14d, %r14d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_9
LBB0_4:
	movq	24(%r12), %rdi
	callq	_atomic_inc
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	negq	%rax
	movq	16(%r12), %rcx
	movq	%rax, (%rcx)
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_smp_wmb
	movq	_KEY_FLAG_NEGATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movq	_KEY_FLAG_INSTANTIATED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	xorl	%eax, %eax
	callq	_current_kernel_time
	addl	%eax, %ebx
	movl	%ebx, (%r12)
	movq	_key_gc_delay@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_key_schedule_gc
	movq	_KEY_FLAG_USER_CONSTRUCT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_and_clear_bit
	testq	%rax, %rax
	setne	%r14b
	testq	%r15, %r15
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_7
## %bb.5:
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.6:
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	___key_link
LBB0_7:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_key_revoke
LBB0_9:
	movq	_key_construction_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	testq	%r15, %r15
	je	LBB0_11
## %bb.10:
	movl	8(%r12), %esi
	movq	-56(%rbp), %rdx
	movq	%r15, %rdi
	callq	___key_link_end
LBB0_11:
	testb	%r14b, %r14b
	je	LBB0_13
## %bb.12:
	movq	_KEY_FLAG_USER_CONSTRUCT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_wake_up_bit
LBB0_13:
	testl	%r13d, %r13d
	cmovnel	%r13d, %ebx
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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_NEGATIVE,4,2          ## @KEY_FLAG_NEGATIVE
	.comm	_key_gc_delay,4,2               ## @key_gc_delay
	.comm	_KEY_FLAG_USER_CONSTRUCT,4,2    ## @KEY_FLAG_USER_CONSTRUCT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_reject_and_link            ; -- Begin function key_reject_and_link
	.p2align	2
_key_reject_and_link:                   ; @key_reject_and_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x4
	mov	x19, x3
	mov	x25, x2
	mov	x24, x1
	mov	x20, x0
	bl	_key_check
	mov	x0, x19
	bl	_key_check
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	cbz	x19, LBB0_2
; %bb.1:
	ldr	w1, [x20, #8]
	ldr	w2, [x20, #32]
	add	x3, sp, #8
	mov	x0, x19
	bl	___key_link_begin
	mov	x21, x0
	b	LBB0_3
LBB0_2:
	mov	w21, #0
LBB0_3:
Lloh3:
	adrp	x0, _key_construction_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _key_construction_mutex@GOTPAGEOFF]
	bl	_mutex_lock
Lloh5:
	adrp	x27, _KEY_FLAG_INSTANTIATED@GOTPAGE
Lloh6:
	ldr	x27, [x27, _KEY_FLAG_INSTANTIATED@GOTPAGEOFF]
	ldr	w0, [x27]
	add	x22, x20, #4
	mov	x1, x22
	bl	_test_bit
	cbz	w0, LBB0_5
; %bb.4:
	mov	w24, #0
	neg	w23, w26
	b	LBB0_10
LBB0_5:
	ldr	x0, [x20, #24]
	bl	_atomic_inc
	mov	x8, #0
	sub	x8, x8, w25, uxtw
	ldr	x9, [x20, #16]
	str	x8, [x9]
	bl	_smp_wmb
Lloh7:
	adrp	x8, _KEY_FLAG_NEGATIVE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _KEY_FLAG_NEGATIVE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_set_bit
	ldr	w0, [x27]
	mov	x1, x22
	bl	_set_bit
	bl	_current_kernel_time
	add	w8, w0, w24
	str	w8, [x20]
Lloh10:
	adrp	x9, _key_gc_delay@GOTPAGE
Lloh11:
	ldr	x9, [x9, _key_gc_delay@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	add	w0, w9, w8
	bl	_key_schedule_gc
Lloh13:
	adrp	x8, _KEY_FLAG_USER_CONSTRUCT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _KEY_FLAG_USER_CONSTRUCT@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_and_clear_bit
	cmp	x0, #0
	cset	w24, ne
	cbz	x19, LBB0_8
; %bb.6:
	cbnz	w21, LBB0_8
; %bb.7:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	___key_link
LBB0_8:
	cbz	x23, LBB0_10
; %bb.9:
	mov	x0, x23
	bl	_key_revoke
	mov	w23, #0
LBB0_10:
Lloh16:
	adrp	x0, _key_construction_mutex@GOTPAGE
Lloh17:
	ldr	x0, [x0, _key_construction_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	cbz	x19, LBB0_12
; %bb.11:
	ldr	w1, [x20, #8]
	ldr	x2, [sp, #8]
	mov	x0, x19
	bl	___key_link_end
LBB0_12:
	cbz	w24, LBB0_14
; %bb.13:
Lloh18:
	adrp	x8, _KEY_FLAG_USER_CONSTRUCT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _KEY_FLAG_USER_CONSTRUCT@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_wake_up_bit
LBB0_14:
	cmp	w23, #0
	csel	w0, w21, w23, eq
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.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_NEGATIVE,4,2          ; @KEY_FLAG_NEGATIVE
	.comm	_key_gc_delay,4,2               ; @key_gc_delay
	.comm	_KEY_FLAG_USER_CONSTRUCT,4,2    ; @KEY_FLAG_USER_CONSTRUCT
.subsections_via_symbols
