#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_table0_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 + 0.5);
      double coef2r = r_h2[n2];
      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 + 0.5);
        register double coef1r = r_h1[n1];
        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_table0_real_per>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%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    14dc <interp2_table0_real_per+0x3cc>
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    149e <interp2_table0_real_per+0x38e>
movsd  -0x48(%rbp),%xmm0
cvtsi2sdl -0x68(%rbp),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl 0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xd76(%rip),%xmm0
addsd  -0x70(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0x74(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
cvtsi2sdl -0x68(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0x84(%rbp)
mov    -0x68(%rbp),%eax
mov    -0x18(%rbp),%ecx
imul   -0x84(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x88(%rbp)
mov    -0x88(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x8c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x64(%rbp),%eax
mov    %eax,-0xa4(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1449 <interp2_table0_real_per+0x339>
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0xa4(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
cvtsi2sdl 0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xcb5(%rip),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0xb4(%rbp)
mov    -0x20(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
cvtsi2sdl -0xa4(%rbp),%xmm0
ff
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,-0xc4(%rbp)
mov    -0xa4(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0xc4(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x8c(%rbp),%eax
add    -0xc8(%rbp),%eax
mov    %eax,-0xcc(%rbp)
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0xcc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movslq -0xcc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    131d <interp2_table0_real_per+0x20d>
movsd  -0x80(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0xa0(%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_table0_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_table0_real_per+0xb3>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp2_table0_real_per>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9,0x20(%rsp)
mov    %r8,%rbp
mov    %ecx,0x8(%rsp)
mov    %edx,%r15d
mov    %rsi,%r12
mov    %rdi,0x78(%rsp)
mov    0x128(%rsp),%ebx
mov    0x120(%rsp),%r14d
mov    %r14d,%eax
imul   0x110(%rsp),%eax
cvtsi2sd %eax,%xmm0
mulsd  0xea2(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %ebx,%ecx
imul   0x118(%rsp),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mov    %eax,%r13d
mulsd  0xe7d(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
movsd  0xe6c(%rip),%xmm0
cmpl   $0x0,0x138(%rsp)
jle    14e9 <interp2_table0_real_per+0x3d9>
mov    %r14d,%edi
mov    0x148(%rsp),%rbx
mov    0x140(%rsp),%r14
mov    0x130(%rsp),%rsi
movslq %r13d,%rcx
lea    0x0(%rbp,%rcx,8),%rcx
cltq
mov    0x20(%rsp),%rbp
lea    0x0(%rbp,%rax,8),%rax
mov    %rax,0x90(%rsp)
cvtsi2sdl 0x110(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x58(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sdl 0x118(%rsp),%xmm1
cvtsi2sdl 0x128(%rsp),%xmm2
movsd  %xmm2,0x88(%rsp)
xorps  %xmm2,%xmm2
cvtsi2sdl 0x8(%rsp),%xmm2
movsd  %xmm2,0x80(%rsp)
xorps  %xmm2,%xmm2
cvtsi2sd %edi,%xmm2
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x50(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
xor    %eax,%eax
mov    %r15d,0x10(%rsp)
mov    %rcx,0x70(%rsp)
movsd  %xmm2,0xa0(%rsp)
movsd  %xmm0,0x98(%rsp)
jmp    129c <interp2_table0_real_per+0x18c>
cs nopw 0x0(%rax,%rax,1)
nop
addpd  %xmm1,%xmm3
mov    0x68(%rsp),%rbx
mov    0x60(%rsp),%r14
mov    0x30(%rsp),%rsi
mov    0x4(%rsp),%eax
add    $0x8,%rsi
movhpd %xmm3,(%r14)
add    $0x8,%r14
movlpd %xmm3,(%rbx)
add    $0x8,%rbx
add    $0x1,%eax
cmp    0x138(%rsp),%eax
je     14e9 <interp2_table0_real_per+0x3d9>
mov    %eax,0x4(%rsp)
mov    0x138(%rsp),%eax
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,0x38(%rsp)
mov    %rsi,0x30(%rsp)
movsd  (%rsi),%xmm0
movsd  %xmm0,0xa8(%rsp)
subsd  0x58(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,%r13d
movsd  0x38(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
cmpl   $0x0,0x118(%rsp)
jle    14e0 <interp2_table0_real_per+0x3d0>
mov    %eax,%ebp
mov    %r14,0x60(%rsp)
mov    %rbx,0x68(%rsp)
mov    %eax,%r14d
add    $0x1,%r14d
add    $0x1,%r13d
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
mov    0x110(%rsp),%r15d
mov    %r13d,0x14(%rsp)
jmp    1366 <interp2_table0_real_per+0x256>
cs nopw 0x0(%rax,%rax,1)
nop
movapd 0xb0(%rsp),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm0,%xmm3
movapd %xmm3,%xmm0
movapd 0xc0(%rsp),%xmm1
addpd  %xmm1,%xmm0
add    $0x1,%ebx
add    $0x1,%r14d
cmp    0x118(%rsp),%ebx
je     1260 <interp2_table0_real_per+0x150>
movapd %xmm0,0xc0(%rsp)
add    $0x1,%ebp
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x38(%rsp),%xmm0
subsd  %xmm1,%xmm0
mulsd  0x88(%rsp),%xmm0
addsd  0xc66(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
cltq
mov    0x90(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movaps %xmm0,0xb0(%rsp)
movsd  0x20(%rsp),%xmm0
divsd  0x80(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
mov    %eax,(%rsp)
xorpd  %xmm0,%xmm0
test   %r15d,%r15d
jle    1330 <interp2_table0_real_per+0x220>
mov    %ebx,0x18(%rsp)
mov    %ebp,0x1c(%rsp)
mov    (%rsp),%eax
imul   0x8(%rsp),%eax
mov    %eax,(%rsp)
xorpd  %xmm1,%xmm1
mov    %r13d,%ebx
mov    0x10(%rsp),%ebp
mov    0x78(%rsp),%r13
mov    %r14d,0xc(%rsp)
mov    0x70(%rsp),%r14
nop
movapd %xmm1,0x20(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
movsd  %xmm1,0x40(%rsp)
movsd  0xa8(%rsp),%xmm0
subsd  %xmm1,%xmm0
mulsd  0xa0(%rsp),%xmm0
addsd  0xbbf(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <floor@plt>
cltq
movsd  0x40(%rsp),%xmm0
divsd  0x98(%rsp),%xmm0
cvttsd2si %xmm0,%edi
movsd  (%r14,%rax,8),%xmm0
movaps %xmm0,0x40(%rsp)
call   1030 <floor@plt>
movapd 0x20(%rsp),%xmm2
add    (%rsp),%eax
mov    0xc(%rsp),%ecx
sub    %eax,%ecx
imul   %ebp,%ecx
add    %ebx,%ecx
movslq %ecx,%rax
movapd 0x40(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
movsd  (%r12,%rax,8),%xmm0
movhpd 0x0(%r13,%rax,8),%xmm0
mulpd  %xmm1,%xmm0
movapd %xmm0,%xmm1
addpd  %xmm2,%xmm1
add    $0x1,%ebx
add    $0xffffffff,%r15d
jne    1410 <interp2_table0_real_per+0x300>
addpd  %xmm2,%xmm0
mov    0x110(%rsp),%r15d
mov    0x14(%rsp),%r13d
mov    0x1c(%rsp),%ebp
mov    0xc(%rsp),%r14d
mov    0x18(%rsp),%ebx
jmp    1330 <interp2_table0_real_per+0x220>
nopl   0x0(%rax)
xorpd  %xmm3,%xmm3
jmp    126e <interp2_table0_real_per+0x15e>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @interp2_table0_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 %127
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, %119
%43 = phi double* [ %10, %30 ], [ %49, %119 ]
%44 = phi double* [ %12, %30 ], [ %121, %119 ]
%45 = phi double* [ %13, %30 ], [ %123, %119 ]
%46 = phi i32 [ 0, %30 ], [ %125, %119 ]
%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 %119
57: ; preds = %42, %110
%58 = phi i32 [ %61, %110 ], [ %56, %42 ]
%59 = phi i32 [ %115, %110 ], [ 0, %42 ]
%60 = phi <2 x double> [ %114, %110 ], [ 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 = fadd double %64, 5.000000e-01
%66 = fptosi double %65 to i32
%67 = tail call i32 @floor(i32 %66)
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %28, i64 %68
%70 = load double, double* %69
%71 = fdiv double %62, %38
%72 = fptosi double %71 to i32
%73 = tail call i32 @floor(i32 %72)
%74 = mul nsw i32 %73, %3
br i1 %39, label %75, label %110
75: ; preds = %57, %75
%76 = phi i32 [ %79, %75 ], [ %53, %57 ]
%77 = phi i32 [ %106, %75 ], [ 0, %57 ]
%78 = phi <2 x double> [ %105, %75 ], [ zeroinitializer, %57 ]
%79 = add nsw i32 %76, 1
%80 = sitofp i32 %79 to double
%81 = fsub double %50, %80
%82 = fmul double %81, %40
%83 = fadd double %82, 5.000000e-01
%84 = fptosi double %83 to i32
%85 = tail call i32 @floor(i32 %84)
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds double, double* %21, i64 %86
%88 = load double, double* %87
%89 = fdiv double %80, %41
%90 = fptosi double %89 to i32
%91 = tail call i32 @floor(i32 %90)
%92 = add i32 %74, %91
%93 = sub i32 %61, %92
%94 = mul i32 %93, %2
%95 = add i32 %94, %79
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %0, i64 %96
%98 = load double, double* %97
%99 = getelementptr inbounds double, double* %1, i64 %96
%100 = load double, double* %99
%101 = insertelement <2 x double> poison, double %88, i64 0
%102 = shufflevector <2 x double> %101, <2 x double> poison, <2 x i32> zeroinitializer
%103 = insertelement <2 x double> poison, double %100, i64 0
%104 = insertelement <2 x double> %103, double %98, i64 1
%105 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %102, <2 x double> %104, <2 x double> %78)
%106 = add nuw nsw i32 %77, 1
%107 = icmp eq i32 %106, %6
br i1 %107, label %108, label %75
108: ; preds = %75
%109 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %102, <2 x double> %104, <2 x double> %78)
br label %110
110: ; preds = %108, %57
%111 = phi <2 x double> [ zeroinitializer, %57 ], [ %109, %108 ]
%112 = insertelement <2 x double> poison, double %70, i64 0
%113 = shufflevector <2 x double> %112, <2 x double> poison, <2 x i32> zeroinitializer
%114 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %113, <2 x double> %111, <2 x double> %60)
%115 = add nuw nsw i32 %59, 1
%116 = icmp eq i32 %115, %7
br i1 %116, label %117, label %57
117: ; preds = %110
%118 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %113, <2 x double> %111, <2 x double> %60)
br label %119
119: ; preds = %117, %42
%120 = phi <2 x double> [ zeroinitializer, %42 ], [ %118, %117 ]
%121 = getelementptr inbounds double, double* %44, i64 1
%122 = extractelement <2 x double> %120, i64 1
store double %122, double* %44
%123 = getelementptr inbounds double, double* %45, i64 1
%124 = extractelement <2 x double> %120, i64 0
store double %124, double* %45
%125 = add nuw nsw i32 %46, 1
%126 = icmp eq i32 %125, %11
br i1 %126, label %127, label %42
127: ; preds = %119, %14
ret void
}