// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/LINEAR.c
// Function: linear
void   linear(MAT H, int idim,int jdim, int imax, int jmax, int nsol,
	      int ivet[],int *irank, real *arm, int vpr[])

{
	static real eps=0.,toll=5;
	real rm,rmin;
	int i,j,k, im,jm, jmax1,j2max;

	if (eps == 0.)
		eps=toll*zerom();

	/* submatrix area where the pivoting step is performed */
	*irank=0;
	for(j=0;j<jmax;j++)
		ivet[j]=j;
	j2max=jmax+nsol;
	jmax1=jmax;
	for(i=0;vpr[i]!=-1;i++)
	{
		swabc(H,idim,jdim,imax,jmax1-1,vpr[i],ivet);
		jmax1=jmax1-1;
	}
	k=min(imax,jmax);
	for(i=0;i<k;i++)
	{
		rm=rmax(H,idim,jdim,i,imax,i,jmax1,&im,&jm);
		*arm=aabs(rm);
		if (i==0)
			rmin=eps*(*arm)*imax;
		if (rm == 0. || *arm < rmin)
			return;
		*irank=i+1;
		swabr(H,idim,jdim,j2max,i,im);
		swabc(H,idim,jdim,imax,i,jm,ivet);
		elimin(H,idim,jdim,imax,j2max,i);
		normalr(H,idim,jdim,j2max,i,rm);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r9d, 0x1c(%rsp)
movl %r8d, %r14d
movl %ecx, %r12d
movl %edx, %r15d
movl %esi, 0x24(%rsp)
movq %rdi, %r13
movsd 0xb5f5(%rip), %xmm1     # 0xe278
xorpd %xmm0, %xmm0
movsd %xmm1, 0x38(%rsp)
ucomisd %xmm0, %xmm1
jne 0x2cb0
jp 0x2cb0
callq 0x23a0
mulsd 0x736e(%rip), %xmm0     # 0xa010
movsd %xmm0, 0x38(%rsp)
movsd %xmm0, 0xb5c8(%rip)     # 0xe278
movq 0xb8(%rsp), %rbx
movq 0xa0(%rsp), %rbp
movq 0xa8(%rsp), %rax
andl $0x0, (%rax)
xorl %eax, %eax
testl %r14d, %r14d
movl $0x0, %ecx
cmovgl %r14d, %ecx
cmpq %rax, %rcx
je 0x2ce7
movl %eax, (%rbp,%rax,4)
incq %rax
jmp 0x2cd9
movl %r14d, 0x18(%rsp)
movl (%rbx), %r9d
cmpl $-0x1, %r9d
je 0x2d1a
movl 0x18(%rsp), %r8d
decl %r8d
movq %rbp, (%rsp)
movq %r13, %rdi
movl %r15d, %edx
movl %r12d, %ecx
movl %r8d, 0x18(%rsp)
callq 0x23c0
addq $0x4, %rbx
jmp 0x2cec
addl %r14d, 0x1c(%rsp)
cmpl %r14d, %r12d
cmovll %r12d, %r14d
movl %r12d, 0x20(%rsp)
cvtsi2sd %r12d, %xmm0
movsd %xmm0, 0x40(%rsp)
xorl %ebx, %ebx
testl %r14d, %r14d
cmovlel %ebx, %r14d
movl 0x1c(%rsp), %r12d
subl $0x1, %r14d
jb 0x2e75
leaq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x34(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x18(%rsp), %eax
movl %eax, (%rsp)
movq %r13, %rdi
movl 0x24(%rsp), %esi
movl %r15d, %edx
movl %ebx, %ecx
movl 0x20(%rsp), %r8d
movl %ebx, %r9d
callq 0x2390
movapd %xmm0, %xmm1
xorpd 0x7272(%rip), %xmm1     # 0xa000
movapd %xmm0, %xmm3
maxsd %xmm1, %xmm3
movq 0xb0(%rsp), %rax
movsd %xmm3, (%rax)
testl %ebx, %ebx
jne 0x2dbc
movsd 0x38(%rsp), %xmm2
mulsd %xmm3, %xmm2
mulsd 0x40(%rsp), %xmm2
movsd %xmm2, 0x48(%rsp)
ucomisd %xmm1, %xmm0
jne 0x2dc8
jnp 0x2e75
movsd 0x48(%rsp), %xmm1
ucomisd %xmm3, %xmm1
ja 0x2e75
movl %r14d, 0x2c(%rsp)
leal 0x1(%rbx), %ecx
movl %ecx, 0x28(%rsp)
movq 0xa8(%rsp), %rax
movl %ecx, (%rax)
movl 0x34(%rsp), %r9d
movq %r13, %rdi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebx, %r8d
movapd %xmm0, 0x50(%rsp)
callq 0x21a0
movl 0x30(%rsp), %r9d
movq %rbp, (%rsp)
movq %r13, %rdi
movl %r15d, %edx
movq %rbp, %r14
movq %r13, %rbp
movl %r15d, %r13d
movl 0x20(%rsp), %r15d
movl %r15d, %ecx
movl %ebx, %r8d
callq 0x23c0
movq %rbp, %rdi
movl %r13d, %edx
movl %r15d, %ecx
movl %r13d, %r15d
movq %rbp, %r13
movq %r14, %rbp
movl %r12d, %r8d
movl %ebx, %r9d
callq 0x2280
movq %r13, %rdi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebx, %r8d
movaps 0x50(%rsp), %xmm0
callq 0x2360
movl 0x28(%rsp), %eax
movl %eax, %ebx
movl 0x2c(%rsp), %r14d
jmp 0x2d44
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq