	.file	"extr_ecp_oct.c_ec_GFp_simple_point2oct.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ec_GFp_simple_point2oct
	.type	ec_GFp_simple_point2oct, @function
ec_GFp_simple_point2oct:
.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
	mov	r14, r8
	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
	mov	r12, r9
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	cmp	DWORD PTR POINT_CONVERSION_COMPRESSED[rip], edx
	je	.L2
	cmp	DWORD PTR POINT_CONVERSION_UNCOMPRESSED[rip], edx
	je	.L2
	cmp	DWORD PTR POINT_CONVERSION_HYBRID[rip], edx
	jne	.L55
.L2:
	mov	rdi, r13
	mov	QWORD PTR [rsp], rsi
	call	EC_POINT_is_at_infinity@PLT
	mov	rsi, QWORD PTR [rsp]
	test	rax, rax
	je	.L4
	test	rbp, rbp
	je	.L33
	test	r14, r14
	je	.L56
	mov	BYTE PTR 0[rbp], 0
	mov	r15d, 1
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r15
	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
.L4:
	.cfi_restore_state
	mov	rdi, QWORD PTR 0[r13]
	mov	QWORD PTR [rsp], rsi
	call	BN_num_bytes@PLT
	cmp	DWORD PTR POINT_CONVERSION_COMPRESSED[rip], ebx
	mov	rsi, QWORD PTR [rsp]
	mov	QWORD PTR 8[rsp], rax
	lea	r15, 1[rax+rax]
	je	.L57
.L8:
	test	rbp, rbp
	je	.L9
	cmp	r15, r14
	ja	.L58
	xor	r14d, r14d
	test	r12, r12
	je	.L59
.L11:
	mov	rdi, r12
	mov	QWORD PTR 16[rsp], rsi
	call	BN_CTX_start@PLT
	mov	rdi, r12
	call	BN_CTX_get@PLT
	mov	rdi, r12
	mov	QWORD PTR [rsp], rax
	call	BN_CTX_get@PLT
	test	rax, rax
	je	.L21
	mov	rdx, QWORD PTR [rsp]
	mov	rsi, QWORD PTR 16[rsp]
	mov	r8, r12
	mov	rcx, rax
	mov	rdi, r13
	mov	QWORD PTR 24[rsp], rax
	call	EC_POINT_get_affine_coordinates@PLT
	test	eax, eax
	je	.L21
	cmp	DWORD PTR POINT_CONVERSION_COMPRESSED[rip], ebx
	mov	r9, QWORD PTR 24[rsp]
	mov	edx, ebx
	je	.L13
	cmp	DWORD PTR POINT_CONVERSION_HYBRID[rip], ebx
	je	.L13
.L15:
	mov	BYTE PTR 0[rbp], dl
	mov	rdi, QWORD PTR [rsp]
	mov	QWORD PTR 16[rsp], r9
	call	BN_num_bytes@PLT
	mov	rcx, QWORD PTR 8[rsp]
	sub	rcx, rax
	jb	.L53
	lea	rax, 1[rbp]
	test	rcx, rcx
	mov	r9, QWORD PTR 16[rsp]
	lea	rdx, [rax+rcx]
	je	.L60
	.p2align 4,,10
	.p2align 3
.L22:
	mov	BYTE PTR [rax], 0
	add	rax, 1
	cmp	rdx, rax
	jne	.L22
	add	rcx, 1
.L20:
	mov	rdi, QWORD PTR [rsp]
	lea	rsi, 0[rbp+rcx]
	mov	QWORD PTR 24[rsp], r9
	mov	QWORD PTR 16[rsp], rcx
	call	BN_bn2bin@PLT
	mov	rcx, QWORD PTR 16[rsp]
	mov	r9, QWORD PTR 24[rsp]
	add	rcx, rax
	mov	rax, QWORD PTR 8[rsp]
	add	rax, 1
	cmp	rax, rcx
	jne	.L53
	cmp	DWORD PTR POINT_CONVERSION_UNCOMPRESSED[rip], ebx
	je	.L24
	cmp	DWORD PTR POINT_CONVERSION_HYBRID[rip], ebx
	je	.L24
.L25:
	cmp	rcx, r15
	jne	.L53
	mov	rdi, r12
	mov	rbp, r14
	call	BN_CTX_end@PLT
.L9:
	mov	rdi, rbp
	call	BN_CTX_free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L55:
	mov	esi, DWORD PTR EC_R_INVALID_FORM[rip]
	mov	edi, DWORD PTR EC_F_EC_GFP_SIMPLE_POINT2OCT[rip]
	xor	r14d, r14d
	call	ECerr@PLT
