// File: /workspace/github_c_makefile_star2_O1/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)
testl %esi, %esi
jle 0x11e41
leal 0x1(%rsi), %eax
movl $0x1, %r9d
movapd 0xdf455(%rip), %xmm0    # 0xf1240
xorpd %xmm1, %xmm1
movsd 0xdf469(%rip), %xmm2    # 0xf1260
movq (%rdi,%r9,8), %r10
movl $0x1, %r11d
xorpd %xmm3, %xmm3
movapd %xmm3, %xmm4
movsd (%r10,%r11,8), %xmm3
andpd %xmm0, %xmm3
maxsd %xmm4, %xmm3
incq %r11
cmpq %r11, %rax
jne 0x11e05
ucomisd %xmm1, %xmm3
jne 0x11e2b
jnp 0x12005
movapd %xmm2, %xmm4
divsd %xmm3, %xmm4
movsd %xmm4, (%r8,%r9,8)
incq %r9
cmpq %rax, %r9
jne 0x11df7
testl %esi, %esi
jle 0x12001
movl %esi, %edx
incl %esi
leaq -0x1(%rdx), %r9
leaq 0x10(%rdi), %r10
xorl %r11d, %r11d
movl $0x1, %ebx
movapd 0xdf3db(%rip), %xmm0    # 0xf1240
xorpd %xmm1, %xmm1
movsd 0xdf3ef(%rip), %xmm2    # 0xf1260
movapd 0xdf3b7(%rip), %xmm3    # 0xf1230
xorl %ebp, %ebp
cmpq $0x2, %rbx
jb 0x11ecf
movl $0x1, %r15d
xorl %r12d, %r12d
movq (%rdi,%r15,8), %r13
movsd (%r13,%rbx,8), %xmm4
cmpq $0x2, %r15
jb 0x11ebc
xorl %r14d, %r14d
movsd 0x8(%r13,%r14), %xmm5
movq 0x8(%rdi,%r14), %rax
mulsd (%rax,%rbx,8), %xmm5
subsd %xmm5, %xmm4
addq $0x8, %r14
cmpq %r14, %r12
jne 0x11e9e
movsd %xmm4, (%r13,%rbx,8)
incq %r15
addq $0x8, %r12
cmpq %rbx, %r15
jne 0x11e8a
xorpd %xmm4, %xmm4
movq %rbx, %r15
movq (%rdi,%r15,8), %r12
movsd (%r12,%rbx,8), %xmm5
cmpq $0x2, %rbx
jb 0x11f07
xorl %r14d, %r14d
movsd 0x8(%r12,%r14), %xmm6
movq 0x8(%rdi,%r14), %rax
mulsd (%rax,%rbx,8), %xmm6
subsd %xmm6, %xmm5
addq $0x8, %r14
cmpq %r14, %r11
jne 0x11ee9
movsd %xmm5, (%r12,%rbx,8)
andpd %xmm0, %xmm5
mulsd (%r8,%r15,8), %xmm5
ucomisd %xmm4, %xmm5
cmovael %r15d, %ebp
movapd %xmm4, %xmm6
cmpnlesd %xmm5, %xmm6
movapd %xmm6, %xmm7
andnpd %xmm5, %xmm7
andpd %xmm4, %xmm6
orpd %xmm7, %xmm6
incq %r15
movapd %xmm6, %xmm4
cmpq %rsi, %r15
jne 0x11ed6
movl %ebp, %eax
cmpq %rax, %rbx
je 0x11f94
movslq %ebp, %r15
movq (%rdi,%r15,8), %r14
movq (%rdi,%rbx,8), %r12
movl $0x1, %r13d
movsd (%r14,%r13,8), %xmm4
movsd (%r12,%r13,8), %xmm5
movsd %xmm5, (%r14,%r13,8)
movsd %xmm4, (%r12,%r13,8)
incq %r13
cmpq %r13, %rsi
jne 0x11f5c
movsd (%rcx), %xmm4
xorpd %xmm3, %xmm4
movlpd %xmm4, (%rcx)
movsd (%r8,%rbx,8), %xmm4
movsd %xmm4, (%r8,%r15,8)
movq -0x8(%rsp), %rax
movl %ebp, (%rax,%rbx,4)
movq (%rdi,%rbx,8), %r14
movsd (%r14,%rbx,8), %xmm4
ucomisd %xmm1, %xmm4
jne 0x11fbc
jp 0x11fbc
movabsq $0x358dee7a4ad4b81f, %rax # imm = 0x358DEE7A4AD4B81F
movq %rax, (%r14,%rbx,8)
cmpq %rdx, %rbx
je 0x11fea
jae 0x11fea
movapd %xmm2, %xmm4
divsd (%r14,%rbx,8), %xmm4
xorl %r14d, %r14d
movq (%r10,%r14,8), %rax
movsd (%rax,%rbx,8), %xmm5
mulsd %xmm4, %xmm5
movsd %xmm5, (%rax,%rbx,8)
incq %r14
cmpq %r14, %r9
jne 0x11fd0
incq %rbx
addq $0x8, %r11
decq %r9
addq $0x8, %r10
cmpq %rsi, %rbx
jne 0x11e7b
xorl %eax, %eax
jmp 0x1200a
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq