void filter_subband(z, s) double z[512], s[32];
{
  double y[64];
  int i, j;
  static char init = 0;
  typedef double MM[32][64];
  static MM *m;
  if (!init) {
    m = (MM *)mem_alloc(sizeof(MM), "filter");
    create_ana_filter(*m);
    init = 1;
  }
  for (i = 0; i < 64; i++)
    for (j = 0, y[i] = 0; j < 8; j++)
      y[i] += z[i + 64 * j];
  for (i = 0; i < 32; i++)
    for (j = 0, s[i] = 0; j < 64; j++)
      s[i] += (*m)[i][j] * y[j];
}


x86 assembly (clang, -O0):
<filter_subband>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpb   $0x0,0x2efe(%rip)
jne    1171 <filter_subband+0x51>
mov    $0x4000,%edi
lea    0xeb4(%rip),%rsi
mov    $0x0,%al
call   1040 <mem_alloc@plt>
cltq
mov    %rax,0x2ee4(%rip)
mov    0x2edd(%rip),%rdi
mov    $0x0,%al
call   1030 <create_ana_filter@plt>
movb   $0x1,0x2ec7(%rip)
movl   $0x0,-0x214(%rbp)
cmpl   $0x40,-0x214(%rbp)
jge    1215 <filter_subband+0xf5>
movl   $0x0,-0x218(%rbp)
movslq -0x214(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x210(%rbp,%rax,8)
ff ff
cmpl   $0x8,-0x218(%rbp)
jge    11fc <filter_subband+0xdc>
mov    -0x8(%rbp),%rax
mov    -0x214(%rbp),%ecx
mov    -0x218(%rbp),%edx
shl    $0x6,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x214(%rbp),%rax
addsd  -0x210(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x210(%rbp,%rax,8)
ff ff
mov    -0x218(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x218(%rbp)
jmp    11a5 <filter_subband+0x85>
jmp    1201 <filter_subband+0xe1>
mov    -0x214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x214(%rbp)
jmp    117b <filter_subband+0x5b>
movl   $0x0,-0x214(%rbp)
cmpl   $0x20,-0x214(%rbp)
jge    12d1 <filter_subband+0x1b1>
movl   $0x0,-0x218(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x214(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
cmpl   $0x40,-0x218(%rbp)
jge    12b8 <filter_subband+0x198>
mov    0x2de3(%rip),%rax
movslq -0x214(%rbp),%rcx
shl    $0x9,%rcx
add    %rcx,%rax
movslq -0x218(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x218(%rbp),%rax
movsd  -0x210(%rbp,%rax,8),%xmm2
ff ff
mov    -0x10(%rbp),%rax
movslq -0x214(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x218(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x218(%rbp)
jmp    1249 <filter_subband+0x129>
jmp    12bd <filter_subband+0x19d>
mov    -0x214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x214(%rbp)
jmp    121f <filter_subband+0xff>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_subband>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
cmpb   $0x0,0x2f01(%rip)
jne    1164 <filter_subband+0x44>
lea    0xec0(%rip),%rsi
mov    $0x4000,%edi
xor    %eax,%eax
call   1040 <mem_alloc@plt>
movslq %eax,%rdi
mov    %rdi,0x2eea(%rip)
xor    %eax,%eax
call   1030 <create_ana_filter@plt>
movb   $0x1,0x2ed4(%rip)
xor    %eax,%eax
xorpd  %xmm0,%xmm0
nopw   0x0(%rax,%rax,1)
movupd (%r14,%rax,8),%xmm1
addpd  %xmm0,%xmm1
movupd 0x200(%r14,%rax,8),%xmm2
addpd  %xmm1,%xmm2
movupd 0x400(%r14,%rax,8),%xmm1
addpd  %xmm2,%xmm1
movupd 0x600(%r14,%rax,8),%xmm2
addpd  %xmm1,%xmm2
movupd 0x800(%r14,%rax,8),%xmm1
addpd  %xmm2,%xmm1
movupd 0xa00(%r14,%rax,8),%xmm2
addpd  %xmm1,%xmm2
movupd 0xc00(%r14,%rax,8),%xmm1
addpd  %xmm2,%xmm1
movupd 0xe00(%r14,%rax,8),%xmm2
addpd  %xmm1,%xmm2
movapd %xmm2,(%rsp,%rax,8)
add    $0x2,%rax
cmp    $0x40,%rax
jne    1170 <filter_subband+0x50>
mov    0x2e4e(%rip),%rax
add    $0x8,%rax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movq   $0x0,(%rbx,%rcx,8)
xorpd  %xmm0,%xmm0
xor    %edx,%edx
xchg   %ax,%ax
movsd  -0x8(%rax,%rdx,8),%xmm1
mulsd  (%rsp,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rcx,8)
movsd  (%rax,%rdx,8),%xmm0
mulsd  0x8(%rsp,%rdx,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x2,%rdx
cmp    $0x40,%rdx
jne    1210 <filter_subband+0xf0>
add    $0x1,%rcx
add    $0x200,%rax
cmp    $0x20,%rcx
jne    1200 <filter_subband+0xe0>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@filter_subband.init = internal global i8 0
@filter_subband.m = internal global [32 x [64 x double]]* null
@.str = [7 x i8] c"filter\00"
define void @filter_subband(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca [64 x double]
%6 = alloca i32
%7 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
%8 = load i8, i8* @filter_subband.init
%9 = icmp ne i8 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %2
%11 = call i32 (i64, i8*, ...) bitcast (i32 (...)* @mem_alloc to i32 (i64, i8*, ...)*)(i64 16384, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to [32 x [64 x double]]*
store [32 x [64 x double]]* %13, [32 x [64 x double]]** @filter_subband.m
%14 = load [32 x [64 x double]]*, [32 x [64 x double]]** @filter_subband.m
%15 = getelementptr inbounds [32 x [64 x double]], [32 x [64 x double]]* %14, i64 0, i64 0
%16 = call i32 ([64 x double]*, ...) bitcast (i32 (...)* @create_ana_filter to i32 ([64 x double]*, ...)*)([64 x double]* %15)
store i8 1, i8* @filter_subband.init
br label %17
17: ; preds = %10, %2
store i32 0, i32* %6
br label %18
18: ; preds = %46, %17
%19 = load i32, i32* %6
%20 = icmp slt i32 %19, 64
br i1 %20, label %21, label %49
21: ; preds = %18
store i32 0, i32* %7
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [64 x double], [64 x double]* %5, i64 0, i64 %23
store double 0.000000e+00, double* %24
br label %25
25: ; preds = %42, %21
%26 = load i32, i32* %7
%27 = icmp slt i32 %26, 8
br i1 %27, label %28, label %45
28: ; preds = %25
%29 = load double*, double** %3
%30 = load i32, i32* %6
%31 = load i32, i32* %7
%32 = mul nsw i32 64, %31
%33 = add nsw i32 %30, %32
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double, double* %29, i64 %34
%36 = load double, double* %35
%37 = load i32, i32* %6
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [64 x double], [64 x double]* %5, i64 0, i64 %38
%40 = load double, double* %39
%41 = fadd double %40, %36
store double %41, double* %39
br label %42
42: ; preds = %28
%43 = load i32, i32* %7
%44 = add nsw i32 %43, 1
store i32 %44, i32* %7
br label %25
45: ; preds = %25
br label %46
46: ; preds = %45
%47 = load i32, i32* %6
%48 = add nsw i32 %47, 1
store i32 %48, i32* %6
br label %18
49: ; preds = %18
store i32 0, i32* %6
br label %50
50: ; preds = %84, %49
%51 = load i32, i32* %6
%52 = icmp slt i32 %51, 32
br i1 %52, label %53, label %87
53: ; preds = %50
store i32 0, i32* %7
%54 = load double*, double** %4
%55 = load i32, i32* %6
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %54, i64 %56
store double 0.000000e+00, double* %57
br label %58
58: ; preds = %80, %53
%59 = load i32, i32* %7
%60 = icmp slt i32 %59, 64
br i1 %60, label %61, label %83
61: ; preds = %58
%62 = load [32 x [64 x double]]*, [32 x [64 x double]]** @filter_subband.m
%63 = load i32, i32* %6
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [32 x [64 x double]], [32 x [64 x double]]* %62, i64 0, i64 %64
%66 = load i32, i32* %7
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [64 x double], [64 x double]* %65, i64 0, i64 %67
%69 = load double, double* %68
%70 = load i32, i32* %7
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [64 x double], [64 x double]* %5, i64 0, i64 %71
%73 = load double, double* %72
%74 = load double*, double** %4
%75 = load i32, i32* %6
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds double, double* %74, i64 %76
%78 = load double, double* %77
%79 = call double @llvm.fmuladd.f64(double %69, double %73, double %78)
store double %79, double* %77
br label %80
80: ; preds = %61
%81 = load i32, i32* %7
%82 = add nsw i32 %81, 1
store i32 %82, i32* %7
br label %58
83: ; preds = %58
br label %84
84: ; preds = %83
%85 = load i32, i32* %6
%86 = add nsw i32 %85, 1
store i32 %86, i32* %6
br label %50
87: ; preds = %50
ret void
}

LLVM IR (-O2):
@filter_subband.init = internal unnamed_addr global i1 false
@filter_subband.m = internal unnamed_addr global [32 x [64 x double]]* null
@.str = [7 x i8] c"filter\00"
define void @filter_subband(double* nocapture %0, double* nocapture %1) {
%3 = alloca [64 x double]
%4 = bitcast [64 x double]* %3 to i8*
%5 = load i1, i1* @filter_subband.init
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = tail call i32 (i64, i8*, ...) bitcast (i32 (...)* @mem_alloc to i32 (i64, i8*, ...)*)(i64 16384, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to [32 x [64 x double]]*
store [32 x [64 x double]]* %9, [32 x [64 x double]]** @filter_subband.m
%10 = getelementptr inbounds [32 x [64 x double]], [32 x [64 x double]]* %9, i64 0, i64 0
%11 = tail call i32 ([64 x double]*, ...) bitcast (i32 (...)* @create_ana_filter to i32 ([64 x double]*, ...)*)([64 x double]* %10)
store i1 true, i1* @filter_subband.init
br label %12
12: ; preds = %2, %6
br label %13
13: ; preds = %12, %13
%14 = phi i64 [ %56, %13 ], [ 0, %12 ]
%15 = getelementptr inbounds [64 x double], [64 x double]* %3, i64 0, i64 %14
%16 = getelementptr inbounds double, double* %0, i64 %14
%17 = bitcast double* %16 to <2 x double>*
%18 = load <2 x double>, <2 x double>* %17
%19 = fadd <2 x double> %18, zeroinitializer
%20 = add nuw nsw i64 %14, 64
%21 = getelementptr inbounds double, double* %0, i64 %20
%22 = bitcast double* %21 to <2 x double>*
%23 = load <2 x double>, <2 x double>* %22
%24 = fadd <2 x double> %23, %19
%25 = add nuw nsw i64 %14, 128
%26 = getelementptr inbounds double, double* %0, i64 %25
%27 = bitcast double* %26 to <2 x double>*
%28 = load <2 x double>, <2 x double>* %27
%29 = fadd <2 x double> %28, %24
%30 = add nuw nsw i64 %14, 192
%31 = getelementptr inbounds double, double* %0, i64 %30
%32 = bitcast double* %31 to <2 x double>*
%33 = load <2 x double>, <2 x double>* %32
%34 = fadd <2 x double> %33, %29
%35 = add nuw nsw i64 %14, 256
%36 = getelementptr inbounds double, double* %0, i64 %35
%37 = bitcast double* %36 to <2 x double>*
%38 = load <2 x double>, <2 x double>* %37
%39 = fadd <2 x double> %38, %34
%40 = add nuw nsw i64 %14, 320
%41 = getelementptr inbounds double, double* %0, i64 %40
%42 = bitcast double* %41 to <2 x double>*
%43 = load <2 x double>, <2 x double>* %42
%44 = fadd <2 x double> %43, %39
%45 = add nuw nsw i64 %14, 384
%46 = getelementptr inbounds double, double* %0, i64 %45
%47 = bitcast double* %46 to <2 x double>*
%48 = load <2 x double>, <2 x double>* %47
%49 = fadd <2 x double> %48, %44
%50 = add nuw nsw i64 %14, 448
%51 = getelementptr inbounds double, double* %0, i64 %50
%52 = bitcast double* %51 to <2 x double>*
%53 = load <2 x double>, <2 x double>* %52
%54 = fadd <2 x double> %53, %49
%55 = bitcast double* %15 to <2 x double>*
store <2 x double> %54, <2 x double>* %55
%56 = add nuw i64 %14, 2
%57 = icmp eq i64 %56, 64
br i1 %57, label %58, label %13
58: ; preds = %13
%59 = load [32 x [64 x double]]*, [32 x [64 x double]]** @filter_subband.m
br label %60
60: ; preds = %58, %79
%61 = phi i64 [ 0, %58 ], [ %80, %79 ]
%62 = getelementptr inbounds double, double* %1, i64 %61
store double 0.000000e+00, double* %62
br label %63
63: ; preds = %63, %60
%64 = phi double [ 0.000000e+00, %60 ], [ %76, %63 ]
%65 = phi i64 [ 0, %60 ], [ %77, %63 ]
%66 = getelementptr inbounds [32 x [64 x double]], [32 x [64 x double]]* %59, i64 0, i64 %61, i64 %65
%67 = load double, double* %66
%68 = getelementptr inbounds [64 x double], [64 x double]* %3, i64 0, i64 %65
%69 = load double, double* %68
%70 = tail call double @llvm.fmuladd.f64(double %67, double %69, double %64)
store double %70, double* %62
%71 = or i64 %65, 1
%72 = getelementptr inbounds [32 x [64 x double]], [32 x [64 x double]]* %59, i64 0, i64 %61, i64 %71
%73 = load double, double* %72
%74 = getelementptr inbounds [64 x double], [64 x double]* %3, i64 0, i64 %71
%75 = load double, double* %74
%76 = tail call double @llvm.fmuladd.f64(double %73, double %75, double %70)
store double %76, double* %62
%77 = add nuw nsw i64 %65, 2
%78 = icmp eq i64 %77, 64
br i1 %78, label %79, label %63
79: ; preds = %63
%80 = add nuw nsw i64 %61, 1
%81 = icmp eq i64 %80, 32
br i1 %81, label %82, label %60
82: ; preds = %79
ret void
}