void mgfas(double **u, int n, int maxcyc) {
  double anorm2(double **a, int n);
  void copy(double **aout, double **ain, int n);
  void interp(double **uf, double **uc, int nf);
  void lop(double **out, double **u, int n);
  void matadd(double **a, double **b, double **c, int n);
  void matsub(double **a, double **b, double **c, int n);
  void relax2(double **u, double **rhs, int n);
  void rstrct(double **uc, double **uf, int nc);
  void slvsm2(double **u, double **rhs);
  unsigned int j, jcycle, jj, jm1, jpost, jpre, nf, ng = 0, ngrid, nn;
  double **irho[15 + 1], **irhs[15 + 1], **itau[15 + 1], **itemp[15 + 1],
      **iu[15 + 1];
  double res, trerr;
  nn = n;
  while (nn >>= 1)
    ng++;
  if (n != 1 + (1L << ng))
    nrerror("n-1 must be a power of 2 in mgfas.");
  if (ng > 15)
    nrerror("increase NGMAX in mglin.");
  nn = n / 2 + 1;
  ngrid = ng - 1;
  irho[ngrid] = dmatrix(1, nn, 1, nn);
  rstrct(irho[ngrid], u, nn);
  while (nn > 3) {
    nn = nn / 2 + 1;
    irho[--ngrid] = dmatrix(1, nn, 1, nn);
    rstrct(irho[ngrid], irho[ngrid + 1], nn);
  }
  nn = 3;
  iu[1] = dmatrix(1, nn, 1, nn);
  irhs[1] = dmatrix(1, nn, 1, nn);
  itau[1] = dmatrix(1, nn, 1, nn);
  itemp[1] = dmatrix(1, nn, 1, nn);
  slvsm2(iu[1], irho[1]);
  free_dmatrix(irho[1], 1, nn, 1, nn);
  ngrid = ng;
  for (j = 2; j <= ngrid; j++) {
    nn = 2 * nn - 1;
    iu[j] = dmatrix(1, nn, 1, nn);
    irhs[j] = dmatrix(1, nn, 1, nn);
    itau[j] = dmatrix(1, nn, 1, nn);
    itemp[j] = dmatrix(1, nn, 1, nn);
    interp(iu[j], iu[j - 1], nn);
    copy(irhs[j], (j != ngrid ? irho[j] : u), nn);
    for (jcycle = 1; jcycle <= maxcyc; jcycle++) {
      nf = nn;
      for (jj = j; jj >= 2; jj--) {
        for (jpre = 1; jpre <= 1; jpre++)
          relax2(iu[jj], irhs[jj], nf);
        lop(itemp[jj], iu[jj], nf);
        nf = nf / 2 + 1;
        jm1 = jj - 1;
        rstrct(itemp[jm1], itemp[jj], nf);
        rstrct(iu[jm1], iu[jj], nf);
        lop(itau[jm1], iu[jm1], nf);
        matsub(itau[jm1], itemp[jm1], itau[jm1], nf);
        if (jj == j)
          trerr = 0.33 * anorm2(itau[jm1], nf);
        rstrct(irhs[jm1], irhs[jj], nf);
        matadd(irhs[jm1], itau[jm1], irhs[jm1], nf);
      }
      slvsm2(iu[1], irhs[1]);
      nf = 3;
      for (jj = 2; jj <= j; jj++) {
        jm1 = jj - 1;
        rstrct(itemp[jm1], iu[jj], nf);
        matsub(iu[jm1], itemp[jm1], itemp[jm1], nf);
        nf = 2 * nf - 1;
        interp(itau[jj], itemp[jm1], nf);
        matadd(iu[jj], itau[jj], iu[jj], nf);
        for (jpost = 1; jpost <= 1; jpost++)
          relax2(iu[jj], irhs[jj], nf);
      }
      lop(itemp[j], iu[j], nf);
      matsub(itemp[j], irhs[j], itemp[j], nf);
      res = anorm2(itemp[j], nf);
      if (res < trerr)
        break;
    }
  }
  copy(u, iu[ngrid], n);
  for (nn = n, j = ng; j >= 1; j--, nn = nn / 2 + 1) {
    free_dmatrix(itemp[j], 1, nn, 1, nn);
    free_dmatrix(itau[j], 1, nn, 1, nn);
    free_dmatrix(irhs[j], 1, nn, 1, nn);
    free_dmatrix(iu[j], 1, nn, 1, nn);
    if (j != ng && j != 1)
      free_dmatrix(irho[j], 1, nn, 1, nn);
  }
}


