	.file	"extr_p12_p8e.c_PKCS8_encrypt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	PKCS8_encrypt
	.type	PKCS8_encrypt, @function
PKCS8_encrypt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, r9d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r8
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	cmp	edi, -1
	je	.L9
	mov	ebp, edi
	mov	esi, edi
	mov	edi, DWORD PTR EVP_PBE_TYPE_PRF[rip]
	xor	r8d, r8d
	xor	ecx, ecx
	xor	edx, edx
	call	EVP_PBE_find@PLT
	test	rax, rax
	jne	.L10
	xor	eax, eax
	call	ERR_clear_error@PLT
	mov	esi, DWORD PTR 64[rsp]
	mov	edi, ebp
	mov	ecx, r15d
	mov	rdx, r14
	call	PKCS5_pbe_set@PLT
	mov	rbp, rax
.L3:
	test	rbp, rbp
	je	.L11
	mov	rdx, QWORD PTR 72[rsp]
	mov	rdi, r12
	mov	rcx, rbp
	mov	esi, r13d
	call	PKCS8_set0_pbe@PLT
	mov	r12, rax
	test	rax, rax
	je	.L12
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L10:
	.cfi_restore_state
	mov	esi, DWORD PTR 64[rsp]
	mov	r9d, ebp
	xor	r8d, r8d
	mov	ecx, r15d
	mov	rdx, r14
	mov	rdi, rbx
	call	PKCS5_pbe2_set_iv@PLT
	mov	rbp, rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	mov	esi, DWORD PTR 64[rsp]
	mov	ecx, r9d
	mov	rdx, r8
	mov	rdi, rbx
	call	PKCS5_pbe2_set@PLT
	mov	rbp, rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	mov	esi, DWORD PTR ERR_R_ASN1_LIB[rip]
	mov	edi, DWORD PTR PKCS12_F_PKCS8_ENCRYPT[rip]
	xor	r12d, r12d
	call	PKCS12err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, rbp
	call	X509_ALGOR_free@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	PKCS8_encrypt, .-PKCS8_encrypt
	.comm	PKCS12_F_PKCS8_ENCRYPT,4,4
	.comm	EVP_PBE_TYPE_PRF,4,4
	.comm	ERR_R_ASN1_LIB,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_p12_p8e.c_PKCS8_encrypt.c"
	.text
	.align	2
	.global	PKCS8_encrypt
	.syntax unified
	.arm
	.fpu softvfp
	.type	PKCS8_encrypt, %function
PKCS8_encrypt:
	@ args = 16, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	cmn	r0, #1
	mov	r8, r1
	mov	r5, r2
	mov	r7, r3
	sub	sp, sp, #8
	beq	.L9
	mov	r6, #0
	mov	r4, r0
	ldr	r1, .L13
	str	r6, [sp]
	ldr	r0, [r1]
	mov	r3, r6
	mov	r2, r6
	mov	r1, r4
	bl	EVP_PBE_find
	cmp	r0, r6
	bne	.L10
	bl	ERR_clear_error
	mov	r0, r4
	ldr	r3, [sp, #36]
	ldr	r2, [sp, #32]
	ldr	r1, [sp, #40]
	bl	PKCS5_pbe_set
	mov	r4, r0
.L3:
	cmp	r4, #0
	beq	.L11
	mov	r0, r5
	mov	r1, r7
	mov	r3, r4
	ldr	r2, [sp, #44]
	bl	PKCS8_set0_pbe
	subs	r5, r0, #0
	beq	.L12
.L1:
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	str	r4, [sp, #4]
	mov	r0, r8
	ldr	r3, [sp, #36]
	ldr	r2, [sp, #32]
	ldr	r1, [sp, #40]
	str	r6, [sp]
	bl	PKCS5_pbe2_set_iv
	mov	r4, r0
	b	.L3
.L9:
	mov	r0, r1
	ldr	r3, [sp, #36]
	ldr	r2, [sp, #32]
	ldr	r1, [sp, #40]
	bl	PKCS5_pbe2_set
	mov	r4, r0
	b	.L3
.L11:
	ldr	r2, .L13+4
	ldr	r3, .L13+8
	ldr	r1, [r2]
	ldr	r0, [r3]
	mov	r5, r4
	bl	PKCS12err
	b	.L1
.L12:
	mov	r0, r4
	bl	X509_ALGOR_free
	b	.L1
.L14:
	.align	2
.L13:
	.word	EVP_PBE_TYPE_PRF
	.word	ERR_R_ASN1_LIB
	.word	PKCS12_F_PKCS8_ENCRYPT
	.size	PKCS8_encrypt, .-PKCS8_encrypt
	.comm	PKCS12_F_PKCS8_ENCRYPT,4,4
	.comm	EVP_PBE_TYPE_PRF,4,4
	.comm	ERR_R_ASN1_LIB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
