	.file	"extr_stash.c_stash.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"stash is only available in local (-l) mode"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%s"
.LC2:
	.string	"%s/m-key"
.LC3:
	.string	"out of memory"
.LC4:
	.string	"reading master key from %s"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"end of file reading passphrase"
	.section	.rodata.str1.1
.LC6:
	.string	"\r\n"
	.section	.rodata.str1.8
	.align 8
.LC7:
	.string	"Using random master stash password: %s\n"
	.section	.rodata.str1.1
.LC8:
	.string	"Master key: "
.LC9:
	.string	"%s.old"
.LC10:
	.string	"%s.new"
.LC11:
	.string	"writing key to \"%s\""
.LC12:
	.string	"writing master key file"
	.text
	.p2align 4
	.globl	stash
	.type	stash, @function
stash:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 1096
	.cfi_def_cfa_offset 1136
	mov	edx, DWORD PTR local_flag[rip]
	mov	edi, DWORD PTR context[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 1080[rsp], rax
	xor	eax, eax
	test	edx, edx
	je	.L40
	mov	esi, DWORD PTR 32[rbx]
	mov	rdx, rsp
	call	krb5_string_to_enctype@PLT
	test	rax, rax
	jne	.L41
	mov	rsi, QWORD PTR [rbx]
	mov	edi, DWORD PTR context[rip]
	test	rsi, rsi
	je	.L42
.L5:
	lea	r12, 4[rsp]
	mov	rdx, r12
	call	hdb_read_master_key@PLT
	test	rax, rax
	je	.L7
	cmp	QWORD PTR ENOENT[rip], rax
	jne	.L23
	cmp	QWORD PTR 24[rbx], 0
	jne	.L23
.L24:
	mov	eax, DWORD PTR KRB5_PW_SALT[rip]
	mov	edi, DWORD PTR 8[rbx]
	mov	QWORD PTR 24[rsp], 0
	lea	r13, 48[rsp]
	mov	QWORD PTR 16[rsp], 0
	mov	DWORD PTR 32[rsp], eax
	cmp	edi, -1
	jne	.L43
	cmp	QWORD PTR 16[rbx], 0
	je	.L12
	mov	esi, 1024
	mov	rdi, r13
	call	random_password@PLT
	mov	rsi, r13
	lea	rdi, .LC7[rip]
	call	printf@PLT
.L11:
	lea	rbp, 8[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 1144
	mov	edi, DWORD PTR context[rip]
	mov	rdx, r13
	push	QWORD PTR 40[rsp]
	.cfi_def_cfa_offset 1152
	mov	rcx, rbp
	push	QWORD PTR 40[rsp]
	.cfi_def_cfa_offset 1160
	push	QWORD PTR 40[rsp]
	.cfi_def_cfa_offset 1168
	mov	esi, DWORD PTR 32[rsp]
	call	krb5_string_to_key_salt@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 1136
	mov	rdx, r12
	mov	rsi, rbp
	mov	edi, DWORD PTR context[rip]
	call	hdb_add_master_key@PLT
	mov	edi, DWORD PTR context[rip]
	mov	rsi, rbp
	call	krb5_free_keyblock_contents@PLT
	mov	rdx, QWORD PTR [rbx]
	lea	rdi, 16[rsp]
	lea	rsi, .LC9[rip]
	call	asprintf@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	rdi, rbp
	lea	rsi, .LC10[rip]
	call	asprintf@PLT
	mov	rdi, QWORD PTR 16[rsp]
	test	rdi, rdi
	je	.L13
	mov	r8, QWORD PTR 8[rsp]
	test	r8, r8
	je	.L13
	mov	rdi, r8
	call	unlink@PLT
	test	rax, rax
	jns	.L16
	mov	rbp, QWORD PTR errno[rip]
	cmp	rbp, QWORD PTR ENOENT[rip]
	jne	.L38
.L16:
	mov	rdx, QWORD PTR [rbx]
	mov	edi, DWORD PTR context[rip]
	lea	rsi, .LC11[rip]
	xor	eax, eax
	call	krb5_warnx@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	rsi, QWORD PTR 8[rsp]
	mov	edi, DWORD PTR context[rip]
	call	hdb_write_master_key@PLT
	test	rax, rax
	je	.L17
	mov	rdi, QWORD PTR 8[rsp]
	call	unlink@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	free@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	free@PLT
.L18:
	mov	rsi, QWORD PTR errno[rip]
	mov	edi, DWORD PTR context[rip]
	lea	rdx, .LC12[rip]
	xor	eax, eax
	call	krb5_warn@PLT
.L22:
	mov	esi, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR context[rip]
	call	hdb_free_master_key@PLT
.L3:
	mov	rax, QWORD PTR 1080[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L44
	add	rsp, 1096
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	cmp	QWORD PTR 24[rbx], 0
	je	.L24
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L40:
	lea	rsi, .LC0[rip]
	call	krb5_warnx@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L43:
	mov	edx, 1024
	mov	rsi, r13
	call	read@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L45
.L10:
	lea	rsi, .LC6[rip]
	mov	rdi, r13
	mov	BYTE PTR 48[rsp+rbp], 0
	call	strcspn@PLT
	mov	BYTE PTR 48[rsp+rax], 0
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L42:
	call	hdb_db_dir@PLT
	lea	rsi, .LC2[rip]
	mov	rdi, rbx
	mov	rdx, rax
	call	asprintf@PLT
	mov	rsi, QWORD PTR [rbx]
	test	rsi, rsi
	je	.L6
.L37:
	mov	edi, DWORD PTR context[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rcx, QWORD PTR [rbx]
	mov	edi, DWORD PTR context[rip]
	mov	rsi, rax
	xor	eax, eax
	lea	rdx, .LC4[rip]
	call	krb5_warn@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rbp, QWORD PTR errno[rip]
.L38:
	mov	rdi, QWORD PTR 16[rsp]
.L15:
	call	free@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	free@PLT
	test	rbp, rbp
	je	.L22
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L41:
	mov	ecx, DWORD PTR 32[rbx]
	mov	edi, DWORD PTR context[rip]
	mov	rsi, rax
	xor	eax, eax
	lea	rdx, .LC1[rip]
	call	krb5_warn@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rbp, QWORD PTR ENOMEM[rip]
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L12:
	mov	ecx, 1
	lea	rdx, .LC8[rip]
	mov	esi, 1024
	mov	rdi, r13
	call	UI_UTIL_read_pw_string@PLT
	test	rax, rax
	je	.L11
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, QWORD PTR 16[rsp]
	call	unlink@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR [rbx]
	call	link@PLT
	test	rax, rax
	jns	.L19
	mov	rbp, QWORD PTR errno[rip]
	cmp	rbp, QWORD PTR ENOENT[rip]
	mov	rdi, QWORD PTR 8[rsp]
	je	.L20
	call	unlink@PLT
	mov	rdi, QWORD PTR 16[rsp]
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, QWORD PTR 8[rsp]
.L20:
	mov	rsi, QWORD PTR [rbx]
	call	rename@PLT
	test	rax, rax
	js	.L21
	mov	rdi, QWORD PTR 16[rsp]
	call	free@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	free@PLT
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L45:
	mov	edi, DWORD PTR context[rip]
	lea	rsi, .LC5[rip]
	xor	eax, eax
	call	krb5_warnx@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	lea	rsi, .LC3[rip]
	mov	edi, 1
	call	errx@PLT
	mov	rsi, QWORD PTR [rbx]
	jmp	.L37
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	stash, .-stash
	.comm	local_flag,4,4
	.comm	errno,8,8
	.comm	context,4,4
	.comm	KRB5_PW_SALT,4,4
	.comm	ENOMEM,8,8
	.comm	ENOENT,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_stash.c_stash.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"stash is only available in local (-l) mode\000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"%s/m-key\000"
	.align	2
.LC3:
	.ascii	"out of memory\000"
	.align	2
.LC4:
	.ascii	"reading master key from %s\000"
	.align	2
.LC5:
	.ascii	"end of file reading passphrase\000"
	.align	2
.LC6:
	.ascii	"\015\012\000"
	.align	2
.LC7:
	.ascii	"Using random master stash password: %s\012\000"
	.align	2
.LC8:
	.ascii	"Master key: \000"
	.align	2
.LC9:
	.ascii	"%s.old\000"
	.align	2
.LC10:
	.ascii	"%s.new\000"
	.align	2
.LC11:
	.ascii	"writing key to \"%s\"\000"
	.align	2
.LC12:
	.ascii	"writing master key file\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	stash
	.syntax unified
	.arm
	.fpu softvfp
	.type	stash, %function
stash:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L47
	ldr	r5, .L47+4
	ldr	r3, [r3]
	sub	sp, sp, #1072
	cmp	r3, #0
	ldr	r3, .L47+8
	sub	sp, sp, #4
	mov	r4, r0
	ldr	r3, [r3]
	str	r3, [sp, #1068]
	mov	r3,#0
	ldr	r0, [r5]
	beq	.L39
	ldr	r1, [r4, #16]
	add	r2, sp, #20
	bl	krb5_string_to_enctype
	subs	r1, r0, #0
	bne	.L40
	ldr	r1, [r4]
	ldr	r0, [r5]
	cmp	r1, #0
	beq	.L41
.L5:
	add	r2, sp, #24
	bl	hdb_read_master_key
	subs	r1, r0, #0
	beq	.L7
	ldr	r3, .L47+12
	ldr	r2, [r3]
	cmp	r2, r1
	bne	.L42
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L43
.L24:
	mov	r3, #0
	ldr	r2, .L47+16
	ldr	r0, [r4, #4]
	ldr	r2, [r2]
	cmn	r0, #1
	str	r2, [sp, #40]
	str	r3, [sp, #36]
	str	r3, [sp, #32]
	bne	.L44
	ldr	r3, [r4, #8]
	add	r6, sp, #48
	sub	r7, r6, #4
	cmp	r3, #0
	mov	r0, r7
	beq	.L12
	mov	r1, #1024
	bl	random_password
	mov	r1, r7
	ldr	r0, .L47+20
	bl	printf
.L11:
	ldr	r1, [r6, #-8]
	ldr	r0, [r6, #-12]
	add	r6, sp, #28
	ldr	r3, [sp, #32]
	stm	sp, {r0, r1}
	mov	r2, r7
	ldr	r1, [sp, #20]
	ldr	r0, [r5]
	str	r6, [sp, #8]
	bl	krb5_string_to_key_salt
	add	r2, sp, #24
	mov	r1, r6
	ldr	r0, [r5]
	bl	hdb_add_master_key
	mov	r1, r6
	ldr	r0, [r5]
	bl	krb5_free_keyblock_contents
	ldr	r2, [r4]
	ldr	r1, .L47+24
	add	r0, sp, #32
	bl	asprintf
	mov	r0, r6
	ldr	r2, [r4]
	ldr	r1, .L47+28
	bl	asprintf
	ldr	r0, [sp, #32]
	cmp	r0, #0
	beq	.L13
	ldr	r3, [sp, #28]
	cmp	r3, #0
	beq	.L13
	mov	r0, r3
	bl	unlink
	cmp	r0, #0
	bge	.L16
	ldr	r2, .L47+32
	ldr	r3, .L47+12
	ldr	r6, [r2]
	ldr	r3, [r3]
	cmp	r6, r3
	bne	.L37
.L16:
	ldr	r2, [r4]
	ldr	r1, .L47+36
	ldr	r0, [r5]
	bl	krb5_warnx
	ldr	r2, [sp, #24]
	ldr	r1, [sp, #28]
	ldr	r0, [r5]
	bl	hdb_write_master_key
	cmp	r0, #0
	beq	.L17
	ldr	r0, [sp, #28]
	bl	unlink
	ldr	r0, [sp, #32]
	bl	free
	ldr	r0, [sp, #28]
	bl	free
.L18:
	ldr	r3, .L47+32
	ldr	r2, .L47+40
	ldr	r1, [r3]
	ldr	r0, [r5]
	bl	krb5_warn
.L22:
	ldr	r0, [r5]
	ldr	r1, [sp, #24]
	bl	hdb_free_master_key
.L3:
	ldr	r3, .L47+8
	ldr	r2, [r3]
	ldr	r3, [sp, #1068]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L45
	mov	r0, #0
	add	sp, sp, #1072
	add	sp, sp, #4
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L7:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L24
	b	.L3
.L39:
	ldr	r1, .L47+44
	bl	krb5_warnx
	b	.L3
.L44:
	add	r6, sp, #48
	sub	r7, r6, #4
	mov	r1, r7
	mov	r2, #1024
	bl	read
	subs	r8, r0, #0
	beq	.L46
.L10:
	mov	r9, #0
	add	r3, sp, #1072
	add	r8, r3, r8
	mov	r0, r7
	ldr	r1, .L47+48
	strb	r9, [r8, #-1028]
	bl	strcspn
	add	r3, sp, #1072
	add	r0, r3, r0
	strb	r9, [r0, #-1028]
	b	.L11
.L41:
	bl	hdb_db_dir
	ldr	r1, .L47+52
	mov	r2, r0
	mov	r0, r4
	bl	asprintf
	ldr	r1, [r4]
	cmp	r1, #0
	beq	.L6
	ldr	r0, [r5]
	b	.L5
.L42:
	ldr	r3, [r4]
	ldr	r0, [r5]
	ldr	r2, .L47+56
	bl	krb5_warn
	b	.L3
.L17:
	ldr	r0, [sp, #32]
	bl	unlink
	ldr	r1, [sp, #32]
	ldr	r0, [r4]
	bl	link
	cmp	r0, #0
	bge	.L19
	ldr	r2, .L47+32
	ldr	r3, .L47+12
	ldr	r6, [r2]
	ldr	r3, [r3]
	ldr	r0, [sp, #28]
	cmp	r6, r3
	beq	.L20
	bl	unlink
.L37:
	ldr	r0, [sp, #32]
.L15:
	bl	free
	ldr	r0, [sp, #28]
	bl	free
	cmp	r6, #0
	beq	.L22
	b	.L18
.L40:
	ldr	r3, [r4, #16]
	ldr	r0, [r5]
	ldr	r2, .L47+60
	bl	krb5_warn
	b	.L3
.L13:
	ldr	r3, .L47+64
	ldr	r6, [r3]
	b	.L15
.L12:
	mov	r3, #1
	mov	r1, #1024
	ldr	r2, .L47+68
	bl	UI_UTIL_read_pw_string
	cmp	r0, #0
	beq	.L11
	b	.L22
.L43:
	mov	r1, r2
	ldr	r3, [r4]
	ldr	r0, [r5]
	ldr	r2, .L47+56
	bl	krb5_warn
	b	.L3
.L19:
	ldr	r0, [sp, #28]
.L20:
	ldr	r1, [r4]
	bl	rename
	cmp	r0, #0
	blt	.L21
	ldr	r0, [sp, #32]
	bl	free
	ldr	r0, [sp, #28]
	bl	free
	b	.L22
.L46:
	ldr	r1, .L47+72
	ldr	r0, [r5]
	bl	krb5_warnx
	b	.L10
.L21:
	ldr	r3, .L47+32
	ldr	r0, [sp, #32]
	ldr	r6, [r3]
	b	.L15
.L6:
	ldr	r1, .L47+76
	mov	r0, #1
	bl	errx
	ldr	r0, [r5]
	ldr	r1, [r4]
	b	.L5
.L45:
	bl	__stack_chk_fail
.L48:
	.align	2
.L47:
	.word	local_flag
	.word	context
	.word	.LC13
	.word	ENOENT
	.word	KRB5_PW_SALT
	.word	.LC7
	.word	.LC9
	.word	.LC10
	.word	errno
	.word	.LC11
	.word	.LC12
	.word	.LC0
	.word	.LC6
	.word	.LC2
	.word	.LC4
	.word	.LC1
	.word	ENOMEM
	.word	.LC8
	.word	.LC5
	.word	.LC3
	.size	stash, .-stash
	.comm	local_flag,4,4
	.comm	errno,4,4
	.comm	context,4,4
	.comm	KRB5_PW_SALT,4,4
	.comm	ENOMEM,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
