int SubBandSynthesis(bandPtr, channel, samples)
double *bandPtr;
int channel;
short *samples;
{
  register int i, j, k;
  register double *bufOffsetPtr, sum;
  static int init = 1;
  typedef double NN[64][32];
  static NN *filter;
  typedef double BB[2][2 * 512];
  static BB *buf;
  static int bufOffset = 64;
  static double *window;
  int clip = 0;
  if (init) {
    buf = (BB *)mem_alloc(sizeof(BB), "BB");
    filter = (NN *)mem_alloc(sizeof(NN), "NN");
    create_syn_filter(*filter);
    window = (double *)mem_alloc(sizeof(double) * 512, "WIN");
    read_syn_window(window);
    bufOffset = 64;
    init = 0;
  }
  if (channel == 0)
    bufOffset = (bufOffset - 64) & 0x3ff;
  bufOffsetPtr = &((*buf)[channel][bufOffset]);
  for (i = 0; i < 64; i++) {
    sum = 0;
    for (k = 0; k < 32; k++)
      sum += bandPtr[k] * (*filter)[i][k];
    bufOffsetPtr[i] = sum;
  }
  for (j = 0; j < 32; j++) {
    sum = 0;
    for (i = 0; i < 16; i++) {
      k = j + (i << 5);
      sum += window[k] *
             (*buf)[channel][((k + (((i + 1) >> 1) << 6)) + bufOffset) & 0x3ff];
    }
    {
      long foo = sum * 32768;
      if (foo >= (long)32768) {
        samples[j] = 32768 - 1;
        ++clip;
      } else if (foo < (long)-32768) {
        samples[j] = -32768;
        ++clip;
      } else
        samples[j] = foo;
    }
  }
  return (clip);
}


x86 assembly (clang, -O0):
<SubBandSynthesis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x0,0x2ee7(%rip)
je     11db <SubBandSynthesis+0xab>
mov    $0x4000,%edi
lea    0xea5(%rip),%rsi
mov    $0x0,%al
call   1050 <mem_alloc@plt>
cltq
mov    %rax,0x2edd(%rip)
mov    $0x4000,%edi
lea    0xe8c(%rip),%rsi
mov    $0x0,%al
call   1050 <mem_alloc@plt>
cltq
mov    %rax,0x2eb9(%rip)
mov    0x2eb2(%rip),%rdi
mov    $0x0,%al
call   1040 <create_syn_filter@plt>
mov    $0x1000,%edi
lea    0xe65(%rip),%rsi
mov    $0x0,%al
call   1050 <mem_alloc@plt>
cltq
mov    %rax,0x2e9f(%rip)
mov    0x2e98(%rip),%rdi
mov    $0x0,%al
call   1030 <read_syn_window@plt>
movl   $0x40,0x2e6b(%rip)
movl   $0x0,0x2e5d(%rip)
cmpl   $0x0,-0xc(%rbp)
jne    11f9 <SubBandSynthesis+0xc9>
mov    0x2e51(%rip),%eax
sub    $0x40,%eax
and    $0x3ff,%eax
mov    %eax,0x2e43(%rip)
mov    0x2e50(%rip),%rax
movslq -0xc(%rbp),%rcx
shl    $0xd,%rcx
add    %rcx,%rax
movslq 0x2e2a(%rip),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x40,-0x1c(%rbp)
jge    12af <SubBandSynthesis+0x17f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x20,-0x24(%rbp)
jge    128f <SubBandSynthesis+0x15f>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x2ded(%rip),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    123d <SubBandSynthesis+0x10d>
movsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1224 <SubBandSynthesis+0xf4>
movl   $0x0,-0x20(%rbp)
cmpl   $0x20,-0x20(%rbp)
jge    13e3 <SubBandSynthesis+0x2b3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x10,-0x1c(%rbp)
jge    134e <SubBandSynthesis+0x21e>
mov    -0x20(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x5,%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    0x2d6a(%rip),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x2d52(%rip),%rax
movslq -0xc(%rbp),%rcx
shl    $0xd,%rcx
add    %rcx,%rax
mov    -0x24(%rbp),%ecx
mov    -0x1c(%rbp),%edx
add    $0x1,%edx
sar    $0x1,%edx
shl    $0x6,%edx
add    %edx,%ecx
add    0x2d1c(%rip),%ecx
and    $0x3ff,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12cf <SubBandSynthesis+0x19f>
movsd  0xcaa(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x48(%rbp)
cmpq   $0x8000,-0x48(%rbp)
jl     138e <SubBandSynthesis+0x25e>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movw   $0x7fff,(%rax,%rcx,2)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13d0 <SubBandSynthesis+0x2a0>
cmpq   $0xffffffffffff8000,-0x48(%rbp)
ff
jge    13b8 <SubBandSynthesis+0x288>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movw   $0x8000,(%rax,%rcx,2)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13cb <SubBandSynthesis+0x29b>
mov    -0x48(%rbp),%rax
mov    %ax,%dx
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
jmp    13d0 <SubBandSynthesis+0x2a0>
jmp    13d5 <SubBandSynthesis+0x2a5>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12b6 <SubBandSynthesis+0x186>
mov    -0x3c(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SubBandSynthesis>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
cmpb   $0x0,0x2f05(%rip)
jne    11ba <SubBandSynthesis+0x8a>
lea    0xebc(%rip),%rsi
mov    $0x4000,%edi
xor    %eax,%eax
call   1050 <mem_alloc@plt>
cltq
mov    %rax,0x2ef7(%rip)
lea    0xea3(%rip),%rsi
mov    $0x4000,%edi
xor    %eax,%eax
call   1050 <mem_alloc@plt>
movslq %eax,%rdi
mov    %rdi,0x2ed2(%rip)
xor    %eax,%eax
call   1040 <create_syn_filter@plt>
lea    0xe82(%rip),%rsi
mov    $0x1000,%edi
xor    %eax,%eax
call   1050 <mem_alloc@plt>
movslq %eax,%rdi
mov    %rdi,0x2ebe(%rip)
xor    %eax,%eax
call   1030 <read_syn_window@plt>
movl   $0x40,0x2e85(%rip)
movb   $0x1,0x2e8e(%rip)
mov    0x2e78(%rip),%eax
test   %ebp,%ebp
jne    11d4 <SubBandSynthesis+0xa4>
add    $0x3c0,%eax
and    $0x3ff,%eax
mov    %eax,0x2e64(%rip)
movslq %ebp,%rcx
mov    %eax,%edx
shl    $0xd,%rcx
add    0x2e74(%rip),%rcx
lea    (%rcx,%rdx,8),%rax
mov    0x2e61(%rip),%rsi
add    $0x18,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nop
xorpd  %xmm0,%xmm0
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%rbp,8),%xmm1
movsd  0x8(%rbx,%rbp,8),%xmm2
mulsd  -0x18(%rsi,%rbp,8),%xmm1
mulsd  -0x10(%rsi,%rbp,8),%xmm2
addsd  %xmm0,%xmm1
movsd  0x10(%rbx,%rbp,8),%xmm3
mulsd  -0x8(%rsi,%rbp,8),%xmm3
addsd  %xmm1,%xmm2
movsd  0x18(%rbx,%rbp,8),%xmm0
mulsd  (%rsi,%rbp,8),%xmm0
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
add    $0x4,%rbp
cmp    $0x20,%rbp
jne    1210 <SubBandSynthesis+0xe0>
movsd  %xmm0,(%rax,%rdi,8)
add    $0x1,%rdi
add    $0x100,%rsi
cmp    $0x40,%rdi
jne    1200 <SubBandSynthesis+0xd0>
mov    $0x100,%esi
add    0x2de6(%rip),%rsi
xor    %edi,%edi
movsd  0xd7c(%rip),%xmm0
xor    %eax,%eax
jmp    12b0 <SubBandSynthesis+0x180>
nopl   0x0(%rax,%rax,1)
movw   $0x7fff,(%r14,%rdi,2)
add    $0x1,%eax
add    $0x1,%rdi
add    $0x1,%rdx
add    $0x8,%rsi
cmp    $0x20,%rdi
je     134a <SubBandSynthesis+0x21a>
xorpd  %xmm1,%xmm1
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
lea    (%rdx,%rbp,1),%ebx
and    $0x3ff,%ebx
movsd  -0x100(%rsi,%rbp,4),%xmm2
ff ff
movsd  (%rsi,%rbp,4),%xmm3
mulsd  (%rcx,%rbx,8),%xmm2
lea    (%rdx,%rbp,1),%ebx
add    $0x60,%ebx
and    $0x3ff,%ebx
mulsd  (%rcx,%rbx,8),%xmm3
addsd  %xmm1,%xmm2
movapd %xmm3,%xmm1
addsd  %xmm2,%xmm1
sub    $0xffffffffffffff80,%rbp
cmp    $0x400,%rbp
jne    12c0 <SubBandSynthesis+0x190>
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rbp
cmp    $0x8000,%rbp
jge    1290 <SubBandSynthesis+0x160>
cmp    $0xffffffffffff7fff,%rbp
jg     1340 <SubBandSynthesis+0x210>
movw   $0x8000,(%r14,%rdi,2)
jmp    1297 <SubBandSynthesis+0x167>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %bp,(%r14,%rdi,2)
jmp    129a <SubBandSynthesis+0x16a>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SubBandSynthesis.init = internal global i32 1
@SubBandSynthesis.filter = internal global [64 x [32 x double]]* null
@SubBandSynthesis.buf = internal global [2 x [1024 x double]]* null
@SubBandSynthesis.bufOffset = internal global i32 64
@SubBandSynthesis.window = internal global double* null
@.str = [3 x i8] c"BB\00"
@.str.1 = [3 x i8] c"NN\00"
@.str.2 = [4 x i8] c"WIN\00"
define i32 @SubBandSynthesis(double* %0, i32 %1, i16* %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i16*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
%11 = alloca double
%12 = alloca i32
%13 = alloca i64
store double* %0, double** %4
store i32 %1, i32* %5
store i16* %2, i16** %6
store i32 0, i32* %12
%14 = load i32, i32* @SubBandSynthesis.init
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %31
16: ; preds = %3
%17 = call i32 (i64, i8*, ...) bitcast (i32 (...)* @mem_alloc to i32 (i64, i8*, ...)*)(i64 16384, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to [2 x [1024 x double]]*
store [2 x [1024 x double]]* %19, [2 x [1024 x double]]** @SubBandSynthesis.buf
%20 = call i32 (i64, i8*, ...) bitcast (i32 (...)* @mem_alloc to i32 (i64, i8*, ...)*)(i64 16384, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to [64 x [32 x double]]*
store [64 x [32 x double]]* %22, [64 x [32 x double]]** @SubBandSynthesis.filter
%23 = load [64 x [32 x double]]*, [64 x [32 x double]]** @SubBandSynthesis.filter
%24 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %23, i64 0, i64 0
%25 = call i32 ([32 x double]*, ...) bitcast (i32 (...)* @create_syn_filter to i32 ([32 x double]*, ...)*)([32 x double]* %24)
%26 = call i32 (i64, i8*, ...) bitcast (i32 (...)* @mem_alloc to i32 (i64, i8*, ...)*)(i64 4096, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to double*
store double* %28, double** @SubBandSynthesis.window
%29 = load double*, double** @SubBandSynthesis.window
%30 = call i32 (double*, ...) bitcast (i32 (...)* @read_syn_window to i32 (double*, ...)*)(double* %29)
store i32 64, i32* @SubBandSynthesis.bufOffset
store i32 0, i32* @SubBandSynthesis.init
br label %31
31: ; preds = %16, %3
%32 = load i32, i32* %5
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %38
34: ; preds = %31
%35 = load i32, i32* @SubBandSynthesis.bufOffset
%36 = sub nsw i32 %35, 64
%37 = and i32 %36, 1023
store i32 %37, i32* @SubBandSynthesis.bufOffset
br label %38
38: ; preds = %34, %31
%39 = load [2 x [1024 x double]]*, [2 x [1024 x double]]** @SubBandSynthesis.buf
%40 = load i32, i32* %5
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [2 x [1024 x double]], [2 x [1024 x double]]* %39, i64 0, i64 %41
%43 = load i32, i32* @SubBandSynthesis.bufOffset
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [1024 x double], [1024 x double]* %42, i64 0, i64 %44
store double* %45, double** %10
store i32 0, i32* %7
br label %46
46: ; preds = %78, %38
%47 = load i32, i32* %7
%48 = icmp slt i32 %47, 64
br i1 %48, label %49, label %81
49: ; preds = %46
store double 0.000000e+00, double* %11
store i32 0, i32* %9
br label %50
50: ; preds = %69, %49
%51 = load i32, i32* %9
%52 = icmp slt i32 %51, 32
br i1 %52, label %53, label %72
53: ; preds = %50
%54 = load double*, double** %4
%55 = load i32, i32* %9
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %54, i64 %56
%58 = load double, double* %57
%59 = load [64 x [32 x double]]*, [64 x [32 x double]]** @SubBandSynthesis.filter
%60 = load i32, i32* %7
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %59, i64 0, i64 %61
%63 = load i32, i32* %9
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [32 x double], [32 x double]* %62, i64 0, i64 %64
%66 = load double, double* %65
%67 = load double, double* %11
%68 = call double @llvm.fmuladd.f64(double %58, double %66, double %67)
store double %68, double* %11
br label %69
69: ; preds = %53
%70 = load i32, i32* %9
%71 = add nsw i32 %70, 1
store i32 %71, i32* %9
br label %50
72: ; preds = %50
%73 = load double, double* %11
%74 = load double*, double** %10
%75 = load i32, i32* %7
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds double, double* %74, i64 %76
store double %73, double* %77
br label %78
78: ; preds = %72
%79 = load i32, i32* %7
%80 = add nsw i32 %79, 1
store i32 %80, i32* %7
br label %46
81: ; preds = %46
store i32 0, i32* %8
br label %82
82: ; preds = %152, %81
%83 = load i32, i32* %8
%84 = icmp slt i32 %83, 32
br i1 %84, label %85, label %155
85: ; preds = %82
store double 0.000000e+00, double* %11
store i32 0, i32* %7
br label %86
86: ; preds = %117, %85
%87 = load i32, i32* %7
%88 = icmp slt i32 %87, 16
br i1 %88, label %89, label %120
89: ; preds = %86
%90 = load i32, i32* %8
%91 = load i32, i32* %7
%92 = shl i32 %91, 5
%93 = add nsw i32 %90, %92
store i32 %93, i32* %9
%94 = load double*, double** @SubBandSynthesis.window
%95 = load i32, i32* %9
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %94, i64 %96
%98 = load double, double* %97
%99 = load [2 x [1024 x double]]*, [2 x [1024 x double]]** @SubBandSynthesis.buf
%100 = load i32, i32* %5
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [2 x [1024 x double]], [2 x [1024 x double]]* %99, i64 0, i64 %101
%103 = load i32, i32* %9
%104 = load i32, i32* %7
%105 = add nsw i32 %104, 1
%106 = ashr i32 %105, 1
%107 = shl i32 %106, 6
%108 = add nsw i32 %103, %107
%109 = load i32, i32* @SubBandSynthesis.bufOffset
%110 = add nsw i32 %108, %109
%111 = and i32 %110, 1023
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [1024 x double], [1024 x double]* %102, i64 0, i64 %112
%114 = load double, double* %113
%115 = load double, double* %11
%116 = call double @llvm.fmuladd.f64(double %98, double %114, double %115)
store double %116, double* %11
br label %117
117: ; preds = %89
%118 = load i32, i32* %7
%119 = add nsw i32 %118, 1
store i32 %119, i32* %7
br label %86
120: ; preds = %86
%121 = load double, double* %11
%122 = fmul double %121, 3.276800e+04
%123 = fptosi double %122 to i64
store i64 %123, i64* %13
%124 = load i64, i64* %13
%125 = icmp sge i64 %124, 32768
br i1 %125, label %126, label %133
126: ; preds = %120
%127 = load i16*, i16** %6
%128 = load i32, i32* %8
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds i16, i16* %127, i64 %129
store i16 32767, i16* %130
%131 = load i32, i32* %12
%132 = add nsw i32 %131, 1
store i32 %132, i32* %12
br label %151
133: ; preds = %120
%134 = load i64, i64* %13
%135 = icmp slt i64 %134, -32768
br i1 %135, label %136, label %143
136: ; preds = %133
%137 = load i16*, i16** %6
%138 = load i32, i32* %8
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds i16, i16* %137, i64 %139
store i16 -32768, i16* %140
%141 = load i32, i32* %12
%142 = add nsw i32 %141, 1
store i32 %142, i32* %12
br label %150
143: ; preds = %133
%144 = load i64, i64* %13
%145 = trunc i64 %144 to i16
%146 = load i16*, i16** %6
%147 = load i32, i32* %8
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds i16, i16* %146, i64 %148
store i16 %145, i16* %149
br label %150
150: ; preds = %143, %136
br label %151
151: ; preds = %150, %126
br label %152
152: ; preds = %151
%153 = load i32, i32* %8
%154 = add nsw i32 %153, 1
store i32 %154, i32* %8
br label %82
155: ; preds = %82
%156 = load i32, i32* %12
ret i32 %156
}

LLVM IR (-O2):
@SubBandSynthesis.init = internal unnamed_addr global i1 false
@SubBandSynthesis.filter = internal unnamed_addr global [64 x [32 x double]]* null
@SubBandSynthesis.buf = internal unnamed_addr global [2 x [1024 x double]]* null
@SubBandSynthesis.bufOffset = internal unnamed_addr global i32 64
@SubBandSynthesis.window = internal unnamed_addr global double* null
@.str = [3 x i8] c"BB\00"
@.str.1 = [3 x i8] c"NN\00"
@.str.2 = [4 x i8] c"WIN\00"
define i32 @SubBandSynthesis(double* nocapture %0, i32 %1, i16* nocapture writeonly %2) {
%4 = load i1, i1* @SubBandSynthesis.init
br i1 %4, label %18, label %5
5: ; preds = %3
%6 = tail call i32 (i64, i8*, ...) bitcast (i32 (...)* @mem_alloc to i32 (i64, i8*, ...)*)(i64 16384, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to [2 x [1024 x double]]*
store [2 x [1024 x double]]* %8, [2 x [1024 x double]]** @SubBandSynthesis.buf
%9 = tail call i32 (i64, i8*, ...) bitcast (i32 (...)* @mem_alloc to i32 (i64, i8*, ...)*)(i64 16384, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to [64 x [32 x double]]*
store [64 x [32 x double]]* %11, [64 x [32 x double]]** @SubBandSynthesis.filter
%12 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %11, i64 0, i64 0
%13 = tail call i32 ([32 x double]*, ...) bitcast (i32 (...)* @create_syn_filter to i32 ([32 x double]*, ...)*)([32 x double]* %12)
%14 = tail call i32 (i64, i8*, ...) bitcast (i32 (...)* @mem_alloc to i32 (i64, i8*, ...)*)(i64 4096, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to double*
store double* %16, double** @SubBandSynthesis.window
%17 = tail call i32 (double*, ...) bitcast (i32 (...)* @read_syn_window to i32 (double*, ...)*)(double* %16)
store i32 64, i32* @SubBandSynthesis.bufOffset
store i1 true, i1* @SubBandSynthesis.init
br label %18
18: ; preds = %5, %3
%19 = icmp eq i32 %1, 0
%20 = load i32, i32* @SubBandSynthesis.bufOffset
br i1 %19, label %21, label %24
21: ; preds = %18
%22 = add i32 %20, 960
%23 = and i32 %22, 1023
store i32 %23, i32* @SubBandSynthesis.bufOffset
br label %24
24: ; preds = %18, %21
%25 = phi i32 [ %23, %21 ], [ %20, %18 ]
%26 = load [2 x [1024 x double]]*, [2 x [1024 x double]]** @SubBandSynthesis.buf
%27 = sext i32 %1 to i64
%28 = zext i32 %25 to i64
%29 = getelementptr inbounds [2 x [1024 x double]], [2 x [1024 x double]]* %26, i64 0, i64 %27, i64 %28
%30 = load [64 x [32 x double]]*, [64 x [32 x double]]** @SubBandSynthesis.filter
br label %31
31: ; preds = %24, %63
%32 = phi i64 [ 0, %24 ], [ %65, %63 ]
br label %35
33: ; preds = %63
%34 = load double*, double** @SubBandSynthesis.window
br label %67
35: ; preds = %35, %31
%36 = phi i64 [ 0, %31 ], [ %61, %35 ]
%37 = phi double [ 0.000000e+00, %31 ], [ %60, %35 ]
%38 = getelementptr inbounds double, double* %0, i64 %36
%39 = load double, double* %38
%40 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %30, i64 0, i64 %32, i64 %36
%41 = load double, double* %40
%42 = tail call double @llvm.fmuladd.f64(double %39, double %41, double %37)
%43 = or i64 %36, 1
%44 = getelementptr inbounds double, double* %0, i64 %43
%45 = load double, double* %44
%46 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %30, i64 0, i64 %32, i64 %43
%47 = load double, double* %46
%48 = tail call double @llvm.fmuladd.f64(double %45, double %47, double %42)
%49 = or i64 %36, 2
%50 = getelementptr inbounds double, double* %0, i64 %49
%51 = load double, double* %50
%52 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %30, i64 0, i64 %32, i64 %49
%53 = load double, double* %52
%54 = tail call double @llvm.fmuladd.f64(double %51, double %53, double %48)
%55 = or i64 %36, 3
%56 = getelementptr inbounds double, double* %0, i64 %55
%57 = load double, double* %56
%58 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %30, i64 0, i64 %32, i64 %55
%59 = load double, double* %58
%60 = tail call double @llvm.fmuladd.f64(double %57, double %59, double %54)
%61 = add nuw nsw i64 %36, 4
%62 = icmp eq i64 %61, 32
br i1 %62, label %63, label %35
63: ; preds = %35
%64 = getelementptr inbounds double, double* %29, i64 %32
store double %60, double* %64
%65 = add nuw nsw i64 %32, 1
%66 = icmp eq i64 %65, 64
br i1 %66, label %33, label %31
67: ; preds = %33, %119
%68 = phi i64 [ 0, %33 ], [ %121, %119 ]
%69 = phi i32 [ 0, %33 ], [ %120, %119 ]
br label %70
70: ; preds = %70, %67
%71 = phi i64 [ 0, %67 ], [ %92, %70 ]
%72 = phi double [ 0.000000e+00, %67 ], [ %102, %70 ]
%73 = shl nuw nsw i64 %71, 5
%74 = add nuw nsw i64 %73, %68
%75 = getelementptr inbounds double, double* %34, i64 %74
%76 = load double, double* %75
%77 = trunc i64 %71 to i32
%78 = shl i32 %77, 5
%79 = trunc i64 %74 to i32
%80 = add i32 %25, %79
%81 = add i32 %80, %78
%82 = and i32 %81, 1023
%83 = zext i32 %82 to i64
%84 = getelementptr inbounds [2 x [1024 x double]], [2 x [1024 x double]]* %26, i64 0, i64 %27, i64 %83
%85 = load double, double* %84
%86 = tail call double @llvm.fmuladd.f64(double %76, double %85, double %72)
%87 = shl i64 %71, 5
%88 = or i64 %87, 32
%89 = add nuw nsw i64 %88, %68
%90 = getelementptr inbounds double, double* %34, i64 %89
%91 = load double, double* %90
%92 = add nuw nsw i64 %71, 2
%93 = trunc i64 %92 to i32
%94 = shl i32 %93, 5
%95 = trunc i64 %89 to i32
%96 = add i32 %25, %95
%97 = add i32 %96, %94
%98 = and i32 %97, 1023
%99 = zext i32 %98 to i64
%100 = getelementptr inbounds [2 x [1024 x double]], [2 x [1024 x double]]* %26, i64 0, i64 %27, i64 %99
%101 = load double, double* %100
%102 = tail call double @llvm.fmuladd.f64(double %91, double %101, double %86)
%103 = icmp eq i64 %92, 16
br i1 %103, label %104, label %70
104: ; preds = %70
%105 = fmul double %102, 3.276800e+04
%106 = fptosi double %105 to i64
%107 = icmp sgt i64 %106, 32767
br i1 %107, label %108, label %111
108: ; preds = %104
%109 = getelementptr inbounds i16, i16* %2, i64 %68
store i16 32767, i16* %109
%110 = add nsw i32 %69, 1
br label %119
111: ; preds = %104
%112 = icmp slt i64 %106, -32768
br i1 %112, label %113, label %116
113: ; preds = %111
%114 = getelementptr inbounds i16, i16* %2, i64 %68
store i16 -32768, i16* %114
%115 = add nsw i32 %69, 1
br label %119
116: ; preds = %111
%117 = trunc i64 %106 to i16
%118 = getelementptr inbounds i16, i16* %2, i64 %68
store i16 %117, i16* %118
br label %119
119: ; preds = %113, %116, %108
%120 = phi i32 [ %110, %108 ], [ %115, %113 ], [ %69, %116 ]
%121 = add nuw nsw i64 %68, 1
%122 = icmp eq i64 %121, 32
br i1 %122, label %123, label %67
123: ; preds = %119
ret i32 %120
}