#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ mem_alloc(int, char *);
int /*<<< orphan*/ memset(double ***, int /*<<< orphan*/, int);
int /*<<< orphan*/ read_ana_window(double *);
void window_subband(short **buffer, double z[64], int k) {
  typedef double XX[2][512];
  static XX *x;
  double *xk;
  int i;
  static int off[2] = {0, 0};
  static char init = 0;
  double t;
  static double enwindow[512];
  double *ep0, *ep1, *ep2, *ep3, *ep4, *ep5, *ep6, *ep7;
  if (!init) {
    read_ana_window(enwindow);
    x = (XX *)mem_alloc(sizeof(XX), "x");
    memset(x, 0, 2 * 512 * sizeof(double));
    init = 1;
  }
  xk = (*x)[k];
  {
    register double *xk_t = xk + off[k];
    for (i = 32; i--;)
      xk_t[i] = (double)*(*buffer)++;
  }
  ep0 = &enwindow[0];
  ep1 = &enwindow[64];
  ep2 = &enwindow[128];
  ep3 = &enwindow[192];
  ep4 = &enwindow[256];
  ep5 = &enwindow[320];
  ep6 = &enwindow[384];
  ep7 = &enwindow[448];
  for (i = 0; i < 64; i++) {
    t = xk[(i + off[k]) & (512 - 1)] * *ep0++;
    t += xk[(i + 64 + off[k]) & (512 - 1)] * *ep1++;
    t += xk[(i + 128 + off[k]) & (512 - 1)] * *ep2++;
    t += xk[(i + 192 + off[k]) & (512 - 1)] * *ep3++;
    t += xk[(i + 256 + off[k]) & (512 - 1)] * *ep4++;
    t += xk[(i + 320 + off[k]) & (512 - 1)] * *ep5++;
    t += xk[(i + 384 + off[k]) & (512 - 1)] * *ep6++;
    t += xk[(i + 448 + off[k]) & (512 - 1)] * *ep7++;
    z[i] = t;
  }
  off[k] += 480;
  off[k] &= 512 - 1;
}