x86 assembly (clang, -O0):
<mgfas>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2e0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x38(%rbp)
cmp    $0x0,%eax
je     1202 <mgfas+0x42>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11e2 <mgfas+0x22>
movslq -0xc(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
je     122f <mgfas+0x6f>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1030 <nrerror@plt>
cmpl   $0xf,-0x30(%rbp)
jbe    1247 <mgfas+0x87>
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1030 <nrerror@plt>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x30(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1090 <dmatrix@plt>
movslq %eax,%rcx
mov    -0x34(%rbp),%eax
mov    %rcx,-0xc0(%rbp,%rax,8)
ff
mov    -0x34(%rbp),%eax
mov    -0xc0(%rbp,%rax,8),%rdi
ff
mov    -0x8(%rbp),%rsi
mov    -0x38(%rbp),%edx
call   10a0 <rstrct@plt>
cmpl   $0x3,-0x38(%rbp)
jbe    1302 <mgfas+0x142>
mov    -0x38(%rbp),%eax
shr    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1090 <dmatrix@plt>
movslq %eax,%rcx
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
mov    %eax,%eax
mov    %rcx,-0xc0(%rbp,%rax,8)
ff
mov    -0x34(%rbp),%eax
mov    -0xc0(%rbp,%rax,8),%rdi
ff
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    -0xc0(%rbp,%rax,8),%rsi
ff
mov    -0x38(%rbp),%edx
call   10a0 <rstrct@plt>
jmp    129a <mgfas+0xda>
movl   $0x3,-0x38(%rbp)
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1090 <dmatrix@plt>
cltq
mov    %rax,-0x2b8(%rbp)
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1090 <dmatrix@plt>
cltq
mov    %rax,-0x138(%rbp)
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1090 <dmatrix@plt>
cltq
mov    %rax,-0x1b8(%rbp)
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1090 <dmatrix@plt>
cltq
mov    %rax,-0x238(%rbp)
mov    -0x2b8(%rbp),%rdi
mov    -0xb8(%rbp),%rsi
call   10e0 <slvsm2@plt>
mov    -0xb8(%rbp),%rdi
mov    -0x38(%rbp),%edx
mov    -0x38(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   10d0 <free_dmatrix@plt>
mov    -0x30(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x34(%rbp),%eax
ja     1840 <mgfas+0x680>
mov    -0x38(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1090 <dmatrix@plt>
movslq %eax,%rcx
mov    -0x14(%rbp),%eax
mov    %rcx,-0x2c0(%rbp,%rax,8)
ff
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1090 <dmatrix@plt>
movslq %eax,%rcx
mov    -0x14(%rbp),%eax
mov    %rcx,-0x140(%rbp,%rax,8)
ff
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1090 <dmatrix@plt>
movslq %eax,%rcx
mov    -0x14(%rbp),%eax
mov    %rcx,-0x1c0(%rbp,%rax,8)
ff
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1090 <dmatrix@plt>
movslq %eax,%rcx
mov    -0x14(%rbp),%eax
mov    %rcx,-0x240(%rbp,%rax,8)
ff
mov    -0x14(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rdi
ff
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
mov    -0x2c0(%rbp,%rax,8),%rsi
ff
mov    -0x38(%rbp),%edx
call   1070 <interp@plt>
mov    -0x14(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rax
ff
mov    %rax,-0x2d8(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     14b1 <mgfas+0x2f1>
mov    -0x14(%rbp),%eax
mov    -0xc0(%rbp,%rax,8),%rax
ff
mov    %rax,-0x2e0(%rbp)
jmp    14bc <mgfas+0x2fc>
mov    -0x8(%rbp),%rax
mov    %rax,-0x2e0(%rbp)
mov    -0x2d8(%rbp),%rdi
mov    -0x2e0(%rbp),%rsi
mov    -0x38(%rbp),%edx
call   1080 <copy@plt>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
ja     182d <mgfas+0x66d>
mov    -0x38(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jb     1679 <mgfas+0x4b9>
movl   $0x1,-0x28(%rbp)
cmpl   $0x1,-0x28(%rbp)
ja     1538 <mgfas+0x378>
mov    -0x1c(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rsi
ff
mov    -0x2c(%rbp),%edx
call   1040 <relax2@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1502 <mgfas+0x342>
mov    -0x1c(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rsi
ff
mov    -0x2c(%rbp),%edx
call   1060 <lop@plt>
mov    -0x2c(%rbp),%eax
shr    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rsi
ff
mov    -0x2c(%rbp),%edx
call   10a0 <rstrct@plt>
mov    -0x20(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rsi
ff
mov    -0x2c(%rbp),%edx
call   10a0 <rstrct@plt>
mov    -0x20(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rdi
ff
mov    -0x20(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rsi
ff
mov    -0x2c(%rbp),%edx
call   1060 <lop@plt>
mov    -0x20(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rdi
ff
mov    -0x20(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rsi
ff
mov    -0x20(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rdx
ff
mov    -0x2c(%rbp),%ecx
call   10b0 <matsub@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1624 <mgfas+0x464>
mov    -0x20(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rdi
ff
mov    -0x2c(%rbp),%esi
call   1050 <anorm2@plt>
movaps %xmm0,%xmm1
movsd  0x9e8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x2d0(%rbp)
ff
mov    -0x20(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rsi
ff
mov    -0x2c(%rbp),%edx
call   10a0 <rstrct@plt>
mov    -0x20(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rdi
ff
mov    -0x20(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rsi
ff
mov    -0x20(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rdx
ff
mov    -0x2c(%rbp),%ecx
call   10c0 <matadd@plt>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    14f1 <mgfas+0x331>
mov    -0x2b8(%rbp),%rdi
mov    -0x138(%rbp),%rsi
call   10e0 <slvsm2@plt>
movl   $0x3,-0x2c(%rbp)
movl   $0x2,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
ja     1799 <mgfas+0x5d9>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rsi
ff
mov    -0x2c(%rbp),%edx
call   10a0 <rstrct@plt>
mov    -0x20(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rdi
ff
mov    -0x20(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rsi
ff
mov    -0x20(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdx
ff
mov    -0x2c(%rbp),%ecx
call   10b0 <matsub@plt>
mov    -0x2c(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rdi
ff
mov    -0x20(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rsi
ff
mov    -0x2c(%rbp),%edx
call   1070 <interp@plt>
mov    -0x1c(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rsi
ff
mov    -0x1c(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rdx
ff
mov    -0x2c(%rbp),%ecx
call   10c0 <matadd@plt>
movl   $0x1,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
ja     1786 <mgfas+0x5c6>
mov    -0x1c(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rsi
ff
mov    -0x2c(%rbp),%edx
call   1040 <relax2@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1750 <mgfas+0x590>
jmp    178b <mgfas+0x5cb>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    169a <mgfas+0x4da>
mov    -0x14(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x14(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rsi
ff
mov    -0x2c(%rbp),%edx
call   1060 <lop@plt>
mov    -0x14(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x14(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rsi
ff
mov    -0x14(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdx
ff
mov    -0x2c(%rbp),%ecx
call   10b0 <matsub@plt>
mov    -0x14(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x2c(%rbp),%esi
call   1050 <anorm2@plt>
movsd  %xmm0,-0x2c8(%rbp)
ff
movsd  -0x2c8(%rbp),%xmm1
ff
movsd  -0x2d0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    181a <mgfas+0x65a>
jmp    182d <mgfas+0x66d>
jmp    181f <mgfas+0x65f>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    14d9 <mgfas+0x319>
jmp    1832 <mgfas+0x672>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13b9 <mgfas+0x1f9>
mov    -0x8(%rbp),%rdi
mov    -0x34(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rsi
ff
mov    -0xc(%rbp),%edx
call   1080 <copy@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jb     1942 <mgfas+0x782>
mov    -0x14(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x38(%rbp),%edx
mov    -0x38(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   10d0 <free_dmatrix@plt>
mov    -0x14(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rdi
ff
mov    -0x38(%rbp),%edx
mov    -0x38(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   10d0 <free_dmatrix@plt>
mov    -0x14(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rdi
ff
mov    -0x38(%rbp),%edx
mov    -0x38(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   10d0 <free_dmatrix@plt>
mov    -0x14(%rbp),%eax
mov    -0x2c0(%rbp,%rax,8),%rdi
ff
mov    -0x38(%rbp),%edx
mov    -0x38(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   10d0 <free_dmatrix@plt>
mov    -0x14(%rbp),%eax
cmp    -0x30(%rbp),%eax
je     1923 <mgfas+0x763>
cmpl   $0x1,-0x14(%rbp)
je     1923 <mgfas+0x763>
mov    -0x14(%rbp),%eax
mov    -0xc0(%rbp,%rax,8),%rdi
ff
mov    -0x38(%rbp),%edx
mov    -0x38(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   10d0 <free_dmatrix@plt>
jmp    1928 <mgfas+0x768>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x38(%rbp),%eax
shr    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1863 <mgfas+0x6a3>
add    $0x2e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mgfas>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x318,%rsp
mov    %edx,0x10(%rsp)
mov    %rdi,0x28(%rsp)
xor    %ecx,%ecx
cmp    $0x2,%esi
jb     11fc <mgfas+0x3c>
xor    %ecx,%ecx
mov    %esi,%eax
mov    %esi,%edx
nopw   0x0(%rax,%rax,1)
shr    %edx
add    $0x1,%ecx
cmp    $0x3,%eax
mov    %edx,%eax
ja     11f0 <mgfas+0x30>
mov    $0x1,%eax
shl    %cl,%rax
movslq %esi,%rdx
mov    %ecx,%r13d
add    $0x1,%rax
cmp    %rdx,%rax
mov    %esi,0x4(%rsp)
je     1229 <mgfas+0x69>
lea    0xdea(%rip),%rdi
xor    %eax,%eax
call   1030 <nrerror@plt>
mov    0x4(%rsp),%esi
cmp    $0x10,%r13d
jb     1241 <mgfas+0x81>
lea    0xdf5(%rip),%rdi
xor    %eax,%eax
call   1030 <nrerror@plt>
mov    0x4(%rsp),%esi
mov    %esi,%r14d
shr    $0x1f,%r14d
add    %esi,%r14d
sar    %r14d
add    $0x1,%r14d
lea    -0x1(%r13),%ebx
mov    $0x1,%edi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1090 <dmatrix@plt>
movslq %eax,%r15
mov    %r15,0x290(%rsp,%rbx,8)
mov    %r15,%rdi
mov    0x28(%rsp),%rsi
mov    %r14d,%edx
call   10a0 <rstrct@plt>
cmp    $0x4,%r14d
jb     12e3 <mgfas+0x123>
lea    -0x2(%r13),%ebp
mov    %r14d,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
shr    %ebx
add    $0x1,%ebx
mov    $0x1,%edi
mov    %ebx,%esi
mov    $0x1,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1090 <dmatrix@plt>
movslq %eax,%r12
mov    %ebp,%eax
mov    %r12,0x290(%rsp,%rax,8)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   10a0 <rstrct@plt>
add    $0xffffffff,%ebp
mov    %r12,%r15
cmp    $0x5,%r14d
mov    %ebx,%r14d
ja     12a0 <mgfas+0xe0>
mov    $0x3,%ebp
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
xor    %eax,%eax
call   1090 <dmatrix@plt>
movslq %eax,%r15
mov    %r15,0x98(%rsp)
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
xor    %eax,%eax
call   1090 <dmatrix@plt>
cltq
mov    %rax,0x118(%rsp)
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
xor    %eax,%eax
call   1090 <dmatrix@plt>
cltq
mov    %rax,0x218(%rsp)
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
xor    %eax,%eax
call   1090 <dmatrix@plt>
cltq
mov    %rax,0x198(%rsp)
mov    0x298(%rsp),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   10e0 <slvsm2@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
xor    %eax,%eax
call   10d0 <free_dmatrix@plt>
cmp    $0x2,%r13d
jae    1520 <mgfas+0x360>
mov    0x90(%rsp,%r13,8),%rsi
mov    0x28(%rsp),%rdi
mov    0x4(%rsp),%r15d
mov    %r15d,%edx
call   1080 <copy@plt>
test   %r13,%r13
je     150e <mgfas+0x34e>
lea    0x0(,%r13,8),%rax
mov    %rax,0x38(%rsp)
lea    -0x8(,%r13,8),%rax
ff
mov    %rax,0x20(%rsp)
lea    (%rsp,%r13,8),%rax
add    $0x190,%rax
mov    %rax,0x8(%rsp)
mov    %r13,%rax
lea    0x210(%rsp,%r13,8),%r13
lea    0x110(%rsp,%rax,8),%rbp
lea    (%rsp,%rax,8),%rbx
add    $0x90,%rbx
lea    (%rsp,%rax,8),%rax
add    $0x290,%rax
mov    %rax,0x18(%rsp)
xor    %r14d,%r14d
jmp    145c <mgfas+0x29c>
nopw   0x0(%rax,%rax,1)
mov    %r12d,%r15d
shr    %r15d
add    $0x1,%r15d
add    $0xfffffffffffffff8,%r14
mov    0x38(%rsp),%rax
add    %r14d,%eax
je     150e <mgfas+0x34e>
mov    0x8(%rsp),%rax
mov    (%rax,%r14,1),%rdi
mov    $0x1,%esi
mov    %r15d,%edx
mov    $0x1,%ecx
mov    %r15d,%r8d
xor    %eax,%eax
call   10d0 <free_dmatrix@plt>
mov    0x0(%r13,%r14,1),%rdi
mov    $0x1,%esi
mov    %r15d,%edx
mov    $0x1,%ecx
mov    %r15d,%r8d
xor    %eax,%eax
call   10d0 <free_dmatrix@plt>
mov    0x0(%rbp,%r14,1),%rdi
mov    $0x1,%esi
mov    %r15d,%edx
mov    $0x1,%ecx
mov    %r15d,%r8d
xor    %eax,%eax
call   10d0 <free_dmatrix@plt>
mov    (%rbx,%r14,1),%rdi
mov    $0x1,%esi
mov    %r15d,%edx
mov    $0x1,%ecx
mov    %r15d,%r12d
mov    %r15d,%r8d
xor    %eax,%eax
call   10d0 <free_dmatrix@plt>
test   %r14,%r14
je     1440 <mgfas+0x280>
mov    0x20(%rsp),%rax
add    %r14,%rax
je     1440 <mgfas+0x280>
mov    0x18(%rsp),%rax
mov    (%rax,%r14,1),%rdi
mov    $0x1,%esi
mov    %r12d,%edx
mov    $0x1,%ecx
mov    %r12d,%r8d
xor    %eax,%eax
call   10d0 <free_dmatrix@plt>
jmp    1440 <mgfas+0x280>
add    $0x318,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x2(%r13),%eax
mov    %rax,0x48(%rsp)
mov    $0x2,%r14d
mov    $0x3,%eax
mov    $0x8,%ecx
mov    %rcx,0x30(%rsp)
mov    %r13,0x50(%rsp)
jmp    1576 <mgfas+0x3b6>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r14
mov    0x58(%rsp),%rax
add    $0x1,%rax
add    $0x8,%r13
mov    %r13,0x30(%rsp)
cmp    0x48(%rsp),%rax
mov    0x50(%rsp),%r13
je     13b9 <mgfas+0x1f9>
mov    %rax,0x58(%rsp)
mov    %r15,%rbx
add    %ebp,%ebp
add    $0xffffffff,%ebp
mov    $0x1,%edi
mov    %ebp,%esi
mov    $0x1,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1090 <dmatrix@plt>
movslq %eax,%r15
mov    %r15,0x90(%rsp,%r14,8)
mov    $0x1,%edi
mov    %ebp,%esi
mov    $0x1,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1090 <dmatrix@plt>
movslq %eax,%r12
mov    %r12,0x110(%rsp,%r14,8)
mov    $0x1,%edi
mov    %ebp,%esi
mov    $0x1,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1090 <dmatrix@plt>
cltq
mov    %rax,0x210(%rsp,%r14,8)
mov    $0x1,%edi
mov    %ebp,%esi
mov    $0x1,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1090 <dmatrix@plt>
cltq
mov    %rax,0x20(%rsp)
mov    %rax,0x190(%rsp,%r14,8)
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1070 <interp@plt>
mov    0x28(%rsp),%rsi
cmp    %r13,%r14
je     1625 <mgfas+0x465>
mov    0x290(%rsp,%r14,8),%rsi
mov    %r12,%rdi
mov    %ebp,%edx
call   1080 <copy@plt>
cmpl   $0x0,0x10(%rsp)
mov    0x30(%rsp),%r13
je     1550 <mgfas+0x390>
lea    -0x1(%r14),%rax
mov    %rax,0x40(%rsp)
mov    0x98(%rsp),%rax
mov    %rax,0x68(%rsp)
mov    0x118(%rsp),%rax
mov    %rax,0x60(%rsp)
mov    %ebp,%eax
shr    %eax
add    $0x1,%eax
mov    %eax,0x14(%rsp)
movl   $0x1,0x18(%rsp)
mov    %rbp,0x88(%rsp)
mov    %r15,0x80(%rsp)
mov    %r14,0x78(%rsp)
mov    %r12,0x70(%rsp)
nop
mov    %r15,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   1040 <relax2@plt>
mov    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
call   1060 <lop@plt>
mov    0x188(%rsp,%r14,8),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    0x14(%rsp),%ebp
mov    %ebp,%edx
call   10a0 <rstrct@plt>
mov    0x88(%rsp,%r14,8),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
call   10a0 <rstrct@plt>
mov    0x208(%rsp,%r14,8),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1060 <lop@plt>
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %ebp,%ecx
call   10b0 <matsub@plt>
mov    %r15,%rdi
mov    %ebp,%esi
call   1050 <anorm2@plt>
movsd  %xmm0,0x8(%rsp)
mov    0x108(%rsp,%r14,8),%r14
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%r12
mov    %ebp,%edx
call   10a0 <rstrct@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %ebp,%ecx
call   10c0 <matadd@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0x8b8(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
cmpq   $0x2,0x40(%rsp)
jb     182e <mgfas+0x66e>
mov    0x40(%rsp),%rbp
mov    0x14(%rsp),%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1040 <relax2@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
call   1060 <lop@plt>
shr    %r15d
add    $0x1,%r15d
lea    -0x1(%rbp),%rax
mov    %rax,0x38(%rsp)
mov    %r12,%rsi
mov    0x188(%rsp,%rbp,8),%r12
mov    %r12,%rdi
mov    %r15d,%edx
call   10a0 <rstrct@plt>
mov    0x88(%rsp,%rbp,8),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
call   10a0 <rstrct@plt>
mov    0x208(%rsp,%rbp,8),%rbx
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
call   1060 <lop@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %r15d,%ecx
call   10b0 <matsub@plt>
mov    0x108(%rsp,%rbp,8),%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   10a0 <rstrct@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    %r15d,%ecx
call   10c0 <matadd@plt>
mov    %rbp,%r14
mov    %r13,%rbx
mov    0x38(%rsp),%rax
mov    %rax,%rbp
cmp    $0x1,%rax
ja     1770 <mgfas+0x5b0>
mov    0x68(%rsp),%rdi
mov    0x60(%rsp),%rsi
call   10e0 <slvsm2@plt>
mov    $0x3,%ebp
xor    %ebx,%ebx
mov    0x30(%rsp),%r13
nopl   0x0(%rax)
mov    0x198(%rsp,%rbx,1),%r12
mov    0xa0(%rsp,%rbx,1),%r14
mov    %r12,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   10a0 <rstrct@plt>
mov    0x98(%rsp,%rbx,1),%rdi
mov    %r12,%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
call   10b0 <matsub@plt>
add    %ebp,%ebp
add    $0xffffffff,%ebp
mov    0x220(%rsp,%rbx,1),%r15
mov    %r15,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   1070 <interp@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %ebp,%ecx
call   10c0 <matadd@plt>
mov    0x120(%rsp,%rbx,1),%rsi
mov    %r14,%rdi
mov    %ebp,%edx
call   1040 <relax2@plt>
add    $0x8,%rbx
cmp    %rbx,%r13
jne    1850 <mgfas+0x690>
mov    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    0x80(%rsp),%r15
mov    %r15,%rsi
mov    %ebp,%edx
call   1060 <lop@plt>
mov    %rbx,%rdi
mov    0x70(%rsp),%r12
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   10b0 <matsub@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <anorm2@plt>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
mov    0x88(%rsp),%rbp
mov    0x78(%rsp),%r14
ja     1550 <mgfas+0x390>
mov    0x18(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x18(%rsp)
cmp    0x10(%rsp),%eax
jbe    1690 <mgfas+0x4d0>
jmp    1550 <mgfas+0x390>

LLVM IR (-O0):
@.str = [35 x i8] c"n-1 must be a power of 2 in mgfas.\00"
@.str.1 = [25 x i8] c"increase NGMAX in mglin.\00"
define void @mgfas(double** %0, i32 %1, i32 %2) {
%4 = alloca double**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [16 x double**]
%18 = alloca [16 x double**]
%19 = alloca [16 x double**]
%20 = alloca [16 x double**]
%21 = alloca [16 x double**]
%22 = alloca double
%23 = alloca double
store double** %0, double*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %14
%24 = load i32, i32* %5
store i32 %24, i32* %16
br label %25
25: ; preds = %29, %3
%26 = load i32, i32* %16
%27 = lshr i32 %26, 1
store i32 %27, i32* %16
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %25
%30 = load i32, i32* %14
%31 = add i32 %30, 1
store i32 %31, i32* %14
br label %25
32: ; preds = %25
%33 = load i32, i32* %5
%34 = sext i32 %33 to i64
%35 = load i32, i32* %14
%36 = zext i32 %35 to i64
%37 = shl i64 1, %36
%38 = add nsw i64 1, %37
%39 = icmp ne i64 %34, %38
br i1 %39, label %40, label %42
40: ; preds = %32
%41 = call i32 (i8*, ...) bitcast (i32 (...)* @nrerror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %42
42: ; preds = %40, %32
%43 = load i32, i32* %14
%44 = icmp ugt i32 %43, 15
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = call i32 (i8*, ...) bitcast (i32 (...)* @nrerror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %47
47: ; preds = %45, %42
%48 = load i32, i32* %5
%49 = sdiv i32 %48, 2
%50 = add nsw i32 %49, 1
store i32 %50, i32* %16
%51 = load i32, i32* %14
%52 = sub i32 %51, 1
store i32 %52, i32* %15
%53 = load i32, i32* %16
%54 = load i32, i32* %16
%55 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %53, i32 1, i32 %54)
%56 = sext i32 %55 to i64
%57 = inttoptr i64 %56 to double**
%58 = load i32, i32* %15
%59 = zext i32 %58 to i64
%60 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %59
store double** %57, double*** %60
%61 = load i32, i32* %15
%62 = zext i32 %61 to i64
%63 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %62
%64 = load double**, double*** %63
%65 = load double**, double*** %4
%66 = load i32, i32* %16
br label %67
67: ; preds = %70, %47
%68 = load i32, i32* %16
%69 = icmp ugt i32 %68, 3
br i1 %69, label %70, label %93
70: ; preds = %67
%71 = load i32, i32* %16
%72 = udiv i32 %71, 2
%73 = add i32 %72, 1
store i32 %73, i32* %16
%74 = load i32, i32* %16
%75 = load i32, i32* %16
%76 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %74, i32 1, i32 %75)
%77 = sext i32 %76 to i64
%78 = inttoptr i64 %77 to double**
%79 = load i32, i32* %15
%80 = add i32 %79, -1
store i32 %80, i32* %15
%81 = zext i32 %80 to i64
%82 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %81
store double** %78, double*** %82
%83 = load i32, i32* %15
%84 = zext i32 %83 to i64
%85 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %84
%86 = load double**, double*** %85
%87 = load i32, i32* %15
%88 = add i32 %87, 1
%89 = zext i32 %88 to i64
%90 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %89
%91 = load double**, double*** %90
%92 = load i32, i32* %16
br label %67
93: ; preds = %67
store i32 3, i32* %16
%94 = load i32, i32* %16
%95 = load i32, i32* %16
%96 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %94, i32 1, i32 %95)
%97 = sext i32 %96 to i64
%98 = inttoptr i64 %97 to double**
%99 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 1
store double** %98, double*** %99
%100 = load i32, i32* %16
%101 = load i32, i32* %16
%102 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %100, i32 1, i32 %101)
%103 = sext i32 %102 to i64
%104 = inttoptr i64 %103 to double**
%105 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 1
store double** %104, double*** %105
%106 = load i32, i32* %16
%107 = load i32, i32* %16
%108 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %106, i32 1, i32 %107)
%109 = sext i32 %108 to i64
%110 = inttoptr i64 %109 to double**
%111 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 1
store double** %110, double*** %111
%112 = load i32, i32* %16
%113 = load i32, i32* %16
%114 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %112, i32 1, i32 %113)
%115 = sext i32 %114 to i64
%116 = inttoptr i64 %115 to double**
%117 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 1
store double** %116, double*** %117
%118 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 1
%119 = load double**, double*** %118
%120 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 1
%121 = load double**, double*** %120
%122 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 1
%123 = load double**, double*** %122
%124 = load i32, i32* %16
%125 = load i32, i32* %16
%126 = call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %123, i32 1, i32 %124, i32 1, i32 %125)
%127 = load i32, i32* %14
store i32 %127, i32* %15
store i32 2, i32* %7
br label %128
128: ; preds = %431, %93
%129 = load i32, i32* %7
%130 = load i32, i32* %15
%131 = icmp ule i32 %129, %130
br i1 %131, label %132, label %434
132: ; preds = %128
%133 = load i32, i32* %16
%134 = mul i32 2, %133
%135 = sub i32 %134, 1
store i32 %135, i32* %16
%136 = load i32, i32* %16
%137 = load i32, i32* %16
%138 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %136, i32 1, i32 %137)
%139 = sext i32 %138 to i64
%140 = inttoptr i64 %139 to double**
%141 = load i32, i32* %7
%142 = zext i32 %141 to i64
%143 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %142
store double** %140, double*** %143
%144 = load i32, i32* %16
%145 = load i32, i32* %16
%146 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %144, i32 1, i32 %145)
%147 = sext i32 %146 to i64
%148 = inttoptr i64 %147 to double**
%149 = load i32, i32* %7
%150 = zext i32 %149 to i64
%151 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %150
store double** %148, double*** %151
%152 = load i32, i32* %16
%153 = load i32, i32* %16
%154 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %152, i32 1, i32 %153)
%155 = sext i32 %154 to i64
%156 = inttoptr i64 %155 to double**
%157 = load i32, i32* %7
%158 = zext i32 %157 to i64
%159 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %158
store double** %156, double*** %159
%160 = load i32, i32* %16
%161 = load i32, i32* %16
%162 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %160, i32 1, i32 %161)
%163 = sext i32 %162 to i64
%164 = inttoptr i64 %163 to double**
%165 = load i32, i32* %7
%166 = zext i32 %165 to i64
%167 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %166
store double** %164, double*** %167
%168 = load i32, i32* %7
%169 = zext i32 %168 to i64
%170 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %169
%171 = load double**, double*** %170
%172 = load i32, i32* %7
%173 = sub i32 %172, 1
%174 = zext i32 %173 to i64
%175 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %174
%176 = load double**, double*** %175
%177 = load i32, i32* %16
%178 = load i32, i32* %7
%179 = zext i32 %178 to i64
%180 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %179
%181 = load double**, double*** %180
%182 = load i32, i32* %7
%183 = load i32, i32* %15
%184 = icmp ne i32 %182, %183
br i1 %184, label %185, label %190
185: ; preds = %132
%186 = load i32, i32* %7
%187 = zext i32 %186 to i64
%188 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %187
%189 = load double**, double*** %188
br label %192
190: ; preds = %132
%191 = load double**, double*** %4
br label %192
192: ; preds = %190, %185
%193 = phi double** [ %189, %185 ], [ %191, %190 ]
%194 = load i32, i32* %16
store i32 1, i32* %8
br label %195
195: ; preds = %427, %192
%196 = load i32, i32* %8
%197 = load i32, i32* %6
%198 = icmp ule i32 %196, %197
br i1 %198, label %199, label %430
199: ; preds = %195
%200 = load i32, i32* %16
store i32 %200, i32* %13
%201 = load i32, i32* %7
store i32 %201, i32* %9
br label %202
202: ; preds = %311, %199
%203 = load i32, i32* %9
%204 = icmp uge i32 %203, 2
br i1 %204, label %205, label %314
205: ; preds = %202
store i32 1, i32* %12
br label %206
206: ; preds = %219, %205
%207 = load i32, i32* %12
%208 = icmp ule i32 %207, 1
br i1 %208, label %209, label %222
209: ; preds = %206
%210 = load i32, i32* %9
%211 = zext i32 %210 to i64
%212 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %211
%213 = load double**, double*** %212
%214 = load i32, i32* %9
%215 = zext i32 %214 to i64
%216 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %215
%217 = load double**, double*** %216
%218 = load i32, i32* %13
br label %219
219: ; preds = %209
%220 = load i32, i32* %12
%221 = add i32 %220, 1
store i32 %221, i32* %12
br label %206
222: ; preds = %206
%223 = load i32, i32* %9
%224 = zext i32 %223 to i64
%225 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %224
%226 = load double**, double*** %225
%227 = load i32, i32* %9
%228 = zext i32 %227 to i64
%229 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %228
%230 = load double**, double*** %229
%231 = load i32, i32* %13
%232 = load i32, i32* %13
%233 = udiv i32 %232, 2
%234 = add i32 %233, 1
store i32 %234, i32* %13
%235 = load i32, i32* %9
%236 = sub i32 %235, 1
store i32 %236, i32* %10
%237 = load i32, i32* %10
%238 = zext i32 %237 to i64
%239 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %238
%240 = load double**, double*** %239
%241 = load i32, i32* %9
%242 = zext i32 %241 to i64
%243 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %242
%244 = load double**, double*** %243
%245 = load i32, i32* %13
%246 = load i32, i32* %10
%247 = zext i32 %246 to i64
%248 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %247
%249 = load double**, double*** %248
%250 = load i32, i32* %9
%251 = zext i32 %250 to i64
%252 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %251
%253 = load double**, double*** %252
%254 = load i32, i32* %13
%255 = load i32, i32* %10
%256 = zext i32 %255 to i64
%257 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %256
%258 = load double**, double*** %257
%259 = load i32, i32* %10
%260 = zext i32 %259 to i64
%261 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %260
%262 = load double**, double*** %261
%263 = load i32, i32* %13
%264 = load i32, i32* %10
%265 = zext i32 %264 to i64
%266 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %265
%267 = load double**, double*** %266
%268 = load i32, i32* %10
%269 = zext i32 %268 to i64
%270 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %269
%271 = load double**, double*** %270
%272 = load i32, i32* %10
%273 = zext i32 %272 to i64
%274 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %273
%275 = load double**, double*** %274
%276 = load i32, i32* %13
%277 = load i32, i32* %9
%278 = load i32, i32* %7
%279 = icmp eq i32 %277, %278
br i1 %279, label %280, label %288
280: ; preds = %222
%281 = load i32, i32* %10
%282 = zext i32 %281 to i64
%283 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %282
%284 = load double**, double*** %283
%285 = load i32, i32* %13
%286 = call double @anorm2(double** %284, i32 %285)
%287 = fmul double 3.300000e-01, %286
store double %287, double* %23
br label %288
288: ; preds = %280, %222
%289 = load i32, i32* %10
%290 = zext i32 %289 to i64
%291 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %290
%292 = load double**, double*** %291
%293 = load i32, i32* %9
%294 = zext i32 %293 to i64
%295 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %294
%296 = load double**, double*** %295
%297 = load i32, i32* %13
%298 = load i32, i32* %10
%299 = zext i32 %298 to i64
%300 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %299
%301 = load double**, double*** %300
%302 = load i32, i32* %10
%303 = zext i32 %302 to i64
%304 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %303
%305 = load double**, double*** %304
%306 = load i32, i32* %10
%307 = zext i32 %306 to i64
%308 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %307
%309 = load double**, double*** %308
%310 = load i32, i32* %13
br label %311
311: ; preds = %288
%312 = load i32, i32* %9
%313 = add i32 %312, -1
store i32 %313, i32* %9
br label %202
314: ; preds = %202
%315 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 1
%316 = load double**, double*** %315
%317 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 1
%318 = load double**, double*** %317
store i32 3, i32* %13
store i32 2, i32* %9
br label %319
319: ; preds = %390, %314
%320 = load i32, i32* %9
%321 = load i32, i32* %7
%322 = icmp ule i32 %320, %321
br i1 %322, label %323, label %393
323: ; preds = %319
%324 = load i32, i32* %9
%325 = sub i32 %324, 1
store i32 %325, i32* %10
%326 = load i32, i32* %10
%327 = zext i32 %326 to i64
%328 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %327
%329 = load double**, double*** %328
%330 = load i32, i32* %9
%331 = zext i32 %330 to i64
%332 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %331
%333 = load double**, double*** %332
%334 = load i32, i32* %13
%335 = load i32, i32* %10
%336 = zext i32 %335 to i64
%337 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %336
%338 = load double**, double*** %337
%339 = load i32, i32* %10
%340 = zext i32 %339 to i64
%341 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %340
%342 = load double**, double*** %341
%343 = load i32, i32* %10
%344 = zext i32 %343 to i64
%345 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %344
%346 = load double**, double*** %345
%347 = load i32, i32* %13
%348 = load i32, i32* %13
%349 = mul i32 2, %348
%350 = sub i32 %349, 1
store i32 %350, i32* %13
%351 = load i32, i32* %9
%352 = zext i32 %351 to i64
%353 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %352
%354 = load double**, double*** %353
%355 = load i32, i32* %10
%356 = zext i32 %355 to i64
%357 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %356
%358 = load double**, double*** %357
%359 = load i32, i32* %13
%360 = load i32, i32* %9
%361 = zext i32 %360 to i64
%362 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %361
%363 = load double**, double*** %362
%364 = load i32, i32* %9
%365 = zext i32 %364 to i64
%366 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %365
%367 = load double**, double*** %366
%368 = load i32, i32* %9
%369 = zext i32 %368 to i64
%370 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %369
%371 = load double**, double*** %370
%372 = load i32, i32* %13
store i32 1, i32* %11
br label %373
373: ; preds = %386, %323
%374 = load i32, i32* %11
%375 = icmp ule i32 %374, 1
br i1 %375, label %376, label %389
376: ; preds = %373
%377 = load i32, i32* %9
%378 = zext i32 %377 to i64
%379 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %378
%380 = load double**, double*** %379
%381 = load i32, i32* %9
%382 = zext i32 %381 to i64
%383 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %382
%384 = load double**, double*** %383
%385 = load i32, i32* %13
br label %386
386: ; preds = %376
%387 = load i32, i32* %11
%388 = add i32 %387, 1
store i32 %388, i32* %11
br label %373
389: ; preds = %373
br label %390
390: ; preds = %389
%391 = load i32, i32* %9
%392 = add i32 %391, 1
store i32 %392, i32* %9
br label %319
393: ; preds = %319
%394 = load i32, i32* %7
%395 = zext i32 %394 to i64
%396 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %395
%397 = load double**, double*** %396
%398 = load i32, i32* %7
%399 = zext i32 %398 to i64
%400 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %399
%401 = load double**, double*** %400
%402 = load i32, i32* %13
%403 = load i32, i32* %7
%404 = zext i32 %403 to i64
%405 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %404
%406 = load double**, double*** %405
%407 = load i32, i32* %7
%408 = zext i32 %407 to i64
%409 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %408
%410 = load double**, double*** %409
%411 = load i32, i32* %7
%412 = zext i32 %411 to i64
%413 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %412
%414 = load double**, double*** %413
%415 = load i32, i32* %13
%416 = load i32, i32* %7
%417 = zext i32 %416 to i64
%418 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %417
%419 = load double**, double*** %418
%420 = load i32, i32* %13
%421 = call double @anorm2(double** %419, i32 %420)
store double %421, double* %22
%422 = load double, double* %22
%423 = load double, double* %23
%424 = fcmp olt double %422, %423
br i1 %424, label %425, label %426
425: ; preds = %393
br label %430
426: ; preds = %393
br label %427
427: ; preds = %426
%428 = load i32, i32* %8
%429 = add i32 %428, 1
store i32 %429, i32* %8
br label %195
430: ; preds = %425, %195
br label %431
431: ; preds = %430
%432 = load i32, i32* %7
%433 = add i32 %432, 1
store i32 %433, i32* %7
br label %128
434: ; preds = %128
%435 = load double**, double*** %4
%436 = load i32, i32* %15
%437 = zext i32 %436 to i64
%438 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %437
%439 = load double**, double*** %438
%440 = load i32, i32* %5
%441 = load i32, i32* %5
store i32 %441, i32* %16
%442 = load i32, i32* %14
store i32 %442, i32* %7
br label %443
443: ; preds = %490, %434
%444 = load i32, i32* %7
%445 = icmp uge i32 %444, 1
br i1 %445, label %446, label %496
446: ; preds = %443
%447 = load i32, i32* %7
%448 = zext i32 %447 to i64
%449 = getelementptr inbounds [16 x double**], [16 x double**]* %20, i64 0, i64 %448
%450 = load double**, double*** %449
%451 = load i32, i32* %16
%452 = load i32, i32* %16
%453 = call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %450, i32 1, i32 %451, i32 1, i32 %452)
%454 = load i32, i32* %7
%455 = zext i32 %454 to i64
%456 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %455
%457 = load double**, double*** %456
%458 = load i32, i32* %16
%459 = load i32, i32* %16
%460 = call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %457, i32 1, i32 %458, i32 1, i32 %459)
%461 = load i32, i32* %7
%462 = zext i32 %461 to i64
%463 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %462
%464 = load double**, double*** %463
%465 = load i32, i32* %16
%466 = load i32, i32* %16
%467 = call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %464, i32 1, i32 %465, i32 1, i32 %466)
%468 = load i32, i32* %7
%469 = zext i32 %468 to i64
%470 = getelementptr inbounds [16 x double**], [16 x double**]* %21, i64 0, i64 %469
%471 = load double**, double*** %470
%472 = load i32, i32* %16
%473 = load i32, i32* %16
%474 = call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %471, i32 1, i32 %472, i32 1, i32 %473)
%475 = load i32, i32* %7
%476 = load i32, i32* %14
%477 = icmp ne i32 %475, %476
br i1 %477, label %478, label %489
478: ; preds = %446
%479 = load i32, i32* %7
%480 = icmp ne i32 %479, 1
br i1 %480, label %481, label %489
481: ; preds = %478
%482 = load i32, i32* %7
%483 = zext i32 %482 to i64
%484 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %483
%485 = load double**, double*** %484
%486 = load i32, i32* %16
%487 = load i32, i32* %16
%488 = call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %485, i32 1, i32 %486, i32 1, i32 %487)
br label %489
489: ; preds = %481, %478, %446
br label %490
490: ; preds = %489
%491 = load i32, i32* %7
%492 = add i32 %491, -1
store i32 %492, i32* %7
%493 = load i32, i32* %16
%494 = udiv i32 %493, 2
%495 = add i32 %494, 1
store i32 %495, i32* %16
br label %443
496: ; preds = %443
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"n-1 must be a power of 2 in mgfas.\00"
@.str.1 = [25 x i8] c"increase NGMAX in mglin.\00"
define void @mgfas(double** %0, i32 %1, i32 %2) {
%4 = alloca [16 x double**]
%5 = alloca [16 x double**]
%6 = alloca [16 x double**]
%7 = alloca [16 x double**]
%8 = alloca [16 x double**]
%9 = bitcast [16 x double**]* %4 to i8*
%10 = bitcast [16 x double**]* %5 to i8*
%11 = bitcast [16 x double**]* %6 to i8*
%12 = bitcast [16 x double**]* %7 to i8*
%13 = bitcast [16 x double**]* %8 to i8*
%14 = icmp ult i32 %1, 2
br i1 %14, label %21, label %15
15: ; preds = %3, %15
%16 = phi i32 [ %18, %15 ], [ %1, %3 ]
%17 = phi i32 [ %19, %15 ], [ 0, %3 ]
%18 = lshr i32 %16, 1
%19 = add nuw nsw i32 %17, 1
%20 = icmp ult i32 %16, 4
br i1 %20, label %21, label %15
21: ; preds = %15, %3
%22 = phi i32 [ 0, %3 ], [ %19, %15 ]
%23 = sext i32 %1 to i64
%24 = zext i32 %22 to i64
%25 = shl nuw i64 1, %24
%26 = add nuw nsw i64 %25, 1
%27 = icmp eq i64 %26, %23
br i1 %27, label %30, label %28
28: ; preds = %21
%29 = tail call i32 (i8*, ...) bitcast (i32 (...)* @nrerror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %30
30: ; preds = %28, %21
%31 = icmp ugt i32 %22, 15
br i1 %31, label %32, label %34
32: ; preds = %30
%33 = tail call i32 (i8*, ...) bitcast (i32 (...)* @nrerror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
%35 = sdiv i32 %1, 2
%36 = add nsw i32 %35, 1
%37 = add i32 %22, -1
%38 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %36, i32 1, i32 %36)
%39 = sext i32 %38 to i64
%40 = inttoptr i64 %39 to double**
%41 = zext i32 %37 to i64
%42 = getelementptr inbounds [16 x double**], [16 x double**]* %4, i64 0, i64 %41
store double** %40, double*** %42
tail call void @rstrct(double** %40, double** %0, i32 %36)
%43 = icmp ugt i32 %36, 3
br i1 %43, label %44, label %57
44: ; preds = %34, %44
%45 = phi double** [ %52, %44 ], [ %40, %34 ]
%46 = phi i32 [ %49, %44 ], [ %36, %34 ]
%47 = phi i32 [ %53, %44 ], [ %37, %34 ]
%48 = lshr i32 %46, 1
%49 = add nuw i32 %48, 1
%50 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %49, i32 1, i32 %49)
%51 = sext i32 %50 to i64
%52 = inttoptr i64 %51 to double**
%53 = add i32 %47, -1
%54 = zext i32 %53 to i64
%55 = getelementptr inbounds [16 x double**], [16 x double**]* %4, i64 0, i64 %54
store double** %52, double*** %55
tail call void @rstrct(double** %52, double** %45, i32 %49)
%56 = icmp ugt i32 %46, 5
br i1 %56, label %44, label %57
57: ; preds = %44, %34
%58 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 3, i32 1, i32 3)
%59 = sext i32 %58 to i64
%60 = inttoptr i64 %59 to double**
%61 = getelementptr inbounds [16 x double**], [16 x double**]* %8, i64 0, i64 1
store double** %60, double*** %61
%62 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 3, i32 1, i32 3)
%63 = sext i32 %62 to i64
%64 = inttoptr i64 %63 to double**
%65 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 1
store double** %64, double*** %65
%66 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 3, i32 1, i32 3)
%67 = sext i32 %66 to i64
%68 = inttoptr i64 %67 to double**
%69 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 1
store double** %68, double*** %69
%70 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 3, i32 1, i32 3)
%71 = sext i32 %70 to i64
%72 = inttoptr i64 %71 to double**
%73 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 1
store double** %72, double*** %73
%74 = getelementptr inbounds [16 x double**], [16 x double**]* %4, i64 0, i64 1
%75 = load double**, double*** %74
tail call void @slvsm2(double** %60, double** %75)
%76 = tail call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %75, i32 1, i32 3, i32 1, i32 3)
%77 = icmp ult i32 %22, 2
br i1 %77, label %177, label %78
78: ; preds = %57
%79 = icmp eq i32 %2, 0
%80 = add nuw i32 %22, 2
%81 = zext i32 %80 to i64
br label %82
82: ; preds = %78, %173
%83 = phi double** [ %60, %78 ], [ %91, %173 ]
%84 = phi i64 [ 3, %78 ], [ %175, %173 ]
%85 = phi i64 [ 2, %78 ], [ %174, %173 ]
%86 = phi i32 [ 3, %78 ], [ %88, %173 ]
%87 = shl i32 %86, 1
%88 = add i32 %87, -1
%89 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %88, i32 1, i32 %88)
%90 = sext i32 %89 to i64
%91 = inttoptr i64 %90 to double**
%92 = getelementptr inbounds [16 x double**], [16 x double**]* %8, i64 0, i64 %85
store double** %91, double*** %92
%93 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %88, i32 1, i32 %88)
%94 = sext i32 %93 to i64
%95 = inttoptr i64 %94 to double**
%96 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 %85
store double** %95, double*** %96
%97 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %88, i32 1, i32 %88)
%98 = sext i32 %97 to i64
%99 = inttoptr i64 %98 to double**
%100 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 %85
store double** %99, double*** %100
%101 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 1, i32 %88, i32 1, i32 %88)
%102 = sext i32 %101 to i64
%103 = inttoptr i64 %102 to double**
%104 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %85
store double** %103, double*** %104
%105 = add nsw i64 %85, -1
%106 = getelementptr inbounds [16 x double**], [16 x double**]* %8, i64 0, i64 %105
tail call void @interp(double** %91, double** %83, i32 %88)
%107 = icmp eq i64 %85, %24
br i1 %107, label %111, label %108
108: ; preds = %82
%109 = getelementptr inbounds [16 x double**], [16 x double**]* %4, i64 0, i64 %85
%110 = load double**, double*** %109
br label %111
111: ; preds = %82, %108
%112 = phi double** [ %110, %108 ], [ %0, %82 ]
tail call void @copy(double** %95, double** %112, i32 %88)
br i1 %79, label %173, label %113
113: ; preds = %111
%114 = load double**, double*** %61
%115 = load double**, double*** %65
%116 = lshr i32 %88, 1
%117 = add nuw i32 %116, 1
%118 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %105
%119 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 %105
%120 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 %105
%121 = icmp ugt i64 %105, 1
br label %122
122: ; preds = %113, %167
%123 = phi i32 [ 1, %113 ], [ %170, %167 ]
tail call void @relax2(double** %91, double** %95, i32 %88)
tail call void @lop(double** %103, double** %91, i32 %88)
%124 = load double**, double*** %118
tail call void @rstrct(double** %124, double** %103, i32 %117)
%125 = load double**, double*** %106
tail call void @rstrct(double** %125, double** %91, i32 %117)
%126 = load double**, double*** %119
tail call void @lop(double** %126, double** %125, i32 %117)
tail call void @matsub(double** %126, double** %124, double** %126, i32 %117)
%127 = tail call double @anorm2(double** %126, i32 %117)
%128 = fmul double %127, 3.300000e-01
%129 = load double**, double*** %120
tail call void @rstrct(double** %129, double** %95, i32 %117)
tail call void @matadd(double** %129, double** %126, double** %129, i32 %117)
br i1 %121, label %130, label %148
130: ; preds = %122, %130
%131 = phi double** [ %140, %130 ], [ %124, %122 ]
%132 = phi double** [ %146, %130 ], [ %129, %122 ]
%133 = phi double** [ %142, %130 ], [ %125, %122 ]
%134 = phi i64 [ %138, %130 ], [ %105, %122 ]
%135 = phi i32 [ %137, %130 ], [ %117, %122 ]
tail call void @relax2(double** %133, double** %132, i32 %135)
tail call void @lop(double** %131, double** %133, i32 %135)
%136 = lshr i32 %135, 1
%137 = add nuw i32 %136, 1
%138 = add nsw i64 %134, -1
%139 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %138
%140 = load double**, double*** %139
tail call void @rstrct(double** %140, double** %131, i32 %137)
%141 = getelementptr inbounds [16 x double**], [16 x double**]* %8, i64 0, i64 %138
%142 = load double**, double*** %141
tail call void @rstrct(double** %142, double** %133, i32 %137)
%143 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 %138
%144 = load double**, double*** %143
tail call void @lop(double** %144, double** %142, i32 %137)
tail call void @matsub(double** %144, double** %140, double** %144, i32 %137)
%145 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 %138
%146 = load double**, double*** %145
tail call void @rstrct(double** %146, double** %132, i32 %137)
tail call void @matadd(double** %146, double** %144, double** %146, i32 %137)
%147 = icmp ugt i64 %138, 1
br i1 %147, label %130, label %148
148: ; preds = %130, %122
tail call void @slvsm2(double** %114, double** %115)
br label %149
149: ; preds = %148, %149
%150 = phi i64 [ 2, %148 ], [ %165, %149 ]
%151 = phi i32 [ 3, %148 ], [ %160, %149 ]
%152 = add nsw i64 %150, -1
%153 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %152
%154 = load double**, double*** %153
%155 = getelementptr inbounds [16 x double**], [16 x double**]* %8, i64 0, i64 %150
%156 = load double**, double*** %155
tail call void @rstrct(double** %154, double** %156, i32 %151)
%157 = getelementptr inbounds [16 x double**], [16 x double**]* %8, i64 0, i64 %152
%158 = load double**, double*** %157
tail call void @matsub(double** %158, double** %154, double** %154, i32 %151)
%159 = shl i32 %151, 1
%160 = add i32 %159, -1
%161 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 %150
%162 = load double**, double*** %161
tail call void @interp(double** %162, double** %154, i32 %160)
tail call void @matadd(double** %156, double** %162, double** %156, i32 %160)
%163 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 %150
%164 = load double**, double*** %163
tail call void @relax2(double** %156, double** %164, i32 %160)
%165 = add nuw nsw i64 %150, 1
%166 = icmp eq i64 %165, %84
br i1 %166, label %167, label %149
167: ; preds = %149
tail call void @lop(double** %103, double** %91, i32 %160)
tail call void @matsub(double** %103, double** %95, double** %103, i32 %160)
%168 = tail call double @anorm2(double** %103, i32 %160)
%169 = fcmp olt double %168, %128
%170 = add i32 %123, 1
%171 = icmp ugt i32 %170, %2
%172 = select i1 %169, i1 true, i1 %171
br i1 %172, label %173, label %122
173: ; preds = %167, %111
%174 = add nuw nsw i64 %85, 1
%175 = add nuw nsw i64 %84, 1
%176 = icmp eq i64 %175, %81
br i1 %176, label %177, label %82
177: ; preds = %173, %57
%178 = getelementptr inbounds [16 x double**], [16 x double**]* %8, i64 0, i64 %24
%179 = load double**, double*** %178
tail call void @copy(double** %0, double** %179, i32 %1)
%180 = icmp eq i32 %22, 0
br i1 %180, label %209, label %181
181: ; preds = %177, %203
%182 = phi i64 [ %204, %203 ], [ %24, %177 ]
%183 = phi i32 [ %207, %203 ], [ %1, %177 ]
%184 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %182
%185 = load double**, double*** %184
%186 = tail call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %185, i32 1, i32 %183, i32 1, i32 %183)
%187 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 %182
%188 = load double**, double*** %187
%189 = tail call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %188, i32 1, i32 %183, i32 1, i32 %183)
%190 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 %182
%191 = load double**, double*** %190
%192 = tail call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %191, i32 1, i32 %183, i32 1, i32 %183)
%193 = getelementptr inbounds [16 x double**], [16 x double**]* %8, i64 0, i64 %182
%194 = load double**, double*** %193
%195 = tail call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %194, i32 1, i32 %183, i32 1, i32 %183)
%196 = icmp ne i64 %182, %24
%197 = icmp ne i64 %182, 1
%198 = and i1 %196, %197
br i1 %198, label %199, label %203
199: ; preds = %181
%200 = getelementptr inbounds [16 x double**], [16 x double**]* %4, i64 0, i64 %182
%201 = load double**, double*** %200
%202 = tail call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %201, i32 1, i32 %183, i32 1, i32 %183)
br label %203
203: ; preds = %181, %199
%204 = add nsw i64 %182, -1
%205 = trunc i64 %204 to i32
%206 = lshr i32 %183, 1
%207 = add nuw i32 %206, 1
%208 = icmp eq i32 %205, 0
br i1 %208, label %209, label %181
209: ; preds = %203, %177
ret void
}