	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stash                          ## -- Begin function stash
	.p2align	4, 0x90
_stash:                                 ## @stash
	.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	%r12
	pushq	%rbx
	subq	$1120, %rsp                     ## imm = 0x460
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_local_flag@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	_context@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	je	LBB0_1
## %bb.2:
	movl	32(%rbx), %esi
	leaq	-1092(%rbp), %rdx
	callq	_krb5_string_to_enctype
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r15), %edi
	movl	32(%rbx), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_krb5_warn
	jmp	LBB0_33
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_krb5_warnx
	jmp	LBB0_33
LBB0_4:
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	jne	LBB0_7
## %bb.5:
	movl	(%r15), %edi
	callq	_hdb_db_dir
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_asprintf
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_errx
	movq	(%rbx), %rsi
LBB0_7:
	movl	(%r15), %edi
	leaq	-1076(%rbp), %rdx
	callq	_hdb_read_master_key
	movq	_ENOENT@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	cmpq	(%r12), %rax
	jne	LBB0_9
LBB0_10:
	cmpq	$0, 24(%rbx)
	je	LBB0_12
## %bb.11:
	testq	%rax, %rax
	je	LBB0_33
LBB0_9:
	movl	(%r15), %edi
	movq	(%rbx), %rcx
	leaq	L_.str.4(%rip), %rdx
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_krb5_warn
	jmp	LBB0_33
LBB0_12:
	movq	_KRB5_PW_SALT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1104(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -1120(%rbp)
	movl	8(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_16
## %bb.13:
	leaq	-1072(%rbp), %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_read
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:
	movl	(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_krb5_warnx
LBB0_15:
	movb	$0, -1072(%rbp,%r14)
	leaq	L_.str.7(%rip), %rsi
	leaq	-1072(%rbp), %rdi
	callq	_strcspn
	movb	$0, -1072(%rbp,%rax)
	jmp	LBB0_19
LBB0_16:
	cmpq	$0, 16(%rbx)
	je	LBB0_18
## %bb.17:
	leaq	-1072(%rbp), %r14
	movq	%r14, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_random_password
	leaq	L_.str.8(%rip), %rdi
	movq	%r14, %rsi
	callq	_printf
LBB0_19:
	movl	(%r15), %edi
	movl	-1092(%rbp), %esi
	movq	-1104(%rbp), %rax
	movq	%rax, 16(%rsp)
	movaps	-1120(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	leaq	-1072(%rbp), %rdx
	leaq	-1088(%rbp), %r14
	movq	%r14, %rcx
	callq	_krb5_string_to_key_salt
	movl	(%r15), %edi
	leaq	-1076(%rbp), %rdx
	movq	%r14, %rsi
	callq	_hdb_add_master_key
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_krb5_free_keyblock_contents
	movq	(%rbx), %rdx
	leaq	L_.str.10(%rip), %rsi
	leaq	-1088(%rbp), %rdi
	callq	_asprintf
	movq	(%rbx), %rdx
	leaq	L_.str.11(%rip), %rsi
	leaq	-1120(%rbp), %rdi
	callq	_asprintf
	cmpq	$0, -1088(%rbp)
	je	LBB0_21
## %bb.20:
	movq	-1120(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.22:
	callq	_unlink
	testq	%rax, %rax
	jns	LBB0_24
## %bb.23:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	cmpq	(%r12), %r14
	jne	LBB0_30
LBB0_24:
	movl	(%r15), %edi
	movq	(%rbx), %rdx
	leaq	L_.str.12(%rip), %rsi
	xorl	%eax, %eax
	callq	_krb5_warnx
	movl	(%r15), %edi
	movq	-1120(%rbp), %rsi
	movl	-1076(%rbp), %edx
	callq	_hdb_write_master_key
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	-1120(%rbp), %rdi
	callq	_unlink
	movl	$1, %r14d
	jmp	LBB0_30
LBB0_21:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_30:
	movq	-1088(%rbp), %rdi
	callq	_free
	movq	-1120(%rbp), %rdi
	callq	_free
	testq	%r14, %r14
	je	LBB0_32
## %bb.31:
	movl	(%r15), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.13(%rip), %rdx
	xorl	%eax, %eax
	callq	_krb5_warn
LBB0_32:
	movl	(%r15), %edi
	movl	-1076(%rbp), %esi
	callq	_hdb_free_master_key
LBB0_33:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_35
## %bb.34:
	xorl	%eax, %eax
	addq	$1120, %rsp                     ## imm = 0x460
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	leaq	L_.str.9(%rip), %rdx
	leaq	-1072(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movl	$1, %ecx
	callq	_UI_UTIL_read_pw_string
	testq	%rax, %rax
	jne	LBB0_32
	jmp	LBB0_19
LBB0_26:
	movq	-1088(%rbp), %rdi
	callq	_unlink
	movq	(%rbx), %rdi
	movq	-1088(%rbp), %rsi
	callq	_link
	testq	%rax, %rax
	jns	LBB0_29
## %bb.27:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	cmpq	(%r12), %r14
	jne	LBB0_28
LBB0_29:
	movq	-1120(%rbp), %rdi
	movq	(%rbx), %rsi
	callq	_rename
	movq	%rax, %r14
	movq	_errno@GOTPCREL(%rip), %rax
	sarq	$63, %r14
	andq	(%rax), %r14
	jmp	LBB0_30
LBB0_28:
	movq	-1120(%rbp), %rdi
	callq	_unlink
	jmp	LBB0_30
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_local_flag,4,2                 ## @local_flag
	.comm	_context,4,2                    ## @context
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stash is only available in local (-l) mode"

L_.str.1:                               ## @.str.1
	.asciz	"%s"

L_.str.2:                               ## @.str.2
	.asciz	"%s/m-key"

L_.str.3:                               ## @.str.3
	.asciz	"out of memory"

	.comm	_ENOENT,8,3                     ## @ENOENT
L_.str.4:                               ## @.str.4
	.asciz	"reading master key from %s"

	.comm	_KRB5_PW_SALT,4,2               ## @KRB5_PW_SALT
L_.str.5:                               ## @.str.5
	.asciz	"end of file reading passphrase"

	.comm	_errno,8,3                      ## @errno
L_.str.7:                               ## @.str.7
	.asciz	"\r\n"

L_.str.8:                               ## @.str.8
	.asciz	"Using random master stash password: %s\n"

L_.str.9:                               ## @.str.9
	.asciz	"Master key: "

L_.str.10:                              ## @.str.10
	.asciz	"%s.old"

L_.str.11:                              ## @.str.11
	.asciz	"%s.new"

	.comm	_ENOMEM,8,3                     ## @ENOMEM
L_.str.12:                              ## @.str.12
	.asciz	"writing key to \"%s\""

L_.str.13:                              ## @.str.13
	.asciz	"writing master key file"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stash                          ; -- Begin function stash
	.p2align	2
_stash:                                 ; @stash
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #1088
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _local_flag@GOTPAGE
Lloh4:
	ldr	x8, [x8, _local_flag@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x21, _context@GOTPAGE
Lloh7:
	ldr	x21, [x21, _context@GOTPAGEOFF]
	ldr	w0, [x21]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w1, [x19, #32]
	add	x2, sp, #52
	bl	_krb5_string_to_enctype
	cbz	x0, LBB0_4
; %bb.2:
	mov	x1, x0
	ldr	w0, [x21]
	ldr	w8, [x19, #32]
	str	x8, [sp]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_krb5_warn
	b	LBB0_27
LBB0_3:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_krb5_warnx
	b	LBB0_27
LBB0_4:
	ldr	x1, [x19]
	cbnz	x1, LBB0_7
; %bb.5:
	ldr	w0, [x21]
	bl	_hdb_db_dir
	mov	x2, x0
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_asprintf
	ldr	x1, [x19]
	cbnz	x1, LBB0_7
; %bb.6:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
	ldr	x1, [x19]
LBB0_7:
	ldr	w0, [x21]
	add	x2, sp, #48
	bl	_hdb_read_master_key
	mov	x1, x0
Lloh16:
	adrp	x22, _ENOENT@GOTPAGE
Lloh17:
	ldr	x22, [x22, _ENOENT@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, #0
	ccmp	x0, x8, #4, ne
	b.ne	LBB0_10
; %bb.8:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_11
; %bb.9:
	cbz	x1, LBB0_27
LBB0_10:
	ldr	w0, [x21]
	ldr	x8, [x19]
	str	x8, [sp]
Lloh18:
	adrp	x2, l_.str.4@PAGE
Lloh19:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	_krb5_warn
	b	LBB0_27
LBB0_11:
Lloh20:
	adrp	x8, _KRB5_PW_SALT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _KRB5_PW_SALT@GOTPAGEOFF]
Lloh22:
	ldr	w23, [x8]
	ldr	w0, [x19, #8]
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.12:
	add	x24, sp, #56
	add	x1, sp, #56
	mov	w2, #1024
	bl	_read
	mov	x20, x0
	cbnz	x0, LBB0_14
; %bb.13:
	ldr	w0, [x21]
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_krb5_warnx
LBB0_14:
	strb	wzr, [x24, x20]
Lloh25:
	adrp	x1, l_.str.7@PAGE
Lloh26:
	add	x1, x1, l_.str.7@PAGEOFF
	add	x0, sp, #56
	bl	_strcspn
	strb	wzr, [x24, x0]
	b	LBB0_17
LBB0_15:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_29
; %bb.16:
	add	x0, sp, #56
	mov	w1, #1024
	bl	_random_password
Lloh27:
	adrp	x0, l_.str.8@PAGE
Lloh28:
	add	x0, x0, l_.str.8@PAGEOFF
	add	x1, sp, #56
	bl	_printf
LBB0_17:
	ldr	w0, [x21]
	ldr	w1, [sp, #52]
	stp	xzr, xzr, [sp, #24]
	str	w23, [sp, #40]
	add	x2, sp, #56
	add	x3, sp, #24
	add	x4, sp, #16
	bl	_krb5_string_to_key_salt
	ldr	w0, [x21]
	add	x1, sp, #16
	add	x2, sp, #48
	bl	_hdb_add_master_key
	ldr	w0, [x21]
	add	x1, sp, #16
	bl	_krb5_free_keyblock_contents
	ldr	x2, [x19]
Lloh29:
	adrp	x1, l_.str.10@PAGE
Lloh30:
	add	x1, x1, l_.str.10@PAGEOFF
	add	x0, sp, #16
	bl	_asprintf
	ldr	x2, [x19]
Lloh31:
	adrp	x1, l_.str.11@PAGE
Lloh32:
	add	x1, x1, l_.str.11@PAGEOFF
	add	x0, sp, #24
	bl	_asprintf
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_23
; %bb.18:
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_23
; %bb.19:
	bl	_unlink
	tbz	x0, #63, LBB0_21
; %bb.20:
Lloh33:
	adrp	x8, _errno@GOTPAGE
Lloh34:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh35:
	ldr	x20, [x8]
	ldr	x8, [x22]
	cmp	x20, x8
	b.ne	LBB0_24
LBB0_21:
	ldr	w0, [x21]
	ldr	x8, [x19]
	str	x8, [sp]
Lloh36:
	adrp	x1, l_.str.12@PAGE
Lloh37:
	add	x1, x1, l_.str.12@PAGEOFF
	bl	_krb5_warnx
	ldr	w0, [x21]
	ldr	x1, [sp, #24]
	ldr	w2, [sp, #48]
	bl	_hdb_write_master_key
	cbz	x0, LBB0_30
; %bb.22:
	ldr	x0, [sp, #24]
	bl	_unlink
	mov	w20, #1
	b	LBB0_24
LBB0_23:
Lloh38:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh40:
	ldr	x20, [x8]
LBB0_24:
	ldr	x0, [sp, #16]
	bl	_free
	ldr	x0, [sp, #24]
	bl	_free
	cbz	x20, LBB0_26
; %bb.25:
	ldr	w0, [x21]
Lloh41:
	adrp	x8, _errno@GOTPAGE
Lloh42:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh43:
	ldr	x1, [x8]
Lloh44:
	adrp	x2, l_.str.13@PAGE
Lloh45:
	add	x2, x2, l_.str.13@PAGEOFF
	bl	_krb5_warn
LBB0_26:
	ldr	w0, [x21]
	ldr	w1, [sp, #48]
	bl	_hdb_free_master_key
LBB0_27:
	ldur	x8, [x29, #-72]
Lloh46:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh47:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_34
; %bb.28:
	mov	w0, #0
	add	sp, sp, #1088
	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	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_29:
Lloh49:
	adrp	x2, l_.str.9@PAGE
Lloh50:
	add	x2, x2, l_.str.9@PAGEOFF
	add	x0, sp, #56
	mov	w1, #1024
	mov	w3, #1
	bl	_UI_UTIL_read_pw_string
	cbnz	x0, LBB0_26
	b	LBB0_17
LBB0_30:
	ldr	x0, [sp, #16]
	bl	_unlink
	ldr	x0, [x19]
	ldr	x1, [sp, #16]
	bl	_link
Lloh51:
	adrp	x23, _errno@GOTPAGE
Lloh52:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	tbz	x0, #63, LBB0_32
; %bb.31:
	ldr	x20, [x23]
	ldr	x8, [x22]
	cmp	x20, x8
	b.ne	LBB0_33
LBB0_32:
	ldr	x0, [sp, #24]
	ldr	x1, [x19]
	bl	_rename
	ldr	x8, [x23]
	and	x20, x8, x0, asr #63
	b	LBB0_24
LBB0_33:
	ldr	x0, [sp, #24]
	bl	_unlink
	b	LBB0_24
LBB0_34:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_local_flag,4,2                 ; @local_flag
	.comm	_context,4,2                    ; @context
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stash is only available in local (-l) mode"

l_.str.1:                               ; @.str.1
	.asciz	"%s"

l_.str.2:                               ; @.str.2
	.asciz	"%s/m-key"

l_.str.3:                               ; @.str.3
	.asciz	"out of memory"

	.comm	_ENOENT,8,3                     ; @ENOENT
l_.str.4:                               ; @.str.4
	.asciz	"reading master key from %s"

	.comm	_KRB5_PW_SALT,4,2               ; @KRB5_PW_SALT
l_.str.5:                               ; @.str.5
	.asciz	"end of file reading passphrase"

	.comm	_errno,8,3                      ; @errno
l_.str.7:                               ; @.str.7
	.asciz	"\r\n"

l_.str.8:                               ; @.str.8
	.asciz	"Using random master stash password: %s\n"

l_.str.9:                               ; @.str.9
	.asciz	"Master key: "

l_.str.10:                              ; @.str.10
	.asciz	"%s.old"

l_.str.11:                              ; @.str.11
	.asciz	"%s.new"

	.comm	_ENOMEM,8,3                     ; @ENOMEM
l_.str.12:                              ; @.str.12
	.asciz	"writing key to \"%s\""

l_.str.13:                              ; @.str.13
	.asciz	"writing master key file"

.subsections_via_symbols
