#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double **dmatrix(int, unsigned int, int, unsigned int);
int /*<<< orphan*/ free_dmatrix(double **, int, int, int, int);
int /*<<< orphan*/ nrerror(char *);
void mglin(double **u, int n, int ncycle) {
  void addint(double **uf, double **uc, double **res, int nf);
  void copy(double **aout, double **ain, int n);
  void fill0(double **u, int n);
  void interp(double **uf, double **uc, int nf);
  void relax(double **u, double **rhs, int n);
  void resid(double **res, double **u, double **rhs, int n);
  void rstrct(double **uc, double **uf, int nc);
  void slvsml(double **u, double **rhs);
  unsigned int j, jcycle, jj, jpost, jpre, nf, ng = 0, ngrid, nn;
  double **ires[15 + 1], **irho[15 + 1], **irhs[15 + 1], **iu[15 + 1];
  nn = n;
  while (nn >>= 1)
    ng++;
  if (n != 1 + (1L << ng))
    nrerror("n-1 must be a power of 2 in mglin.");
  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);
  slvsml(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);
    ires[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 <= ncycle; jcycle++) {
      nf = nn;
      for (jj = j; jj >= 2; jj--) {
        for (jpre = 1; jpre <= 1; jpre++)
          relax(iu[jj], irhs[jj], nf);
        resid(ires[jj], iu[jj], irhs[jj], nf);
        nf = nf / 2 + 1;
        rstrct(irhs[jj - 1], ires[jj], nf);
        fill0(iu[jj - 1], nf);
      }
      slvsml(iu[1], irhs[1]);
      nf = 3;
      for (jj = 2; jj <= j; jj++) {
        nf = 2 * nf - 1;
        addint(iu[jj], iu[jj - 1], ires[jj], nf);
        for (jpost = 1; jpost <= 1; jpost++)
          relax(iu[jj], irhs[jj], nf);
      }
    }
  }
  copy(u, iu[ngrid], n);
  for (nn = n, j = ng; j >= 2; j--, nn = nn / 2 + 1) {
    free_dmatrix(ires[j], 1, nn, 1, nn);
    free_dmatrix(irhs[j], 1, nn, 1, nn);
    free_dmatrix(iu[j], 1, nn, 1, nn);
    if (j != ng)
      free_dmatrix(irho[j], 1, nn, 1, nn);
  }
  free_dmatrix(irhs[1], 1, 3, 1, 3);
  free_dmatrix(iu[1], 1, 3, 1, 3);
}


