#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 */
int floor(int const);
void interp2_table1_real_per(const double *r_ck, const double *i_ck,
                             const int K1, const int K2, const double *r_h1,
                             const double *r_h2, const int J1, const int J2,
                             const int L1, const int L2, const double *p_tm,
                             const int M, double *r_fm, double *i_fm) {
  int mm;
  {
    const int ncenter1 = floor(J1 * L1 / 2.);
    r_h1 += ncenter1;
  }
  {
    const int ncenter2 = floor(J2 * L2 / 2.);
    r_h2 += ncenter2;
  }
  for (mm = 0; mm < M; mm++) {
    int jj1, jj2;
    const double t2 = p_tm[M];
    const double t1 = *p_tm++;
    double sum2r = 0;
    double sum2i = 0;
    const int koff1 = 1 + floor(t1 - J1 / 2.);
    int k2 = 1 + floor(t2 - J2 / 2.);
    for (jj2 = 0; jj2 < J2; jj2++, k2++) {
      const double p2 = (t2 - k2) * L2;
      const int n2 = floor(p2);
      const double alf2 = p2 - n2;
      register const double *ph2 = r_h2 + n2;
      double coef2r = (1 - alf2) * *ph2 + alf2 * *(ph2 + 1);
      const int wrap2 = floor(k2 / (double)K2);
      const int k2mod = k2 - K2 * wrap2;
      const int k12mod = k2mod * K1;
      register double sum1r = 0;
      register double sum1i = 0;
      int k1 = koff1;
      for (jj1 = 0; jj1 < J1; jj1++, k1++) {
        const double p1 = (t1 - k1) * L1;
        const int n1 = floor(p1);
        const double alf1 = p1 - n1;
        register const double *ph1 = r_h1 + n1;
        register double coef1r = (1 - alf1) * *ph1 + alf1 * *(ph1 + 1);
        const int wrap1 = floor(k1 / (double)K1);
        const int k1mod = k1 - K1 * wrap1;
        const int kk = k12mod + k1mod;
        sum1r += coef1r * r_ck[kk];
        sum1i += coef1r * i_ck[kk];
      }
      sum2r += coef2r * sum1r;
      sum2i += coef2r * sum1i;
    }
    *r_fm++ = sum2r;
    *i_fm++ = sum2i;
  }
}


