	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_replace_session_keyring    ## -- Begin function key_replace_session_keyring
	.p2align	4, 0x90
_key_replace_session_keyring:           ## @key_replace_session_keyring
	.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	_current@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_tasklist_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_write_lock_irq
	movq	(%rbx), %rax
	movq	(%rax), %rbx
	movq	$0, (%rax)
	movq	%r14, %rdi
	callq	_write_unlock_irq
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.3:
	xorl	%eax, %eax
	callq	_current_cred
	movq	%rax, %r14
	movups	64(%rax), %xmm0
	movups	%xmm0, 64(%rbx)
	movups	48(%rax), %xmm0
	movups	%xmm0, 48(%rbx)
	movl	44(%rax), %edi
	callq	_get_uid
	movl	%eax, 44(%rbx)
	movl	40(%r14), %edi
	callq	_get_group_info
	movl	%eax, 40(%rbx)
	movl	36(%r14), %eax
	movl	%eax, 36(%rbx)
	movl	32(%r14), %eax
	movl	%eax, 32(%rbx)
	movups	16(%r14), %xmm0
	movups	%xmm0, 16(%rbx)
	movq	8(%r14), %rdi
	callq	_key_get
	movq	%rax, 8(%rbx)
	movq	(%r14), %rax
	movl	8(%rax), %ecx
	movq	(%rbx), %rdx
	movl	%ecx, 8(%rdx)
	movq	(%rax), %rdi
	callq	_key_get
	movq	(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_security_transfer_creds
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_commit_creds                   ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.comm	_tasklist_lock,4,2              ## @tasklist_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_replace_session_keyring    ; -- Begin function key_replace_session_keyring
	.p2align	2
_key_replace_session_keyring:           ; @key_replace_session_keyring
	.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
Lloh0:
	adrp	x19, _current@GOTPAGE
Lloh1:
	ldr	x19, [x19, _current@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh2:
	adrp	x20, _tasklist_lock@GOTPAGE
Lloh3:
	ldr	x20, [x20, _tasklist_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_write_lock_irq
	ldr	x8, [x19]
	ldr	x19, [x8]
	str	xzr, [x8]
	mov	x0, x20
	bl	_write_unlock_irq
	cbz	x19, LBB0_3
; %bb.2:
	bl	_current_cred
	mov	x20, x0
	ldr	q0, [x0, #64]
	str	q0, [x19, #64]
	ldr	q0, [x0, #48]
	str	q0, [x19, #48]
	ldr	w0, [x0, #44]
	bl	_get_uid
	str	w0, [x19, #44]
	ldr	w0, [x20, #40]
	bl	_get_group_info
	str	w0, [x19, #40]
	ldr	d0, [x20, #32]
	str	d0, [x19, #32]
	ldr	q0, [x20, #16]
	str	q0, [x19, #16]
	ldr	x0, [x20, #8]
	bl	_key_get
	str	x0, [x19, #8]
	ldr	x8, [x20]
	ldr	w9, [x8, #8]
	ldr	x10, [x19]
	str	w9, [x10, #8]
	ldr	x0, [x8]
	bl	_key_get
	ldr	x8, [x19]
	str	x0, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_security_transfer_creds
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_commit_creds
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.comm	_tasklist_lock,4,2              ; @tasklist_lock
.subsections_via_symbols
