	.file	"extr_crypto.c_dsa_verify_signature.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"out of memory"
.LC1:
	.string	"failed to set DSA key"
.LC2:
	.string	"DSA parameters missing"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"DSA parameters failed to decode"
	.section	.rodata.str1.1
.LC4:
	.string	"failed to set DSA parameters"
.LC5:
	.string	"BAD DSA sigature"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"Invalid format of DSA sigature"
	.text
	.p2align 4
	.type	dsa_verify_signature, @function
dsa_verify_signature:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	QWORD PTR 8[rsp], r8
	mov	QWORD PTR 16[rsp], r9
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	DSA_new@PLT
	test	rax, rax
	je	.L21
	mov	rbp, rax
	mov	eax, DWORD PTR 8[rbx]
	mov	edi, DWORD PTR 12[rbx]
	lea	r15, 48[rsp]
	lea	r14, 44[rsp]
	mov	rcx, r15
	test	eax, eax
	lea	esi, 7[rax]
	mov	rdx, r14
	cmovns	esi, eax
	sar	esi, 3
	call	decode_DSAPublicKey@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L22
.L4:
	mov	rdi, rbp
	call	DSA_free@PLT
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 88
	.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
.L22:
	.cfi_restore_state
	mov	rdi, r14
	call	heim_int2BN@PLT
	mov	rdi, r14
	mov	r13, rax
	call	free_DSAPublicKey@PLT
	test	r13, r13
	je	.L19
	xor	edx, edx
	mov	rsi, r13
	mov	rdi, rbp
	call	DSA_set0_key@PLT
	cmp	eax, 1
	jne	.L24
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	je	.L25
	mov	edi, DWORD PTR 4[rax]
	mov	esi, DWORD PTR [rax]
	lea	rbx, 60[rsp]
	mov	rcx, r15
	mov	rdx, rbx
	call	decode_DSAParams@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L26
	lea	rdi, 68[rsp]
	call	heim_int2BN@PLT
	lea	rdi, 64[rsp]
	mov	QWORD PTR 24[rsp], rax
	call	heim_int2BN@PLT
	mov	rdi, rbx
	mov	r15, rax
	call	heim_int2BN@PLT
	mov	rdi, rbx
	mov	r14, rax
	call	free_DSAParams@PLT
	mov	r8, QWORD PTR 24[rsp]
	test	r8, r8
	sete	dl
	test	r15, r15
	sete	al
	or	dl, al
	jne	.L14
	test	r14, r14
	je	.L14
	mov	rcx, r14
	mov	rdx, r15
	mov	rsi, r8
	mov	rdi, rbp
	mov	QWORD PTR 24[rsp], r8
	call	DSA_set0_pqg@PLT
	cmp	eax, 1
	jne	.L27
	mov	rax, QWORD PTR 16[rsp]
	mov	rbx, QWORD PTR 8[rsp]
	mov	r9, rbp
	mov	edi, -1
	mov	rcx, QWORD PTR 8[rax]
	mov	rsi, QWORD PTR 8[rbx]
	mov	r8d, DWORD PTR [rax]
	mov	edx, DWORD PTR [rbx]
	call	DSA_verify@PLT
	cmp	eax, 1
	je	.L4
	add	eax, 1
	cmp	eax, 1
	jbe	.L28
	mov	r13d, DWORD PTR HX509_CRYPTO_SIG_INVALID_FORMAT[rip]
	lea	rcx, .LC6[rip]
	xor	esi, esi
	mov	edi, r12d
	mov	edx, r13d
	call	hx509_set_error_string@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edx, DWORD PTR ENOMEM[rip]
	lea	rcx, .LC0[rip]
	xor	esi, esi
	mov	edi, r12d
	call	hx509_set_error_string@PLT
	mov	r13d, DWORD PTR ENOMEM[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, r8
	call	BN_free@PLT
	mov	rdi, r15
	call	BN_free@PLT
	mov	rdi, r14
	call	BN_free@PLT
.L19:
	mov	r13d, DWORD PTR ENOMEM[rip]
	lea	rcx, .LC0[rip]
	xor	esi, esi
	mov	edi, r12d
	mov	edx, r13d
	call	hx509_set_error_string@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, r13
	call	BN_free@PLT
	mov	r13d, DWORD PTR EINVAL[rip]
	xor	esi, esi
	mov	edi, r12d
	lea	rcx, .LC1[rip]
	mov	edx, r13d
	call	hx509_set_error_string@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L26:
	lea	rcx, .LC3[rip]
	mov	edx, eax
	xor	esi, esi
	mov	edi, r12d
	call	hx509_set_error_string@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L25:
	mov	r13d, DWORD PTR HX509_CRYPTO_SIG_INVALID_FORMAT[rip]
	lea	rcx, .LC2[rip]
	xor	esi, esi
	mov	edi, r12d
	mov	edx, r13d
	call	hx509_set_error_string@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L27:
	mov	r8, QWORD PTR 24[rsp]
	mov	rdi, r8
	call	BN_free@PLT
	mov	rdi, r15
	call	BN_free@PLT
	mov	rdi, r14
	call	BN_free@PLT
	mov	r13d, DWORD PTR EINVAL[rip]
	xor	esi, esi
	mov	edi, r12d
	lea	rcx, .LC4[rip]
	mov	edx, r13d
	call	hx509_set_error_string@PLT
	jmp	.L4
.L28:
	mov	r13d, DWORD PTR HX509_CRYPTO_BAD_SIGNATURE[rip]
	lea	rcx, .LC5[rip]
	xor	esi, esi
	mov	edi, r12d
	mov	edx, r13d
	call	hx509_set_error_string@PLT
	jmp	.L4
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	dsa_verify_signature, .-dsa_verify_signature
	.comm	HX509_CRYPTO_SIG_INVALID_FORMAT,4,4
	.comm	HX509_CRYPTO_BAD_SIGNATURE,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_dsa_verify_signature.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"out of memory\000"
	.align	2
.LC1:
	.ascii	"failed to set DSA key\000"
	.align	2
.LC2:
	.ascii	"DSA parameters missing\000"
	.align	2
.LC3:
	.ascii	"DSA parameters failed to decode\000"
	.align	2
.LC4:
	.ascii	"failed to set DSA parameters\000"
	.align	2
.LC5:
	.ascii	"BAD DSA sigature\000"
	.align	2
.LC6:
	.ascii	"Invalid format of DSA sigature\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dsa_verify_signature, %function
dsa_verify_signature:
	@ args = 8, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L27
	sub	sp, sp, #44
	mov	r6, r0
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	ldr	r7, [sp, #80]
	ldr	r8, [sp, #84]
	bl	DSA_new
	subs	r9, r0, #0
	beq	.L18
	ldr	r1, [r5, #4]
	ldr	r0, [r5, #8]
	cmp	r1, #0
	add	r3, r1, #7
	movlt	r1, r3
	add	r2, sp, #16
	asr	r1, r1, #3
	add	r3, sp, #20
	bl	decode_DSAPublicKey
	subs	r4, r0, #0
	beq	.L19
.L4:
	mov	r0, r9
	bl	DSA_free
.L1:
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	add	r0, sp, #16
	bl	heim_int2BN
	mov	r10, r0
	add	r0, sp, #16
	bl	free_DSAPublicKey
	cmp	r10, #0
	beq	.L21
	mov	r2, r4
	mov	r1, r10
	mov	r0, r9
	bl	DSA_set0_key
	cmp	r0, #1
	bne	.L22
	ldr	r0, [r5]
	cmp	r0, #0
	beq	.L23
	ldr	r1, [r0]
	add	r3, sp, #20
	ldr	r0, [r0, #4]
	add	r2, sp, #24
	bl	decode_DSAParams
	subs	r4, r0, #0
	bne	.L24
	add	r0, sp, #32
	bl	heim_int2BN
	mov	r1, r0
	add	r0, sp, #28
	str	r1, [sp, #12]
	bl	heim_int2BN
	mov	fp, r0
	add	r0, sp, #24
	bl	heim_int2BN
	clz	r5, fp
	mov	r10, r0
	add	r0, sp, #24
	bl	free_DSAParams
	ldr	r1, [sp, #12]
	lsr	r5, r5, #5
	cmp	r1, #0
	moveq	r5, #1
	cmp	r10, #0
	moveq	r5, #1
	cmp	r5, #0
	bne	.L25
	mov	r3, r10
	mov	r2, fp
	mov	r0, r9
	str	r1, [sp, #12]
	bl	DSA_set0_pqg
	cmp	r0, #1
	bne	.L26
	ldr	r3, [r8]
	mvn	r0, #0
	stm	sp, {r3, r9}
	ldr	r3, [r8, #4]
	ldr	r2, [r7]
	ldr	r1, [r7, #4]
	bl	DSA_verify
	cmp	r0, #1
	beq	.L4
	add	r0, r0, #1
	cmp	r0, #1
	ldrls	r3, .L27+4
	ldrhi	r3, .L27+8
	ldrls	r4, [r3]
	ldrhi	r4, [r3]
	movls	r0, r6
	movhi	r0, r6
	mov	r2, r4
	mov	r1, #0
	ldrls	r3, .L27+12
	ldrhi	r3, .L27+16
	bl	hx509_set_error_string
	b	.L4
.L18:
	ldr	r4, .L27+20
	mov	r1, r9
	ldr	r2, [r4]
	mov	r0, r6
	ldr	r3, .L27+24
	bl	hx509_set_error_string
	ldr	r4, [r4]
	b	.L1
.L22:
	mov	r0, r10
	bl	BN_free
	ldr	r3, .L27+28
	mov	r0, r6
	ldr	r4, [r3]
	mov	r1, #0
	mov	r2, r4
	ldr	r3, .L27+32
	bl	hx509_set_error_string
	b	.L4
.L21:
	ldr	r3, .L27+20
	mov	r1, r10
	ldr	r4, [r3]
	mov	r0, r6
	mov	r2, r4
	ldr	r3, .L27+24
	bl	hx509_set_error_string
	b	.L4
.L24:
	mov	r0, r6
	mov	r2, r4
	mov	r1, #0
	ldr	r3, .L27+36
	bl	hx509_set_error_string
	b	.L4
.L25:
	mov	r0, r1
	bl	BN_free
	mov	r0, fp
	bl	BN_free
	mov	r0, r10
	bl	BN_free
	ldr	r3, .L27+20
	mov	r0, r6
	ldr	r4, [r3]
	mov	r1, #0
	mov	r2, r4
	ldr	r3, .L27+24
	bl	hx509_set_error_string
	b	.L4
.L23:
	ldr	r3, .L27+8
	mov	r1, r0
	ldr	r4, [r3]
	mov	r0, r6
	mov	r2, r4
	ldr	r3, .L27+40
	bl	hx509_set_error_string
	b	.L4
.L26:
	ldr	r1, [sp, #12]
	mov	r0, r1
	bl	BN_free
	mov	r0, fp
	bl	BN_free
	mov	r0, r10
	bl	BN_free
	ldr	r3, .L27+28
	mov	r1, r5
	ldr	r4, [r3]
	mov	r0, r6
	mov	r2, r4
	ldr	r3, .L27+44
	bl	hx509_set_error_string
	b	.L4
.L20:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC7
	.word	HX509_CRYPTO_BAD_SIGNATURE
	.word	HX509_CRYPTO_SIG_INVALID_FORMAT
	.word	.LC5
	.word	.LC6
	.word	ENOMEM
	.word	.LC0
	.word	EINVAL
	.word	.LC1
	.word	.LC3
	.word	.LC2
	.word	.LC4
	.size	dsa_verify_signature, .-dsa_verify_signature
	.comm	HX509_CRYPTO_SIG_INVALID_FORMAT,4,4
	.comm	HX509_CRYPTO_BAD_SIGNATURE,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