x86 assembly (clang, -O0):
<interp2_table1_real_per>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    0x10(%rbp),%eax
imul   0x20(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xea1(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    0x18(%rbp),%eax
imul   0x28(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe69(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    0x38(%rbp),%eax
jge    1576 <interp2_table1_real_per+0x466>
mov    0x30(%rbp),%rax
movslq 0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x30(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl 0x10(%rbp),%xmm1
movsd  0xde5(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
movsd  -0x48(%rbp),%xmm0
cvtsi2sdl 0x18(%rbp),%xmm1
movsd  0xdbc(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1538 <interp2_table1_real_per+0x428>
movsd  -0x48(%rbp),%xmm0
cvtsi2sdl -0x68(%rbp),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl 0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
cvttsd2si -0x70(%rbp),%edi
call   1030 <floor@plt>
mov    %eax,-0x74(%rbp)
movsd  -0x70(%rbp),%xmm0
cvtsi2sdl -0x74(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x88(%rbp)
movsd  0xd40(%rip),%xmm0
subsd  -0x80(%rbp),%xmm0
mov    -0x88(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x80(%rbp),%xmm1
mov    -0x88(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cvtsi2sdl -0x68(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0x94(%rbp)
mov    -0x68(%rbp),%eax
mov    -0x18(%rbp),%ecx
imul   -0x94(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x98(%rbp)
mov    -0x98(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x9c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x64(%rbp),%eax
mov    %eax,-0xb4(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    14dd <interp2_table1_real_per+0x3cd>
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0xb4(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
cvtsi2sdl 0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
cvttsd2si -0xc0(%rbp),%edi
ff
call   1030 <floor@plt>
mov    %eax,-0xc4(%rbp)
movsd  -0xc0(%rbp),%xmm0
ff
cvtsi2sdl -0xc4(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x20(%rbp),%rax
movslq -0xc4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xd8(%rbp)
movsd  0xc29(%rip),%xmm0
subsd  -0xd0(%rbp),%xmm0
ff
mov    -0xd8(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0xd0(%rbp),%xmm1
ff
mov    -0xd8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
cvtsi2sdl -0xb4(%rbp),%xmm0
ff
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0xe4(%rbp)
mov    -0xb4(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0xe4(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xe8(%rbp)
mov    -0x9c(%rbp),%eax
add    -0xe8(%rbp),%eax
mov    %eax,-0xec(%rbp)
movsd  -0xe0(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0xec(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movslq -0xec(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1361 <interp2_table1_real_per+0x251>
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm2
ff
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1262 <interp2_table1_real_per+0x152>
movsd  -0x58(%rbp),%xmm0
mov    0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x40(%rbp)
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
mov    0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x48(%rbp)
movsd  %xmm0,(%rax)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11c3 <interp2_table1_real_per+0xb3>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp2_table1_real_per>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %r9,%r14
mov    %r8,%r12
mov    %ecx,0x10(%rsp)
mov    %edx,%r15d
mov    %rsi,%r13
mov    %rdi,0x90(%rsp)
mov    0x148(%rsp),%ebp
mov    0x140(%rsp),%ebx
mov    %ebx,%eax
imul   0x130(%rsp),%eax
cvtsi2sd %eax,%xmm0
mulsd  0xea3(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %ebp,%ecx
imul   0x138(%rsp),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mov    %eax,%ebp
mulsd  0xe7f(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
cmpl   $0x0,0x158(%rsp)
jle    1559 <interp2_table1_real_per+0x449>
mov    %ebx,%edi
mov    0x168(%rsp),%rbx
mov    0x160(%rsp),%rdx
mov    0x150(%rsp),%rsi
movslq %ebp,%rcx
lea    (%r12,%rcx,8),%rcx
cltq
lea    (%r14,%rax,8),%rax
mov    %rax,0xa8(%rsp)
mov    %rdx,%r14
xorps  %xmm0,%xmm0
cvtsi2sdl 0x130(%rsp),%xmm0
cvtsi2sdl 0x138(%rsp),%xmm1
movsd  0xe19(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x70(%rsp)
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x68(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x148(%rsp),%xmm0
movsd  %xmm0,0xa0(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x10(%rsp),%xmm0
movsd  %xmm0,0x98(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %r15d,%xmm1
xor    %eax,%eax
mov    %r15d,0x20(%rsp)
mov    %rcx,0x88(%rsp)
movsd  %xmm0,0xb8(%rsp)
movsd  %xmm1,0xb0(%rsp)
jmp    129f <interp2_table1_real_per+0x18f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addpd  %xmm1,%xmm2
mov    0x80(%rsp),%rbx
mov    0x78(%rsp),%r14
mov    0x30(%rsp),%rsi
mov    0xc(%rsp),%eax
add    $0x8,%rsi
movhpd %xmm2,(%r14)
add    $0x8,%r14
movlpd %xmm2,(%rbx)
add    $0x8,%rbx
add    $0x1,%eax
cmp    0x158(%rsp),%eax
je     1559 <interp2_table1_real_per+0x449>
mov    %eax,0xc(%rsp)
mov    0x158(%rsp),%eax
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,0x38(%rsp)
mov    %rsi,0x30(%rsp)
movsd  (%rsi),%xmm0
movsd  %xmm0,0xc0(%rsp)
subsd  0x70(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,%r12d
movsd  0x38(%rsp),%xmm0
subsd  0x68(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
cmpl   $0x0,0x138(%rsp)
jle    1550 <interp2_table1_real_per+0x440>
mov    %eax,%ebp
mov    %r14,0x78(%rsp)
mov    %rbx,0x80(%rsp)
mov    %eax,%r14d
add    $0x1,%r14d
add    $0x1,%r12d
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
mov    0x130(%rsp),%r15d
mov    %r12d,0x24(%rsp)
jmp    136c <interp2_table1_real_per+0x25c>
nopl   0x0(%rax,%rax,1)
movapd 0xd0(%rsp),%xmm2
addsd  0x18(%rsp),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  %xmm0,%xmm2
movapd %xmm2,%xmm0
movapd 0xe0(%rsp),%xmm1
addpd  %xmm1,%xmm0
add    $0x1,%ebx
add    $0x1,%r14d
cmp    0x138(%rsp),%ebx
je     1260 <interp2_table1_real_per+0x150>
movapd %xmm0,0xe0(%rsp)
add    $0x1,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  0x38(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xa0(%rsp),%xmm1
movsd  %xmm1,0x18(%rsp)
cvttsd2si %xmm1,%edi
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x18(%rsp),%xmm1
subsd  %xmm0,%xmm1
cltq
movsd  0xc46(%rip),%xmm0
subsd  %xmm1,%xmm0
mov    0xa8(%rsp),%rcx
mulsd  0x8(%rcx,%rax,8),%xmm1
movsd  %xmm1,0x18(%rsp)
mulsd  (%rcx,%rax,8),%xmm0
movapd %xmm0,0xd0(%rsp)
movsd  0x50(%rsp),%xmm0
divsd  0x98(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,0x8(%rsp)
xorpd  %xmm0,%xmm0
test   %r15d,%r15d
jle    1330 <interp2_table1_real_per+0x220>
mov    %ebx,0x28(%rsp)
mov    %ebp,0x2c(%rsp)
mov    0x8(%rsp),%eax
imul   0x10(%rsp),%eax
mov    %eax,0x8(%rsp)
xorpd  %xmm1,%xmm1
mov    %r12d,%ebx
mov    0x20(%rsp),%ebp
mov    0x90(%rsp),%r12
mov    %r14d,0x14(%rsp)
mov    0x88(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
movapd %xmm1,0x50(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0xc8(%rsp)
movsd  0xc0(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xb8(%rsp),%xmm1
movsd  %xmm1,0x40(%rsp)
cvttsd2si %xmm1,%edi
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x40(%rsp),%xmm1
subsd  %xmm0,%xmm1
cltq
movsd  0xb62(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  0x8(%r14,%rax,8),%xmm1
mulsd  (%r14,%rax,8),%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,0x40(%rsp)
movsd  0xc8(%rsp),%xmm0
divsd  0xb0(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
movapd 0x50(%rsp),%xmm2
add    0x8(%rsp),%eax
mov    0x14(%rsp),%ecx
sub    %eax,%ecx
imul   %ebp,%ecx
add    %ebx,%ecx
movslq %ecx,%rax
movapd 0x40(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
movsd  0x0(%r13,%rax,8),%xmm0
movhpd (%r12,%rax,8),%xmm0
mulpd  %xmm1,%xmm0
movapd %xmm0,%xmm1
addpd  %xmm2,%xmm1
add    $0x1,%ebx
add    $0xffffffff,%r15d
jne    1450 <interp2_table1_real_per+0x340>
addpd  %xmm2,%xmm0
mov    0x130(%rsp),%r15d
mov    0x24(%rsp),%r12d
mov    0x2c(%rsp),%ebp
mov    0x14(%rsp),%r14d
mov    0x28(%rsp),%ebx
jmp    1330 <interp2_table1_real_per+0x220>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm2,%xmm2
jmp    1271 <interp2_table1_real_per+0x161>
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @interp2_table1_real_per(double* nocapture %0, double* nocapture %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture %5, i32 %6, i32 %7, i32 %8, i32 %9, double* nocapture %10, i32 %11, double* nocapture writeonly %12, double* nocapture writeonly %13) {
%15 = mul nsw i32 %8, %6
%16 = sitofp i32 %15 to double
%17 = fmul double %16, 5.000000e-01
%18 = fptosi double %17 to i32
%19 = tail call i32 @floor(i32 %18)
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %4, i64 %20
%22 = mul nsw i32 %9, %7
%23 = sitofp i32 %22 to double
%24 = fmul double %23, 5.000000e-01
%25 = fptosi double %24 to i32
%26 = tail call i32 @floor(i32 %25)
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds double, double* %5, i64 %27
%29 = icmp sgt i32 %11, 0
br i1 %29, label %30, label %139
30: ; preds = %14
%31 = zext i32 %11 to i64
%32 = sitofp i32 %6 to double
%33 = fmul double %32, 5.000000e-01
%34 = sitofp i32 %7 to double
%35 = fmul double %34, 5.000000e-01
%36 = icmp sgt i32 %7, 0
%37 = sitofp i32 %9 to double
%38 = sitofp i32 %3 to double
%39 = icmp sgt i32 %6, 0
%40 = sitofp i32 %8 to double
%41 = sitofp i32 %2 to double
br label %42
42: ; preds = %30, %131
%43 = phi double* [ %10, %30 ], [ %49, %131 ]
%44 = phi double* [ %12, %30 ], [ %133, %131 ]
%45 = phi double* [ %13, %30 ], [ %135, %131 ]
%46 = phi i32 [ 0, %30 ], [ %137, %131 ]
%47 = getelementptr inbounds double, double* %43, i64 %31
%48 = load double, double* %47
%49 = getelementptr inbounds double, double* %43, i64 1
%50 = load double, double* %43
%51 = fsub double %50, %33
%52 = fptosi double %51 to i32
%53 = tail call i32 @floor(i32 %52)
%54 = fsub double %48, %35
%55 = fptosi double %54 to i32
%56 = tail call i32 @floor(i32 %55)
br i1 %36, label %57, label %131
57: ; preds = %42, %122
%58 = phi i32 [ %61, %122 ], [ %56, %42 ]
%59 = phi i32 [ %127, %122 ], [ 0, %42 ]
%60 = phi <2 x double> [ %126, %122 ], [ zeroinitializer, %42 ]
%61 = add nsw i32 %58, 1
%62 = sitofp i32 %61 to double
%63 = fsub double %48, %62
%64 = fmul double %63, %37
%65 = fptosi double %64 to i32
%66 = tail call i32 @floor(i32 %65)
%67 = sitofp i32 %66 to double
%68 = fsub double %64, %67
%69 = sext i32 %66 to i64
%70 = getelementptr inbounds double, double* %28, i64 %69
%71 = fsub double 1.000000e+00, %68
%72 = load double, double* %70
%73 = getelementptr inbounds double, double* %70, i64 1
%74 = load double, double* %73
%75 = fmul double %68, %74
%76 = tail call double @llvm.fmuladd.f64(double %71, double %72, double %75)
%77 = fdiv double %62, %38
%78 = fptosi double %77 to i32
%79 = tail call i32 @floor(i32 %78)
%80 = mul nsw i32 %79, %3
br i1 %39, label %81, label %122
81: ; preds = %57, %81
%82 = phi i32 [ %85, %81 ], [ %53, %57 ]
%83 = phi i32 [ %118, %81 ], [ 0, %57 ]
%84 = phi <2 x double> [ %117, %81 ], [ zeroinitializer, %57 ]
%85 = add nsw i32 %82, 1
%86 = sitofp i32 %85 to double
%87 = fsub double %50, %86
%88 = fmul double %87, %40
%89 = fptosi double %88 to i32
%90 = tail call i32 @floor(i32 %89)
%91 = sitofp i32 %90 to double
%92 = fsub double %88, %91
%93 = sext i32 %90 to i64
%94 = getelementptr inbounds double, double* %21, i64 %93
%95 = fsub double 1.000000e+00, %92
%96 = load double, double* %94
%97 = getelementptr inbounds double, double* %94, i64 1
%98 = load double, double* %97
%99 = fmul double %92, %98
%100 = tail call double @llvm.fmuladd.f64(double %95, double %96, double %99)
%101 = fdiv double %86, %41
%102 = fptosi double %101 to i32
%103 = tail call i32 @floor(i32 %102)
%104 = add i32 %80, %103
%105 = sub i32 %61, %104
%106 = mul i32 %105, %2
%107 = add i32 %106, %85
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %0, i64 %108
%110 = load double, double* %109
%111 = getelementptr inbounds double, double* %1, i64 %108
%112 = load double, double* %111
%113 = insertelement <2 x double> poison, double %100, i64 0
%114 = shufflevector <2 x double> %113, <2 x double> poison, <2 x i32> zeroinitializer
%115 = insertelement <2 x double> poison, double %112, i64 0
%116 = insertelement <2 x double> %115, double %110, i64 1
%117 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %114, <2 x double> %116, <2 x double> %84)
%118 = add nuw nsw i32 %83, 1
%119 = icmp eq i32 %118, %6
br i1 %119, label %120, label %81
120: ; preds = %81
%121 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %114, <2 x double> %116, <2 x double> %84)
br label %122
122: ; preds = %120, %57
%123 = phi <2 x double> [ zeroinitializer, %57 ], [ %121, %120 ]
%124 = insertelement <2 x double> poison, double %76, i64 0
%125 = shufflevector <2 x double> %124, <2 x double> poison, <2 x i32> zeroinitializer
%126 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %125, <2 x double> %123, <2 x double> %60)
%127 = add nuw nsw i32 %59, 1
%128 = icmp eq i32 %127, %7
br i1 %128, label %129, label %57
129: ; preds = %122
%130 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %125, <2 x double> %123, <2 x double> %60)
br label %131
131: ; preds = %129, %42
%132 = phi <2 x double> [ zeroinitializer, %42 ], [ %130, %129 ]
%133 = getelementptr inbounds double, double* %44, i64 1
%134 = extractelement <2 x double> %132, i64 1
store double %134, double* %44
%135 = getelementptr inbounds double, double* %45, i64 1
%136 = extractelement <2 x double> %132, i64 0
store double %136, double* %45
%137 = add nuw nsw i32 %46, 1
%138 = icmp eq i32 %137, %11
br i1 %138, label %139, label %42
139: ; preds = %131, %14
ret void
}