	.file	"extr_ecc.c_vli_mmod_special2.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vli_mmod_special2, @function
vli_mmod_special2:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12d, ecx
	push	rbx
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 88
	mov	QWORD PTR -104[rbp], rdx
	mov	QWORD PTR -120[rbp], rdi
	mov	rsi, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdx]
	add	eax, eax
	mov	DWORD PTR -92[rbp], eax
	movsx	rax, DWORD PTR ECC_MAX_DIGITS[rip]
	mov	rdx, rax
	lea	rax, 15[0+rax*4]
	mov	rcx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rcx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L46:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L46
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L47
.L4:
	add	edx, edx
	mov	rdi, rsp
	mov	r13, rsp
	movsx	rdx, edx
	lea	rax, 15[0+rdx*4]
	mov	rcx, rax
	mov	rdx, rax
	and	rcx, -4096
	and	rdx, -16
	sub	rdi, rcx
	mov	rcx, rdi
	cmp	rsp, rcx
	je	.L6
.L48:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rcx
	jne	.L48
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L49
.L7:
	mov	rdx, rax
	mov	rcx, rsp
	and	rax, -4096
	mov	r15, rsp
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L9
.L50:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L50
.L9:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L10
	or	QWORD PTR -8[rsp+rdx], 0
.L10:
	mov	rsi, QWORD PTR -104[rbp]
	mov	rdi, rsp
	mov	edx, r12d
	mov	QWORD PTR -112[rbp], rdi
	call	vli_set@PLT
	mov	rdi, QWORD PTR -112[rbp]
	mov	eax, r12d
	mov	esi, r12d
	lea	r14, 0[0+rax*4]
	add	rdi, r14
	mov	QWORD PTR -88[rbp], r14
	call	vli_clear@PLT
	mov	rsi, rbx
	mov	edx, r12d
	mov	rdi, r15
	call	vli_set@PLT
	lea	rsi, [rbx+r14]
	mov	edx, r12d
	mov	rdi, r13
	call	vli_set@PLT
	lea	rdi, [r15+r14]
	mov	esi, r12d
	lea	ebx, [r12+r12]
	call	vli_clear@PLT
	mov	esi, r12d
	mov	rdi, r15
	call	vli_is_negative@PLT
	mov	DWORD PTR -68[rbp], 1
	mov	r9d, eax
	mov	DWORD PTR -72[rbp], ebx
	test	r9d, r9d
	jne	.L14
	.p2align 4,,10
	.p2align 3
.L53:
	mov	esi, r12d
	mov	rdi, r13
	call	vli_is_zero@PLT
	test	eax, eax
	jne	.L51
	mov	eax, DWORD PTR ECC_MAX_DIGITS[rip]
	mov	rcx, rsp
	mov	rbx, rsp
	add	eax, eax
	cdqe
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L25
.L52:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L52
.L25:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L26
	or	QWORD PTR -8[rsp+rdx], 0
.L26:
	mov	r14, rsp
	mov	edx, DWORD PTR -92[rbp]
	mov	ecx, r12d
	mov	rsi, r13
	mov	rdi, r14
	call	vli_umult@PLT
.L23:
	mov	rax, QWORD PTR -88[rbp]
	mov	edx, r12d
	mov	rdi, r13
	lea	r9, [r14+rax]
	mov	rsi, r9
	mov	QWORD PTR -80[rbp], r9
	call	vli_set@PLT
	mov	r9, QWORD PTR -80[rbp]
	mov	esi, r12d
	mov	rdi, r9
	call	vli_clear@PLT
	mov	esi, r12d
	mov	rdi, r14
	call	vli_is_negative@PLT
	test	BYTE PTR -68[rbp], 1
	mov	ecx, DWORD PTR -72[rbp]
	mov	rdx, r14
	mov	DWORD PTR -80[rbp], eax
	mov	rsi, r15
	mov	rdi, r15
	je	.L12
	call	vli_sub@PLT
	mov	r9d, DWORD PTR -80[rbp]
.L13:
	mov	rsp, rbx
	add	DWORD PTR -68[rbp], 1
	test	r9d, r9d
	je	.L53
.L14:
	mov	eax, DWORD PTR ECC_MAX_DIGITS[rip]
	mov	rcx, rsp
	mov	rbx, rsp
	add	eax, eax
	cdqe
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L21
.L54:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L54
.L21:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L22
	or	QWORD PTR -8[rsp+rdx], 0
.L22:
	mov	r14, rsp
	mov	edx, DWORD PTR -92[rbp]
	mov	ecx, r12d
	mov	rsi, r13
	mov	rdi, r14
	call	vli_umult@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	ecx, DWORD PTR -72[rbp]
	mov	rsi, r14
	mov	rdi, r14
	mov	edx, DWORD PTR [rax]
	call	vli_uadd@PLT
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L47:
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
.L49:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	call	vli_add@PLT
	mov	r9d, DWORD PTR -80[rbp]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L51:
	mov	ebx, DWORD PTR -72[rbp]
	mov	r13, QWORD PTR -112[rbp]
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	mov	ecx, ebx
	mov	rdx, r13
	mov	rsi, r15
	mov	rdi, r15
	call	vli_add@PLT
