	.file	"extr_p12_npas.c_newpass_bag.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	newpass_bag, @function
newpass_bag:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, 1
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	PKCS12_SAFEBAG_get_nid@PLT
	cmp	rax, QWORD PTR NID_pkcs8ShroudedKeyBag[rip]
	je	.L15
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L15:
	.cfi_restore_state
	mov	rdi, QWORD PTR [rbx]
	mov	rsi, rbp
	mov	edx, -1
	call	PKCS8_decrypt@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L4
	mov	rdi, QWORD PTR [rbx]
	xor	edx, edx
	lea	rsi, 16[rsp]
	call	X509_SIG_get0@PLT
	mov	rdi, QWORD PTR 16[rsp]
	lea	rcx, 8[rsp]
	lea	rdx, 12[rsp]
	lea	rsi, 4[rsp]
	call	alg_get@PLT
	test	eax, eax
	jne	.L17
.L4:
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	push	rbp
	.cfi_def_cfa_offset 88
	mov	eax, DWORD PTR 20[rsp]
	mov	rdx, r13
	xor	r8d, r8d
	mov	ecx, -1
	xor	esi, esi
	push	rax
	.cfi_def_cfa_offset 96
	mov	r9d, DWORD PTR 24[rsp]
	mov	edi, DWORD PTR 20[rsp]
	call	PKCS8_encrypt@PLT
	mov	rdi, rbp
	mov	r13, rax
	call	PKCS8_PRIV_KEY_INFO_free@PLT
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
	test	r13, r13
	je	.L4
	mov	rdi, QWORD PTR [rbx]
	call	X509_SIG_free@PLT
	mov	QWORD PTR [rbx], r13
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	newpass_bag, .-newpass_bag
	.comm	NID_pkcs8ShroudedKeyBag,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_p12_npas.c_newpass_bag.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	newpass_bag, %function
newpass_bag:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L18
	sub	sp, sp, #40
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	mov	r4, r1
	mov	r6, r2
	mov	r5, r0
	bl	PKCS12_SAFEBAG_get_nid
	ldr	r3, .L18+4
	ldr	r3, [r3]
	cmp	r0, r3
	movne	r0, #1
	beq	.L15
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, pc}
.L15:
	mov	r1, r4
	mvn	r2, #0
	ldr	r0, [r5]
	bl	PKCS8_decrypt
	subs	r4, r0, #0
	beq	.L4
	mov	r2, #0
	add	r1, sp, #32
	ldr	r0, [r5]
	bl	X509_SIG_get0
	ldr	r0, [sp, #32]
	add	r3, sp, #24
	add	r2, sp, #28
	add	r1, sp, #20
	bl	alg_get
	cmp	r0, #0
	bne	.L17
.L4:
	mov	r0, #0
	b	.L1
.L17:
	mov	r1, #0
	ldr	r0, [sp, #28]
	ldr	r3, [sp, #24]
	mov	r2, r6
	str	r1, [sp]
	str	r0, [sp, #8]
	str	r3, [sp, #4]
	ldr	r0, [sp, #20]
	mvn	r3, #0
	str	r4, [sp, #12]
	bl	PKCS8_encrypt
	mov	r6, r0
	mov	r0, r4
	bl	PKCS8_PRIV_KEY_INFO_free
	cmp	r6, #0
	beq	.L4
	ldr	r0, [r5]
	bl	X509_SIG_free
	mov	r0, #1
	str	r6, [r5]
	b	.L1
.L16:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	NID_pkcs8ShroudedKeyBag
	.size	newpass_bag, .-newpass_bag
	.comm	NID_pkcs8ShroudedKeyBag,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
