void interp2_table0_complex_per_adj(double *r_ck, double *i_ck, const int K1,
                                    const int K2, const double *r_h1,
                                    const double *i_h1, const double *r_h2,
                                    const double *i_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;
    i_h1 += ncenter1;
  }
  {
    const int ncenter2 = floor(J2 * L2 / 2);
    r_h2 += ncenter2;
    i_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 + 0.5);
      const double coef2r = r_h2[n2];
      const double coef2i = i_h2[n2];
      const int k2mod = ((k2) - (K2)*floor((k2) / (double)(K2)));
      const int k12mod = k2mod * K1;
      const double v2r = coef2r * fmr + coef2i * fmi;
      const double v2i = coef2r * fmi - coef2i * fmr;
      int k1 = koff1;
      for (jj1 = 0; jj1 < J1; jj1++, k1++) {
        const double p1 = (t1 - k1) * L1;
        const int n1 = floor(p1 + 0.5);
        register const double coef1r = r_h1[n1];
        register const double coef1i = i_h1[n1];
        const int k1mod = ((k1) - (K1)*floor((k1) / (double)(K1)));
        const int kk = k12mod + k1mod;
        r_ck[kk] += coef1r * v2r + coef1i * v2i;
        i_ck[kk] += coef1r * v2i - coef1i * v2r;
      }
    }
  }
}


