	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_keyring_gc                     ## -- Begin function keyring_gc
	.p2align	4, 0x90
_keyring_gc:                            ## @keyring_gc
	.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
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_key_serial
	movl	8(%r12), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_kenter
	movq	%r12, %rdi
	callq	_down_write
	movq	%r12, %rdi
	callq	_rcu_dereference_locked_keyring
	testq	%rax, %rax
	je	LBB0_21
## %bb.1:
	movq	%rax, %r13
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_2
## %bb.3:
	incq	%rbx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %eax
	movq	16(%r13), %rcx
	movq	(%rcx,%rax,8), %rdi
	movl	%r15d, %esi
	callq	_key_is_dead
	cmpl	$1, %eax
	adcl	$0, %r14d
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_4
## %bb.5:
	movl	(%r13), %ebx
	cmpl	%ebx, %r14d
	jne	LBB0_7
LBB0_20:
	movq	%r12, %rdi
	callq	_up_write
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_23
LBB0_21:
	movq	%r12, %rdi
	callq	_up_write
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_23
LBB0_2:
	xorl	%r14d, %r14d
	cmpl	%ebx, %r14d
	je	LBB0_20
LBB0_7:
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_roundup
	movl	%eax, %ebx
	leal	32(,%rbx,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_22
## %bb.8:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, 4(%rax)
	movl	$0, (%rax)
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	$0, 24(%rax)
	movl	(%r13), %r14d
	testl	%r14d, %r14d
	jle	LBB0_9
## %bb.10:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	incq	%r14
	xorl	%r12d, %r12d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	decq	%r14
	cmpq	$1, %r14
	jbe	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%r14), %eax
	movq	16(%r13), %rcx
	movq	(%rcx,%rax,8), %rbx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_key_is_dead
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	-64(%rbp), %r12d                ## 4-byte Folded Reload
	jge	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rbx, %rdi
	callq	_key_get
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx), %rcx
	movslq	%r12d, %rdx
	incl	%r12d
	movq	%rax, (%rcx,%rdx,8)
	jmp	LBB0_14
LBB0_22:
	movq	%r12, %rdi
	callq	_up_write
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_23
LBB0_9:
	xorl	%r12d, %r12d
LBB0_15:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%r12d, (%r14)
	movq	_KEYQUOTA_LINK_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	imull	%r12d, %esi
	addl	$32, %esi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_key_payload_reserve
	movl	4(%rbx), %edi
	testl	%r12d, %r12d
	je	LBB0_16
## %bb.17:
	movq	%r14, %rsi
	callq	_rcu_assign_pointer
	jmp	LBB0_18
LBB0_16:
	xorl	%esi, %esi
	callq	_rcu_assign_pointer
	movq	%r14, %rdi
	callq	_kfree
LBB0_18:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_up_write
	addq	$8, %r13
	movq	_keyring_clear_rcu_disposal@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_call_rcu
	leaq	L_.str.1(%rip), %rdi
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kleave                         ## TAILCALL
LBB0_19:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, (%rdi)
	addq	$8, %rdi
	callq	_keyring_clear_rcu_disposal
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_up_write
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"{%x,%s}"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_KEYQUOTA_LINK_BYTES,4,2        ## @KEYQUOTA_LINK_BYTES
L_.str.1:                               ## @.str.1
	.asciz	" [yes]"

L_.str.2:                               ## @.str.2
	.asciz	" [discard]"

L_.str.3:                               ## @.str.3
	.asciz	" [no dead]"

L_.str.4:                               ## @.str.4
	.asciz	" [no_klist]"

L_.str.5:                               ## @.str.5
	.asciz	" [oom]"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_keyring_gc                     ; -- Begin function keyring_gc
	.p2align	2
_keyring_gc:                            ; @keyring_gc
	.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, x1
	mov	x19, x0
	bl	_key_serial
	mov	x1, x0
	ldr	w2, [x19, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_kenter
	mov	x0, x19
	bl	_down_write
	mov	x0, x19
	bl	_rcu_dereference_locked_keyring
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	w22, #0
	add	x23, x8, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w23, #2
	ldr	x9, [x20, #16]
	ldr	x0, [x9, w8, uxtw #3]
	mov	x1, x21
	bl	_key_is_dead
	cmp	w0, #0
	cinc	w22, w22, eq
	sub	x23, x23, #1
	cmp	x23, #1
	b.hi	LBB0_3
; %bb.4:
	ldr	w8, [x20]
	cmp	w22, w8
	b.ne	LBB0_8
LBB0_5:
	mov	x0, x19
	bl	_up_write
Lloh2:
	adrp	x0, l_.str.3@PAGE
Lloh3:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_21
LBB0_6:
	mov	x0, x19
	bl	_up_write
Lloh4:
	adrp	x0, l_.str.4@PAGE
Lloh5:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_21
LBB0_7:
	mov	w22, #0
	cmp	w22, w8
	b.eq	LBB0_5
LBB0_8:
	mov	x0, x22
	mov	w1, #4
	bl	_roundup
	mov	x23, x0
	lsl	w8, w0, #3
	add	w0, w8, #32
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_15
; %bb.9:
	mov	x22, x0
	stp	wzr, w23, [x0]
	str	xzr, [x0, #24]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.10:
	mov	w25, #0
	add	x26, x8, #1
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	sub	x26, x26, #1
	cmp	x26, #1
	b.ls	LBB0_17
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	sub	w8, w26, #2
	ldr	x9, [x20, #16]
	ldr	x24, [x9, w8, uxtw #3]
	mov	x0, x24
	mov	x1, x21
	bl	_key_is_dead
	cbnz	w0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w25, w23
	b.ge	LBB0_22
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x24
	bl	_key_get
	ldr	x8, [x22, #16]
	str	x0, [x8, w25, sxtw #3]
	add	w25, w25, #1
	b	LBB0_11
LBB0_15:
	mov	x0, x19
	bl	_up_write
Lloh9:
	adrp	x0, l_.str.5@PAGE
Lloh10:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_21
LBB0_16:
	mov	w25, #0
LBB0_17:
	str	w25, [x22]
Lloh11:
	adrp	x8, _KEYQUOTA_LINK_BYTES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KEYQUOTA_LINK_BYTES@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w9, wzr, #0x20
	madd	w1, w8, w25, w9
	mov	x0, x19
	bl	_key_payload_reserve
	ldr	w0, [x19, #4]
	cbz	w25, LBB0_19
; %bb.18:
	mov	x1, x22
	bl	_rcu_assign_pointer
	b	LBB0_20
LBB0_19:
	mov	x1, #0
	bl	_rcu_assign_pointer
	mov	x0, x22
	bl	_kfree
LBB0_20:
	mov	x0, x19
	bl	_up_write
	add	x0, x20, #8
Lloh14:
	adrp	x1, _keyring_clear_rcu_disposal@GOTPAGE
Lloh15:
	ldr	x1, [x1, _keyring_clear_rcu_disposal@GOTPAGEOFF]
	bl	_call_rcu
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_21:
	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
	b	_kleave
LBB0_22:
	str	w25, [x22], #8
	mov	x0, x22
	bl	_keyring_clear_rcu_disposal
	mov	x0, x19
	bl	_up_write
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_21
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"{%x,%s}"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_KEYQUOTA_LINK_BYTES,4,2        ; @KEYQUOTA_LINK_BYTES
l_.str.1:                               ; @.str.1
	.asciz	" [yes]"

l_.str.2:                               ; @.str.2
	.asciz	" [discard]"

l_.str.3:                               ; @.str.3
	.asciz	" [no dead]"

l_.str.4:                               ; @.str.4
	.asciz	" [no_klist]"

l_.str.5:                               ; @.str.5
	.asciz	" [oom]"

.subsections_via_symbols
