	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_keyctl_keyring_clear           ## -- Begin function keyctl_keyring_clear
	.p2align	4, 0x90
_keyctl_keyring_clear:                  ## @keyctl_keyring_clear
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	movq	_KEY_LOOKUP_CREATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KEY_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lookup_user_key
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	%ebx, %edi
	callq	_PTR_ERR
	movq	%rax, %r14
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movl	%r15d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_lookup_user_key
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movq	_KEY_FLAG_ROOT_CAN_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	callq	_key_ref_to_ptr
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movl	%ebx, %edi
	callq	_key_ref_to_ptr
	movq	%rax, %rdi
	callq	_keyring_clear
	movq	%rax, %r14
LBB0_5:
	movl	%ebx, %edi
	callq	_key_ref_put
LBB0_6:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_LOOKUP_CREATE,4,2          ## @KEY_LOOKUP_CREATE
	.comm	_KEY_WRITE,4,2                  ## @KEY_WRITE
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_KEY_FLAG_ROOT_CAN_CLEAR,4,2    ## @KEY_FLAG_ROOT_CAN_CLEAR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_keyctl_keyring_clear           ; -- Begin function keyctl_keyring_clear
	.p2align	2
_keyctl_keyring_clear:                  ; @keyctl_keyring_clear
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
Lloh0:
	adrp	x8, _KEY_LOOKUP_CREATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KEY_LOOKUP_CREATE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _KEY_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KEY_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_lookup_user_key
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x19, x0
Lloh6:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_capable
	cbz	x0, LBB0_6
; %bb.2:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	bl	_lookup_user_key
	mov	x20, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_6
; %bb.3:
Lloh9:
	adrp	x8, _KEY_FLAG_ROOT_CAN_CLEAR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KEY_FLAG_ROOT_CAN_CLEAR@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_key_ref_to_ptr
	mov	x1, x0
	mov	x0, x21
	bl	_test_bit
	cbz	x0, LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_key_ref_to_ptr
	bl	_keyring_clear
	mov	x19, x0
LBB0_5:
	mov	x0, x20
	bl	_key_ref_put
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_LOOKUP_CREATE,4,2          ; @KEY_LOOKUP_CREATE
	.comm	_KEY_WRITE,4,2                  ; @KEY_WRITE
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_KEY_FLAG_ROOT_CAN_CLEAR,4,2    ; @KEY_FLAG_ROOT_CAN_CLEAR
.subsections_via_symbols
