	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_create_or_update           ## -- Begin function key_create_or_update
	.p2align	4, 0x90
_key_create_or_update:                  ## @key_create_or_update
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -60(%rbp)                 ## 4-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	16(%rbp), %r12
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_current_cred
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_key_type_lookup
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.23:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_1:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %r13                ## 8-byte Reload
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ERR_PTR
	movq	%rax, %r12
	cmpl	$0, 28(%r15)
	je	LBB0_20
## %bb.2:
	cmpl	$0, 24(%r15)
	je	LBB0_20
## %bb.3:
	movq	%r14, %rdi
	callq	_key_ref_to_ptr
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_key_check
	movq	_ENOTDIR@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %r12
	movq	16(%rbx), %rax
	cmpq	_key_type_keyring@GOTPCREL(%rip), %rax
	jne	LBB0_20
## %bb.4:
	leaq	-56(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	___key_link_begin
	testl	%eax, %eax
	js	LBB0_20
## %bb.5:
	movq	_KEY_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_key_permission
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%r15)
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	callq	___keyring_search_one
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_22
LBB0_9:
	movq	_KEY_PERM_UNDEF@GOTPCREL(%rip), %rax
	movl	-60(%rbp), %r9d                 ## 4-byte Reload
	cmpl	%r9d, (%rax)
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_13
## %bb.10:
	movq	_KEY_POS_VIEW@GOTPCREL(%rip), %rax
	movq	_KEY_POS_SEARCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_KEY_POS_LINK@GOTPCREL(%rip), %rcx
	movq	_KEY_POS_SETATTR@GOTPCREL(%rip), %rdx
	movq	_KEY_USR_VIEW@GOTPCREL(%rip), %r10
	movq	_KEY_USR_SEARCH@GOTPCREL(%rip), %r11
	movq	_KEY_USR_LINK@GOTPCREL(%rip), %r8
	movq	_KEY_POS_READ@GOTPCREL(%rip), %rbx
	movq	_KEY_USR_READ@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	(%rbx), %edi
	movq	_KEY_USR_SETATTR@GOTPCREL(%rip), %rbx
	xorl	%esi, %esi
	cmpq	$0, 8(%r15)
	cmovnel	%edi, %esi
	orl	(%rax), %r9d
	orl	(%rcx), %r9d
	orl	(%rdx), %r9d
	orl	(%r10), %r9d
	orl	(%r11), %r9d
	orl	(%r8), %r9d
	orl	(%rbx), %r9d
	orl	%esi, %r9d
	cmpq	_key_type_keyring@GOTPCREL(%rip), %r15
	je	LBB0_12
## %bb.11:
	cmpq	$0, (%r15)
	je	LBB0_13
LBB0_12:
	movq	_KEY_USR_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
LBB0_13:
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	movl	(%r8), %ecx
	movl	4(%r8), %edx
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_key_alloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_ERR_CAST
	jmp	LBB0_18
LBB0_6:
	movl	%eax, %edi
	callq	_ERR_PTR
	movq	%rax, %r12
	jmp	LBB0_19
LBB0_15:
	leaq	-56(%rbp), %r9
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	callq	___key_instantiate_and_link
	testl	%eax, %eax
	js	LBB0_16
## %bb.17:
	movq	%r14, %rdi
	callq	_is_key_possessed
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_make_key_ref
	jmp	LBB0_18
LBB0_22:
	movq	-56(%rbp), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	___key_link_end
	movq	%r15, %rdi
	callq	_key_type_put
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	___key_update
	movq	%rax, %r12
	jmp	LBB0_21
LBB0_16:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_key_put
	movl	%r12d, %edi
	callq	_ERR_PTR
LBB0_18:
	movq	%rax, %r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_19:
	movq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	___key_link_end
LBB0_20:
	movq	%r15, %rdi
	callq	_key_type_put
LBB0_21:
	movq	%r12, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOTDIR,4,2                    ## @ENOTDIR
	.comm	_key_type_keyring,32,3          ## @key_type_keyring
	.comm	_KEY_WRITE,4,2                  ## @KEY_WRITE
	.comm	_KEY_PERM_UNDEF,4,2             ## @KEY_PERM_UNDEF
	.comm	_KEY_POS_VIEW,4,2               ## @KEY_POS_VIEW
	.comm	_KEY_POS_SEARCH,4,2             ## @KEY_POS_SEARCH
	.comm	_KEY_POS_LINK,4,2               ## @KEY_POS_LINK
	.comm	_KEY_POS_SETATTR,4,2            ## @KEY_POS_SETATTR
	.comm	_KEY_USR_VIEW,4,2               ## @KEY_USR_VIEW
	.comm	_KEY_USR_SEARCH,4,2             ## @KEY_USR_SEARCH
	.comm	_KEY_USR_LINK,4,2               ## @KEY_USR_LINK
	.comm	_KEY_USR_SETATTR,4,2            ## @KEY_USR_SETATTR
	.comm	_KEY_POS_READ,4,2               ## @KEY_POS_READ
	.comm	_KEY_USR_READ,4,2               ## @KEY_USR_READ
	.comm	_KEY_USR_WRITE,4,2              ## @KEY_USR_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_create_or_update           ; -- Begin function key_create_or_update
	.p2align	2
_key_create_or_update:                  ; @key_create_or_update
	.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	x24, x6
	mov	x27, x5
	mov	x20, x4
	mov	x22, x3
	mov	x25, x2
	mov	x19, x1
	mov	x23, x0
	bl	_current_cred
	mov	x26, x0
	mov	x0, x19
	bl	_key_type_lookup
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x28, x0
	ldr	w8, [x19, #28]
	cbz	w8, LBB0_21
; %bb.3:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_21
; %bb.4:
	mov	x0, x23
	bl	_key_ref_to_ptr
	mov	x21, x0
	bl	_key_check
Lloh6:
	adrp	x8, _ENOTDIR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOTDIR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x28, x0
	ldr	x8, [x21, #16]
Lloh9:
	adrp	x9, _key_type_keyring@GOTPAGE
Lloh10:
	ldr	x9, [x9, _key_type_keyring@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.5:
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x19
	mov	x2, x25
	bl	___key_link_begin
	tbnz	w0, #31, LBB0_21
; %bb.6:
Lloh11:
	adrp	x8, _KEY_WRITE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KEY_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_key_permission
	tbnz	w0, #31, LBB0_19
; %bb.7:
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x25
	mov	w3, #0
	bl	___keyring_search_one
	mov	x28, x0
	bl	_IS_ERR
	cbz	x0, LBB0_17
LBB0_9:
Lloh14:
	adrp	x8, _KEY_PERM_UNDEF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KEY_PERM_UNDEF@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, w27
	b.ne	LBB0_13
; %bb.10:
Lloh17:
	adrp	x8, _KEY_POS_VIEW@GOTPAGE
Lloh18:
	ldr	x8, [x8, _KEY_POS_VIEW@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _KEY_POS_SEARCH@GOTPAGE
Lloh21:
	ldr	x9, [x9, _KEY_POS_SEARCH@GOTPAGEOFF]
Lloh22:
	adrp	x10, _KEY_POS_LINK@GOTPAGE
Lloh23:
	ldr	x10, [x10, _KEY_POS_LINK@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	ldr	w10, [x10]
Lloh26:
	adrp	x11, _KEY_POS_SETATTR@GOTPAGE
Lloh27:
	ldr	x11, [x11, _KEY_POS_SETATTR@GOTPAGEOFF]
Lloh28:
	adrp	x12, _KEY_USR_VIEW@GOTPAGE
Lloh29:
	ldr	x12, [x12, _KEY_USR_VIEW@GOTPAGEOFF]
Lloh30:
	ldr	w11, [x11]
Lloh31:
	ldr	w12, [x12]
Lloh32:
	adrp	x13, _KEY_USR_SEARCH@GOTPAGE
Lloh33:
	ldr	x13, [x13, _KEY_USR_SEARCH@GOTPAGEOFF]
Lloh34:
	adrp	x14, _KEY_USR_LINK@GOTPAGE
Lloh35:
	ldr	x14, [x14, _KEY_USR_LINK@GOTPAGEOFF]
Lloh36:
	ldr	w13, [x13]
Lloh37:
	ldr	w14, [x14]
Lloh38:
	adrp	x15, _KEY_USR_SETATTR@GOTPAGE
Lloh39:
	ldr	x15, [x15, _KEY_USR_SETATTR@GOTPAGEOFF]
Lloh40:
	ldr	w15, [x15]
	ldr	x16, [x19, #8]
Lloh41:
	adrp	x17, _KEY_POS_READ@GOTPAGE
Lloh42:
	ldr	x17, [x17, _KEY_POS_READ@GOTPAGEOFF]
Lloh43:
	ldr	w17, [x17]
Lloh44:
	adrp	x0, _KEY_USR_READ@GOTPAGE
Lloh45:
	ldr	x0, [x0, _KEY_USR_READ@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x0]
	orr	w17, w0, w17
	cmp	x16, #0
	csel	w16, wzr, w17, eq
	orr	w8, w9, w8
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w8, w8, w12
	orr	w8, w8, w13
	orr	w8, w8, w14
	orr	w8, w8, w15
	orr	w27, w8, w16
Lloh47:
	adrp	x8, _key_type_keyring@GOTPAGE
Lloh48:
	ldr	x8, [x8, _key_type_keyring@GOTPAGEOFF]
	cmp	x19, x8
	b.eq	LBB0_12
; %bb.11:
	ldr	x8, [x19]
	cbz	x8, LBB0_13
LBB0_12:
Lloh49:
	adrp	x8, _KEY_USR_WRITE@GOTPAGE
Lloh50:
	ldr	x8, [x8, _KEY_USR_WRITE@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	orr	w27, w8, w27
LBB0_13:
	ldp	w3, w2, [x26]
	mov	x0, x19
	mov	x1, x25
	mov	x4, x26
	mov	x5, x27
	mov	x6, x24
	bl	_key_alloc
	mov	x24, x0
	bl	_IS_ERR
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x24
	bl	_ERR_CAST
	b	LBB0_20
LBB0_15:
	add	x5, sp, #8
	mov	x0, x24
	mov	x1, x22
	mov	x2, x20
	mov	x3, x21
	mov	x4, #0
	bl	___key_instantiate_and_link
	tbnz	w0, #31, LBB0_18
; %bb.16:
	mov	x0, x23
	bl	_is_key_possessed
	mov	x1, x0
	mov	x0, x24
	bl	_make_key_ref
	b	LBB0_20
LBB0_17:
	ldr	x2, [sp, #8]
	mov	x0, x21
	mov	x1, x19
	bl	___key_link_end
	mov	x0, x19
	bl	_key_type_put
	mov	x0, x28
	mov	x1, x22
	mov	x2, x20
	bl	___key_update
	mov	x28, x0
	b	LBB0_22
LBB0_18:
	mov	x20, x0
	mov	x0, x24
	bl	_key_put
	mov	x0, x20
LBB0_19:
	bl	_ERR_PTR
LBB0_20:
	mov	x28, x0
	ldr	x2, [sp, #8]
	mov	x0, x21
	mov	x1, x19
	bl	___key_link_end
LBB0_21:
	mov	x0, x19
	bl	_key_type_put
LBB0_22:
	mov	x0, x28
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh36
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh30
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOTDIR,4,2                    ; @ENOTDIR
	.comm	_key_type_keyring,32,3          ; @key_type_keyring
	.comm	_KEY_WRITE,4,2                  ; @KEY_WRITE
	.comm	_KEY_PERM_UNDEF,4,2             ; @KEY_PERM_UNDEF
	.comm	_KEY_POS_VIEW,4,2               ; @KEY_POS_VIEW
	.comm	_KEY_POS_SEARCH,4,2             ; @KEY_POS_SEARCH
	.comm	_KEY_POS_LINK,4,2               ; @KEY_POS_LINK
	.comm	_KEY_POS_SETATTR,4,2            ; @KEY_POS_SETATTR
	.comm	_KEY_USR_VIEW,4,2               ; @KEY_USR_VIEW
	.comm	_KEY_USR_SEARCH,4,2             ; @KEY_USR_SEARCH
	.comm	_KEY_USR_LINK,4,2               ; @KEY_USR_LINK
	.comm	_KEY_USR_SETATTR,4,2            ; @KEY_USR_SETATTR
	.comm	_KEY_POS_READ,4,2               ; @KEY_POS_READ
	.comm	_KEY_USR_READ,4,2               ; @KEY_USR_READ
	.comm	_KEY_USR_WRITE,4,2              ; @KEY_USR_WRITE
.subsections_via_symbols
