#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 Mfunc2D(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_2Dx(double *phi, double *xx, double *yy, double nu1, double m12,
                  double gamma1, double h1, double dt, int L, int M,
                  int use_delj_trick, int Mstart, int Mend) {
  int ii, jj;
  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;
  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++) {
    y = yy[jj];
    Mfirst = Mfunc2D(xx[0], y, m12, gamma1, h1);
    Mlast = Mfunc2D(xx[L - 1], y, m12, gamma1, h1);
    for (ii = 0; ii < L - 1; ii++)
      MInt[ii] = Mfunc2D(xInt[ii], y, m12, 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 + jj] / dt;
    if ((yy[jj] == 0) && (Mfirst <= 0))
      b[0] += (0.5 / nu1 - Mfirst) * 2. / dx[0];
    if ((yy[jj] == 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 + jj] = 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_2Dx>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
movsd  %xmm4,-0x40(%rbp)
mov    %ecx,-0x44(%rbp)
mov    %r8d,-0x48(%rbp)
mov    %r9d,-0x4c(%rbp)
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x70(%rbp)
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x88(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x98(%rbp)
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xa0(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xa8(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xb0(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xb8(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xc0(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xc8(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    -0x60(%rbp),%rdx
call   10b0 <compute_dx@plt>
mov    -0x60(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    -0x68(%rbp),%rdx
call   1080 <compute_dfactor@plt>
mov    -0x10(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    -0x70(%rbp),%rdx
call   10c0 <compute_xInt@plt>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    138c <implicit_2Dx+0x1cc>
mov    -0x10(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x20(%rbp),%xmm1
call   10a0 <Vfunc@plt>
mov    -0x90(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    134b <implicit_2Dx+0x18b>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13d9 <implicit_2Dx+0x219>
mov    -0x70(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x20(%rbp),%xmm1
call   10a0 <Vfunc@plt>
mov    -0x98(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1393 <implicit_2Dx+0x1d3>
mov    -0x44(%rbp),%edi
call   10d0 <tridiag_malloc@plt>
mov    0x10(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1703 <implicit_2Dx+0x543>
mov    -0x18(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
call   1070 <Mfunc2D@plt>
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
call   1070 <Mfunc2D@plt>
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    14c3 <implicit_2Dx+0x303>
mov    -0x70(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
call   1070 <Mfunc2D@plt>
mov    -0x88(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    146b <implicit_2Dx+0x2ab>
mov    -0x60(%rbp),%rdi
mov    -0x88(%rbp),%rsi
mov    -0x98(%rbp),%rdx
mov    -0x44(%rbp),%ecx
mov    -0xa0(%rbp),%r8
mov    -0x4c(%rbp),%r9d
call   10e0 <compute_delj@plt>
mov    -0x60(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0xa0(%rbp),%rdx
mov    -0x88(%rbp),%rcx
mov    -0x90(%rbp),%r8
movsd  -0x40(%rbp),%xmm0
mov    -0x44(%rbp),%r9d
mov    -0xa8(%rbp),%r11
mov    -0xb0(%rbp),%r10
mov    -0xb8(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <compute_abc_nobc@plt>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1582 <implicit_2Dx+0x3c2>
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp),%ecx
imul   -0x48(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x40(%rbp),%xmm0
mov    -0xc0(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    153d <implicit_2Dx+0x37d>
mov    -0x18(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    15e5 <implicit_2Dx+0x425>
jp     15e5 <implicit_2Dx+0x425>
xorps  %xmm0,%xmm0
ucomisd -0x78(%rbp),%xmm0
jb     15e5 <implicit_2Dx+0x425>
movsd  0xa50(%rip),%xmm0
divsd  -0x20(%rbp),%xmm0
subsd  -0x78(%rbp),%xmm0
movsd  0xa36(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0xb0(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xa16(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    167d <implicit_2Dx+0x4bd>
jp     167d <implicit_2Dx+0x4bd>
movsd  -0x80(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     167d <implicit_2Dx+0x4bd>
movsd  0x9f4(%rip),%xmm0
divsd  -0x20(%rbp),%xmm0
subsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x9b3(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
mov    -0x44(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0xb0(%rbp),%rax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xa8(%rbp),%rdi
mov    -0xb0(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
mov    -0xc0(%rbp),%rcx
mov    -0xc8(%rbp),%r8
mov    -0x44(%rbp),%r9d
call   1050 <tridiag_premalloc@plt>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    16f0 <implicit_2Dx+0x530>
mov    -0xc8(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp),%ecx
imul   -0x48(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    16b0 <implicit_2Dx+0x4f0>
jmp    16f5 <implicit_2Dx+0x535>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    13e7 <implicit_2Dx+0x227>
mov    $0x0,%al
call   1060 <tridiag_free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x90(%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>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<implicit_2Dx>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1d8,%rsp
mov    %r9d,0x9c(%rsp)
mov    %r8d,0x80(%rsp)
mov    %ecx,%ebx
movaps %xmm4,0xe0(%rsp)
movsd  %xmm3,0x58(%rsp)
movsd  %xmm2,0x50(%rsp)
movsd  %xmm1,0x48(%rsp)
movsd  %xmm0,0x18(%rsp)
mov    %rdx,0xd8(%rsp)
mov    %rsi,%r12
mov    %rdi,0x20(%rsp)
mov    0x218(%rsp),%eax
mov    %eax,0x3c(%rsp)
mov    0x210(%rsp),%eax
mov    %eax,0x10(%rsp)
lea    -0x1(%rbx),%eax
mov    %eax,0x40(%rsp)
lea    -0x8(,%rbx,8),%r15d
ff
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,0x28(%rsp)
lea    0x0(,%rbx,8),%ebp
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0x78(%rsp)
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,%r13
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,0xb8(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0x70(%rsp)
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,0x68(%rsp)
mov    %r15d,%edi
mov    %r13,%r15
call   1090 <malloc@plt>
mov    %rax,0xb0(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0x60(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0xa8(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0x90(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0xa0(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,%r14
mov    %r12,%rdi
mov    %ebx,%esi
mov    0x28(%rsp),%rbp
mov    %rbp,%rdx
call   10b0 <compute_dx@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
mov    0x78(%rsp),%rdx
call   1080 <compute_dfactor@plt>
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r13,%rdx
call   10c0 <compute_xInt@plt>
mov    %ebx,%r13d
mov    %rbx,0x30(%rsp)
test   %ebx,%ebx
mov    %r13,0x88(%rsp)
mov    %r12,0x1a8(%rsp)
jle    13a2 <implicit_2Dx+0x1e2>
xor    %ebx,%ebx
mov    0x70(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%r12,%rbx,8),%xmm0
movsd  0x18(%rsp),%xmm1
call   10a0 <Vfunc@plt>
movsd  %xmm0,0x0(%rbp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1340 <implicit_2Dx+0x180>
cmpl   $0x2,0x30(%rsp)
setge  %al
mov    %eax,0x4(%rsp)
mov    0x60(%rsp),%r13
jl     13b1 <implicit_2Dx+0x1f1>
mov    0x40(%rsp),%ebp
xor    %r12d,%r12d
mov    0x68(%rsp),%rbx
nop
movsd  (%r15,%r12,8),%xmm0
movsd  0x18(%rsp),%xmm1
call   10a0 <Vfunc@plt>
movsd  %xmm0,(%rbx,%r12,8)
add    $0x1,%r12
cmp    %r12,%rbp
jne    1380 <implicit_2Dx+0x1c0>
jmp    13b9 <implicit_2Dx+0x1f9>
movl   $0x0,0x4(%rsp)
mov    0x60(%rsp),%r13
jmp    13b9 <implicit_2Dx+0x1f9>
movl   $0x0,0x4(%rsp)
mov    0x30(%rsp),%rdi
call   10d0 <tridiag_malloc@plt>
mov    0x10(%rsp),%ecx
cmp    0x3c(%rsp),%ecx
movsd  0x58(%rsp),%xmm4
movsd  0x50(%rsp),%xmm3
movsd  0x48(%rsp),%xmm2
mov    0xa8(%rsp),%r12
jge    1b6a <implicit_2Dx+0x9aa>
movslq 0x40(%rsp),%r8
movsd  0xc08(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x180(%rsp)
movsd  0xbf5(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x178(%rsp)
mov    0x30(%rsp),%r10
lea    -0x2(%r10),%eax
cltq
mov    %rax,0x170(%rsp)
movslq 0x80(%rsp),%rdi
movslq %ecx,%r9
mov    0x88(%rsp),%rdx
mov    %edx,%eax
and    $0xfffffffe,%eax
mov    %rax,0x158(%rsp)
add    $0xfffffffffffffffe,%rax
mov    %rax,0x150(%rsp)
shr    %rax
add    $0x1,%rax
mov    %edx,%esi
and    $0xfffffffc,%esi
mov    %rsi,0x140(%rsp)
add    $0xfffffffffffffffc,%rsi
mov    %rsi,0x138(%rsp)
mov    %rsi,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
cmp    $0x1,%r10d
setne  %bl
cmp    $0x1,%edi
sete   %r11b
and    %r11b,%bl
mov    %bl,0x3(%rsp)
movapd 0xe0(%rsp),%xmm0
unpcklpd %xmm0,%xmm0
movapd %xmm0,0x1c0(%rsp)
mov    %rax,%rsi
mov    %rax,0x148(%rsp)
and    $0xfffffffffffffffe,%rax
mov    %rax,0x110(%rsp)
mov    %rdx,%rax
neg    %rax
mov    %rax,0x168(%rsp)
cmp    $0x4,%r10d
setae  %al
and    %r11b,%al
mov    %al,0x2(%rsp)
mov    %rcx,%rax
mov    %rcx,0x130(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x108(%rsp)
and    $0x3,%edx
mov    %rdx,0x160(%rsp)
mov    %rdi,%rax
shl    $0x4,%rax
mov    %rax,0x100(%rsp)
mov    %rdi,%rbp
shl    $0x5,%rbp
mov    %rdi,%rax
shl    $0x6,%rax
mov    %rax,0xf8(%rsp)
mov    %r8,%rax
mov    %r8,0xd0(%rsp)
mov    %r8d,%eax
mov    %rax,0x198(%rsp)
mov    0x20(%rsp),%rax
lea    (%rax,%r9,8),%rcx
lea    (%rdi,%rdi,1),%rdx
mov    %rdx,0x188(%rsp)
lea    0x10(%rax,%r9,8),%r10
mov    %rdi,0x8(%rsp)
lea    0x0(,%rdi,8),%rdx
mov    %rdx,0x128(%rsp)
xor    %r11d,%r11d
mov    %rax,0xc8(%rsp)
mov    %rcx,0x118(%rsp)
mov    %rcx,0xc0(%rsp)
mov    %r9,0x120(%rsp)
mov    %r15,0x1a0(%rsp)
mov    %rbp,0x190(%rsp)
jmp    15d9 <implicit_2Dx+0x419>
nopl   0x0(%rax)
add    $0x1,%r9
addq   $0x8,0xc0(%rsp)
addq   $0x8,0xc8(%rsp)
add    $0x8,%r10
add    $0x8,%r11
cmp    0x3c(%rsp),%r9d
je     1b6a <implicit_2Dx+0x9aa>
mov    %r11,0x80(%rsp)
mov    %r10,0x40(%rsp)
mov    0xd8(%rsp),%rax
mov    %r9,0x10(%rsp)
movsd  (%rax,%r9,8),%xmm1
movsd  %xmm1,0x18(%rsp)
mov    0x1a8(%rsp),%rbx
movsd  (%rbx),%xmm0
call   1070 <Mfunc2D@plt>
movsd  %xmm0,0x1b0(%rsp)
mov    0xd0(%rsp),%rax
movsd  (%rbx,%rax,8),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x48(%rsp),%xmm2
movsd  0x50(%rsp),%xmm3
movsd  0x58(%rsp),%xmm4
call   1070 <Mfunc2D@plt>
movsd  %xmm0,0x1b8(%rsp)
cmpb   $0x0,0x4(%rsp)
mov    0xb8(%rsp),%r12
mov    0x198(%rsp),%rbp
je     16a2 <implicit_2Dx+0x4e2>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%r15,%rbx,8),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x48(%rsp),%xmm2
movsd  0x50(%rsp),%xmm3
movsd  0x58(%rsp),%xmm4
call   1070 <Mfunc2D@plt>
movsd  %xmm0,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1670 <implicit_2Dx+0x4b0>
mov    0x28(%rsp),%r15
mov    %r15,%rdi
mov    %r12,%rsi
mov    0x68(%rsp),%rdx
mov    0x30(%rsp),%rbx
mov    %ebx,%ecx
mov    0xb0(%rsp),%r13
mov    %r13,%r8
mov    0x9c(%rsp),%r9d
call   10e0 <compute_delj@plt>
sub    $0x8,%rsp
mov    %r15,%rdi
mov    0x80(%rsp),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    0x78(%rsp),%r8
movapd 0xe8(%rsp),%xmm0
mov    %ebx,%r9d
push   0x98(%rsp)
mov    0xb8(%rsp),%r12
push   %r12
mov    0x78(%rsp),%r13
push   %r13
call   1040 <compute_abc_nobc@plt>
movapd 0x100(%rsp),%xmm1
add    $0x20,%rsp
test   %ebx,%ebx
mov    0xa0(%rsp),%rcx
mov    0x88(%rsp),%rbx
movapd 0x1c0(%rsp),%xmm2
mov    0x190(%rsp),%rbp
mov    0x188(%rsp),%r8
mov    0x10(%rsp),%r9
movsd  0x1b0(%rsp),%xmm3
jle    18a9 <implicit_2Dx+0x6e9>
cmpb   $0x0,0x3(%rsp)
je     1810 <implicit_2Dx+0x650>
cmpq   $0x0,0x150(%rsp)
je     1b40 <implicit_2Dx+0x980>
mov    0x110(%rsp),%rsi
mov    0xc0(%rsp),%rdx
xor    %eax,%eax
mov    0x100(%rsp),%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd (%rdx),%xmm0
divpd  %xmm2,%xmm0
movupd %xmm0,(%rcx,%rax,8)
movupd (%rdx,%rdi,1),%xmm0
divpd  %xmm2,%xmm0
movupd %xmm0,0x10(%rcx,%rax,8)
add    $0x4,%rax
add    %rbp,%rdx
add    $0xfffffffffffffffe,%rsi
jne    17a0 <implicit_2Dx+0x5e0>
testb  $0x1,0x148(%rsp)
01
je     17f2 <implicit_2Dx+0x632>
mov    %rax,%rsi
imul   0x8(%rsp),%rsi
add    %r9,%rsi
mov    0x20(%rsp),%rdx
movupd (%rdx,%rsi,8),%xmm0
divpd  %xmm2,%xmm0
movupd %xmm0,(%rcx,%rax,8)
mov    0x158(%rsp),%rax
mov    %rax,%rsi
cmp    %rbx,%rax
jne    1812 <implicit_2Dx+0x652>
jmp    18a9 <implicit_2Dx+0x6e9>
nopw   0x0(%rax,%rax,1)
xor    %esi,%esi
mov    %rsi,%rax
test   $0x1,%bl
je     1840 <implicit_2Dx+0x680>
mov    %rsi,%rax
imul   0x8(%rsp),%rax
add    %r9,%rax
mov    0x20(%rsp),%rdx
movsd  (%rdx,%rax,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx,%rsi,8)
mov    %rsi,%rax
or     $0x1,%rax
not    %rsi
cmp    0x168(%rsp),%rsi
je     18a9 <implicit_2Dx+0x6e9>
mov    0x8(%rsp),%r9
mov    %r9,%rdx
imul   %rax,%rdx
mov    0xc8(%rsp),%rsi
lea    (%rsi,%rdx,8),%rdi
lea    0x1(%rax),%rdx
imul   %r9,%rdx
mov    0x10(%rsp),%r9
lea    (%rsi,%rdx,8),%rdx
mov    0x120(%rsp),%rsi
xchg   %ax,%ax
movsd  (%rdi,%rsi,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx,%rax,8)
movsd  (%rdx,%rsi,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rcx,%rax,8)
add    $0x2,%rax
add    %r8,%rsi
cmp    %rax,%rbx
jne    1880 <implicit_2Dx+0x6c0>
mov    0xd8(%rsp),%rax
movsd  (%rax,%r9,8),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jne    18ef <implicit_2Dx+0x72f>
jp     18ef <implicit_2Dx+0x72f>
ucomisd %xmm3,%xmm2
jb     18ef <implicit_2Dx+0x72f>
movsd  0x180(%rsp),%xmm1
subsd  %xmm3,%xmm1
addsd  %xmm1,%xmm1
mov    0x28(%rsp),%rax
divsd  (%rax),%xmm1
addsd  (%r12),%xmm1
movsd  %xmm1,(%r12)
ucomisd 0x719(%rip),%xmm0
mov    0x1a0(%rsp),%r15
movsd  0x1b8(%rsp),%xmm1
jne    194d <implicit_2Dx+0x78d>
jp     194d <implicit_2Dx+0x78d>
ucomisd %xmm2,%xmm1
jb     194d <implicit_2Dx+0x78d>
movsd  0x178(%rsp),%xmm0
subsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
mov    0x28(%rsp),%rax
mov    0x170(%rsp),%rdx
divsd  (%rax,%rdx,8),%xmm0
mov    0xd0(%rsp),%rax
movsd  (%r12,%rax,8),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r12,%rax,8)
mov    %r13,%rdi
mov    %r12,%rsi
mov    0x90(%rsp),%rdx
mov    %r14,%r8
mov    0x30(%rsp),%rbx
mov    %ebx,%r9d
call   1050 <tridiag_premalloc@plt>
test   %ebx,%ebx
movsd  0x58(%rsp),%xmm4
movsd  0x50(%rsp),%xmm3
movsd  0x48(%rsp),%xmm2
mov    0x88(%rsp),%r8
mov    0x40(%rsp),%r10
mov    0x80(%rsp),%r11
mov    0x10(%rsp),%r9
jle    15b0 <implicit_2Dx+0x3f0>
cmpb   $0x0,0x2(%rsp)
je     1a50 <implicit_2Dx+0x890>
cmpq   $0x0,0x138(%rsp)
je     1b55 <implicit_2Dx+0x995>
mov    0x108(%rsp),%rcx
mov    %r10,%rdx
xor    %eax,%eax
mov    0xf8(%rsp),%rsi
xchg   %ax,%ax
movups (%r14,%rax,8),%xmm0
movups 0x10(%r14,%rax,8),%xmm1
movups %xmm0,-0x10(%rdx)
movups %xmm1,(%rdx)
movupd 0x20(%r14,%rax,8),%xmm0
movupd 0x30(%r14,%rax,8),%xmm1
movupd %xmm0,-0x10(%rdx,%rbp,1)
movupd %xmm1,(%rdx,%rbp,1)
add    $0x8,%rax
add    %rsi,%rdx
add    $0xfffffffffffffffe,%rcx
jne    19d0 <implicit_2Dx+0x810>
testb  $0x1,0x130(%rsp)
01
je     1a38 <implicit_2Dx+0x878>
movupd (%r14,%rax,8),%xmm0
movupd 0x10(%r14,%rax,8),%xmm1
imul   0x8(%rsp),%rax
add    %r9,%rax
mov    0x20(%rsp),%rcx
movupd %xmm0,(%rcx,%rax,8)
movupd %xmm1,0x10(%rcx,%rax,8)
mov    0x140(%rsp),%rcx
mov    %rcx,%rax
cmp    %r8,%rcx
je     15b0 <implicit_2Dx+0x3f0>
jmp    1a52 <implicit_2Dx+0x892>
xchg   %ax,%ax
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r8,%rcx
mov    0x160(%rsp),%rdi
test   %rdi,%rdi
je     1aa7 <implicit_2Dx+0x8e7>
mov    0x8(%rsp),%rdx
imul   %rax,%rdx
add    %r9,%rdx
mov    0x20(%rsp),%rsi
lea    (%rsi,%rdx,8),%rdx
mov    %rdi,%rsi
mov    0x128(%rsp),%rdi
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%rdx)
add    $0x1,%rax
add    %rdi,%rdx
add    $0xffffffffffffffff,%rsi
jne    1a90 <implicit_2Dx+0x8d0>
cmp    $0x3,%rcx
jb     15b0 <implicit_2Dx+0x3f0>
lea    0x3(%rax),%rcx
mov    0x8(%rsp),%rbx
imul   %rbx,%rcx
mov    0x118(%rsp),%r9
lea    (%r9,%rcx,8),%rcx
lea    0x2(%rax),%rdx
imul   %rbx,%rdx
lea    (%r9,%rdx,8),%rdx
mov    %rbx,%rsi
imul   %rax,%rsi
lea    (%r9,%rsi,8),%rsi
lea    0x1(%rax),%rdi
imul   %rbx,%rdi
lea    (%r9,%rdi,8),%rdi
mov    0x10(%rsp),%r9
mov    %r11,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%rsi,%rbx,1)
movsd  0x8(%r14,%rax,8),%xmm0
movsd  %xmm0,(%rdi,%rbx,1)
movsd  0x10(%r14,%rax,8),%xmm0
movsd  %xmm0,(%rdx,%rbx,1)
movsd  0x18(%r14,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rbx,1)
add    $0x4,%rax
add    %rbp,%rbx
cmp    %rax,%r8
jne    1b00 <implicit_2Dx+0x940>
jmp    15b0 <implicit_2Dx+0x3f0>
xor    %eax,%eax
testb  $0x1,0x148(%rsp)
01
jne    17d3 <implicit_2Dx+0x613>
jmp    17f2 <implicit_2Dx+0x632>
xor    %eax,%eax
testb  $0x1,0x130(%rsp)
01
jne    1a12 <implicit_2Dx+0x852>
jmp    1a38 <implicit_2Dx+0x878>
xor    %eax,%eax
call   1060 <tridiag_free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x78(%rsp),%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0xb8(%rsp),%rdi
call   1030 <free@plt>
mov    0x70(%rsp),%rdi
call   1030 <free@plt>
mov    0x68(%rsp),%rdi
call   1030 <free@plt>
mov    0xb0(%rsp),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    0x90(%rsp),%rdi
call   1030 <free@plt>
mov    0xa0(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
add    $0x1d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

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