	.file	"extr_ec_ameth.c_eckey_priv_encode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	eckey_priv_encode, @function
eckey_priv_encode:
.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
	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
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rsi]
	mov	rbp, rsp
	lea	rsi, 16[rsp]
	lea	rdi, 4[rsp]
	mov	rdx, rbp
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rsp], eax
	call	eckey_param2type@PLT
	test	eax, eax
	je	.L11
	mov	rdi, rbp
	call	EC_KEY_get_enc_flags@PLT
	or	eax, DWORD PTR EC_PKEY_NO_PARAMETERS[rip]
	mov	rdi, rbp
	mov	esi, eax
	call	EC_KEY_set_enc_flags@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	i2d_ECPrivateKey@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L12
	mov	edi, eax
	call	OPENSSL_malloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L13
	lea	rsi, 8[rsp]
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], rax
	call	i2d_ECPrivateKey@PLT
	test	eax, eax
	je	.L14
	mov	edi, DWORD PTR NID_X9_62_id_ecPublicKey[rip]
	mov	rbp, QWORD PTR 16[rsp]
	mov	r15d, DWORD PTR 4[rsp]
	call	OBJ_nid2obj@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	xor	edx, edx
	mov	r9, r14
	push	r12
	.cfi_def_cfa_offset 96
	mov	esi, eax
	mov	r8, rbp
	mov	ecx, r15d
	mov	rdi, r13
	call	PKCS8_pkey_set0@PLT
	mov	r12d, eax
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
	test	r12d, r12d
	je	.L15
	mov	r12d, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	esi, DWORD PTR ERR_R_EC_LIB[rip]
	mov	edi, DWORD PTR EC_F_ECKEY_PRIV_ENCODE[rip]
	call	ECerr@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	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
.L11:
	.cfi_restore_state
	mov	esi, DWORD PTR EC_R_DECODE_ERROR[rip]
	mov	edi, DWORD PTR EC_F_ECKEY_PRIV_ENCODE[rip]
	mov	r12d, eax
	call	ECerr@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, r14
	xor	r12d, r12d
	call	OPENSSL_free@PLT
	mov	esi, DWORD PTR ERR_R_EC_LIB[rip]
	mov	edi, DWORD PTR EC_F_ECKEY_PRIV_ENCODE[rip]
	call	ECerr@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	esi, DWORD PTR ERR_R_MALLOC_FAILURE[rip]
	mov	edi, DWORD PTR EC_F_ECKEY_PRIV_ENCODE[rip]
	xor	r12d, r12d
	call	ECerr@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, r14
	call	OPENSSL_free@PLT
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	eckey_priv_encode, .-eckey_priv_encode
	.comm	NID_X9_62_id_ecPublicKey,4,4
	.comm	ERR_R_MALLOC_FAILURE,4,4
	.comm	ERR_R_EC_LIB,4,4
	.comm	EC_R_DECODE_ERROR,4,4
	.comm	EC_PKEY_NO_PARAMETERS,4,4
	.comm	EC_F_ECKEY_PRIV_ENCODE,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_ec_ameth.c_eckey_priv_encode.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	eckey_priv_encode, %function
eckey_priv_encode:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r2, [r1]
	sub	sp, sp, #44
	ldr	ip, [r2]
	ldr	r3, .L16
	str	ip, [sp, #20]
	mov	r5, r0
	add	r2, sp, #20
	add	r1, sp, #32
	add	r0, sp, #28
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	eckey_param2type
	subs	r4, r0, #0
	beq	.L11
	add	r0, sp, #20
	bl	EC_KEY_get_enc_flags
	mov	r1, r0
	ldr	r3, .L16+4
	add	r0, sp, #20
	ldr	r3, [r3]
	orr	r1, r1, r3
	bl	EC_KEY_set_enc_flags
	mov	r1, #0
	add	r0, sp, #20
	bl	i2d_ECPrivateKey
	subs	r4, r0, #0
	beq	.L12
	bl	OPENSSL_malloc
	subs	r7, r0, #0
	beq	.L13
	add	r0, sp, #20
	add	r1, sp, #24
	str	r7, [sp, #24]
	bl	i2d_ECPrivateKey
	subs	r6, r0, #0
	beq	.L14
	ldr	r3, .L16+8
	ldr	r0, [r3]
	bl	OBJ_nid2obj
	ldr	r3, [sp, #32]
	mov	r1, r0
	str	r4, [sp, #8]
	str	r3, [sp]
	mov	r0, r5
	mov	r2, #0
	ldr	r3, [sp, #28]
	str	r7, [sp, #4]
	bl	PKCS8_pkey_set0
	subs	r4, r0, #0
	movne	r4, #1
	bne	.L1
	mov	r0, r7
	bl	OPENSSL_free
	b	.L1
.L12:
	ldr	r2, .L16+12
	ldr	r3, .L16+16
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ECerr
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L11:
	ldr	r2, .L16+20
	ldr	r3, .L16+16
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ECerr
	b	.L1
.L14:
	mov	r0, r7
	bl	OPENSSL_free
	ldr	r2, .L16+12
	ldr	r3, .L16+16
	ldr	r1, [r2]
	ldr	r0, [r3]
	mov	r4, r6
	bl	ECerr
	b	.L1
.L13:
	ldr	r2, .L16+24
	ldr	r3, .L16+16
	ldr	r1, [r2]
	ldr	r0, [r3]
	mov	r4, r7
	bl	ECerr
	b	.L1
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	EC_PKEY_NO_PARAMETERS
	.word	NID_X9_62_id_ecPublicKey
	.word	ERR_R_EC_LIB
	.word	EC_F_ECKEY_PRIV_ENCODE
	.word	EC_R_DECODE_ERROR
	.word	ERR_R_MALLOC_FAILURE
	.size	eckey_priv_encode, .-eckey_priv_encode
	.comm	NID_X9_62_id_ecPublicKey,4,4
	.comm	ERR_R_MALLOC_FAILURE,4,4
	.comm	ERR_R_EC_LIB,4,4
	.comm	EC_R_DECODE_ERROR,4,4
	.comm	EC_PKEY_NO_PARAMETERS,4,4
	.comm	EC_F_ECKEY_PRIV_ENCODE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
