// File: /workspace/github_c_makefile_star2_O3/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 $0x78, %rsp
movl %r9d, %ebp
movl %r8d, %r13d
movl %ecx, %ebx
movl %edx, 0x4(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdi, 0x8(%rsp)
movsd 0xb256(%rip), %xmm1     # 0xe250
xorpd %xmm0, %xmm0
movsd %xmm1, 0x28(%rsp)
ucomisd %xmm0, %xmm1
jne 0x3027
jp 0x3027
callq 0x2360
mulsd 0x7047(%rip), %xmm0     # 0xa060
movsd %xmm0, 0x28(%rsp)
movsd %xmm0, 0xb229(%rip)     # 0xe250
movq 0xc8(%rsp), %rax
movq 0xb0(%rsp), %r10
movq 0xb8(%rsp), %rcx
movl $0x0, (%rcx)
testl %r13d, %r13d
jle 0x30e1
movl %r13d, %edx
leal 0x1(%r13), %ecx
andl $-0x2, %ecx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x6fc3(%rip), %xmm1     # 0xa030
xorl %edx, %edx
movdqa 0x6fc9(%rip), %xmm2     # 0xa040
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x6fc9(%rip), %xmm4     # 0xa050
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0x30bd
movl %edx, (%r10,%rdx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x30d4
leal 0x1(%rdx), %esi
movl %esi, 0x4(%r10,%rdx,4)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0x3087
movl (%rax), %edi
movslq 0x4(%rsp), %r14
movl %ebx, %r11d
movl %r13d, %r15d
cmpl $-0x1, %edi
je 0x315f
movslq %r13d, %r15
leaq (,%r14,8), %rcx
leaq -0x8(,%r15,8), %rdx
xorl %esi, %esi
decq %r15
cmpl %r15d, %edi
je 0x314f
movslq %edi, %rdi
testl %ebx, %ebx
jle 0x313f
movq 0x8(%rsp), %r8
movq %r11, %r9
movsd (%r8,%rdx), %xmm0
movsd (%r8,%rdi,8), %xmm1
movsd %xmm1, (%r8,%rdx)
movsd %xmm0, (%r8,%rdi,8)
addq %rcx, %r8
decq %r9
jne 0x311f
movl (%r10,%r15,4), %r8d
movl (%r10,%rdi,4), %r9d
movl %r9d, (%r10,%r15,4)
movl %r8d, (%r10,%rdi,4)
movl 0x4(%rax,%rsi,4), %edi
incq %rsi
addq $-0x8, %rdx
cmpl $-0x1, %edi
jne 0x3108
movq %r15, 0x48(%rsp)
movq %r11, 0x38(%rsp)
cmpl %r13d, %ebx
movl %r13d, %eax
cmovll %ebx, %eax
testl %eax, %eax
jle 0x3338
addl %r13d, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, 0x30(%rsp)
movl %ebp, 0x14(%rsp)
movl %ebp, %ebp
movl %eax, %eax
movq %rax, 0x40(%rsp)
shlq $0x3, %r14
xorl %r12d, %r12d
movq 0x8(%rsp), %r15
xorl %r13d, %r13d
movl %ebx, 0x18(%rsp)
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0xc(%rsp), %edx
movl %r13d, %ecx
movl %ebx, %r8d
movl %r13d, %r9d
leaq 0x28(%rsp), %rax
pushq %rax
leaq 0x34(%rsp), %rax
pushq %rax
pushq 0x60(%rsp)
callq 0x2350
addq $0x20, %rsp
movapd %xmm0, %xmm1
xorpd 0x6e37(%rip), %xmm1     # 0xa020
movapd %xmm0, %xmm3
maxsd %xmm1, %xmm3
movq 0xc0(%rsp), %rax
movsd %xmm3, (%rax)
testq %r13, %r13
jne 0x3218
movsd 0x28(%rsp), %xmm2
mulsd %xmm3, %xmm2
mulsd 0x30(%rsp), %xmm2
movsd %xmm2, 0x50(%rsp)
ucomisd %xmm1, %xmm0
jne 0x3224
jnp 0x3338
movsd 0x50(%rsp), %xmm1
ucomisd %xmm3, %xmm1
ja 0x3338
cmpl $0x0, 0x14(%rsp)
setle %cl
leaq 0x1(%r13), %rdx
movq 0xb8(%rsp), %rax
movq %rdx, 0x58(%rsp)
movl %edx, (%rax)
movl 0x24(%rsp), %eax
cmpq %rax, %r13
sete %dl
orb %cl, %dl
jne 0x328d
imull 0x4(%rsp), %eax
cltq
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
xorl %ecx, %ecx
movsd (%r15,%rcx,8), %xmm2
movsd (%rax,%rcx,8), %xmm1
movsd %xmm1, (%r15,%rcx,8)
movsd %xmm2, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %rbp
jne 0x326f
movapd %xmm0, 0x60(%rsp)
movl 0x20(%rsp), %eax
cmpq %rax, %r13
je 0x32dc
cltq
movq 0x8(%rsp), %rcx
movq 0x38(%rsp), %rdx
movsd (%rcx,%r12), %xmm0
movsd (%rcx,%rax,8), %xmm1
movsd %xmm1, (%rcx,%r12)
movsd %xmm0, (%rcx,%rax,8)
addq %r14, %rcx
decq %rdx
jne 0x32a8
movq 0xb0(%rsp), %rsi
movl (%rsi,%r13,4), %ecx
movl (%rsi,%rax,4), %edx
movl %edx, (%rsi,%r13,4)
movl %ecx, (%rsi,%rax,4)
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %edx
movl %ebx, %ecx
movl 0x14(%rsp), %ebx
movl %ebx, %r8d
movl %r13d, %r9d
callq 0x2270
testl %ebx, %ebx
movapd 0x60(%rsp), %xmm1
jle 0x331a
xorl %eax, %eax
movsd (%r15,%rax,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%r15,%rax,8)
incq %rax
cmpq %rax, %rbp
jne 0x3302
addq %r14, %r15
addq $0x8, %r12
movq 0x58(%rsp), %rax
movq %rax, %r13
cmpq 0x40(%rsp), %rax
movl 0x18(%rsp), %ebx
jne 0x31aa
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq