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[2] = {64, 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);
    init = 0;
  }
  bufOffset[channel] = (bufOffset[channel] - 64) & 0x3ff;
  bufOffsetPtr = &((*buf)[channel][bufOffset[channel]]);
  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[channel]) & 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     11d1 <SubBandSynthesis+0xa1>
mov    $0x4000,%edi
lea    0xea5(%rip),%rsi
mov    $0x0,%al
call   1050 <mem_alloc@plt>
cltq
mov    %rax,0x2ee5(%rip)
mov    $0x4000,%edi
lea    0xe8c(%rip),%rsi
mov    $0x0,%al
call   1050 <mem_alloc@plt>
cltq
mov    %rax,0x2ec1(%rip)
mov    0x2eba(%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,0x2ea7(%rip)
mov    0x2ea0(%rip),%rdi
mov    $0x0,%al
call   1030 <read_syn_window@plt>
movl   $0x0,0x2e67(%rip)
movslq -0xc(%rbp),%rcx
lea    0x2e60(%rip),%rax
mov    (%rax,%rcx,4),%edx
sub    $0x40,%edx
and    $0x3ff,%edx
movslq -0xc(%rbp),%rcx
lea    0x2e49(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x2e5b(%rip),%rax
movslq -0xc(%rbp),%rcx
shl    $0xd,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rdx
lea    0x2e29(%rip),%rcx
movslq (%rcx,%rdx,4),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x40,-0x1c(%rbp)
jge    12b4 <SubBandSynthesis+0x184>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x20,-0x24(%rbp)
jge    1294 <SubBandSynthesis+0x164>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x2df0(%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    1242 <SubBandSynthesis+0x112>
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    1229 <SubBandSynthesis+0xf9>
movl   $0x0,-0x20(%rbp)
cmpl   $0x20,-0x20(%rbp)
jge    13f0 <SubBandSynthesis+0x2c0>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x10,-0x1c(%rbp)
jge    135b <SubBandSynthesis+0x22b>
mov    -0x20(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x5,%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    0x2d6d(%rip),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x2d55(%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
movslq -0xc(%rbp),%rsi
lea    0x2d12(%rip),%rdx
add    (%rdx,%rsi,4),%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    12d4 <SubBandSynthesis+0x1a4>
movsd  0xc9d(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x48(%rbp)
cmpq   $0x8000,-0x48(%rbp)
jl     139b <SubBandSynthesis+0x26b>
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    13dd <SubBandSynthesis+0x2ad>
cmpq   $0xffffffffffff8000,-0x48(%rbp)
ff
jge    13c5 <SubBandSynthesis+0x295>
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    13d8 <SubBandSynthesis+0x2a8>
mov    -0x48(%rbp),%rax
mov    %ax,%dx
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
jmp    13dd <SubBandSynthesis+0x2ad>
jmp    13e2 <SubBandSynthesis+0x2b2>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12bb <SubBandSynthesis+0x18b>
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    11b0 <SubBandSynthesis+0x80>
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>
movb   $0x1,0x2e98(%rip)
movslq %ebp,%rcx
lea    0x2e7e(%rip),%rax
mov    (%rax,%rcx,4),%edx
lea    0x3c0(%rdx),%esi
and    $0x3ff,%esi
mov    %esi,(%rax,%rcx,4)
shl    $0xd,%rcx
add    0x2e81(%rip),%rcx
lea    (%rcx,%rsi,8),%rax
mov    0x2e6e(%rip),%rsi
add    $0x18,%rsi
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
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    1200 <SubBandSynthesis+0xd0>
movsd  %xmm0,(%rax,%rdi,8)
add    $0x1,%rdi
add    $0x100,%rsi
cmp    $0x40,%rdi
jne    11f0 <SubBandSynthesis+0xc0>
mov    $0x100,%esi
add    0x2df6(%rip),%rsi
xor    %edi,%edi
movsd  0xd8c(%rip),%xmm0
xor    %eax,%eax
jmp    12a0 <SubBandSynthesis+0x170>
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     133a <SubBandSynthesis+0x20a>
xorpd  %xmm1,%xmm1
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
lea    (%rdx,%rbp,1),%ebx
add    $0x3c0,%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    $0x420,%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    12b0 <SubBandSynthesis+0x180>
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rbp
cmp    $0x8000,%rbp
jge    1280 <SubBandSynthesis+0x150>
cmp    $0xffffffffffff7fff,%rbp
jg     1330 <SubBandSynthesis+0x200>
movw   $0x8000,(%r14,%rdi,2)
jmp    1287 <SubBandSynthesis+0x157>
nopw   0x0(%rax,%rax,1)
mov    %bp,(%r14,%rdi,2)
jmp    128a <SubBandSynthesis+0x15a>
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 [2 x i32] [i32 64, 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 0, i32* @SubBandSynthesis.init
br label %31
31: ; preds = %16, %3
%32 = load i32, i32* %5
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [2 x i32], [2 x i32]* @SubBandSynthesis.bufOffset, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = sub nsw i32 %35, 64
%37 = and i32 %36, 1023
%38 = load i32, i32* %5
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [2 x i32], [2 x i32]* @SubBandSynthesis.bufOffset, i64 0, i64 %39
store i32 %37, i32* %40
%41 = load [2 x [1024 x double]]*, [2 x [1024 x double]]** @SubBandSynthesis.buf
%42 = load i32, i32* %5
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [2 x [1024 x double]], [2 x [1024 x double]]* %41, i64 0, i64 %43
%45 = load i32, i32* %5
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [2 x i32], [2 x i32]* @SubBandSynthesis.bufOffset, i64 0, i64 %46
%48 = load i32, i32* %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [1024 x double], [1024 x double]* %44, i64 0, i64 %49
store double* %50, double** %10
store i32 0, i32* %7
br label %51
51: ; preds = %83, %31
%52 = load i32, i32* %7
%53 = icmp slt i32 %52, 64
br i1 %53, label %54, label %86
54: ; preds = %51
store double 0.000000e+00, double* %11
store i32 0, i32* %9
br label %55
55: ; preds = %74, %54
%56 = load i32, i32* %9
%57 = icmp slt i32 %56, 32
br i1 %57, label %58, label %77
58: ; preds = %55
%59 = load double*, double** %4
%60 = load i32, i32* %9
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %59, i64 %61
%63 = load double, double* %62
%64 = load [64 x [32 x double]]*, [64 x [32 x double]]** @SubBandSynthesis.filter
%65 = load i32, i32* %7
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %64, i64 0, i64 %66
%68 = load i32, i32* %9
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [32 x double], [32 x double]* %67, i64 0, i64 %69
%71 = load double, double* %70
%72 = load double, double* %11
%73 = call double @llvm.fmuladd.f64(double %63, double %71, double %72)
store double %73, double* %11
br label %74
74: ; preds = %58
%75 = load i32, i32* %9
%76 = add nsw i32 %75, 1
store i32 %76, i32* %9
br label %55
77: ; preds = %55
%78 = load double, double* %11
%79 = load double*, double** %10
%80 = load i32, i32* %7
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds double, double* %79, i64 %81
store double %78, double* %82
br label %83
83: ; preds = %77
%84 = load i32, i32* %7
%85 = add nsw i32 %84, 1
store i32 %85, i32* %7
br label %51
86: ; preds = %51
store i32 0, i32* %8
br label %87
87: ; preds = %160, %86
%88 = load i32, i32* %8
%89 = icmp slt i32 %88, 32
br i1 %89, label %90, label %163
90: ; preds = %87
store double 0.000000e+00, double* %11
store i32 0, i32* %7
br label %91
91: ; preds = %125, %90
%92 = load i32, i32* %7
%93 = icmp slt i32 %92, 16
br i1 %93, label %94, label %128
94: ; preds = %91
%95 = load i32, i32* %8
%96 = load i32, i32* %7
%97 = shl i32 %96, 5
%98 = add nsw i32 %95, %97
store i32 %98, i32* %9
%99 = load double*, double** @SubBandSynthesis.window
%100 = load i32, i32* %9
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %99, i64 %101
%103 = load double, double* %102
%104 = load [2 x [1024 x double]]*, [2 x [1024 x double]]** @SubBandSynthesis.buf
%105 = load i32, i32* %5
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [2 x [1024 x double]], [2 x [1024 x double]]* %104, i64 0, i64 %106
%108 = load i32, i32* %9
%109 = load i32, i32* %7
%110 = add nsw i32 %109, 1
%111 = ashr i32 %110, 1
%112 = shl i32 %111, 6
%113 = add nsw i32 %108, %112
%114 = load i32, i32* %5
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [2 x i32], [2 x i32]* @SubBandSynthesis.bufOffset, i64 0, i64 %115
%117 = load i32, i32* %116
%118 = add nsw i32 %113, %117
%119 = and i32 %118, 1023
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds [1024 x double], [1024 x double]* %107, i64 0, i64 %120
%122 = load double, double* %121
%123 = load double, double* %11
%124 = call double @llvm.fmuladd.f64(double %103, double %122, double %123)
store double %124, double* %11
br label %125
125: ; preds = %94
%126 = load i32, i32* %7
%127 = add nsw i32 %126, 1
store i32 %127, i32* %7
br label %91
128: ; preds = %91
%129 = load double, double* %11
%130 = fmul double %129, 3.276800e+04
%131 = fptosi double %130 to i64
store i64 %131, i64* %13
%132 = load i64, i64* %13
%133 = icmp sge i64 %132, 32768
br i1 %133, label %134, label %141
134: ; preds = %128
%135 = load i16*, i16** %6
%136 = load i32, i32* %8
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds i16, i16* %135, i64 %137
store i16 32767, i16* %138
%139 = load i32, i32* %12
%140 = add nsw i32 %139, 1
store i32 %140, i32* %12
br label %159
141: ; preds = %128
%142 = load i64, i64* %13
%143 = icmp slt i64 %142, -32768
br i1 %143, label %144, label %151
144: ; preds = %141
%145 = load i16*, i16** %6
%146 = load i32, i32* %8
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i16, i16* %145, i64 %147
store i16 -32768, i16* %148
%149 = load i32, i32* %12
%150 = add nsw i32 %149, 1
store i32 %150, i32* %12
br label %158
151: ; preds = %141
%152 = load i64, i64* %13
%153 = trunc i64 %152 to i16
%154 = load i16*, i16** %6
%155 = load i32, i32* %8
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds i16, i16* %154, i64 %156
store i16 %153, i16* %157
br label %158
158: ; preds = %151, %144
br label %159
159: ; preds = %158, %134
br label %160
160: ; preds = %159
%161 = load i32, i32* %8
%162 = add nsw i32 %161, 1
store i32 %162, i32* %8
br label %87
163: ; preds = %87
%164 = load i32, i32* %12
ret i32 %164
}

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 [2 x i32] [i32 64, 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 i1 true, i1* @SubBandSynthesis.init
br label %18
18: ; preds = %5, %3
%19 = sext i32 %1 to i64
%20 = getelementptr inbounds [2 x i32], [2 x i32]* @SubBandSynthesis.bufOffset, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = add i32 %21, 960
%23 = and i32 %22, 1023
store i32 %23, i32* %20
%24 = load [2 x [1024 x double]]*, [2 x [1024 x double]]** @SubBandSynthesis.buf
%25 = zext i32 %23 to i64
%26 = getelementptr inbounds [2 x [1024 x double]], [2 x [1024 x double]]* %24, i64 0, i64 %19, i64 %25
%27 = load [64 x [32 x double]]*, [64 x [32 x double]]** @SubBandSynthesis.filter
br label %28
28: ; preds = %18, %60
%29 = phi i64 [ 0, %18 ], [ %62, %60 ]
br label %32
30: ; preds = %60
%31 = load double*, double** @SubBandSynthesis.window
br label %64
32: ; preds = %32, %28
%33 = phi i64 [ 0, %28 ], [ %58, %32 ]
%34 = phi double [ 0.000000e+00, %28 ], [ %57, %32 ]
%35 = getelementptr inbounds double, double* %0, i64 %33
%36 = load double, double* %35
%37 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %27, i64 0, i64 %29, i64 %33
%38 = load double, double* %37
%39 = tail call double @llvm.fmuladd.f64(double %36, double %38, double %34)
%40 = or i64 %33, 1
%41 = getelementptr inbounds double, double* %0, i64 %40
%42 = load double, double* %41
%43 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %27, i64 0, i64 %29, i64 %40
%44 = load double, double* %43
%45 = tail call double @llvm.fmuladd.f64(double %42, double %44, double %39)
%46 = or i64 %33, 2
%47 = getelementptr inbounds double, double* %0, i64 %46
%48 = load double, double* %47
%49 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %27, i64 0, i64 %29, i64 %46
%50 = load double, double* %49
%51 = tail call double @llvm.fmuladd.f64(double %48, double %50, double %45)
%52 = or i64 %33, 3
%53 = getelementptr inbounds double, double* %0, i64 %52
%54 = load double, double* %53
%55 = getelementptr inbounds [64 x [32 x double]], [64 x [32 x double]]* %27, i64 0, i64 %29, i64 %52
%56 = load double, double* %55
%57 = tail call double @llvm.fmuladd.f64(double %54, double %56, double %51)
%58 = add nuw nsw i64 %33, 4
%59 = icmp eq i64 %58, 32
br i1 %59, label %60, label %32
60: ; preds = %32
%61 = getelementptr inbounds double, double* %26, i64 %29
store double %57, double* %61
%62 = add nuw nsw i64 %29, 1
%63 = icmp eq i64 %62, 64
br i1 %63, label %30, label %28
64: ; preds = %30, %116
%65 = phi i64 [ 0, %30 ], [ %118, %116 ]
%66 = phi i32 [ 0, %30 ], [ %117, %116 ]
br label %67
67: ; preds = %67, %64
%68 = phi i64 [ 0, %64 ], [ %89, %67 ]
%69 = phi double [ 0.000000e+00, %64 ], [ %99, %67 ]
%70 = shl nuw nsw i64 %68, 5
%71 = add nuw nsw i64 %70, %65
%72 = getelementptr inbounds double, double* %31, i64 %71
%73 = load double, double* %72
%74 = trunc i64 %68 to i32
%75 = shl i32 %74, 5
%76 = trunc i64 %71 to i32
%77 = add i32 %22, %76
%78 = add i32 %77, %75
%79 = and i32 %78, 1023
%80 = zext i32 %79 to i64
%81 = getelementptr inbounds [2 x [1024 x double]], [2 x [1024 x double]]* %24, i64 0, i64 %19, i64 %80
%82 = load double, double* %81
%83 = tail call double @llvm.fmuladd.f64(double %73, double %82, double %69)
%84 = shl i64 %68, 5
%85 = or i64 %84, 32
%86 = add nuw nsw i64 %85, %65
%87 = getelementptr inbounds double, double* %31, i64 %86
%88 = load double, double* %87
%89 = add nuw nsw i64 %68, 2
%90 = trunc i64 %89 to i32
%91 = shl i32 %90, 5
%92 = trunc i64 %86 to i32
%93 = add i32 %22, %92
%94 = add i32 %93, %91
%95 = and i32 %94, 1023
%96 = zext i32 %95 to i64
%97 = getelementptr inbounds [2 x [1024 x double]], [2 x [1024 x double]]* %24, i64 0, i64 %19, i64 %96
%98 = load double, double* %97
%99 = tail call double @llvm.fmuladd.f64(double %88, double %98, double %83)
%100 = icmp eq i64 %89, 16
br i1 %100, label %101, label %67
101: ; preds = %67
%102 = fmul double %99, 3.276800e+04
%103 = fptosi double %102 to i64
%104 = icmp sgt i64 %103, 32767
br i1 %104, label %105, label %108
105: ; preds = %101
%106 = getelementptr inbounds i16, i16* %2, i64 %65
store i16 32767, i16* %106
%107 = add nsw i32 %66, 1
br label %116
108: ; preds = %101
%109 = icmp slt i64 %103, -32768
br i1 %109, label %110, label %113
110: ; preds = %108
%111 = getelementptr inbounds i16, i16* %2, i64 %65
store i16 -32768, i16* %111
%112 = add nsw i32 %66, 1
br label %116
113: ; preds = %108
%114 = trunc i64 %103 to i16
%115 = getelementptr inbounds i16, i16* %2, i64 %65
store i16 %114, i16* %115
br label %116
116: ; preds = %110, %113, %105
%117 = phi i32 [ %107, %105 ], [ %112, %110 ], [ %66, %113 ]
%118 = add nuw nsw i64 %65, 1
%119 = icmp eq i64 %118, 32
br i1 %119, label %120, label %64
120: ; preds = %116
ret i32 %117
}