#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 exp(double);
int /*<<< orphan*/ free(double *);
double log(double);
scalar_t__ malloc(int);
void computeForwardBackward(int N, int S, double *pi, double *A, double *dens,
                            double *logdens, double *logAlpha, double *logBeta,
                            double *alpha, double *beta) {
  int n, s, t, m;
  double maxLogAlpha = -1000000000, maxAlpha = -1000000000;
  double maxBeta = -1000000000, maxLogBeta = -1000000000;
  double *tmpAlpha, *tmpLogBeta;
  tmpAlpha = (double *)malloc(S * N * sizeof(double));
  tmpLogBeta = (double *)malloc(S * S * sizeof(double));
  for (s = 0; s < S; s++) {
    logAlpha[s] = log(pi[s]) + logdens[s];
    if (logAlpha[s] > maxLogAlpha)
      maxLogAlpha = logAlpha[s];
    logBeta[s + S * (N - 1)] = 0.0;
    beta[s + S * (N - 1)] = 1.0;
  }
  for (s = 0; s < S; s++) {
    logAlpha[s] = logAlpha[s] - maxLogAlpha;
  }
  for (s = 0; s < S; s++) {
    alpha[s] = exp(logAlpha[s]);
  }
  for (n = 1; n < N; n++) {
    maxLogAlpha = -1000000000;
    for (s = 0; s < S; s++) {
      logAlpha[s + S * n] = logdens[s + S * n];
    }
    maxAlpha = -1000000000;
    for (s = 0; s < S; s++) {
      tmpAlpha[s + S * n] = 0.0;
      for (t = 0; t < S; t++) {
        tmpAlpha[s + S * n] =
            tmpAlpha[s + S * n] + alpha[t + S * (n - 1)] * A[t + s * S];
      }
      if (log(tmpAlpha[s + S * n]) > maxAlpha)
        maxAlpha = log(tmpAlpha[s + S * n]);
    }
    for (s = 0; s < S; s++) {
      logAlpha[s + S * n] =
          logAlpha[s + S * n] + log(tmpAlpha[s + S * n]) - maxAlpha;
      if (logAlpha[s + S * n] > maxLogAlpha)
        maxLogAlpha = logAlpha[s + S * n];
    }
    for (s = 0; s < S; s++) {
      logAlpha[s + S * n] = logAlpha[s + S * n] - maxLogAlpha;
      alpha[s + S * n] = exp(logAlpha[s + S * n]);
    }
    maxBeta = 1;
    m = N - n - 1;
    maxLogBeta = -1000000000;
    for (s = 0; s < S; s++) {
      for (t = 0; t < S; t++) {
        tmpLogBeta[t + S * s] = logBeta[t + S * (m + 1)] + log(A[t + s * S]) +
                                logdens[t + S * (m + 1)];
        if (maxLogBeta < tmpLogBeta[t + S * s])
          maxLogBeta = tmpLogBeta[t + S * s];
      }
    }
    for (s = 0; s < S; s++) {
      beta[s + S * m] = 0.0;
      for (t = 0; t < S; t++) {
        beta[s + S * m] =
            beta[s + S * m] + exp(tmpLogBeta[t + S * s] - maxLogBeta);
      }
      if (beta[s + S * m] > maxBeta)
        maxBeta = beta[s + S * m];
    }
    for (s = 0; s < S; s++) {
      beta[s + S * m] = beta[s + S * m] / maxBeta;
      logBeta[s + S * m] = log(beta[s + S * m]);
    }
  }
  free(tmpAlpha);
  free(tmpLogBeta);
}


