// File: /workspace/github_c_makefile_star2_O3/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 %eax, %eax
testl %esi, %esi
jle 0x12140
leal 0x1(%rsi), %r9d
movl $0x1, %r10d
movapd 0xdc319(%rip), %xmm0    # 0xee240
xorpd %xmm2, %xmm2
movsd 0xdc32d(%rip), %xmm1    # 0xee260
movq (%rdi,%r10,8), %r11
movl $0x1, %ebx
xorpd %xmm3, %xmm3
movapd %xmm3, %xmm4
movsd (%r11,%rbx,8), %xmm3
andpd %xmm0, %xmm3
maxsd %xmm4, %xmm3
incq %rbx
cmpq %rbx, %r9
jne 0x11f40
ucomisd %xmm2, %xmm3
jne 0x11f66
jnp 0x1213b
movapd %xmm1, %xmm4
divsd %xmm3, %xmm4
movsd %xmm4, (%r8,%r10,8)
incq %r10
cmpq %r9, %r10
jne 0x11f33
testl %esi, %esi
jle 0x12140
movl %esi, %edx
leaq -0x1(%rdx), %rsi
leaq 0x10(%rdi), %r10
xorl %r11d, %r11d
movl $0x1, %ebx
xorpd %xmm2, %xmm2
movsd 0xdcd86(%rip), %xmm3    # 0xeed28
movapd 0xdc286(%rip), %xmm4    # 0xee230
xorl %ebp, %ebp
cmpq $0x2, %rbx
jb 0x12000
movl $0x1, %r15d
xorl %r12d, %r12d
movq (%rdi,%r15,8), %r13
movsd (%r13,%rbx,8), %xmm5
cmpq $0x2, %r15
jb 0x11fed
xorl %r14d, %r14d
movsd 0x8(%r13,%r14), %xmm6
movq 0x8(%rdi,%r14), %rax
mulsd (%rax,%rbx,8), %xmm6
subsd %xmm6, %xmm5
addq $0x8, %r14
cmpq %r14, %r12
jne 0x11fcf
movsd %xmm5, (%r13,%rbx,8)
incq %r15
addq $0x8, %r12
cmpq %rbx, %r15
jne 0x11fbb
xorpd %xmm5, %xmm5
movq %rbx, %r15
movq (%rdi,%r15,8), %r12
movsd (%r12,%rbx,8), %xmm6
cmpq $0x2, %rbx
jb 0x12038
xorl %r14d, %r14d
movsd 0x8(%r12,%r14), %xmm7
movq 0x8(%rdi,%r14), %rax
mulsd (%rax,%rbx,8), %xmm7
subsd %xmm7, %xmm6
addq $0x8, %r14
cmpq %r14, %r11
jne 0x1201a
movsd %xmm6, (%r12,%rbx,8)
andpd %xmm0, %xmm6
mulsd (%r8,%r15,8), %xmm6
ucomisd %xmm5, %xmm6
cmovael %r15d, %ebp
movapd %xmm5, %xmm7
cmpnlesd %xmm6, %xmm7
movapd %xmm7, %xmm8
andnpd %xmm6, %xmm8
andpd %xmm5, %xmm7
orpd %xmm8, %xmm7
incq %r15
movapd %xmm7, %xmm5
cmpq %r9, %r15
jne 0x12007
movl %ebp, %eax
cmpq %rax, %rbx
je 0x120c8
movslq %ebp, %r15
movq (%rdi,%r15,8), %r14
movq (%rdi,%rbx,8), %r12
movl $0x1, %r13d
movsd (%r14,%r13,8), %xmm5
movsd (%r12,%r13,8), %xmm6
movsd %xmm6, (%r14,%r13,8)
movsd %xmm5, (%r12,%r13,8)
incq %r13
cmpq %r13, %r9
jne 0x12090
movsd (%rcx), %xmm5
xorpd %xmm4, %xmm5
movlpd %xmm5, (%rcx)
movsd (%r8,%rbx,8), %xmm5
movsd %xmm5, (%r8,%r15,8)
movq -0x8(%rsp), %rax
movl %ebp, (%rax,%rbx,4)
movq (%rdi,%rbx,8), %r14
movsd (%r14,%rbx,8), %xmm6
ucomisd %xmm2, %xmm6
jne 0x120f4
jp 0x120f4
movabsq $0x358dee7a4ad4b81f, %rax # imm = 0x358DEE7A4AD4B81F
movq %rax, (%r14,%rbx,8)
movapd %xmm3, %xmm6
cmpq %rdx, %rbx
je 0x12120
jae 0x12120
movapd %xmm1, %xmm5
divsd %xmm6, %xmm5
xorl %r14d, %r14d
movq (%r10,%r14,8), %rax
movsd (%rax,%rbx,8), %xmm6
mulsd %xmm5, %xmm6
movsd %xmm6, (%rax,%rbx,8)
incq %r14
cmpq %r14, %rsi
jne 0x12106
incq %rbx
addq $0x8, %r11
decq %rsi
addq $0x8, %r10
cmpq %r9, %rbx
jne 0x11fac
xorl %eax, %eax
jmp 0x12140
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq