#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 log(double);
void fnlnf_C(double *lnp, double *lnk, double *lnd, int *Np, int *H, double *f,
             double *grad) {
  double tmp, tmp1, tmp2, tmpf1, tmpf2;
  int m, n;
  double f1, f2;
  double lnD[(*Np) * (*H) * (*H)];
  double tmplnd[(*Np) * (*H)], lnw[(*Np) * (*H)];
  double tmpdf1[*H], tmpdf2[*H], df1[*H], df2[*H];
  m = 0;
  n = 0;
  tmpf1 = 0;
  tmpf2 = 0;
  for (int i = 0; i < *Np; i++) {
    for (int j = 0; j < *H; j++) {
      tmp = 0;
      for (int k = 0; k < *H; k++) {
        tmp = tmp + exp(lnp[k] + lnd[m]);
        lnD[m] = lnd[i * (*H) * (*H) + j + k * (*H)];
        m = m + 1;
      }
      tmplnd[n] = log(tmp);
      lnw[n] = lnk[n] - log(tmp);
      tmpf1 = tmpf1 + exp(lnp[j] + 2 * lnw[n]);
      tmpf2 = tmpf2 + exp(lnp[j] + lnw[n]);
      n = n + 1;
    }
  }
  m = 0;
  n = 0;
  for (int j = 0; j < *H; j++) {
    tmpdf1[j] = 0;
    tmpdf2[j] = 0;
    df1[j] = 0;
    df2[j] = 0;
  }
  for (int i = 0; i < *Np; i++) {
    for (int j = 0; j < *H; j++) {
      tmp1 = 0;
      tmp2 = 0;
      for (int k = 0; k < *H; k++) {
        m = i * (*H) + k;
        tmp1 = tmp1 + exp(lnp[k] + 2 * lnk[m] + lnD[n] - 3 * tmplnd[m]);
        tmp2 = tmp2 + exp(lnp[k] + lnk[m] + lnD[n] - 2 * tmplnd[m]);
        n = n + 1;
      }
      tmpdf1[j] = tmpdf1[j] + tmp1;
      tmpdf2[j] = tmpdf2[j] + tmp2;
      df1[j] = df1[j] + exp(2 * lnw[i * (*H) + j]);
      df2[j] = df2[j] + exp(lnw[i * (*H) + j]);
    }
  }
  f1 = tmpf1 / (*Np);
  f2 = tmpf2 / (*Np);
  *f = log(f1) - 2 * log(f2);
  for (int j = 0; j < *H; j++) {
    df1[j] = (df1[j] - 2 * tmpdf1[j]) / *Np;
    df2[j] = (df2[j] - tmpdf2[j]) / *Np;
    grad[j] = (df1[j] / f1) - 2 * (df2[j] / f2);
  }
}