x86 assembly (clang, -O0):
<window_subband>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpb   $0x0,0x2f13(%rip)
jne    1191 <window_subband+0x61>
lea    0x2f16(%rip),%rdi
call   1040 <read_ana_window@plt>
mov    $0x2000,%edi
lea    0xe95(%rip),%rsi
call   1050 <mem_alloc@plt>
mov    %rax,0x2ed9(%rip)
mov    0x2ed2(%rip),%rdi
xor    %esi,%esi
mov    $0x2000,%edx
call   1030 <memset@plt>
movb   $0x1,0x2ecf(%rip)
mov    0x2eb8(%rip),%rax
movslq -0x14(%rbp),%rcx
shl    $0xc,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rdx
lea    0x2ea2(%rip),%rcx
movslq (%rcx,%rdx,4),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
movl   $0x20,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x24(%rbp)
cmp    $0x0,%eax
je     120a <window_subband+0xda>
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x2,%rdx
mov    %rdx,(%rcx)
movswl (%rax),%eax
cvtsi2sd %eax,%xmm0
mov    -0x78(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    11cc <window_subband+0x9c>
lea    0x2e5f(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0x2e54(%rip),%rax
add    $0x200,%rax
mov    %rax,-0x40(%rbp)
lea    0x2e43(%rip),%rax
add    $0x400,%rax
mov    %rax,-0x48(%rbp)
lea    0x2e32(%rip),%rax
add    $0x600,%rax
mov    %rax,-0x50(%rbp)
lea    0x2e21(%rip),%rax
add    $0x800,%rax
mov    %rax,-0x58(%rbp)
lea    0x2e10(%rip),%rax
add    $0xa00,%rax
mov    %rax,-0x60(%rbp)
lea    0x2dff(%rip),%rax
add    $0xc00,%rax
mov    %rax,-0x68(%rbp)
lea    0x2dee(%rip),%rax
add    $0xe00,%rax
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x40,-0x24(%rbp)
jge    1517 <window_subband+0x3e7>
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
movslq -0x14(%rbp),%rsi
lea    0x2da9(%rip),%rdx
add    (%rdx,%rsi,4),%ecx
and    $0x1ff,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x38(%rbp)
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x40,%ecx
movslq -0x14(%rbp),%rsi
lea    0x2d6b(%rip),%rdx
add    (%rdx,%rsi,4),%ecx
and    $0x1ff,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x40(%rbp)
movsd  (%rax),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x80,%ecx
movslq -0x14(%rbp),%rsi
lea    0x2d1d(%rip),%rdx
add    (%rdx,%rsi,4),%ecx
and    $0x1ff,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  (%rax),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0xc0,%ecx
movslq -0x14(%rbp),%rsi
lea    0x2ccf(%rip),%rdx
add    (%rdx,%rsi,4),%ecx
and    $0x1ff,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x50(%rbp)
movsd  (%rax),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x100,%ecx
movslq -0x14(%rbp),%rsi
lea    0x2c81(%rip),%rdx
add    (%rdx,%rsi,4),%ecx
and    $0x1ff,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x58(%rbp)
movsd  (%rax),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x140,%ecx
movslq -0x14(%rbp),%rsi
lea    0x2c33(%rip),%rdx
add    (%rdx,%rsi,4),%ecx
and    $0x1ff,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x60(%rbp)
movsd  (%rax),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x180,%ecx
movslq -0x14(%rbp),%rsi
lea    0x2be5(%rip),%rdx
add    (%rdx,%rsi,4),%ecx
and    $0x1ff,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x68(%rbp)
movsd  (%rax),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1c0,%ecx
movslq -0x14(%rbp),%rsi
lea    0x2b97(%rip),%rdx
add    (%rdx,%rsi,4),%ecx
and    $0x1ff,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x70(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x70(%rbp)
movsd  (%rax),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1293 <window_subband+0x163>
movslq -0x14(%rbp),%rcx
lea    0x2b36(%rip),%rax
mov    (%rax,%rcx,4),%edx
add    $0x1e0,%edx
lea    0x2b26(%rip),%rax
mov    %edx,(%rax,%rcx,4)
movslq -0x14(%rbp),%rcx
lea    0x2b18(%rip),%rax
mov    (%rax,%rcx,4),%edx
and    $0x1ff,%edx
lea    0x2b08(%rip),%rax
mov    %edx,(%rax,%rcx,4)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<window_subband>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%r14
cmpb   $0x0,0x2f1d(%rip)
jne    117f <window_subband+0x4f>
lea    0x2f24(%rip),%rdi
call   1040 <read_ana_window@plt>
lea    0xea8(%rip),%rsi
mov    $0x2000,%edi
call   1050 <mem_alloc@plt>
mov    %rax,0x2ee7(%rip)
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x2000,%edx
call   1030 <memset@plt>
movb   $0x1,0x2ee1(%rip)
movslq %ebp,%rax
lea    0x2ecf(%rip),%r8
mov    (%r8,%rax,4),%edx
mov    %rax,%rsi
shl    $0xc,%rsi
add    0x2eb5(%rip),%rsi
mov    (%r14),%rbp
movd   0x0(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
movslq %edx,%rdi
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0xf0(%rsi,%rdi,8)
movd   0x4(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0xe0(%rsi,%rdi,8)
movd   0x8(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0xd0(%rsi,%rdi,8)
movd   0xc(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0xc0(%rsi,%rdi,8)
movd   0x10(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0xb0(%rsi,%rdi,8)
movd   0x14(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0xa0(%rsi,%rdi,8)
movd   0x18(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0x90(%rsi,%rdi,8)
movd   0x1c(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0x80(%rsi,%rdi,8)
movd   0x20(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0x70(%rsi,%rdi,8)
movd   0x24(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0x60(%rsi,%rdi,8)
movd   0x28(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0x50(%rsi,%rdi,8)
movd   0x2c(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0x40(%rsi,%rdi,8)
movd   0x30(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0x30(%rsi,%rdi,8)
movd   0x34(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
lea    0x40(%rbp),%rcx
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0x20(%rsi,%rdi,8)
movd   0x38(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0x10(%rsi,%rdi,8)
movd   0x3c(%rbp),%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
shufpd $0x1,%xmm0,%xmm0
movupd %xmm0,(%rsi,%rdi,8)
mov    %rcx,(%r14)
xor    %edi,%edi
lea    0x2ce6(%rip),%rbp
nopw   0x0(%rax,%rax,1)
lea    (%rdx,%rdi,1),%ecx
and    $0x1ff,%ecx
movsd  (%rsi,%rcx,8),%xmm0
mulsd  0x0(%rbp,%rdi,8),%xmm0
lea    (%rdx,%rdi,1),%ecx
add    $0x40,%ecx
and    $0x1ff,%ecx
movsd  (%rsi,%rcx,8),%xmm1
mulsd  0x200(%rbp,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
lea    (%rdx,%rdi,1),%ecx
add    $0x80,%ecx
and    $0x1ff,%ecx
movsd  (%rsi,%rcx,8),%xmm0
mulsd  0x400(%rbp,%rdi,8),%xmm0
addsd  %xmm1,%xmm0
lea    (%rdx,%rdi,1),%ecx
add    $0xc0,%ecx
and    $0x1ff,%ecx
movsd  (%rsi,%rcx,8),%xmm1
mulsd  0x600(%rbp,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
lea    (%rdx,%rdi,1),%ecx
add    $0x100,%ecx
and    $0x1ff,%ecx
movsd  (%rsi,%rcx,8),%xmm0
mulsd  0x800(%rbp,%rdi,8),%xmm0
addsd  %xmm1,%xmm0
lea    (%rdx,%rdi,1),%ecx
add    $0x140,%ecx
and    $0x1ff,%ecx
movsd  (%rsi,%rcx,8),%xmm1
mulsd  0xa00(%rbp,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
lea    (%rdx,%rdi,1),%ecx
add    $0x180,%ecx
and    $0x1ff,%ecx
movsd  (%rsi,%rcx,8),%xmm0
mulsd  0xc00(%rbp,%rdi,8),%xmm0
addsd  %xmm1,%xmm0
lea    (%rdx,%rdi,1),%ecx
add    $0x1c0,%ecx
and    $0x1ff,%ecx
movsd  (%rsi,%rcx,8),%xmm1
mulsd  0xe00(%rbp,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rdi,8)
add    $0x1,%rdi
cmp    $0x40,%rdi
jne    1390 <window_subband+0x260>
add    $0x1e0,%edx
and    $0x1ff,%edx
mov    %edx,(%r8,%rax,4)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@window_subband.x = internal global [2 x [512 x double]]* null
@window_subband.off = internal global [2 x i32] zeroinitializer
@window_subband.init = internal global i8 0
@window_subband.enwindow = internal global [512 x double] zeroinitializer
@.str = [2 x i8] c"x\00"
define void @window_subband(i16** %0, double* %1, i32 %2) {
%4 = alloca i16**
%5 = alloca double*
%6 = alloca i32
%7 = alloca double*
%8 = alloca i32
%9 = alloca double
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
store i16** %0, i16*** %4
store double* %1, double** %5
store i32 %2, i32* %6
%19 = load i8, i8* @window_subband.init
%20 = icmp ne i8 %19, 0
br i1 %20, label %28, label %21
21: ; preds = %3
%22 = call i32 @read_ana_window(double* getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 0))
%23 = call i64 @mem_alloc(i32 8192, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = inttoptr i64 %23 to [2 x [512 x double]]*
store [2 x [512 x double]]* %24, [2 x [512 x double]]** @window_subband.x
%25 = load [2 x [512 x double]]*, [2 x [512 x double]]** @window_subband.x
%26 = bitcast [2 x [512 x double]]* %25 to double***
%27 = call i32 @memset(double*** %26, i32 0, i32 8192)
store i8 1, i8* @window_subband.init
br label %28
28: ; preds = %21, %3
%29 = load [2 x [512 x double]]*, [2 x [512 x double]]** @window_subband.x
%30 = load i32, i32* %6
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [2 x [512 x double]], [2 x [512 x double]]* %29, i64 0, i64 %31
%33 = getelementptr inbounds [512 x double], [512 x double]* %32, i64 0, i64 0
store double* %33, double** %7
%34 = load double*, double** %7
%35 = load i32, i32* %6
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %36
%38 = load i32, i32* %37
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %34, i64 %39
store double* %40, double** %18
store i32 32, i32* %8
br label %41
41: ; preds = %45, %28
%42 = load i32, i32* %8
%43 = add nsw i32 %42, -1
store i32 %43, i32* %8
%44 = icmp ne i32 %42, 0
br i1 %44, label %45, label %55
45: ; preds = %41
%46 = load i16**, i16*** %4
%47 = load i16*, i16** %46
%48 = getelementptr inbounds i16, i16* %47, i32 1
store i16* %48, i16** %46
%49 = load i16, i16* %47
%50 = sitofp i16 %49 to double
%51 = load double*, double** %18
%52 = load i32, i32* %8
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double, double* %51, i64 %53
store double %50, double* %54
br label %41
55: ; preds = %41
store double* getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 0), double** %10
store double* getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 64), double** %11
store double* getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 128), double** %12
store double* getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 192), double** %13
store double* getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 256), double** %14
store double* getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 320), double** %15
store double* getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 384), double** %16
store double* getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 448), double** %17
store i32 0, i32* %8
br label %56
56: ; preds = %199, %55
%57 = load i32, i32* %8
%58 = icmp slt i32 %57, 64
br i1 %58, label %59, label %202
59: ; preds = %56
%60 = load double*, double** %7
%61 = load i32, i32* %8
%62 = load i32, i32* %6
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %63
%65 = load i32, i32* %64
%66 = add nsw i32 %61, %65
%67 = and i32 %66, 511
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %60, i64 %68
%70 = load double, double* %69
%71 = load double*, double** %10
%72 = getelementptr inbounds double, double* %71, i32 1
store double* %72, double** %10
%73 = load double, double* %71
%74 = fmul double %70, %73
store double %74, double* %9
%75 = load double*, double** %7
%76 = load i32, i32* %8
%77 = add nsw i32 %76, 64
%78 = load i32, i32* %6
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %79
%81 = load i32, i32* %80
%82 = add nsw i32 %77, %81
%83 = and i32 %82, 511
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %75, i64 %84
%86 = load double, double* %85
%87 = load double*, double** %11
%88 = getelementptr inbounds double, double* %87, i32 1
store double* %88, double** %11
%89 = load double, double* %87
%90 = load double, double* %9
%91 = call double @llvm.fmuladd.f64(double %86, double %89, double %90)
store double %91, double* %9
%92 = load double*, double** %7
%93 = load i32, i32* %8
%94 = add nsw i32 %93, 128
%95 = load i32, i32* %6
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %96
%98 = load i32, i32* %97
%99 = add nsw i32 %94, %98
%100 = and i32 %99, 511
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %92, i64 %101
%103 = load double, double* %102
%104 = load double*, double** %12
%105 = getelementptr inbounds double, double* %104, i32 1
store double* %105, double** %12
%106 = load double, double* %104
%107 = load double, double* %9
%108 = call double @llvm.fmuladd.f64(double %103, double %106, double %107)
store double %108, double* %9
%109 = load double*, double** %7
%110 = load i32, i32* %8
%111 = add nsw i32 %110, 192
%112 = load i32, i32* %6
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %113
%115 = load i32, i32* %114
%116 = add nsw i32 %111, %115
%117 = and i32 %116, 511
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %109, i64 %118
%120 = load double, double* %119
%121 = load double*, double** %13
%122 = getelementptr inbounds double, double* %121, i32 1
store double* %122, double** %13
%123 = load double, double* %121
%124 = load double, double* %9
%125 = call double @llvm.fmuladd.f64(double %120, double %123, double %124)
store double %125, double* %9
%126 = load double*, double** %7
%127 = load i32, i32* %8
%128 = add nsw i32 %127, 256
%129 = load i32, i32* %6
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %130
%132 = load i32, i32* %131
%133 = add nsw i32 %128, %132
%134 = and i32 %133, 511
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %126, i64 %135
%137 = load double, double* %136
%138 = load double*, double** %14
%139 = getelementptr inbounds double, double* %138, i32 1
store double* %139, double** %14
%140 = load double, double* %138
%141 = load double, double* %9
%142 = call double @llvm.fmuladd.f64(double %137, double %140, double %141)
store double %142, double* %9
%143 = load double*, double** %7
%144 = load i32, i32* %8
%145 = add nsw i32 %144, 320
%146 = load i32, i32* %6
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %147
%149 = load i32, i32* %148
%150 = add nsw i32 %145, %149
%151 = and i32 %150, 511
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double, double* %143, i64 %152
%154 = load double, double* %153
%155 = load double*, double** %15
%156 = getelementptr inbounds double, double* %155, i32 1
store double* %156, double** %15
%157 = load double, double* %155
%158 = load double, double* %9
%159 = call double @llvm.fmuladd.f64(double %154, double %157, double %158)
store double %159, double* %9
%160 = load double*, double** %7
%161 = load i32, i32* %8
%162 = add nsw i32 %161, 384
%163 = load i32, i32* %6
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %164
%166 = load i32, i32* %165
%167 = add nsw i32 %162, %166
%168 = and i32 %167, 511
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds double, double* %160, i64 %169
%171 = load double, double* %170
%172 = load double*, double** %16
%173 = getelementptr inbounds double, double* %172, i32 1
store double* %173, double** %16
%174 = load double, double* %172
%175 = load double, double* %9
%176 = call double @llvm.fmuladd.f64(double %171, double %174, double %175)
store double %176, double* %9
%177 = load double*, double** %7
%178 = load i32, i32* %8
%179 = add nsw i32 %178, 448
%180 = load i32, i32* %6
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %181
%183 = load i32, i32* %182
%184 = add nsw i32 %179, %183
%185 = and i32 %184, 511
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds double, double* %177, i64 %186
%188 = load double, double* %187
%189 = load double*, double** %17
%190 = getelementptr inbounds double, double* %189, i32 1
store double* %190, double** %17
%191 = load double, double* %189
%192 = load double, double* %9
%193 = call double @llvm.fmuladd.f64(double %188, double %191, double %192)
store double %193, double* %9
%194 = load double, double* %9
%195 = load double*, double** %5
%196 = load i32, i32* %8
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds double, double* %195, i64 %197
store double %194, double* %198
br label %199
199: ; preds = %59
%200 = load i32, i32* %8
%201 = add nsw i32 %200, 1
store i32 %201, i32* %8
br label %56
202: ; preds = %56
%203 = load i32, i32* %6
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %204
%206 = load i32, i32* %205
%207 = add nsw i32 %206, 480
store i32 %207, i32* %205
%208 = load i32, i32* %6
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %209
%211 = load i32, i32* %210
%212 = and i32 %211, 511
store i32 %212, i32* %210
ret void
}

LLVM IR (-O2):
@window_subband.x = internal unnamed_addr global [2 x [512 x double]]* null
@window_subband.off = internal unnamed_addr global [2 x i32] zeroinitializer
@window_subband.init = internal unnamed_addr global i1 false
@window_subband.enwindow = internal global [512 x double] zeroinitializer
@.str = [2 x i8] c"x\00"
define void @window_subband(i16** nocapture %0, double* nocapture writeonly %1, i32 %2) {
%4 = load i1, i1* @window_subband.init
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = tail call i32 @read_ana_window(double* getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 0))
%7 = tail call i64 @mem_alloc(i32 8192, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = inttoptr i64 %7 to [2 x [512 x double]]*
store [2 x [512 x double]]* %8, [2 x [512 x double]]** @window_subband.x
%9 = inttoptr i64 %7 to double***
%10 = tail call i32 @memset(double*** %9, i32 0, i32 8192)
store i1 true, i1* @window_subband.init
br label %11
11: ; preds = %5, %3
%12 = load [2 x [512 x double]]*, [2 x [512 x double]]** @window_subband.x
%13 = sext i32 %2 to i64
%14 = getelementptr inbounds [2 x i32], [2 x i32]* @window_subband.off, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [2 x [512 x double]], [2 x [512 x double]]* %12, i64 0, i64 %13, i64 %16
%18 = load i16*, i16** %0
%19 = getelementptr i16, i16* %18, i64 32
%20 = bitcast i16* %18 to <2 x i16>*
%21 = load <2 x i16>, <2 x i16>* %20
%22 = sitofp <2 x i16> %21 to <2 x double>
%23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%24 = getelementptr inbounds double, double* %17, i64 30
%25 = bitcast double* %24 to <2 x double>*
store <2 x double> %23, <2 x double>* %25
%26 = getelementptr i16, i16* %18, i64 2
%27 = bitcast i16* %26 to <2 x i16>*
%28 = load <2 x i16>, <2 x i16>* %27
%29 = sitofp <2 x i16> %28 to <2 x double>
%30 = shufflevector <2 x double> %29, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%31 = getelementptr inbounds double, double* %17, i64 28
%32 = bitcast double* %31 to <2 x double>*
store <2 x double> %30, <2 x double>* %32
%33 = getelementptr i16, i16* %18, i64 4
%34 = bitcast i16* %33 to <2 x i16>*
%35 = load <2 x i16>, <2 x i16>* %34
%36 = sitofp <2 x i16> %35 to <2 x double>
%37 = shufflevector <2 x double> %36, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%38 = getelementptr inbounds double, double* %17, i64 26
%39 = bitcast double* %38 to <2 x double>*
store <2 x double> %37, <2 x double>* %39
%40 = getelementptr i16, i16* %18, i64 6
%41 = bitcast i16* %40 to <2 x i16>*
%42 = load <2 x i16>, <2 x i16>* %41
%43 = sitofp <2 x i16> %42 to <2 x double>
%44 = shufflevector <2 x double> %43, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%45 = getelementptr inbounds double, double* %17, i64 24
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> %44, <2 x double>* %46
%47 = getelementptr i16, i16* %18, i64 8
%48 = bitcast i16* %47 to <2 x i16>*
%49 = load <2 x i16>, <2 x i16>* %48
%50 = sitofp <2 x i16> %49 to <2 x double>
%51 = shufflevector <2 x double> %50, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%52 = getelementptr inbounds double, double* %17, i64 22
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> %51, <2 x double>* %53
%54 = getelementptr i16, i16* %18, i64 10
%55 = bitcast i16* %54 to <2 x i16>*
%56 = load <2 x i16>, <2 x i16>* %55
%57 = sitofp <2 x i16> %56 to <2 x double>
%58 = shufflevector <2 x double> %57, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%59 = getelementptr inbounds double, double* %17, i64 20
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> %58, <2 x double>* %60
%61 = getelementptr i16, i16* %18, i64 12
%62 = bitcast i16* %61 to <2 x i16>*
%63 = load <2 x i16>, <2 x i16>* %62
%64 = sitofp <2 x i16> %63 to <2 x double>
%65 = shufflevector <2 x double> %64, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%66 = getelementptr inbounds double, double* %17, i64 18
%67 = bitcast double* %66 to <2 x double>*
store <2 x double> %65, <2 x double>* %67
%68 = getelementptr i16, i16* %18, i64 14
%69 = bitcast i16* %68 to <2 x i16>*
%70 = load <2 x i16>, <2 x i16>* %69
%71 = sitofp <2 x i16> %70 to <2 x double>
%72 = shufflevector <2 x double> %71, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%73 = getelementptr inbounds double, double* %17, i64 16
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> %72, <2 x double>* %74
%75 = getelementptr i16, i16* %18, i64 16
%76 = bitcast i16* %75 to <2 x i16>*
%77 = load <2 x i16>, <2 x i16>* %76
%78 = sitofp <2 x i16> %77 to <2 x double>
%79 = shufflevector <2 x double> %78, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%80 = getelementptr inbounds double, double* %17, i64 14
%81 = bitcast double* %80 to <2 x double>*
store <2 x double> %79, <2 x double>* %81
%82 = getelementptr i16, i16* %18, i64 18
%83 = bitcast i16* %82 to <2 x i16>*
%84 = load <2 x i16>, <2 x i16>* %83
%85 = sitofp <2 x i16> %84 to <2 x double>
%86 = shufflevector <2 x double> %85, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%87 = getelementptr inbounds double, double* %17, i64 12
%88 = bitcast double* %87 to <2 x double>*
store <2 x double> %86, <2 x double>* %88
%89 = getelementptr i16, i16* %18, i64 20
%90 = bitcast i16* %89 to <2 x i16>*
%91 = load <2 x i16>, <2 x i16>* %90
%92 = sitofp <2 x i16> %91 to <2 x double>
%93 = shufflevector <2 x double> %92, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%94 = getelementptr inbounds double, double* %17, i64 10
%95 = bitcast double* %94 to <2 x double>*
store <2 x double> %93, <2 x double>* %95
%96 = getelementptr i16, i16* %18, i64 22
%97 = bitcast i16* %96 to <2 x i16>*
%98 = load <2 x i16>, <2 x i16>* %97
%99 = sitofp <2 x i16> %98 to <2 x double>
%100 = shufflevector <2 x double> %99, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%101 = getelementptr inbounds double, double* %17, i64 8
%102 = bitcast double* %101 to <2 x double>*
store <2 x double> %100, <2 x double>* %102
%103 = getelementptr i16, i16* %18, i64 24
%104 = bitcast i16* %103 to <2 x i16>*
%105 = load <2 x i16>, <2 x i16>* %104
%106 = sitofp <2 x i16> %105 to <2 x double>
%107 = shufflevector <2 x double> %106, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%108 = getelementptr inbounds double, double* %17, i64 6
%109 = bitcast double* %108 to <2 x double>*
store <2 x double> %107, <2 x double>* %109
%110 = getelementptr i16, i16* %18, i64 26
%111 = bitcast i16* %110 to <2 x i16>*
%112 = load <2 x i16>, <2 x i16>* %111
%113 = sitofp <2 x i16> %112 to <2 x double>
%114 = shufflevector <2 x double> %113, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%115 = getelementptr inbounds double, double* %17, i64 4
%116 = bitcast double* %115 to <2 x double>*
store <2 x double> %114, <2 x double>* %116
%117 = getelementptr i16, i16* %18, i64 28
%118 = bitcast i16* %117 to <2 x i16>*
%119 = load <2 x i16>, <2 x i16>* %118
%120 = sitofp <2 x i16> %119 to <2 x double>
%121 = shufflevector <2 x double> %120, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%122 = getelementptr inbounds double, double* %17, i64 2
%123 = bitcast double* %122 to <2 x double>*
store <2 x double> %121, <2 x double>* %123
%124 = getelementptr i16, i16* %18, i64 30
%125 = bitcast i16* %124 to <2 x i16>*
%126 = load <2 x i16>, <2 x i16>* %125
%127 = sitofp <2 x i16> %126 to <2 x double>
%128 = shufflevector <2 x double> %127, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%129 = bitcast double* %17 to <2 x double>*
store <2 x double> %128, <2 x double>* %129
store i16* %19, i16** %0
br label %130
130: ; preds = %11, %130
%131 = phi i64 [ 0, %11 ], [ %206, %130 ]
%132 = phi double* [ getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 448), %11 ], [ %202, %130 ]
%133 = phi double* [ getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 384), %11 ], [ %194, %130 ]
%134 = phi double* [ getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 320), %11 ], [ %186, %130 ]
%135 = phi double* [ getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 256), %11 ], [ %178, %130 ]
%136 = phi double* [ getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 192), %11 ], [ %170, %130 ]
%137 = phi double* [ getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 128), %11 ], [ %162, %130 ]
%138 = phi double* [ getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 64), %11 ], [ %154, %130 ]
%139 = phi double* [ getelementptr inbounds ([512 x double], [512 x double]* @window_subband.enwindow, i64 0, i64 0), %11 ], [ %146, %130 ]
%140 = trunc i64 %131 to i32
%141 = add i32 %15, %140
%142 = and i32 %141, 511
%143 = zext i32 %142 to i64
%144 = getelementptr inbounds [2 x [512 x double]], [2 x [512 x double]]* %12, i64 0, i64 %13, i64 %143
%145 = load double, double* %144
%146 = getelementptr inbounds double, double* %139, i64 1
%147 = load double, double* %139
%148 = fmul double %145, %147
%149 = add i32 %141, 64
%150 = and i32 %149, 511
%151 = zext i32 %150 to i64
%152 = getelementptr inbounds [2 x [512 x double]], [2 x [512 x double]]* %12, i64 0, i64 %13, i64 %151
%153 = load double, double* %152
%154 = getelementptr inbounds double, double* %138, i64 1
%155 = load double, double* %138
%156 = tail call double @llvm.fmuladd.f64(double %153, double %155, double %148)
%157 = add i32 %141, 128
%158 = and i32 %157, 511
%159 = zext i32 %158 to i64
%160 = getelementptr inbounds [2 x [512 x double]], [2 x [512 x double]]* %12, i64 0, i64 %13, i64 %159
%161 = load double, double* %160
%162 = getelementptr inbounds double, double* %137, i64 1
%163 = load double, double* %137
%164 = tail call double @llvm.fmuladd.f64(double %161, double %163, double %156)
%165 = add i32 %141, 192
%166 = and i32 %165, 511
%167 = zext i32 %166 to i64
%168 = getelementptr inbounds [2 x [512 x double]], [2 x [512 x double]]* %12, i64 0, i64 %13, i64 %167
%169 = load double, double* %168
%170 = getelementptr inbounds double, double* %136, i64 1
%171 = load double, double* %136
%172 = tail call double @llvm.fmuladd.f64(double %169, double %171, double %164)
%173 = add i32 %141, 256
%174 = and i32 %173, 511
%175 = zext i32 %174 to i64
%176 = getelementptr inbounds [2 x [512 x double]], [2 x [512 x double]]* %12, i64 0, i64 %13, i64 %175
%177 = load double, double* %176
%178 = getelementptr inbounds double, double* %135, i64 1
%179 = load double, double* %135
%180 = tail call double @llvm.fmuladd.f64(double %177, double %179, double %172)
%181 = add i32 %141, 320
%182 = and i32 %181, 511
%183 = zext i32 %182 to i64
%184 = getelementptr inbounds [2 x [512 x double]], [2 x [512 x double]]* %12, i64 0, i64 %13, i64 %183
%185 = load double, double* %184
%186 = getelementptr inbounds double, double* %134, i64 1
%187 = load double, double* %134
%188 = tail call double @llvm.fmuladd.f64(double %185, double %187, double %180)
%189 = add i32 %141, 384
%190 = and i32 %189, 511
%191 = zext i32 %190 to i64
%192 = getelementptr inbounds [2 x [512 x double]], [2 x [512 x double]]* %12, i64 0, i64 %13, i64 %191
%193 = load double, double* %192
%194 = getelementptr inbounds double, double* %133, i64 1
%195 = load double, double* %133
%196 = tail call double @llvm.fmuladd.f64(double %193, double %195, double %188)
%197 = add i32 %141, 448
%198 = and i32 %197, 511
%199 = zext i32 %198 to i64
%200 = getelementptr inbounds [2 x [512 x double]], [2 x [512 x double]]* %12, i64 0, i64 %13, i64 %199
%201 = load double, double* %200
%202 = getelementptr inbounds double, double* %132, i64 1
%203 = load double, double* %132
%204 = tail call double @llvm.fmuladd.f64(double %201, double %203, double %196)
%205 = getelementptr inbounds double, double* %1, i64 %131
store double %204, double* %205
%206 = add nuw nsw i64 %131, 1
%207 = icmp eq i64 %206, 64
br i1 %207, label %208, label %130
208: ; preds = %130
%209 = add nsw i32 %15, 480
%210 = and i32 %209, 511
store i32 %210, i32* %14
ret void
}