#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 Mfunc3D(double, double, double, double, double, double, double);
double Vfunc(double, double);
int /*<<< orphan*/ compute_abc_nobc(double *, double *, double *, double *,
                                    double *, double, int, double *, double *,
                                    double *);
int /*<<< orphan*/ compute_delj(double *, double *, double *, int, double *,
                                int);
int /*<<< orphan*/ compute_dfactor(double *, int, double *);
int /*<<< orphan*/ compute_dx(double *, int, double *);
int /*<<< orphan*/ compute_xInt(double *, int, double *);
int /*<<< orphan*/ free(double *);
double *malloc(int);
int /*<<< orphan*/ tridiag_free();
int /*<<< orphan*/ tridiag_malloc(int);
int /*<<< orphan*/ tridiag_premalloc(double *, double *, double *, double *,
                                     double *, int);
void implicit_3Dx(double *phi, double *xx, double *yy, double *zz, double nu1,
                  double m12, double m13, double gamma1, double h1, double dt,
                  int L, int M, int N, int use_delj_trick, int Mstart,
                  int Mend) {
  int ii, jj, kk;
  double *dx = malloc((L - 1) * sizeof(*dx));
  double *dfactor = malloc(L * sizeof(*dfactor));
  double *xInt = malloc((L - 1) * sizeof(*xInt));
  double Mfirst, Mlast;
  double *MInt = malloc((L - 1) * sizeof(*MInt));
  double *V = malloc(L * sizeof(*V));
  double *VInt = malloc((L - 1) * sizeof(*VInt));
  double *delj = malloc((L - 1) * sizeof(*delj));
  double *a = malloc(L * sizeof(*a));
  double *b = malloc(L * sizeof(*b));
  double *c = malloc(L * sizeof(*c));
  double *r = malloc(L * sizeof(*r));
  double *temp = malloc(L * sizeof(*temp));
  double y, z;
  compute_dx(xx, L, dx);
  compute_dfactor(dx, L, dfactor);
  compute_xInt(xx, L, xInt);
  for (ii = 0; ii < L; ii++)
    V[ii] = Vfunc(xx[ii], nu1);
  for (ii = 0; ii < L - 1; ii++)
    VInt[ii] = Vfunc(xInt[ii], nu1);
  tridiag_malloc(L);
  for (jj = Mstart; jj < Mend; jj++) {
    for (kk = 0; kk < N; kk++) {
      y = yy[jj];
      z = zz[kk];
      Mfirst = Mfunc3D(xx[0], y, z, m12, m13, gamma1, h1);
      Mlast = Mfunc3D(xx[L - 1], y, z, m12, m13, gamma1, h1);
      for (ii = 0; ii < L - 1; ii++)
        MInt[ii] = Mfunc3D(xInt[ii], y, z, m12, m13, gamma1, h1);
      compute_delj(dx, MInt, VInt, L, delj, use_delj_trick);
      compute_abc_nobc(dx, dfactor, delj, MInt, V, dt, L, a, b, c);
      for (ii = 0; ii < L; ii++)
        r[ii] = phi[ii * M * N + jj * N + kk] / dt;
      if ((yy[jj] == 0) && (zz[kk] == 0) && (Mfirst <= 0))
        b[0] += (0.5 / nu1 - Mfirst) * 2. / dx[0];
      if ((yy[jj] == 1) && (zz[kk] == 1) && (Mlast >= 0))
        b[L - 1] += -(-0.5 / nu1 - Mlast) * 2. / dx[L - 2];
      tridiag_premalloc(a, b, c, r, temp, L);
      for (ii = 0; ii < L; ii++)
        phi[ii * M * N + jj * N + kk] = temp[ii];
    }
  }
  tridiag_free();
  free(dx);
  free(dfactor);
  free(xInt);
  free(MInt);
  free(V);
  free(VInt);
  free(delj);
  free(a);
  free(b);
  free(c);
  free(r);
  free(temp);
}


x86 assembly (clang, -O0):
<implicit_3Dx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
movsd  %xmm3,-0x40(%rbp)
movsd  %xmm4,-0x48(%rbp)
movsd  %xmm5,-0x50(%rbp)
mov    %r8d,-0x54(%rbp)
mov    %r9d,-0x58(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x70(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x78(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x98(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xa0(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xa8(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xb0(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xb8(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xc0(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xc8(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xd0(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xd8(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    -0x70(%rbp),%rdx
call   10b0 <compute_dx@plt>
mov    -0x70(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    -0x78(%rbp),%rdx
call   1080 <compute_dfactor@plt>
mov    -0x10(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    -0x80(%rbp),%rdx
call   10c0 <compute_xInt@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    1398 <implicit_3Dx+0x1d8>
mov    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x28(%rbp),%xmm1
call   10a0 <Vfunc@plt>
mov    -0xa0(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1357 <implicit_3Dx+0x197>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13e5 <implicit_3Dx+0x225>
mov    -0x80(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x28(%rbp),%xmm1
call   10a0 <Vfunc@plt>
mov    -0xa8(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    139f <implicit_3Dx+0x1df>
mov    -0x54(%rbp),%edi
call   10d0 <tridiag_malloc@plt>
mov    0x20(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    17e2 <implicit_3Dx+0x622>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    17cf <implicit_3Dx+0x60f>
mov    -0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x20(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm2
ff
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
movsd  -0x40(%rbp),%xmm5
movsd  -0x48(%rbp),%xmm6
call   1070 <Mfunc3D@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm2
ff
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
movsd  -0x40(%rbp),%xmm5
movsd  -0x48(%rbp),%xmm6
call   1070 <Mfunc3D@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1524 <implicit_3Dx+0x364>
mov    -0x80(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm2
ff
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
movsd  -0x40(%rbp),%xmm5
movsd  -0x48(%rbp),%xmm6
call   1070 <Mfunc3D@plt>
mov    -0x98(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    14bf <implicit_3Dx+0x2ff>
mov    -0x70(%rbp),%rdi
mov    -0x98(%rbp),%rsi
mov    -0xa8(%rbp),%rdx
mov    -0x54(%rbp),%ecx
mov    -0xb0(%rbp),%r8
mov    0x18(%rbp),%r9d
call   10e0 <compute_delj@plt>
mov    -0x70(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    -0xb0(%rbp),%rdx
mov    -0x98(%rbp),%rcx
mov    -0xa0(%rbp),%r8
movsd  -0x50(%rbp),%xmm0
mov    -0x54(%rbp),%r9d
mov    -0xb8(%rbp),%r11
mov    -0xc0(%rbp),%r10
mov    -0xc8(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <compute_abc_nobc@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    15f0 <implicit_3Dx+0x430>
mov    -0x8(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x58(%rbp),%ecx
imul   0x10(%rbp),%ecx
mov    -0x60(%rbp),%edx
imul   0x10(%rbp),%edx
add    %edx,%ecx
add    -0x64(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x50(%rbp),%xmm0
mov    -0xd0(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    159e <implicit_3Dx+0x3de>
mov    -0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1679 <implicit_3Dx+0x4b9>
jp     1679 <implicit_3Dx+0x4b9>
mov    -0x20(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1679 <implicit_3Dx+0x4b9>
jp     1679 <implicit_3Dx+0x4b9>
xorps  %xmm0,%xmm0
ucomisd -0x88(%rbp),%xmm0
ff
jb     1679 <implicit_3Dx+0x4b9>
movsd  0x9bf(%rip),%xmm0
divsd  -0x28(%rbp),%xmm0
subsd  -0x88(%rbp),%xmm0
ff
movsd  0x9a2(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x70(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0xc0(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0x982(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    173c <implicit_3Dx+0x57c>
jp     173c <implicit_3Dx+0x57c>
mov    -0x20(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0x95d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    173c <implicit_3Dx+0x57c>
jp     173c <implicit_3Dx+0x57c>
movsd  -0x90(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     173c <implicit_3Dx+0x57c>
movsd  0x938(%rip),%xmm0
divsd  -0x28(%rbp),%xmm0
subsd  -0x90(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x8f4(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x70(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0xc0(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xb8(%rbp),%rdi
mov    -0xc0(%rbp),%rsi
mov    -0xc8(%rbp),%rdx
mov    -0xd0(%rbp),%rcx
mov    -0xd8(%rbp),%r8
mov    -0x54(%rbp),%r9d
call   1050 <tridiag_premalloc@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    17bc <implicit_3Dx+0x5fc>
mov    -0xd8(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x58(%rbp),%ecx
imul   0x10(%rbp),%ecx
mov    -0x60(%rbp),%edx
imul   0x10(%rbp),%edx
add    %edx,%ecx
add    -0x64(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    176f <implicit_3Dx+0x5af>
jmp    17c1 <implicit_3Dx+0x601>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1406 <implicit_3Dx+0x246>
jmp    17d4 <implicit_3Dx+0x614>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    13f3 <implicit_3Dx+0x233>
mov    $0x0,%al
call   1060 <tridiag_free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xd0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xd8(%rbp),%rdi
call   1030 <free@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<implicit_3Dx>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
mov    %r9,0x78(%rsp)
mov    %r8d,%ebx
movsd  %xmm5,0xa8(%rsp)
movsd  %xmm4,0x70(%rsp)
movsd  %xmm3,0x68(%rsp)
movsd  %xmm2,0x60(%rsp)
movsd  %xmm1,0x58(%rsp)
movsd  %xmm0,0x28(%rsp)
mov    %rcx,0xc0(%rsp)
mov    %rdx,0x118(%rsp)
mov    %rsi,%r13
mov    %rdi,%rbp
mov    0x1a8(%rsp),%eax
mov    %eax,0x40(%rsp)
mov    0x1a0(%rsp),%eax
mov    %rax,0x18(%rsp)
mov    0x198(%rsp),%eax
mov    %eax,0xcc(%rsp)
mov    0x190(%rsp),%eax
mov    %eax,0xc(%rsp)
lea    -0x1(%rbx),%eax
mov    %eax,0x30(%rsp)
lea    -0x8(,%rbx,8),%r14d
ff
mov    %r14d,%edi
call   1090 <malloc@plt>
mov    %rax,%r12
lea    0x0(,%rbx,8),%r15d
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,0x98(%rsp)
mov    %r14d,%edi
call   1090 <malloc@plt>
mov    %rax,0x90(%rsp)
mov    %r14d,%edi
call   1090 <malloc@plt>
mov    %rax,0x38(%rsp)
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,0x88(%rsp)
mov    %r14d,%edi
call   1090 <malloc@plt>
mov    %rax,0x50(%rsp)
mov    %r14d,%edi
call   1090 <malloc@plt>
mov    %rax,0xe8(%rsp)
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,0xb8(%rsp)
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,0xe0(%rsp)
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,0xb0(%rsp)
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,0xd8(%rsp)
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,0xd0(%rsp)
mov    %r13,%rdi
mov    %ebx,%esi
mov    %r12,%rdx
call   10b0 <compute_dx@plt>
mov    %r12,0x48(%rsp)
mov    %r12,%rdi
mov    0x90(%rsp),%r12
mov    %ebx,%esi
mov    0x98(%rsp),%rdx
call   1080 <compute_dfactor@plt>
mov    %r13,%rdi
mov    %ebx,%esi
mov    %r12,%rdx
call   10c0 <compute_xInt@plt>
mov    %ebx,%r15d
test   %ebx,%ebx
mov    %rbx,0x80(%rsp)
mov    %r13,0x150(%rsp)
mov    %r15,0xa0(%rsp)
jle    13fa <implicit_3Dx+0x23a>
xor    %ebx,%ebx
mov    0x88(%rsp),%r14
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rbx,8),%xmm0
movsd  0x28(%rsp),%xmm1
call   10a0 <Vfunc@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1380 <implicit_3Dx+0x1c0>
mov    0x80(%rsp),%rbx
cmp    $0x2,%ebx
setge  %al
mov    %eax,0x8(%rsp)
mov    0x38(%rsp),%r14
mov    0x50(%rsp),%r15
jl     140e <implicit_3Dx+0x24e>
mov    0x30(%rsp),%r13d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsd  (%r12,%rbx,8),%xmm0
movsd  0x28(%rsp),%xmm1
call   10a0 <Vfunc@plt>
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    13d0 <implicit_3Dx+0x210>
mov    0x80(%rsp),%rbx
jmp    1416 <implicit_3Dx+0x256>
movl   $0x0,0x8(%rsp)
mov    0x38(%rsp),%r14
mov    0x50(%rsp),%r15
jmp    1416 <implicit_3Dx+0x256>
movl   $0x0,0x8(%rsp)
mov    %ebx,%edi
call   10d0 <tridiag_malloc@plt>
mov    0x18(%rsp),%rax
cmp    0x40(%rsp),%eax
movsd  0x70(%rsp),%xmm6
movsd  0x68(%rsp),%xmm5
movsd  0x60(%rsp),%xmm4
movsd  0x58(%rsp),%xmm3
mov    0xc(%rsp),%esi
jge    1980 <implicit_3Dx+0x7c0>
movslq 0x30(%rsp),%rdx
movsd  0xbab(%rip),%xmm0
movsd  0x28(%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x130(%rsp)
movsd  0xb98(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x128(%rsp)
lea    -0x2(%rbx),%eax
cltq
mov    %rax,0x120(%rsp)
mov    0x18(%rsp),%rcx
movslq %ecx,%rax
mov    %rax,0x20(%rsp)
mov    %esi,%eax
mov    %rax,0x148(%rsp)
mov    %rdx,%rax
mov    %rdx,0xf8(%rsp)
mov    %edx,%r8d
mov    0xa0(%rsp),%r12
lea    -0x1(%r12),%rax
mov    %rax,0xf0(%rsp)
and    $0xfffffffe,%r12d
mov    0x78(%rsp),%rax
lea    (%rcx,%rax,1),%edx
imul   %esi,%edx
mov    %edx,0x44(%rsp)
mov    %esi,%r13d
imul   %eax,%r13d
add    %r13d,%r13d
imul   %esi,%ecx
mov    %rcx,0x18(%rsp)
mov    %r8,0x140(%rsp)
mov    %r12,0x138(%rsp)
mov    %rbp,0x110(%rsp)
jmp    153b <implicit_3Dx+0x37b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x20(%rsp),%rcx
add    $0x1,%rcx
add    %esi,0x44(%rsp)
mov    0x18(%rsp),%rax
add    %esi,%eax
mov    %rax,0x18(%rsp)
mov    %rcx,%rax
mov    %rcx,0x20(%rsp)
cmp    0x40(%rsp),%ecx
je     1980 <implicit_3Dx+0x7c0>
test   %esi,%esi
jle    1510 <implicit_3Dx+0x350>
mov    0x18(%rsp),%rax
mov    %eax,0x14(%rsp)
mov    0x44(%rsp),%eax
mov    %eax,0x10(%rsp)
xor    %edi,%edi
jmp    1578 <implicit_3Dx+0x3b8>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rdi
addl   $0x1,0x10(%rsp)
addl   $0x1,0x14(%rsp)
cmp    0x148(%rsp),%rdi
je     1510 <implicit_3Dx+0x350>
mov    0x118(%rsp),%rax
mov    0x20(%rsp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  %xmm1,0x28(%rsp)
mov    0xc0(%rsp),%rax
mov    %rdi,0x30(%rsp)
movsd  (%rax,%rdi,8),%xmm2
movsd  %xmm2,0x38(%rsp)
mov    0x150(%rsp),%rbx
movsd  (%rbx),%xmm0
mov    %r8,%r12
call   1070 <Mfunc3D@plt>
movsd  %xmm0,0x100(%rsp)
mov    0xf8(%rsp),%rax
movsd  (%rbx,%rax,8),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x38(%rsp),%xmm2
movsd  0x58(%rsp),%xmm3
movsd  0x60(%rsp),%xmm4
movsd  0x68(%rsp),%xmm5
movsd  0x70(%rsp),%xmm6
call   1070 <Mfunc3D@plt>
movsd  %xmm0,0x108(%rsp)
cmpb   $0x0,0x8(%rsp)
mov    %r14,%r15
mov    0x90(%rsp),%r14
je     165e <implicit_3Dx+0x49e>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rbx,8),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x38(%rsp),%xmm2
movsd  0x58(%rsp),%xmm3
movsd  0x60(%rsp),%xmm4
movsd  0x68(%rsp),%xmm5
movsd  0x70(%rsp),%xmm6
call   1070 <Mfunc3D@plt>
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1620 <implicit_3Dx+0x460>
mov    0x48(%rsp),%r14
mov    %r14,%rdi
mov    %r15,%rsi
mov    0x50(%rsp),%rdx
mov    0x80(%rsp),%rbp
mov    %ebp,%ecx
mov    0xe8(%rsp),%rbx
mov    %rbx,%r8
mov    0xcc(%rsp),%r9d
call   10e0 <compute_delj@plt>
sub    $0x8,%rsp
mov    %r14,%rdi
mov    0xa0(%rsp),%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
mov    0x90(%rsp),%r8
movsd  0xb0(%rsp),%xmm0
mov    %ebp,%r9d
push   0xb8(%rsp)
mov    0xf0(%rsp),%rbx
push   %rbx
push   0xd0(%rsp)
call   1040 <compute_abc_nobc@plt>
add    $0x20,%rsp
mov    %rbp,%r9
test   %ebp,%ebp
mov    %r15,%r14
mov    0xd8(%rsp),%rcx
mov    0x138(%rsp),%r12
xorpd  %xmm2,%xmm2
mov    0x30(%rsp),%rdi
mov    0x110(%rsp),%rbp
jle    1797 <implicit_3Dx+0x5d7>
cmpq   $0x0,0xf0(%rsp)
je     1930 <implicit_3Dx+0x770>
mov    0x14(%rsp),%eax
mov    %eax,%esi
mov    0x10(%rsp),%eax
mov    %eax,%edx
xor    %eax,%eax
movsd  0xa8(%rsp),%xmm1
xchg   %ax,%ax
movslq %esi,%rsi
movsd  0x0(%rbp,%rsi,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx,%rax,8)
movslq %edx,%rdx
movsd  0x0(%rbp,%rdx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rcx,%rax,8)
add    $0x2,%rax
add    %r13d,%edx
add    %r13d,%esi
cmp    %rax,%r12
jne    1730 <implicit_3Dx+0x570>
testb  $0x1,0xa0(%rsp)
01
je     1797 <implicit_3Dx+0x5d7>
mov    %eax,%edx
imul   0x78(%rsp),%edx
add    0x20(%rsp),%edx
imul   0xc(%rsp),%edx
add    %edi,%edx
movslq %edx,%rdx
movsd  0x0(%rbp,%rdx,8),%xmm0
divsd  0xa8(%rsp),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
mov    0x118(%rsp),%rax
mov    0x20(%rsp),%rdx
movsd  (%rax,%rdx,8),%xmm0
ucomisd %xmm2,%xmm0
jne    17f8 <implicit_3Dx+0x638>
jp     17f8 <implicit_3Dx+0x638>
mov    0xc0(%rsp),%rax
movsd  (%rax,%rdi,8),%xmm1
ucomisd %xmm2,%xmm1
jne    17f8 <implicit_3Dx+0x638>
jp     17f8 <implicit_3Dx+0x638>
ucomisd 0x100(%rsp),%xmm2
jb     17f8 <implicit_3Dx+0x638>
movsd  0x130(%rsp),%xmm1
subsd  0x100(%rsp),%xmm1
addsd  %xmm1,%xmm1
mov    0x48(%rsp),%rax
divsd  (%rax),%xmm1
addsd  (%rbx),%xmm1
movsd  %xmm1,(%rbx)
ucomisd 0x810(%rip),%xmm0
mov    0x50(%rsp),%r15
jne    186f <implicit_3Dx+0x6af>
jp     186f <implicit_3Dx+0x6af>
mov    0xc0(%rsp),%rax
movsd  (%rax,%rdi,8),%xmm0
ucomisd 0x7f2(%rip),%xmm0
jne    186f <implicit_3Dx+0x6af>
jp     186f <implicit_3Dx+0x6af>
movsd  0x108(%rsp),%xmm0
ucomisd %xmm2,%xmm0
jb     186f <implicit_3Dx+0x6af>
movsd  0x128(%rsp),%xmm0
subsd  0x108(%rsp),%xmm0
addsd  %xmm0,%xmm0
mov    0x48(%rsp),%rax
mov    0x120(%rsp),%rdx
divsd  (%rax,%rdx,8),%xmm0
mov    0xf8(%rsp),%rax
movsd  (%rbx,%rax,8),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
mov    0xb8(%rsp),%rdi
mov    %rbx,%rsi
mov    0xb0(%rsp),%rdx
mov    0xd0(%rsp),%rbx
mov    %rbx,%r8
mov    %r9,%rbp
call   1050 <tridiag_premalloc@plt>
mov    0x30(%rsp),%rdi
test   %ebp,%ebp
movsd  0x70(%rsp),%xmm6
movsd  0x68(%rsp),%xmm5
movsd  0x60(%rsp),%xmm4
movsd  0x58(%rsp),%xmm3
mov    0xc(%rsp),%esi
mov    0x140(%rsp),%r8
mov    0x110(%rsp),%rbp
jle    1560 <implicit_3Dx+0x3a0>
cmpq   $0x0,0xf0(%rsp)
je     1950 <implicit_3Dx+0x790>
mov    0x14(%rsp),%eax
mov    %eax,%ecx
mov    0x10(%rsp),%eax
mov    %eax,%edx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movsd  (%rbx,%rax,8),%xmm0
movslq %ecx,%rcx
movsd  %xmm0,0x0(%rbp,%rcx,8)
movsd  0x8(%rbx,%rax,8),%xmm0
movslq %edx,%rdx
movsd  %xmm0,0x0(%rbp,%rdx,8)
add    $0x2,%rax
add    %r13d,%edx
add    %r13d,%ecx
cmp    %rax,%r12
jne    18f0 <implicit_3Dx+0x730>
testb  $0x1,0xa0(%rsp)
01
je     1560 <implicit_3Dx+0x3a0>
jmp    1960 <implicit_3Dx+0x7a0>
nopl   0x0(%rax)
xor    %eax,%eax
testb  $0x1,0xa0(%rsp)
01
jne    176e <implicit_3Dx+0x5ae>
jmp    1797 <implicit_3Dx+0x5d7>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
testb  $0x1,0xa0(%rsp)
01
je     1560 <implicit_3Dx+0x3a0>
movsd  (%rbx,%rax,8),%xmm0
imul   0x78(%rsp),%eax
add    0x20(%rsp),%eax
imul   %esi,%eax
add    %edi,%eax
cltq
movsd  %xmm0,0x0(%rbp,%rax,8)
jmp    1560 <implicit_3Dx+0x3a0>
xor    %eax,%eax
call   1060 <tridiag_free@plt>
mov    0x48(%rsp),%rdi
call   1030 <free@plt>
mov    0x98(%rsp),%rdi
call   1030 <free@plt>
mov    0x90(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x88(%rsp),%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0xe8(%rsp),%rdi
call   1030 <free@plt>
mov    0xb8(%rsp),%rdi
call   1030 <free@plt>
mov    0xe0(%rsp),%rdi
call   1030 <free@plt>
mov    0xb0(%rsp),%rdi
call   1030 <free@plt>
mov    0xd8(%rsp),%rdi
call   1030 <free@plt>
mov    0xd0(%rsp),%rdi
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @implicit_3Dx(double* %0, double* %1, double* %2, double* %3, double %4, double %5, double %6, double %7, double %8, double %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15) {
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca double*
%37 = alloca double*
%38 = alloca double*
%39 = alloca double
%40 = alloca double
%41 = alloca double*
%42 = alloca double*
%43 = alloca double*
%44 = alloca double*
%45 = alloca double*
%46 = alloca double*
%47 = alloca double*
%48 = alloca double*
%49 = alloca double*
%50 = alloca double
%51 = alloca double
store double* %0, double** %17
store double* %1, double** %18
store double* %2, double** %19
store double* %3, double** %20
store double %4, double* %21
store double %5, double* %22
store double %6, double* %23
store double %7, double* %24
store double %8, double* %25
store double %9, double* %26
store i32 %10, i32* %27
store i32 %11, i32* %28
store i32 %12, i32* %29
store i32 %13, i32* %30
store i32 %14, i32* %31
store i32 %15, i32* %32
%52 = load i32, i32* %27
%53 = sub nsw i32 %52, 1
%54 = sext i32 %53 to i64
%55 = mul i64 %54, 8
%56 = trunc i64 %55 to i32
%57 = call double* @malloc(i32 %56)
store double* %57, double** %36
%58 = load i32, i32* %27
%59 = sext i32 %58 to i64
%60 = mul i64 %59, 8
%61 = trunc i64 %60 to i32
%62 = call double* @malloc(i32 %61)
store double* %62, double** %37
%63 = load i32, i32* %27
%64 = sub nsw i32 %63, 1
%65 = sext i32 %64 to i64
%66 = mul i64 %65, 8
%67 = trunc i64 %66 to i32
%68 = call double* @malloc(i32 %67)
store double* %68, double** %38
%69 = load i32, i32* %27
%70 = sub nsw i32 %69, 1
%71 = sext i32 %70 to i64
%72 = mul i64 %71, 8
%73 = trunc i64 %72 to i32
%74 = call double* @malloc(i32 %73)
store double* %74, double** %41
%75 = load i32, i32* %27
%76 = sext i32 %75 to i64
%77 = mul i64 %76, 8
%78 = trunc i64 %77 to i32
%79 = call double* @malloc(i32 %78)
store double* %79, double** %42
%80 = load i32, i32* %27
%81 = sub nsw i32 %80, 1
%82 = sext i32 %81 to i64
%83 = mul i64 %82, 8
%84 = trunc i64 %83 to i32
%85 = call double* @malloc(i32 %84)
store double* %85, double** %43
%86 = load i32, i32* %27
%87 = sub nsw i32 %86, 1
%88 = sext i32 %87 to i64
%89 = mul i64 %88, 8
%90 = trunc i64 %89 to i32
%91 = call double* @malloc(i32 %90)
store double* %91, double** %44
%92 = load i32, i32* %27
%93 = sext i32 %92 to i64
%94 = mul i64 %93, 8
%95 = trunc i64 %94 to i32
%96 = call double* @malloc(i32 %95)
store double* %96, double** %45
%97 = load i32, i32* %27
%98 = sext i32 %97 to i64
%99 = mul i64 %98, 8
%100 = trunc i64 %99 to i32
%101 = call double* @malloc(i32 %100)
store double* %101, double** %46
%102 = load i32, i32* %27
%103 = sext i32 %102 to i64
%104 = mul i64 %103, 8
%105 = trunc i64 %104 to i32
%106 = call double* @malloc(i32 %105)
store double* %106, double** %47
%107 = load i32, i32* %27
%108 = sext i32 %107 to i64
%109 = mul i64 %108, 8
%110 = trunc i64 %109 to i32
%111 = call double* @malloc(i32 %110)
store double* %111, double** %48
%112 = load i32, i32* %27
%113 = sext i32 %112 to i64
%114 = mul i64 %113, 8
%115 = trunc i64 %114 to i32
%116 = call double* @malloc(i32 %115)
store double* %116, double** %49
%117 = load double*, double** %18
%118 = load i32, i32* %27
%119 = load double*, double** %36
%120 = call i32 @compute_dx(double* %117, i32 %118, double* %119)
%121 = load double*, double** %36
%122 = load i32, i32* %27
%123 = load double*, double** %37
%124 = call i32 @compute_dfactor(double* %121, i32 %122, double* %123)
%125 = load double*, double** %18
%126 = load i32, i32* %27
%127 = load double*, double** %38
%128 = call i32 @compute_xInt(double* %125, i32 %126, double* %127)
store i32 0, i32* %33
br label %129
129: ; preds = %145, %16
%130 = load i32, i32* %33
%131 = load i32, i32* %27
%132 = icmp slt i32 %130, %131
br i1 %132, label %133, label %148
133: ; preds = %129
%134 = load double*, double** %18
%135 = load i32, i32* %33
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds double, double* %134, i64 %136
%138 = load double, double* %137
%139 = load double, double* %21
%140 = call double @Vfunc(double %138, double %139)
%141 = load double*, double** %42
%142 = load i32, i32* %33
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds double, double* %141, i64 %143
store double %140, double* %144
br label %145
145: ; preds = %133
%146 = load i32, i32* %33
%147 = add nsw i32 %146, 1
store i32 %147, i32* %33
br label %129
148: ; preds = %129
store i32 0, i32* %33
br label %149
149: ; preds = %166, %148
%150 = load i32, i32* %33
%151 = load i32, i32* %27
%152 = sub nsw i32 %151, 1
%153 = icmp slt i32 %150, %152
br i1 %153, label %154, label %169
154: ; preds = %149
%155 = load double*, double** %38
%156 = load i32, i32* %33
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds double, double* %155, i64 %157
%159 = load double, double* %158
%160 = load double, double* %21
%161 = call double @Vfunc(double %159, double %160)
%162 = load double*, double** %43
%163 = load i32, i32* %33
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds double, double* %162, i64 %164
store double %161, double* %165
br label %166
166: ; preds = %154
%167 = load i32, i32* %33
%168 = add nsw i32 %167, 1
store i32 %168, i32* %33
br label %149
169: ; preds = %149
%170 = load i32, i32* %27
%171 = call i32 @tridiag_malloc(i32 %170)
%172 = load i32, i32* %31
store i32 %172, i32* %34
br label %173
173: ; preds = %398, %169
%174 = load i32, i32* %34
%175 = load i32, i32* %32
%176 = icmp slt i32 %174, %175
br i1 %176, label %177, label %401
177: ; preds = %173
store i32 0, i32* %35
br label %178
178: ; preds = %394, %177
%179 = load i32, i32* %35
%180 = load i32, i32* %29
%181 = icmp slt i32 %179, %180
br i1 %181, label %182, label %397
182: ; preds = %178
%183 = load double*, double** %19
%184 = load i32, i32* %34
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %183, i64 %185
%187 = load double, double* %186
store double %187, double* %50
%188 = load double*, double** %20
%189 = load i32, i32* %35
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds double, double* %188, i64 %190
%192 = load double, double* %191
store double %192, double* %51
%193 = load double*, double** %18
%194 = getelementptr inbounds double, double* %193, i64 0
%195 = load double, double* %194
%196 = load double, double* %50
%197 = load double, double* %51
%198 = load double, double* %22
%199 = load double, double* %23
%200 = load double, double* %24
%201 = load double, double* %25
%202 = call double @Mfunc3D(double %195, double %196, double %197, double %198, double %199, double %200, double %201)
store double %202, double* %39
%203 = load double*, double** %18
%204 = load i32, i32* %27
%205 = sub nsw i32 %204, 1
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds double, double* %203, i64 %206
%208 = load double, double* %207
%209 = load double, double* %50
%210 = load double, double* %51
%211 = load double, double* %22
%212 = load double, double* %23
%213 = load double, double* %24
%214 = load double, double* %25
%215 = call double @Mfunc3D(double %208, double %209, double %210, double %211, double %212, double %213, double %214)
store double %215, double* %40
store i32 0, i32* %33
br label %216
216: ; preds = %238, %182
%217 = load i32, i32* %33
%218 = load i32, i32* %27
%219 = sub nsw i32 %218, 1
%220 = icmp slt i32 %217, %219
br i1 %220, label %221, label %241
221: ; preds = %216
%222 = load double*, double** %38
%223 = load i32, i32* %33
%224 = sext i32 %223 to i64
%225 = getelementptr inbounds double, double* %222, i64 %224
%226 = load double, double* %225
%227 = load double, double* %50
%228 = load double, double* %51
%229 = load double, double* %22
%230 = load double, double* %23
%231 = load double, double* %24
%232 = load double, double* %25
%233 = call double @Mfunc3D(double %226, double %227, double %228, double %229, double %230, double %231, double %232)
%234 = load double*, double** %41
%235 = load i32, i32* %33
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds double, double* %234, i64 %236
store double %233, double* %237
br label %238
238: ; preds = %221
%239 = load i32, i32* %33
%240 = add nsw i32 %239, 1
store i32 %240, i32* %33
br label %216
241: ; preds = %216
%242 = load double*, double** %36
%243 = load double*, double** %41
%244 = load double*, double** %43
%245 = load i32, i32* %27
%246 = load double*, double** %44
%247 = load i32, i32* %30
%248 = call i32 @compute_delj(double* %242, double* %243, double* %244, i32 %245, double* %246, i32 %247)
%249 = load double*, double** %36
%250 = load double*, double** %37
%251 = load double*, double** %44
%252 = load double*, double** %41
%253 = load double*, double** %42
%254 = load double, double* %26
%255 = load i32, i32* %27
%256 = load double*, double** %45
%257 = load double*, double** %46
%258 = load double*, double** %47
%259 = call i32 @compute_abc_nobc(double* %249, double* %250, double* %251, double* %252, double* %253, double %254, i32 %255, double* %256, double* %257, double* %258)
store i32 0, i32* %33
br label %260
260: ; preds = %286, %241
%261 = load i32, i32* %33
%262 = load i32, i32* %27
%263 = icmp slt i32 %261, %262
br i1 %263, label %264, label %289
264: ; preds = %260
%265 = load double*, double** %17
%266 = load i32, i32* %33
%267 = load i32, i32* %28
%268 = mul nsw i32 %266, %267
%269 = load i32, i32* %29
%270 = mul nsw i32 %268, %269
%271 = load i32, i32* %34
%272 = load i32, i32* %29
%273 = mul nsw i32 %271, %272
%274 = add nsw i32 %270, %273
%275 = load i32, i32* %35
%276 = add nsw i32 %274, %275
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds double, double* %265, i64 %277
%279 = load double, double* %278
%280 = load double, double* %26
%281 = fdiv double %279, %280
%282 = load double*, double** %48
%283 = load i32, i32* %33
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds double, double* %282, i64 %284
store double %281, double* %285
br label %286
286: ; preds = %264
%287 = load i32, i32* %33
%288 = add nsw i32 %287, 1
store i32 %288, i32* %33
br label %260
289: ; preds = %260
%290 = load double*, double** %19
%291 = load i32, i32* %34
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds double, double* %290, i64 %292
%294 = load double, double* %293
%295 = fcmp oeq double %294, 0.000000e+00
br i1 %295, label %296, label %320
296: ; preds = %289
%297 = load double*, double** %20
%298 = load i32, i32* %35
%299 = sext i32 %298 to i64
%300 = getelementptr inbounds double, double* %297, i64 %299
%301 = load double, double* %300
%302 = fcmp oeq double %301, 0.000000e+00
br i1 %302, label %303, label %320
303: ; preds = %296
%304 = load double, double* %39
%305 = fcmp ole double %304, 0.000000e+00
br i1 %305, label %306, label %320
306: ; preds = %303
%307 = load double, double* %21
%308 = fdiv double 5.000000e-01, %307
%309 = load double, double* %39
%310 = fsub double %308, %309
%311 = fmul double %310, 2.000000e+00
%312 = load double*, double** %36
%313 = getelementptr inbounds double, double* %312, i64 0
%314 = load double, double* %313
%315 = fdiv double %311, %314
%316 = load double*, double** %46
%317 = getelementptr inbounds double, double* %316, i64 0
%318 = load double, double* %317
%319 = fadd double %318, %315
store double %319, double* %317
br label %320
320: ; preds = %306, %303, %296, %289
%321 = load double*, double** %19
%322 = load i32, i32* %34
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds double, double* %321, i64 %323
%325 = load double, double* %324
%326 = fcmp oeq double %325, 1.000000e+00
br i1 %326, label %327, label %358
327: ; preds = %320
%328 = load double*, double** %20
%329 = load i32, i32* %35
%330 = sext i32 %329 to i64
%331 = getelementptr inbounds double, double* %328, i64 %330
%332 = load double, double* %331
%333 = fcmp oeq double %332, 1.000000e+00
br i1 %333, label %334, label %358
334: ; preds = %327
%335 = load double, double* %40
%336 = fcmp oge double %335, 0.000000e+00
br i1 %336, label %337, label %358
337: ; preds = %334
%338 = load double, double* %21
%339 = fdiv double -5.000000e-01, %338
%340 = load double, double* %40
%341 = fsub double %339, %340
%342 = fneg double %341
%343 = fmul double %342, 2.000000e+00
%344 = load double*, double** %36
%345 = load i32, i32* %27
%346 = sub nsw i32 %345, 2
%347 = sext i32 %346 to i64
%348 = getelementptr inbounds double, double* %344, i64 %347
%349 = load double, double* %348
%350 = fdiv double %343, %349
%351 = load double*, double** %46
%352 = load i32, i32* %27
%353 = sub nsw i32 %352, 1
%354 = sext i32 %353 to i64
%355 = getelementptr inbounds double, double* %351, i64 %354
%356 = load double, double* %355
%357 = fadd double %356, %350
store double %357, double* %355
br label %358
358: ; preds = %337, %334, %327, %320
%359 = load double*, double** %45
%360 = load double*, double** %46
%361 = load double*, double** %47
%362 = load double*, double** %48
%363 = load double*, double** %49
%364 = load i32, i32* %27
%365 = call i32 @tridiag_premalloc(double* %359, double* %360, double* %361, double* %362, double* %363, i32 %364)
store i32 0, i32* %33
br label %366
366: ; preds = %390, %358
%367 = load i32, i32* %33
%368 = load i32, i32* %27
%369 = icmp slt i32 %367, %368
br i1 %369, label %370, label %393
370: ; preds = %366
%371 = load double*, double** %49
%372 = load i32, i32* %33
%373 = sext i32 %372 to i64
%374 = getelementptr inbounds double, double* %371, i64 %373
%375 = load double, double* %374
%376 = load double*, double** %17
%377 = load i32, i32* %33
%378 = load i32, i32* %28
%379 = mul nsw i32 %377, %378
%380 = load i32, i32* %29
%381 = mul nsw i32 %379, %380
%382 = load i32, i32* %34
%383 = load i32, i32* %29
%384 = mul nsw i32 %382, %383
%385 = add nsw i32 %381, %384
%386 = load i32, i32* %35
%387 = add nsw i32 %385, %386
%388 = sext i32 %387 to i64
%389 = getelementptr inbounds double, double* %376, i64 %388
store double %375, double* %389
br label %390
390: ; preds = %370
%391 = load i32, i32* %33
%392 = add nsw i32 %391, 1
store i32 %392, i32* %33
br label %366
393: ; preds = %366
br label %394
394: ; preds = %393
%395 = load i32, i32* %35
%396 = add nsw i32 %395, 1
store i32 %396, i32* %35
br label %178
397: ; preds = %178
br label %398
398: ; preds = %397
%399 = load i32, i32* %34
%400 = add nsw i32 %399, 1
store i32 %400, i32* %34
br label %173
401: ; preds = %173
%402 = call i32 (...) @tridiag_free()
%403 = load double*, double** %36
%404 = call i32 @free(double* %403)
%405 = load double*, double** %37
%406 = call i32 @free(double* %405)
%407 = load double*, double** %38
%408 = call i32 @free(double* %407)
%409 = load double*, double** %41
%410 = call i32 @free(double* %409)
%411 = load double*, double** %42
%412 = call i32 @free(double* %411)
%413 = load double*, double** %43
%414 = call i32 @free(double* %413)
%415 = load double*, double** %44
%416 = call i32 @free(double* %415)
%417 = load double*, double** %45
%418 = call i32 @free(double* %417)
%419 = load double*, double** %46
%420 = call i32 @free(double* %419)
%421 = load double*, double** %47
%422 = call i32 @free(double* %421)
%423 = load double*, double** %48
%424 = call i32 @free(double* %423)
%425 = load double*, double** %49
%426 = call i32 @free(double* %425)
ret void
}

LLVM IR (-O2):
define void @implicit_3Dx(double* nocapture %0, double* %1, double* nocapture %2, double* nocapture %3, double %4, double %5, double %6, double %7, double %8, double %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15) {
%17 = add nsw i32 %10, -1
%18 = sext i32 %17 to i64
%19 = shl i32 %17, 3
%20 = tail call double* @malloc(i32 %19)
%21 = shl i32 %10, 3
%22 = tail call double* @malloc(i32 %21)
%23 = tail call double* @malloc(i32 %19)
%24 = tail call double* @malloc(i32 %19)
%25 = tail call double* @malloc(i32 %21)
%26 = tail call double* @malloc(i32 %19)
%27 = tail call double* @malloc(i32 %19)
%28 = tail call double* @malloc(i32 %21)
%29 = tail call double* @malloc(i32 %21)
%30 = tail call double* @malloc(i32 %21)
%31 = tail call double* @malloc(i32 %21)
%32 = tail call double* @malloc(i32 %21)
%33 = tail call i32 @compute_dx(double* %1, i32 %10, double* %20)
%34 = tail call i32 @compute_dfactor(double* %20, i32 %10, double* %22)
%35 = tail call i32 @compute_xInt(double* %1, i32 %10, double* %23)
%36 = icmp sgt i32 %10, 0
br i1 %36, label %37, label %59
37: ; preds = %16
%38 = zext i32 %10 to i64
br label %43
39: ; preds = %43
%40 = icmp sgt i32 %10, 1
br i1 %40, label %41, label %59
41: ; preds = %39
%42 = zext i32 %17 to i64
br label %51
43: ; preds = %37, %43
%44 = phi i64 [ 0, %37 ], [ %49, %43 ]
%45 = getelementptr inbounds double, double* %1, i64 %44
%46 = load double, double* %45
%47 = tail call double @Vfunc(double %46, double %4)
%48 = getelementptr inbounds double, double* %25, i64 %44
store double %47, double* %48
%49 = add nuw nsw i64 %44, 1
%50 = icmp eq i64 %49, %38
br i1 %50, label %39, label %43
51: ; preds = %41, %51
%52 = phi i64 [ 0, %41 ], [ %57, %51 ]
%53 = getelementptr inbounds double, double* %23, i64 %52
%54 = load double, double* %53
%55 = tail call double @Vfunc(double %54, double %4)
%56 = getelementptr inbounds double, double* %26, i64 %52
store double %55, double* %56
%57 = add nuw nsw i64 %52, 1
%58 = icmp eq i64 %57, %42
br i1 %58, label %59, label %51
59: ; preds = %51, %16, %39
%60 = phi i1 [ false, %39 ], [ false, %16 ], [ %40, %51 ]
%61 = tail call i32 @tridiag_malloc(i32 %10)
%62 = icmp slt i32 %14, %15
br i1 %62, label %63, label %230
63: ; preds = %59
%64 = icmp sgt i32 %12, 0
%65 = getelementptr inbounds double, double* %1, i64 %18
%66 = fdiv double 5.000000e-01, %4
%67 = fdiv double -5.000000e-01, %4
%68 = add nsw i32 %10, -2
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %20, i64 %69
%71 = getelementptr inbounds double, double* %29, i64 %18
%72 = sext i32 %14 to i64
%73 = zext i32 %12 to i64
%74 = zext i32 %17 to i64
%75 = zext i32 %10 to i64
%76 = add nsw i64 %75, -1
%77 = and i64 %75, 1
%78 = icmp eq i64 %76, 0
%79 = and i64 %75, 4294967294
%80 = icmp eq i64 %77, 0
%81 = and i64 %75, 1
%82 = icmp eq i64 %76, 0
%83 = and i64 %75, 4294967294
%84 = icmp eq i64 %81, 0
br label %85
85: ; preds = %63, %226
%86 = phi i64 [ %72, %63 ], [ %227, %226 ]
br i1 %64, label %87, label %226
87: ; preds = %85
%88 = getelementptr inbounds double, double* %2, i64 %86
%89 = trunc i64 %86 to i32
%90 = trunc i64 %86 to i32
br label %91
91: ; preds = %87, %223
%92 = phi i64 [ 0, %87 ], [ %224, %223 ]
%93 = load double, double* %88
%94 = getelementptr inbounds double, double* %3, i64 %92
%95 = load double, double* %94
%96 = load double, double* %1
%97 = tail call double @Mfunc3D(double %96, double %93, double %95, double %5, double %6, double %7, double %8)
%98 = load double, double* %65
%99 = tail call double @Mfunc3D(double %98, double %93, double %95, double %5, double %6, double %7, double %8)
br i1 %60, label %100, label %108
100: ; preds = %91, %100
%101 = phi i64 [ %106, %100 ], [ 0, %91 ]
%102 = getelementptr inbounds double, double* %23, i64 %101
%103 = load double, double* %102
%104 = tail call double @Mfunc3D(double %103, double %93, double %95, double %5, double %6, double %7, double %8)
%105 = getelementptr inbounds double, double* %24, i64 %101
store double %104, double* %105
%106 = add nuw nsw i64 %101, 1
%107 = icmp eq i64 %106, %74
br i1 %107, label %108, label %100
108: ; preds = %100, %91
%109 = tail call i32 @compute_delj(double* %20, double* %24, double* %26, i32 %10, double* %27, i32 %13)
%110 = tail call i32 @compute_abc_nobc(double* %20, double* %22, double* %27, double* %24, double* %25, double %9, i32 %10, double* %28, double* %29, double* %30)
br i1 %36, label %111, label %153
111: ; preds = %108
%112 = trunc i64 %92 to i32
br i1 %78, label %140, label %113
113: ; preds = %111, %113
%114 = phi i64 [ %137, %113 ], [ 0, %111 ]
%115 = phi i64 [ %138, %113 ], [ 0, %111 ]
%116 = trunc i64 %114 to i32
%117 = mul i32 %116, %11
%118 = add i32 %117, %89
%119 = mul i32 %118, %12
%120 = add nsw i32 %119, %112
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds double, double* %0, i64 %121
%123 = load double, double* %122
%124 = fdiv double %123, %9
%125 = getelementptr inbounds double, double* %31, i64 %114
store double %124, double* %125
%126 = or i64 %114, 1
%127 = trunc i64 %126 to i32
%128 = mul i32 %127, %11
%129 = add i32 %128, %89
%130 = mul i32 %129, %12
%131 = add nsw i32 %130, %112
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds double, double* %0, i64 %132
%134 = load double, double* %133
%135 = fdiv double %134, %9
%136 = getelementptr inbounds double, double* %31, i64 %126
store double %135, double* %136
%137 = add nuw nsw i64 %114, 2
%138 = add i64 %115, 2
%139 = icmp eq i64 %138, %79
br i1 %139, label %140, label %113
140: ; preds = %113, %111
%141 = phi i64 [ 0, %111 ], [ %137, %113 ]
br i1 %80, label %153, label %142
142: ; preds = %140
%143 = trunc i64 %141 to i32
%144 = mul i32 %143, %11
%145 = add i32 %144, %89
%146 = mul i32 %145, %12
%147 = add nsw i32 %146, %112
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %0, i64 %148
%150 = load double, double* %149
%151 = fdiv double %150, %9
%152 = getelementptr inbounds double, double* %31, i64 %141
store double %151, double* %152
br label %153
153: ; preds = %142, %140, %108
%154 = load double, double* %88
%155 = fcmp oeq double %154, 0.000000e+00
br i1 %155, label %156, label %168
156: ; preds = %153
%157 = load double, double* %94
%158 = fcmp oeq double %157, 0.000000e+00
%159 = fcmp ole double %97, 0.000000e+00
%160 = select i1 %158, i1 %159, i1 false
br i1 %160, label %161, label %168
161: ; preds = %156
%162 = fsub double %66, %97
%163 = fmul double %162, 2.000000e+00
%164 = load double, double* %20
%165 = fdiv double %163, %164
%166 = load double, double* %29
%167 = fadd double %166, %165
store double %167, double* %29
br label %168
168: ; preds = %161, %156, %153
%169 = fcmp oeq double %154, 1.000000e+00
br i1 %169, label %170, label %182
170: ; preds = %168
%171 = load double, double* %94
%172 = fcmp oeq double %171, 1.000000e+00
%173 = fcmp oge double %99, 0.000000e+00
%174 = select i1 %172, i1 %173, i1 false
br i1 %174, label %175, label %182
175: ; preds = %170
%176 = fsub double %67, %99
%177 = fmul double %176, 2.000000e+00
%178 = load double, double* %70
%179 = fdiv double %177, %178
%180 = load double, double* %71
%181 = fsub double %180, %179
store double %181, double* %71
br label %182
182: ; preds = %175, %170, %168
%183 = tail call i32 @tridiag_premalloc(double* %28, double* %29, double* %30, double* %31, double* %32, i32 %10)
br i1 %36, label %184, label %223
184: ; preds = %182
%185 = trunc i64 %92 to i32
br i1 %82, label %211, label %186
186: ; preds = %184, %186
%187 = phi i64 [ %208, %186 ], [ 0, %184 ]
%188 = phi i64 [ %209, %186 ], [ 0, %184 ]
%189 = getelementptr inbounds double, double* %32, i64 %187
%190 = load double, double* %189
%191 = trunc i64 %187 to i32
%192 = mul i32 %191, %11
%193 = add i32 %192, %90
%194 = mul i32 %193, %12
%195 = add nsw i32 %194, %185
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds double, double* %0, i64 %196
store double %190, double* %197
%198 = or i64 %187, 1
%199 = getelementptr inbounds double, double* %32, i64 %198
%200 = load double, double* %199
%201 = trunc i64 %198 to i32
%202 = mul i32 %201, %11
%203 = add i32 %202, %90
%204 = mul i32 %203, %12
%205 = add nsw i32 %204, %185
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds double, double* %0, i64 %206
store double %200, double* %207
%208 = add nuw nsw i64 %187, 2
%209 = add i64 %188, 2
%210 = icmp eq i64 %209, %83
br i1 %210, label %211, label %186
211: ; preds = %186, %184
%212 = phi i64 [ 0, %184 ], [ %208, %186 ]
br i1 %84, label %223, label %213
213: ; preds = %211
%214 = getelementptr inbounds double, double* %32, i64 %212
%215 = load double, double* %214
%216 = trunc i64 %212 to i32
%217 = mul i32 %216, %11
%218 = add i32 %217, %90
%219 = mul i32 %218, %12
%220 = add nsw i32 %219, %185
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds double, double* %0, i64 %221
store double %215, double* %222
br label %223
223: ; preds = %213, %211, %182
%224 = add nuw nsw i64 %92, 1
%225 = icmp eq i64 %224, %73
br i1 %225, label %226, label %91
226: ; preds = %223, %85
%227 = add nsw i64 %86, 1
%228 = trunc i64 %227 to i32
%229 = icmp eq i32 %228, %15
br i1 %229, label %230, label %85
230: ; preds = %226, %59
%231 = tail call i32 (...) @tridiag_free()
%232 = tail call i32 @free(double* %20)
%233 = tail call i32 @free(double* %22)
%234 = tail call i32 @free(double* %23)
%235 = tail call i32 @free(double* %24)
%236 = tail call i32 @free(double* %25)
%237 = tail call i32 @free(double* %26)
%238 = tail call i32 @free(double* %27)
%239 = tail call i32 @free(double* %28)
%240 = tail call i32 @free(double* %29)
%241 = tail call i32 @free(double* %30)
%242 = tail call i32 @free(double* %31)
%243 = tail call i32 @free(double* %32)
ret void
}