	.file	"extr_apps.c_load_key.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"no keyfile specified\n"
.LC1:
	.string	"no engine specified\n"
.LC2:
	.string	"cannot load %s from engine\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"bad input format specified for key file\n"
	.section	.rodata.str1.1
.LC4:
	.string	"unable to load %s\n"
	.text
	.p2align 4
	.globl	load_key
	.type	load_key, @function
load_key:
.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
	mov	r12, r9
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 56
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 16[rsp], rcx
	mov	QWORD PTR 8[rsp], 0
	mov	QWORD PTR 24[rsp], rdi
	test	rdi, rdi
	je	.L32
	cmp	esi, DWORD PTR FORMAT_ENGINE[rip]
	je	.L33
	mov	rdi, rbp
	mov	edx, ebx
	mov	esi, 114
	call	bio_open_default@PLT
	mov	rbp, rax
	test	rbp, rbp
	je	.L9
.L38:
	cmp	DWORD PTR FORMAT_ASN1[rip], ebx
	je	.L34
	cmp	DWORD PTR FORMAT_PEM[rip], ebx
	je	.L35
	cmp	DWORD PTR FORMAT_PKCS12[rip], ebx
	je	.L36
	cmp	DWORD PTR FORMAT_MSBLOB[rip], ebx
	je	.L37
	cmp	DWORD PTR FORMAT_PVK[rip], ebx
	jne	.L14
	mov	esi, DWORD PTR wrap_password_callback[rip]
	lea	rdx, 16[rsp]
	mov	rdi, rbp
	call	b2i_PVK_bio@PLT
	mov	QWORD PTR 8[rsp], rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L32:
	test	edx, edx
	je	.L3
	cmp	DWORD PTR FORMAT_ENGINE[rip], esi
	je	.L3
	mov	edi, DWORD PTR stdin[rip]
	call	unbuffer@PLT
	mov	edi, ebx
	call	dup_bio_in@PLT
	mov	rbp, rax
	test	rbp, rbp
	jne	.L38
.L9:
	xor	ebp, ebp
.L5:
	mov	rdi, rbp
	call	BIO_free@PLT
	mov	rax, QWORD PTR 8[rsp]
	test	rax, rax
	je	.L39
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L40
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L33:
	.cfi_restore_state
	mov	r13, r8
	test	r8, r8
	je	.L41
	mov	rdi, r8
	call	ENGINE_init@PLT
	test	rax, rax
	jne	.L42
