	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_keyctl_keyring_link            ## -- Begin function keyctl_keyring_link
	.p2align	4, 0x90
_keyctl_keyring_link:                   ## @keyctl_keyring_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %eax
	movl	%edi, %r14d
	movq	_KEY_LOOKUP_CREATE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_KEY_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_lookup_user_key
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movl	(%r15), %esi
	movq	_KEY_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	callq	_lookup_user_key
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	%r14d, %edi
	callq	_PTR_ERR
	movq	%rax, %r15
	jmp	LBB0_4
LBB0_3:
	movl	%ebx, %edi
	callq	_key_ref_to_ptr
	movl	%eax, %r15d
	movl	%r14d, %edi
	callq	_key_ref_to_ptr
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_key_link
	movq	%rax, %r15
	movl	%r14d, %edi
	callq	_key_ref_put
LBB0_4:
	movl	%ebx, %edi
	callq	_key_ref_put
	movq	%r15, %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	_KEY_LINK,4,2                   ## @KEY_LINK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_keyctl_keyring_link            ; -- Begin function keyctl_keyring_link
	.p2align	2
_keyctl_keyring_link:                   ; @keyctl_keyring_link
	.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	x8, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _KEY_LOOKUP_CREATE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _KEY_LOOKUP_CREATE@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x9, _KEY_WRITE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _KEY_WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x9]
	mov	x0, x8
	bl	_lookup_user_key
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	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
	b	_PTR_ERR
LBB0_2:
	ldr	w1, [x21]
Lloh5:
	adrp	x8, _KEY_LINK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KEY_LINK@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_lookup_user_key
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_key_ref_to_ptr
	mov	x21, x0
	mov	x0, x20
	bl	_key_ref_to_ptr
	mov	x1, x0
	mov	x0, x21
	bl	_key_link
	mov	x21, x0
	mov	x0, x20
	bl	_key_ref_put
LBB0_5:
	mov	x0, x19
	bl	_key_ref_put
	mov	x0, x21
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_LOOKUP_CREATE,4,2          ; @KEY_LOOKUP_CREATE
	.comm	_KEY_WRITE,4,2                  ; @KEY_WRITE
	.comm	_KEY_LINK,4,2                   ; @KEY_LINK
.subsections_via_symbols