x86 assembly (clang, -O0):
<mglin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x250,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
je     11f2 <mglin+0x42>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11d2 <mglin+0x22>
movslq -0xc(%rbp),%rax
mov    -0x2c(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
je     121d <mglin+0x6d>
lea    0xde8(%rip),%rdi
call   1050 <nrerror@plt>
cmpl   $0xf,-0x2c(%rbp)
jbe    1233 <mglin+0x83>
lea    0xdf5(%rip),%rdi
call   1050 <nrerror@plt>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x34(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
call   1080 <dmatrix@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%eax
mov    %rcx,-0x140(%rbp,%rax,8)
ff
mov    -0x30(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rdi
ff
mov    -0x8(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1090 <rstrct@plt>
cmpl   $0x3,-0x34(%rbp)
jbe    12ea <mglin+0x13a>
mov    -0x34(%rbp),%eax
shr    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x34(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
call   1080 <dmatrix@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x30(%rbp)
mov    %eax,%eax
mov    %rcx,-0x140(%rbp,%rax,8)
ff
mov    -0x30(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rdi
ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    -0x140(%rbp,%rax,8),%rsi
ff
mov    -0x34(%rbp),%edx
call   1090 <rstrct@plt>
jmp    1284 <mglin+0xd4>
movl   $0x3,-0x34(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x34(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
call   1080 <dmatrix@plt>
mov    %rax,-0x238(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x34(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
call   1080 <dmatrix@plt>
mov    %rax,-0x1b8(%rbp)
mov    -0x238(%rbp),%rdi
mov    -0x138(%rbp),%rsi
call   10d0 <slvsml@plt>
mov    -0x138(%rbp),%rdi
mov    -0x34(%rbp),%edx
mov    -0x34(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
call   10b0 <free_dmatrix@plt>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x30(%rbp),%eax
ja     160f <mglin+0x45f>
mov    -0x34(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x34(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
call   1080 <dmatrix@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
mov    %rcx,-0x240(%rbp,%rax,8)
ff
mov    -0x34(%rbp),%esi
mov    -0x34(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
call   1080 <dmatrix@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
mov    %rcx,-0x1c0(%rbp,%rax,8)
ff
mov    -0x34(%rbp),%esi
mov    -0x34(%rbp),%ecx
mov    $0x1,%edx
mov    %edx,%edi
call   1080 <dmatrix@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
mov    %rcx,-0xc0(%rbp,%rax,8)
ff
mov    -0x14(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
mov    -0x240(%rbp,%rax,8),%rsi
ff
mov    -0x34(%rbp),%edx
call   1060 <interp@plt>
mov    -0x14(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rax
ff
mov    %rax,-0x248(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x30(%rbp),%eax
je     142d <mglin+0x27d>
mov    -0x14(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rax
ff
mov    %rax,-0x250(%rbp)
jmp    1438 <mglin+0x288>
mov    -0x8(%rbp),%rax
mov    %rax,-0x250(%rbp)
mov    -0x248(%rbp),%rdi
mov    -0x250(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1070 <copy@plt>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
ja     15fc <mglin+0x44c>
mov    -0x34(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jb     1532 <mglin+0x382>
movl   $0x1,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
ja     14b4 <mglin+0x304>
mov    -0x1c(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rsi
ff
mov    -0x28(%rbp),%edx
call   10a0 <relax@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    147e <mglin+0x2ce>
mov    -0x1c(%rbp),%eax
mov    -0xc0(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rsi
ff
mov    -0x1c(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rdx
ff
mov    -0x28(%rbp),%ecx
call   1030 <resid@plt>
mov    -0x28(%rbp),%eax
shr    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
mov    -0x1c0(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0xc0(%rbp,%rax,8),%rsi
ff
mov    -0x28(%rbp),%edx
call   1090 <rstrct@plt>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x28(%rbp),%esi
call   1040 <fill0@plt>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    146d <mglin+0x2bd>
mov    -0x238(%rbp),%rdi
mov    -0x1b8(%rbp),%rsi
call   10d0 <slvsml@plt>
movl   $0x3,-0x28(%rbp)
movl   $0x2,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
ja     15e9 <mglin+0x439>
mov    -0x28(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
mov    -0x240(%rbp,%rax,8),%rsi
ff
mov    -0x1c(%rbp),%eax
mov    -0xc0(%rbp,%rax,8),%rdx
ff
mov    -0x28(%rbp),%ecx
call   10c0 <addint@plt>
movl   $0x1,-0x20(%rbp)
cmpl   $0x1,-0x20(%rbp)
ja     15d6 <mglin+0x426>
mov    -0x1c(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x1c(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rsi
ff
mov    -0x28(%rbp),%edx
call   10a0 <relax@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    15a0 <mglin+0x3f0>
jmp    15db <mglin+0x42b>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1553 <mglin+0x3a3>
jmp    15ee <mglin+0x43e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1455 <mglin+0x2a5>
jmp    1601 <mglin+0x451>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    135d <mglin+0x1ad>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rsi
ff
mov    -0xc(%rbp),%edx
call   1070 <copy@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jb     16df <mglin+0x52f>
mov    -0x14(%rbp),%eax
mov    -0xc0(%rbp,%rax,8),%rdi
ff
mov    -0x34(%rbp),%edx
mov    -0x34(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
call   10b0 <free_dmatrix@plt>
mov    -0x14(%rbp),%eax
mov    -0x1c0(%rbp,%rax,8),%rdi
ff
mov    -0x34(%rbp),%edx
mov    -0x34(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
call   10b0 <free_dmatrix@plt>
mov    -0x14(%rbp),%eax
mov    -0x240(%rbp,%rax,8),%rdi
ff
mov    -0x34(%rbp),%edx
mov    -0x34(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
call   10b0 <free_dmatrix@plt>
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     16c0 <mglin+0x510>
mov    -0x14(%rbp),%eax
mov    -0x140(%rbp,%rax,8),%rdi
ff
mov    -0x34(%rbp),%edx
mov    -0x34(%rbp),%r8d
mov    $0x1,%ecx
mov    %ecx,%esi
call   10b0 <free_dmatrix@plt>
jmp    16c5 <mglin+0x515>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x34(%rbp),%eax
shr    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1632 <mglin+0x482>
mov    -0x1b8(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x3,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   10b0 <free_dmatrix@plt>
mov    -0x238(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x3,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   10b0 <free_dmatrix@plt>
add    $0x250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mglin>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x278,%rsp
mov    %edx,0x4(%rsp)
mov    %esi,%r13d
mov    %rdi,0x8(%rsp)
xor    %ecx,%ecx
cmp    $0x2,%esi
jb     11ec <mglin+0x3c>
xor    %ecx,%ecx
mov    %r13d,%eax
mov    %r13d,%edx
nopl   0x0(%rax)
shr    %edx
add    $0x1,%ecx
cmp    $0x3,%eax
mov    %edx,%eax
ja     11e0 <mglin+0x30>
mov    $0x1,%eax
shl    %cl,%rax
movslq %r13d,%rdx
mov    %ecx,%ebx
add    $0x1,%rax
cmp    %rdx,%rax
je     120e <mglin+0x5e>
lea    0xdf7(%rip),%rdi
call   1050 <nrerror@plt>
cmp    $0x10,%ebx
jb     121f <mglin+0x6f>
lea    0xe09(%rip),%rdi
call   1050 <nrerror@plt>
mov    %r13d,%r14d
shr    $0x1f,%r14d
add    %r13d,%r14d
sar    %r14d
add    $0x1,%r14d
mov    %rbx,0x10(%rsp)
add    $0xffffffff,%ebx
mov    $0x1,%edi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %r14d,%ecx
call   1080 <dmatrix@plt>
mov    %rax,%r15
mov    %rax,0x170(%rsp,%rbx,8)
mov    %rax,%rdi
mov    0x8(%rsp),%rsi
mov    %r14d,%edx
call   1090 <rstrct@plt>
cmp    $0x4,%r14d
jb     12c1 <mglin+0x111>
mov    0x10(%rsp),%rax
lea    -0x2(%rax),%ebp
mov    %r14d,%ebx
nopl   0x0(%rax)
shr    %ebx
add    $0x1,%ebx
mov    $0x1,%edi
mov    %ebx,%esi
mov    $0x1,%edx
mov    %ebx,%ecx
call   1080 <dmatrix@plt>
mov    %rax,%r12
mov    %ebp,%eax
mov    %r12,0x170(%rsp,%rax,8)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1090 <rstrct@plt>
add    $0xffffffff,%ebp
mov    %r12,%r15
cmp    $0x5,%r14d
mov    %ebx,%r14d
ja     1280 <mglin+0xd0>
mov    $0x3,%r15d
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1080 <dmatrix@plt>
mov    %rax,%rbx
mov    %rax,0x78(%rsp)
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1080 <dmatrix@plt>
mov    %rax,0xf8(%rsp)
mov    0x178(%rsp),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10d0 <slvsml@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
call   10b0 <free_dmatrix@plt>
mov    0x10(%rsp),%r12
cmp    $0x1,%r12d
ja     135b <mglin+0x1ab>
mov    0x70(%rsp,%r12,8),%rsi
mov    0x8(%rsp),%rdi
mov    %r13d,%edx
call   1070 <copy@plt>
jmp    1696 <mglin+0x4e6>
mov    %r13d,0x24(%rsp)
lea    0x2(%r12),%eax
mov    %rax,0x28(%rsp)
mov    $0x2,%r14d
mov    $0x3,%eax
mov    $0x8,%r13d
jmp    13a1 <mglin+0x1f1>
nopl   (%rax)
add    $0x1,%r14
mov    0x30(%rsp),%rax
add    $0x1,%rax
add    $0x8,%r13
cmp    0x28(%rsp),%rax
mov    0x10(%rsp),%r12
je     1587 <mglin+0x3d7>
mov    %rax,0x30(%rsp)
mov    %rbx,0x18(%rsp)
add    %r15d,%r15d
add    $0xffffffff,%r15d
mov    $0x1,%edi
mov    %r15d,%esi
mov    $0x1,%edx
mov    %r15d,%ecx
call   1080 <dmatrix@plt>
mov    %rax,%rbx
mov    %rax,0x70(%rsp,%r14,8)
mov    $0x1,%edi
mov    %r15d,%esi
mov    $0x1,%edx
mov    %r15d,%ecx
call   1080 <dmatrix@plt>
mov    %rax,%rbp
mov    %rax,0xf0(%rsp,%r14,8)
mov    $0x1,%edi
mov    %r15d,%esi
mov    $0x1,%edx
mov    %r15d,%ecx
call   1080 <dmatrix@plt>
mov    %rax,0x1f0(%rsp,%r14,8)
mov    %rbx,%rdi
mov    0x18(%rsp),%rsi
mov    %r15d,%edx
call   1060 <interp@plt>
mov    0x8(%rsp),%rsi
cmp    %r12,%r14
je     142e <mglin+0x27e>
mov    0x170(%rsp,%r14,8),%rsi
mov    %rbp,%rdi
mov    %r15d,%edx
call   1070 <copy@plt>
cmpl   $0x0,0x4(%rsp)
je     1380 <mglin+0x1d0>
mov    0x78(%rsp),%rax
mov    %rax,0x40(%rsp)
mov    $0x1,%eax
mov    0xf8(%rsp),%rcx
mov    %rcx,0x38(%rsp)
mov    %r15,0x68(%rsp)
mov    %rbx,0x60(%rsp)
mov    %r14,0x58(%rsp)
mov    %r13,0x50(%rsp)
mov    %rbp,0x48(%rsp)
nopl   0x0(%rax)
mov    %eax,0x18(%rsp)
mov    %r15d,%r12d
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r12d,%edx
call   10a0 <relax@plt>
mov    0x1f0(%rsp,%r14,8),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    %r12d,%ecx
call   1030 <resid@plt>
shr    %r12d
add    $0x1,%r12d
lea    -0x1(%r14),%r15
mov    0xe8(%rsp,%r14,8),%rbp
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r12d,%edx
call   1090 <rstrct@plt>
mov    0x68(%rsp,%r14,8),%rbx
mov    %rbx,%rdi
mov    %r12d,%esi
call   1040 <fill0@plt>
mov    %r15,%r14
cmp    $0x1,%r15
ja     1490 <mglin+0x2e0>
mov    0x40(%rsp),%r14
mov    %r14,%rdi
mov    0x38(%rsp),%rsi
call   10d0 <slvsml@plt>
mov    $0x3,%ebp
xor    %ebx,%ebx
mov    %r14,%rsi
mov    0x50(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %ebp,%ebp
add    $0xffffffff,%ebp
mov    0x80(%rsp,%rbx,1),%r14
mov    0x200(%rsp,%rbx,1),%rdx
mov    %r14,%rdi
mov    %ebp,%ecx
call   10c0 <addint@plt>
mov    0x100(%rsp,%rbx,1),%rsi
mov    %r14,%rdi
mov    %ebp,%edx
call   10a0 <relax@plt>
add    $0x8,%rbx
mov    %r14,%rsi
cmp    %rbx,%r13
jne    1520 <mglin+0x370>
mov    0x18(%rsp),%eax
add    $0x1,%eax
cmp    0x4(%rsp),%eax
mov    0x68(%rsp),%r15
mov    0x60(%rsp),%rbx
mov    0x58(%rsp),%r14
mov    0x48(%rsp),%rbp
jbe    1480 <mglin+0x2d0>
jmp    1380 <mglin+0x1d0>
mov    0x70(%rsp,%r12,8),%r14
mov    0x8(%rsp),%rdi
mov    %r14,%rsi
mov    0x24(%rsp),%ebp
mov    %ebp,%edx
call   1070 <copy@plt>
cmp    $0x2,%r12d
jb     1696 <mglin+0x4e6>
mov    0x1f0(%rsp,%r12,8),%rdi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
call   10b0 <free_dmatrix@plt>
mov    0xf0(%rsp,%r12,8),%rdi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
call   10b0 <free_dmatrix@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
call   10b0 <free_dmatrix@plt>
lea    -0x1(%r12),%eax
test   $0xfffffffe,%eax
je     1696 <mglin+0x4e6>
add    $0xfffffffffffffffe,%r12
mov    %r12,%r14
nop
shr    %ebp
add    $0x1,%ebp
mov    0x1f8(%rsp,%r12,8),%rdi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
call   10b0 <free_dmatrix@plt>
mov    0xf8(%rsp,%r12,8),%rdi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
call   10b0 <free_dmatrix@plt>
mov    0x78(%rsp,%r12,8),%rdi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
call   10b0 <free_dmatrix@plt>
mov    0x178(%rsp,%r12,8),%rdi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
call   10b0 <free_dmatrix@plt>
add    $0xffffffffffffffff,%r14
test   $0xfffffffe,%r12d
mov    %r14,%r12
jne    1610 <mglin+0x460>
mov    0xf8(%rsp),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
call   10b0 <free_dmatrix@plt>
mov    0x78(%rsp),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
add    $0x278,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10b0 <free_dmatrix@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"n-1 must be a power of 2 in mglin.\00"
@.str.1 = [25 x i8] c"increase NGMAX in mglin.\00"
define void @mglin(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 [16 x double**]
%17 = alloca [16 x double**]
%18 = alloca [16 x double**]
%19 = alloca [16 x double**]
store double** %0, double*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %13
%20 = load i32, i32* %5
store i32 %20, i32* %15
br label %21
21: ; preds = %25, %3
%22 = load i32, i32* %15
%23 = lshr i32 %22, 1
store i32 %23, i32* %15
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %21
%26 = load i32, i32* %13
%27 = add i32 %26, 1
store i32 %27, i32* %13
br label %21
28: ; preds = %21
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = load i32, i32* %13
%32 = zext i32 %31 to i64
%33 = shl i64 1, %32
%34 = add nsw i64 1, %33
%35 = icmp ne i64 %30, %34
br i1 %35, label %36, label %38
36: ; preds = %28
%37 = call i32 @nrerror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %38
38: ; preds = %36, %28
%39 = load i32, i32* %13
%40 = icmp ugt i32 %39, 15
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = call i32 @nrerror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %43
43: ; preds = %41, %38
%44 = load i32, i32* %5
%45 = sdiv i32 %44, 2
%46 = add nsw i32 %45, 1
store i32 %46, i32* %15
%47 = load i32, i32* %13
%48 = sub i32 %47, 1
store i32 %48, i32* %14
%49 = load i32, i32* %15
%50 = load i32, i32* %15
%51 = call double** @dmatrix(i32 1, i32 %49, i32 1, i32 %50)
%52 = load i32, i32* %14
%53 = zext i32 %52 to i64
%54 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %53
store double** %51, double*** %54
%55 = load i32, i32* %14
%56 = zext i32 %55 to i64
%57 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %56
%58 = load double**, double*** %57
%59 = load double**, double*** %4
%60 = load i32, i32* %15
br label %61
61: ; preds = %64, %43
%62 = load i32, i32* %15
%63 = icmp ugt i32 %62, 3
br i1 %63, label %64, label %85
64: ; preds = %61
%65 = load i32, i32* %15
%66 = udiv i32 %65, 2
%67 = add i32 %66, 1
store i32 %67, i32* %15
%68 = load i32, i32* %15
%69 = load i32, i32* %15
%70 = call double** @dmatrix(i32 1, i32 %68, i32 1, i32 %69)
%71 = load i32, i32* %14
%72 = add i32 %71, -1
store i32 %72, i32* %14
%73 = zext i32 %72 to i64
%74 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %73
store double** %70, double*** %74
%75 = load i32, i32* %14
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %76
%78 = load double**, double*** %77
%79 = load i32, i32* %14
%80 = add i32 %79, 1
%81 = zext i32 %80 to i64
%82 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %81
%83 = load double**, double*** %82
%84 = load i32, i32* %15
br label %61
85: ; preds = %61
store i32 3, i32* %15
%86 = load i32, i32* %15
%87 = load i32, i32* %15
%88 = call double** @dmatrix(i32 1, i32 %86, i32 1, i32 %87)
%89 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 1
store double** %88, double*** %89
%90 = load i32, i32* %15
%91 = load i32, i32* %15
%92 = call double** @dmatrix(i32 1, i32 %90, i32 1, i32 %91)
%93 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 1
store double** %92, double*** %93
%94 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 1
%95 = load double**, double*** %94
%96 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 1
%97 = load double**, double*** %96
%98 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 1
%99 = load double**, double*** %98
%100 = load i32, i32* %15
%101 = load i32, i32* %15
%102 = call i32 @free_dmatrix(double** %99, i32 1, i32 %100, i32 1, i32 %101)
%103 = load i32, i32* %13
store i32 %103, i32* %14
store i32 2, i32* %7
br label %104
104: ; preds = %272, %85
%105 = load i32, i32* %7
%106 = load i32, i32* %14
%107 = icmp ule i32 %105, %106
br i1 %107, label %108, label %275
108: ; preds = %104
%109 = load i32, i32* %15
%110 = mul i32 2, %109
%111 = sub i32 %110, 1
store i32 %111, i32* %15
%112 = load i32, i32* %15
%113 = load i32, i32* %15
%114 = call double** @dmatrix(i32 1, i32 %112, i32 1, i32 %113)
%115 = load i32, i32* %7
%116 = zext i32 %115 to i64
%117 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %116
store double** %114, double*** %117
%118 = load i32, i32* %15
%119 = load i32, i32* %15
%120 = call double** @dmatrix(i32 1, i32 %118, i32 1, i32 %119)
%121 = load i32, i32* %7
%122 = zext i32 %121 to i64
%123 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %122
store double** %120, double*** %123
%124 = load i32, i32* %15
%125 = load i32, i32* %15
%126 = call double** @dmatrix(i32 1, i32 %124, i32 1, i32 %125)
%127 = load i32, i32* %7
%128 = zext i32 %127 to i64
%129 = getelementptr inbounds [16 x double**], [16 x double**]* %16, i64 0, i64 %128
store double** %126, double*** %129
%130 = load i32, i32* %7
%131 = zext i32 %130 to i64
%132 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %131
%133 = load double**, double*** %132
%134 = load i32, i32* %7
%135 = sub i32 %134, 1
%136 = zext i32 %135 to i64
%137 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %136
%138 = load double**, double*** %137
%139 = load i32, i32* %15
%140 = load i32, i32* %7
%141 = zext i32 %140 to i64
%142 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %141
%143 = load double**, double*** %142
%144 = load i32, i32* %7
%145 = load i32, i32* %14
%146 = icmp ne i32 %144, %145
br i1 %146, label %147, label %152
147: ; preds = %108
%148 = load i32, i32* %7
%149 = zext i32 %148 to i64
%150 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %149
%151 = load double**, double*** %150
br label %154
152: ; preds = %108
%153 = load double**, double*** %4
br label %154
154: ; preds = %152, %147
%155 = phi double** [ %151, %147 ], [ %153, %152 ]
%156 = load i32, i32* %15
store i32 1, i32* %8
br label %157
157: ; preds = %268, %154
%158 = load i32, i32* %8
%159 = load i32, i32* %6
%160 = icmp ule i32 %158, %159
br i1 %160, label %161, label %271
161: ; preds = %157
%162 = load i32, i32* %15
store i32 %162, i32* %12
%163 = load i32, i32* %7
store i32 %163, i32* %9
br label %164
164: ; preds = %217, %161
%165 = load i32, i32* %9
%166 = icmp uge i32 %165, 2
br i1 %166, label %167, label %220
167: ; preds = %164
store i32 1, i32* %11
br label %168
168: ; preds = %181, %167
%169 = load i32, i32* %11
%170 = icmp ule i32 %169, 1
br i1 %170, label %171, label %184
171: ; preds = %168
%172 = load i32, i32* %9
%173 = zext i32 %172 to i64
%174 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %173
%175 = load double**, double*** %174
%176 = load i32, i32* %9
%177 = zext i32 %176 to i64
%178 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %177
%179 = load double**, double*** %178
%180 = load i32, i32* %12
br label %181
181: ; preds = %171
%182 = load i32, i32* %11
%183 = add i32 %182, 1
store i32 %183, i32* %11
br label %168
184: ; preds = %168
%185 = load i32, i32* %9
%186 = zext i32 %185 to i64
%187 = getelementptr inbounds [16 x double**], [16 x double**]* %16, i64 0, i64 %186
%188 = load double**, double*** %187
%189 = load i32, i32* %9
%190 = zext i32 %189 to i64
%191 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %190
%192 = load double**, double*** %191
%193 = load i32, i32* %9
%194 = zext i32 %193 to i64
%195 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %194
%196 = load double**, double*** %195
%197 = load i32, i32* %12
%198 = load i32, i32* %12
%199 = udiv i32 %198, 2
%200 = add i32 %199, 1
store i32 %200, i32* %12
%201 = load i32, i32* %9
%202 = sub i32 %201, 1
%203 = zext i32 %202 to i64
%204 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %203
%205 = load double**, double*** %204
%206 = load i32, i32* %9
%207 = zext i32 %206 to i64
%208 = getelementptr inbounds [16 x double**], [16 x double**]* %16, i64 0, i64 %207
%209 = load double**, double*** %208
%210 = load i32, i32* %12
%211 = load i32, i32* %9
%212 = sub i32 %211, 1
%213 = zext i32 %212 to i64
%214 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %213
%215 = load double**, double*** %214
%216 = load i32, i32* %12
br label %217
217: ; preds = %184
%218 = load i32, i32* %9
%219 = add i32 %218, -1
store i32 %219, i32* %9
br label %164
220: ; preds = %164
%221 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 1
%222 = load double**, double*** %221
%223 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 1
%224 = load double**, double*** %223
store i32 3, i32* %12
store i32 2, i32* %9
br label %225
225: ; preds = %264, %220
%226 = load i32, i32* %9
%227 = load i32, i32* %7
%228 = icmp ule i32 %226, %227
br i1 %228, label %229, label %267
229: ; preds = %225
%230 = load i32, i32* %12
%231 = mul i32 2, %230
%232 = sub i32 %231, 1
store i32 %232, i32* %12
%233 = load i32, i32* %9
%234 = zext i32 %233 to i64
%235 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %234
%236 = load double**, double*** %235
%237 = load i32, i32* %9
%238 = sub i32 %237, 1
%239 = zext i32 %238 to i64
%240 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %239
%241 = load double**, double*** %240
%242 = load i32, i32* %9
%243 = zext i32 %242 to i64
%244 = getelementptr inbounds [16 x double**], [16 x double**]* %16, i64 0, i64 %243
%245 = load double**, double*** %244
%246 = load i32, i32* %12
store i32 1, i32* %10
br label %247
247: ; preds = %260, %229
%248 = load i32, i32* %10
%249 = icmp ule i32 %248, 1
br i1 %249, label %250, label %263
250: ; preds = %247
%251 = load i32, i32* %9
%252 = zext i32 %251 to i64
%253 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %252
%254 = load double**, double*** %253
%255 = load i32, i32* %9
%256 = zext i32 %255 to i64
%257 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %256
%258 = load double**, double*** %257
%259 = load i32, i32* %12
br label %260
260: ; preds = %250
%261 = load i32, i32* %10
%262 = add i32 %261, 1
store i32 %262, i32* %10
br label %247
263: ; preds = %247
br label %264
264: ; preds = %263
%265 = load i32, i32* %9
%266 = add i32 %265, 1
store i32 %266, i32* %9
br label %225
267: ; preds = %225
br label %268
268: ; preds = %267
%269 = load i32, i32* %8
%270 = add i32 %269, 1
store i32 %270, i32* %8
br label %157
271: ; preds = %157
br label %272
272: ; preds = %271
%273 = load i32, i32* %7
%274 = add i32 %273, 1
store i32 %274, i32* %7
br label %104
275: ; preds = %104
%276 = load double**, double*** %4
%277 = load i32, i32* %14
%278 = zext i32 %277 to i64
%279 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 %278
%280 = load double**, double*** %279
%281 = load i32, i32* %5
%282 = load i32, i32* %5
store i32 %282, i32* %15
%283 = load i32, i32* %13
store i32 %283, i32* %7
br label %284
284: ; preds = %321, %275
%285 = load i32, i32* %7
%286 = icmp uge i32 %285, 2
br i1 %286, label %287, label %327
287: ; preds = %284
%288 = load i32, i32* %7
%289 = zext i32 %288 to i64
%290 = getelementptr inbounds [16 x double**], [16 x double**]* %16, i64 0, i64 %289
%291 = load double**, double*** %290
%292 = load i32, i32* %15
%293 = load i32, i32* %15
%294 = call i32 @free_dmatrix(double** %291, i32 1, i32 %292, i32 1, i32 %293)
%295 = load i32, i32* %7
%296 = zext i32 %295 to i64
%297 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 %296
%298 = load double**, double*** %297
%299 = load i32, i32* %15
%300 = load i32, i32* %15
%301 = call i32 @free_dmatrix(double** %298, i32 1, i32 %299, i32 1, i32 %300)
%302 = load i32, i32* %7
%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* %15
%307 = load i32, i32* %15
%308 = call i32 @free_dmatrix(double** %305, i32 1, i32 %306, i32 1, i32 %307)
%309 = load i32, i32* %7
%310 = load i32, i32* %13
%311 = icmp ne i32 %309, %310
br i1 %311, label %312, label %320
312: ; preds = %287
%313 = load i32, i32* %7
%314 = zext i32 %313 to i64
%315 = getelementptr inbounds [16 x double**], [16 x double**]* %17, i64 0, i64 %314
%316 = load double**, double*** %315
%317 = load i32, i32* %15
%318 = load i32, i32* %15
%319 = call i32 @free_dmatrix(double** %316, i32 1, i32 %317, i32 1, i32 %318)
br label %320
320: ; preds = %312, %287
br label %321
321: ; preds = %320
%322 = load i32, i32* %7
%323 = add i32 %322, -1
store i32 %323, i32* %7
%324 = load i32, i32* %15
%325 = udiv i32 %324, 2
%326 = add i32 %325, 1
store i32 %326, i32* %15
br label %284
327: ; preds = %284
%328 = getelementptr inbounds [16 x double**], [16 x double**]* %18, i64 0, i64 1
%329 = load double**, double*** %328
%330 = call i32 @free_dmatrix(double** %329, i32 1, i32 3, i32 1, i32 3)
%331 = getelementptr inbounds [16 x double**], [16 x double**]* %19, i64 0, i64 1
%332 = load double**, double*** %331
%333 = call i32 @free_dmatrix(double** %332, i32 1, i32 3, i32 1, i32 3)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"n-1 must be a power of 2 in mglin.\00"
@.str.1 = [25 x i8] c"increase NGMAX in mglin.\00"
define void @mglin(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 = bitcast [16 x double**]* %4 to i8*
%9 = bitcast [16 x double**]* %5 to i8*
%10 = bitcast [16 x double**]* %6 to i8*
%11 = bitcast [16 x double**]* %7 to i8*
%12 = icmp ult i32 %1, 2
br i1 %12, label %19, label %13
13: ; preds = %3, %13
%14 = phi i32 [ %16, %13 ], [ %1, %3 ]
%15 = phi i32 [ %17, %13 ], [ 0, %3 ]
%16 = lshr i32 %14, 1
%17 = add nuw nsw i32 %15, 1
%18 = icmp ult i32 %14, 4
br i1 %18, label %19, label %13
19: ; preds = %13, %3
%20 = phi i32 [ 0, %3 ], [ %17, %13 ]
%21 = sext i32 %1 to i64
%22 = zext i32 %20 to i64
%23 = shl nuw i64 1, %22
%24 = add nuw nsw i64 %23, 1
%25 = icmp eq i64 %24, %21
br i1 %25, label %28, label %26
26: ; preds = %19
%27 = tail call i32 @nrerror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %28
28: ; preds = %26, %19
%29 = icmp ugt i32 %20, 15
br i1 %29, label %30, label %32
30: ; preds = %28
%31 = tail call i32 @nrerror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
%33 = sdiv i32 %1, 2
%34 = add nsw i32 %33, 1
%35 = add i32 %20, -1
%36 = tail call double** @dmatrix(i32 1, i32 %34, i32 1, i32 %34)
%37 = zext i32 %35 to i64
%38 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 %37
store double** %36, double*** %38
tail call void @rstrct(double** %36, double** %0, i32 %34)
%39 = icmp ugt i32 %34, 3
br i1 %39, label %40, label %51
40: ; preds = %32, %40
%41 = phi double** [ %46, %40 ], [ %36, %32 ]
%42 = phi i32 [ %45, %40 ], [ %34, %32 ]
%43 = phi i32 [ %47, %40 ], [ %35, %32 ]
%44 = lshr i32 %42, 1
%45 = add nuw i32 %44, 1
%46 = tail call double** @dmatrix(i32 1, i32 %45, i32 1, i32 %45)
%47 = add i32 %43, -1
%48 = zext i32 %47 to i64
%49 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 %48
store double** %46, double*** %49
tail call void @rstrct(double** %46, double** %41, i32 %45)
%50 = icmp ugt i32 %42, 5
br i1 %50, label %40, label %51
51: ; preds = %40, %32
%52 = tail call double** @dmatrix(i32 1, i32 3, i32 1, i32 3)
%53 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 1
store double** %52, double*** %53
%54 = tail call double** @dmatrix(i32 1, i32 3, i32 1, i32 3)
%55 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 1
store double** %54, double*** %55
%56 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 1
%57 = load double**, double*** %56
tail call void @slvsml(double** %52, double** %57)
%58 = tail call i32 @free_dmatrix(double** %57, i32 1, i32 3, i32 1, i32 3)
%59 = icmp ult i32 %20, 2
br i1 %59, label %60, label %63
60: ; preds = %51
%61 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %22
%62 = load double**, double*** %61
tail call void @copy(double** %0, double** %62, i32 %1)
br label %163
63: ; preds = %51
%64 = icmp eq i32 %2, 0
%65 = add nuw i32 %20, 2
%66 = zext i32 %65 to i64
br label %67
67: ; preds = %63, %124
%68 = phi double** [ %52, %63 ], [ %74, %124 ]
%69 = phi i64 [ 3, %63 ], [ %126, %124 ]
%70 = phi i64 [ 2, %63 ], [ %125, %124 ]
%71 = phi i32 [ 3, %63 ], [ %73, %124 ]
%72 = shl i32 %71, 1
%73 = add i32 %72, -1
%74 = tail call double** @dmatrix(i32 1, i32 %73, i32 1, i32 %73)
%75 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %70
store double** %74, double*** %75
%76 = tail call double** @dmatrix(i32 1, i32 %73, i32 1, i32 %73)
%77 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 %70
store double** %76, double*** %77
%78 = tail call double** @dmatrix(i32 1, i32 %73, i32 1, i32 %73)
%79 = getelementptr inbounds [16 x double**], [16 x double**]* %4, i64 0, i64 %70
store double** %78, double*** %79
tail call void @interp(double** %74, double** %68, i32 %73)
%80 = icmp eq i64 %70, %22
br i1 %80, label %84, label %81
81: ; preds = %67
%82 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 %70
%83 = load double**, double*** %82
br label %84
84: ; preds = %67, %81
%85 = phi double** [ %83, %81 ], [ %0, %67 ]
tail call void @copy(double** %76, double** %85, i32 %73)
br i1 %64, label %124, label %86
86: ; preds = %84
%87 = load double**, double*** %53
%88 = load double**, double*** %55
br label %89
89: ; preds = %121, %86
%90 = phi i32 [ 1, %86 ], [ %122, %121 ]
br label %91
91: ; preds = %89, %91
%92 = phi double** [ %76, %89 ], [ %102, %91 ]
%93 = phi double** [ %74, %89 ], [ %104, %91 ]
%94 = phi i64 [ %70, %89 ], [ %100, %91 ]
%95 = phi i32 [ %73, %89 ], [ %99, %91 ]
tail call void @relax(double** %93, double** %92, i32 %95)
%96 = getelementptr inbounds [16 x double**], [16 x double**]* %4, i64 0, i64 %94
%97 = load double**, double*** %96
tail call void @resid(double** %97, double** %93, double** %92, i32 %95)
%98 = lshr i32 %95, 1
%99 = add nuw i32 %98, 1
%100 = add nsw i64 %94, -1
%101 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 %100
%102 = load double**, double*** %101
tail call void @rstrct(double** %102, double** %97, i32 %99)
%103 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %100
%104 = load double**, double*** %103
tail call void @fill0(double** %104, i32 %99)
%105 = icmp ugt i64 %100, 1
br i1 %105, label %91, label %106
106: ; preds = %91
tail call void @slvsml(double** %87, double** %88)
br label %107
107: ; preds = %106, %107
%108 = phi double** [ %87, %106 ], [ %114, %107 ]
%109 = phi i64 [ 2, %106 ], [ %119, %107 ]
%110 = phi i32 [ 3, %106 ], [ %112, %107 ]
%111 = shl i32 %110, 1
%112 = add i32 %111, -1
%113 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %109
%114 = load double**, double*** %113
%115 = getelementptr inbounds [16 x double**], [16 x double**]* %4, i64 0, i64 %109
%116 = load double**, double*** %115
tail call void @addint(double** %114, double** %108, double** %116, i32 %112)
%117 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 %109
%118 = load double**, double*** %117
tail call void @relax(double** %114, double** %118, i32 %112)
%119 = add nuw nsw i64 %109, 1
%120 = icmp eq i64 %119, %69
br i1 %120, label %121, label %107
121: ; preds = %107
%122 = add i32 %90, 1
%123 = icmp ugt i32 %122, %2
br i1 %123, label %124, label %89
124: ; preds = %121, %84
%125 = add nuw nsw i64 %70, 1
%126 = add nuw nsw i64 %69, 1
%127 = icmp eq i64 %126, %66
br i1 %127, label %128, label %67
128: ; preds = %124
%129 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %22
%130 = load double**, double*** %129
tail call void @copy(double** %0, double** %130, i32 %1)
%131 = icmp ugt i32 %20, 1
br i1 %131, label %132, label %163
132: ; preds = %128
%133 = getelementptr inbounds [16 x double**], [16 x double**]* %4, i64 0, i64 %22
%134 = load double**, double*** %133
%135 = tail call i32 @free_dmatrix(double** %134, i32 1, i32 %1, i32 1, i32 %1)
%136 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 %22
%137 = load double**, double*** %136
%138 = tail call i32 @free_dmatrix(double** %137, i32 1, i32 %1, i32 1, i32 %1)
%139 = tail call i32 @free_dmatrix(double** %130, i32 1, i32 %1, i32 1, i32 %1)
%140 = add nsw i64 %22, -1
%141 = and i64 %140, 4294967294
%142 = icmp eq i64 %141, 0
br i1 %142, label %163, label %143
143: ; preds = %132, %143
%144 = phi i64 [ %160, %143 ], [ %140, %132 ]
%145 = phi i32 [ %147, %143 ], [ %1, %132 ]
%146 = lshr i32 %145, 1
%147 = add nuw i32 %146, 1
%148 = getelementptr inbounds [16 x double**], [16 x double**]* %4, i64 0, i64 %144
%149 = load double**, double*** %148
%150 = tail call i32 @free_dmatrix(double** %149, i32 1, i32 %147, i32 1, i32 %147)
%151 = getelementptr inbounds [16 x double**], [16 x double**]* %6, i64 0, i64 %144
%152 = load double**, double*** %151
%153 = tail call i32 @free_dmatrix(double** %152, i32 1, i32 %147, i32 1, i32 %147)
%154 = getelementptr inbounds [16 x double**], [16 x double**]* %7, i64 0, i64 %144
%155 = load double**, double*** %154
%156 = tail call i32 @free_dmatrix(double** %155, i32 1, i32 %147, i32 1, i32 %147)
%157 = getelementptr inbounds [16 x double**], [16 x double**]* %5, i64 0, i64 %144
%158 = load double**, double*** %157
%159 = tail call i32 @free_dmatrix(double** %158, i32 1, i32 %147, i32 1, i32 %147)
%160 = add nsw i64 %144, -1
%161 = and i64 %160, 4294967294
%162 = icmp eq i64 %161, 0
br i1 %162, label %163, label %143
163: ; preds = %143, %132, %60, %128
%164 = load double**, double*** %55
%165 = tail call i32 @free_dmatrix(double** %164, i32 1, i32 3, i32 1, i32 3)
%166 = load double**, double*** %53
%167 = tail call i32 @free_dmatrix(double** %166, i32 1, i32 3, i32 1, i32 3)
ret void
}