.L3:
	mov	rdi, r14
	xor	r15d, r15d
	call	BN_CTX_free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L33:
	mov	r15d, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L57:
	lea	r15, 1[rax]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L56:
	mov	esi, DWORD PTR EC_R_BUFFER_TOO_SMALL[rip]
	mov	edi, DWORD PTR EC_F_EC_GFP_SIMPLE_POINT2OCT[rip]
	xor	r15d, r15d
	call	ECerr@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L53:
	mov	esi, DWORD PTR ERR_R_INTERNAL_ERROR[rip]
	mov	edi, DWORD PTR EC_F_EC_GFP_SIMPLE_POINT2OCT[rip]
	call	ECerr@PLT
.L21:
	mov	rdi, r12
	call	BN_CTX_end@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdi, r9
	mov	BYTE PTR 24[rsp], dl
	mov	QWORD PTR 16[rsp], r9
	call	BN_is_odd@PLT
	movzx	edx, BYTE PTR 24[rsp]
	mov	r9, QWORD PTR 16[rsp]
	mov	r8, rax
	lea	eax, 1[rbx]
	test	r8, r8
	cmovne	edx, eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L59:
	xor	eax, eax
	mov	QWORD PTR [rsp], rsi
	call	BN_CTX_new@PLT
	mov	r12, rax
	test	rax, rax
	je	.L35
	mov	rsi, QWORD PTR [rsp]
	mov	r14, rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L58:
	mov	esi, DWORD PTR EC_R_BUFFER_TOO_SMALL[rip]
	mov	edi, DWORD PTR EC_F_EC_GFP_SIMPLE_POINT2OCT[rip]
	xor	r14d, r14d
	call	ECerr@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, r9
	mov	QWORD PTR 16[rsp], rcx
	mov	QWORD PTR [rsp], r9
	call	BN_num_bytes@PLT
	mov	r13, QWORD PTR 8[rsp]
	sub	r13, rax
	jb	.L53
	mov	rcx, QWORD PTR 16[rsp]
	test	r13, r13
	mov	r9, QWORD PTR [rsp]
	lea	rax, 0[rbp+rcx]
	lea	rdx, 0[r13+rax]
	je	.L30
	.p2align 4,,10
	.p2align 3
.L31:
	mov	BYTE PTR [rax], 0
	add	rax, 1
	cmp	rdx, rax
	jne	.L31
	add	rcx, r13
.L30:
	lea	rsi, 0[rbp+rcx]
	mov	rdi, r9
	mov	QWORD PTR [rsp], rcx
	call	BN_bn2bin@PLT
	mov	rcx, QWORD PTR [rsp]
	add	rcx, rax
	jmp	.L25
.L35:
	xor	r15d, r15d
	jmp	.L1
.L60:
	mov	ecx, 1
	jmp	.L20
	.cfi_endproc
.LFE0:
	.size	ec_GFp_simple_point2oct, .-ec_GFp_simple_point2oct
	.comm	POINT_CONVERSION_UNCOMPRESSED,4,4
	.comm	POINT_CONVERSION_HYBRID,4,4
	.comm	POINT_CONVERSION_COMPRESSED,4,4
	.comm	ERR_R_INTERNAL_ERROR,4,4
	.comm	EC_R_INVALID_FORM,4,4
	.comm	EC_R_BUFFER_TOO_SMALL,4,4
	.comm	EC_F_EC_GFP_SIMPLE_POINT2OCT,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_ecp_oct.c_ec_GFp_simple_point2oct.c"
	.text
	.align	2
	.global	ec_GFp_simple_point2oct
	.syntax unified
	.arm
	.fpu softvfp
	.type	ec_GFp_simple_point2oct, %function
ec_GFp_simple_point2oct:
	@ args = 8, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r7, .L58
	mov	r9, r0
	ldr	r0, [r7]
	mov	r4, r2
	cmp	r0, r2
	mov	r8, r1
	mov	r5, r3
	sub	sp, sp, #20
	beq	.L2
	ldr	r3, .L58+4
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L2
	ldr	r3, .L58+8
	ldr	r3, [r3]
	cmp	r3, r2
	ldrne	r2, .L58+12
	bne	.L53
