	.file	"extr_sm2_crypt.c_sm2_plaintext_size.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sm2_plaintext_size
	.type	sm2_plaintext_size, @function
sm2_plaintext_size:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	EC_KEY_get0_group@PLT
	mov	edi, eax
	call	ec_field_size@PLT
	mov	rdi, r13
	mov	rbp, rax
	call	EVP_MD_size@PLT
	test	eax, eax
	js	.L8
	test	rbp, rbp
	je	.L9
	cdqe
	lea	rax, 10[rax+rbp*2]
	cmp	rax, rbx
	jnb	.L10
	sub	rbx, rax
	mov	eax, 1
	mov	QWORD PTR [r12], rbx
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L9:
	.cfi_restore_state
	mov	esi, DWORD PTR SM2_R_INVALID_FIELD[rip]
	mov	edi, DWORD PTR SM2_F_SM2_PLAINTEXT_SIZE[rip]
	call	SM2err@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L8:
	.cfi_restore_state
	mov	esi, DWORD PTR SM2_R_INVALID_DIGEST[rip]
	mov	edi, DWORD PTR SM2_F_SM2_PLAINTEXT_SIZE[rip]
	call	SM2err@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L10:
	.cfi_restore_state
	mov	esi, DWORD PTR SM2_R_INVALID_ENCODING[rip]
	mov	edi, DWORD PTR SM2_F_SM2_PLAINTEXT_SIZE[rip]
	call	SM2err@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
	.cfi_endproc
.LFE0:
	.size	sm2_plaintext_size, .-sm2_plaintext_size
	.comm	SM2_R_INVALID_FIELD,4,4
	.comm	SM2_R_INVALID_ENCODING,4,4
	.comm	SM2_R_INVALID_DIGEST,4,4
	.comm	SM2_F_SM2_PLAINTEXT_SIZE,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_crypt.c_sm2_plaintext_size.c"
	.text
	.align	2
	.global	sm2_plaintext_size
	.syntax unified
	.arm
	.fpu softvfp
	.type	sm2_plaintext_size, %function
sm2_plaintext_size:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	mov	r6, r2
	mov	r5, r3
	bl	EC_KEY_get0_group
	bl	ec_field_size
	mov	r4, r0
	mov	r0, r7
	bl	EVP_MD_size
	cmp	r0, #0
	blt	.L9
	cmp	r4, #0
	ldreq	r2, .L10
	beq	.L7
	add	r4, r4, #5
	add	r4, r0, r4, lsl #1
	cmp	r4, r6
	ldrcs	r2, .L10+4
	bcs	.L7
	sub	r4, r6, r4
	mov	r0, #1
	str	r4, [r5]
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r2, .L10+8
.L7:
	ldr	r3, .L10+12
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	SM2err
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	.align	2
.L10:
	.word	SM2_R_INVALID_FIELD
	.word	SM2_R_INVALID_ENCODING
	.word	SM2_R_INVALID_DIGEST
	.word	SM2_F_SM2_PLAINTEXT_SIZE
	.size	sm2_plaintext_size, .-sm2_plaintext_size
	.comm	SM2_R_INVALID_FIELD,4,4
	.comm	SM2_R_INVALID_ENCODING,4,4
	.comm	SM2_R_INVALID_DIGEST,4,4
	.comm	SM2_F_SM2_PLAINTEXT_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
