void create_syn_filter(filter) double filter[64][32];
{
  register int i, k;
  for (i = 0; i < 64; i++)
    for (k = 0; k < 32; k++) {
      if ((filter[i][k] = 1e9 * cos((double)((3.14159265358979 / 64 * i +
                                              3.14159265358979 / 4) *
                                             (2 * k + 1)))) >= 0)
        modf(filter[i][k] + 0.5, &filter[i][k]);
      else
        modf(filter[i][k] - 0.5, &filter[i][k]);
      filter[i][k] *= 1e-9;
    }
}


x86 assembly (clang, -O0):
<create_syn_filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1282 <create_syn_filter+0x162>
movl   $0x0,-0x10(%rbp)
cmpl   $0x20,-0x10(%rbp)
jge    126f <create_syn_filter+0x14f>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xead(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea9(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xe74(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11f9 <create_syn_filter+0xd9>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsd  0xe48(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x8,%rax
add    %rax,%rdi
movslq -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <modf@plt>
jmp    123c <create_syn_filter+0x11c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xdff(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x8,%rax
add    %rax,%rdi
movslq -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <modf@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsd  0xdc9(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <create_syn_filter+0x24>
jmp    1274 <create_syn_filter+0x154>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <create_syn_filter+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_syn_filter>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
xor    %r15d,%r15d
lea    0xeee(%rip),%r12
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
mulsd  0xeb0(%rip),%xmm0
addsd  0xeb0(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0xffffffffffffffc0,%r13
mov    %r14,%rbx
nopl   0x0(%rax,%rax,1)
lea    0x41(%r13),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0xe82(%rip),%xmm0
xor    %eax,%eax
ucomisd 0xe88(%rip),%xmm0
setb   %al
movsd  %xmm0,(%rbx)
addsd  (%r12,%rax,8),%xmm0
mov    %rbx,%rdi
call   1030 <modf@plt>
movsd  0xe63(%rip),%xmm1
movsd  (%rbx),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx)
add    $0x8,%rbx
add    $0x2,%r13
jne    1170 <create_syn_filter+0x50>
add    $0x1,%r15
add    $0x100,%r14
cmp    $0x40,%r15
jne    1140 <create_syn_filter+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @create_syn_filter([32 x double]* %0) {
%2 = alloca [32 x double]*
%3 = alloca i32
%4 = alloca i32
store [32 x double]* %0, [32 x double]** %2
store i32 0, i32* %3
br label %5
5: ; preds = %81, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 64
br i1 %7, label %8, label %84
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %77, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 32
br i1 %11, label %12, label %80
12: ; preds = %9
%13 = load i32, i32* %3
%14 = sitofp i32 %13 to double
%15 = call double @llvm.fmuladd.f64(double 0x3FA921FB54442D11, double %14, double 0x3FE921FB54442D11)
%16 = load i32, i32* %4
%17 = mul nsw i32 2, %16
%18 = add nsw i32 %17, 1
%19 = sitofp i32 %18 to double
%20 = fmul double %15, %19
%21 = call double @cos(double %20)
%22 = fmul double 1.000000e+09, %21
%23 = load [32 x double]*, [32 x double]** %2
%24 = load i32, i32* %3
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [32 x double], [32 x double]* %23, i64 %25
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [32 x double], [32 x double]* %26, i64 0, i64 %28
store double %22, double* %29
%30 = fcmp oge double %22, 0.000000e+00
br i1 %30, label %31, label %49
31: ; preds = %12
%32 = load [32 x double]*, [32 x double]** %2
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [32 x double], [32 x double]* %32, i64 %34
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [32 x double], [32 x double]* %35, i64 0, i64 %37
%39 = load double, double* %38
%40 = fadd double %39, 5.000000e-01
%41 = load [32 x double]*, [32 x double]** %2
%42 = load i32, i32* %3
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [32 x double], [32 x double]* %41, i64 %43
%45 = load i32, i32* %4
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [32 x double], [32 x double]* %44, i64 0, i64 %46
%48 = call double @modf(double %40, double* %47)
br label %67
49: ; preds = %12
%50 = load [32 x double]*, [32 x double]** %2
%51 = load i32, i32* %3
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [32 x double], [32 x double]* %50, i64 %52
%54 = load i32, i32* %4
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [32 x double], [32 x double]* %53, i64 0, i64 %55
%57 = load double, double* %56
%58 = fsub double %57, 5.000000e-01
%59 = load [32 x double]*, [32 x double]** %2
%60 = load i32, i32* %3
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [32 x double], [32 x double]* %59, i64 %61
%63 = load i32, i32* %4
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [32 x double], [32 x double]* %62, i64 0, i64 %64
%66 = call double @modf(double %58, double* %65)
br label %67
67: ; preds = %49, %31
%68 = load [32 x double]*, [32 x double]** %2
%69 = load i32, i32* %3
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [32 x double], [32 x double]* %68, i64 %70
%72 = load i32, i32* %4
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [32 x double], [32 x double]* %71, i64 0, i64 %73
%75 = load double, double* %74
%76 = fmul double %75, 1.000000e-09
store double %76, double* %74
br label %77
77: ; preds = %67
%78 = load i32, i32* %4
%79 = add nsw i32 %78, 1
store i32 %79, i32* %4
br label %9
80: ; preds = %9
br label %81
81: ; preds = %80
%82 = load i32, i32* %3
%83 = add nsw i32 %82, 1
store i32 %83, i32* %3
br label %5
84: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @create_syn_filter([32 x double]* nocapture %0) {
br label %2
2: ; preds = %1, %25
%3 = phi i64 [ 0, %1 ], [ %26, %25 ]
%4 = trunc i64 %3 to i32
%5 = sitofp i32 %4 to double
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x3FA921FB54442D11, double 0x3FE921FB54442D11)
br label %7
7: ; preds = %2, %7
%8 = phi i64 [ 0, %2 ], [ %23, %7 ]
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 1
%11 = or i32 %10, 1
%12 = sitofp i32 %11 to double
%13 = fmul double %6, %12
%14 = tail call double @cos(double %13)
%15 = fmul double %14, 1.000000e+09
%16 = getelementptr inbounds [32 x double], [32 x double]* %0, i64 %3, i64 %8
store double %15, double* %16
%17 = fcmp ult double %15, 0.000000e+00
%18 = select i1 %17, double -5.000000e-01, double 5.000000e-01
%19 = fadd double %15, %18
%20 = tail call double @modf(double %19, double* %16)
%21 = load double, double* %16
%22 = fmul double %21, 1.000000e-09
store double %22, double* %16
%23 = add nuw nsw i64 %8, 1
%24 = icmp eq i64 %23, 32
br i1 %24, label %25, label %7
25: ; preds = %7
%26 = add nuw nsw i64 %3, 1
%27 = icmp eq i64 %26, 64
br i1 %27, label %28, label %2
28: ; preds = %25
ret void
}