#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 interp3_table0_real_per_adj(double *r_ck, double *i_ck, const int K1,
                                 const int K2, const int K3, const double *r_h1,
                                 const double *r_h2, const double *r_h3,
                                 const int J1, const int J2, const int J3,
                                 const int L1, const int L2, const int L3,
                                 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;
  }
  {
    const int ncenter3 = floor(J3 * L3 / 2);
    r_h3 += ncenter3;
  }
  (void)memset((void *)r_ck, 0, K1 * K2 * K3 * sizeof(*r_ck));
  (void)memset((void *)i_ck, 0, K1 * K2 * K3 * sizeof(*i_ck));
  for (mm = 0; mm < M; mm++) {
    int jj1, jj2, jj3;
    const double t3 = p_tm[2 * M];
    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.);
    const int koff2 = 1 + floor(t2 - J2 / 2.);
    int k3 = 1 + floor(t3 - J3 / 2.);
    for (jj3 = 0; jj3 < J3; jj3++, k3++) {
      const double p3 = (t3 - k3) * L3;
      const int n3 = floor(p3 + 0.5);
      double coef3r = r_h3[n3];
      const int wrap3 = floor(k3 / (double)K3);
      const int k3mod = k3 - K3 * wrap3;
      const double v3r = coef3r * fmr;
      const double v3i = coef3r * fmi;
      int k2 = koff2;
      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 k23mod = (k3mod * K2 + k2mod) * K1;
        const double v2r = coef2r * v3r;
        const double v2i = coef2r * v3i;
        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 = k23mod + k1mod;
          r_ck[kk] += coef1r * v2r;
          i_ck[kk] += coef1r * v2i;
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<interp3_table0_real_per_adj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    0x20(%rbp),%eax
imul   0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    0x28(%rbp),%eax
imul   0x40(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
mov    0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,0x10(%rbp)
mov    0x30(%rbp),%eax
imul   0x48(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%ecx
mov    0x18(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
imul   -0x1c(%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
imul   -0x1c(%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    0x58(%rbp),%eax
jge    1672 <interp3_table0_real_per_adj+0x552>
mov    0x50(%rbp),%rax
mov    0x58(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x50(%rbp),%rax
movslq 0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x50(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x50(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x60(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x60(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x68(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x68(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
cvtsi2sdl 0x20(%rbp),%xmm1
movsd  0xd3a(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
movsd  -0x58(%rbp),%xmm0
cvtsi2sdl 0x28(%rbp),%xmm1
movsd  0xd11(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl 0x30(%rbp),%xmm1
movsd  0xce8(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    0x30(%rbp),%eax
jge    165f <interp3_table0_real_per_adj+0x53f>
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0x7c(%rbp),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl 0x48(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xc9f(%rip),%xmm0
addsd  -0x88(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,-0x8c(%rbp)
mov    0x18(%rbp),%rax
movslq -0x8c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdl -0x7c(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x7c(%rbp),%eax
mov    -0x1c(%rbp),%ecx
imul   -0x9c(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xa0(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x78(%rbp),%eax
mov    %eax,-0xb4(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    1643 <interp3_table0_real_per_adj+0x523>
movsd  -0x58(%rbp),%xmm0
cvtsi2sdl -0xb4(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
cvtsi2sdl 0x40(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xbce(%rip),%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,-0xc4(%rbp)
mov    0x10(%rbp),%rax
movslq -0xc4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
cvtsi2sdl -0xb4(%rbp),%xmm0
ff
cvtsi2sdl -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,-0xd4(%rbp)
mov    -0xb4(%rbp),%eax
mov    -0x18(%rbp),%ecx
imul   -0xd4(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xd8(%rbp)
mov    -0xa0(%rbp),%eax
imul   -0x18(%rbp),%eax
add    -0xd8(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0xdc(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x74(%rbp),%eax
mov    %eax,-0xf4(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1621 <interp3_table0_real_per_adj+0x501>
movsd  -0x60(%rbp),%xmm0
cvtsi2sdl -0xf4(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
cvtsi2sdl 0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  0xad7(%rip),%xmm0
addsd  -0x100(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,-0x104(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x104(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
cvtsi2sdl -0xf4(%rbp),%xmm0
ff
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,-0x114(%rbp)
mov    -0xf4(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x114(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x118(%rbp)
mov    -0xdc(%rbp),%eax
add    -0x118(%rbp),%eax
mov    %eax,-0x11c(%rbp)
movsd  -0x110(%rbp),%xmm0
ff
movsd  -0xe8(%rbp),%xmm2
ff
mov    -0x8(%rbp),%rax
movslq -0x11c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x110(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movslq -0x11c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    14fb <interp3_table0_real_per_adj+0x3db>
jmp    1626 <interp3_table0_real_per_adj+0x506>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1404 <interp3_table0_real_per_adj+0x2e4>
jmp    1648 <interp3_table0_real_per_adj+0x528>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1336 <interp3_table0_real_per_adj+0x216>
jmp    1664 <interp3_table0_real_per_adj+0x544>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1237 <interp3_table0_real_per_adj+0x117>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp3_table0_real_per_adj>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
mov    %r9,0x8(%rsp)
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%r14d
mov    %rsi,%r13
mov    %rdi,%rbx
mov    0x1a0(%rsp),%ebp
mov    0x198(%rsp),%eax
imul   0x180(%rsp),%eax
mov    %eax,%edi
shr    $0x1f,%edi
add    %eax,%edi
sar    %edi
call   1040 <floor@plt>
mov    %eax,0x50(%rsp)
mov    %ebp,%eax
mov    0x1a8(%rsp),%ebp
imul   0x188(%rsp),%eax
mov    %eax,%edi
shr    $0x1f,%edi
add    %eax,%edi
sar    %edi
call   1040 <floor@plt>
mov    %eax,0x18(%rsp)
mov    %ebp,%eax
imul   0x190(%rsp),%eax
mov    %eax,%edi
shr    $0x1f,%edi
add    %eax,%edi
sar    %edi
call   1040 <floor@plt>
mov    %eax,0x40(%rsp)
mov    %r14d,0x38(%rsp)
mov    %r12d,0x2c(%rsp)
imul   %r12d,%r14d
mov    %r15d,0x24(%rsp)
imul   %r15d,%r14d
shl    $0x3,%r14d
xor    %r15d,%r15d
mov    %rbx,0x110(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14d,%edx
call   1030 <memset@plt>
mov    %r13,0x118(%rsp)
mov    %r13,%rdi
xor    %esi,%esi
mov    %r14d,%edx
call   1030 <memset@plt>
mov    0x1b8(%rsp),%eax
test   %eax,%eax
jle    1727 <interp3_table0_real_per_adj+0x607>
mov    0x1c8(%rsp),%rdx
movslq 0x50(%rsp),%rax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mov    %rax,0x128(%rsp)
mov    0x1c0(%rsp),%rsi
movslq 0x18(%rsp),%rax
shl    $0x3,%rax
add    0x170(%rsp),%rax
mov    %rax,0x108(%rsp)
movslq 0x40(%rsp),%rax
shl    $0x3,%rax
add    0x178(%rsp),%rax
mov    %rax,0xe8(%rsp)
cvtsi2sd %ebp,%xmm0
movsd  %xmm0,0xe0(%rsp)
mov    0x1b0(%rsp),%rdi
xorps  %xmm0,%xmm0
cvtsi2sdl 0x1a0(%rsp),%xmm0
movsd  %xmm0,0x100(%rsp)
mov    0x1b8(%rsp),%eax
mov    %rax,%rcx
add    %eax,%eax
cltq
mov    %rax,0xa8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x198(%rsp),%xmm0
movsd  %xmm0,0x80(%rsp)
mov    %ecx,%eax
mov    %rax,0xa0(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x180(%rsp),%xmm0
movsd  0xd32(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x98(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x188(%rsp),%xmm0
cvtsi2sdl 0x190(%rsp),%xmm2
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x90(%rsp)
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x88(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x24(%rsp),%xmm0
movsd  %xmm0,0xd8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x2c(%rsp),%xmm0
movsd  %xmm0,0xf8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x38(%rsp),%xmm0
movsd  %xmm0,0x120(%rsp)
mov    0x38(%rsp),%ebp
mov    0x118(%rsp),%rbx
jmp    138d <interp3_table0_real_per_adj+0x26d>
xchg   %ax,%ax
mov    0xb0(%rsp),%rdi
add    $0x8,%rdi
mov    0xb8(%rsp),%rsi
add    $0x8,%rsi
mov    0xc0(%rsp),%rdx
add    $0x8,%rdx
mov    0x58(%rsp),%r15d
add    $0x1,%r15d
mov    0x1b8(%rsp),%eax
cmp    %eax,%r15d
je     1727 <interp3_table0_real_per_adj+0x607>
mov    %r15d,0x58(%rsp)
mov    0xa8(%rsp),%rax
movsd  (%rdi,%rax,8),%xmm0
movsd  %xmm0,0x70(%rsp)
mov    0xa0(%rsp),%rax
movsd  (%rdi,%rax,8),%xmm0
movsd  %xmm0,0x78(%rsp)
mov    %rdi,0xb0(%rsp)
movsd  (%rdi),%xmm0
mov    %rsi,0xb8(%rsp)
movsd  (%rsi),%xmm1
movsd  %xmm1,0xd0(%rsp)
mov    %rdx,0xc0(%rsp)
movsd  (%rdx),%xmm1
movsd  %xmm1,0xc8(%rsp)
movsd  %xmm0,0x40(%rsp)
subsd  0x98(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,0x30(%rsp)
movsd  0x78(%rsp),%xmm0
subsd  0x90(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,0x28(%rsp)
movsd  0x70(%rsp),%xmm0
subsd  0x88(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
movsd  0xbba(%rip),%xmm1
cmpl   $0x0,0x190(%rsp)
jle    1350 <interp3_table0_real_per_adj+0x230>
mov    0x28(%rsp),%ecx
add    $0x1,%ecx
mov    %ecx,0x5c(%rsp)
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x34(%rsp)
addl   $0x1,0x30(%rsp)
xor    %ecx,%ecx
jmp    149d <interp3_table0_real_per_adj+0x37d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x60(%rsp),%ecx
add    $0x1,%ecx
addl   $0x1,0x34(%rsp)
cmp    0x190(%rsp),%ecx
mov    0x64(%rsp),%eax
je     1350 <interp3_table0_real_per_adj+0x230>
mov    %ecx,0x60(%rsp)
add    $0x1,%eax
mov    %eax,0x64(%rsp)
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0x70(%rsp),%xmm0
subsd  %xmm2,%xmm0
mulsd  0xe0(%rsp),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
cltq
mov    0xe8(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x48(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0xd8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
movsd  0xaf6(%rip),%xmm1
mov    %eax,0x14(%rsp)
cmpl   $0x0,0x188(%rsp)
jle    1480 <interp3_table0_real_per_adj+0x360>
mov    0x14(%rsp),%eax
imul   0x24(%rsp),%eax
mov    %eax,0x14(%rsp)
movsd  0xd0(%rsp),%xmm2
movsd  0x48(%rsp),%xmm0
mulsd  %xmm0,%xmm2
movsd  %xmm2,0xf0(%rsp)
mulsd  0xc8(%rsp),%xmm0
movsd  %xmm0,0x48(%rsp)
xor    %eax,%eax
mov    0x5c(%rsp),%ecx
mov    %ecx,0x3c(%rsp)
mov    0x28(%rsp),%ecx
jmp    1595 <interp3_table0_real_per_adj+0x475>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x6c(%rsp),%eax
add    $0x1,%eax
addl   $0x1,0x3c(%rsp)
cmp    0x188(%rsp),%eax
movsd  0xa75(%rip),%xmm1
mov    0x68(%rsp),%ecx
je     1480 <interp3_table0_real_per_adj+0x360>
mov    %eax,0x6c(%rsp)
add    $0x1,%ecx
mov    %ecx,0x68(%rsp)
xorps  %xmm2,%xmm2
cvtsi2sd %ecx,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0x78(%rsp),%xmm0
subsd  %xmm2,%xmm0
mulsd  0x100(%rsp),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
cltq
mov    0x108(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0xf8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
cmpl   $0x0,0x180(%rsp)
mov    0x110(%rsp),%r15
movsd  0x80(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
jle    1570 <interp3_table0_real_per_adj+0x450>
add    0x14(%rsp),%eax
movsd  0xf0(%rsp),%xmm3
movsd  0x18(%rsp),%xmm0
mulsd  %xmm0,%xmm3
movsd  %xmm3,0x130(%rsp)
mulsd  0x48(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    0x34(%rsp),%r14d
sub    %eax,%r14d
imul   0x2c(%rsp),%r14d
add    0x3c(%rsp),%r14d
mov    0x180(%rsp),%r13d
mov    0x30(%rsp),%r12d
nopl   0x0(%rax,%rax,1)
xorps  %xmm3,%xmm3
cvtsi2sd %r12d,%xmm3
movsd  %xmm3,0x50(%rsp)
movapd %xmm2,%xmm0
subsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x96e(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
cltq
mov    0x128(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x50(%rsp),%xmm0
divsd  0x120(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
movsd  0x40(%rsp),%xmm2
movsd  0x80(%rsp),%xmm1
mov    %r14d,%ecx
sub    %eax,%ecx
imul   %ebp,%ecx
add    %r12d,%ecx
movslq %ecx,%rax
movsd  0x8(%rsp),%xmm3
movapd %xmm3,%xmm0
mulsd  0x130(%rsp),%xmm0
addsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,(%r15,%rax,8)
mulsd  0x18(%rsp),%xmm3
addsd  (%rbx,%rax,8),%xmm3
movsd  %xmm3,(%rbx,%rax,8)
add    $0x1,%r12d
add    $0xffffffff,%r13d
jne    1670 <interp3_table0_real_per_adj+0x550>
jmp    1570 <interp3_table0_real_per_adj+0x450>
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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