void interp1_table0_complex_per_adj(double *r_ck, double *i_ck, const int K1,
                                    const double *r_h1, const double *i_h1,
                                    const int J1, const int L1,
                                    const double *p_tm, const int M,
                                    const double *r_fm, const double *i_fm) {
  int mm;
  (void)memset((void *)r_ck, 0, K1 * sizeof(*r_ck));
  (void)memset((void *)i_ck, 0, K1 * sizeof(*i_ck));
  {
    const int ncenter1 = floor(J1 * L1 / 2);
    r_h1 += ncenter1;
    i_h1 += ncenter1;
  }
  for (mm = 0; mm < M; mm++) {
    int jj1;
    const double t1 = *p_tm++;
    const double fmr = *r_fm++;
    const double fmi = *i_fm++;
    int k1 = 1 + floor(t1 - J1 / 2.);
    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)));
      r_ck[k1mod] += coef1r * fmr + coef1i * fmi;
      i_ck[k1mod] += coef1r * fmi - coef1i * fmr;
    }
  }
}


x86 assembly (clang, -O0):
<interp1_table0_complex_per_adj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rdx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rdi
movslq -0x14(%rbp),%rdx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x2c(%rbp),%eax
imul   0x10(%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    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    13c2 <interp1_table0_complex_per_adj+0x2a2>
mov    0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x18(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,0x28(%rbp)
movsd  (%rax),%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)
movsd  -0x40(%rbp),%xmm0
cvtsi2sdl -0x2c(%rbp),%xmm1
movsd  0xdd8(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
call   1040 <floor@plt>
movaps %xmm0,%xmm1
movsd  0xdb8(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x54(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13af <interp1_table0_complex_per_adj+0x28f>
movsd  -0x40(%rbp),%xmm0
cvtsi2sdl -0x54(%rbp),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl 0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xd86(%rip),%xmm0
addsd  -0x60(%rbp),%xmm0
call   1040 <floor@plt>
cvttsd2si %xmm0,%eax
mov    %eax,-0x64(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
cvtsi2sdl -0x54(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
cvtsi2sdl -0x54(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <floor@plt>
movsd  -0x90(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x88(%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,-0x7c(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x7c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x7c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    125a <interp1_table0_complex_per_adj+0x13a>
jmp    13b4 <interp1_table0_complex_per_adj+0x294>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11ca <interp1_table0_complex_per_adj+0xaa>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp1_table0_complex_per_adj>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9d,0xc(%rsp)
mov    %r8,%r13
mov    %rcx,0x10(%rsp)
mov    %edx,%r12d
mov    %rsi,%rbx
mov    %rdi,%rbp
movslq %edx,%r15
shl    $0x3,%r15
xor    %r14d,%r14d
xor    %esi,%esi
mov    %r15,%rdx
call   1030 <memset@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1030 <memset@plt>
cmpl   $0x0,0xe0(%rsp)
jle    1380 <interp1_table0_complex_per_adj+0x260>
mov    0xf0(%rsp),%rax
mov    %rax,0x30(%rsp)
mov    0xe8(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0xd8(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0xd0(%rsp),%eax
cvtsi2sd %eax,%xmm1
mov    0xc(%rsp),%edx
imul   %edx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rax
mov    %r12d,%ecx
mov    0x10(%rsp),%rsi
lea    (%rsi,%rax,8),%r12
lea    0x0(%r13,%rax,8),%r15
cvtsi2sd %edx,%xmm0
mulsd  0xe28(%rip),%xmm0
movsd  %xmm0,0x40(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movapd 0xe23(%rip),%xmm2
movapd %xmm0,0x80(%rsp)
xorpd  %xmm0,%xmm2
movsd  %xmm1,0x38(%rsp)
movapd %xmm2,0x70(%rsp)
jmp    1239 <interp1_table0_complex_per_adj+0x119>
nopl   0x0(%rax,%rax,1)
addq   $0x8,0x20(%rsp)
addq   $0x8,0x28(%rsp)
addq   $0x8,0x30(%rsp)
mov    0x1c(%rsp),%r14d
add    $0x1,%r14d
cmp    0xe0(%rsp),%r14d
je     1380 <interp1_table0_complex_per_adj+0x260>
mov    %r14d,0x1c(%rsp)
cmpl   $0x0,0xc(%rsp)
jle    1210 <interp1_table0_complex_per_adj+0xf0>
mov    0x20(%rsp),%rax
movsd  (%rax),%xmm0
mov    0x28(%rsp),%rax
movsd  (%rax),%xmm3
movsd  %xmm3,0x50(%rsp)
mov    0x30(%rsp),%rax
movsd  (%rax),%xmm3
movsd  %xmm3,0x48(%rsp)
movsd  %xmm0,0x58(%rsp)
subsd  0x40(%rsp),%xmm0
call   1040 <floor@plt>
movsd  0xd7b(%rip),%xmm3
movsd  0x38(%rsp),%xmm1
addsd  0xd75(%rip),%xmm0
cvttsd2si %xmm0,%r13d
mov    0xc(%rsp),%r14d
nopl   (%rax)
xorps  %xmm2,%xmm2
cvtsi2sd %r13d,%xmm2
movsd  %xmm2,0x10(%rsp)
movsd  0x58(%rsp),%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
call   1040 <floor@plt>
cvttsd2si %xmm0,%eax
cltq
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,0x68(%rsp)
movsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,0x60(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  0x80(%rsp),%xmm0
call   1040 <floor@plt>
movsd  0xd01(%rip),%xmm3
movapd 0x70(%rsp),%xmm2
mulsd  %xmm2,%xmm0
addsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%eax
movsd  0x48(%rsp),%xmm5
movapd %xmm5,%xmm0
movsd  0x60(%rsp),%xmm6
mulsd  %xmm6,%xmm0
movsd  0x68(%rsp),%xmm7
movapd %xmm7,%xmm1
movsd  0x50(%rsp),%xmm4
mulsd  %xmm4,%xmm1
addsd  %xmm0,%xmm1
cltq
addsd  0x0(%rbp,%rax,8),%xmm1
movsd  %xmm1,0x0(%rbp,%rax,8)
movsd  0x38(%rsp),%xmm1
mulsd  %xmm4,%xmm6
movapd %xmm7,%xmm0
mulsd  %xmm5,%xmm0
subsd  %xmm6,%xmm0
addsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%r13d
add    $0xffffffff,%r14d
jne    12a0 <interp1_table0_complex_per_adj+0x180>
jmp    1210 <interp1_table0_complex_per_adj+0xf0>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @interp1_table0_complex_per_adj(double* nocapture %0, double* nocapture %1, i32 %2, double* nocapture %3, double* nocapture %4, i32 %5, i32 %6, double* nocapture %7, i32 %8, double* nocapture %9, double* nocapture %10) {
%12 = bitcast double* %0 to i8*
%13 = sext i32 %2 to i64
%14 = shl nsw i64 %13, 3
tail call void @llvm.memset.p0i8.i64(i8* align 1 %12, i8 0, i64 %14, i1 false)
%15 = bitcast double* %1 to i8*
tail call void @llvm.memset.p0i8.i64(i8* align 1 %15, i8 0, i64 %14, i1 false)
%16 = mul nsw i32 %6, %5
%17 = sdiv i32 %16, 2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %3, i64 %18
%20 = getelementptr inbounds double, double* %4, i64 %18
%21 = icmp sgt i32 %8, 0
br i1 %21, label %22, label %81
22: ; preds = %11
%23 = sitofp i32 %5 to double
%24 = fmul double %23, 5.000000e-01
%25 = icmp sgt i32 %5, 0
%26 = sitofp i32 %6 to double
%27 = sitofp i32 %2 to double
%28 = fneg double %27
br label %29
29: ; preds = %22, %78
%30 = phi double* [ %7, %22 ], [ %34, %78 ]
%31 = phi double* [ %9, %22 ], [ %36, %78 ]
%32 = phi double* [ %10, %22 ], [ %38, %78 ]
%33 = phi i32 [ 0, %22 ], [ %79, %78 ]
%34 = getelementptr inbounds double, double* %30, i64 1
%35 = load double, double* %30
%36 = getelementptr inbounds double, double* %31, i64 1
%37 = load double, double* %31
%38 = getelementptr inbounds double, double* %32, i64 1
%39 = load double, double* %32
br i1 %25, label %40, label %78
40: ; preds = %29
%41 = fsub double %35, %24
%42 = tail call double @llvm.floor.f64(double %41)
%43 = fadd double %42, 1.000000e+00
%44 = fptosi double %43 to i32
br label %45
45: ; preds = %40, %45
%46 = phi i32 [ %76, %45 ], [ %44, %40 ]
%47 = phi i32 [ %75, %45 ], [ 0, %40 ]
%48 = sitofp i32 %46 to double
%49 = fsub double %35, %48
%50 = fmul double %49, %26
%51 = fadd double %50, 5.000000e-01
%52 = tail call double @llvm.floor.f64(double %51)
%53 = fptosi double %52 to i32
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %19, i64 %54
%56 = load double, double* %55
%57 = getelementptr inbounds double, double* %20, i64 %54
%58 = load double, double* %57
%59 = fdiv double %48, %27
%60 = tail call double @llvm.floor.f64(double %59)
%61 = tail call double @llvm.fmuladd.f64(double %28, double %60, double %48)
%62 = fptosi double %61 to i32
%63 = fmul double %39, %58
%64 = tail call double @llvm.fmuladd.f64(double %56, double %37, double %63)
%65 = sext i32 %62 to i64
%66 = getelementptr inbounds double, double* %0, i64 %65
%67 = load double, double* %66
%68 = fadd double %67, %64
store double %68, double* %66
%69 = fneg double %58
%70 = fmul double %37, %69
%71 = tail call double @llvm.fmuladd.f64(double %56, double %39, double %70)
%72 = getelementptr inbounds double, double* %1, i64 %65
%73 = load double, double* %72
%74 = fadd double %71, %73
store double %74, double* %72
%75 = add nuw nsw i32 %47, 1
%76 = add nsw i32 %46, 1
%77 = icmp eq i32 %75, %5
br i1 %77, label %78, label %45
78: ; preds = %45, %29
%79 = add nuw nsw i32 %33, 1
%80 = icmp eq i32 %79, %8
br i1 %80, label %81, label %29
81: ; preds = %78, %11
ret void
}