// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../tools/evolver_ndf15.c
// Function: ludcmp
int ludcmp(double **a, int n, int *indx, double *d, double *vv){
  int i,imax=0,j,k;
  double big,dum,sum,temp;
  *d=1.0;
  for (i=1;i<=n;i++) {
    big=0.0;
    for (j=1;j<=n;j++) if ((temp=fabs(a[i][j])) > big) big=temp;
    if (big == 0.0) return _FAILURE_;
    vv[i]=1.0/big;
  }
  for (j=1;j<=n;j++) {
    for (i=1;i<j;i++) {
      sum=a[i][j];
      for (k=1;k<i;k++) sum -= a[i][k]*a[k][j];
      a[i][j]=sum;
    }
    big=0.0;
    for (i=j;i<=n;i++) {
      sum=a[i][j];
      for (k=1;k<j;k++) sum -= a[i][k]*a[k][j];
      a[i][j]=sum;
      if ( (dum=vv[i]*fabs(sum)) >= big) {
    big=dum;
    imax=i;
      }
    }
    if (j != imax) {
      for (k=1;k<=n;k++) {
    dum=a[imax][k];
    a[imax][k]=a[j][k];
    a[j][k]=dum;
      }
      *d = -(*d);
      vv[imax]=vv[j];
    }
    indx[j]=imax;
    if (a[j][j] == 0.0) a[j][j]=TINY;
    if (j != n) {
      dum=1.0/(a[j][j]);
      for (i=j+1;i<=n;i++) a[i][j] *= dum;
    }
  }
  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, -0x8(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%rcx)
xorl %r9d, %r9d
testl %esi, %esi
cmovgl %esi, %r9d
leal 0x1(%rsi), %r10d
incl %r9d
movabsq $0x1, %r11
movl $0x1, %eax
xorpd %xmm2, %xmm2
movsd 0xd4f68(%rip), %xmm0    # 0xe5260
movapd 0xd4f40(%rip), %xmm1    # 0xe5240
movq %r11, %rbx
cmpq %r9, %rbx
je 0x1034e
xorpd %xmm3, %xmm3
movq %r11, %rdx
cmpq %rdx, %r10
je 0x1032f
movq (%rdi,%rbx,8), %r14
movsd (%r14,%rdx,8), %xmm4
andpd %xmm1, %xmm4
maxsd %xmm3, %xmm4
incq %rdx
movapd %xmm4, %xmm3
jmp 0x1030f
ucomisd %xmm2, %xmm3
jne 0x1033b
jnp 0x10501
movapd %xmm0, %xmm4
divsd %xmm3, %xmm4
movsd %xmm4, (%r8,%rbx,8)
incq %rbx
jmp 0x10303
movslq %esi, %r11
movl %esi, %edx
movabsq $0x1, %r12
xorpd %xmm2, %xmm2
movsd 0xd599f(%rip), %xmm3    # 0xe5d08
movapd 0xd4ebf(%rip), %xmm4    # 0xe5230
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpq %r9, %r12
je 0x104ff
xorl %r13d, %r13d
movabsq $0x1, %rbx
cmpq %r12, %rbx
je 0x103ce
movq (%rdi,%rbx,8), %rax
movsd (%rax,%r12,8), %xmm5
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x103bf
movsd 0x8(%rax,%r14), %xmm6
movq 0x8(%rdi,%r14), %rsi
mulsd (%rsi,%r12,8), %xmm6
subsd %xmm6, %xmm5
addq $0x8, %r14
jmp 0x1039e
movsd %xmm5, (%rax,%r12,8)
incq %rbx
addq $0x8, %r13
jmp 0x1038c
xorpd %xmm5, %xmm5
movq %r12, %r13
cmpq %r10, %r13
je 0x10443
movq (%rdi,%r13,8), %rax
movsd (%rax,%r12,8), %xmm6
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x10406
movsd 0x8(%rax,%rbx), %xmm7
movq 0x8(%rdi,%rbx), %rsi
mulsd (%rsi,%r12,8), %xmm7
subsd %xmm7, %xmm6
addq $0x8, %rbx
jmp 0x103e6
movsd %xmm6, (%rax,%r12,8)
andpd %xmm1, %xmm6
mulsd (%r8,%r13,8), %xmm6
ucomisd %xmm5, %xmm6
cmovael %r13d, %ebp
movapd %xmm5, %xmm7
cmpnlesd %xmm6, %xmm7
movapd %xmm7, %xmm8
andnpd %xmm6, %xmm8
andpd %xmm5, %xmm7
orpd %xmm8, %xmm7
incq %r13
movapd %xmm7, %xmm5
jmp 0x103d5
movl %ebp, %eax
cmpq %rax, %r12
je 0x10497
movslq %ebp, %rax
movabsq $0x1, %rbx
cmpq %rbx, %r10
je 0x1047f
movq (%rdi,%rax,8), %rsi
movsd (%rsi,%rbx,8), %xmm5
movq (%rdi,%r12,8), %r14
movsd (%r14,%rbx,8), %xmm6
movsd %xmm6, (%rsi,%rbx,8)
movsd %xmm5, (%r14,%rbx,8)
incq %rbx
jmp 0x10457
movsd (%rcx), %xmm5
xorpd %xmm4, %xmm5
movlpd %xmm5, (%rcx)
movsd (%r8,%r12,8), %xmm5
movsd %xmm5, (%r8,%rax,8)
movq -0x8(%rsp), %rax
movl %ebp, (%rax,%r12,4)
movq (%rdi,%r12,8), %rax
movsd (%rax,%r12,8), %xmm6
ucomisd %xmm2, %xmm6
jne 0x104c4
jp 0x104c4
movabsq $0x358dee7a4ad4b81f, %rsi # imm = 0x358DEE7A4AD4B81F
movq %rsi, (%rax,%r12,8)
movapd %xmm3, %xmm6
cmpq %rdx, %r12
jne 0x104d5
incq %r12
addq $0x8, %r15
jmp 0x10376
movapd %xmm0, %xmm5
divsd %xmm6, %xmm5
movq %r12, %rax
cmpq %r11, %rax
jge 0x104c9
movq 0x8(%rdi,%rax,8), %rsi
incq %rax
movsd (%rsi,%r12,8), %xmm6
mulsd %xmm5, %xmm6
movsd %xmm6, (%rsi,%r12,8)
jmp 0x104e0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq