#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_3Dz(double *phi, double *xx, double *yy, double *zz, double nu3,
                  double m31, double m32, double gamma3, double h3, double dt,
                  int L, int M, int N, int use_delj_trick, int Lstart,
                  int Lend) {
  int ii, jj, kk;
  double *dz = malloc((N - 1) * sizeof(*dz));
  double *dfactor = malloc(N * sizeof(*dfactor));
  double *zInt = malloc((N - 1) * sizeof(*zInt));
  double Mfirst, Mlast;
  double *MInt = malloc((N - 1) * sizeof(*MInt));
  double *V = malloc(N * sizeof(*V));
  double *VInt = malloc((N - 1) * sizeof(*VInt));
  double *delj = malloc((N - 1) * sizeof(*delj));
  double *a = malloc(N * sizeof(*a));
  double *b = malloc(N * sizeof(*b));
  double *c = malloc(N * sizeof(*c));
  double *r = malloc(N * sizeof(*r));
  double *temp = malloc(N * sizeof(*temp));
  double x, y;
  compute_dx(zz, N, dz);
  compute_dfactor(dz, N, dfactor);
  compute_xInt(zz, N, zInt);
  for (kk = 0; kk < N; kk++)
    V[kk] = Vfunc(zz[kk], nu3);
  for (kk = 0; kk < N - 1; kk++)
    VInt[kk] = Vfunc(zInt[kk], nu3);
  tridiag_malloc(N);
  for (ii = Lstart; ii < Lend; ii++) {
    for (jj = 0; jj < M; jj++) {
      x = xx[ii];
      y = yy[jj];
      Mfirst = Mfunc3D(zz[0], x, y, m31, m32, gamma3, h3);
      Mlast = Mfunc3D(zz[N - 1], x, y, m31, m32, gamma3, h3);
      for (kk = 0; kk < N - 1; kk++)
        MInt[kk] = Mfunc3D(zInt[kk], x, y, m31, m32, gamma3, h3);
      compute_delj(dz, MInt, VInt, N, delj, use_delj_trick);
      compute_abc_nobc(dz, dfactor, delj, MInt, V, dt, N, a, b, c);
      for (kk = 0; kk < N; kk++)
        r[kk] = phi[ii * M * N + jj * N + kk] / dt;
      if ((xx[ii] == 0) && (yy[jj] == 0) && (Mfirst <= 0))
        b[0] += (0.5 / nu3 - Mfirst) * 2. / dz[0];
      if ((xx[ii] == 1) && (yy[jj] == 1) && (Mlast >= 0))
        b[N - 1] += -(-0.5 / nu3 - Mlast) * 2. / dz[N - 2];
      tridiag_premalloc(a, b, c, r, &phi[ii * M * N + jj * N], N);
    }
  }
  tridiag_free();
  free(dz);
  free(dfactor);
  free(zInt);
  free(MInt);
  free(V);
  free(VInt);
  free(delj);
  free(a);
  free(b);
  free(c);
  free(r);
  free(temp);
}


