	.file	"extr_crypto.c__hx509_pbe_decrypt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"String to key algorithm not supported"
	.text
	.p2align 4
	.globl	_hx509_pbe_decrypt
	.type	_hx509_pbe_decrypt, @function
_hx509_pbe_decrypt:
.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
	mov	r14d, edi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 136
	.cfi_def_cfa_offset 192
	mov	QWORD PTR 8[rsp], r8
	lea	r15, 80[rsp]
	lea	r12, 96[rsp]
	mov	QWORD PTR 24[rsp], rdx
	mov	rdi, r15
	mov	edx, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 120[rsp], rax
	xor	eax, eax
	call	memset@PLT
	mov	edx, 16
	xor	esi, esi
	mov	rdi, r12
	call	memset@PLT
	mov	rdi, QWORD PTR 8[rsp]
	mov	edx, 16
	xor	esi, esi
	call	memset@PLT
	lea	rcx, 72[rsp]
	lea	rdx, 64[rsp]
	lea	rsi, 56[rsp]
	lea	rdi, 4[rbx]
	call	find_string2key@PLT
	mov	QWORD PTR 16[rsp], rax
	test	rax, rax
	je	.L25
	mov	rdi, QWORD PTR 56[rsp]
	call	EVP_CIPHER_key_length@PLT
	mov	edi, eax
	mov	DWORD PTR 88[rsp], eax
	call	malloc@PLT
	mov	QWORD PTR 80[rsp], rax
	test	rax, rax
	je	.L23
	mov	rdi, QWORD PTR 56[rsp]
	call	EVP_CIPHER_iv_length@PLT
	mov	edi, eax
	mov	DWORD PTR 104[rsp], eax
	call	malloc@PLT
	mov	QWORD PTR 96[rsp], rax
	test	rax, rax
	je	.L23
	mov	edi, r13d
	xor	ebx, ebx
	call	_hx509_lock_get_passwords@PLT
	lea	rdx, 52[rsp]
	mov	r13d, DWORD PTR HX509_CRYPTO_INTERNAL_ERROR[rip]
	mov	rsi, rax
	movsx	rax, DWORD PTR [rax]
	mov	QWORD PTR 32[rsp], rdx
	cmp	eax, -1
	je	.L3
	mov	DWORD PTR 44[rsp], r14d
	mov	r14, rsi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edi, DWORD PTR 52[rsp]
	mov	edx, DWORD PTR 8[rbp]
	mov	rcx, r12
	mov	r8, QWORD PTR 8[rsp]
	mov	rsi, QWORD PTR 0[rbp]
	call	hx509_crypto_decrypt@PLT
	mov	edi, DWORD PTR 52[rsp]
	mov	r13d, eax
	call	hx509_crypto_destroy@PLT
	test	r13d, r13d
	je	.L3
	movsx	rax, DWORD PTR [r14]
	add	rbx, 1
	lea	ecx, 1[rax]
	movsx	rcx, ecx
	cmp	rcx, rbx
	jbe	.L3
.L6:
	lea	rsi, .LC0[rip]
	cmp	rbx, rax
	jnb	.L7
	mov	rax, QWORD PTR 8[r14]
	mov	rsi, QWORD PTR [rax+rbx*8]
.L7:
	push	QWORD PTR 64[rsp]
	.cfi_def_cfa_offset 200
	mov	r9, r12
	mov	r8, r15
	push	QWORD PTR 24[rsp]
	.cfi_def_cfa_offset 208
	mov	rax, QWORD PTR 40[rsp]
	mov	rcx, QWORD PTR 48[rsp]
	mov	edi, DWORD PTR 60[rsp]
	mov	edx, DWORD PTR [rax]
	call	[QWORD PTR 88[rsp]]
	mov	r13d, eax
	pop	rax
	.cfi_def_cfa_offset 200
	pop	rdx
	.cfi_def_cfa_offset 192
	test	r13d, r13d
	je	.L26
	.p2align 4,,10
	.p2align 3
.L3:
	cmp	QWORD PTR 80[rsp], 0
	je	.L9
	mov	rdi, r15
	call	der_free_octet_string@PLT
.L9:
	cmp	QWORD PTR 96[rsp], 0
	je	.L1
	mov	rdi, r12
	call	der_free_octet_string@PLT
.L1:
	mov	rax, QWORD PTR 120[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 136
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L23:
	.cfi_restore_state
	mov	edi, r14d
	mov	r13d, DWORD PTR ENOMEM[rip]
	call	hx509_clear_error_string@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edx, DWORD PTR HX509_ALG_NOT_SUPP[rip]
	lea	rcx, .LC1[rip]
	xor	esi, esi
	mov	edi, r14d
	call	hx509_set_error_string@PLT
	mov	r13d, DWORD PTR HX509_ALG_NOT_SUPP[rip]
	jmp	.L3
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	_hx509_pbe_decrypt, .-_hx509_pbe_decrypt
	.comm	HX509_CRYPTO_INTERNAL_ERROR,4,4
	.comm	HX509_ALG_NOT_SUPP,4,4
	.comm	ENOMEM,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_crypto.c__hx509_pbe_decrypt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"String to key algorithm not supported\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	_hx509_pbe_decrypt
	.syntax unified
	.arm
	.fpu softvfp
	.type	_hx509_pbe_decrypt, %function
_hx509_pbe_decrypt:
	@ args = 4, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, #0
	mov	r8, r2
	sub	sp, sp, #68
	ldr	fp, [sp, #104]
	mov	r5, r3
	ldr	r3, .L33
	str	r2, [sp, #20]
	mov	r9, r0
	mov	r2, #8
	mov	r7, r1
	mov	r0, fp
	mov	r1, r4
	add	r10, sp, #44
	add	r6, sp, #52
	ldr	r3, [r3]
	str	r3, [sp, #60]
	mov	r3,#0
	str	r4, [sp, #44]
	str	r4, [sp, #52]
	str	r4, [r10, #4]
	str	r4, [r6, #4]
	bl	memset
	add	r3, sp, #36
	add	r0, r8, #4
	add	r2, sp, #32
	add	r1, sp, #28
	bl	find_string2key
	subs	r3, r0, #0
	str	r3, [sp, #16]
	beq	.L29
	ldr	r0, [sp, #28]
	bl	EVP_CIPHER_key_length
	str	r0, [sp, #48]
	bl	malloc
	cmp	r0, #0
	str	r0, [sp, #44]
	beq	.L27
	ldr	r0, [sp, #28]
	bl	EVP_CIPHER_iv_length
	str	r0, [sp, #56]
	bl	malloc
	cmp	r0, #0
	str	r0, [sp, #52]
	beq	.L27
	mov	r0, r7
	bl	_hx509_lock_get_passwords
	ldr	r3, [r0]
	mov	r8, r0
	cmn	r3, #1
	bne	.L6
	b	.L30
.L31:
	str	fp, [sp]
	mov	r3, r6
	ldm	r5, {r1, r2}
	ldr	r0, [sp, #40]
	bl	hx509_crypto_decrypt
	mov	r7, r0
	ldr	r0, [sp, #40]
	bl	hx509_crypto_destroy
	cmp	r7, #0
	beq	.L3
	ldr	r3, [r8]
	add	r4, r4, #1
	add	r2, r3, #1
	cmp	r2, r4
	bls	.L3
.L6:
	cmp	r4, r3
	ldrcc	r3, [r8, #4]
	ldr	r2, [sp, #16]
	ldrcc	r1, [r3, r4, lsl #2]
	ldr	r3, [sp, #32]
	str	r2, [sp, #8]
	ldr	r2, [sp, #20]
	str	r3, [sp, #12]
	str	r6, [sp, #4]
	str	r10, [sp]
	ldrcs	r1, .L33+4
	ldr	r7, [sp, #36]
	mov	r0, r9
	ldr	r2, [r2]
	add	r3, sp, #40
	blx	r7
	subs	r7, r0, #0
	beq	.L31
.L3:
	ldr	r3, [sp, #44]
	cmp	r3, #0
	beq	.L9
	mov	r0, r10
	bl	der_free_octet_string
.L9:
	ldr	r3, [sp, #52]
	cmp	r3, #0
	beq	.L1
	mov	r0, r6
	bl	der_free_octet_string
.L1:
	ldr	r3, .L33
	ldr	r2, [r3]
	ldr	r3, [sp, #60]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L32
	mov	r0, r7
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	ldr	r4, .L33+8
	mov	r1, r3
	mov	r0, r9
	ldr	r2, [r4]
	ldr	r3, .L33+12
	bl	hx509_set_error_string
	ldr	r7, [r4]
	b	.L3
.L30:
	ldr	r3, .L33+16
	ldr	r7, [r3]
	b	.L3
.L32:
	bl	__stack_chk_fail
.L27:
	ldr	r3, .L33+20
	mov	r0, r9
	ldr	r7, [r3]
	bl	hx509_clear_error_string
	b	.L3
.L34:
	.align	2
.L33:
	.word	.LC2
	.word	.LC0
	.word	HX509_ALG_NOT_SUPP
	.word	.LC1
	.word	HX509_CRYPTO_INTERNAL_ERROR
	.word	ENOMEM
	.size	_hx509_pbe_decrypt, .-_hx509_pbe_decrypt
	.comm	HX509_CRYPTO_INTERNAL_ERROR,4,4
	.comm	HX509_ALG_NOT_SUPP,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
