#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*/ getadjointfilter(void (*)(), void (*)(), void (*)(),
                                    void (*)(), char, int);
int /*<<< orphan*/ memcpy(float *, float *, int);
int wavelet_adjoint3(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 (*adjbioD_3d)();
  void (*adjbioD_skip_3d)();
  void (*adjbioD_3d_char)();
  void (*adjbioD_skip_3d_char)();
  getadjointfilter(&adjbioD_3d, &adjbioD_skip_3d, &adjbioD_3d_char,
                   &adjbioD_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) {
      adjbioD_3d_char(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, outvector,
                      xlength, ylength, zlength, ifnotallskip);
    } else {
      adjbioD_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) {
      adjbioD_3d_char(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, outvector,
                      xlength, ylength, zlength, ifnotallskip);
    } else {
      adjbioD_3d(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, vector, xlength,
                 ylength, zlength, ifnotallskip);
    }
    LLL = vector;
    scale--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<wavelet_adjoint3>:
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
mov    $0x7,%r9d
movsbl 0x10(%rbp),%r8d
call   1030 <getadjointfilter@plt>
movsbl 0x20(%rbp),%eax
movsbl 0x18(%rbp),%ecx
cmp    %ecx,%eax
jge    1216 <wavelet_adjoint3+0xf6>
movsbl 0x20(%rbp),%eax
mov    %eax,-0x12c(%rbp)
jmp    1220 <wavelet_adjoint3+0x100>
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    1308 <wavelet_adjoint3+0x1e8>
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    1340 <wavelet_adjoint3+0x220>
mov    -0x48(%rbp),%rdi
mov    -0x38(%rbp),%rsi
movslq -0xd0(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x2c(%rbp)
jmp    185a <wavelet_adjoint3+0x73a>
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     16e7 <wavelet_adjoint3+0x5c7>
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    14c3 <wavelet_adjoint3+0x3a3>
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    15b4 <wavelet_adjoint3+0x494>
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    1655 <wavelet_adjoint3+0x535>
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    16ce <wavelet_adjoint3+0x5ae>
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    1382 <wavelet_adjoint3+0x262>
mov    -0x48(%rbp),%rax
mov    %rax,-0x88(%rbp)
cmpl   $0x0,-0x64(%rbp)
jl     1853 <wavelet_adjoint3+0x733>
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    17c1 <wavelet_adjoint3+0x6a1>
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    183a <wavelet_adjoint3+0x71a>
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    16f2 <wavelet_adjoint3+0x5d2>
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_adjoint3>:
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
movsbl 0xd0(%rsp),%r8d
lea    0x58(%rsp),%rdi
lea    0x90(%rsp),%rsi
lea    0x50(%rsp),%rdx
lea    0x88(%rsp),%rcx
mov    $0x7,%r9d
call   1030 <getadjointfilter@plt>
mov    0xe0(%rsp),%ecx
mov    %r12,%rax
cmp    %al,%cl
mov    %ecx,%r8d
cmovge %eax,%r8d
test   %al,%al
jle    142b <wavelet_adjoint3+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_adjoint3+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_adjoint3+0x41d>
mov    %ecx,%r14d
mov    0xc(%rsp),%ebp
nopl   0x0(%rax,%rax,1)
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_adjoint3+0x1f0>
jmp    1470 <wavelet_adjoint3+0x350>
imul   %ebx,%ebp
imul   %r13d,%ebp
shl    $0x2,%ebp
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <memcpy@plt>
jmp    1591 <wavelet_adjoint3+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_adjoint3+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_adjoint3+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_adjoint3+0x3a0>
jmp    1571 <wavelet_adjoint3+0x451>
mov    %ecx,%r14d
mov    0xc(%rsp),%ebp
test   %r14d,%r14d
jns    1479 <wavelet_adjoint3+0x359>
jmp    1591 <wavelet_adjoint3+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_adjoint3(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 = call i32 @getadjointfilter(void (...)* %59, void (...)* %60, void (...)* %61, void (...)* %62, i8 signext %63, i32 7)
%65 = load i8, i8* %20
%66 = sext i8 %65 to i32
%67 = load i8, i8* %19
%68 = sext i8 %67 to i32
%69 = icmp slt i32 %66, %68
br i1 %69, label %70, label %73
70: ; preds = %10
%71 = load i8, i8* %20
%72 = sext i8 %71 to i32
br label %76
73: ; preds = %10
%74 = load i8, i8* %19
%75 = sext i8 %74 to i32
br label %76
76: ; preds = %73, %70
%77 = phi i32 [ %72, %70 ], [ %75, %73 ]
%78 = trunc i32 %77 to i8
store i8 %78, i8* %20
%79 = load i32, i32* %15
%80 = load i32, i32* %16
%81 = mul nsw i32 %79, %80
%82 = load i32, i32* %17
%83 = mul nsw i32 %81, %82
store i32 %83, i32* %41
%84 = load i32, i32* %15
%85 = sub nsw i32 %84, 1
%86 = load i8, i8* %20
%87 = sext i8 %86 to i32
%88 = ashr i32 %85, %87
%89 = add nsw i32 1, %88
store i32 %89, i32* %24
%90 = load i32, i32* %16
%91 = sub nsw i32 %90, 1
%92 = load i8, i8* %20
%93 = sext i8 %92 to i32
%94 = ashr i32 %91, %93
%95 = add nsw i32 1, %94
store i32 %95, i32* %25
%96 = load i32, i32* %17
%97 = sub nsw i32 %96, 1
%98 = load i8, i8* %20
%99 = sext i8 %98 to i32
%100 = ashr i32 %97, %99
%101 = add nsw i32 1, %100
store i32 %101, i32* %26
%102 = load i32, i32* %24
%103 = load i32, i32* %25
%104 = mul nsw i32 %102, %103
%105 = load i32, i32* %26
%106 = mul nsw i32 %104, %105
store i32 %106, i32* %40
%107 = load i8, i8* %19
%108 = sext i8 %107 to i32
%109 = sub nsw i32 %108, 1
store i32 %109, i32* %27
%110 = load i32, i32* %15
%111 = sub nsw i32 %110, 1
%112 = load i32, i32* %27
%113 = add nsw i32 %112, 1
%114 = ashr i32 %111, %113
%115 = add nsw i32 1, %114
store i32 %115, i32* %50
%116 = load i32, i32* %16
%117 = sub nsw i32 %116, 1
%118 = load i32, i32* %27
%119 = add nsw i32 %118, 1
%120 = ashr i32 %117, %119
%121 = add nsw i32 1, %120
store i32 %121, i32* %51
%122 = load i32, i32* %17
%123 = sub nsw i32 %122, 1
%124 = load i32, i32* %27
%125 = add nsw i32 %124, 1
%126 = ashr i32 %123, %125
%127 = add nsw i32 1, %126
store i32 %127, i32* %52
%128 = load i32, i32* %50
%129 = load i32, i32* %51
%130 = mul nsw i32 %128, %129
%131 = load i32, i32* %52
%132 = mul nsw i32 %130, %131
store i32 %132, i32* %53
%133 = load i8, i8* %19
%134 = sext i8 %133 to i32
%135 = icmp eq i32 %134, 0
br i1 %135, label %136, label %142
136: ; preds = %76
%137 = load i32, i32* %15
%138 = load i32, i32* %16
%139 = mul nsw i32 %137, %138
%140 = load i32, i32* %17
%141 = mul nsw i32 %139, %140
store i32 %141, i32* %40
br label %142
142: ; preds = %136, %76
%143 = load float*, float** %14
store float* %143, float** %22
%144 = load i32, i32* %27
%145 = icmp slt i32 %144, 0
br i1 %145, label %146, label %154
146: ; preds = %142
%147 = load float*, float** %14
%148 = load float*, float** %12
%149 = load i32, i32* %41
%150 = sext i32 %149 to i64
%151 = mul i64 %150, 4
%152 = trunc i64 %151 to i32
%153 = call i32 @memcpy(float* %147, float* %148, i32 %152)
store i32 0, i32* %11
br label %413
154: ; preds = %142
%155 = load i32, i32* %27
store i32 %155, i32* %23
%156 = load float*, float** %12
%157 = load i32, i32* %40
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds float, float* %156, i64 %158
store float* %159, float** %39
%160 = load i32, i32* %15
store i32 %160, i32* %24
%161 = load i32, i32* %16
store i32 %161, i32* %25
%162 = load i32, i32* %17
store i32 %162, i32* %26
%163 = load i32, i32* %26
%164 = load i32, i32* %25
%165 = mul nsw i32 %163, %164
%166 = load i32, i32* %24
%167 = mul nsw i32 %165, %166
store i32 %167, i32* %42
br label %168
168: ; preds = %349, %154
%169 = load i32, i32* %23
%170 = load i8, i8* %20
%171 = sext i8 %170 to i32
%172 = icmp sge i32 %169, %171
br i1 %172, label %173, label %353
173: ; preds = %168
%174 = load i32, i32* %15
%175 = sub nsw i32 %174, 1
%176 = load i32, i32* %23
%177 = ashr i32 %175, %176
%178 = add nsw i32 1, %177
store i32 %178, i32* %24
%179 = load i32, i32* %16
%180 = sub nsw i32 %179, 1
%181 = load i32, i32* %23
%182 = ashr i32 %180, %181
%183 = add nsw i32 1, %182
store i32 %183, i32* %25
%184 = load i32, i32* %17
%185 = sub nsw i32 %184, 1
%186 = load i32, i32* %23
%187 = ashr i32 %185, %186
%188 = add nsw i32 1, %187
store i32 %188, i32* %26
%189 = load i32, i32* %24
%190 = add nsw i32 %189, 1
%191 = ashr i32 %190, 1
store i32 %191, i32* %28
%192 = load i32, i32* %25
%193 = add nsw i32 %192, 1
%194 = ashr i32 %193, 1
store i32 %194, i32* %29
%195 = load i32, i32* %26
%196 = add nsw i32 %195, 1
%197 = ashr i32 %196, 1
store i32 %197, i32* %30
%198 = load float*, float** %14
store float* %198, float** %22
%199 = load i32, i32* %30
%200 = load i32, i32* %29
%201 = mul nsw i32 %199, %200
%202 = load i32, i32* %28
%203 = mul nsw i32 %201, %202
store i32 %203, i32* %42
%204 = load i32, i32* %30
%205 = load i32, i32* %29
%206 = mul nsw i32 %204, %205
%207 = load i32, i32* %24
%208 = load i32, i32* %28
%209 = sub nsw i32 %207, %208
%210 = mul nsw i32 %206, %209
store i32 %210, i32* %43
%211 = load i32, i32* %30
%212 = load i32, i32* %25
%213 = load i32, i32* %29
%214 = sub nsw i32 %212, %213
%215 = mul nsw i32 %211, %214
%216 = load i32, i32* %28
%217 = mul nsw i32 %215, %216
store i32 %217, i32* %44
%218 = load i32, i32* %30
%219 = load i32, i32* %25
%220 = load i32, i32* %29
%221 = sub nsw i32 %219, %220
%222 = mul nsw i32 %218, %221
%223 = load i32, i32* %24
%224 = load i32, i32* %28
%225 = sub nsw i32 %223, %224
%226 = mul nsw i32 %222, %225
store i32 %226, i32* %45
%227 = load i32, i32* %26
%228 = load i32, i32* %30
%229 = sub nsw i32 %227, %228
%230 = load i32, i32* %29
%231 = mul nsw i32 %229, %230
%232 = load i32, i32* %28
%233 = mul nsw i32 %231, %232
store i32 %233, i32* %49
%234 = load i32, i32* %26
%235 = load i32, i32* %30
%236 = sub nsw i32 %234, %235
%237 = load i32, i32* %29
%238 = mul nsw i32 %236, %237
%239 = load i32, i32* %24
%240 = load i32, i32* %28
%241 = sub nsw i32 %239, %240
%242 = mul nsw i32 %238, %241
store i32 %242, i32* %46
%243 = load i32, i32* %26
%244 = load i32, i32* %30
%245 = sub nsw i32 %243, %244
%246 = load i32, i32* %25
%247 = load i32, i32* %29
%248 = sub nsw i32 %246, %247
%249 = mul nsw i32 %245, %248
%250 = load i32, i32* %28
%251 = mul nsw i32 %249, %250
store i32 %251, i32* %47
%252 = load i32, i32* %26
%253 = load i32, i32* %30
%254 = sub nsw i32 %252, %253
%255 = load i32, i32* %25
%256 = load i32, i32* %29
%257 = sub nsw i32 %255, %256
%258 = mul nsw i32 %254, %257
%259 = load i32, i32* %24
%260 = load i32, i32* %28
%261 = sub nsw i32 %259, %260
%262 = mul nsw i32 %258, %261
store i32 %262, i32* %48
%263 = load i32, i32* %23
%264 = load i32, i32* %27
%265 = icmp eq i32 %263, %264
br i1 %265, label %266, label %268
266: ; preds = %173
%267 = load float*, float** %12
store float* %267, float** %31
br label %268
268: ; preds = %266, %173
%269 = load float*, float** %12
%270 = load i32, i32* %42
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds float, float* %269, i64 %271
store float* %272, float** %33
%273 = load float*, float** %33
%274 = load i32, i32* %43
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds float, float* %273, i64 %275
store float* %276, float** %34
%277 = load float*, float** %34
%278 = load i32, i32* %44
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds float, float* %277, i64 %279
store float* %280, float** %32
%281 = load float*, float** %32
%282 = load i32, i32* %45
%283 = sext i32 %282 to i64
%284 = getelementptr inbounds float, float* %281, i64 %283
store float* %284, float** %35
%285 = load float*, float** %35
%286 = load i32, i32* %49
%287 = sext i32 %286 to i64
%288 = getelementptr inbounds float, float* %285, i64 %287
store float* %288, float** %37
%289 = load float*, float** %37
%290 = load i32, i32* %46
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds float, float* %289, i64 %291
store float* %292, float** %38
%293 = load float*, float** %38
%294 = load i32, i32* %47
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds float, float* %293, i64 %295
store float* %296, float** %36
%297 = load i32, i32* %23
%298 = load i8, i8* %20
%299 = sext i8 %298 to i32
%300 = icmp slt i32 %297, %299
%301 = zext i1 %300 to i64
%302 = select i1 %300, i32 0, i32 1
store i32 %302, i32* %54
%303 = load i32, i32* %23
%304 = load i32, i32* %27
%305 = icmp slt i32 %303, %304
br i1 %305, label %306, label %308
306: ; preds = %268
%307 = load float*, float** %14
store float* %307, float** %31
br label %308
308: ; preds = %306, %268
%309 = load i32, i32* %17
%310 = sub nsw i32 %309, 1
%311 = load i32, i32* %23
%312 = ashr i32 %310, %311
%313 = add nsw i32 1, %312
store i32 %313, i32* %26
%314 = load float*, float** %14
store float* %314, float** %22
%315 = load i32, i32* %23
%316 = icmp eq i32 %315, 0
br i1 %316, label %317, label %333
317: ; preds = %308
%318 = load void (...)*, void (...)** %57
%319 = load float*, float** %36
%320 = load float*, float** %38
%321 = load float*, float** %37
%322 = load float*, float** %35
%323 = load float*, float** %32
%324 = load float*, float** %34
%325 = load float*, float** %33
%326 = load float*, float** %31
%327 = load float*, float** %14
%328 = load i32, i32* %24
%329 = load i32, i32* %25
%330 = load i32, i32* %26
%331 = load i32, i32* %54
%332 = bitcast void (...)* %318 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*
br label %349
333: ; preds = %308
%334 = load void (...)*, void (...)** %55
%335 = load float*, float** %36
%336 = load float*, float** %38
%337 = load float*, float** %37
%338 = load float*, float** %35
%339 = load float*, float** %32
%340 = load float*, float** %34
%341 = load float*, float** %33
%342 = load float*, float** %31
%343 = load float*, float** %22
%344 = load i32, i32* %24
%345 = load i32, i32* %25
%346 = load i32, i32* %26
%347 = load i32, i32* %54
%348 = bitcast void (...)* %334 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*
br label %349
349: ; preds = %333, %317
%350 = load float*, float** %22
store float* %350, float** %31
%351 = load i32, i32* %23
%352 = add nsw i32 %351, -1
store i32 %352, i32* %23
br label %168
353: ; preds = %168
%354 = load float*, float** %14
store float* %354, float** %31
br label %355
355: ; preds = %408, %353
%356 = load i32, i32* %23
%357 = icmp sge i32 %356, 0
br i1 %357, label %358, label %412
358: ; preds = %355
store i32 0, i32* %54
%359 = load i32, i32* %15
%360 = sub nsw i32 %359, 1
%361 = load i32, i32* %23
%362 = ashr i32 %360, %361
%363 = add nsw i32 1, %362
store i32 %363, i32* %24
%364 = load i32, i32* %16
%365 = sub nsw i32 %364, 1
%366 = load i32, i32* %23
%367 = ashr i32 %365, %366
%368 = add nsw i32 1, %367
store i32 %368, i32* %25
%369 = load i32, i32* %17
%370 = sub nsw i32 %369, 1
%371 = load i32, i32* %23
%372 = ashr i32 %370, %371
%373 = add nsw i32 1, %372
store i32 %373, i32* %26
%374 = load i32, i32* %23
%375 = icmp eq i32 %374, 0
br i1 %375, label %376, label %392
376: ; preds = %358
%377 = load void (...)*, void (...)** %57
%378 = load float*, float** %36
%379 = load float*, float** %38
%380 = load float*, float** %37
%381 = load float*, float** %35
%382 = load float*, float** %32
%383 = load float*, float** %34
%384 = load float*, float** %33
%385 = load float*, float** %31
%386 = load float*, float** %14
%387 = load i32, i32* %24
%388 = load i32, i32* %25
%389 = load i32, i32* %26
%390 = load i32, i32* %54
%391 = bitcast void (...)* %377 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*
br label %408
392: ; preds = %358
%393 = load void (...)*, void (...)** %55
%394 = load float*, float** %36
%395 = load float*, float** %38
%396 = load float*, float** %37
%397 = load float*, float** %35
%398 = load float*, float** %32
%399 = load float*, float** %34
%400 = load float*, float** %33
%401 = load float*, float** %31
%402 = load float*, float** %22
%403 = load i32, i32* %24
%404 = load i32, i32* %25
%405 = load i32, i32* %26
%406 = load i32, i32* %54
%407 = bitcast void (...)* %393 to void (float*, float*, float*, float*, float*, float*, float*, float*, float*, i32, i32, i32, i32, ...)*
br label %408
408: ; preds = %392, %376
%409 = load float*, float** %22
store float* %409, float** %31
%410 = load i32, i32* %23
%411 = add nsw i32 %410, -1
store i32 %411, i32* %23
br label %355
412: ; preds = %355
store i32 0, i32* %11
br label %413
413: ; preds = %412, %146
%414 = load i32, i32* %11
ret i32 %414
}

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