x86 assembly (clang, -O0):
<implicit_3Dz>:
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    0x10(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x70(%rbp)
movslq 0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x78(%rbp)
mov    0x10(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    0x10(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x98(%rbp)
movslq 0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xa0(%rbp)
mov    0x10(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xa8(%rbp)
mov    0x10(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xb0(%rbp)
movslq 0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xb8(%rbp)
movslq 0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xc0(%rbp)
movslq 0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xc8(%rbp)
movslq 0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xd0(%rbp)
movslq 0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xd8(%rbp)
mov    -0x20(%rbp),%rdi
mov    0x10(%rbp),%esi
mov    -0x70(%rbp),%rdx
call   10b0 <compute_dx@plt>
mov    -0x70(%rbp),%rdi
mov    0x10(%rbp),%esi
mov    -0x78(%rbp),%rdx
call   1080 <compute_dfactor@plt>
mov    -0x20(%rbp),%rdi
mov    0x10(%rbp),%esi
mov    -0x80(%rbp),%rdx
call   10c0 <compute_xInt@plt>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1398 <implicit_3Dz+0x1d8>
mov    -0x20(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x28(%rbp),%xmm1
call   10a0 <Vfunc@plt>
mov    -0xa0(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1357 <implicit_3Dz+0x197>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13e5 <implicit_3Dz+0x225>
mov    -0x80(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x28(%rbp),%xmm1
call   10a0 <Vfunc@plt>
mov    -0xa8(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    139f <implicit_3Dz+0x1df>
mov    0x10(%rbp),%edi
call   10d0 <tridiag_malloc@plt>
mov    0x20(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    17a6 <implicit_3Dz+0x5e6>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x58(%rbp),%eax
jge    1793 <implicit_3Dz+0x5d3>
mov    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
mov    -0x20(%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    -0x20(%rbp),%rax
mov    0x10(%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,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1524 <implicit_3Dz+0x364>
mov    -0x80(%rbp),%rax
movslq -0x64(%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 -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    14bf <implicit_3Dz+0x2ff>
mov    -0x70(%rbp),%rdi
mov    -0x98(%rbp),%rsi
mov    -0xa8(%rbp),%rdx
mov    0x10(%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    0x10(%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,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    15f0 <implicit_3Dz+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 -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    159e <implicit_3Dz+0x3de>
mov    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1679 <implicit_3Dz+0x4b9>
jp     1679 <implicit_3Dz+0x4b9>
mov    -0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1679 <implicit_3Dz+0x4b9>
jp     1679 <implicit_3Dz+0x4b9>
xorps  %xmm0,%xmm0
ucomisd -0x88(%rbp),%xmm0
ff
jb     1679 <implicit_3Dz+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    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0x982(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    173c <implicit_3Dz+0x57c>
jp     173c <implicit_3Dz+0x57c>
mov    -0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0x95d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    173c <implicit_3Dz+0x57c>
jp     173c <implicit_3Dz+0x57c>
movsd  -0x90(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     173c <implicit_3Dz+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    0x10(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0xc0(%rbp),%rax
mov    0x10(%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    -0x8(%rbp),%r8
mov    -0x5c(%rbp),%eax
imul   -0x58(%rbp),%eax
imul   0x10(%rbp),%eax
mov    -0x60(%rbp),%r9d
imul   0x10(%rbp),%r9d
add    %r9d,%eax
cltq
shl    $0x3,%rax
add    %rax,%r8
mov    0x10(%rbp),%r9d
call   1050 <tridiag_premalloc@plt>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1406 <implicit_3Dz+0x246>
jmp    1798 <implicit_3Dz+0x5d8>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    13f3 <implicit_3Dz+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_3Dz>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x188,%rsp
mov    %r9d,0x3c(%rsp)
movaps %xmm5,0x110(%rsp)
movsd  %xmm4,0x70(%rsp)
movsd  %xmm3,0x68(%rsp)
movsd  %xmm2,0x60(%rsp)
movsd  %xmm1,0x58(%rsp)
movsd  %xmm0,0x20(%rsp)
mov    %rcx,%r12
mov    %rdx,0xa0(%rsp)
mov    %rsi,0x100(%rsp)
mov    %rdi,0x48(%rsp)
mov    0x1d8(%rsp),%eax
mov    %eax,0x40(%rsp)
mov    0x1d0(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    0x1c8(%rsp),%eax
mov    %eax,0xac(%rsp)
mov    0x1c0(%rsp),%r14d
lea    -0x1(%r14),%eax
mov    %eax,0x30(%rsp)
lea    -0x8(,%r14,8),%ebx
ff
mov    %ebx,%edi
call   1090 <malloc@plt>
mov    %rax,%r15
lea    0x0(,%r14,8),%ebp
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0x88(%rsp)
mov    %ebx,%edi
call   1090 <malloc@plt>
mov    %rax,0xd0(%rsp)
mov    %ebx,%edi
call   1090 <malloc@plt>
mov    %rax,0xc8(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0x80(%rsp)
mov    %ebx,%edi
call   1090 <malloc@plt>
mov    %rax,0x78(%rsp)
mov    %ebx,%edi
call   1090 <malloc@plt>
mov    %rax,0xc0(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0x98(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0xb8(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0x90(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,%r13
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,%rbx
mov    %r12,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
call   10b0 <compute_dx@plt>
mov    %r15,0x50(%rsp)
mov    %r15,%rdi
mov    %r14d,%esi
mov    0x88(%rsp),%rdx
mov    0xd0(%rsp),%rbp
call   1080 <compute_dfactor@plt>
mov    %r12,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
call   10c0 <compute_xInt@plt>
mov    %r14d,%r15d
mov    %r14,0x10(%rsp)
test   %r14d,%r14d
mov    %r15,0xb0(%rsp)
mov    %rbx,0x120(%rsp)
jle    13c5 <implicit_3Dz+0x205>
xor    %ebx,%ebx
mov    0x80(%rsp),%r14
nopl   (%rax)
movsd  (%r12,%rbx,8),%xmm0
movsd  0x20(%rsp),%xmm1
call   10a0 <Vfunc@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1360 <implicit_3Dz+0x1a0>
cmpl   $0x2,0x10(%rsp)
setge  %al
mov    %eax,0x1c(%rsp)
jl     13c5 <implicit_3Dz+0x205>
mov    %r12,%r14
mov    0x30(%rsp),%r12d
xor    %ebx,%ebx
mov    0x78(%rsp),%r15
nopl   (%rax)
movsd  0x0(%rbp,%rbx,8),%xmm0
movsd  0x20(%rsp),%xmm1
call   10a0 <Vfunc@plt>
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    13a0 <implicit_3Dz+0x1e0>
mov    %r14,%r12
jmp    13cd <implicit_3Dz+0x20d>
movl   $0x0,0x1c(%rsp)
mov    0x10(%rsp),%rdi
call   10d0 <tridiag_malloc@plt>
mov    0xc(%rsp),%eax
cmp    0x40(%rsp),%eax
movsd  0x70(%rsp),%xmm6
movsd  0x68(%rsp),%xmm5
movsd  0x60(%rsp),%xmm4
movsd  0x58(%rsp),%xmm3
mov    0xc8(%rsp),%rbx
mov    0xb8(%rsp),%r14
jge    1952 <implicit_3Dz+0x792>
movslq 0x30(%rsp),%rdi
movsd  0xbe6(%rip),%xmm0
movsd  0x20(%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x160(%rsp)
movsd  0xbd3(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x158(%rsp)
mov    0x10(%rsp),%rsi
lea    -0x2(%rsi),%eax
cltq
mov    %rax,0x150(%rsp)
mov    0xc(%rsp),%edx
movslq %edx,%rax
mov    %rax,0x28(%rsp)
mov    0x3c(%rsp),%eax
mov    %eax,%ecx
mov    %rcx,0xd8(%rsp)
mov    %rdi,%rcx
mov    %rdi,0xe8(%rsp)
mov    %edi,%r15d
mov    0xb0(%rsp),%rcx
and    $0xfffffffe,%ecx
mov    %rcx,0x148(%rsp)
add    $0xfffffffffffffffe,%rcx
mov    %rcx,0x140(%rsp)
mov    %rcx,%rdi
shr    %rdi
add    $0x1,%rdi
movapd 0x110(%rsp),%xmm0
unpcklpd %xmm0,%xmm0
movapd %xmm0,0x170(%rsp)
mov    %rdi,%rcx
mov    %rdi,0x138(%rsp)
and    $0xfffffffffffffffe,%rdi
mov    %rdi,0x130(%rsp)
mov    0x48(%rsp),%rcx
add    $0x10,%rcx
mov    %rcx,0x128(%rsp)
imul   %esi,%edx
imul   %eax,%edx
mov    %edx,0xc(%rsp)
mov    %esi,%ecx
imul   %eax,%ecx
mov    %ecx,0xa8(%rsp)
mov    %r12,0x168(%rsp)
jmp    1536 <implicit_3Dz+0x376>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x28(%rsp),%rcx
add    $0x1,%rcx
mov    0xa8(%rsp),%eax
add    %eax,0xc(%rsp)
mov    %rcx,%rax
mov    %rcx,0x28(%rsp)
cmp    0x40(%rsp),%ecx
je     1952 <implicit_3Dz+0x792>
cmpl   $0x0,0x3c(%rsp)
jle    1510 <implicit_3Dz+0x350>
mov    0x28(%rsp),%rax
imul   0xd8(%rsp),%eax
mov    %rax,0xe0(%rsp)
mov    0xc(%rsp),%eax
mov    %eax,0x44(%rsp)
xor    %edx,%edx
jmp    15d9 <implicit_3Dz+0x419>
xchg   %ax,%ax
mov    0xe0(%rsp),%rax
add    %ebx,%eax
mov    0x10(%rsp),%rbx
imul   %ebx,%eax
cltq
mov    0x48(%rsp),%rcx
lea    (%rcx,%rax,8),%r8
mov    0x98(%rsp),%rdi
mov    %r14,%rsi
mov    0x90(%rsp),%rdx
mov    %r13,%rcx
mov    %ebx,%r9d
call   1050 <tridiag_premalloc@plt>
mov    0x108(%rsp),%rdx
add    $0x1,%rdx
add    %ebx,0x44(%rsp)
cmp    0xd8(%rsp),%rdx
movsd  0x70(%rsp),%xmm6
movsd  0x68(%rsp),%xmm5
movsd  0x60(%rsp),%xmm4
movsd  0x58(%rsp),%xmm3
mov    0xc8(%rsp),%rbx
je     1510 <implicit_3Dz+0x350>
mov    0x100(%rsp),%rax
mov    0x28(%rsp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  %xmm1,0x20(%rsp)
mov    0xa0(%rsp),%rax
mov    %rdx,0x108(%rsp)
movsd  (%rax,%rdx,8),%xmm2
movsd  %xmm2,0x30(%rsp)
movsd  (%r12),%xmm0
call   1070 <Mfunc3D@plt>
movsd  %xmm0,0xf0(%rsp)
mov    0xe8(%rsp),%rax
movsd  (%r12,%rax,8),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
movsd  0x58(%rsp),%xmm3
movsd  0x60(%rsp),%xmm4
movsd  0x68(%rsp),%xmm5
movsd  0x70(%rsp),%xmm6
call   1070 <Mfunc3D@plt>
movsd  %xmm0,0xf8(%rsp)
cmpb   $0x0,0x1c(%rsp)
je     16af <implicit_3Dz+0x4ef>
xor    %r12d,%r12d
nopw   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%r12,8),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
movsd  0x58(%rsp),%xmm3
movsd  0x60(%rsp),%xmm4
movsd  0x68(%rsp),%xmm5
movsd  0x70(%rsp),%xmm6
call   1070 <Mfunc3D@plt>
movsd  %xmm0,(%rbx,%r12,8)
add    $0x1,%r12
cmp    %r12,%r15
jne    1670 <implicit_3Dz+0x4b0>
mov    0x50(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    0x78(%rsp),%rdx
mov    %rbx,%r12
mov    0x10(%rsp),%rbx
mov    %ebx,%ecx
mov    0xc0(%rsp),%r14
mov    %r14,%r8
mov    0xac(%rsp),%r9d
call   10e0 <compute_delj@plt>
sub    $0x8,%rsp
mov    %rbp,%rdi
mov    0x90(%rsp),%rsi
mov    %r14,%rdx
mov    %r12,%rcx
mov    0x88(%rsp),%r8
movapd 0x118(%rsp),%xmm0
mov    %ebx,%r9d
push   0x98(%rsp)
mov    0xc8(%rsp),%r14
push   %r14
push   0xb0(%rsp)
call   1040 <compute_abc_nobc@plt>
movapd 0x130(%rsp),%xmm1
add    $0x20,%rsp
test   %ebx,%ebx
mov    0xb0(%rsp),%rdi
movapd 0x170(%rsp),%xmm2
mov    0x108(%rsp),%rbx
jle    1839 <implicit_3Dz+0x679>
movslq 0x44(%rsp),%rax
cmpl   $0x1,0x10(%rsp)
jne    1770 <implicit_3Dz+0x5b0>
xor    %ecx,%ecx
jmp    180f <implicit_3Dz+0x64f>
nopl   0x0(%rax,%rax,1)
cmpq   $0x0,0x140(%rsp)
je     193d <implicit_3Dz+0x77d>
mov    0x128(%rsp),%rcx
lea    (%rcx,%rax,8),%rdx
mov    0x130(%rsp),%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movupd -0x10(%rdx,%rcx,8),%xmm0
divpd  %xmm2,%xmm0
movupd %xmm0,0x0(%r13,%rcx,8)
movupd (%rdx,%rcx,8),%xmm0
divpd  %xmm2,%xmm0
movupd %xmm0,0x10(%r13,%rcx,8)
add    $0x4,%rcx
add    $0xfffffffffffffffe,%rsi
jne    17a0 <implicit_3Dz+0x5e0>
testb  $0x1,0x138(%rsp)
01
je     17ff <implicit_3Dz+0x63f>
mov    0xe0(%rsp),%rdx
add    %ebx,%edx
imul   0x10(%rsp),%edx
movslq %edx,%rdx
add    %rcx,%rdx
mov    0x48(%rsp),%rsi
movupd (%rsi,%rdx,8),%xmm0
divpd  %xmm2,%xmm0
movupd %xmm0,0x0(%r13,%rcx,8)
mov    0x148(%rsp),%rdx
mov    %rdx,%rcx
cmp    %rdi,%rdx
je     1839 <implicit_3Dz+0x679>
mov    0x48(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
nopl   0x0(%rax,%rax,1)
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%r13,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rdi
jne    1820 <implicit_3Dz+0x660>
mov    0x100(%rsp),%rax
mov    0x28(%rsp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jne    18a0 <implicit_3Dz+0x6e0>
jp     18a0 <implicit_3Dz+0x6e0>
mov    0xa0(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm1
ucomisd %xmm2,%xmm1
jne    18a0 <implicit_3Dz+0x6e0>
jp     18a0 <implicit_3Dz+0x6e0>
ucomisd 0xf0(%rsp),%xmm2
jb     18a0 <implicit_3Dz+0x6e0>
movsd  0x160(%rsp),%xmm1
subsd  0xf0(%rsp),%xmm1
addsd  %xmm1,%xmm1
mov    0x50(%rsp),%rax
divsd  (%rax),%xmm1
addsd  (%r14),%xmm1
movsd  %xmm1,(%r14)
ucomisd 0x768(%rip),%xmm0
mov    0x168(%rsp),%r12
mov    0xd0(%rsp),%rbp
jne    1560 <implicit_3Dz+0x3a0>
jp     1560 <implicit_3Dz+0x3a0>
mov    0xa0(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm0
ucomisd 0x737(%rip),%xmm0
jne    1560 <implicit_3Dz+0x3a0>
jp     1560 <implicit_3Dz+0x3a0>
movsd  0xf8(%rsp),%xmm0
ucomisd %xmm2,%xmm0
jb     1560 <implicit_3Dz+0x3a0>
movsd  0x158(%rsp),%xmm0
subsd  0xf8(%rsp),%xmm0
addsd  %xmm0,%xmm0
mov    0x50(%rsp),%rax
mov    0x150(%rsp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    0xe8(%rsp),%rax
movsd  (%r14,%rax,8),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rax,8)
jmp    1560 <implicit_3Dz+0x3a0>
xor    %ecx,%ecx
testb  $0x1,0x138(%rsp)
01
jne    17d5 <implicit_3Dz+0x615>
jmp    17ff <implicit_3Dz+0x63f>
xor    %eax,%eax
call   1060 <tridiag_free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    0x88(%rsp),%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x80(%rsp),%rdi
call   1030 <free@plt>
mov    0x78(%rsp),%rdi
call   1030 <free@plt>
mov    0xc0(%rsp),%rdi
call   1030 <free@plt>
mov    0x98(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x90(%rsp),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0x120(%rsp),%rdi
add    $0x188,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @implicit_3Dz(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* %29
%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* %29
%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* %29
%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* %29
%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* %29
%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* %29
%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* %29
%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* %29
%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* %29
%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* %29
%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* %29
%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* %29
%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** %20
%118 = load i32, i32* %29
%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* %29
%123 = load double*, double** %37
%124 = call i32 @compute_dfactor(double* %121, i32 %122, double* %123)
%125 = load double*, double** %20
%126 = load i32, i32* %29
%127 = load double*, double** %38
%128 = call i32 @compute_xInt(double* %125, i32 %126, double* %127)
store i32 0, i32* %35
br label %129
129: ; preds = %145, %16
%130 = load i32, i32* %35
%131 = load i32, i32* %29
%132 = icmp slt i32 %130, %131
br i1 %132, label %133, label %148
133: ; preds = %129
%134 = load double*, double** %20
%135 = load i32, i32* %35
%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* %35
%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* %35
%147 = add nsw i32 %146, 1
store i32 %147, i32* %35
br label %129
148: ; preds = %129
store i32 0, i32* %35
br label %149
149: ; preds = %166, %148
%150 = load i32, i32* %35
%151 = load i32, i32* %29
%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* %35
%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* %35
%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* %35
%168 = add nsw i32 %167, 1
store i32 %168, i32* %35
br label %149
169: ; preds = %149
%170 = load i32, i32* %29
%171 = call i32 @tridiag_malloc(i32 %170)
%172 = load i32, i32* %31
store i32 %172, i32* %33
br label %173
173: ; preds = %381, %169
%174 = load i32, i32* %33
%175 = load i32, i32* %32
%176 = icmp slt i32 %174, %175
br i1 %176, label %177, label %384
177: ; preds = %173
store i32 0, i32* %34
br label %178
178: ; preds = %377, %177
%179 = load i32, i32* %34
%180 = load i32, i32* %28
%181 = icmp slt i32 %179, %180
br i1 %181, label %182, label %380
182: ; preds = %178
%183 = load double*, double** %18
%184 = load i32, i32* %33
%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** %19
%189 = load i32, i32* %34
%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** %20
%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** %20
%204 = load i32, i32* %29
%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* %35
br label %216
216: ; preds = %238, %182
%217 = load i32, i32* %35
%218 = load i32, i32* %29
%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* %35
%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* %35
%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* %35
%240 = add nsw i32 %239, 1
store i32 %240, i32* %35
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* %29
%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* %29
%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* %35
br label %260
260: ; preds = %286, %241
%261 = load i32, i32* %35
%262 = load i32, i32* %29
%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* %35
%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* %35
%288 = add nsw i32 %287, 1
store i32 %288, i32* %35
br label %260
289: ; preds = %260
%290 = load double*, double** %18
%291 = load i32, i32* %33
%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** %19
%298 = load i32, i32* %34
%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** %18
%322 = load i32, i32* %33
%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** %19
%329 = load i32, i32* %34
%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* %29
%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* %29
%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** %17
%364 = load i32, i32* %33
%365 = load i32, i32* %28
%366 = mul nsw i32 %364, %365
%367 = load i32, i32* %29
%368 = mul nsw i32 %366, %367
%369 = load i32, i32* %34
%370 = load i32, i32* %29
%371 = mul nsw i32 %369, %370
%372 = add nsw i32 %368, %371
%373 = sext i32 %372 to i64
%374 = getelementptr inbounds double, double* %363, i64 %373
%375 = load i32, i32* %29
%376 = call i32 @tridiag_premalloc(double* %359, double* %360, double* %361, double* %362, double* %374, i32 %375)
br label %377
377: ; preds = %358
%378 = load i32, i32* %34
%379 = add nsw i32 %378, 1
store i32 %379, i32* %34
br label %178
380: ; preds = %178
br label %381
381: ; preds = %380
%382 = load i32, i32* %33
%383 = add nsw i32 %382, 1
store i32 %383, i32* %33
br label %173
384: ; preds = %173
%385 = call i32 (...) @tridiag_free()
%386 = load double*, double** %36
%387 = call i32 @free(double* %386)
%388 = load double*, double** %37
%389 = call i32 @free(double* %388)
%390 = load double*, double** %38
%391 = call i32 @free(double* %390)
%392 = load double*, double** %41
%393 = call i32 @free(double* %392)
%394 = load double*, double** %42
%395 = call i32 @free(double* %394)
%396 = load double*, double** %43
%397 = call i32 @free(double* %396)
%398 = load double*, double** %44
%399 = call i32 @free(double* %398)
%400 = load double*, double** %45
%401 = call i32 @free(double* %400)
%402 = load double*, double** %46
%403 = call i32 @free(double* %402)
%404 = load double*, double** %47
%405 = call i32 @free(double* %404)
%406 = load double*, double** %48
%407 = call i32 @free(double* %406)
%408 = load double*, double** %49
%409 = call i32 @free(double* %408)
ret void
}

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