.L16:
	mov	esi, ebx
	mov	rdi, r15
	call	vli_is_negative@PLT
	test	eax, eax
	jne	.L17
	mov	r13, QWORD PTR -112[rbp]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L19:
	mov	ecx, ebx
	mov	rdx, r13
	mov	rsi, r15
	mov	rdi, r15
	call	vli_sub@PLT
.L18:
	mov	edx, ebx
	mov	rsi, r13
	mov	rdi, r15
	call	vli_cmp@PLT
	test	rax, rax
	jns	.L19
	mov	rdi, QWORD PTR -120[rbp]
	mov	edx, r12d
	mov	rsi, r15
	call	vli_set@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L55
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L55:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vli_mmod_special2, .-vli_mmod_special2
	.comm	ECC_MAX_DIGITS,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_ecc.c_vli_mmod_special2.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vli_mmod_special2, %function
vli_mmod_special2:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #36
	mov	lr, r2
	str	r2, [fp, #-60]
	ldr	r2, .L19
	mov	r5, r3
	ldr	r2, [r2]
	mov	ip, r0
	lsl	r3, r2, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r9, sp
	sub	r3, r9, r2, lsl #3
	mov	sp, r3
	sub	r3, r3, r2, lsl #3
	mov	r4, sp
	mov	sp, r3
	mov	r10, sp
	ldr	r3, [lr]
	str	ip, [fp, #-64]
	ldr	ip, .L19+4
	lsl	r3, r3, #1
	mov	r6, r1
	mov	r2, r5
	mov	r1, lr
	mov	r0, r10
	ldr	ip, [ip]
	str	ip, [fp, #-40]
	mov	ip,#0
	str	r3, [fp, #-56]
	bl	vli_set
	mov	r1, r5
	add	r0, r10, r5, lsl #2
	bl	vli_clear
	lsl	r3, r5, #2
	mov	r7, r3
	mov	r2, r5
	mov	r1, r6
	mov	r0, r4
	str	r3, [fp, #-52]
	bl	vli_set
	mov	r2, r5
	add	r1, r6, r7
	mov	r0, r9
	bl	vli_set
	mov	r1, r5
	add	r0, r4, r7
	bl	vli_clear
	mov	r1, r5
	mov	r0, r4
	bl	vli_is_negative
	mov	r3, #1
	lsl	r8, r5, #1
	str	r8, [fp, #-48]
	mov	r7, r0
	mov	r8, r3
	str	r10, [fp, #-68]
	b	.L2
.L17:
	bl	vli_sub
.L4:
	mov	sp, r10
	add	r8, r8, #1
.L2:
	cmp	r7, #0
	bne	.L5
	mov	r1, r5
	mov	r0, r9
	bl	vli_is_zero
	cmp	r0, #0
	bne	.L16
	mov	r10, sp
	ldr	r3, .L19
	mov	r1, r9
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	sub	r3, r10, r3, lsl #3
	mov	sp, r3
	mov	r6, sp
	mov	r3, r5
	mov	r0, r6
	bl	vli_umult
.L11:
	ldr	r3, [fp, #-52]
	mov	r2, r5
	add	r7, r6, r3
	mov	r1, r7
	mov	r0, r9
	bl	vli_set
	mov	r1, r5
	mov	r0, r7
	bl	vli_clear
	mov	r1, r5
	mov	r0, r6
	bl	vli_is_negative
	tst	r8, #1
	mov	r7, r0
	mov	r2, r6
	mov	r1, r4
	mov	r0, r4
	ldr	r3, [fp, #-48]
	bne	.L17
	bl	vli_add
	b	.L4
.L5:
	mov	r10, sp
	ldr	r3, .L19
	mov	r1, r9
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	sub	r3, r10, r3, lsl #3
	mov	sp, r3
	mov	r6, sp
	mov	r3, r5
	mov	r0, r6
	bl	vli_umult
	ldr	r2, [fp, #-60]
	mov	r1, r6
	mov	r0, r6
	ldr	r3, [fp, #-48]
	ldr	r2, [r2]
	bl	vli_uadd
	b	.L11
.L16:
	ldr	r8, [fp, #-48]
	ldr	r10, [fp, #-68]
	b	.L7
.L8:
	mov	r3, r8
	mov	r2, r10
	mov	r1, r4
	mov	r0, r4
	bl	vli_add
.L7:
	mov	r1, r8
	mov	r0, r4
	bl	vli_is_negative
	cmp	r0, #0
	bne	.L8
	b	.L9
.L10:
	mov	r3, r8
	mov	r2, r10
	mov	r1, r4
	mov	r0, r4
	bl	vli_sub
.L9:
	mov	r2, r8
	mov	r1, r10
	mov	r0, r4
	bl	vli_cmp
	cmp	r0, #0
	bge	.L10
	mov	r2, r5
	mov	r1, r4
	ldr	r0, [fp, #-64]
	bl	vli_set
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	ECC_MAX_DIGITS
	.word	.LC0
	.size	vli_mmod_special2, .-vli_mmod_special2
	.comm	ECC_MAX_DIGITS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
