#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 */
int /*<<< orphan*/ getfilter(void (*)(), void (*)(), void (*)(), void (*)(),
                             char, int);
int /*<<< orphan*/ memcpy(float *, float *, int);
int wavelet_reconstruct3(float *reccovector, int colength, float *outvector,
                         int Xlength, int Ylength, int Zlength,
                         char Filterlength, char Levels, char Skip,
                         char ifnotSilent) {
  float *vector = NULL;
  int scale, xlength, ylength, zlength, maxscale;
  int mxlength, mylength, mzlength;
  float *LLL = NULL, *LHH = NULL, *LLH = NULL, *LHL = NULL;
  float *HLL = NULL, *HHH = NULL, *HLH = NULL, *HHL = NULL;
  float *LLLv = NULL;
  int skipsize;
  int Size;
  int LLLsubsize;
  int LLHsubsize;
  int LHLsubsize;
  int LHHsubsize;
  int HLHsubsize;
  int HHLsubsize;
  int HHHsubsize;
  int HLLsubsize;
  int finalxlength, finalylength, finalzlength;
  int finalLLLsize;
  int ifnotallskip = 1;
  void (*bioR_3d)();
  void (*bioR_skip_3d)();
  void (*bioR_3d_char)();
  void (*bioR_skip_3d_char)();
  getfilter(&bioR_3d, &bioR_skip_3d, &bioR_3d_char, &bioR_skip_3d_char,
            -Filterlength, 7);
  Skip = (Skip < Levels ? Skip : Levels);
  Size = Xlength * Ylength * Zlength;
  xlength = 1 + ((Xlength - 1) >> Skip);
  ylength = 1 + ((Ylength - 1) >> Skip);
  zlength = 1 + ((Zlength - 1) >> Skip);
  skipsize = xlength * ylength * zlength;
  maxscale = Levels - 1;
  finalxlength = 1 + ((Xlength - 1) >> (maxscale + 1));
  finalylength = 1 + ((Ylength - 1) >> (maxscale + 1));
  finalzlength = 1 + ((Zlength - 1) >> (maxscale + 1));
  finalLLLsize = finalxlength * finalylength * finalzlength;
  if (Levels == 0)
    skipsize = Xlength * Ylength * Zlength;
  vector = outvector;
  if (maxscale < 0) {
    memcpy(outvector, reccovector, Size * sizeof(float));
    return 0;
  }
  scale = maxscale;
  LLLv = reccovector + skipsize;
  xlength = Xlength;
  ylength = Ylength;
  zlength = Zlength;
  LLLsubsize = zlength * ylength * xlength;
  while (scale >= Skip) {
    xlength = 1 + ((Xlength - 1) >> scale);
    ylength = 1 + ((Ylength - 1) >> scale);
    zlength = 1 + ((Zlength - 1) >> scale);
    mxlength = (xlength + 1) >> 1;
    mylength = (ylength + 1) >> 1;
    mzlength = (zlength + 1) >> 1;
    vector = outvector;
    LLLsubsize = mzlength * mylength * mxlength;
    LLHsubsize = mzlength * mylength * (xlength - mxlength);
    LHLsubsize = mzlength * (ylength - mylength) * mxlength;
    LHHsubsize = mzlength * (ylength - mylength) * (xlength - mxlength);
    HLLsubsize = (zlength - mzlength) * mylength * mxlength;
    HLHsubsize = (zlength - mzlength) * mylength * (xlength - mxlength);
    HHLsubsize = (zlength - mzlength) * (ylength - mylength) * mxlength;
    HHHsubsize =
        (zlength - mzlength) * (ylength - mylength) * (xlength - mxlength);
    if (scale == maxscale)
      LLL = reccovector;
    LLH = reccovector + LLLsubsize;
    LHL = LLH + LLHsubsize;
    LHH = LHL + LHLsubsize;
    HLL = LHH + LHHsubsize;
    HLH = HLL + HLLsubsize;
    HHL = HLH + HLHsubsize;
    HHH = HHL + HHLsubsize;
    ifnotallskip = (scale < Skip ? 0 : 1);
    if (scale < maxscale)
      LLL = outvector;
    zlength = 1 + ((Zlength - 1) >> scale);
    vector = outvector;
    if (scale == 0) {
      bioR_3d_char(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, outvector, xlength,
                   ylength, zlength, ifnotallskip);
    } else {
      bioR_3d(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, vector, xlength, ylength,
              zlength, ifnotallskip);
    }
    LLL = vector;
    scale--;
  }
  LLL = outvector;
  while (scale >= 0) {
    ifnotallskip = 0;
    xlength = 1 + ((Xlength - 1) >> scale);
    ylength = 1 + ((Ylength - 1) >> scale);
    zlength = 1 + ((Zlength - 1) >> scale);
    if (scale == 0) {
      bioR_3d_char(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, outvector, xlength,
                   ylength, zlength, ifnotallskip);
    } else {
      bioR_3d(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, vector, xlength, ylength,
              zlength, ifnotallskip);
    }
    LLL = vector;
    scale--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<wavelet_reconstruct3>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    0x28(%rbp),%al
mov    0x20(%rbp),%al
mov    0x18(%rbp),%al
mov    0x10(%rbp),%al
mov    %rdi,-0x38(%rbp)
mov    %esi,-0x3c(%rbp)
mov    %rdx,-0x48(%rbp)
mov    %ecx,-0x4c(%rbp)
mov    %r8d,-0x50(%rbp)
mov    %r9d,-0x54(%rbp)
movq   $0x0,-0x60(%rbp)
movq   $0x0,-0x88(%rbp)
movq   $0x0,-0x90(%rbp)
movq   $0x0,-0x98(%rbp)
movq   $0x0,-0xa0(%rbp)
movq   $0x0,-0xa8(%rbp)
movq   $0x0,-0xb0(%rbp)
movq   $0x0,-0xb8(%rbp)
movq   $0x0,-0xc0(%rbp)
movq   $0x0,-0xc8(%rbp)
movl   $0x1,-0x104(%rbp)
lea    -0x110(%rbp),%rdi
lea    -0x118(%rbp),%rsi
lea    -0x120(%rbp),%rdx
lea    -0x128(%rbp),%rcx
movsbl 0x10(%rbp),%r8d
xor    %eax,%eax
sub    %r8d,%eax
mov    $0x7,%r9d
movsbl %al,%r8d
call   1040 <getfilter@plt>
movsbl 0x20(%rbp),%eax
movsbl 0x18(%rbp),%ecx
cmp    %ecx,%eax
jge    121f <wavelet_reconstruct3+0xff>
movsbl 0x20(%rbp),%eax
mov    %eax,-0x12c(%rbp)
jmp    1229 <wavelet_reconstruct3+0x109>
movsbl 0x18(%rbp),%eax
mov    %eax,-0x12c(%rbp)
mov    -0x12c(%rbp),%eax
mov    %al,0x20(%rbp)
mov    -0x4c(%rbp),%eax
imul   -0x50(%rbp),%eax
imul   -0x54(%rbp),%eax
mov    %eax,-0xd0(%rbp)
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
movsbl 0x20(%rbp),%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
mov    -0x50(%rbp),%eax
sub    $0x1,%eax
movsbl 0x20(%rbp),%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
movsbl 0x20(%rbp),%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x68(%rbp),%eax
imul   -0x6c(%rbp),%eax
imul   -0x70(%rbp),%eax
mov    %eax,-0xcc(%rbp)
movsbl 0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
mov    -0x74(%rbp),%ecx
add    $0x1,%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
mov    -0x50(%rbp),%eax
sub    $0x1,%eax
mov    -0x74(%rbp),%ecx
add    $0x1,%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
mov    -0x74(%rbp),%ecx
add    $0x1,%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0xfc(%rbp)
mov    -0xf4(%rbp),%eax
imul   -0xf8(%rbp),%eax
imul   -0xfc(%rbp),%eax
mov    %eax,-0x100(%rbp)
movsbl 0x18(%rbp),%eax
cmp    $0x0,%eax
jne    1311 <wavelet_reconstruct3+0x1f1>
mov    -0x4c(%rbp),%eax
imul   -0x50(%rbp),%eax
imul   -0x54(%rbp),%eax
mov    %eax,-0xcc(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmpl   $0x0,-0x74(%rbp)
jge    1349 <wavelet_reconstruct3+0x229>
mov    -0x48(%rbp),%rdi
mov    -0x38(%rbp),%rsi
movslq -0xd0(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
movl   $0x0,-0x2c(%rbp)
jmp    1863 <wavelet_reconstruct3+0x743>
mov    -0x74(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x38(%rbp),%rax
movslq -0xcc(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0xc8(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x70(%rbp),%eax
imul   -0x6c(%rbp),%eax
imul   -0x68(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    -0x64(%rbp),%eax
movsbl 0x20(%rbp),%ecx
cmp    %ecx,%eax
jl     16f0 <wavelet_reconstruct3+0x5d0>
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
mov    -0x64(%rbp),%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
mov    -0x50(%rbp),%eax
sub    $0x1,%eax
mov    -0x64(%rbp),%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
mov    -0x64(%rbp),%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x80(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x80(%rbp),%eax
imul   -0x7c(%rbp),%eax
imul   -0x78(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    -0x80(%rbp),%eax
imul   -0x7c(%rbp),%eax
mov    -0x68(%rbp),%ecx
sub    -0x78(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xd8(%rbp)
mov    -0x80(%rbp),%eax
mov    -0x6c(%rbp),%ecx
sub    -0x7c(%rbp),%ecx
imul   %ecx,%eax
imul   -0x78(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    -0x80(%rbp),%eax
mov    -0x6c(%rbp),%ecx
sub    -0x7c(%rbp),%ecx
imul   %ecx,%eax
mov    -0x68(%rbp),%ecx
sub    -0x78(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xe0(%rbp)
mov    -0x70(%rbp),%eax
sub    -0x80(%rbp),%eax
imul   -0x7c(%rbp),%eax
imul   -0x78(%rbp),%eax
mov    %eax,-0xf0(%rbp)
mov    -0x70(%rbp),%eax
sub    -0x80(%rbp),%eax
imul   -0x7c(%rbp),%eax
mov    -0x68(%rbp),%ecx
sub    -0x78(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xe4(%rbp)
mov    -0x70(%rbp),%eax
sub    -0x80(%rbp),%eax
mov    -0x6c(%rbp),%ecx
sub    -0x7c(%rbp),%ecx
imul   %ecx,%eax
imul   -0x78(%rbp),%eax
mov    %eax,-0xe8(%rbp)
mov    -0x70(%rbp),%eax
sub    -0x80(%rbp),%eax
mov    -0x6c(%rbp),%ecx
sub    -0x7c(%rbp),%ecx
imul   %ecx,%eax
mov    -0x68(%rbp),%ecx
sub    -0x78(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xec(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x74(%rbp),%eax
jne    14cc <wavelet_reconstruct3+0x3ac>
mov    -0x38(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x38(%rbp),%rax
movslq -0xd4(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
movslq -0xd8(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
movslq -0xdc(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
movslq -0xe0(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rax
movslq -0xf0(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rax
movslq -0xe4(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
movslq -0xe8(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0xb0(%rbp)
mov    -0x64(%rbp),%edx
movsbl 0x20(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x104(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    15bd <wavelet_reconstruct3+0x49d>
mov    -0x48(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
mov    -0x64(%rbp),%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmpl   $0x0,-0x64(%rbp)
jne    165e <wavelet_reconstruct3+0x53e>
mov    -0x120(%rbp),%r10
mov    -0xb0(%rbp),%rdi
mov    -0xc0(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
mov    -0xa8(%rbp),%rcx
mov    -0x90(%rbp),%r8
mov    -0xa0(%rbp),%r9
mov    -0x98(%rbp),%r13
mov    -0x88(%rbp),%r12
mov    -0x48(%rbp),%r15
mov    -0x68(%rbp),%r14d
mov    -0x6c(%rbp),%ebx
mov    -0x70(%rbp),%r11d
mov    -0x104(%rbp),%eax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14d,0x18(%rsp)
mov    %ebx,0x20(%rsp)
mov    %r11d,0x28(%rsp)
mov    %eax,0x30(%rsp)
mov    $0x0,%al
call   *%r10
jmp    16d7 <wavelet_reconstruct3+0x5b7>
mov    -0x110(%rbp),%r10
mov    -0xb0(%rbp),%rdi
mov    -0xc0(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
mov    -0xa8(%rbp),%rcx
mov    -0x90(%rbp),%r8
mov    -0xa0(%rbp),%r9
mov    -0x98(%rbp),%r13
mov    -0x88(%rbp),%r12
mov    -0x60(%rbp),%r15
mov    -0x68(%rbp),%r14d
mov    -0x6c(%rbp),%ebx
mov    -0x70(%rbp),%r11d
mov    -0x104(%rbp),%eax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14d,0x18(%rsp)
mov    %ebx,0x20(%rsp)
mov    %r11d,0x28(%rsp)
mov    %eax,0x30(%rsp)
mov    $0x0,%al
call   *%r10
mov    -0x60(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x64(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x64(%rbp)
jmp    138b <wavelet_reconstruct3+0x26b>
mov    -0x48(%rbp),%rax
mov    %rax,-0x88(%rbp)
cmpl   $0x0,-0x64(%rbp)
jl     185c <wavelet_reconstruct3+0x73c>
movl   $0x0,-0x104(%rbp)
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
mov    -0x64(%rbp),%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
mov    -0x50(%rbp),%eax
sub    $0x1,%eax
mov    -0x64(%rbp),%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
mov    -0x64(%rbp),%ecx
sar    %cl,%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
cmpl   $0x0,-0x64(%rbp)
jne    17ca <wavelet_reconstruct3+0x6aa>
mov    -0x120(%rbp),%r10
mov    -0xb0(%rbp),%rdi
mov    -0xc0(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
mov    -0xa8(%rbp),%rcx
mov    -0x90(%rbp),%r8
mov    -0xa0(%rbp),%r9
mov    -0x98(%rbp),%r13
mov    -0x88(%rbp),%r12
mov    -0x48(%rbp),%r15
mov    -0x68(%rbp),%r14d
mov    -0x6c(%rbp),%ebx
mov    -0x70(%rbp),%r11d
mov    -0x104(%rbp),%eax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14d,0x18(%rsp)
mov    %ebx,0x20(%rsp)
mov    %r11d,0x28(%rsp)
mov    %eax,0x30(%rsp)
mov    $0x0,%al
call   *%r10
jmp    1843 <wavelet_reconstruct3+0x723>
mov    -0x110(%rbp),%r10
mov    -0xb0(%rbp),%rdi
mov    -0xc0(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
mov    -0xa8(%rbp),%rcx
mov    -0x90(%rbp),%r8
mov    -0xa0(%rbp),%r9
mov    -0x98(%rbp),%r13
mov    -0x88(%rbp),%r12
mov    -0x60(%rbp),%r15
mov    -0x68(%rbp),%r14d
mov    -0x6c(%rbp),%ebx
mov    -0x70(%rbp),%r11d
mov    -0x104(%rbp),%eax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14d,0x18(%rsp)
mov    %ebx,0x20(%rsp)
mov    %r11d,0x28(%rsp)
mov    %eax,0x30(%rsp)
mov    $0x0,%al
call   *%r10
mov    -0x60(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x64(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x64(%rbp)
jmp    16fb <wavelet_reconstruct3+0x5db>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<wavelet_reconstruct3>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9d,%r13d
mov    %r8d,%ebx
mov    %ecx,%ebp
mov    %rdx,%r15
mov    %rdi,%r14
movsbl 0xd8(%rsp),%r12d
xor    %eax,%eax
sub    0xd0(%rsp),%al
movsbl %al,%r8d
lea    0x58(%rsp),%rdi
lea    0x90(%rsp),%rsi
lea    0x50(%rsp),%rdx
lea    0x88(%rsp),%rcx
mov    $0x7,%r9d
call   1040 <getfilter@plt>
mov    0xe0(%rsp),%ecx
mov    %r12,%rax
cmp    %al,%cl
mov    %ecx,%r8d
cmovge %eax,%r8d
test   %al,%al
jle    142b <wavelet_reconstruct3+0x30b>
mov    %r15,%r12
mov    %r14,%r15
add    $0xffffffff,%ebp
add    $0xffffffff,%ebx
add    $0xffffffff,%r13d
lea    -0x1(%rax),%r14d
cmp    %al,%cl
mov    %ebp,0xc(%rsp)
mov    %r13d,0x1c(%rsp)
mov    %ebx,0x18(%rsp)
jge    1447 <wavelet_reconstruct3+0x327>
mov    %ebp,%esi
mov    %rax,0x48(%rsp)
mov    %r14d,%ecx
sar    %cl,%esi
mov    %ebx,%edx
sar    %cl,%edx
lea    0x1(%rsi),%r10d
mov    %r10,0x78(%rsp)
mov    %r13d,%edi
sar    %cl,%edi
lea    0x1(%rdx),%eax
mov    %rax,0x80(%rsp)
lea    0x1(%rdi),%ebp
mov    %rbp,0x70(%rsp)
add    $0x2,%esi
sar    %esi
add    $0x2,%edx
sar    %edx
add    $0x2,%edi
sar    %edi
mov    %eax,%ecx
sub    %edx,%ecx
mov    %ecx,%ebx
imul   %edi,%ebx
sub    %edi,%ebp
imul   %edx,%edi
mov    %edi,%r9d
mov    %r10d,%eax
sub    %esi,%eax
imul   %eax,%edi
mov    %r12,0x68(%rsp)
mov    %ebx,%r11d
imul   %eax,%ebx
imul   %ebp,%edx
mov    %edx,%r10d
imul   %eax,%edx
imul   %esi,%r9d
imul   %esi,%r11d
imul   %esi,%r10d
imul   %esi,%ecx
movsbl %r8b,%eax
mov    %eax,0x44(%rsp)
imul   %ebp,%ecx
movslq %r9d,%rax
mov    %r15,0x60(%rsp)
lea    (%r15,%rax,4),%rsi
mov    %rsi,0x10(%rsp)
movslq %edi,%rax
lea    (%rsi,%rax,4),%r15
movslq %r11d,%rax
mov    0x68(%rsp),%r12
lea    (%r15,%rax,4),%r13
movslq %ebx,%rax
lea    0x0(%r13,%rax,4),%r8
movslq %r10d,%rax
lea    (%r8,%rax,4),%rbx
movslq %edx,%rax
lea    (%rbx,%rax,4),%rsi
movslq %ecx,%rax
lea    (%rsi,%rax,4),%rdi
test   %r14d,%r14d
lea    0x58(%rsp),%r10
lea    0x50(%rsp),%rax
cmove  %rax,%r10
sub    $0x8,%rsp
mov    %rdi,0x30(%rsp)
mov    %rsi,0x38(%rsp)
mov    %rbx,0x28(%rsp)
mov    %rbx,%rdx
mov    %r8,0x40(%rsp)
mov    %r8,%rcx
mov    %r13,%r8
mov    %r15,%r9
xor    %eax,%eax
push   $0x1
push   0x80(%rsp)
push   0x98(%rsp)
push   0x98(%rsp)
push   %r12
push   0x90(%rsp)
mov    0x48(%rsp),%rbp
push   %rbp
call   *(%r10)
mov    0x88(%rsp),%rcx
mov    0x84(%rsp),%eax
add    $0x40,%rsp
add    $0xfffffffe,%ecx
cmp    %eax,%r14d
jle    153d <wavelet_reconstruct3+0x41d>
mov    %ecx,%r14d
mov    0xc(%rsp),%ebp
nopl   0x0(%rax)
mov    %ebp,%edx
mov    %r14d,%ecx
sar    %cl,%edx
mov    0x18(%rsp),%eax
sar    %cl,%eax
mov    0x1c(%rsp),%ecx
mov    %ecx,%esi
mov    %r14d,%ecx
sar    %cl,%esi
lea    0x1(%rdx),%ebp
mov    %rbp,0x48(%rsp)
lea    0x1(%rax),%ecx
mov    %rcx,0x10(%rsp)
lea    0x1(%rsi),%r11d
add    $0x2,%edx
sar    %edx
add    $0x2,%eax
sar    %eax
add    $0x2,%esi
sar    %esi
sub    %eax,%ecx
mov    %ecx,%edi
imul   %esi,%edi
mov    %r11d,%ebx
sub    %esi,%ebx
imul   %eax,%esi
mov    %esi,%r8d
sub    %edx,%ebp
imul   %ebp,%esi
mov    %edi,%r9d
imul   %ebp,%edi
imul   %ebx,%eax
mov    %eax,%r12d
imul   %ebp,%eax
imul   %edx,%r8d
imul   %edx,%r9d
imul   %edx,%r12d
imul   %edx,%ecx
imul   %ebx,%ecx
movslq %r8d,%rdx
mov    0x60(%rsp),%rbx
lea    (%rbx,%rdx,4),%r10
movslq %esi,%rdx
lea    (%r10,%rdx,4),%r15
movslq %r9d,%rdx
lea    (%r15,%rdx,4),%r13
movslq %edi,%rdx
lea    0x0(%r13,%rdx,4),%rbp
movslq %r12d,%rdx
lea    0x0(%rbp,%rdx,4),%rdx
cltq
lea    (%rdx,%rax,4),%rsi
movslq %ecx,%rax
lea    (%rsi,%rax,4),%rdi
sub    $0x1,%r14d
lea    0x58(%rsp),%rbx
lea    0x50(%rsp),%rax
cmovb  %rax,%rbx
sub    $0x8,%rsp
mov    %rdi,0x30(%rsp)
mov    %rsi,0x38(%rsp)
mov    %rdx,0x28(%rsp)
mov    %rbp,0x40(%rsp)
mov    %rbp,%rcx
mov    %r13,%r8
mov    %r15,%r9
xor    %eax,%eax
push   $0x1
push   %r11
mov    0x80(%rsp),%r12
push   0x28(%rsp)
push   0x68(%rsp)
push   %r12
push   %r12
mov    %r10,%rbp
mov    %r10,0x48(%rsp)
push   %r10
mov    0x4c(%rsp),%ebp
call   *(%rbx)
add    $0x40,%rsp
lea    0x1(%r14),%eax
cmp    0x44(%rsp),%eax
jg     1310 <wavelet_reconstruct3+0x1f0>
jmp    1470 <wavelet_reconstruct3+0x350>
imul   %ebx,%ebp
imul   %r13d,%ebp
shl    $0x2,%ebp
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
jmp    1591 <wavelet_reconstruct3+0x471>
xor    %eax,%eax
mov    %rax,0x28(%rsp)
xor    %eax,%eax
mov    %rax,0x20(%rsp)
xor    %eax,%eax
mov    %rax,0x30(%rsp)
xor    %eax,%eax
mov    %rax,0x38(%rsp)
xor    %r15d,%r15d
xor    %eax,%eax
mov    %rax,0x10(%rsp)
xor    %r13d,%r13d
test   %r14d,%r14d
js     1591 <wavelet_reconstruct3+0x471>
mov    %r13,%rdx
mov    %ebp,%r10d
mov    %r14d,%ecx
sar    %cl,%r10d
mov    0x18(%rsp),%eax
mov    %eax,%ebp
sar    %cl,%ebp
mov    0x1c(%rsp),%eax
mov    %eax,%ebx
sar    %cl,%ebx
add    $0x1,%r10d
add    $0x1,%ebp
add    $0x1,%ebx
test   %r14d,%r14d
je     154f <wavelet_reconstruct3+0x42f>
add    $0xffffffff,%r14d
mov    0x10(%rsp),%r11
mov    %r12,%r13
mov    %rdx,%r12
mov    0x20(%rsp),%rdx
nopl   0x0(%rax)
sub    $0x8,%rsp
mov    0x30(%rsp),%rdi
mov    0x38(%rsp),%rsi
mov    0x40(%rsp),%rcx
mov    %r12,%r8
mov    %r15,%r9
xor    %eax,%eax
push   $0x0
push   %rbx
push   %rbp
push   %r10
push   %r13
push   %r13
push   %r11
call   *0x98(%rsp)
mov    0x68(%rsp),%rdi
mov    0x70(%rsp),%rsi
mov    0x60(%rsp),%rdx
mov    %r15,%r9
mov    0x50(%rsp),%r11
add    $0x40,%rsp
mov    0xc(%rsp),%eax
mov    %eax,%r10d
mov    %r14d,%ecx
sar    %cl,%r10d
mov    0x18(%rsp),%eax
mov    %eax,%ebp
sar    %cl,%ebp
mov    0x1c(%rsp),%eax
mov    %eax,%ebx
sar    %cl,%ebx
mov    0x38(%rsp),%rcx
add    $0x1,%r10d
add    $0x1,%ebp
add    $0x1,%ebx
add    $0xffffffff,%r14d
jb     14c0 <wavelet_reconstruct3+0x3a0>
jmp    1571 <wavelet_reconstruct3+0x451>
mov    %ecx,%r14d
mov    0xc(%rsp),%ebp
test   %r14d,%r14d
jns    1479 <wavelet_reconstruct3+0x359>
jmp    1591 <wavelet_reconstruct3+0x471>
mov    0x10(%rsp),%r11
mov    %r15,%r9
mov    %r12,%r13
mov    %rdx,%r12
mov    0x38(%rsp),%rcx
mov    0x20(%rsp),%rdx
mov    0x30(%rsp),%rsi
mov    0x28(%rsp),%rdi
sub    $0x8,%rsp
mov    %r12,%r8
xor    %eax,%eax
push   $0x0
push   %rbx
push   %rbp
push   %r10
push   %r13
push   %r13
push   %r11
call   *0x90(%rsp)
add    $0x40,%rsp
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wavelet_reconstruct3(float* %0, i32 %1, float* %2, i32 %3, i32 %4, i32 %5, i8 signext %6, i8 signext %7, i8 signext %8, i8 signext %9) {
%11 = alloca i32
%12 = alloca float*
%13 = alloca i32
%14 = alloca float*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i8
%19 = alloca i8
%20 = alloca i8
%21 = alloca i8
%22 = alloca float*
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca float*
%32 = alloca float*
%33 = alloca float*
%34 = alloca float*
%35 = alloca float*
%36 = alloca float*
%37 = alloca float*
%38 = alloca float*
%39 = alloca float*
%40 = alloca i32
%41 = alloca i32
%42 = alloca i32
%43 = alloca i32
%44 = alloca i32
%45 = alloca i32
%46 = alloca i32
%47 = alloca i32
%48 = alloca i32
%49 = alloca i32
%50 = alloca i32
%51 = alloca i32
%52 = alloca i32
%53 = alloca i32
%54 = alloca i32
%55 = alloca void (...)*
%56 = alloca void (...)*
%57 = alloca void (...)*
%58 = alloca void (...)*
store float* %0, float** %12
store i32 %1, i32* %13
store float* %2, float** %14
store i32 %3, i32* %15
store i32 %4, i32* %16
store i32 %5, i32* %17
store i8 %6, i8* %18
store i8 %7, i8* %19
store i8 %8, i8* %20
store i8 %9, i8* %21
store float* null, float** %22
store float* null, float** %31
store float* null, float** %32
store float* null, float** %33
store float* null, float** %34
store float* null, float** %35
store float* null, float** %36
store float* null, float** %37
store float* null, float** %38
store float* null, float** %39
store i32 1, i32* %54
%59 = bitcast void (...)** %55 to void (...)*
%60 = bitcast void (...)** %56 to void (...)*
%61 = bitcast void (...)** %57 to void (...)*
%62 = bitcast void (...)** %58 to void (...)*
%63 = load i8, i8* %18
%64 = sext i8 %63 to i32
%65 = sub nsw i32 0, %64
%66 = trunc i32 %65 to i8
%67 = call i32 @getfilter(void (...)* %59, void (...)* %60, void (...)* %61, void (...)* %62, i8 signext %66, i32 7)
%68 = load i8, i8* %20
%69 = sext i8 %68 to i32
%70 = load i8, i8* %19
%71 = sext i8 %70 to i32
%72 = icmp slt i32 %69, %71
br i1 %72, label %73, label %76
73: ; preds = %10
%74 = load i8, i8* %20
%75 = sext i8 %74 to i32
br label %79
76: ; preds = %10
%77 = load i8, i8* %19
%78 = sext i8 %77 to i32
br label %79
79: ; preds = %76, %73
%80 = phi i32 [ %75, %73 ], [ %78, %76 ]
%81 = trunc i32 %80 to i8
store i8 %81, i8* %20
%82 = load i32, i32* %15
%83 = load i32, i32* %16
%84 = mul nsw i32 %82, %83
%85 = load i32, i32* %17
%86 = mul nsw i32 %84, %85
store i32 %86, i32* %41
%87 = load i32, i32* %15
%88 = sub nsw i32 %87, 1
%89 = load i8, i8* %20
%90 = sext i8 %89 to i32
%91 = ashr i32 %88, %90
%92 = add nsw i32 1, %91
store i32 %92, i32* %24
%93 = load i32, i32* %16
%94 = sub nsw i32 %93, 1
%95 = load i8, i8* %20
%96 = sext i8 %95 to i32
%97 = ashr i32 %94, %96
%98 = add nsw i32 1, %97
store i32 %98, i32* %25
%99 = load i32, i32* %17
%100 = sub nsw i32 %99, 1
%101 = load i8, i8* %20
%102 = sext i8 %101 to i32
%103 = ashr i32 %100, %102
%104 = add nsw i32 1, %103
store i32 %104, i32* %26
%105 = load i32, i32* %24
%106 = load i32, i32* %25
%107 = mul nsw i32 %105, %106
%108 = load i32, i32* %26
%109 = mul nsw i32 %107, %108
store i32 %109, i32* %40
%110 = load i8, i8* %19
%111 = sext i8 %110 to i32
%112 = sub nsw i32 %111, 1
store i32 %112, i32* %27
%113 = load i32, i32* %15
%114 = sub nsw i32 %113, 1
%115 = load i32, i32* %27
%116 = add nsw i32 %115, 1
%117 = ashr i32 %114, %116
%118 = add nsw i32 1, %117
store i32 %118, i32* %50
%119 = load i32, i32* %16
%120 = sub nsw i32 %119, 1
%121 = load i32, i32* %27
%122 = add nsw i32 %121, 1
%123 = ashr i32 %120, %122
%124 = add nsw i32 1, %123
store i32 %124, i32* %51
%125 = load i32, i32* %17
%126 = sub nsw i32 %125, 1
%127 = load i32, i32* %27
%128 = add nsw i32 %127, 1
%129 = ashr i32 %126, %128
%130 = add nsw i32 1, %129
store i32 %130, i32* %52
%131 = load i32, i32* %50
%132 = load i32, i32* %51
%133 = mul nsw i32 %131, %132
%134 = load i32, i32* %52
%135 = mul nsw i32 %133, %134
store i32 %135, i32* %53
%136 = load i8, i8* %19
%137 = sext i8 %136 to i32
%138 = icmp eq i32 %137, 0
br i1 %138, label %139, label %145
139: ; preds = %79
%140 = load i32, i32* %15
%141 = load i32, i32* %16
%142 = mul nsw i32 %140, %141
%143 = load i32, i32* %17
%144 = mul nsw i32 %142, %143
store i32 %144, i32* %40
br label %145
145: ; preds = %139, %79
%146 = load float*, float** %14
store float* %146, float** %22
%147 = load i32, i32* %27
%148 = icmp slt i32 %147, 0
br i1 %148, label %149, label %157
149: ; preds = %145
%150 = load float*, float** %14
%151 = load float*, float** %12
%152 = load i32, i32* %41
%153 = sext i32 %152 to i64
%154 = mul i64 %153, 4
%155 = trunc i64 %154 to i32
%156 = call i32 @memcpy(float* %150, float* %151, i32 %155)
store i32 0, i32* %11
br label %416
157: ; preds = %145
%158 = load i32, i32* %27
store i32 %158, i32* %23
%159 = load float*, float** %12
%160 = load i32, i32* %40
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds float, float* %159, i64 %161
store float* %162, float** %39
%163 = load i32, i32* %15
store i32 %163, i32* %24
%164 = load i32, i32* %16
store i32 %164, i32* %25
%165 = load i32, i32* %17
store i32 %165, i32* %26
%166 = load i32, i32* %26
%167 = load i32, i32* %25
%168 = mul nsw i32 %166, %167
%169 = load i32, i32* %24
%170 = mul nsw i32 %168, %169
store i32 %170, i32* %42
br label %171
171: ; preds = %352, %157
%172 = load i32, i32* %23
%173 = load i8, i8* %20
%174 = sext i8 %173 to i32
%175 = icmp sge i32 %172, %174
br i1 %175, label %176, label %356
176: ; preds = %171
%177 = load i32, i32* %15
%178 = sub nsw i32 %177, 1
%179 = load i32, i32* %23
%180 = ashr i32 %178, %179
%181 = add nsw i32 1, %180
store i32 %181, i32* %24
%182 = load i32, i32* %16
%183 = sub nsw i32 %182, 1
%184 = load i32, i32* %23
%185 = ashr i32 %183, %184
%186 = add nsw i32 1, %185
store i32 %186, i32* %25
%187 = load i32, i32* %17
%188 = sub nsw i32 %187, 1
%189 = load i32, i32* %23
%190 = ashr i32 %188, %189
%191 = add nsw i32 1, %190
store i32 %191, i32* %26
%192 = load i32, i32* %24
%193 = add nsw i32 %192, 1
%194 = ashr i32 %193, 1
store i32 %194, i32* %28
%195 = load i32, i32* %25
%196 = add nsw i32 %195, 1
%197 = ashr i32 %196, 1
store i32 %197, i32* %29
%198 = load i32, i32* %26
%199 = add nsw i32 %198, 1
%200 = ashr i32 %199, 1
store i32 %200, i32* %30
%201 = load float*, float** %14
store float* %201, float** %22
%202 = load i32, i32* %30
%203 = load i32, i32* %29
%204 = mul nsw i32 %202, %203
%205 = load i32, i32* %28
%206 = mul nsw i32 %204, %205
store i32 %206, i32* %42
%207 = load i32, i32* %30
%208 = load i32, i32* %29
%209 = mul nsw i32 %207, %208
%210 = load i32, i32* %24
%211 = load i32, i32* %28
%212 = sub nsw i32 %210, %211
%213 = mul nsw i32 %209, %212
store i32 %213, i32* %43
%214 = load i32, i32* %30
%215 = load i32, i32* %25
%216 = load i32, i32* %29
%217 = sub nsw i32 %215, %216
%218 = mul nsw i32 %214, %217
%219 = load i32, i32* %28
%220 = mul nsw i32 %218, %219
store i32 %220, i32* %44
%221 = load i32, i32* %30
%222 = load i32, i32* %25
%223 = load i32, i32* %29
%224 = sub nsw i32 %222, %223
%225 = mul nsw i32 %221, %224
%226 = load i32, i32* %24
%227 = load i32, i32* %28
%228 = sub nsw i32 %226, %227
%229 = mul nsw i32 %225, %228
store i32 %229, i32* %45
%230 = load i32, i32* %26
%231 = load i32, i32* %30
%232 = sub nsw i32 %230, %231
%233 = load i32, i32* %29
%234 = mul nsw i32 %232, %233
%235 = load i32, i32* %28
%236 = mul nsw i32 %234, %235
store i32 %236, i32* %49
%237 = load i32, i32* %26
%238 = load i32, i32* %30
%239 = sub nsw i32 %237, %238
%240 = load i32, i32* %29
%241 = mul nsw i32 %239, %240
%242 = load i32, i32* %24
%243 = load i32, i32* %28
%244 = sub nsw i32 %242, %243
%245 = mul nsw i32 %241, %244
store i32 %245, i32* %46
%246 = load i32, i32* %26
%247 = load i32, i32* %30
%248 = sub nsw i32 %246, %247
%249 = load i32, i32* %25
%250 = load i32, i32* %29
%251 = sub nsw i32 %249, %250
%252 = mul nsw i32 %248, %251
%253 = load i32, i32* %28
%254 = mul nsw i32 %252, %253
store i32 %254, i32* %47
%255 = load i32, i32* %26
%256 = load i32, i32* %30
%257 = sub nsw i32 %255, %256
%258 = load i32, i32* %25
%259 = load i32, i32* %29
%260 = sub nsw i32 %258, %259
%261 = mul nsw i32 %257, %260
%262 = load i32, i32* %24
%263 = load i32, i32* %28
%264 = sub nsw i32 %262, %263
%265 = mul nsw i32 %261, %264
store i32 %265, i32* %48
%266 = load i32, i32* %23
%267 = load i32, i32* %27
%268 = icmp eq i32 %266, %267
br i1 %268, label %269, label %271
269: ; preds = %176
%270 = load float*, float** %12
store float* %270, float** %31
br label %271
271: ; preds = %269, %176
%272 = load float*, float** %12
%273 = load i32, i32* %42
%274 = sext i32 %273 to i64
%275 = getelementptr inbounds float, float* %272, i64 %274
store float* %275, float** %33
%276 = load float*, float** %33
%277 = load i32, i32* %43
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds float, float* %276, i64 %278
store float* %279, float** %34
%280 = load float*, float** %34
%281 = load i32, i32* %44
%282 = sext i32 %281 to i64
%283 = getelementptr inbounds float, float* %280, i64 %282
store float* %283, float** %32
%284 = load float*, float** %32
%285 = load i32, i32* %45
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds float, float* %284, i64 %286
store float* %287, float** %35
%288 = load float*, float** %35
%289 = load i32, i32* %49
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds float, float* %288, i64 %290
store float* %291, float** %37
%292 = load float*, float** %37
%293 = load i32, i32* %46
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds float, float* %292, i64 %294
store float* %295, float** %38
%296 = load float*, float** %38
%297 = load i32, i32* %47
%298 = sext i32 %297 to i64
%299 = getelementptr inbounds float, float* %296, i64 %298
store float* %299, float** %36
%300 = load i32, i32* %23
%301 = load i8, i8* %20
%302 = sext i8 %301 to i32
%303 = icmp slt i32 %300, %302
%304 = zext i1 %303 to i64
%305 = select i1 %303, i32 0, i32 1
store i32 %305, i32* %54
%306 = load i32, i32* %23
%307 = load i32, i32* %27
%308 = icmp slt i32 %306, %307
br i1 %308, label %309, label %311
309: ; preds = %271
%310 = load float*, float** %14
store float* %310, float** %31
br label %311
311: ; preds = %309, %271
%312 = load i32, i32* %17
%313 = sub nsw i32 %312, 1
%314 = load i32, i32* %23
%315 = ashr i32 %313, %314
%316 = add nsw i32 1, %315
store i32 %316, i32* %26
%317 = load float*, float** %14
store float* %317, float** %22
%318 = load i32, i32* %23
%319 = icmp eq i32 %318, 0
br i1 %319, label %320, label %336
320: ; preds = %311
%321 = load void (...)*, void (...)** %57
%322 = load float*, float** %36
%323 = load float*, float** %38
%324 = load float*, float** %37
%325 = load float*, float** %35
%326 = load float*, float** %32
%327 = load float*, float** %34
%328 = load float*, float** %33
%329 = load float*, float** %31
%330 = load float*, float** %14
%331 = load i32, i32* %24
%332 = load i32, i32* %25
%333 = load i32, i32* %26
%334 = load i32, i32* %54
%335 = bitcast void (...)* %321 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*
br label %352
336: ; preds = %311
%337 = load void (...)*, void (...)** %55
%338 = load float*, float** %36
%339 = load float*, float** %38
%340 = load float*, float** %37
%341 = load float*, float** %35
%342 = load float*, float** %32
%343 = load float*, float** %34
%344 = load float*, float** %33
%345 = load float*, float** %31
%346 = load float*, float** %22
%347 = load i32, i32* %24
%348 = load i32, i32* %25
%349 = load i32, i32* %26
%350 = load i32, i32* %54
%351 = bitcast void (...)* %337 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*
br label %352
352: ; preds = %336, %320
%353 = load float*, float** %22
store float* %353, float** %31
%354 = load i32, i32* %23
%355 = add nsw i32 %354, -1
store i32 %355, i32* %23
br label %171
356: ; preds = %171
%357 = load float*, float** %14
store float* %357, float** %31
br label %358
358: ; preds = %411, %356
%359 = load i32, i32* %23
%360 = icmp sge i32 %359, 0
br i1 %360, label %361, label %415
361: ; preds = %358
store i32 0, i32* %54
%362 = load i32, i32* %15
%363 = sub nsw i32 %362, 1
%364 = load i32, i32* %23
%365 = ashr i32 %363, %364
%366 = add nsw i32 1, %365
store i32 %366, i32* %24
%367 = load i32, i32* %16
%368 = sub nsw i32 %367, 1
%369 = load i32, i32* %23
%370 = ashr i32 %368, %369
%371 = add nsw i32 1, %370
store i32 %371, i32* %25
%372 = load i32, i32* %17
%373 = sub nsw i32 %372, 1
%374 = load i32, i32* %23
%375 = ashr i32 %373, %374
%376 = add nsw i32 1, %375
store i32 %376, i32* %26
%377 = load i32, i32* %23
%378 = icmp eq i32 %377, 0
br i1 %378, label %379, label %395
379: ; preds = %361
%380 = load void (...)*, void (...)** %57
%381 = load float*, float** %36
%382 = load float*, float** %38
%383 = load float*, float** %37
%384 = load float*, float** %35
%385 = load float*, float** %32
%386 = load float*, float** %34
%387 = load float*, float** %33
%388 = load float*, float** %31
%389 = load float*, float** %14
%390 = load i32, i32* %24
%391 = load i32, i32* %25
%392 = load i32, i32* %26
%393 = load i32, i32* %54
%394 = bitcast void (...)* %380 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*
br label %411
395: ; preds = %361
%396 = load void (...)*, void (...)** %55
%397 = load float*, float** %36
%398 = load float*, float** %38
%399 = load float*, float** %37
%400 = load float*, float** %35
%401 = load float*, float** %32
%402 = load float*, float** %34
%403 = load float*, float** %33
%404 = load float*, float** %31
%405 = load float*, float** %22
%406 = load i32, i32* %24
%407 = load i32, i32* %25
%408 = load i32, i32* %26
%409 = load i32, i32* %54
%410 = bitcast void (...)* %396 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*
br label %411
411: ; preds = %395, %379
%412 = load float*, float** %22
store float* %412, float** %31
%413 = load i32, i32* %23
%414 = add nsw i32 %413, -1
store i32 %414, i32* %23
br label %358
415: ; preds = %358
store i32 0, i32* %11
br label %416
416: ; preds = %415, %149
%417 = load i32, i32* %11
ret i32 %417
}

LLVM IR (-O2):
define i32 @wavelet_reconstruct3(float* %0, i32 %1, float* %2, i32 %3, i32 %4, i32 %5, i8 signext %6, i8 signext %7, i8 signext %8, i8 signext %9) {
%11 = alloca void (...)*
%12 = alloca void (...)*
%13 = alloca void (...)*
%14 = alloca void (...)*
%15 = bitcast void (...)** %11 to i8*
%16 = bitcast void (...)** %12 to i8*
%17 = bitcast void (...)** %13 to i8*
%18 = bitcast void (...)** %14 to i8*
%19 = bitcast void (...)** %11 to void (...)*
%20 = bitcast void (...)** %12 to void (...)*
%21 = bitcast void (...)** %13 to void (...)*
%22 = bitcast void (...)** %14 to void (...)*
%23 = sub i8 0, %6
%24 = call i32 @getfilter(void (...)* %19, void (...)* %20, void (...)* %21, void (...)* %22, i8 signext %23, i32 7)
%25 = sext i8 %7 to i32
%26 = icmp slt i8 %8, %7
%27 = select i1 %26, i8 %8, i8 %7
%28 = add nsw i32 %3, -1
%29 = sext i8 %27 to i32
%30 = add nsw i32 %4, -1
%31 = add nsw i32 %5, -1
%32 = add nsw i32 %25, -1
%33 = icmp slt i8 %7, 1
br i1 %33, label %84, label %34
34: ; preds = %10
br i1 %26, label %35, label %89
35: ; preds = %34
%36 = bitcast void (...)** %11 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)**
%37 = bitcast void (...)** %13 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)**
%38 = ashr i32 %28, %32
%39 = add nsw i32 %38, 1
%40 = ashr i32 %30, %32
%41 = add nsw i32 %40, 1
%42 = ashr i32 %31, %32
%43 = add nsw i32 %42, 1
%44 = add nsw i32 %38, 2
%45 = ashr i32 %44, 1
%46 = add nsw i32 %40, 2
%47 = ashr i32 %46, 1
%48 = add nsw i32 %42, 2
%49 = ashr i32 %48, 1
%50 = mul nsw i32 %49, %47
%51 = mul nsw i32 %50, %45
%52 = sub nsw i32 %39, %45
%53 = mul nsw i32 %50, %52
%54 = sub nsw i32 %41, %47
%55 = mul nsw i32 %54, %49
%56 = mul nsw i32 %55, %45
%57 = mul nsw i32 %55, %52
%58 = sub nsw i32 %43, %49
%59 = mul nsw i32 %58, %47
%60 = mul nsw i32 %59, %45
%61 = mul nsw i32 %59, %52
%62 = mul i32 %54, %45
%63 = mul i32 %62, %58
%64 = sext i32 %51 to i64
%65 = getelementptr inbounds float, float* %0, i64 %64
%66 = sext i32 %53 to i64
%67 = getelementptr inbounds float, float* %65, i64 %66
%68 = sext i32 %56 to i64
%69 = getelementptr inbounds float, float* %67, i64 %68
%70 = sext i32 %57 to i64
%71 = getelementptr inbounds float, float* %69, i64 %70
%72 = sext i32 %60 to i64
%73 = getelementptr inbounds float, float* %71, i64 %72
%74 = sext i32 %61 to i64
%75 = getelementptr inbounds float, float* %73, i64 %74
%76 = sext i32 %63 to i64
%77 = getelementptr inbounds float, float* %75, i64 %76
%78 = icmp eq i32 %32, 0
%79 = load void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*, void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)** %37
%80 = load void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*, void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)** %36
%81 = select i1 %78, void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)* %79, void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)* %80
%82 = add nsw i32 %25, -2
%83 = icmp sgt i32 %32, %29
br i1 %83, label %109, label %89
84: ; preds = %10
%85 = shl i32 %3, 2
%86 = mul i32 %85, %4
%87 = mul i32 %86, %5
%88 = call i32 @memcpy(float* %2, float* %0, i32 %87)
br label %176
89: ; preds = %109, %35, %34
%90 = phi float* [ null, %34 ], [ %77, %35 ], [ %150, %109 ]
%91 = phi float* [ null, %34 ], [ %73, %35 ], [ %146, %109 ]
%92 = phi float* [ null, %34 ], [ %75, %35 ], [ %148, %109 ]
%93 = phi float* [ null, %34 ], [ %71, %35 ], [ %144, %109 ]
%94 = phi float* [ null, %34 ], [ %67, %35 ], [ %140, %109 ]
%95 = phi float* [ null, %34 ], [ %65, %35 ], [ %138, %109 ]
%96 = phi float* [ null, %34 ], [ %69, %35 ], [ %142, %109 ]
%97 = phi i32 [ %32, %34 ], [ %82, %35 ], [ %155, %109 ]
%98 = icmp sgt i32 %97, -1
br i1 %98, label %99, label %176
99: ; preds = %89
%100 = bitcast void (...)** %11 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)**
%101 = bitcast void (...)** %13 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)**
%102 = ashr i32 %28, %97
%103 = add nsw i32 %102, 1
%104 = ashr i32 %30, %97
%105 = add nsw i32 %104, 1
%106 = ashr i32 %31, %97
%107 = add nsw i32 %106, 1
%108 = icmp eq i32 %97, 0
br i1 %108, label %171, label %157
109: ; preds = %35, %109
%110 = phi i32 [ %155, %109 ], [ %82, %35 ]
%111 = ashr i32 %28, %110
%112 = add nsw i32 %111, 1
%113 = ashr i32 %30, %110
%114 = add nsw i32 %113, 1
%115 = ashr i32 %31, %110
%116 = add nsw i32 %115, 1
%117 = add nsw i32 %111, 2
%118 = ashr i32 %117, 1
%119 = add nsw i32 %113, 2
%120 = ashr i32 %119, 1
%121 = add nsw i32 %115, 2
%122 = ashr i32 %121, 1
%123 = mul nsw i32 %122, %120
%124 = mul nsw i32 %123, %118
%125 = sub nsw i32 %112, %118
%126 = mul nsw i32 %123, %125
%127 = sub nsw i32 %114, %120
%128 = mul nsw i32 %127, %122
%129 = mul nsw i32 %128, %118
%130 = mul nsw i32 %128, %125
%131 = sub nsw i32 %116, %122
%132 = mul nsw i32 %131, %120
%133 = mul nsw i32 %132, %118
%134 = mul nsw i32 %132, %125
%135 = mul i32 %127, %118
%136 = mul i32 %135, %131
%137 = sext i32 %124 to i64
%138 = getelementptr inbounds float, float* %0, i64 %137
%139 = sext i32 %126 to i64
%140 = getelementptr inbounds float, float* %138, i64 %139
%141 = sext i32 %129 to i64
%142 = getelementptr inbounds float, float* %140, i64 %141
%143 = sext i32 %130 to i64
%144 = getelementptr inbounds float, float* %142, i64 %143
%145 = sext i32 %133 to i64
%146 = getelementptr inbounds float, float* %144, i64 %145
%147 = sext i32 %134 to i64
%148 = getelementptr inbounds float, float* %146, i64 %147
%149 = sext i32 %136 to i64
%150 = getelementptr inbounds float, float* %148, i64 %149
%151 = icmp eq i32 %110, 0
%152 = load void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*, void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)** %36
%153 = load void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*, void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)** %37
%154 = select i1 %151, void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)* %153, void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)* %152
%155 = add nsw i32 %110, -1
%156 = icmp sgt i32 %110, %29
br i1 %156, label %109, label %89
157: ; preds = %99, %157
%158 = phi i32 [ %169, %157 ], [ %107, %99 ]
%159 = phi i32 [ %167, %157 ], [ %105, %99 ]
%160 = phi i32 [ %165, %157 ], [ %103, %99 ]
%161 = phi i32 [ %163, %157 ], [ %97, %99 ]
%162 = load void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*, void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)** %100
%163 = add nsw i32 %161, -1
%164 = ashr i32 %28, %163
%165 = add nsw i32 %164, 1
%166 = ashr i32 %30, %163
%167 = add nsw i32 %166, 1
%168 = ashr i32 %31, %163
%169 = add nsw i32 %168, 1
%170 = icmp eq i32 %163, 0
br i1 %170, label %171, label %157
171: ; preds = %157, %99
%172 = phi i32 [ %103, %99 ], [ %165, %157 ]
%173 = phi i32 [ %105, %99 ], [ %167, %157 ]
%174 = phi i32 [ %107, %99 ], [ %169, %157 ]
%175 = load void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*, void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)** %101
br label %176
176: ; preds = %171, %89, %84
ret i32 0
}