x86 assembly (clang, -O0):
<fnlnf_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
mov    (%rcx),%ecx
imul   %ecx,%eax
imul   %ecx,%eax
mov    %rsp,%rcx
mov    %rcx,-0x78(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x108(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x80(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
mov    (%rcx),%ecx
imul   %ecx,%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x100(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x88(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
mov    (%rcx),%ecx
imul   %ecx,%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xf8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x90(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xf0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x98(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xe8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xa0(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xe0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xa8(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xd8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xb0(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jge    14cb <fnlnf_C+0x3ab>
movl   $0x0,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    14b2 <fnlnf_C+0x392>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0xbc(%rbp)
mov    -0xbc(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    13a7 <fnlnf_C+0x287>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
mov    -0x8(%rbp),%rax
movslq -0xbc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x5c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
call   1030 <exp@plt>
mov    -0x108(%rbp),%rax
movaps %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0xb4(%rbp),%edx
mov    -0x28(%rbp),%rsi
imul   (%rsi),%edx
mov    -0x28(%rbp),%rsi
imul   (%rsi),%edx
add    -0xb8(%rbp),%edx
mov    -0xbc(%rbp),%esi
mov    -0x28(%rbp),%rdi
imul   (%rdi),%esi
add    %esi,%edx
movslq %edx,%rdx
movsd  (%rcx,%rdx,8),%xmm0
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
jmp    12f0 <fnlnf_C+0x1d0>
movsd  -0x38(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,%ecx
mov    -0x100(%rbp),%rax
cvtsi2sd %ecx,%xmm0
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1040 <log@plt>
movsd  -0x128(%rbp),%xmm0
ff
mov    %eax,%ecx
mov    -0xf8(%rbp),%rax
cvtsi2sd %ecx,%xmm1
subsd  %xmm1,%xmm0
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
mov    -0x8(%rbp),%rcx
movslq -0xb8(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm1
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
mov    -0xf8(%rbp),%rax
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
mov    -0x8(%rbp),%rcx
movslq -0xb8(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
movslq -0x60(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x118(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    12cc <fnlnf_C+0x1ac>
jmp    14b7 <fnlnf_C+0x397>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    12b0 <fnlnf_C+0x190>
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
movl   $0x0,-0xc0(%rbp)
mov    -0xc0(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    1561 <fnlnf_C+0x441>
mov    -0xd8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mov    -0xe8(%rbp),%rdx
mov    -0xf0(%rbp),%rsi
movslq -0xc0(%rbp),%rdi
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rsi,%rdi,8)
movslq -0xc0(%rbp),%rsi
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rdx,%rsi,8)
movslq -0xc0(%rbp),%rdx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
movslq -0xc0(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    14e3 <fnlnf_C+0x3c3>
movl   $0x0,-0xc4(%rbp)
mov    -0xc4(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jge    1823 <fnlnf_C+0x703>
movl   $0x0,-0xc8(%rbp)
mov    -0xc8(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    180a <fnlnf_C+0x6ea>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0xcc(%rbp)
mov    -0xcc(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    16de <fnlnf_C+0x5be>
mov    -0x100(%rbp),%rax
mov    -0x108(%rbp),%rcx
mov    -0xc4(%rbp),%edx
mov    -0x28(%rbp),%rsi
imul   (%rsi),%edx
add    -0xcc(%rbp),%edx
mov    %edx,-0x5c(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
mov    -0x8(%rbp),%rdx
movslq -0xcc(%rbp),%rsi
movsd  (%rdx,%rsi,8),%xmm0
mov    -0x10(%rbp),%rdx
movslq -0x5c(%rbp),%rsi
movsd  (%rdx,%rsi,8),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movslq -0x60(%rbp),%rdx
addsd  (%rcx,%rdx,8),%xmm1
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0x9d3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
mov    -0x108(%rbp),%rcx
mov    -0x100(%rbp),%rax
movaps %xmm0,%xmm1
movsd  -0x138(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
mov    -0x8(%rbp),%rdx
movslq -0xcc(%rbp),%rsi
movsd  (%rdx,%rsi,8),%xmm0
mov    -0x10(%rbp),%rdx
movslq -0x5c(%rbp),%rsi
addsd  (%rdx,%rsi,8),%xmm0
movslq -0x60(%rbp),%rdx
addsd  (%rcx,%rdx,8),%xmm0
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x130(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
mov    -0xcc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xcc(%rbp)
jmp    15b3 <fnlnf_C+0x493>
mov    -0xf8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mov    -0xe8(%rbp),%rdx
mov    -0xf0(%rbp),%rsi
movslq -0xc8(%rbp),%rdi
movsd  (%rsi,%rdi,8),%xmm0
addsd  -0x40(%rbp),%xmm0
movslq -0xc8(%rbp),%rdi
movsd  %xmm0,(%rsi,%rdi,8)
movslq -0xc8(%rbp),%rsi
movsd  (%rdx,%rsi,8),%xmm0
addsd  -0x48(%rbp),%xmm0
movslq -0xc8(%rbp),%rsi
movsd  %xmm0,(%rdx,%rsi,8)
movslq -0xc8(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
mov    -0xc4(%rbp),%ecx
mov    -0x28(%rbp),%rdx
imul   (%rdx),%ecx
add    -0xc8(%rbp),%ecx
movslq %ecx,%rcx
movsd  0x89a(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
call   1030 <exp@plt>
mov    -0xe0(%rbp),%rdx
mov    -0xf8(%rbp),%rax
mov    -0xd8(%rbp),%rcx
movaps %xmm0,%xmm1
movsd  -0x148(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movslq -0xc8(%rbp),%rsi
movsd  %xmm0,(%rdx,%rsi,8)
movslq -0xc8(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
mov    -0xc4(%rbp),%ecx
mov    -0x28(%rbp),%rdx
imul   (%rdx),%ecx
add    -0xc8(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <exp@plt>
mov    -0xd8(%rbp),%rax
movaps %xmm0,%xmm1
movsd  -0x140(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movslq -0xc8(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
jmp    1587 <fnlnf_C+0x467>
jmp    180f <fnlnf_C+0x6ef>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    156b <fnlnf_C+0x44b>
movsd  -0x50(%rbp),%xmm0
mov    -0x20(%rbp),%rax
cvtsi2sdl (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
cvtsi2sdl (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,-0x14c(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,%ecx
mov    -0x14c(%rbp),%eax
shl    $0x1,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0xd0(%rbp)
mov    -0xd0(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    1970 <fnlnf_C+0x850>
mov    -0xd8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
mov    -0xe8(%rbp),%rdx
mov    -0xf0(%rbp),%rsi
movslq -0xd0(%rbp),%rdi
movsd  (%rcx,%rdi,8),%xmm0
movslq -0xd0(%rbp),%rdi
movsd  (%rsi,%rdi,8),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rsi
cvtsi2sdl (%rsi),%xmm1
divsd  %xmm1,%xmm0
movslq -0xd0(%rbp),%rsi
movsd  %xmm0,(%rcx,%rsi,8)
movslq -0xd0(%rbp),%rsi
movsd  (%rax,%rsi,8),%xmm0
movslq -0xd0(%rbp),%rsi
subsd  (%rdx,%rsi,8),%xmm0
mov    -0x20(%rbp),%rdx
cvtsi2sdl (%rdx),%xmm1
divsd  %xmm1,%xmm0
movslq -0xd0(%rbp),%rdx
movsd  %xmm0,(%rax,%rdx,8)
movslq -0xd0(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
divsd  -0x68(%rbp),%xmm0
movslq -0xd0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
divsd  -0x70(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movslq -0xd0(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xd0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd0(%rbp)
jmp    188c <fnlnf_C+0x76c>
mov    -0x78(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnlnf_C>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9,-0xf8(%rbp)
mov    %rdx,-0x88(%rbp)
mov    %rsi,%r14
mov    %rdi,-0xd0(%rbp)
mov    %rcx,-0xa8(%rbp)
mov    (%rcx),%esi
mov    (%r8),%ebx
mov    %ebx,%eax
imul   %esi,%eax
mov    %eax,%ecx
imul   %ebx,%ecx
lea    0xf(,%rcx,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0xd8(%rbp)
mov    %rdx,%rsp
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0xc8(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0xe8(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rdi
lea    0xf(,%rbx,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0xc0(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0xb8(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0xb0(%rbp)
mov    %rcx,%rsp
test   %esi,%esi
mov    %rdi,-0x78(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r14,-0xe0(%rbp)
xorpd  %xmm0,%xmm0
jle    1415 <fnlnf_C+0x2e5>
xor    %eax,%eax
xorpd  %xmm1,%xmm1
movapd %xmm1,-0x70(%rbp)
movl   $0x0,-0x48(%rbp)
xor    %ecx,%ecx
mov    %rcx,-0x40(%rbp)
jmp    1269 <fnlnf_C+0x139>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm0,-0x70(%rbp)
mov    -0xa8(%rbp),%rax
mov    (%rax),%esi
mov    -0x78(%rbp),%rdi
movapd -0xa0(%rbp),%xmm0
ff
mov    -0x80(%rbp),%rax
add    $0x1,%eax
cmp    %esi,%eax
jge    141e <fnlnf_C+0x2ee>
test   %ebx,%ebx
jle    125e <fnlnf_C+0x12e>
mov    %rax,-0x80(%rbp)
movapd %xmm0,-0xa0(%rbp)
ff
mov    -0x40(%rbp),%rax
cltq
mov    %rax,-0x40(%rbp)
xor    %eax,%eax
movapd -0x70(%rbp),%xmm0
jmp    1366 <fnlnf_C+0x236>
nop
mov    %r14,%r12
mov    %rax,%r14
xorpd  %xmm1,%xmm1
mov    -0xd0(%rbp),%r13
mov    -0xc8(%rbp),%rbx
movsd  %xmm1,-0x30(%rbp)
movapd %xmm1,%xmm0
call   1050 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    -0x40(%rbp),%r15
movsd  %xmm0,(%rbx,%r15,8)
movsd  (%r12,%r15,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1050 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  -0x38(%rbp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,-0x38(%rbp)
mov    -0xe8(%rbp),%rax
movsd  %xmm1,(%rax,%r15,8)
movapd %xmm1,%xmm0
addsd  %xmm1,%xmm0
addsd  0x0(%r13,%r14,8),%xmm0
call   1040 <exp@plt>
movapd -0xa0(%rbp),%xmm1
ff
addsd  %xmm0,%xmm1
movapd %xmm1,-0xa0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  0x0(%r13,%r14,8),%xmm0
call   1040 <exp@plt>
mov    %r14,%rax
movapd -0x70(%rbp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x1,%r15
mov    %r15,-0x40(%rbp)
add    $0x1,%rax
mov    -0x50(%rbp),%r8
movslq (%r8),%rbx
cmp    %rbx,%rax
mov    %r12,%r14
jge    1240 <fnlnf_C+0x110>
test   %ebx,%ebx
movapd %xmm0,-0x70(%rbp)
jle    1290 <fnlnf_C+0x160>
mov    %rax,%r14
movslq -0x48(%rbp),%rax
mov    -0x88(%rbp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    %rcx,-0x38(%rbp)
mov    -0xd8(%rbp),%rcx
lea    (%rcx,%rax,8),%r12
xorpd  %xmm1,%xmm1
xor    %ebx,%ebx
mov    -0xd0(%rbp),%r13
mov    -0x80(%rbp),%r15
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm1,-0x30(%rbp)
movsd  0x0(%r13,%rbx,8),%xmm0
mov    -0x38(%rbp),%rax
addsd  (%rax,%rbx,8),%xmm0
call   1040 <exp@plt>
movsd  -0x30(%rbp),%xmm1
addsd  %xmm0,%xmm1
mov    -0x50(%rbp),%rax
movslq (%rax),%rax
mov    %r15d,%ecx
imul   %eax,%ecx
add    %ebx,%ecx
imul   %eax,%ecx
add    %r14d,%ecx
movslq %ecx,%rcx
mov    -0x88(%rbp),%rdx
movsd  (%rdx,%rcx,8),%xmm0
movsd  %xmm0,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rax,%rbx
jl     13b0 <fnlnf_C+0x280>
add    %ebx,-0x48(%rbp)
mov    -0xe0(%rbp),%r12
jmp    12a1 <fnlnf_C+0x171>
movapd %xmm0,-0x70(%rbp)
xorpd  %xmm0,%xmm0
movapd %xmm0,-0xa0(%rbp)
ff
test   %ebx,%ebx
jle    1474 <fnlnf_C+0x344>
mov    %ebx,%r12d
shl    $0x3,%r12
mov    %esi,%r15d
xor    %esi,%esi
mov    %r12,%rdx
call   1030 <memset@plt>
mov    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    %r12,%rdx
call   1030 <memset@plt>
mov    -0xb8(%rbp),%rdi
xor    %esi,%esi
mov    %r12,%rdx
call   1030 <memset@plt>
mov    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    %r12,%rdx
call   1030 <memset@plt>
mov    %r15d,%esi
test   %esi,%esi
jle    168d <fnlnf_C+0x55d>
xor    %r12d,%r12d
movl   $0x0,-0x54(%rbp)
jmp    14a6 <fnlnf_C+0x376>
nopl   0x0(%rax,%rax,1)
mov    -0xa8(%rbp),%rax
mov    (%rax),%esi
add    $0x1,%r12d
cmp    %esi,%r12d
jge    168d <fnlnf_C+0x55d>
test   %ebx,%ebx
jle    1499 <fnlnf_C+0x369>
xor    %eax,%eax
mov    %rax,-0xf0(%rbp)
mov    %r12,-0x48(%rbp)
jmp    1585 <fnlnf_C+0x455>
nopl   0x0(%rax)
xorpd  %xmm1,%xmm1
xorpd  %xmm0,%xmm0
mov    -0x78(%rbp),%rcx
mov    -0xf0(%rbp),%r13
addsd  (%rcx,%r13,8),%xmm0
mov    -0xc0(%rbp),%rax
addsd  (%rax,%r13,8),%xmm1
movsd  %xmm0,(%rcx,%r13,8)
movsd  %xmm1,(%rax,%r13,8)
mov    -0xb8(%rbp),%r14
movsd  (%r14,%r13,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
imul   %r12d,%ebx
add    %r13d,%ebx
movslq %ebx,%rax
mov    -0xe8(%rbp),%r15
movsd  (%r15,%rax,8),%xmm0
addsd  %xmm0,%xmm0
call   1040 <exp@plt>
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,(%r14,%r13,8)
mov    -0xb0(%rbp),%rbx
movsd  (%rbx,%r13,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x50(%rbp),%r14
mov    (%r14),%eax
imul   %r12d,%eax
add    %r13d,%eax
cltq
movsd  (%r15,%rax,8),%xmm0
call   1040 <exp@plt>
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,(%rbx,%r13,8)
add    $0x1,%r13
movslq (%r14),%rbx
mov    %r13,-0xf0(%rbp)
cmp    %rbx,%r13
mov    -0xe0(%rbp),%r14
jge    1490 <fnlnf_C+0x360>
test   %ebx,%ebx
jle    14c0 <fnlnf_C+0x390>
movslq -0x54(%rbp),%rax
mov    -0xd8(%rbp),%rcx
lea    (%rcx,%rax,8),%rax
mov    %rax,-0x80(%rbp)
xorpd  %xmm1,%xmm1
movsd  %xmm1,-0x30(%rbp)
mov    %r14,%r12
xor    %r14d,%r14d
xorpd  %xmm1,%xmm1
mov    -0xd0(%rbp),%r15
mov    -0xc8(%rbp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  %xmm1,-0x88(%rbp)
ff
imul   -0x48(%rbp),%ebx
movslq %ebx,%rbx
add    %r14,%rbx
movsd  (%r12,%rbx,8),%xmm1
addsd  %xmm1,%xmm1
addsd  (%r15,%r14,8),%xmm1
mov    -0x80(%rbp),%rax
movsd  (%rax,%r14,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
addsd  %xmm0,%xmm1
movsd  0x0(%r13,%rbx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mulsd  0x9e7(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  (%r15,%r14,8),%xmm1
addsd  (%r12,%rbx,8),%xmm1
movsd  -0x30(%rbp),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,-0x30(%rbp)
addsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
addsd  %xmm0,%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <exp@plt>
movsd  -0x88(%rbp),%xmm1
ff
addsd  %xmm0,%xmm1
add    $0x1,%r14
mov    -0x50(%rbp),%rax
movslq (%rax),%rbx
cmp    %rbx,%r14
jl     15d0 <fnlnf_C+0x4a0>
add    %r14d,-0x54(%rbp)
mov    -0x78(%rbp),%rcx
mov    -0x48(%rbp),%r12
movsd  -0x30(%rbp),%xmm0
jmp    14cc <fnlnf_C+0x39c>
xorps  %xmm1,%xmm1
cvtsi2sd %esi,%xmm1
movapd -0xa0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movapd -0x70(%rbp),%xmm2
divsd  %xmm1,%xmm2
movapd %xmm2,-0x70(%rbp)
movapd %xmm0,-0xa0(%rbp)
ff
call   1050 <log@plt>
mov    %eax,%r14d
movaps -0x70(%rbp),%xmm0
call   1050 <log@plt>
add    %eax,%eax
sub    %eax,%r14d
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mov    -0xf8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x50(%rbp),%rax
mov    (%rax),%r9d
test   %r9d,%r9d
mov    -0xc0(%rbp),%rdi
mov    -0xb8(%rbp),%rbx
mov    -0xb0(%rbp),%rcx
mov    -0x78(%rbp),%rax
jle    180d <fnlnf_C+0x6dd>
movapd -0x70(%rbp),%xmm7
movapd -0xa0(%rbp),%xmm6
ff
mov    0x10(%rbp),%r8
mov    -0xa8(%rbp),%rdx
xorps  %xmm0,%xmm0
cvtsi2sdl (%rdx),%xmm0
cmp    $0x1,%r9d
jne    1734 <fnlnf_C+0x604>
xor    %edx,%edx
jmp    17c0 <fnlnf_C+0x690>
mov    %r9d,%edx
and    $0xfffffffe,%edx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
movapd %xmm6,%xmm2
unpcklpd %xmm6,%xmm2
movapd %xmm7,%xmm3
unpcklpd %xmm7,%xmm3
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd (%rbx,%rsi,8),%xmm4
movapd (%rax,%rsi,8),%xmm5
addpd  %xmm5,%xmm5
subpd  %xmm5,%xmm4
divpd  %xmm1,%xmm4
movapd %xmm4,(%rbx,%rsi,8)
movapd (%rcx,%rsi,8),%xmm5
subpd  (%rdi,%rsi,8),%xmm5
divpd  %xmm1,%xmm5
movapd %xmm5,(%rcx,%rsi,8)
divpd  %xmm2,%xmm4
divpd  %xmm3,%xmm5
addpd  %xmm5,%xmm5
subpd  %xmm5,%xmm4
movupd %xmm4,(%r8,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%rdx
jne    1760 <fnlnf_C+0x630>
cmp    %r9,%rdx
je     180d <fnlnf_C+0x6dd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rbx,%rdx,8),%xmm1
movsd  (%rax,%rdx,8),%xmm2
addsd  %xmm2,%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rdx,8)
movsd  (%rcx,%rdx,8),%xmm2
subsd  (%rdi,%rdx,8),%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,(%rcx,%rdx,8)
divsd  %xmm6,%xmm1
divsd  %xmm7,%xmm2
addsd  %xmm2,%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,(%r8,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r9
jne    17c0 <fnlnf_C+0x690>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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