#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*/ fn_dirFHaarWT2p2(int *, int *, int, int);
int /*<<< orphan*/ fn_dirFHaarWT2p2oneStage(int *, int *, int);
int /*<<< orphan*/ fn_invFHaarWT2p2(int *, int *, int, int);
int /*<<< orphan*/ fn_invFHaarWT2p2oneStage(int *, int *, int);
int log(int);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int main() {
  int i;
  int ai_data[8] = {16, 8, 12, 16, 18, 14, 4, 8};
  int ai_k[8];
  int i_step = (int)(log(8) / log(2));
  int ai_Rdata[32];
  int ai_Rk[32];
  int i_Rstep = (int)(log(32) / log(2));
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" determining test ");
  printf("\n");
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" one stage ");
  printf("\n");
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" input: ");
  printf("\n");
  for (i = 0; i < 8; i++) {
    printf("%d ", ai_data[i]);
    printf("\n");
  }
  fn_dirFHaarWT2p2oneStage(ai_k, ai_data, 8);
  printf(" output: ");
  printf("\n");
  for (i = 0; i < 8; i++) {
    printf("%d ", ai_k[i]);
    printf("\n");
  }
  fn_invFHaarWT2p2oneStage(ai_data, ai_k, 8);
  printf(" input, again: ");
  printf("\n");
  for (i = 0; i < 8; i++) {
    printf("%d ", ai_data[i]);
    printf("\n");
  }
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" one level ");
  printf("\n");
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" input: ");
  printf("\n");
  for (i = 0; i < 8; i++) {
    printf("%d ", ai_data[i]);
    printf("\n");
  }
  fn_dirFHaarWT2p2(ai_k, ai_data, 8, 1);
  printf(" output: ");
  printf("\n");
  for (i = 0; i < 8; i++) {
    printf("%d ", ai_k[i]);
    printf("\n");
  }
  fn_invFHaarWT2p2(ai_data, ai_k, 8, 1);
  printf(" input, again: ");
  printf("\n");
  for (i = 0; i < 8; i++) {
    printf("%d ", ai_data[i]);
    printf("\n");
  }
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" full level ");
  printf("\n");
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" input: ");
  printf("\n");
  for (i = 0; i < 8; i++) {
    printf("%d ", ai_data[i]);
    printf("\n");
  }
  printf("\n");
  printf("i_step = %d ", i_step);
  printf("\n");
  printf("\n");
  fn_dirFHaarWT2p2(ai_k, ai_data, 8, i_step);
  for (i = 0; i < 4; i++) {
    printf(" W3: %d ", ai_k[i]);
    printf("\n");
  }
  for (i = 4; i < 6; i++) {
    printf(" W2: %d ", ai_k[i]);
    printf("\n");
  }
  printf(" W1: %d ", ai_k[6]);
  printf("\n");
  printf(" W0: %d ", ai_k[7]);
  printf("\n");
  fn_invFHaarWT2p2(ai_data, ai_k, 8, i_step);
  printf(" input, again: ");
  printf("\n");
  for (i = 0; i < 8; i++) {
    printf("%d ", ai_data[i]);
    printf("\n");
  }
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" random test ");
  printf("\n");
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" input random: ");
  printf("\n");
  for (i = 0; i < 32; i++) {
    ai_Rdata[i] = (rand() % 32) + 1;
    printf("%d ", ai_Rdata[i]);
    printf("\n");
  }
  fn_dirFHaarWT2p2(ai_Rk, ai_Rdata, 32, i_Rstep);
  printf(" output random: ");
  printf("\n");
  for (i = 0; i < 32; i++) {
    printf("%d ", ai_Rk[i]);
    printf("\n");
  }
  fn_invFHaarWT2p2(ai_Rdata, ai_Rk, 32, i_Rstep);
  printf(" input random, again: ");
  printf("\n");
  for (i = 0; i < 32; i++) {
    printf("%d ", ai_Rdata[i]);
    printf("\n");
  }
  printf(" Well? Almost (!) The same? ))) ");
  printf("\n");
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" random semi-full test ");
  printf("\n");
  printf("-----------------------------------------------------------------");
  printf("\n");
  printf(" input random: ");
  printf("\n");
  for (i = 0; i < 32; i++) {
    ai_Rdata[i] = (rand() % 32) + 1;
    printf("%d ", ai_Rdata[i]);
    printf("\n");
  }
  fn_dirFHaarWT2p2(ai_Rk, ai_Rdata, 32, 3);
  printf(" output random: ");
  printf("\n");
  for (i = 0; i < 32; i++) {
    printf("%d ", ai_Rk[i]);
    printf("\n");
  }
  fn_invFHaarWT2p2(ai_Rdata, ai_Rk, 32, 3);
  printf(" input random, again: ");
  printf("\n");
  for (i = 0; i < 32; i++) {
    printf("%d ", ai_Rdata[i]);
    printf("\n");
  }
  printf(" Well? Almost (!) The same? ))) ");
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xe77(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe74(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe71(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe6e(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    $0x8,%edi
call   1070 <log@plt>
mov    %eax,-0x16c(%rbp)
mov    $0x2,%edi
call   1070 <log@plt>
mov    %eax,%ecx
mov    -0x16c(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x54(%rbp)
mov    $0x20,%edi
call   1070 <log@plt>
mov    %eax,-0x168(%rbp)
mov    $0x2,%edi
call   1070 <log@plt>
mov    %eax,%ecx
mov    -0x168(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x164(%rbp)
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xda8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xddc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdc0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    12ec <main+0x17c>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12b0 <main+0x140>
lea    -0x50(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x8,%edx
call   1040 <fn_dirFHaarWT2p2oneStage@plt>
lea    0xd87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    135d <main+0x1ed>
movslq -0x8(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%esi
lea    0xdb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1321 <main+0x1b1>
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x8,%edx
call   1060 <fn_invFHaarWT2p2oneStage@plt>
lea    0xd20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcde(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    13ce <main+0x25e>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xd41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xca9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1392 <main+0x222>
lea    0xc4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1481 <main+0x311>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xc8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xbf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1445 <main+0x2d5>
lea    -0x50(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x8,%edx
mov    $0x1,%ecx
call   1050 <fn_dirFHaarWT2p2@plt>
lea    0xbed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xbb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    14f7 <main+0x387>
movslq -0x8(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%esi
lea    0xc18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xb80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14bb <main+0x34b>
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x8,%edx
mov    $0x1,%ecx
call   1080 <fn_invFHaarWT2p2@plt>
lea    0xb81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xb3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    156d <main+0x3fd>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xba2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xb0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1531 <main+0x3c1>
lea    0xaac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xae0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xb22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xac4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xa74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xaa8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xabb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xa8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1620 <main+0x4b0>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xaef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xa57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15e4 <main+0x474>
lea    0xa3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x54(%rbp),%esi
lea    0xa87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xa1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xa0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x50(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    -0x54(%rbp),%ecx
mov    $0x8,%edx
call   1050 <fn_dirFHaarWT2p2@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    16b3 <main+0x543>
movslq -0x8(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%esi
lea    0xa3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x9c4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1677 <main+0x507>
movl   $0x4,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    16f6 <main+0x586>
movslq -0x8(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%esi
lea    0xa02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x981(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    16ba <main+0x54a>
mov    -0x38(%rbp),%esi
lea    0x9de(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x954(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0x9c8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x935(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x54(%rbp),%ecx
mov    $0x8,%edx
call   1080 <fn_invFHaarWT2p2@plt>
lea    0x946(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x904(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    17a8 <main+0x638>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0x967(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x8cf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    176c <main+0x5fc>
lea    0x871(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x8a5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x925(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x889(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x839(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x86d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x8fb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x851(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    187b <main+0x70b>
mov    $0x0,%al
call   1090 <rand@plt>
mov    $0x20,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
movslq -0x8(%rbp),%rax
mov    %edx,-0xe0(%rbp,%rax,4)
movslq -0x8(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0x894(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x7fc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    181f <main+0x6af>
lea    -0x160(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
mov    -0x164(%rbp),%ecx
mov    $0x20,%edx
call   1050 <fn_dirFHaarWT2p2@plt>
lea    0x86e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x7b4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    18fb <main+0x78b>
movslq -0x8(%rbp),%rax
mov    -0x160(%rbp,%rax,4),%esi
lea    0x814(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x77c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    18bc <main+0x74c>
lea    -0xe0(%rbp),%rdi
lea    -0x160(%rbp),%rsi
mov    -0x164(%rbp),%ecx
mov    $0x20,%edx
call   1080 <fn_invFHaarWT2p2@plt>
lea    0x7ff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x734(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    197b <main+0x80b>
movslq -0x8(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0x794(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x6fc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    193c <main+0x7cc>
lea    0x7b4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x6d2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x682(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x6b6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x79d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x69a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x64a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x67e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x70c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x662(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    1a6a <main+0x8fa>
mov    $0x0,%al
call   1090 <rand@plt>
mov    $0x20,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
movslq -0x8(%rbp),%rax
mov    %edx,-0xe0(%rbp,%rax,4)
movslq -0x8(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0x6a5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x60d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1a0e <main+0x89e>
lea    -0x160(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
mov    $0x20,%edx
mov    $0x3,%ecx
call   1050 <fn_dirFHaarWT2p2@plt>
lea    0x680(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x5c6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    1ae9 <main+0x979>
movslq -0x8(%rbp),%rax
mov    -0x160(%rbp,%rax,4),%esi
lea    0x626(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x58e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1aaa <main+0x93a>
lea    -0xe0(%rbp),%rdi
lea    -0x160(%rbp),%rsi
mov    $0x20,%edx
mov    $0x3,%ecx
call   1080 <fn_invFHaarWT2p2@plt>
lea    0x612(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x547(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    1b68 <main+0x9f8>
movslq -0x8(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0x5a7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x50f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1b29 <main+0x9b9>
lea    0x5c7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x4e5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
movaps 0xe78(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe5c(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    $0x8,%edi
call   1080 <log@plt>
mov    %eax,%r14d
mov    $0x2,%edi
call   1080 <log@plt>
mov    %eax,%ebx
mov    $0x20,%edi
call   1080 <log@plt>
mov    %eax,0x4c(%rsp)
mov    $0x2,%edi
call   1080 <log@plt>
mov    %eax,0x48(%rsp)
lea    0xe3c(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe63(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe4a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe2a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe7b(%rip),%rbp
mov    %rbp,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14d,%eax
cltd
idiv   %ebx
mov    %eax,%r15d
lea    0x20(%rsp),%r13
mov    %rsp,%r14
mov    %r13,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1050 <fn_dirFHaarWT2p2oneStage@plt>
lea    0xd2b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x20(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x24(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x28(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x30(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x34(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x38(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x3c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0x8,%edx
call   1070 <fn_invFHaarWT2p2oneStage@plt>
lea    0xc4d(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x14(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x1c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xb6f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xb20(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x14(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x1c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r13,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
mov    $0x1,%ecx
call   1060 <fn_dirFHaarWT2p2@plt>
lea    0xa3d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x20(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x24(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x28(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x30(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x34(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x38(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x3c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0x8,%edx
mov    $0x1,%ecx
call   1090 <fn_invFHaarWT2p2@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x14(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x1c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x88f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x834(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x14(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x1c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x78f(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r13,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
mov    %r15d,%ecx
call   1060 <fn_dirFHaarWT2p2@plt>
mov    0x20(%rsp),%esi
lea    0x760(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x28(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x30(%rsp),%esi
lea    0x702(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x34(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x38(%rsp),%esi
lea    0x6d4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x3c(%rsp),%esi
lea    0x6c1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0x8,%edx
mov    %r15d,%ecx
call   1090 <fn_invFHaarWT2p2@plt>
lea    0x645(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x14(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x1c(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x5b4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x596(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %ebx,%ebx
nopl   0x0(%rax)
xor    %eax,%eax
call   10a0 <rand@plt>
lea    0x1f(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffffe0,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
mov    %esi,0x50(%rsp,%rbx,4)
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1b80 <main+0xa00>
mov    0x4c(%rsp),%eax
cltd
idivl  0x48(%rsp)
mov    %eax,%r14d
lea    0xd0(%rsp),%rdi
lea    0x50(%rsp),%rsi
mov    $0x20,%edx
mov    %eax,%ecx
call   1060 <fn_dirFHaarWT2p2@plt>
lea    0x524(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x4ea(%rip),%rbp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0xd0(%rsp,%rbx,4),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1c10 <main+0xa90>
lea    0x50(%rsp),%rdi
lea    0xd0(%rsp),%rsi
mov    $0x20,%edx
mov    %r14d,%ecx
call   1090 <fn_invFHaarWT2p2@plt>
lea    0x4c7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x47c(%rip),%rbx
xor    %ebp,%ebp
mov    0x50(%rsp,%rbp,4),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    $0x20,%rbp
jne    1c70 <main+0xaf0>
lea    0x49b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x36f(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x489(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x404(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x3da(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   10a0 <rand@plt>
lea    0x1f(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffffe0,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
mov    %esi,0x50(%rsp,%rbp,4)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    $0x20,%rbp
jne    1d20 <main+0xba0>
lea    0xd0(%rsp),%rdi
lea    0x50(%rsp),%rsi
mov    $0x20,%edx
mov    $0x3,%ecx
call   1060 <fn_dirFHaarWT2p2@plt>
lea    0x38d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x353(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    0xd0(%rsp,%rbp,4),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    $0x20,%rbp
jne    1da0 <main+0xc20>
lea    0x50(%rsp),%rdi
lea    0xd0(%rsp),%rsi
mov    $0x20,%edx
mov    $0x3,%ecx
call   1090 <fn_invFHaarWT2p2@plt>
lea    0x335(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x2ea(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x50(%rsp,%rbp,4),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    $0x20,%rbp
jne    1e10 <main+0xc90>
lea    0x2fb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.ai_data = [8 x i32] [i32 16, i32 8, i32 12, i32 16, i32 18, i32 14, i32 4, i32 8]
@.str = [66 x i8] c"-----------------------------------------------------------------\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [19 x i8] c" determining test \00"
@.str.3 = [12 x i8] c" one stage \00"
@.str.4 = [9 x i8] c" input: \00"
@.str.5 = [4 x i8] c"%d \00"
@.str.6 = [10 x i8] c" output: \00"
@.str.7 = [16 x i8] c" input, again: \00"
@.str.8 = [12 x i8] c" one level \00"
@.str.9 = [13 x i8] c" full level \00"
@.str.10 = [13 x i8] c"i_step = %d \00"
@.str.11 = [9 x i8] c" W3: %d \00"
@.str.12 = [9 x i8] c" W2: %d \00"
@.str.13 = [9 x i8] c" W1: %d \00"
@.str.14 = [9 x i8] c" W0: %d \00"
@.str.15 = [14 x i8] c" random test \00"
@.str.16 = [16 x i8] c" input random: \00"
@.str.17 = [17 x i8] c" output random: \00"
@.str.18 = [23 x i8] c" input random, again: \00"
@.str.19 = [33 x i8] c" Well? Almost (!) The same? ))) \00"
@.str.20 = [24 x i8] c" random semi-full test \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [8 x i32]
%4 = alloca [8 x i32]
%5 = alloca i32
%6 = alloca [32 x i32]
%7 = alloca [32 x i32]
%8 = alloca i32
store i32 0, i32* %1
%9 = bitcast [8 x i32]* %3 to i8*
%10 = call i32 @log(i32 8)
%11 = call i32 @log(i32 2)
%12 = sdiv i32 %10, %11
store i32 %12, i32* %5
%13 = call i32 @log(i32 32)
%14 = call i32 @log(i32 2)
%15 = sdiv i32 %13, %14
store i32 %15, i32* %8
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %28
28: ; preds = %38, %0
%29 = load i32, i32* %2
%30 = icmp slt i32 %29, 8
br i1 %30, label %31, label %41
31: ; preds = %28
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %35)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %38
38: ; preds = %31
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 1
store i32 %40, i32* %2
br label %28
41: ; preds = %28
%42 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%43 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%44 = call i32 @fn_dirFHaarWT2p2oneStage(i32* %42, i32* %43, i32 8)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %47
47: ; preds = %57, %41
%48 = load i32, i32* %2
%49 = icmp slt i32 %48, 8
br i1 %49, label %50, label %60
50: ; preds = %47
%51 = load i32, i32* %2
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %52
%54 = load i32, i32* %53
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %57
57: ; preds = %50
%58 = load i32, i32* %2
%59 = add nsw i32 %58, 1
store i32 %59, i32* %2
br label %47
60: ; preds = %47
%61 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%62 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%63 = call i32 @fn_invFHaarWT2p2oneStage(i32* %61, i32* %62, i32 8)
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %66
66: ; preds = %76, %60
%67 = load i32, i32* %2
%68 = icmp slt i32 %67, 8
br i1 %68, label %69, label %79
69: ; preds = %66
%70 = load i32, i32* %2
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %71
%73 = load i32, i32* %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %73)
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %76
76: ; preds = %69
%77 = load i32, i32* %2
%78 = add nsw i32 %77, 1
store i32 %78, i32* %2
br label %66
79: ; preds = %66
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %88
88: ; preds = %98, %79
%89 = load i32, i32* %2
%90 = icmp slt i32 %89, 8
br i1 %90, label %91, label %101
91: ; preds = %88
%92 = load i32, i32* %2
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %93
%95 = load i32, i32* %94
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %95)
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %98
98: ; preds = %91
%99 = load i32, i32* %2
%100 = add nsw i32 %99, 1
store i32 %100, i32* %2
br label %88
101: ; preds = %88
%102 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%103 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%104 = call i32 @fn_dirFHaarWT2p2(i32* %102, i32* %103, i32 8, i32 1)
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %107
107: ; preds = %117, %101
%108 = load i32, i32* %2
%109 = icmp slt i32 %108, 8
br i1 %109, label %110, label %120
110: ; preds = %107
%111 = load i32, i32* %2
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %112
%114 = load i32, i32* %113
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %114)
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %117
117: ; preds = %110
%118 = load i32, i32* %2
%119 = add nsw i32 %118, 1
store i32 %119, i32* %2
br label %107
120: ; preds = %107
%121 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%122 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%123 = call i32 @fn_invFHaarWT2p2(i32* %121, i32* %122, i32 8, i32 1)
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %126
126: ; preds = %136, %120
%127 = load i32, i32* %2
%128 = icmp slt i32 %127, 8
br i1 %128, label %129, label %139
129: ; preds = %126
%130 = load i32, i32* %2
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %131
%133 = load i32, i32* %132
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %133)
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %136
136: ; preds = %129
%137 = load i32, i32* %2
%138 = add nsw i32 %137, 1
store i32 %138, i32* %2
br label %126
139: ; preds = %126
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %148
148: ; preds = %158, %139
%149 = load i32, i32* %2
%150 = icmp slt i32 %149, 8
br i1 %150, label %151, label %161
151: ; preds = %148
%152 = load i32, i32* %2
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %153
%155 = load i32, i32* %154
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %155)
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %158
158: ; preds = %151
%159 = load i32, i32* %2
%160 = add nsw i32 %159, 1
store i32 %160, i32* %2
br label %148
161: ; preds = %148
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%163 = load i32, i32* %5
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i32 %163)
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%167 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%168 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%169 = load i32, i32* %5
%170 = call i32 @fn_dirFHaarWT2p2(i32* %167, i32* %168, i32 8, i32 %169)
store i32 0, i32* %2
br label %171
171: ; preds = %181, %161
%172 = load i32, i32* %2
%173 = icmp slt i32 %172, 4
br i1 %173, label %174, label %184
174: ; preds = %171
%175 = load i32, i32* %2
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %176
%178 = load i32, i32* %177
%179 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 %178)
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %181
181: ; preds = %174
%182 = load i32, i32* %2
%183 = add nsw i32 %182, 1
store i32 %183, i32* %2
br label %171
184: ; preds = %171
store i32 4, i32* %2
br label %185
185: ; preds = %195, %184
%186 = load i32, i32* %2
%187 = icmp slt i32 %186, 6
br i1 %187, label %188, label %198
188: ; preds = %185
%189 = load i32, i32* %2
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %190
%192 = load i32, i32* %191
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i32 %192)
%194 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %195
195: ; preds = %188
%196 = load i32, i32* %2
%197 = add nsw i32 %196, 1
store i32 %197, i32* %2
br label %185
198: ; preds = %185
%199 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 6
%200 = load i32, i32* %199
%201 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i32 %200)
%202 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%203 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 7
%204 = load i32, i32* %203
%205 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i32 %204)
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%207 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%208 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%209 = load i32, i32* %5
%210 = call i32 @fn_invFHaarWT2p2(i32* %207, i32* %208, i32 8, i32 %209)
%211 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %213
213: ; preds = %223, %198
%214 = load i32, i32* %2
%215 = icmp slt i32 %214, 8
br i1 %215, label %216, label %226
216: ; preds = %213
%217 = load i32, i32* %2
%218 = sext i32 %217 to i64
%219 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %218
%220 = load i32, i32* %219
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %220)
%222 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %223
223: ; preds = %216
%224 = load i32, i32* %2
%225 = add nsw i32 %224, 1
store i32 %225, i32* %2
br label %213
226: ; preds = %213
%227 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%228 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%229 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0))
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%231 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%232 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%233 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0))
%234 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %235
235: ; preds = %251, %226
%236 = load i32, i32* %2
%237 = icmp slt i32 %236, 32
br i1 %237, label %238, label %254
238: ; preds = %235
%239 = call i32 (...) @rand()
%240 = srem i32 %239, 32
%241 = add nsw i32 %240, 1
%242 = load i32, i32* %2
%243 = sext i32 %242 to i64
%244 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %243
store i32 %241, i32* %244
%245 = load i32, i32* %2
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %246
%248 = load i32, i32* %247
%249 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %248)
%250 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %251
251: ; preds = %238
%252 = load i32, i32* %2
%253 = add nsw i32 %252, 1
store i32 %253, i32* %2
br label %235
254: ; preds = %235
%255 = getelementptr inbounds [32 x i32], [32 x i32]* %7, i64 0, i64 0
%256 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 0
%257 = load i32, i32* %8
%258 = call i32 @fn_dirFHaarWT2p2(i32* %255, i32* %256, i32 32, i32 %257)
%259 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.17, i64 0, i64 0))
%260 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %261
261: ; preds = %271, %254
%262 = load i32, i32* %2
%263 = icmp slt i32 %262, 32
br i1 %263, label %264, label %274
264: ; preds = %261
%265 = load i32, i32* %2
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds [32 x i32], [32 x i32]* %7, i64 0, i64 %266
%268 = load i32, i32* %267
%269 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %268)
%270 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %271
271: ; preds = %264
%272 = load i32, i32* %2
%273 = add nsw i32 %272, 1
store i32 %273, i32* %2
br label %261
274: ; preds = %261
%275 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 0
%276 = getelementptr inbounds [32 x i32], [32 x i32]* %7, i64 0, i64 0
%277 = load i32, i32* %8
%278 = call i32 @fn_invFHaarWT2p2(i32* %275, i32* %276, i32 32, i32 %277)
%279 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0))
%280 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %281
281: ; preds = %291, %274
%282 = load i32, i32* %2
%283 = icmp slt i32 %282, 32
br i1 %283, label %284, label %294
284: ; preds = %281
%285 = load i32, i32* %2
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %286
%288 = load i32, i32* %287
%289 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %288)
%290 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %291
291: ; preds = %284
%292 = load i32, i32* %2
%293 = add nsw i32 %292, 1
store i32 %293, i32* %2
br label %281
294: ; preds = %281
%295 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0))
%296 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%297 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%298 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%299 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.20, i64 0, i64 0))
%300 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%301 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%302 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%303 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0))
%304 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %305
305: ; preds = %321, %294
%306 = load i32, i32* %2
%307 = icmp slt i32 %306, 32
br i1 %307, label %308, label %324
308: ; preds = %305
%309 = call i32 (...) @rand()
%310 = srem i32 %309, 32
%311 = add nsw i32 %310, 1
%312 = load i32, i32* %2
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %313
store i32 %311, i32* %314
%315 = load i32, i32* %2
%316 = sext i32 %315 to i64
%317 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %316
%318 = load i32, i32* %317
%319 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %318)
%320 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %321
321: ; preds = %308
%322 = load i32, i32* %2
%323 = add nsw i32 %322, 1
store i32 %323, i32* %2
br label %305
324: ; preds = %305
%325 = getelementptr inbounds [32 x i32], [32 x i32]* %7, i64 0, i64 0
%326 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 0
%327 = call i32 @fn_dirFHaarWT2p2(i32* %325, i32* %326, i32 32, i32 3)
%328 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.17, i64 0, i64 0))
%329 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %330
330: ; preds = %340, %324
%331 = load i32, i32* %2
%332 = icmp slt i32 %331, 32
br i1 %332, label %333, label %343
333: ; preds = %330
%334 = load i32, i32* %2
%335 = sext i32 %334 to i64
%336 = getelementptr inbounds [32 x i32], [32 x i32]* %7, i64 0, i64 %335
%337 = load i32, i32* %336
%338 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %337)
%339 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %340
340: ; preds = %333
%341 = load i32, i32* %2
%342 = add nsw i32 %341, 1
store i32 %342, i32* %2
br label %330
343: ; preds = %330
%344 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 0
%345 = getelementptr inbounds [32 x i32], [32 x i32]* %7, i64 0, i64 0
%346 = call i32 @fn_invFHaarWT2p2(i32* %344, i32* %345, i32 32, i32 3)
%347 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0))
%348 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %349
349: ; preds = %359, %343
%350 = load i32, i32* %2
%351 = icmp slt i32 %350, 32
br i1 %351, label %352, label %362
352: ; preds = %349
%353 = load i32, i32* %2
%354 = sext i32 %353 to i64
%355 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %354
%356 = load i32, i32* %355
%357 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %356)
%358 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %359
359: ; preds = %352
%360 = load i32, i32* %2
%361 = add nsw i32 %360, 1
store i32 %361, i32* %2
br label %349
362: ; preds = %349
%363 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0))
%364 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

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