// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movsd 0xefd8(%rip), %xmm0     # 0x12260
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x32b9
jp 0x32b9
movsd 0xef9d(%rip), %xmm0     # 0x12238
movsd %xmm0, -0x58(%rbp)
callq 0x2370
movaps %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0xefa7(%rip)     # 0x12260
movq 0x18(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x32eb
movl -0x38(%rbp), %edx
movq 0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x32ca
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x48(%rbp)
movl $0x0, -0x34(%rbp)
movq 0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
je 0x3351
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x48(%rbp), %r8d
subl $0x1, %r8d
movq 0x28(%rbp), %rax
movslq -0x34(%rbp), %r9
movl (%rax,%r9,4), %r9d
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x2390
movl -0x48(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3301
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x3361
movl -0x14(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0x3367
movl -0x18(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x34da
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x34(%rbp), %ecx
movl -0x14(%rbp), %r8d
movl -0x34(%rbp), %r9d
movl -0x48(%rbp), %r11d
leaq -0x40(%rbp), %r10
leaq -0x44(%rbp), %rax
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x2360
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x33d3
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0x33f4
movsd -0x28(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
movq 0x20(%rbp), %rax
movsd %xmm0, (%rax)
cmpl $0x0, -0x34(%rbp)
jne 0x3425
movsd 0xee51(%rip), %xmm0     # 0x12260
movq 0x20(%rbp), %rax
mulsd (%rax), %xmm0
cvtsi2sdl -0x14(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3437
jp 0x3437
jmp 0x344a
movq 0x20(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x344f
jmp 0x34da
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movq 0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x4c(%rbp), %ecx
movl -0x34(%rbp), %r8d
movl -0x40(%rbp), %r9d
callq 0x2170
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x34(%rbp), %r8d
movl -0x44(%rbp), %r9d
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x2390
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x4c(%rbp), %r8d
movl -0x34(%rbp), %r9d
callq 0x2250
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x4c(%rbp), %ecx
movl -0x34(%rbp), %r8d
movsd -0x28(%rbp), %xmm0
callq 0x2330
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3374
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)