	.file	"extr_ess_lib.c_ESS_CERT_ID_V2_new_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ESS_CERT_ID_V2_new_init, @function
ESS_CERT_ID_V2_new_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rsi
	push	r12
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -56
	mov	DWORD PTR -68[rbp], edx
	mov	rbx, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR EVP_MAX_MD_SIZE[rip]
	mov	rdx, rax
	add	rax, 15
	mov	rcx, rax
	and	rax, -4096
	sub	rbx, rax
	and	rcx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L3
.L42:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L42
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L43
.L4:
	xor	esi, esi
	mov	rdi, rsp
	mov	DWORD PTR -60[rbp], edx
	mov	r15, rsp
	call	memset@PLT
	xor	eax, eax
	call	ESS_CERT_ID_V2_new@PLT
	mov	r14, rax
	test	rax, rax
	je	.L8
	xor	eax, eax
	call	EVP_sha256@PLT
	cmp	r12, rax
	je	.L7
	xor	eax, eax
	call	X509_ALGOR_new@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L8
	mov	rsi, r12
	mov	QWORD PTR -80[rbp], rax
	call	X509_ALGOR_set_md@PLT
	mov	rdi, QWORD PTR -80[rbp]
	mov	rbx, QWORD PTR [rdi]
	test	rbx, rbx
	je	.L6
	mov	QWORD PTR 16[r14], rdi
.L9:
	lea	rcx, -60[rbp]
	mov	rdx, r15
	mov	rsi, r12
	mov	rdi, r13
	call	X509_digest@PLT
	test	eax, eax
	je	.L8
	mov	edi, DWORD PTR 8[r14]
	mov	edx, DWORD PTR -60[rbp]
	mov	rsi, r15
	call	ASN1_OCTET_STRING_set@PLT
	test	eax, eax
	je	.L8
	mov	eax, DWORD PTR -68[rbp]
	test	eax, eax
	je	.L1
	xor	eax, eax
	call	ESS_ISSUER_SERIAL_new@PLT
	mov	QWORD PTR [r14], rax
	test	rax, rax
	je	.L8
	xor	eax, eax
	call	GENERAL_NAME_new@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L8
	mov	eax, DWORD PTR GEN_DIRNAME[rip]
	mov	rdi, r13
	mov	DWORD PTR 8[rbx], eax
	call	X509_get_issuer_name@PLT
	mov	edi, eax
	call	X509_NAME_dup@PLT
	mov	QWORD PTR [rbx], rax
	mov	rdi, rax
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR [r14]
	mov	rsi, rbx
	mov	edi, DWORD PTR 8[rax]
	call	sk_GENERAL_NAME_push@PLT
	test	eax, eax
	je	.L12
	mov	rax, QWORD PTR [r14]
	mov	rdi, QWORD PTR [rax]
	call	ASN1_INTEGER_free@PLT
	mov	rdi, r13
	call	X509_get_serialNumber@PLT
	mov	rbx, QWORD PTR [r14]
	mov	edi, eax
	call	ASN1_INTEGER_dup@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR [r14]
	cmp	QWORD PTR [rax], 0
	jne	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	xor	edi, edi
	xor	ebx, ebx
.L6:
	call	X509_ALGOR_free@PLT
	mov	rdi, rbx
	call	GENERAL_NAME_free@PLT
	mov	rdi, r14
	xor	r14d, r14d
	call	ESS_CERT_ID_V2_free@PLT
	mov	esi, DWORD PTR ERR_R_MALLOC_FAILURE[rip]
	mov	edi, DWORD PTR ESS_F_ESS_CERT_ID_V2_NEW_INIT[rip]
	call	ESSerr@PLT
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L44
	lea	rsp, -40[rbp]
	mov	rax, r14
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	QWORD PTR 16[r14], 0
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	xor	edi, edi
	jmp	.L6
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ESS_CERT_ID_V2_new_init, .-ESS_CERT_ID_V2_new_init
	.comm	GEN_DIRNAME,4,4
	.comm	EVP_MAX_MD_SIZE,4,4
	.comm	ESS_F_ESS_CERT_ID_V2_NEW_INIT,4,4
	.comm	ERR_R_MALLOC_FAILURE,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_ess_lib.c_ESS_CERT_ID_V2_new_init.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ESS_CERT_ID_V2_new_init, %function