x86 assembly (clang, -O0):
<interp2_table0_complex_per_adj>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%rax
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    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    0x20(%rbp),%eax
imul   0x30(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
call   1040 <floor@plt>
cvttsd2si %xmm0,%eax
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    -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   0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
call   1040 <floor@plt>
cvttsd2si %xmm0,%eax
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    -0x34(%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
movslq %eax,%rdx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
movslq %eax,%rdx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    0x48(%rbp),%eax
jge    1637 <interp2_table0_complex_per_adj+0x517>
mov    0x40(%rbp),%rax
movslq 0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x40(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x50(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x50(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x58(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x58(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl 0x20(%rbp),%xmm1
movsd  0xd61(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
call   1040 <floor@plt>
movaps %xmm0,%xmm1
movsd  0xd41(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x64(%rbp)
movsd  -0x48(%rbp),%xmm0
cvtsi2sdl 0x28(%rbp),%xmm1
movsd  0xd2c(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
call   1040 <floor@plt>
movaps %xmm0,%xmm1
movsd  0xd0c(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x68(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    1624 <interp2_table0_complex_per_adj+0x504>
movsd  -0x48(%rbp),%xmm0
cvtsi2sdl -0x68(%rbp),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl 0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xcda(%rip),%xmm0
addsd  -0x70(%rbp),%xmm0
call   1040 <floor@plt>
cvttsd2si %xmm0,%eax
mov    %eax,-0x74(%rbp)
mov    0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
cvtsi2sdl -0x68(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
cvtsi2sdl -0x18(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
cvtsi2sdl -0x68(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <floor@plt>
movsd  -0xe0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x90(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  -0x58(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x64(%rbp),%eax
mov    %eax,-0xa4(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1608 <interp2_table0_complex_per_adj+0x4e8>
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0xa4(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
cvtsi2sdl 0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xb7e(%rip),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
call   1040 <floor@plt>
cvttsd2si %xmm0,%eax
mov    %eax,-0xb4(%rbp)
mov    -0x20(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x28(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
cvtsi2sdl -0xa4(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
cvtsi2sdl -0xa4(%rbp),%xmm0
ff
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <floor@plt>
movsd  -0xf0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xe8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xcc(%rbp)
mov    -0x90(%rbp),%eax
add    -0xcc(%rbp),%eax
mov    %eax,-0xd0(%rbp)
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xc8(%rbp),%xmm1
ff
mulsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0xd0(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0xc8(%rbp),%xmm1
ff
mulsd  -0x98(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0xd0(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    145c <interp2_table0_complex_per_adj+0x33c>
jmp    160d <interp2_table0_complex_per_adj+0x4ed>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1306 <interp2_table0_complex_per_adj+0x1e6>
jmp    1629 <interp2_table0_complex_per_adj+0x509>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    122f <interp2_table0_complex_per_adj+0x10f>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp2_table0_complex_per_adj>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    %r9,%r15
mov    %r8,%r13
mov    %ecx,%ebp
mov    %rsi,%rbx
mov    %ecx,%eax
mov    %edx,0x14(%rsp)
imul   %edx,%eax
movslq %eax,%r12
shl    $0x3,%r12
xor    %r14d,%r14d
mov    %rdi,0x98(%rsp)
xor    %esi,%esi
mov    %r12,%rdx
call   1030 <memset@plt>
mov    %rbx,0xa0(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r12,%rdx
call   1030 <memset@plt>
cmpl   $0x0,0x188(%rsp)
jle    15bc <interp2_table0_complex_per_adj+0x49c>
mov    0x198(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0x190(%rsp),%rax
mov    %rax,0x30(%rsp)
mov    0x180(%rsp),%rsi
mov    0x178(%rsp),%eax
mov    0x170(%rsp),%ecx
mov    0x168(%rsp),%r8d
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x48(%rsp)
mov    0x160(%rsp),%edi
imul   %edi,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
add    %ecx,%edx
sar    %edx
movslq %edx,%rcx
lea    0x0(,%rcx,8),%rdx
add    %r13,%rdx
mov    %rdx,0xb0(%rsp)
lea    (%r15,%rcx,8),%rcx
mov    %rcx,0x88(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x90(%rsp)
imul   %r8d,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rax
shl    $0x3,%rax
mov    0x150(%rsp),%rcx
add    %rax,%rcx
mov    %rcx,0x68(%rsp)
add    0x158(%rsp),%rax
mov    %rax,0x70(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
movsd  0xdb5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x60(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r8d,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x58(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movapd 0xd9a(%rip),%xmm1
movapd %xmm0,0xe0(%rsp)
xorpd  %xmm1,%xmm0
movapd %xmm0,0xd0(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x14(%rsp),%xmm0
movapd %xmm0,0xf0(%rsp)
xorpd  %xmm0,%xmm1
movapd %xmm1,0x100(%rsp)
mov    0x88(%rsp),%rbx
mov    0xa0(%rsp),%rbp
mov    0x98(%rsp),%r12
jmp    12fc <interp2_table0_complex_per_adj+0x1dc>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x40(%rsp),%rsi
add    $0x8,%rsi
addq   $0x8,0x30(%rsp)
addq   $0x8,0x38(%rsp)
mov    0x20(%rsp),%r14d
add    $0x1,%r14d
cmp    0x188(%rsp),%r14d
je     15bc <interp2_table0_complex_per_adj+0x49c>
mov    %r14d,0x20(%rsp)
mov    %rsi,0x40(%rsp)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x50(%rsp)
subsd  0x60(%rsp),%xmm0
call   1040 <floor@plt>
addsd  0xce5(%rip),%xmm0
cmpl   $0x0,0x168(%rsp)
jle    12d0 <interp2_table0_complex_per_adj+0x1b0>
mov    0x40(%rsp),%rax
mov    0x188(%rsp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    0x30(%rsp),%rax
movsd  (%rax),%xmm2
movsd  %xmm2,0x80(%rsp)
mov    0x38(%rsp),%rax
movsd  (%rax),%xmm2
movsd  %xmm2,0x78(%rsp)
cvttsd2si %xmm0,%eax
mov    %eax,0x24(%rsp)
movsd  %xmm1,0xa8(%rsp)
movapd %xmm1,%xmm0
subsd  0x58(%rsp),%xmm0
call   1040 <floor@plt>
movsd  0xc79(%rip),%xmm1
addsd  0xc79(%rip),%xmm0
cvttsd2si %xmm0,%eax
xor    %ecx,%ecx
jmp    13c3 <interp2_table0_complex_per_adj+0x2a3>
nopw   0x0(%rax,%rax,1)
mov    0x28(%rsp),%ecx
add    $0x1,%ecx
mov    0x2c(%rsp),%eax
add    $0x1,%eax
cmp    0x168(%rsp),%ecx
movsd  0xc43(%rip),%xmm1
je     12d0 <interp2_table0_complex_per_adj+0x1b0>
mov    %ecx,0x28(%rsp)
mov    %eax,0x2c(%rsp)
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0xa8(%rsp),%xmm0
subsd  %xmm2,%xmm0
mulsd  0x90(%rsp),%xmm0
addsd  %xmm1,%xmm0
call   1040 <floor@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0xe0(%rsp),%xmm0
call   1040 <floor@plt>
cmpl   $0x0,0x160(%rsp)
movsd  0x48(%rsp),%xmm9
movsd  0x50(%rsp),%xmm6
jle    13a0 <interp2_table0_complex_per_adj+0x280>
mulsd  0xd0(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%r13d
imul   0x14(%rsp),%r13d
cvttsd2si 0x18(%rsp),%eax
cltq
mov    0x68(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm7
mov    0x70(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  0x78(%rsp),%xmm8
movapd %xmm8,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm7,%xmm3
movsd  0x80(%rsp),%xmm2
mulsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,0xb8(%rsp)
mulsd  %xmm2,%xmm0
mulsd  %xmm8,%xmm7
subsd  %xmm0,%xmm7
movsd  %xmm7,0xc0(%rsp)
mov    0x160(%rsp),%r14d
mov    0x24(%rsp),%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm1,%xmm1
cvtsi2sd %r15d,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm6,%xmm0
subsd  %xmm1,%xmm0
mulsd  %xmm9,%xmm0
addsd  0xb1d(%rip),%xmm0
call   1040 <floor@plt>
cvttsd2si %xmm0,%eax
cltq
mov    0xb0(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,0xc8(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0xf0(%rsp),%xmm0
call   1040 <floor@plt>
movsd  0x50(%rsp),%xmm6
movapd 0x100(%rsp),%xmm5
movsd  0x48(%rsp),%xmm9
mulsd  %xmm5,%xmm0
addsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%eax
add    %r13d,%eax
movsd  0xc0(%rsp),%xmm2
movapd %xmm2,%xmm0
movsd  0xc8(%rsp),%xmm7
mulsd  %xmm7,%xmm0
movsd  0x18(%rsp),%xmm4
movapd %xmm4,%xmm1
movsd  0xb8(%rsp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm0,%xmm1
cltq
addsd  (%r12,%rax,8),%xmm1
movsd  %xmm1,(%r12,%rax,8)
mulsd  %xmm3,%xmm7
movapd %xmm4,%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm7,%xmm0
addsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
add    $0x1,%r15d
add    $0xffffffff,%r14d
jne    14c0 <interp2_table0_complex_per_adj+0x3a0>
jmp    13a0 <interp2_table0_complex_per_adj+0x280>
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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