#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);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int const);
void interp2_table1_real_per_adj(double *r_ck, 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, const double *r_fm,
                                 const 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;
  }
  (void)memset((void *)r_ck, 0, K1 * K2 * sizeof(*r_ck));
  (void)memset((void *)i_ck, 0, K1 * K2 * sizeof(*i_ck));
  for (mm = 0; mm < M; mm++) {
    int jj1, jj2;
    const double t2 = p_tm[M];
    const double t1 = *p_tm++;
    const double fmr = *r_fm++;
    const double fmi = *i_fm++;
    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;
      const double v2r = coef2r * fmr;
      const double v2i = coef2r * fmi;
      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;
        r_ck[kk] += coef1r * v2r;
        i_ck[kk] += coef1r * v2i;
      }
    }
  }
}


x86 assembly (clang, -O0):
<interp2_table1_real_per_adj>:
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
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <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
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <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)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    0x38(%rbp),%eax
jge    156a <interp2_table1_real_per_adj+0x44a>
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)
mov    0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x40(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x48(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl 0x10(%rbp),%xmm1
movsd  0xd95(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
movsd  -0x48(%rbp),%xmm0
cvtsi2sdl 0x18(%rbp),%xmm1
movsd  0xd6c(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1557 <interp2_table1_real_per_adj+0x437>
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   1040 <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  0xcf0(%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   1040 <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)
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x60(%rbp),%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    153b <interp2_table1_real_per_adj+0x41b>
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   1040 <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  0xbc5(%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   1040 <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
movsd  -0xa8(%rbp),%xmm2
ff
mov    -0x8(%rbp),%rax
movslq -0xec(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movslq -0xec(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    13c5 <interp2_table1_real_per_adj+0x2a5>
jmp    1540 <interp2_table1_real_per_adj+0x420>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    12b2 <interp2_table1_real_per_adj+0x192>
jmp    155c <interp2_table1_real_per_adj+0x43c>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11f3 <interp2_table1_real_per_adj+0xd3>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp2_table1_real_per_adj>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9,0x10(%rsp)
mov    %r8,0x8(%rsp)
mov    %ecx,%ebx
mov    %edx,%r12d
mov    %rsi,%r15
mov    %rdi,%rbp
mov    0x128(%rsp),%r14d
mov    0x120(%rsp),%eax
imul   0x110(%rsp),%eax
mov    %eax,%edi
shr    $0x1f,%edi
add    %eax,%edi
sar    %edi
call   1040 <floor@plt>
mov    %eax,%r13d
mov    %r14d,%eax
imul   0x118(%rsp),%eax
mov    %eax,%edi
shr    $0x1f,%edi
add    %eax,%edi
sar    %edi
call   1040 <floor@plt>
mov    %eax,%r14d
mov    %r12d,0x28(%rsp)
mov    %ebx,0x20(%rsp)
imul   %ebx,%r12d
shl    $0x3,%r12d
xor    %ebx,%ebx
mov    %rbp,0xb8(%rsp)
mov    %rbp,%rdi
xor    %esi,%esi
mov    %r12d,%edx
call   1030 <memset@plt>
mov    %r15,0xc0(%rsp)
mov    %r15,%rdi
xor    %esi,%esi
mov    %r12d,%edx
call   1030 <memset@plt>
cmpl   $0x0,0x138(%rsp)
jle    1575 <interp2_table1_real_per_adj+0x455>
mov    0x148(%rsp),%rcx
mov    0x140(%rsp),%rdx
mov    0x130(%rsp),%rsi
movslq %r13d,%rax
mov    0x8(%rsp),%rdi
lea    (%rdi,%rax,8),%rax
mov    %rax,0xb0(%rsp)
movslq %r14d,%rax
mov    0x10(%rsp),%rdi
lea    (%rdi,%rax,8),%rax
mov    %rax,0xa8(%rsp)
cvtsi2sdl 0x110(%rsp),%xmm1
movsd  0xdda(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x68(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sdl 0x118(%rsp),%xmm1
cvtsi2sdl 0x128(%rsp),%xmm2
movsd  %xmm2,0xa0(%rsp)
xorps  %xmm2,%xmm2
cvtsi2sdl 0x20(%rsp),%xmm2
movsd  %xmm2,0x98(%rsp)
xorps  %xmm2,%xmm2
cvtsi2sdl 0x120(%rsp),%xmm2
movsd  %xmm2,0x50(%rsp)
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x60(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x28(%rsp),%xmm0
movsd  %xmm0,0xc8(%rsp)
mov    0x28(%rsp),%r14d
mov    0xc0(%rsp),%r13
mov    0xb8(%rsp),%r12
mov    0xb0(%rsp),%rbp
jmp    12e2 <interp2_table1_real_per_adj+0x1c2>
nopl   (%rax)
mov    0x70(%rsp),%rsi
add    $0x8,%rsi
mov    0x78(%rsp),%rdx
add    $0x8,%rdx
mov    0x80(%rsp),%rcx
add    $0x8,%rcx
mov    0x3c(%rsp),%ebx
add    $0x1,%ebx
cmp    0x138(%rsp),%ebx
je     1575 <interp2_table1_real_per_adj+0x455>
mov    %ebx,0x3c(%rsp)
mov    0x138(%rsp),%eax
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,0x48(%rsp)
mov    %rsi,0x70(%rsp)
movsd  (%rsi),%xmm0
mov    %rdx,0x78(%rsp)
movsd  (%rdx),%xmm1
movsd  %xmm1,0x90(%rsp)
mov    %rcx,0x80(%rsp)
movsd  (%rcx),%xmm1
movsd  %xmm1,0x88(%rsp)
movsd  %xmm0,0x58(%rsp)
subsd  0x68(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,0x24(%rsp)
movsd  0x48(%rsp),%xmm0
subsd  0x60(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
cmpl   $0x0,0x118(%rsp)
jle    12b0 <interp2_table1_real_per_adj+0x190>
mov    %eax,%ecx
add    $0x1,%ecx
addl   $0x1,0x24(%rsp)
xor    %edx,%edx
jmp    139f <interp2_table1_real_per_adj+0x27f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x40(%rsp),%edx
add    $0x1,%edx
mov    0x2c(%rsp),%ecx
add    $0x1,%ecx
cmp    0x118(%rsp),%edx
mov    0x44(%rsp),%eax
je     12b0 <interp2_table1_real_per_adj+0x190>
mov    %ecx,0x2c(%rsp)
mov    %edx,0x40(%rsp)
add    $0x1,%eax
mov    %eax,0x44(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x48(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xa0(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
cvttsd2si %xmm1,%edi
call   1040 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
cltq
movsd  0xc10(%rip),%xmm0
subsd  %xmm1,%xmm0
mov    0xa8(%rsp),%rcx
mulsd  0x8(%rcx,%rax,8),%xmm1
movsd  %xmm1,0x10(%rsp)
mulsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0x98(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,0x1c(%rsp)
cmpl   $0x0,0x110(%rsp)
movsd  0x50(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
jle    1380 <interp2_table1_real_per_adj+0x260>
mov    0x1c(%rsp),%eax
imul   0x20(%rsp),%eax
mov    %eax,0x1c(%rsp)
movsd  0x30(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  0x90(%rsp),%xmm3
mulsd  %xmm0,%xmm3
movsd  %xmm3,0xd0(%rsp)
mulsd  0x88(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
mov    0x110(%rsp),%r15d
mov    0x24(%rsp),%ebx
nopl   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0x10(%rsp)
subsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
cvttsd2si %xmm2,%edi
call   1040 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
cltq
movsd  0xb29(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  0x8(%rbp,%rax,8),%xmm1
mulsd  0x0(%rbp,%rax,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  0xc8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
movsd  0x58(%rsp),%xmm2
movsd  0x50(%rsp),%xmm1
add    0x1c(%rsp),%eax
mov    0x2c(%rsp),%ecx
sub    %eax,%ecx
imul   %r14d,%ecx
add    %ebx,%ecx
movslq %ecx,%rax
movsd  0x8(%rsp),%xmm3
movapd %xmm3,%xmm0
mulsd  0xd0(%rsp),%xmm0
addsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
mulsd  0x30(%rsp),%xmm3
addsd  0x0(%r13,%rax,8),%xmm3
movsd  %xmm3,0x0(%r13,%rax,8)
add    $0x1,%ebx
add    $0xffffffff,%r15d
jne    14a0 <interp2_table1_real_per_adj+0x380>
jmp    1380 <interp2_table1_real_per_adj+0x260>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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