ESS_CERT_ID_V2_new_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #12
	ldr	r3, .L40
	mov	r8, r2
	ldr	r2, [r3]
	mov	r6, r1
	add	r3, r2, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L40+4
	mov	r1, #0
	mov	r7, r0
	mov	r0, sp
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	str	r2, [fp, #-44]
	bl	memset
	bl	ESS_CERT_ID_V2_new
	subs	r4, r0, #0
	beq	.L5
	bl	EVP_sha256
	cmp	r7, r0
	mov	r9, sp
	beq	.L4
	bl	X509_ALGOR_new
	subs	r5, r0, #0
	beq	.L5
	mov	r1, r7
	bl	X509_ALGOR_set_md
	ldr	r10, [r5]
	cmp	r10, #0
	beq	.L3
	str	r5, [r4, #8]
.L6:
	mov	r1, r7
	mov	r2, r9
	mov	r0, r6
	sub	r3, fp, #44
	bl	X509_digest
	cmp	r0, #0
	beq	.L5
	mov	r1, r9
	ldr	r2, [fp, #-44]
	ldr	r0, [r4, #4]
	bl	ASN1_OCTET_STRING_set
	cmp	r0, #0
	beq	.L5
	cmp	r8, #0
	beq	.L1
	bl	ESS_ISSUER_SERIAL_new
	cmp	r0, #0
	str	r0, [r4]
	beq	.L5
	bl	GENERAL_NAME_new
	subs	r10, r0, #0
	beq	.L5
	ldr	r3, .L40+8
	mov	r0, r6
	ldr	r3, [r3]
	str	r3, [r10, #4]
	bl	X509_get_issuer_name
	bl	X509_NAME_dup
	cmp	r0, #0
	mov	r5, r0
	str	r0, [r10]
	beq	.L3
	ldr	r3, [r4]
	mov	r1, r10
	ldr	r0, [r3, #4]
	bl	sk_GENERAL_NAME_push
	subs	r5, r0, #0
	beq	.L3
	ldr	r3, [r4]
	ldr	r0, [r3]
	bl	ASN1_INTEGER_free
	mov	r0, r6
	bl	X509_get_serialNumber
	ldr	r5, [r4]
	bl	ASN1_INTEGER_dup
	ldr	r3, [r4]
	str	r0, [r5]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L1
.L5:
	mov	r5, #0
	mov	r10, r5
.L3:
	mov	r0, r5
	bl	X509_ALGOR_free
	mov	r0, r10
	bl	GENERAL_NAME_free
	mov	r0, r4
	bl	ESS_CERT_ID_V2_free
	ldr	r2, .L40+12
	ldr	r3, .L40+16
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ESSerr
	mov	r4, #0
.L1:
	ldr	r3, .L40+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L39
	mov	r0, r4
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r3, #0
	str	r3, [r4, #8]
	b	.L6
.L39:
	bl	__stack_chk_fail
.L41:
	.align	2
.L40:
	.word	EVP_MAX_MD_SIZE
	.word	.LC0
	.word	GEN_DIRNAME
	.word	ERR_R_MALLOC_FAILURE
	.word	ESS_F_ESS_CERT_ID_V2_NEW_INIT
	.size	ESS_CERT_ID_V2_new_init, .-ESS_CERT_ID_V2_new_init
	.comm	GEN_DIRNAME,4,4
	.comm	EVP_MAX_MD_SIZE,4,4
	.comm	ESS_F_ESS_CERT_ID_V2_NEW_INIT,4,4
	.comm	ERR_R_MALLOC_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