x86 assembly (clang, -O0):
<computeForwardBackward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movsd  0xe87(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe7a(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe60(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1291 <computeForwardBackward+0x151>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <log@plt>
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    123e <computeForwardBackward+0xfe>
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%esi
sub    $0x1,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%esi
sub    $0x1,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  0xd8a(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11dc <computeForwardBackward+0x9c>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12d1 <computeForwardBackward+0x191>
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1298 <computeForwardBackward+0x158>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1311 <computeForwardBackward+0x1d1>
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <exp@plt>
mov    0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12d8 <computeForwardBackward+0x198>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    18d5 <computeForwardBackward+0x795>
movsd  0xcd4(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1382 <computeForwardBackward+0x242>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1338 <computeForwardBackward+0x1f8>
movsd  0xc76(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14a8 <computeForwardBackward+0x368>
mov    -0x60(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    144b <computeForwardBackward+0x30b>
mov    -0x60(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x8(%rbp),%edx
mov    -0x2c(%rbp),%esi
sub    $0x1,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x30(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13c4 <computeForwardBackward+0x284>
mov    -0x60(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <log@plt>
ucomisd -0x48(%rbp),%xmm0
jbe    1495 <computeForwardBackward+0x355>
mov    -0x60(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x48(%rbp)
jmp    149a <computeForwardBackward+0x35a>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1396 <computeForwardBackward+0x256>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1571 <computeForwardBackward+0x431>
mov    0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x60(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
addsd  %xmm1,%xmm0
subsd  -0x48(%rbp),%xmm0
mov    0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    155e <computeForwardBackward+0x41e>
mov    0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    1563 <computeForwardBackward+0x423>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    14af <computeForwardBackward+0x36f>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    15fc <computeForwardBackward+0x4bc>
mov    0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
mov    0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <exp@plt>
mov    0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1578 <computeForwardBackward+0x438>
movsd  0xa04(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x2c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x38(%rbp)
movsd  0x9e3(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1732 <computeForwardBackward+0x5f2>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    171f <computeForwardBackward+0x5df>
mov    0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x8(%rbp),%edx
mov    -0x38(%rbp),%esi
add    $0x1,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x30(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x8(%rbp),%edx
mov    -0x38(%rbp),%esi
add    $0x1,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm1
mov    -0x68(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    170c <computeForwardBackward+0x5cc>
mov    -0x68(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1711 <computeForwardBackward+0x5d1>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    163c <computeForwardBackward+0x4fc>
jmp    1724 <computeForwardBackward+0x5e4>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1629 <computeForwardBackward+0x4e9>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1837 <computeForwardBackward+0x6f7>
mov    0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    17e4 <computeForwardBackward+0x6a4>
mov    0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x68(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
call   1050 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
addsd  %xmm1,%xmm0
mov    0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1767 <computeForwardBackward+0x627>
mov    0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    1824 <computeForwardBackward+0x6e4>
mov    0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1829 <computeForwardBackward+0x6e9>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1739 <computeForwardBackward+0x5f9>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    18c2 <computeForwardBackward+0x782>
mov    0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x50(%rbp),%xmm0
mov    0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <log@plt>
mov    0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x38(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    183e <computeForwardBackward+0x6fe>
jmp    18c7 <computeForwardBackward+0x787>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1318 <computeForwardBackward+0x1d8>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeForwardBackward>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
mov    %r9,0x28(%rsp)
mov    %rcx,0x88(%rsp)
mov    %rdx,%r12
mov    %esi,%r14d
mov    0x1a8(%rsp),%rax
mov    %rax,0x58(%rsp)
mov    0x1a0(%rsp),%rax
mov    %rax,0x80(%rsp)
mov    0x198(%rsp),%rax
mov    %rax,0x18(%rsp)
mov    0x190(%rsp),%r13
mov    %rdi,0x30(%rsp)
imul   %esi,%edi
shl    $0x3,%edi
call   1040 <malloc@plt>
mov    %rax,%r15
mov    %r14d,%edi
imul   %r14d,%edi
shl    $0x3,%edi
call   1040 <malloc@plt>
mov    %rax,0x60(%rsp)
mov    %r14d,%edx
test   %r14d,%r14d
mov    %r14d,0x14(%rsp)
mov    %rdx,0x40(%rsp)
jle    13b1 <computeForwardBackward+0x271>
mov    0x30(%rsp),%rax
add    $0xffffffff,%eax
imul   %r14d,%eax
cltq
mov    0x18(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    %rcx,(%rsp)
mov    0x28(%rsp),%rbp
mov    0x58(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mov    %rax,0x20(%rsp)
movsd  0xdf7(%rip),%xmm0
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x8(%rsp)
movsd  (%r12,%rbx,8),%xmm0
mov    %rdx,%r14
call   1060 <log@plt>
mov    %r14,%rdx
addsd  0x0(%rbp,%rbx,8),%xmm0
movsd  %xmm0,0x0(%r13,%rbx,8)
maxsd  0x8(%rsp),%xmm0
mov    (%rsp),%rax
movq   $0x0,(%rax,%rbx,8)
mov    0x20(%rsp),%rax
movabs $0x3ff0000000000000,%rcx
mov    %rcx,(%rax,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1210 <computeForwardBackward+0xd0>
mov    0x14(%rsp),%r14d
test   %r14d,%r14d
mov    0x80(%rsp),%r12
jle    13b1 <computeForwardBackward+0x271>
cmp    $0x4,%r14d
jae    128a <computeForwardBackward+0x14a>
xor    %eax,%eax
mov    0x40(%rsp),%rdx
jmp    1360 <computeForwardBackward+0x220>
mov    0x40(%rsp),%rax
and    $0xfffffffc,%eax
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rax),%rdx
mov    %rdx,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     1c6a <computeForwardBackward+0xb2a>
movabs $0x7ffffffffffffffc,%rsi
ff ff 7f
or     $0x2,%rsi
and    %rcx,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movupd 0x0(%r13,%rdx,8),%xmm2
movupd 0x10(%r13,%rdx,8),%xmm3
movupd 0x20(%r13,%rdx,8),%xmm4
movupd 0x30(%r13,%rdx,8),%xmm5
subpd  %xmm1,%xmm2
subpd  %xmm1,%xmm3
movupd %xmm2,0x0(%r13,%rdx,8)
movupd %xmm3,0x10(%r13,%rdx,8)
subpd  %xmm1,%xmm4
subpd  %xmm1,%xmm5
movupd %xmm4,0x20(%r13,%rdx,8)
movupd %xmm5,0x30(%r13,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rsi
jne    12d0 <computeForwardBackward+0x190>
test   $0x1,%cl
je     134b <computeForwardBackward+0x20b>
movupd 0x0(%r13,%rdx,8),%xmm2
movupd 0x10(%r13,%rdx,8),%xmm3
subpd  %xmm1,%xmm2
subpd  %xmm1,%xmm3
movupd %xmm2,0x0(%r13,%rdx,8)
movupd %xmm3,0x10(%r13,%rdx,8)
mov    0x40(%rsp),%rdx
cmp    %rdx,%rax
je     137b <computeForwardBackward+0x23b>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x0(%r13,%rax,8),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rax,8)
add    $0x1,%rax
cmp    %rax,%rdx
jne    1360 <computeForwardBackward+0x220>
test   %r14d,%r14d
jle    13b1 <computeForwardBackward+0x271>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%r13,%rbx,8),%xmm0
mov    %rdx,%rbp
call   1050 <exp@plt>
mov    %rbp,%rdx
movsd  %xmm0,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1390 <computeForwardBackward+0x250>
mov    %r13,0xa0(%rsp)
mov    0x30(%rsp),%rax
cmp    $0x2,%eax
mov    0x28(%rsp),%r12
jl     1c47 <computeForwardBackward+0xb07>
mov    %rdx,%rbp
movslq %r14d,%r9
mov    %eax,%ecx
mov    %ebp,%eax
and    $0xfffffffc,%eax
mov    %rax,0x130(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x128(%rsp)
shr    $0x2,%rax
add    $0x1,%rax
mov    %eax,%esi
and    $0x3,%esi
and    $0xfffffffffffffffc,%rax
mov    %rax,0x100(%rsp)
mov    %ebp,%eax
and    $0x3,%eax
mov    %rax,0x148(%rsp)
mov    %ebp,%eax
and    $0xfffffffe,%eax
mov    %rax,0xf0(%rsp)
lea    0x0(,%r9,8),%rdi
mov    %rsi,0x120(%rsp)
shl    $0x5,%rsi
mov    %rsi,0x98(%rsp)
lea    -0x1(%rcx),%rax
imul   %r9,%rax
mov    0x18(%rsp),%rdx
lea    (%rdx,%rax,8),%rsi
mov    %rdi,0x30(%rsp)
neg    %rdi
mov    %rdi,0x150(%rsp)
lea    (%r12,%rax,8),%rdi
mov    %rcx,0xa8(%rsp)
lea    -0x2(%rcx),%rax
imul   %r9,%rax
lea    (%rdx,%rax,8),%rcx
mov    %rcx,0xd8(%rsp)
mov    0x58(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mov    %rax,0xd0(%rsp)
lea    (%r9,%rbp,1),%rax
mov    %rax,0x138(%rsp)
lea    -0x1(%rbp),%rax
mov    %rax,0xf8(%rsp)
mov    0xa0(%rsp),%rax
lea    0x70(%rax,%r9,8),%rbx
lea    0x70(%r12,%r9,8),%rcx
mov    %rcx,0xb8(%rsp)
lea    0x10(%rax),%rcx
mov    %rcx,0x118(%rsp)
lea    0x10(%r12),%rcx
mov    %rcx,0x110(%rsp)
lea    (%rax,%r9,8),%rax
mov    %rax,0x38(%rsp)
lea    (%r12,%r9,8),%rdx
mov    0x80(%rsp),%rcx
lea    0x8(%rcx),%rax
mov    %rax,0x90(%rsp)
mov    0x88(%rsp),%rax
add    $0x8,%rax
mov    %rax,0x140(%rsp)
lea    (%r15,%r9,8),%r8
lea    (%rcx,%r9,8),%rax
mov    %rax,0xb0(%rsp)
mov    $0x1,%eax
mov    %rax,0x50(%rsp)
xor    %eax,%eax
mov    %rax,0xc0(%rsp)
mov    %r9,0x48(%rsp)
mov    %r9,0x70(%rsp)
mov    %r15,0x108(%rsp)
jmp    15ea <computeForwardBackward+0x4aa>
nopl   0x0(%rax)
mov    0x50(%rsp),%rcx
add    $0x1,%rcx
addq   $0x1,0xc0(%rsp)
mov    0x30(%rsp),%rax
mov    0xc8(%rsp),%rbx
add    %rax,%rbx
add    %rax,0xb8(%rsp)
mov    0x70(%rsp),%rdx
add    0x48(%rsp),%rdx
mov    %rdx,0x70(%rsp)
add    %rax,0x38(%rsp)
mov    0x78(%rsp),%rdx
add    %rax,%rdx
add    %rax,0x90(%rsp)
add    %rax,%r8
add    %rax,0xb0(%rsp)
mov    0xe8(%rsp),%rsi
mov    0x150(%rsp),%rax
add    %rax,%rsi
mov    0xe0(%rsp),%rdi
add    %rax,%rdi
add    %rax,0xd0(%rsp)
add    %rax,0xd8(%rsp)
mov    %rcx,0x50(%rsp)
cmp    0xa8(%rsp),%rcx
je     1c47 <computeForwardBackward+0xb07>
mov    %rdx,0x78(%rsp)
mov    %rbx,0xc8(%rsp)
mov    %rdi,0xe0(%rsp)
mov    %rsi,0xe8(%rsp)
test   %r14d,%r14d
jle    1550 <computeForwardBackward+0x410>
cmp    $0x4,%r14d
jae    1630 <computeForwardBackward+0x4f0>
xor    %eax,%eax
mov    0x38(%rsp),%rbx
mov    0x78(%rsp),%rsi
jmp    1780 <computeForwardBackward+0x640>
nopw   0x0(%rax,%rax,1)
mov    0xc0(%rsp),%rax
mov    0x48(%rsp),%rdx
imul   %rdx,%rax
mov    0x138(%rsp),%rcx
add    %rax,%rcx
add    %rdx,%rax
mov    0xa0(%rsp),%rdi
lea    (%rdi,%rax,8),%rdx
lea    (%r12,%rcx,8),%rsi
cmp    %rsi,%rdx
mov    0x38(%rsp),%rbx
mov    0x78(%rsp),%rsi
jae    1682 <computeForwardBackward+0x542>
lea    (%rdi,%rcx,8),%rcx
lea    (%r12,%rax,8),%rax
cmp    %rcx,%rax
jae    1682 <computeForwardBackward+0x542>
xor    %eax,%eax
jmp    1780 <computeForwardBackward+0x640>
cmpq   $0xc,0x128(%rsp)
mov    0xc8(%rsp),%rdx
mov    0xb8(%rsp),%rdi
jae    16a9 <computeForwardBackward+0x569>
xor    %eax,%eax
mov    0x98(%rsp),%r9
jmp    171c <computeForwardBackward+0x5dc>
mov    0x100(%rsp),%rcx
xor    %eax,%eax
mov    0x98(%rsp),%r9
nopl   0x0(%rax,%rax,1)
movups -0x70(%rdi,%rax,8),%xmm0
movups -0x60(%rdi,%rax,8),%xmm1
movups %xmm0,-0x70(%rdx,%rax,8)
movups %xmm1,-0x60(%rdx,%rax,8)
movups -0x50(%rdi,%rax,8),%xmm0
movups -0x40(%rdi,%rax,8),%xmm1
movups %xmm0,-0x50(%rdx,%rax,8)
movups %xmm1,-0x40(%rdx,%rax,8)
movups -0x30(%rdi,%rax,8),%xmm0
movups -0x20(%rdi,%rax,8),%xmm1
movups %xmm0,-0x30(%rdx,%rax,8)
movups %xmm1,-0x20(%rdx,%rax,8)
movupd -0x10(%rdi,%rax,8),%xmm0
movupd (%rdi,%rax,8),%xmm1
movupd %xmm0,-0x10(%rdx,%rax,8)
movupd %xmm1,(%rdx,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    16c0 <computeForwardBackward+0x580>
cmpq   $0x0,0x120(%rsp)
je     176f <computeForwardBackward+0x62f>
add    0x70(%rsp),%rax
mov    0x118(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    0x110(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movupd -0x10(%rax,%rdx,1),%xmm0
movupd (%rax,%rdx,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rdx,1)
movupd %xmm1,(%rcx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%r9
jne    1750 <computeForwardBackward+0x610>
mov    0x130(%rsp),%rcx
mov    %rcx,%rax
cmp    %rbp,%rcx
je     17f7 <computeForwardBackward+0x6b7>
nop
mov    0xf8(%rsp),%rcx
sub    %rax,%rcx
mov    0x148(%rsp),%rdx
test   %rdx,%rdx
je     17b4 <computeForwardBackward+0x674>
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    17a0 <computeForwardBackward+0x660>
cmp    $0x3,%rcx
jb     17f7 <computeForwardBackward+0x6b7>
nopw   0x0(%rax,%rax,1)
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
movsd  0x8(%rsi,%rax,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rax,8)
movsd  0x10(%rsi,%rax,8),%xmm0
movsd  %xmm0,0x10(%rbx,%rax,8)
movsd  0x18(%rsi,%rax,8),%xmm0
movsd  %xmm0,0x18(%rbx,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    17c0 <computeForwardBackward+0x680>
test   %r14d,%r14d
jle    1550 <computeForwardBackward+0x410>
mov    0x50(%rsp),%rcx
mov    %rcx,%rdx
mov    0x48(%rsp),%rax
imul   %rax,%rdx
mov    %rdx,(%rsp)
add    $0xffffffffffffffff,%rcx
imul   %rax,%rcx
mov    %rcx,0x18(%rsp)
mov    0x140(%rsp),%rbx
xor    %r12d,%r12d
movsd  0x7cb(%rip),%xmm1
mov    0xf0(%rsp),%rcx
mov    0x90(%rsp),%rdx
mov    %r8,0x20(%rsp)
jmp    187a <computeForwardBackward+0x73a>
nopl   0x0(%rax)
add    $0x1,%r12
add    0x30(%rsp),%rbx
mov    %r13,%rbp
cmp    %r13,%r12
mov    0xf0(%rsp),%rcx
mov    0x90(%rsp),%rdx
mov    0x20(%rsp),%r8
je     1960 <computeForwardBackward+0x820>
mov    (%rsp),%rax
lea    (%r12,%rax,1),%r14
movq   $0x0,(%r15,%r14,8)
cmpq   $0x0,0xf8(%rsp)
movsd  %xmm1,0x8(%rsp)
xorpd  %xmm0,%xmm0
je     18f0 <computeForwardBackward+0x7b0>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%rdx,%rax,8),%xmm1
mulsd  -0x8(%rbx,%rax,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r15,%r14,8)
movsd  (%rdx,%rax,8),%xmm0
mulsd  (%rbx,%rax,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r15,%r14,8)
add    $0x2,%rax
cmp    %rax,%rcx
jne    18b0 <computeForwardBackward+0x770>
jmp    18f2 <computeForwardBackward+0x7b2>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
mov    %rbp,%r13
test   $0x1,%bpl
je     1933 <computeForwardBackward+0x7f3>
mov    %r12,%rcx
imul   0x48(%rsp),%rcx
mov    0x18(%rsp),%rdx
add    %rax,%rdx
mov    0x80(%rsp),%rsi
movsd  (%rsi,%rdx,8),%xmm1
add    %rax,%rcx
mov    0x88(%rsp),%rax
mulsd  (%rax,%rcx,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r15,%r14,8)
call   1060 <log@plt>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm1,%xmm0
jbe    1850 <computeForwardBackward+0x710>
movsd  (%r15,%r14,8),%xmm0
call   1060 <log@plt>
movapd %xmm0,%xmm1
jmp    1850 <computeForwardBackward+0x710>
nopl   0x0(%rax)
mov    0x14(%rsp),%r14d
test   %r14d,%r14d
mov    0x28(%rsp),%r12
jle    1550 <computeForwardBackward+0x410>
xor    %ebx,%ebx
movsd  0x683(%rip),%xmm2
mov    0x38(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm2,(%rsp)
movsd  (%r12,%rbx,8),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%r8,%rbx,8),%xmm0
call   1060 <log@plt>
movsd  0x8(%rsp),%xmm1
mov    0x20(%rsp),%r8
movapd %xmm0,%xmm2
addsd  0x18(%rsp),%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,(%r12,%rbx,8)
maxsd  (%rsp),%xmm2
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1990 <computeForwardBackward+0x850>
mov    %r13,%rbp
test   %r14d,%r14d
mov    0x28(%rsp),%r12
jle    1550 <computeForwardBackward+0x410>
xor    %ebx,%ebx
mov    0x38(%rsp),%r12
mov    0xb0(%rsp),%r14
nop
movsd  %xmm2,(%rsp)
movsd  (%r12,%rbx,8),%xmm0
subsd  %xmm2,%xmm0
movsd  %xmm0,(%r12,%rbx,8)
call   1050 <exp@plt>
movsd  (%rsp),%xmm2
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1a00 <computeForwardBackward+0x8c0>
mov    %r13,%rbp
mov    0x14(%rsp),%r14d
test   %r14d,%r14d
mov    0x20(%rsp),%r8
mov    0x28(%rsp),%r12
jle    1550 <computeForwardBackward+0x410>
mov    0x50(%rsp),%rax
not    %rax
add    0xa8(%rsp),%rax
mov    %rax,0x68(%rsp)
mov    0x60(%rsp),%r12
mov    0x88(%rsp),%rbp
xor    %ecx,%ecx
movsd  0x58b(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rcx,0x18(%rsp)
xor    %ebx,%ebx
mov    0x40(%rsp),%r14
mov    0xe8(%rsp),%r15
mov    0xe0(%rsp),%r13
nopl   0x0(%rax)
movsd  %xmm1,0x8(%rsp)
movsd  (%r15,%rbx,8),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x0(%rbp,%rbx,8),%xmm0
call   1060 <log@plt>
movapd %xmm0,%xmm1
addsd  (%rsp),%xmm1
addsd  0x0(%r13,%rbx,8),%xmm1
movsd  %xmm1,(%r12,%rbx,8)
maxsd  0x8(%rsp),%xmm1
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1aa0 <computeForwardBackward+0x960>
mov    0x18(%rsp),%rcx
add    $0x1,%rcx
mov    0x30(%rsp),%rax
add    %rax,%rbp
add    %rax,%r12
cmp    %r14,%rcx
jne    1a80 <computeForwardBackward+0x940>
mov    0x14(%rsp),%r14d
test   %r14d,%r14d
mov    0x28(%rsp),%r12
mov    0x40(%rsp),%rbp
mov    0x108(%rsp),%r15
mov    0x20(%rsp),%r8
jle    1550 <computeForwardBackward+0x410>
mov    0x68(%rsp),%rax
imul   0x48(%rsp),%rax
mov    %rax,0x68(%rsp)
mov    0x60(%rsp),%r12
xor    %ecx,%ecx
movsd  0x4ca(%rip),%xmm0
mov    0x58(%rsp),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm0,0x18(%rsp)
mov    %rbp,%r14
mov    %rcx,%r13
mov    0x68(%rsp),%rdx
lea    (%rcx,%rdx,1),%rbp
movq   $0x0,(%rax,%rbp,8)
xorpd  %xmm2,%xmm2
xor    %ebx,%ebx
movsd  %xmm1,(%rsp)
nopl   0x0(%rax,%rax,1)
movsd  %xmm2,0x8(%rsp)
movsd  (%r12,%rbx,8),%xmm0
subsd  %xmm1,%xmm0
call   1050 <exp@plt>
movsd  0x8(%rsp),%xmm2
movsd  (%rsp),%xmm1
mov    0x58(%rsp),%rax
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rax,%rbp,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1b80 <computeForwardBackward+0xa40>
maxsd  0x18(%rsp),%xmm2
mov    %r13,%rcx
add    $0x1,%rcx
add    0x30(%rsp),%r12
movapd %xmm2,%xmm0
cmp    %r14,%rcx
mov    %r14,%rbp
jne    1b50 <computeForwardBackward+0xa10>
mov    0x14(%rsp),%r14d
test   %r14d,%r14d
mov    0x28(%rsp),%r12
mov    0x20(%rsp),%r8
jle    1550 <computeForwardBackward+0x410>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm2,0x8(%rsp)
mov    0xd0(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,(%rax,%rbx,8)
call   1060 <log@plt>
movsd  0x8(%rsp),%xmm2
mov    0x20(%rsp),%r8
mov    0xd8(%rsp),%rax
movsd  %xmm0,(%rax,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1c00 <computeForwardBackward+0xac0>
jmp    1550 <computeForwardBackward+0x410>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x60(%rsp),%rdi
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
xor    %edx,%edx
test   $0x1,%cl
jne    1327 <computeForwardBackward+0x1e7>
jmp    134b <computeForwardBackward+0x20b>

LLVM IR (-O0):
define void @computeForwardBackward(i32 %0, i32 %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double*
%30 = alloca double*
store i32 %0, i32* %11
store i32 %1, i32* %12
store double* %2, double** %13
store double* %3, double** %14
store double* %4, double** %15
store double* %5, double** %16
store double* %6, double** %17
store double* %7, double** %18
store double* %8, double** %19
store double* %9, double** %20
store double -1.000000e+09, double* %25
store double -1.000000e+09, double* %26
store double -1.000000e+09, double* %27
store double -1.000000e+09, double* %28
%31 = load i32, i32* %12
%32 = load i32, i32* %11
%33 = mul nsw i32 %31, %32
%34 = sext i32 %33 to i64
%35 = mul i64 %34, 8
%36 = trunc i64 %35 to i32
%37 = call i64 @malloc(i32 %36)
%38 = inttoptr i64 %37 to double*
store double* %38, double** %29
%39 = load i32, i32* %12
%40 = load i32, i32* %12
%41 = mul nsw i32 %39, %40
%42 = sext i32 %41 to i64
%43 = mul i64 %42, 8
%44 = trunc i64 %43 to i32
%45 = call i64 @malloc(i32 %44)
%46 = inttoptr i64 %45 to double*
store double* %46, double** %30
store i32 0, i32* %22
br label %47
47: ; preds = %100, %10
%48 = load i32, i32* %22
%49 = load i32, i32* %12
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %103
51: ; preds = %47
%52 = load double*, double** %13
%53 = load i32, i32* %22
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %52, i64 %54
%56 = load double, double* %55
%57 = call double @log(double %56)
%58 = load double*, double** %16
%59 = load i32, i32* %22
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
%62 = load double, double* %61
%63 = fadd double %57, %62
%64 = load double*, double** %17
%65 = load i32, i32* %22
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
store double %63, double* %67
%68 = load double*, double** %17
%69 = load i32, i32* %22
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %68, i64 %70
%72 = load double, double* %71
%73 = load double, double* %25
%74 = fcmp ogt double %72, %73
br i1 %74, label %75, label %81
75: ; preds = %51
%76 = load double*, double** %17
%77 = load i32, i32* %22
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
%80 = load double, double* %79
store double %80, double* %25
br label %81
81: ; preds = %75, %51
%82 = load double*, double** %18
%83 = load i32, i32* %22
%84 = load i32, i32* %12
%85 = load i32, i32* %11
%86 = sub nsw i32 %85, 1
%87 = mul nsw i32 %84, %86
%88 = add nsw i32 %83, %87
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds double, double* %82, i64 %89
store double 0.000000e+00, double* %90
%91 = load double*, double** %20
%92 = load i32, i32* %22
%93 = load i32, i32* %12
%94 = load i32, i32* %11
%95 = sub nsw i32 %94, 1
%96 = mul nsw i32 %93, %95
%97 = add nsw i32 %92, %96
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %91, i64 %98
store double 1.000000e+00, double* %99
br label %100
100: ; preds = %81
%101 = load i32, i32* %22
%102 = add nsw i32 %101, 1
store i32 %102, i32* %22
br label %47
103: ; preds = %47
store i32 0, i32* %22
br label %104
104: ; preds = %120, %103
%105 = load i32, i32* %22
%106 = load i32, i32* %12
%107 = icmp slt i32 %105, %106
br i1 %107, label %108, label %123
108: ; preds = %104
%109 = load double*, double** %17
%110 = load i32, i32* %22
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %109, i64 %111
%113 = load double, double* %112
%114 = load double, double* %25
%115 = fsub double %113, %114
%116 = load double*, double** %17
%117 = load i32, i32* %22
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %116, i64 %118
store double %115, double* %119
br label %120
120: ; preds = %108
%121 = load i32, i32* %22
%122 = add nsw i32 %121, 1
store i32 %122, i32* %22
br label %104
123: ; preds = %104
store i32 0, i32* %22
br label %124
124: ; preds = %139, %123
%125 = load i32, i32* %22
%126 = load i32, i32* %12
%127 = icmp slt i32 %125, %126
br i1 %127, label %128, label %142
128: ; preds = %124
%129 = load double*, double** %17
%130 = load i32, i32* %22
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %129, i64 %131
%133 = load double, double* %132
%134 = call double @exp(double %133)
%135 = load double*, double** %19
%136 = load i32, i32* %22
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %135, i64 %137
store double %134, double* %138
br label %139
139: ; preds = %128
%140 = load i32, i32* %22
%141 = add nsw i32 %140, 1
store i32 %141, i32* %22
br label %124
142: ; preds = %124
store i32 1, i32* %21
br label %143
143: ; preds = %576, %142
%144 = load i32, i32* %21
%145 = load i32, i32* %11
%146 = icmp slt i32 %144, %145
br i1 %146, label %147, label %579
147: ; preds = %143
store double -1.000000e+09, double* %25
store i32 0, i32* %22
br label %148
148: ; preds = %170, %147
%149 = load i32, i32* %22
%150 = load i32, i32* %12
%151 = icmp slt i32 %149, %150
br i1 %151, label %152, label %173
152: ; preds = %148
%153 = load double*, double** %16
%154 = load i32, i32* %22
%155 = load i32, i32* %12
%156 = load i32, i32* %21
%157 = mul nsw i32 %155, %156
%158 = add nsw i32 %154, %157
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double, double* %153, i64 %159
%161 = load double, double* %160
%162 = load double*, double** %17
%163 = load i32, i32* %22
%164 = load i32, i32* %12
%165 = load i32, i32* %21
%166 = mul nsw i32 %164, %165
%167 = add nsw i32 %163, %166
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds double, double* %162, i64 %168
store double %161, double* %169
br label %170
170: ; preds = %152
%171 = load i32, i32* %22
%172 = add nsw i32 %171, 1
store i32 %172, i32* %22
br label %148
173: ; preds = %148
store double -1.000000e+09, double* %26
store i32 0, i32* %22
br label %174
174: ; preds = %257, %173
%175 = load i32, i32* %22
%176 = load i32, i32* %12
%177 = icmp slt i32 %175, %176
br i1 %177, label %178, label %260
178: ; preds = %174
%179 = load double*, double** %29
%180 = load i32, i32* %22
%181 = load i32, i32* %12
%182 = load i32, i32* %21
%183 = mul nsw i32 %181, %182
%184 = add nsw i32 %180, %183
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %179, i64 %185
store double 0.000000e+00, double* %186
store i32 0, i32* %23
br label %187
187: ; preds = %229, %178
%188 = load i32, i32* %23
%189 = load i32, i32* %12
%190 = icmp slt i32 %188, %189
br i1 %190, label %191, label %232
191: ; preds = %187
%192 = load double*, double** %29
%193 = load i32, i32* %22
%194 = load i32, i32* %12
%195 = load i32, i32* %21
%196 = mul nsw i32 %194, %195
%197 = add nsw i32 %193, %196
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds double, double* %192, i64 %198
%200 = load double, double* %199
%201 = load double*, double** %19
%202 = load i32, i32* %23
%203 = load i32, i32* %12
%204 = load i32, i32* %21
%205 = sub nsw i32 %204, 1
%206 = mul nsw i32 %203, %205
%207 = add nsw i32 %202, %206
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %201, i64 %208
%210 = load double, double* %209
%211 = load double*, double** %14
%212 = load i32, i32* %23
%213 = load i32, i32* %22
%214 = load i32, i32* %12
%215 = mul nsw i32 %213, %214
%216 = add nsw i32 %212, %215
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds double, double* %211, i64 %217
%219 = load double, double* %218
%220 = call double @llvm.fmuladd.f64(double %210, double %219, double %200)
%221 = load double*, double** %29
%222 = load i32, i32* %22
%223 = load i32, i32* %12
%224 = load i32, i32* %21
%225 = mul nsw i32 %223, %224
%226 = add nsw i32 %222, %225
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds double, double* %221, i64 %227
store double %220, double* %228
br label %229
229: ; preds = %191
%230 = load i32, i32* %23
%231 = add nsw i32 %230, 1
store i32 %231, i32* %23
br label %187
232: ; preds = %187
%233 = load double*, double** %29
%234 = load i32, i32* %22
%235 = load i32, i32* %12
%236 = load i32, i32* %21
%237 = mul nsw i32 %235, %236
%238 = add nsw i32 %234, %237
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds double, double* %233, i64 %239
%241 = load double, double* %240
%242 = call double @log(double %241)
%243 = load double, double* %26
%244 = fcmp ogt double %242, %243
br i1 %244, label %245, label %256
245: ; preds = %232
%246 = load double*, double** %29
%247 = load i32, i32* %22
%248 = load i32, i32* %12
%249 = load i32, i32* %21
%250 = mul nsw i32 %248, %249
%251 = add nsw i32 %247, %250
%252 = sext i32 %251 to i64
%253 = getelementptr inbounds double, double* %246, i64 %252
%254 = load double, double* %253
%255 = call double @log(double %254)
store double %255, double* %26
br label %256
256: ; preds = %245, %232
br label %257
257: ; preds = %256
%258 = load i32, i32* %22
%259 = add nsw i32 %258, 1
store i32 %259, i32* %22
br label %174
260: ; preds = %174
store i32 0, i32* %22
br label %261
261: ; preds = %318, %260
%262 = load i32, i32* %22
%263 = load i32, i32* %12
%264 = icmp slt i32 %262, %263
br i1 %264, label %265, label %321
265: ; preds = %261
%266 = load double*, double** %17
%267 = load i32, i32* %22
%268 = load i32, i32* %12
%269 = load i32, i32* %21
%270 = mul nsw i32 %268, %269
%271 = add nsw i32 %267, %270
%272 = sext i32 %271 to i64
%273 = getelementptr inbounds double, double* %266, i64 %272
%274 = load double, double* %273
%275 = load double*, double** %29
%276 = load i32, i32* %22
%277 = load i32, i32* %12
%278 = load i32, i32* %21
%279 = mul nsw i32 %277, %278
%280 = add nsw i32 %276, %279
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds double, double* %275, i64 %281
%283 = load double, double* %282
%284 = call double @log(double %283)
%285 = fadd double %274, %284
%286 = load double, double* %26
%287 = fsub double %285, %286
%288 = load double*, double** %17
%289 = load i32, i32* %22
%290 = load i32, i32* %12
%291 = load i32, i32* %21
%292 = mul nsw i32 %290, %291
%293 = add nsw i32 %289, %292
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds double, double* %288, i64 %294
store double %287, double* %295
%296 = load double*, double** %17
%297 = load i32, i32* %22
%298 = load i32, i32* %12
%299 = load i32, i32* %21
%300 = mul nsw i32 %298, %299
%301 = add nsw i32 %297, %300
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds double, double* %296, i64 %302
%304 = load double, double* %303
%305 = load double, double* %25
%306 = fcmp ogt double %304, %305
br i1 %306, label %307, label %317
307: ; preds = %265
%308 = load double*, double** %17
%309 = load i32, i32* %22
%310 = load i32, i32* %12
%311 = load i32, i32* %21
%312 = mul nsw i32 %310, %311
%313 = add nsw i32 %309, %312
%314 = sext i32 %313 to i64
%315 = getelementptr inbounds double, double* %308, i64 %314
%316 = load double, double* %315
store double %316, double* %25
br label %317
317: ; preds = %307, %265
br label %318
318: ; preds = %317
%319 = load i32, i32* %22
%320 = add nsw i32 %319, 1
store i32 %320, i32* %22
br label %261
321: ; preds = %261
store i32 0, i32* %22
br label %322
322: ; preds = %364, %321
%323 = load i32, i32* %22
%324 = load i32, i32* %12
%325 = icmp slt i32 %323, %324
br i1 %325, label %326, label %367
326: ; preds = %322
%327 = load double*, double** %17
%328 = load i32, i32* %22
%329 = load i32, i32* %12
%330 = load i32, i32* %21
%331 = mul nsw i32 %329, %330
%332 = add nsw i32 %328, %331
%333 = sext i32 %332 to i64
%334 = getelementptr inbounds double, double* %327, i64 %333
%335 = load double, double* %334
%336 = load double, double* %25
%337 = fsub double %335, %336
%338 = load double*, double** %17
%339 = load i32, i32* %22
%340 = load i32, i32* %12
%341 = load i32, i32* %21
%342 = mul nsw i32 %340, %341
%343 = add nsw i32 %339, %342
%344 = sext i32 %343 to i64
%345 = getelementptr inbounds double, double* %338, i64 %344
store double %337, double* %345
%346 = load double*, double** %17
%347 = load i32, i32* %22
%348 = load i32, i32* %12
%349 = load i32, i32* %21
%350 = mul nsw i32 %348, %349
%351 = add nsw i32 %347, %350
%352 = sext i32 %351 to i64
%353 = getelementptr inbounds double, double* %346, i64 %352
%354 = load double, double* %353
%355 = call double @exp(double %354)
%356 = load double*, double** %19
%357 = load i32, i32* %22
%358 = load i32, i32* %12
%359 = load i32, i32* %21
%360 = mul nsw i32 %358, %359
%361 = add nsw i32 %357, %360
%362 = sext i32 %361 to i64
%363 = getelementptr inbounds double, double* %356, i64 %362
store double %355, double* %363
br label %364
364: ; preds = %326
%365 = load i32, i32* %22
%366 = add nsw i32 %365, 1
store i32 %366, i32* %22
br label %322
367: ; preds = %322
store double 1.000000e+00, double* %27
%368 = load i32, i32* %11
%369 = load i32, i32* %21
%370 = sub nsw i32 %368, %369
%371 = sub nsw i32 %370, 1
store i32 %371, i32* %24
store double -1.000000e+09, double* %28
store i32 0, i32* %22
br label %372
372: ; preds = %448, %367
%373 = load i32, i32* %22
%374 = load i32, i32* %12
%375 = icmp slt i32 %373, %374
br i1 %375, label %376, label %451
376: ; preds = %372
store i32 0, i32* %23
br label %377
377: ; preds = %444, %376
%378 = load i32, i32* %23
%379 = load i32, i32* %12
%380 = icmp slt i32 %378, %379
br i1 %380, label %381, label %447
381: ; preds = %377
%382 = load double*, double** %18
%383 = load i32, i32* %23
%384 = load i32, i32* %12
%385 = load i32, i32* %24
%386 = add nsw i32 %385, 1
%387 = mul nsw i32 %384, %386
%388 = add nsw i32 %383, %387
%389 = sext i32 %388 to i64
%390 = getelementptr inbounds double, double* %382, i64 %389
%391 = load double, double* %390
%392 = load double*, double** %14
%393 = load i32, i32* %23
%394 = load i32, i32* %22
%395 = load i32, i32* %12
%396 = mul nsw i32 %394, %395
%397 = add nsw i32 %393, %396
%398 = sext i32 %397 to i64
%399 = getelementptr inbounds double, double* %392, i64 %398
%400 = load double, double* %399
%401 = call double @log(double %400)
%402 = fadd double %391, %401
%403 = load double*, double** %16
%404 = load i32, i32* %23
%405 = load i32, i32* %12
%406 = load i32, i32* %24
%407 = add nsw i32 %406, 1
%408 = mul nsw i32 %405, %407
%409 = add nsw i32 %404, %408
%410 = sext i32 %409 to i64
%411 = getelementptr inbounds double, double* %403, i64 %410
%412 = load double, double* %411
%413 = fadd double %402, %412
%414 = load double*, double** %30
%415 = load i32, i32* %23
%416 = load i32, i32* %12
%417 = load i32, i32* %22
%418 = mul nsw i32 %416, %417
%419 = add nsw i32 %415, %418
%420 = sext i32 %419 to i64
%421 = getelementptr inbounds double, double* %414, i64 %420
store double %413, double* %421
%422 = load double, double* %28
%423 = load double*, double** %30
%424 = load i32, i32* %23
%425 = load i32, i32* %12
%426 = load i32, i32* %22
%427 = mul nsw i32 %425, %426
%428 = add nsw i32 %424, %427
%429 = sext i32 %428 to i64
%430 = getelementptr inbounds double, double* %423, i64 %429
%431 = load double, double* %430
%432 = fcmp olt double %422, %431
br i1 %432, label %433, label %443
433: ; preds = %381
%434 = load double*, double** %30
%435 = load i32, i32* %23
%436 = load i32, i32* %12
%437 = load i32, i32* %22
%438 = mul nsw i32 %436, %437
%439 = add nsw i32 %435, %438
%440 = sext i32 %439 to i64
%441 = getelementptr inbounds double, double* %434, i64 %440
%442 = load double, double* %441
store double %442, double* %28
br label %443
443: ; preds = %433, %381
br label %444
444: ; preds = %443
%445 = load i32, i32* %23
%446 = add nsw i32 %445, 1
store i32 %446, i32* %23
br label %377
447: ; preds = %377
br label %448
448: ; preds = %447
%449 = load i32, i32* %22
%450 = add nsw i32 %449, 1
store i32 %450, i32* %22
br label %372
451: ; preds = %372
store i32 0, i32* %22
br label %452
452: ; preds = %526, %451
%453 = load i32, i32* %22
%454 = load i32, i32* %12
%455 = icmp slt i32 %453, %454
br i1 %455, label %456, label %529
456: ; preds = %452
%457 = load double*, double** %20
%458 = load i32, i32* %22
%459 = load i32, i32* %12
%460 = load i32, i32* %24
%461 = mul nsw i32 %459, %460
%462 = add nsw i32 %458, %461
%463 = sext i32 %462 to i64
%464 = getelementptr inbounds double, double* %457, i64 %463
store double 0.000000e+00, double* %464
store i32 0, i32* %23
br label %465
465: ; preds = %500, %456
%466 = load i32, i32* %23
%467 = load i32, i32* %12
%468 = icmp slt i32 %466, %467
br i1 %468, label %469, label %503
469: ; preds = %465
%470 = load double*, double** %20
%471 = load i32, i32* %22
%472 = load i32, i32* %12
%473 = load i32, i32* %24
%474 = mul nsw i32 %472, %473
%475 = add nsw i32 %471, %474
%476 = sext i32 %475 to i64
%477 = getelementptr inbounds double, double* %470, i64 %476
%478 = load double, double* %477
%479 = load double*, double** %30
%480 = load i32, i32* %23
%481 = load i32, i32* %12
%482 = load i32, i32* %22
%483 = mul nsw i32 %481, %482
%484 = add nsw i32 %480, %483
%485 = sext i32 %484 to i64
%486 = getelementptr inbounds double, double* %479, i64 %485
%487 = load double, double* %486
%488 = load double, double* %28
%489 = fsub double %487, %488
%490 = call double @exp(double %489)
%491 = fadd double %478, %490
%492 = load double*, double** %20
%493 = load i32, i32* %22
%494 = load i32, i32* %12
%495 = load i32, i32* %24
%496 = mul nsw i32 %494, %495
%497 = add nsw i32 %493, %496
%498 = sext i32 %497 to i64
%499 = getelementptr inbounds double, double* %492, i64 %498
store double %491, double* %499
br label %500
500: ; preds = %469
%501 = load i32, i32* %23
%502 = add nsw i32 %501, 1
store i32 %502, i32* %23
br label %465
503: ; preds = %465
%504 = load double*, double** %20
%505 = load i32, i32* %22
%506 = load i32, i32* %12
%507 = load i32, i32* %24
%508 = mul nsw i32 %506, %507
%509 = add nsw i32 %505, %508
%510 = sext i32 %509 to i64
%511 = getelementptr inbounds double, double* %504, i64 %510
%512 = load double, double* %511
%513 = load double, double* %27
%514 = fcmp ogt double %512, %513
br i1 %514, label %515, label %525
515: ; preds = %503
%516 = load double*, double** %20
%517 = load i32, i32* %22
%518 = load i32, i32* %12
%519 = load i32, i32* %24
%520 = mul nsw i32 %518, %519
%521 = add nsw i32 %517, %520
%522 = sext i32 %521 to i64
%523 = getelementptr inbounds double, double* %516, i64 %522
%524 = load double, double* %523
store double %524, double* %27
br label %525
525: ; preds = %515, %503
br label %526
526: ; preds = %525
%527 = load i32, i32* %22
%528 = add nsw i32 %527, 1
store i32 %528, i32* %22
br label %452
529: ; preds = %452
store i32 0, i32* %22
br label %530
530: ; preds = %572, %529
%531 = load i32, i32* %22
%532 = load i32, i32* %12
%533 = icmp slt i32 %531, %532
br i1 %533, label %534, label %575
534: ; preds = %530
%535 = load double*, double** %20
%536 = load i32, i32* %22
%537 = load i32, i32* %12
%538 = load i32, i32* %24
%539 = mul nsw i32 %537, %538
%540 = add nsw i32 %536, %539
%541 = sext i32 %540 to i64
%542 = getelementptr inbounds double, double* %535, i64 %541
%543 = load double, double* %542
%544 = load double, double* %27
%545 = fdiv double %543, %544
%546 = load double*, double** %20
%547 = load i32, i32* %22
%548 = load i32, i32* %12
%549 = load i32, i32* %24
%550 = mul nsw i32 %548, %549
%551 = add nsw i32 %547, %550
%552 = sext i32 %551 to i64
%553 = getelementptr inbounds double, double* %546, i64 %552
store double %545, double* %553
%554 = load double*, double** %20
%555 = load i32, i32* %22
%556 = load i32, i32* %12
%557 = load i32, i32* %24
%558 = mul nsw i32 %556, %557
%559 = add nsw i32 %555, %558
%560 = sext i32 %559 to i64
%561 = getelementptr inbounds double, double* %554, i64 %560
%562 = load double, double* %561
%563 = call double @log(double %562)
%564 = load double*, double** %18
%565 = load i32, i32* %22
%566 = load i32, i32* %12
%567 = load i32, i32* %24
%568 = mul nsw i32 %566, %567
%569 = add nsw i32 %565, %568
%570 = sext i32 %569 to i64
%571 = getelementptr inbounds double, double* %564, i64 %570
store double %563, double* %571
br label %572
572: ; preds = %534
%573 = load i32, i32* %22
%574 = add nsw i32 %573, 1
store i32 %574, i32* %22
br label %530
575: ; preds = %530
br label %576
576: ; preds = %575
%577 = load i32, i32* %21
%578 = add nsw i32 %577, 1
store i32 %578, i32* %21
br label %143
579: ; preds = %143
%580 = load double*, double** %29
%581 = call i32 @free(double* %580)
%582 = load double*, double** %30
%583 = call i32 @free(double* %582)
ret void
}

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