#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_table0_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 + 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;
      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 + 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;
        r_ck[kk] += coef1r * v2r;
        i_ck[kk] += coef1r * v2i;
      }
    }
  }
}


x86 assembly (clang, -O0):
<interp2_table0_real_per_adj>:
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  0xe91(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%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
cvtsi2sd %eax,%xmm0
movsd  0xe59(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%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    14e4 <interp2_table0_real_per_adj+0x3c4>
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  0xd81(%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  0xd58(%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    14d1 <interp2_table0_real_per_adj+0x3b1>
movsd  -0x48(%rbp),%xmm0
cvtsi2sdl -0x68(%rbp),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl 0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xd12(%rip),%xmm0
addsd  -0x70(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <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   1040 <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)
movsd  -0x80(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
mulsd  -0x60(%rbp),%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    14b5 <interp2_table0_real_per_adj+0x395>
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  0xc43(%rip),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1040 <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   1040 <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
movsd  -0x98(%rbp),%xmm2
ff
mov    -0x8(%rbp),%rax
movslq -0xcc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movslq -0xcc(%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    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    138f <interp2_table0_real_per_adj+0x26f>
jmp    14ba <interp2_table0_real_per_adj+0x39a>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    12c6 <interp2_table0_real_per_adj+0x1a6>
jmp    14d6 <interp2_table0_real_per_adj+0x3b6>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1207 <interp2_table0_real_per_adj+0xe7>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp2_table0_real_per_adj>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9,0x8(%rsp)
mov    %r8,0x20(%rsp)
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %rsi,%r13
mov    %rdi,%rbp
mov    0x118(%rsp),%ebx
mov    0x110(%rsp),%eax
imul   0x100(%rsp),%eax
cvtsi2sd %eax,%xmm0
mulsd  0xe97(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %ebx,%ecx
imul   0x108(%rsp),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mov    %eax,(%rsp)
mulsd  0xe72(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,%r14d
mov    %r12d,0x18(%rsp)
mov    %r15d,0x10(%rsp)
imul   %r15d,%r12d
shl    $0x3,%r12d
xor    %ebx,%ebx
mov    %rbp,0xa0(%rsp)
mov    %rbp,%rdi
xor    %esi,%esi
mov    %r12d,%edx
call   1030 <memset@plt>
mov    %r13,0xa8(%rsp)
mov    %r13,%rdi
xor    %esi,%esi
mov    %r12d,%edx
call   1030 <memset@plt>
movsd  0xe20(%rip),%xmm0
cmpl   $0x0,0x128(%rsp)
jle    153b <interp2_table0_real_per_adj+0x41b>
mov    0x138(%rsp),%rcx
mov    0x130(%rsp),%rdx
mov    0x120(%rsp),%rsi
movslq (%rsp),%rax
mov    0x20(%rsp),%rdi
lea    (%rdi,%rax,8),%rax
mov    %rax,0xb8(%rsp)
movslq %r14d,%rax
mov    0x8(%rsp),%rdi
lea    (%rdi,%rax,8),%rax
mov    %rax,0x98(%rsp)
cvtsi2sdl 0x100(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x58(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sdl 0x108(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x50(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x118(%rsp),%xmm0
movsd  %xmm0,0x90(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x10(%rsp),%xmm0
movsd  %xmm0,0x88(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x110(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x18(%rsp),%xmm0
movsd  %xmm0,0xb0(%rsp)
mov    0xa8(%rsp),%rbp
mov    0xa0(%rsp),%r13
jmp    12ef <interp2_table0_real_per_adj+0x1cf>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x60(%rsp),%rsi
add    $0x8,%rsi
mov    0x68(%rsp),%rdx
add    $0x8,%rdx
mov    0x70(%rsp),%rcx
add    $0x8,%rcx
mov    0x2c(%rsp),%ebx
add    $0x1,%ebx
cmp    0x128(%rsp),%ebx
je     153b <interp2_table0_real_per_adj+0x41b>
mov    %ebx,0x2c(%rsp)
mov    0x128(%rsp),%eax
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,0x38(%rsp)
mov    %rsi,0x60(%rsp)
movsd  (%rsi),%xmm0
mov    %rdx,0x68(%rsp)
movsd  (%rdx),%xmm1
movsd  %xmm1,0x80(%rsp)
mov    %rcx,0x70(%rsp)
movsd  (%rcx),%xmm1
movsd  %xmm1,0x78(%rsp)
movsd  %xmm0,0x48(%rsp)
subsd  0x58(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
mov    %eax,0x14(%rsp)
movsd  0x38(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
movsd  0xc9b(%rip),%xmm1
cmpl   $0x0,0x108(%rsp)
jle    12c0 <interp2_table0_real_per_adj+0x1a0>
mov    %eax,%ecx
add    $0x1,%ecx
addl   $0x1,0x14(%rsp)
xor    %edx,%edx
jmp    13b7 <interp2_table0_real_per_adj+0x297>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x30(%rsp),%edx
add    $0x1,%edx
mov    0x1c(%rsp),%ecx
add    $0x1,%ecx
cmp    0x108(%rsp),%edx
movsd  0xc53(%rip),%xmm1
mov    0x34(%rsp),%eax
je     12c0 <interp2_table0_real_per_adj+0x1a0>
mov    %ecx,0x1c(%rsp)
mov    %edx,0x30(%rsp)
add    $0x1,%eax
mov    %eax,0x34(%rsp)
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0x38(%rsp),%xmm0
subsd  %xmm2,%xmm0
mulsd  0x90(%rsp),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
cltq
mov    0x98(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0x88(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
cmpl   $0x0,0x100(%rsp)
mov    0x18(%rsp),%ebx
movsd  0x40(%rsp),%xmm1
movsd  0x48(%rsp),%xmm2
jle    1390 <interp2_table0_real_per_adj+0x270>
mov    %eax,%r14d
imul   0x10(%rsp),%r14d
movsd  0x80(%rsp),%xmm3
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm3
movsd  %xmm3,0xc0(%rsp)
mulsd  0x78(%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    0x100(%rsp),%r15d
mov    0x14(%rsp),%r12d
nopl   0x0(%rax)
xorps  %xmm3,%xmm3
cvtsi2sd %r12d,%xmm3
movsd  %xmm3,0x20(%rsp)
movapd %xmm2,%xmm0
subsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
addsd  0xb5e(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
cltq
mov    0xb8(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
divsd  0xb0(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <floor@plt>
movsd  0x48(%rsp),%xmm2
movsd  0x40(%rsp),%xmm1
add    %r14d,%eax
mov    0x1c(%rsp),%ecx
sub    %eax,%ecx
imul   %ebx,%ecx
add    %r12d,%ecx
movslq %ecx,%rax
movsd  0x8(%rsp),%xmm3
movapd %xmm3,%xmm0
mulsd  0xc0(%rsp),%xmm0
addsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
mulsd  (%rsp),%xmm3
addsd  0x0(%rbp,%rax,8),%xmm3
movsd  %xmm3,0x0(%rbp,%rax,8)
add    $0x1,%r12d
add    $0xffffffff,%r15d
jne    1480 <interp2_table0_real_per_adj+0x360>
jmp    1390 <interp2_table0_real_per_adj+0x270>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @interp2_table0_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 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
%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 = %237, %14
%96 = load i32, i32* %29
%97 = load i32, i32* %26
%98 = icmp slt i32 %96, %97
br i1 %98, label %99, label %240
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 = %231, %99
%131 = load i32, i32* %33
%132 = load i32, i32* %22
%133 = icmp slt i32 %131, %132
br i1 %133, label %134, label %236
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 = fadd double %142, 5.000000e-01
%144 = fptosi double %143 to i32
%145 = call i32 @floor(i32 %144)
store i32 %145, i32* %41
%146 = load double*, double** %20
%147 = load i32, i32* %41
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %146, i64 %148
%150 = load double, double* %149
store double %150, double* %42
%151 = load i32, i32* %39
%152 = sitofp i32 %151 to double
%153 = load i32, i32* %18
%154 = sitofp i32 %153 to double
%155 = fdiv double %152, %154
%156 = fptosi double %155 to i32
%157 = call i32 @floor(i32 %156)
store i32 %157, i32* %43
%158 = load i32, i32* %39
%159 = load i32, i32* %18
%160 = load i32, i32* %43
%161 = mul nsw i32 %159, %160
%162 = sub nsw i32 %158, %161
store i32 %162, i32* %44
%163 = load i32, i32* %44
%164 = load i32, i32* %17
%165 = mul nsw i32 %163, %164
store i32 %165, i32* %45
%166 = load double, double* %42
%167 = load double, double* %36
%168 = fmul double %166, %167
store double %168, double* %46
%169 = load double, double* %42
%170 = load double, double* %37
%171 = fmul double %169, %170
store double %171, double* %47
%172 = load i32, i32* %38
store i32 %172, i32* %48
store i32 0, i32* %32
br label %173
173: ; preds = %225, %134
%174 = load i32, i32* %32
%175 = load i32, i32* %21
%176 = icmp slt i32 %174, %175
br i1 %176, label %177, label %230
177: ; preds = %173
%178 = load double, double* %35
%179 = load i32, i32* %48
%180 = sitofp i32 %179 to double
%181 = fsub double %178, %180
%182 = load i32, i32* %23
%183 = sitofp i32 %182 to double
%184 = fmul double %181, %183
store double %184, double* %49
%185 = load double, double* %49
%186 = fadd double %185, 5.000000e-01
%187 = fptosi double %186 to i32
%188 = call i32 @floor(i32 %187)
store i32 %188, i32* %50
%189 = load double*, double** %19
%190 = load i32, i32* %50
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds double, double* %189, i64 %191
%193 = load double, double* %192
store double %193, double* %51
%194 = load i32, i32* %48
%195 = sitofp i32 %194 to double
%196 = load i32, i32* %17
%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* %52
%201 = load i32, i32* %48
%202 = load i32, i32* %17
%203 = load i32, i32* %52
%204 = mul nsw i32 %202, %203
%205 = sub nsw i32 %201, %204
store i32 %205, i32* %53
%206 = load i32, i32* %45
%207 = load i32, i32* %53
%208 = add nsw i32 %206, %207
store i32 %208, i32* %54
%209 = load double, double* %51
%210 = load double, double* %46
%211 = load double*, double** %15
%212 = load i32, i32* %54
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds double, double* %211, i64 %213
%215 = load double, double* %214
%216 = call double @llvm.fmuladd.f64(double %209, double %210, double %215)
store double %216, double* %214
%217 = load double, double* %51
%218 = load double, double* %47
%219 = load double*, double** %16
%220 = load i32, i32* %54
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds double, double* %219, i64 %221
%223 = load double, double* %222
%224 = call double @llvm.fmuladd.f64(double %217, double %218, double %223)
store double %224, double* %222
br label %225
225: ; preds = %177
%226 = load i32, i32* %32
%227 = add nsw i32 %226, 1
store i32 %227, i32* %32
%228 = load i32, i32* %48
%229 = add nsw i32 %228, 1
store i32 %229, i32* %48
br label %173
230: ; preds = %173
br label %231
231: ; preds = %230
%232 = load i32, i32* %33
%233 = add nsw i32 %232, 1
store i32 %233, i32* %33
%234 = load i32, i32* %39
%235 = add nsw i32 %234, 1
store i32 %235, i32* %39
br label %130
236: ; preds = %130
br label %237
237: ; preds = %236
%238 = load i32, i32* %29
%239 = add nsw i32 %238, 1
store i32 %239, i32* %29
br label %95
240: ; preds = %95
ret void
}

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