.L2:
	mov	r1, r8
	mov	r0, r9
	bl	EC_POINT_is_at_infinity
	cmp	r0, #0
	beq	.L4
	cmp	r5, #0
	moveq	r6, #1
	beq	.L1
	ldr	r3, [sp, #56]
	cmp	r3, #0
	movne	r3, #0
	movne	r6, #1
	strbne	r3, [r5]
	beq	.L55
.L1:
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L56:
	ldr	r2, .L58+16
.L53:
	ldr	r3, .L58+20
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ECerr
	mov	r10, #0
.L3:
	mov	r6, #0
	mov	r0, r10
	bl	BN_CTX_free
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r0, [r9]
	bl	BN_num_bytes
	ldr	r3, [r7]
	str	r0, [sp, #8]
	cmp	r3, r4
	moveq	r3, r0
	ldrne	r3, [sp, #8]
	addeq	r6, r3, #1
	lslne	r6, r3, #1
	addne	r6, r6, #1
	cmp	r5, #0
	beq	.L9
	ldr	r3, [sp, #56]
	cmp	r6, r3
	bhi	.L56
	ldr	r3, [sp, #60]
	cmp	r3, #0
	movne	r10, #0
	beq	.L57
.L11:
	ldr	r0, [sp, #60]
	bl	BN_CTX_start
	ldr	r0, [sp, #60]
	bl	BN_CTX_get
	mov	fp, r0
	ldr	r0, [sp, #60]
	bl	BN_CTX_get
	subs	r3, r0, #0
	str	r3, [sp, #12]
	beq	.L21
	ldr	r2, [sp, #60]
	mov	r1, r8
	str	r2, [sp]
	mov	r0, r9
	mov	r2, fp
	bl	EC_POINT_get_affine_coordinates
	cmp	r0, #0
	beq	.L21
	ldr	r3, [r7]
	and	r7, r4, #255
	cmp	r3, r4
	beq	.L13
	ldr	r3, .L58+8
	ldr	r3, [r3]
	cmp	r3, r4
	beq	.L13
.L15:
	mov	r0, fp
	strb	r7, [r5]
	bl	BN_num_bytes
	ldr	r3, [sp, #8]
	subs	r0, r3, r0
	bcc	.L52
	cmp	r0, #0
	moveq	r7, #1
	beq	.L20
	mov	r3, r5
	mov	r1, #0
	add	r2, r5, r0
.L22:
	strb	r1, [r3, #1]!
	cmp	r2, r3
	bne	.L22
	add	r7, r0, #1
.L20:
	add	r1, r5, r7
	mov	r0, fp
	bl	BN_bn2bin
	ldr	r3, [sp, #8]
	add	r7, r0, r7
	add	r3, r3, #1
	cmp	r3, r7
	bne	.L52
	ldr	r3, .L58+4
	ldr	r3, [r3]
	cmp	r3, r4
	beq	.L24
	ldr	r3, .L58+8
	ldr	r3, [r3]
	cmp	r3, r4
	beq	.L24
.L25:
	cmp	r7, r6
	bne	.L52
	ldr	r0, [sp, #60]
	mov	r5, r10
	bl	BN_CTX_end
.L9:
	mov	r0, r5
	bl	BN_CTX_free
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L55:
	ldr	r2, .L58+16
	ldr	r3, .L58+20
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ECerr
	ldr	r6, [sp, #56]
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L52:
	ldr	r2, .L58+24
	ldr	r3, .L58+20
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ECerr
.L21:
	ldr	r0, [sp, #60]
	bl	BN_CTX_end
	b	.L3
.L13:
	ldr	r0, [sp, #12]
	bl	BN_is_odd
	cmp	r0, #0
	addne	r7, r7, #1
	andne	r7, r7, #255
	b	.L15
.L57:
	bl	BN_CTX_new
	subs	r3, r0, #0
	movne	r10, r3
	str	r3, [sp, #60]
	bne	.L11
	ldr	r6, [sp, #60]
	b	.L1
.L24:
	ldr	r0, [sp, #12]
	bl	BN_num_bytes
	ldr	r3, [sp, #8]
	subs	r8, r3, r0
	bcc	.L52
	cmp	r8, #0
	addne	r3, r5, r7
	movne	r1, #0
	addne	r2, r8, r3
	beq	.L30
.L31:
	strb	r1, [r3], #1
	cmp	r2, r3
	bne	.L31
	add	r7, r7, r8
.L30:
	add	r1, r5, r7
	ldr	r0, [sp, #12]
	bl	BN_bn2bin
	add	r7, r7, r0
	b	.L25
.L59:
	.align	2
.L58:
	.word	POINT_CONVERSION_COMPRESSED
	.word	POINT_CONVERSION_UNCOMPRESSED
	.word	POINT_CONVERSION_HYBRID
	.word	EC_R_INVALID_FORM
	.word	EC_R_BUFFER_TOO_SMALL
	.word	EC_F_EC_GFP_SIMPLE_POINT2OCT
	.word	ERR_R_INTERNAL_ERROR
	.size	ec_GFp_simple_point2oct, .-ec_GFp_simple_point2oct
	.comm	POINT_CONVERSION_UNCOMPRESSED,4,4
	.comm	POINT_CONVERSION_HYBRID,4,4
	.comm	POINT_CONVERSION_COMPRESSED,4,4
	.comm	ERR_R_INTERNAL_ERROR,4,4
	.comm	EC_R_INVALID_FORM,4,4
	.comm	EC_R_BUFFER_TOO_SMALL,4,4
	.comm	EC_F_EC_GFP_SIMPLE_POINT2OCT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