.L7:
	mov	rbp, QWORD PTR 8[rsp]
	test	rbp, rbp
	jne	.L9
	mov	edi, DWORD PTR bio_err[rip]
	mov	rdx, r12
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	BIO_printf@PLT
	mov	edi, DWORD PTR bio_err[rip]
	call	ERR_print_errors@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR bio_err[rip]
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	BIO_printf@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR bio_err[rip]
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	BIO_printf@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L39:
	mov	edi, DWORD PTR bio_err[rip]
	mov	rdx, r12
	lea	rsi, .LC4[rip]
	call	BIO_printf@PLT
	mov	edi, DWORD PTR bio_err[rip]
	call	ERR_print_errors@PLT
	mov	rax, QWORD PTR 8[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	xor	esi, esi
	mov	rdi, rbp
	call	d2i_PrivateKey_bio@PLT
	mov	QWORD PTR 8[rsp], rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L35:
	mov	edx, DWORD PTR wrap_password_callback[rip]
	lea	rcx, 16[rsp]
	xor	esi, esi
	mov	rdi, rbp
	call	PEM_read_bio_PrivateKey@PLT
	mov	QWORD PTR 8[rsp], rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L36:
	lea	rcx, 16[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	xor	r9d, r9d
	mov	rsi, r12
	push	0
	.cfi_def_cfa_offset 112
	mov	edx, DWORD PTR wrap_password_callback[rip]
	mov	rdi, rbp
	lea	r8, 24[rsp]
	call	load_pkcs12@PLT
	pop	rax
	.cfi_def_cfa_offset 104
	pop	rdx
	.cfi_def_cfa_offset 96
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L37:
	mov	rdi, rbp
	call	b2i_PrivateKey_bio@PLT
	mov	QWORD PTR 8[rsp], rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L41:
	mov	edi, DWORD PTR bio_err[rip]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	xor	ebp, ebp
	call	BIO_printf@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L42:
	xor	eax, eax
	call	get_ui_method@PLT
	mov	rdi, r13
	lea	rcx, 16[rsp]
	mov	rsi, rbp
	mov	rdx, rax
	call	ENGINE_load_private_key@PLT
	mov	rdi, r13
	mov	QWORD PTR 8[rsp], rax
	call	ENGINE_finish@PLT
	jmp	.L7
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	load_key, .-load_key
	.comm	wrap_password_callback,4,4
	.comm	stdin,4,4
	.comm	bio_err,4,4
	.comm	FORMAT_PVK,4,4
	.comm	FORMAT_PKCS12,4,4
	.comm	FORMAT_PEM,4,4
	.comm	FORMAT_MSBLOB,4,4
	.comm	FORMAT_ENGINE,4,4
	.comm	FORMAT_ASN1,4,4
	.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_apps.c_load_key.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"no keyfile specified\012\000"
	.align	2
.LC1:
	.ascii	"no engine specified\012\000"
	.align	2
.LC2:
	.ascii	"cannot load %s from engine\012\000"
	.align	2
.LC3:
	.ascii	"bad input format specified for key file\012\000"
	.align	2
.LC4:
	.ascii	"unable to load %s\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	load_key
	.syntax unified
	.arm
	.fpu softvfp
	.type	load_key, %function
load_key:
	@ args = 8, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, lr}
	sub	sp, sp, #36
	str	r3, [sp, #20]
	ldr	r3, .L43
	cmp	r0, ip
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	r4, r0
	mov	r5, r1
	ldr	r6, [sp, #56]
	ldr	r7, [sp, #60]
	str	r0, [sp, #24]
	str	ip, [sp, #16]
	beq	.L32
	ldr	r3, .L43+4
	ldr	r3, [r3]
	cmp	r1, r3
	beq	.L33
	mov	r2, r5
	mov	r1, #114
	bl	bio_open_default
	mov	r4, r0
	cmp	r4, #0
	beq	.L9
.L38:
	ldr	r3, .L43+8
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L34
	ldr	r3, .L43+12
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L35
	ldr	r3, .L43+16
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L36
	ldr	r3, .L43+20
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L37
	ldr	r3, .L43+24
	ldr	r3, [r3]
	cmp	r3, r5
	bne	.L14
	ldr	r3, .L43+28
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #20
	bl	b2i_PVK_bio
	str	r0, [sp, #16]
	b	.L5
.L32:
	cmp	r2, ip
	beq	.L3
	ldr	r3, .L43+4
	ldr	r3, [r3]
	cmp	r3, r1
	beq	.L3
	ldr	r3, .L43+32
	ldr	r0, [r3]
	bl	unbuffer
	mov	r0, r5
	bl	dup_bio_in
	mov	r4, r0
	cmp	r4, #0
	bne	.L38
.L9:
	mov	r4, #0
.L5:
	mov	r0, r4
	bl	BIO_free
	ldr	r0, [sp, #16]
	cmp	r0, #0
	beq	.L39
.L1:
	ldr	r3, .L43
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L40
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L33:
	cmp	r6, #0
	beq	.L41
	mov	r0, r6
	bl	ENGINE_init
	cmp	r0, #0
	bne	.L42
.L7:
	ldr	r4, [sp, #16]
	cmp	r4, #0
	bne	.L9
	ldr	r5, .L43+36
	mov	r2, r7
	ldr	r0, [r5]
	ldr	r1, .L43+40
	bl	BIO_printf
	ldr	r0, [r5]
	bl	ERR_print_errors
	b	.L5
.L14:
	ldr	r3, .L43+36
	ldr	r1, .L43+44
	ldr	r0, [r3]
	bl	BIO_printf
	b	.L5
.L3:
	ldr	r3, .L43+36
	ldr	r1, .L43+48
	ldr	r0, [r3]
	bl	BIO_printf
	b	.L5
.L39:
	ldr	r4, .L43+36
	mov	r2, r7
	ldr	r1, .L43+52
	ldr	r0, [r4]
	bl	BIO_printf
	ldr	r0, [r4]
	bl	ERR_print_errors
	ldr	r0, [sp, #16]
	b	.L1
.L34:
	mov	r1, #0
	mov	r0, r4
	bl	d2i_PrivateKey_bio
	str	r0, [sp, #16]
	b	.L5
.L35:
	ldr	r2, .L43+28
	mov	r1, #0
	mov	r0, r4
	ldr	r2, [r2]
	add	r3, sp, #20
	bl	PEM_read_bio_PrivateKey
	str	r0, [sp, #16]
	b	.L5
.L36:
	mov	r3, #0
	ldr	r2, .L43+28
	add	r1, sp, #16
	str	r3, [sp, #8]
	str	r3, [sp, #4]
	ldr	r2, [r2]
	mov	r0, r4
	str	r1, [sp]
	add	r3, sp, #20
	mov	r1, r7
	bl	load_pkcs12
	b	.L5
.L37:
	mov	r0, r4
	bl	b2i_PrivateKey_bio
	str	r0, [sp, #16]
	b	.L5
.L41:
	ldr	r3, .L43+36
	ldr	r1, .L43+56
	ldr	r0, [r3]
	mov	r4, r6
	bl	BIO_printf
	b	.L5
.L42:
	bl	get_ui_method
	add	r3, sp, #20
	mov	r2, r0
	mov	r1, r4
	mov	r0, r6
	bl	ENGINE_load_private_key
	mov	r3, r0
	mov	r0, r6
	str	r3, [sp, #16]
	bl	ENGINE_finish
	b	.L7
.L40:
	bl	__stack_chk_fail
.L44:
	.align	2
.L43:
	.word	.LC5
	.word	FORMAT_ENGINE
	.word	FORMAT_ASN1
	.word	FORMAT_PEM
	.word	FORMAT_PKCS12
	.word	FORMAT_MSBLOB
	.word	FORMAT_PVK
	.word	wrap_password_callback
	.word	stdin
	.word	bio_err
	.word	.LC2
	.word	.LC3
	.word	.LC0
	.word	.LC4
	.word	.LC1
	.size	load_key, .-load_key
	.comm	wrap_password_callback,4,4
	.comm	stdin,4,4
	.comm	bio_err,4,4
	.comm	FORMAT_PVK,4,4
	.comm	FORMAT_PKCS12,4,4
	.comm	FORMAT_PEM,4,4
	.comm	FORMAT_MSBLOB,4,4
	.comm	FORMAT_ENGINE,4,4
	.comm	FORMAT_ASN1,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
