	.file	"extr_sshkey.c_sshkey_private_pem_to_blob.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sshkey_private_pem_to_blob, @function
sshkey_private_pem_to_blob:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	rdi, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	strlen@PLT
	mov	ebx, eax
	test	eax, eax
	jle	.L16
	xor	eax, eax
	call	EVP_aes_128_cbc@PLT
	mov	r15, rax
.L12:
	lea	eax, -1[rbx]
	cmp	eax, 3
	ja	.L3
	mov	r12d, DWORD PTR SSH_ERR_PASSPHRASE_TOO_SHORT[rip]
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	xor	eax, eax
	call	BIO_s_mem@PLT
	mov	edi, eax
	call	BIO_new@PLT
	mov	r14, rax
	test	rax, rax
	je	.L18
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 128
	je	.L6
	cmp	eax, 130
	jne	.L7
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	mov	esi, DWORD PTR 12[rbp]
	mov	rdi, r14
	xor	r9d, r9d
	push	0
	.cfi_def_cfa_offset 96
	mov	r8d, ebx
	mov	rcx, r12
	mov	rdx, r15
	call	PEM_write_bio_DSAPrivateKey@PLT
	pop	rsi
	.cfi_def_cfa_offset 88
	pop	rdi
	.cfi_def_cfa_offset 80
	test	eax, eax
	jne	.L9
.L7:
	mov	r12d, DWORD PTR SSH_ERR_LIBCRYPTO_ERROR[rip]
.L10:
	mov	rdi, r14
	call	BIO_free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	xor	r12d, r12d
	xor	r15d, r15d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rsi, rsp
	mov	rdi, r14
	call	BIO_get_mem_data@PLT
	mov	r12d, DWORD PTR SSH_ERR_INTERNAL_ERROR[rip]
	mov	edx, eax
	test	eax, eax
	jle	.L10
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, r13
	call	sshbuf_put@PLT
	mov	r12d, eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	mov	esi, DWORD PTR 4[rbp]
	mov	rcx, r12
	mov	rdx, r15
	push	0
	.cfi_def_cfa_offset 96
	xor	r9d, r9d
	mov	r8d, ebx
	mov	rdi, r14
	call	PEM_write_bio_RSAPrivateKey@PLT
	pop	rdx
	.cfi_def_cfa_offset 88
	pop	rcx
	.cfi_def_cfa_offset 80
	test	eax, eax
	je	.L7
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L18:
	mov	r12d, DWORD PTR SSH_ERR_ALLOC_FAIL[rip]
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sshkey_private_pem_to_blob, .-sshkey_private_pem_to_blob
	.comm	SSH_ERR_PASSPHRASE_TOO_SHORT,4,4
	.comm	SSH_ERR_LIBCRYPTO_ERROR,4,4
	.comm	SSH_ERR_INTERNAL_ERROR,4,4
	.comm	SSH_ERR_ALLOC_FAIL,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_sshkey.c_sshkey_private_pem_to_blob.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sshkey_private_pem_to_blob, %function
sshkey_private_pem_to_blob:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L20
	sub	sp, sp, #28
	mov	r8, r0
	mov	r0, r2
	mov	r5, r2
	mov	r7, r1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	strlen
	subs	r4, r0, #0
	moveq	r5, r4
	moveq	r6, r4
	bne	.L16
.L3:
	bl	BIO_s_mem
	bl	BIO_new
	subs	r9, r0, #0
	beq	.L17
	ldr	r3, [r8]
	cmp	r3, #128
	beq	.L6
	cmp	r3, #130
	bne	.L7
	mov	ip, #0
	str	r4, [sp]
	ldr	r1, [r8, #12]
	mov	r3, r5
	mov	r2, r6
	str	ip, [sp, #8]
	str	ip, [sp, #4]
	bl	PEM_write_bio_DSAPrivateKey
.L8:
	cmp	r0, #0
	bne	.L9
.L7:
	ldr	r3, .L20+4
	ldr	r4, [r3]
.L10:
	mov	r0, r9
	bl	BIO_free
	b	.L1
.L16:
	bl	EVP_aes_128_cbc
	sub	r3, r4, #1
	cmp	r3, #3
	mov	r6, r0
	bhi	.L3
	ldr	r3, .L20+8
	ldr	r4, [r3]
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L9:
	mov	r0, r9
	add	r1, sp, #16
	bl	BIO_get_mem_data
	subs	r2, r0, #0
	ble	.L19
	mov	r0, r7
	ldr	r1, [sp, #16]
	bl	sshbuf_put
	mov	r4, r0
	b	.L10
.L17:
	ldr	r3, .L20+12
	ldr	r4, [r3]
	b	.L1
.L6:
	mov	ip, #0
	str	r4, [sp]
	ldr	r1, [r8, #4]
	mov	r3, r5
	mov	r2, r6
	str	ip, [sp, #8]
	str	ip, [sp, #4]
	bl	PEM_write_bio_RSAPrivateKey
	b	.L8
.L19:
	ldr	r3, .L20+16
	ldr	r4, [r3]
	b	.L10
.L18:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC0
	.word	SSH_ERR_LIBCRYPTO_ERROR
	.word	SSH_ERR_PASSPHRASE_TOO_SHORT
	.word	SSH_ERR_ALLOC_FAIL
	.word	SSH_ERR_INTERNAL_ERROR
	.size	sshkey_private_pem_to_blob, .-sshkey_private_pem_to_blob
	.comm	SSH_ERR_PASSPHRASE_TOO_SHORT,4,4
	.comm	SSH_ERR_LIBCRYPTO_ERROR,4,4
	.comm	SSH_ERR_INTERNAL_ERROR,4,4
	.comm	SSH_ERR_ALLOC_FAIL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
