	.file	"extr_sm2_sign.c_sm2_compute_msg_hash.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sm2_compute_msg_hash, @function
sm2_compute_msg_hash:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	eax, eax
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	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, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 8[rsp], rcx
	mov	QWORD PTR 16[rsp], r8
	mov	QWORD PTR 24[rsp], r9
	call	EVP_MD_CTX_new@PLT
	mov	rdi, r13
	mov	rbp, rax
	call	EVP_MD_size@PLT
	test	eax, eax
	js	.L22
	mov	edi, eax
	mov	r12d, eax
	call	OPENSSL_zalloc@PLT
	mov	r15, rax
	test	rbp, rbp
	je	.L9
	test	rax, rax
	je	.L9
	mov	rcx, QWORD PTR 8[rsp]
	mov	rdx, r14
	mov	r8, rbx
	mov	rsi, r13
	mov	rdi, rax
	xor	r14d, r14d
	call	sm2_compute_z_digest@PLT
	test	eax, eax
	je	.L3
	mov	rsi, r13
	mov	rdi, rbp
	call	EVP_DigestInit@PLT
	test	eax, eax
	je	.L7
	mov	edx, r12d
	mov	rsi, r15
	mov	rdi, rbp
	call	EVP_DigestUpdate@PLT
	test	eax, eax
	je	.L7
	mov	edx, DWORD PTR 24[rsp]
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdi, rbp
	call	EVP_DigestUpdate@PLT
	test	eax, eax
	je	.L7
	xor	edx, edx
	mov	rsi, r15
	mov	rdi, rbp
	call	EVP_DigestFinal@PLT
	test	eax, eax
	je	.L7
	xor	edx, edx
	mov	esi, r12d
	mov	rdi, r15
	call	BN_bin2bn@PLT
	mov	r14, rax
	test	rax, rax
	je	.L23
.L3:
	mov	rdi, r15
	call	OPENSSL_free@PLT
	mov	rdi, rbp
	call	EVP_MD_CTX_free@PLT
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	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
.L7:
	.cfi_restore_state
	mov	esi, DWORD PTR ERR_R_EVP_LIB[rip]
	mov	edi, DWORD PTR SM2_F_SM2_COMPUTE_MSG_HASH[rip]
	xor	r14d, r14d
	call	SM2err@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	mov	esi, DWORD PTR ERR_R_MALLOC_FAILURE[rip]
	mov	edi, DWORD PTR SM2_F_SM2_COMPUTE_MSG_HASH[rip]
	xor	r14d, r14d
	call	SM2err@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L22:
	mov	esi, DWORD PTR SM2_R_INVALID_DIGEST[rip]
	mov	edi, DWORD PTR SM2_F_SM2_COMPUTE_MSG_HASH[rip]
	xor	r14d, r14d
	xor	r15d, r15d
	call	SM2err@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	mov	esi, DWORD PTR ERR_R_INTERNAL_ERROR[rip]
	mov	edi, DWORD PTR SM2_F_SM2_COMPUTE_MSG_HASH[rip]
	call	SM2err@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	sm2_compute_msg_hash, .-sm2_compute_msg_hash
	.comm	SM2_R_INVALID_DIGEST,4,4
	.comm	SM2_F_SM2_COMPUTE_MSG_HASH,4,4
	.comm	ERR_R_MALLOC_FAILURE,4,4
	.comm	ERR_R_INTERNAL_ERROR,4,4
	.comm	ERR_R_EVP_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_sm2_sign.c_sm2_compute_msg_hash.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sm2_compute_msg_hash, %function
sm2_compute_msg_hash:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r8, r0
	mov	fp, r1
	mov	r5, r2
	mov	r10, r3
	bl	EVP_MD_CTX_new
	mov	r4, r0
	mov	r0, r8
	bl	EVP_MD_size
	subs	r9, r0, #0
	blt	.L20
	bl	OPENSSL_zalloc
	clz	r6, r0
	cmp	r4, #0
	lsr	r6, r6, #5
	moveq	r6, #1
	cmp	r6, #0
	mov	r7, r0
	ldrne	r2, .L22
	bne	.L18
	mov	r2, r5
	mov	r3, r10
	mov	r1, r8
	str	fp, [sp]
	bl	sm2_compute_z_digest
	subs	r5, r0, #0
	beq	.L3
	mov	r1, r8
	mov	r0, r4
	bl	EVP_DigestInit
	cmp	r0, #0
	beq	.L6
	mov	r2, r9
	mov	r1, r7
	mov	r0, r4
	bl	EVP_DigestUpdate
	cmp	r0, #0
	beq	.L6
	mov	r0, r4
	ldr	r2, [sp, #52]
	ldr	r1, [sp, #48]
	bl	EVP_DigestUpdate
	cmp	r0, #0
	beq	.L6
	mov	r2, r6
	mov	r1, r7
	mov	r0, r4
	bl	EVP_DigestFinal
	cmp	r0, #0
	beq	.L6
	mov	r2, r6
	mov	r1, r9
	mov	r0, r7
	bl	BN_bin2bn
	subs	r5, r0, #0
	beq	.L21
.L3:
	mov	r0, r7
	bl	OPENSSL_free
	mov	r0, r4
	bl	EVP_MD_CTX_free
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r2, .L22+4
.L18:
	ldr	r3, .L22+8
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	SM2err
	mov	r5, #0
	b	.L3
.L20:
	mov	r5, #0
	ldr	r2, .L22+12
	ldr	r3, .L22+8
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	SM2err
	mov	r7, r5
	b	.L3
.L21:
	ldr	r2, .L22+16
	ldr	r3, .L22+8
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	SM2err
	b	.L3
.L23:
	.align	2
.L22:
	.word	ERR_R_MALLOC_FAILURE
	.word	ERR_R_EVP_LIB
	.word	SM2_F_SM2_COMPUTE_MSG_HASH
	.word	SM2_R_INVALID_DIGEST
	.word	ERR_R_INTERNAL_ERROR
	.size	sm2_compute_msg_hash, .-sm2_compute_msg_hash
	.comm	SM2_R_INVALID_DIGEST,4,4
	.comm	SM2_F_SM2_COMPUTE_MSG_HASH,4,4
	.comm	ERR_R_MALLOC_FAILURE,4,4
	.comm	ERR_R_INTERNAL_ERROR,4,4
	.comm	ERR_R_EVP_LIB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
