#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*/ Daub97Synthesis1D(double *, double *, int);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int Daub97Synthesis2D(double *image, int rows, int cols, int levels) {
  double *signal_in, *signal_out, *base;
  int cur_level, cur_cols, cur_rows;
  int i, j, max, offs, n_samples;
  int err_code;
  max = (cols > rows ? cols : rows);
  signal_in = signal_out = NULL;
  signal_in = (double *)malloc(max * sizeof(double));
  signal_out = (double *)malloc(max * sizeof(double));
  if (signal_in == NULL || signal_out == NULL) {
    err_code = (1);
    goto memory_error;
  }
  cur_cols = cols >> (levels - 1);
  cur_rows = rows >> (levels - 1);
  for (cur_level = 1; cur_level <= levels; cur_level++) {
    offs = 1;
    for (i = 0; i < cur_rows; i++) {
      base = image + i * cols;
      for (j = 0; j < cur_cols; j++) {
        signal_in[j] = *base;
        base += offs;
      }
      Daub97Synthesis1D(signal_in, signal_out, cur_cols);
      base = image + i * cols;
      for (j = 0; j < cur_cols; j++) {
        *base = signal_out[j];
        base += offs;
      }
    }
    offs = cols;
    for (i = 0; i < cur_cols; i++) {
      base = image + i;
      for (j = 0; j < cur_rows; j++) {
        signal_in[j] = *base;
        base += offs;
      }
      Daub97Synthesis1D(signal_in, signal_out, cur_rows);
      base = image + i;
      for (j = 0; j < cur_rows; j++) {
        *base = signal_out[j];
        base += offs;
      }
    }
    cur_cols <<= 1;
    cur_rows <<= 1;
  }
  n_samples = cols * rows;
  for (i = 0; i < n_samples; i++)
    image[i] =
        (((((image[i] + 128.0) < 0) ? (int)((image[i] + 128.0) - 0.5)
                                    : (int)((image[i] + 128.0) + 0.5))) < 0
             ? 0
             : (((((image[i] + 128.0) < 0) ? (int)((image[i] + 128.0) - 0.5)
                                           : (int)((image[i] + 128.0) + 0.5))) >
                        255
                    ? 255
                    : ((((image[i] + 128.0) < 0)
                            ? (int)((image[i] + 128.0) - 0.5)
                            : (int)((image[i] + 128.0) + 0.5)))));
  err_code = (0);
memory_error:
  free(signal_in);
  free(signal_out);
  return err_code;
}


x86 assembly (clang, -O0):
<Daub97Synthesis2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    115c <Daub97Synthesis2D+0x2c>
mov    -0x10(%rbp),%eax
mov    %eax,-0x58(%rbp)
jmp    1162 <Daub97Synthesis2D+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x48(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x20(%rbp)
movslq -0x48(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
movslq -0x48(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     11b4 <Daub97Synthesis2D+0x84>
cmpq   $0x0,-0x28(%rbp)
jne    11c0 <Daub97Synthesis2D+0x90>
movl   $0x1,-0x54(%rbp)
jmp    15f4 <Daub97Synthesis2D+0x4c4>
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
sar    %cl,%eax
mov    %eax,-0x38(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
sar    %cl,%eax
mov    %eax,-0x3c(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     140c <Daub97Synthesis2D+0x2dc>
movl   $0x1,-0x4c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    12f4 <Daub97Synthesis2D+0x1c4>
mov    -0x8(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x10(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    126d <Daub97Synthesis2D+0x13d>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1229 <Daub97Synthesis2D+0xf9>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x38(%rbp),%edx
call   1030 <Daub97Synthesis1D@plt>
mov    -0x8(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x10(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    12e1 <Daub97Synthesis2D+0x1b1>
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x4c(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    129d <Daub97Synthesis2D+0x16d>
jmp    12e6 <Daub97Synthesis2D+0x1b6>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11fd <Daub97Synthesis2D+0xcd>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    13ec <Daub97Synthesis2D+0x2bc>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    136b <Daub97Synthesis2D+0x23b>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1327 <Daub97Synthesis2D+0x1f7>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x3c(%rbp),%edx
call   1030 <Daub97Synthesis1D@plt>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    13d9 <Daub97Synthesis2D+0x2a9>
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x4c(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1395 <Daub97Synthesis2D+0x265>
jmp    13de <Daub97Synthesis2D+0x2ae>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1301 <Daub97Synthesis2D+0x1d1>
mov    -0x38(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11e3 <Daub97Synthesis2D+0xb3>
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x50(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    15ed <Daub97Synthesis2D+0x4bd>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  0xbc7(%rip),%xmm1
addsd  (%rax,%rcx,8),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1478 <Daub97Synthesis2D+0x348>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  0xba5(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  0xba0(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x5c(%rbp)
jmp    14a0 <Daub97Synthesis2D+0x370>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  0xb78(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  0xb73(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    $0x0,%eax
jge    14b6 <Daub97Synthesis2D+0x386>
xor    %eax,%eax
mov    %eax,-0x60(%rbp)
jmp    15cb <Daub97Synthesis2D+0x49b>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  0xb3a(%rip),%xmm1
addsd  (%rax,%rcx,8),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1505 <Daub97Synthesis2D+0x3d5>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  0xb18(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  0xb13(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x64(%rbp)
jmp    152d <Daub97Synthesis2D+0x3fd>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  0xaeb(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  0xae6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    $0xff,%eax
jle    1548 <Daub97Synthesis2D+0x418>
mov    $0xff,%eax
mov    %eax,-0x68(%rbp)
jmp    15c5 <Daub97Synthesis2D+0x495>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  0xaa8(%rip),%xmm1
addsd  (%rax,%rcx,8),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1597 <Daub97Synthesis2D+0x467>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  0xa86(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  0xa81(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x6c(%rbp)
jmp    15bf <Daub97Synthesis2D+0x48f>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  0xa59(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  0xa54(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    141d <Daub97Synthesis2D+0x2ed>
movl   $0x0,-0x54(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <free@plt>
mov    -0x28(%rbp),%rdi
call   1040 <free@plt>
mov    -0x54(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Daub97Synthesis2D>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %rcx,0x48(%rsp)
mov    %edx,%r12d
mov    %esi,%r13d
mov    %rdi,%r14
cmp    %esi,%edx
mov    %esi,%ebp
cmovg  %edx,%ebp
shl    $0x3,%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%r15
mov    $0x1,%ebp
test   %rbx,%rbx
je     1a75 <Daub97Synthesis2D+0x945>
test   %r15,%r15
je     1a75 <Daub97Synthesis2D+0x945>
mov    %r13d,0x30(%rsp)
mov    %r12d,0x34(%rsp)
mov    %r14,0x20(%rsp)
cmpl   $0x0,0x48(%rsp)
jle    195b <Daub97Synthesis2D+0x82b>
mov    0x48(%rsp),%rax
lea    -0x1(%rax),%ecx
mov    0x30(%rsp),%esi
sar    %cl,%esi
mov    0x34(%rsp),%eax
mov    %eax,%edx
sar    %cl,%edx
movslq %eax,%rcx
mov    0x20(%rsp),%rax
add    $0x70,%rax
mov    %rax,0x70(%rsp)
lea    0x0(,%rcx,8),%rbp
lea    0x10(%rbx),%rax
mov    %rax,0x80(%rsp)
lea    0x18(%rbx),%rax
mov    %rax,0xc0(%rsp)
lea    0x10(%r15),%rax
mov    %rax,0x78(%rsp)
lea    0x38(%r15),%rax
mov    %rax,0x98(%rsp)
mov    %rcx,%rax
shl    $0x5,%rax
mov    %rax,0xc8(%rsp)
mov    %rcx,0xd0(%rsp)
shl    $0x6,%rcx
mov    %rcx,0xa8(%rsp)
mov    $0x1,%eax
jmp    124d <Daub97Synthesis2D+0x11d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    %edx,%edx
mov    0x14(%rsp),%esi
add    %esi,%esi
mov    0x88(%rsp),%rcx
lea    0x1(%rcx),%eax
cmp    0x48(%rsp),%ecx
je     195b <Daub97Synthesis2D+0x82b>
mov    %rax,0x88(%rsp)
mov    %esi,%r13d
mov    %edx,%eax
mov    %rax,0x8(%rsp)
mov    %esi,0x14(%rsp)
test   %esi,%esi
mov    %edx,0x10(%rsp)
jle    1710 <Daub97Synthesis2D+0x5e0>
mov    0x8(%rsp),%rax
lea    (%r15,%rax,8),%rcx
mov    %rcx,0xb0(%rsp)
lea    (%rbx,%rax,8),%rcx
mov    %rcx,0xb8(%rsp)
mov    %eax,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,0x18(%rsp)
add    $0xfffffffffffffffc,%rcx
mov    %rcx,0x68(%rsp)
mov    %rcx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edi
and    $0x3,%edi
mov    %rsi,%rcx
mov    %rsi,0x90(%rsp)
and    $0xfffffffffffffffc,%rsi
mov    %rsi,0x60(%rsp)
mov    %eax,%r8d
and    $0x3,%r8d
mov    %rdi,0xa0(%rsp)
mov    %rdi,%r9
shl    $0x5,%r9
mov    0x20(%rsp),%r10
mov    0x70(%rsp),%r14
xor    %r12d,%r12d
mov    %r13,0x50(%rsp)
mov    %r8,0x40(%rsp)
mov    %r9,0x28(%rsp)
jmp    1337 <Daub97Synthesis2D+0x207>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r10,%r13
call   1030 <Daub97Synthesis1D@plt>
mov    %r13,%r10
mov    0x28(%rsp),%r9
mov    0x40(%rsp),%r8
mov    0x10(%rsp),%edx
add    $0x1,%r12
add    %rbp,%r14
add    %rbp,%r10
mov    0x50(%rsp),%r13
cmp    %r13,%r12
je     1710 <Daub97Synthesis2D+0x5e0>
test   %edx,%edx
jle    1300 <Daub97Synthesis2D+0x1d0>
mov    %r12,%rax
imul   0xd0(%rsp),%rax
mov    0x20(%rsp),%rcx
lea    (%rcx,%rax,8),%r13
add    0x8(%rsp),%rax
lea    (%rcx,%rax,8),%rax
cmp    $0x4,%edx
mov    %rax,0x38(%rsp)
jb     137a <Daub97Synthesis2D+0x24a>
cmp    %rax,%rbx
jae    141c <Daub97Synthesis2D+0x2ec>
cmp    0xb8(%rsp),%r13
jae    141c <Daub97Synthesis2D+0x2ec>
xor    %ecx,%ecx
mov    %r13,%rax
mov    %rcx,%rdi
not    %rdi
add    0x8(%rsp),%rdi
test   %r8,%r8
je     13b7 <Daub97Synthesis2D+0x287>
mov    %r8,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rax),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x8,%rax
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    13a0 <Daub97Synthesis2D+0x270>
cmp    $0x3,%rdi
jb     14f0 <Daub97Synthesis2D+0x3c0>
mov    0x8(%rsp),%rdi
sub    %rcx,%rdi
mov    0xc0(%rsp),%rsi
lea    (%rsi,%rcx,8),%rcx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movsd  (%rax,%rsi,8),%xmm0
movsd  %xmm0,-0x18(%rcx,%rsi,8)
movsd  0x8(%rax,%rsi,8),%xmm0
movsd  %xmm0,-0x10(%rcx,%rsi,8)
movsd  0x10(%rax,%rsi,8),%xmm0
movsd  %xmm0,-0x8(%rcx,%rsi,8)
movsd  0x18(%rax,%rsi,8),%xmm0
movsd  %xmm0,(%rcx,%rsi,8)
add    $0x4,%rsi
cmp    %rsi,%rdi
jne    13e0 <Daub97Synthesis2D+0x2b0>
jmp    14f0 <Daub97Synthesis2D+0x3c0>
cmpq   $0xc,0x68(%rsp)
jae    1428 <Daub97Synthesis2D+0x2f8>
xor    %eax,%eax
jmp    1494 <Daub97Synthesis2D+0x364>
mov    0x60(%rsp),%rcx
xor    %eax,%eax
nop
movups -0x70(%r14,%rax,8),%xmm0
movups -0x60(%r14,%rax,8),%xmm1
movups %xmm0,(%rbx,%rax,8)
movups %xmm1,0x10(%rbx,%rax,8)
movups -0x50(%r14,%rax,8),%xmm0
movups -0x40(%r14,%rax,8),%xmm1
movups %xmm0,0x20(%rbx,%rax,8)
movups %xmm1,0x30(%rbx,%rax,8)
movups -0x30(%r14,%rax,8),%xmm0
movups -0x20(%r14,%rax,8),%xmm1
movups %xmm0,0x40(%rbx,%rax,8)
movups %xmm1,0x50(%rbx,%rax,8)
movupd -0x10(%r14,%rax,8),%xmm0
movupd (%r14,%rax,8),%xmm1
movupd %xmm0,0x60(%rbx,%rax,8)
movupd %xmm1,0x70(%rbx,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    1430 <Daub97Synthesis2D+0x300>
cmpq   $0x0,0xa0(%rsp)
je     14df <Daub97Synthesis2D+0x3af>
mov    0x80(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
lea    (%r10,%rax,8),%rax
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd (%rax,%rsi,1),%xmm0
movupd 0x10(%rax,%rsi,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rsi,1)
movupd %xmm1,(%rcx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%r9
jne    14c0 <Daub97Synthesis2D+0x390>
mov    0x18(%rsp),%rax
cmp    0x8(%rsp),%rax
jne    1624 <Daub97Synthesis2D+0x4f4>
nop
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,0x58(%rsp)
mov    %r10,%r12
call   1030 <Daub97Synthesis1D@plt>
mov    %r12,%r10
mov    0x58(%rsp),%r12
mov    0x28(%rsp),%r9
mov    0x40(%rsp),%r8
mov    0x10(%rsp),%edx
test   %edx,%edx
jle    131f <Daub97Synthesis2D+0x1ef>
cmp    $0x4,%edx
jb     153f <Daub97Synthesis2D+0x40f>
cmp    0xb0(%rsp),%r13
jae    1615 <Daub97Synthesis2D+0x4e5>
cmp    0x38(%rsp),%r15
jae    1615 <Daub97Synthesis2D+0x4e5>
xor    %eax,%eax
mov    0x8(%rsp),%rdi
mov    %edi,%esi
sub    %eax,%esi
mov    %rax,%rcx
not    %rcx
add    %rdi,%rcx
and    $0x7,%rsi
je     157a <Daub97Synthesis2D+0x44a>
nopl   0x0(%rax)
movsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13)
add    $0x8,%r13
add    $0x1,%rax
add    $0xffffffffffffffff,%rsi
jne    1560 <Daub97Synthesis2D+0x430>
cmp    $0x7,%rcx
jb     131f <Daub97Synthesis2D+0x1ef>
mov    0x8(%rsp),%rcx
sub    %rax,%rcx
mov    0x98(%rsp),%rsi
lea    (%rsi,%rax,8),%rax
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movsd  -0x38(%rax,%rsi,8),%xmm0
movsd  %xmm0,0x0(%r13,%rsi,8)
movsd  -0x30(%rax,%rsi,8),%xmm0
movsd  %xmm0,0x8(%r13,%rsi,8)
movsd  -0x28(%rax,%rsi,8),%xmm0
movsd  %xmm0,0x10(%r13,%rsi,8)
movsd  -0x20(%rax,%rsi,8),%xmm0
movsd  %xmm0,0x18(%r13,%rsi,8)
movsd  -0x18(%rax,%rsi,8),%xmm0
movsd  %xmm0,0x20(%r13,%rsi,8)
movsd  -0x10(%rax,%rsi,8),%xmm0
movsd  %xmm0,0x28(%r13,%rsi,8)
movsd  -0x8(%rax,%rsi,8),%xmm0
movsd  %xmm0,0x30(%r13,%rsi,8)
movsd  (%rax,%rsi,8),%xmm0
movsd  %xmm0,0x38(%r13,%rsi,8)
add    $0x8,%rsi
cmp    %rsi,%rcx
jne    15a0 <Daub97Synthesis2D+0x470>
jmp    131f <Daub97Synthesis2D+0x1ef>
cmpq   $0xc,0x68(%rsp)
jae    1639 <Daub97Synthesis2D+0x509>
xor    %eax,%eax
jmp    16ac <Daub97Synthesis2D+0x57c>
mov    0x18(%rsp),%rcx
lea    0x0(,%rcx,8),%rax
add    %r13,%rax
jmp    137f <Daub97Synthesis2D+0x24f>
mov    0x60(%rsp),%rcx
xor    %eax,%eax
movups (%r15,%rax,8),%xmm0
movups 0x10(%r15,%rax,8),%xmm1
movups %xmm0,-0x70(%r14,%rax,8)
movups %xmm1,-0x60(%r14,%rax,8)
movups 0x20(%r15,%rax,8),%xmm0
movups 0x30(%r15,%rax,8),%xmm1
movups %xmm0,-0x50(%r14,%rax,8)
movups %xmm1,-0x40(%r14,%rax,8)
movups 0x40(%r15,%rax,8),%xmm0
movups 0x50(%r15,%rax,8),%xmm1
movups %xmm0,-0x30(%r14,%rax,8)
movups %xmm1,-0x20(%r14,%rax,8)
movupd 0x60(%r15,%rax,8),%xmm0
movupd 0x70(%r15,%rax,8),%xmm1
movupd %xmm0,-0x10(%r14,%rax,8)
movupd %xmm1,(%r14,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    1640 <Daub97Synthesis2D+0x510>
testb  $0x3,0x90(%rsp)
03
je     16ef <Daub97Synthesis2D+0x5bf>
mov    0x78(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
lea    (%r10,%rax,8),%rax
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nop
movupd -0x10(%rcx,%rsi,1),%xmm0
movupd (%rcx,%rsi,1),%xmm1
movupd %xmm0,(%rax,%rsi,1)
movupd %xmm1,0x10(%rax,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%r9
jne    16d0 <Daub97Synthesis2D+0x5a0>
mov    0x18(%rsp),%rax
cmp    0x8(%rsp),%rax
je     131f <Daub97Synthesis2D+0x1ef>
mov    0x18(%rsp),%rax
lea    0x0(%r13,%rax,8),%r13
jmp    1541 <Daub97Synthesis2D+0x411>
xchg   %ax,%ax
test   %edx,%edx
jle    1230 <Daub97Synthesis2D+0x100>
lea    -0x1(%r13),%rax
mov    %rax,0x28(%rsp)
mov    %r13d,%r12d
and    $0x3,%r12d
mov    %r13d,%esi
and    $0xfffffffc,%esi
mov    %r13d,%eax
and    $0x7,%eax
mov    %rax,0x18(%rsp)
and    $0xfffffff8,%r13d
mov    0x20(%rsp),%r8
xor    %ecx,%ecx
mov    %rsi,0x38(%rsp)
mov    %r13,0x50(%rsp)
jmp    1782 <Daub97Synthesis2D+0x652>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r8,%r14
call   1030 <Daub97Synthesis1D@plt>
mov    %r14,%r8
mov    0x38(%rsp),%rsi
mov    0x10(%rsp),%edx
mov    0x58(%rsp),%rcx
add    $0x1,%rcx
add    $0x8,%r8
cmp    0x8(%rsp),%rcx
je     1230 <Daub97Synthesis2D+0x100>
mov    0x14(%rsp),%edx
test   %edx,%edx
mov    %rcx,0x58(%rsp)
jle    1750 <Daub97Synthesis2D+0x620>
mov    0x20(%rsp),%rax
lea    (%rax,%rcx,8),%r14
cmpq   $0x3,0x28(%rsp)
jae    17b0 <Daub97Synthesis2D+0x680>
xor    %ecx,%ecx
mov    %r14,%rax
jmp    180c <Daub97Synthesis2D+0x6dc>
nopw   0x0(%rax,%rax,1)
mov    %r8,%rdx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rdx,%rax
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    %rbp,%rdx
movsd  (%rax,%rbp,1),%xmm0
movsd  %xmm0,0x8(%rbx,%rcx,8)
movsd  0x0(%rbp,%rdx,1),%xmm0
add    %rbp,%rdx
movsd  %xmm0,0x10(%rbx,%rcx,8)
movsd  0x0(%rbp,%rdx,1),%xmm0
add    %rbp,%rdx
movsd  %xmm0,0x18(%rbx,%rcx,8)
add    $0x4,%rcx
add    %rbp,%rdx
cmp    %rcx,%rsi
jne    17c0 <Daub97Synthesis2D+0x690>
add    0xc8(%rsp),%rax
mov    %r8,0x40(%rsp)
test   %r12,%r12
je     1835 <Daub97Synthesis2D+0x705>
lea    (%rbx,%rcx,8),%rcx
xor    %edx,%edx
nopl   0x0(%rax)
movsd  (%rax),%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
add    $0x1,%rdx
add    %rbp,%rax
cmp    %rdx,%r12
jne    1820 <Daub97Synthesis2D+0x6f0>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    0x14(%rsp),%r13d
mov    %r13d,%edx
call   1030 <Daub97Synthesis1D@plt>
test   %r13d,%r13d
mov    0x10(%rsp),%edx
mov    0x50(%rsp),%r13
mov    0x38(%rsp),%rsi
mov    0x18(%rsp),%rdi
mov    0x40(%rsp),%r8
jle    176a <Daub97Synthesis2D+0x63a>
cmpq   $0x7,0x28(%rsp)
jae    1881 <Daub97Synthesis2D+0x751>
xor    %eax,%eax
test   %rdi,%rdi
jne    192e <Daub97Synthesis2D+0x7fe>
jmp    176a <Daub97Synthesis2D+0x63a>
mov    %r8,%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
mov    %rcx,%r14
movsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,(%rcx)
movsd  0x8(%r15,%rax,8),%xmm0
add    %rbp,%rcx
movsd  %xmm0,(%r14,%rbp,1)
movsd  0x10(%r15,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,1)
add    %rbp,%rcx
movsd  0x18(%r15,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,1)
add    %rbp,%rcx
movsd  0x20(%r15,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,1)
add    %rbp,%rcx
movsd  0x28(%r15,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,1)
add    %rbp,%rcx
movsd  0x30(%r15,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,1)
add    %rbp,%rcx
movsd  0x38(%r15,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,1)
add    %rbp,%rcx
add    $0x8,%rax
add    %rbp,%rcx
cmp    %rax,%r13
jne    1890 <Daub97Synthesis2D+0x760>
add    0xa8(%rsp),%r14
test   %rdi,%rdi
je     176a <Daub97Synthesis2D+0x63a>
lea    (%r15,%rax,8),%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%r14)
add    $0x1,%rcx
add    %rbp,%r14
cmp    %rcx,%rdi
jne    1940 <Daub97Synthesis2D+0x810>
jmp    176a <Daub97Synthesis2D+0x63a>
mov    0x34(%rsp),%ecx
imul   0x30(%rsp),%ecx
test   %ecx,%ecx
jle    197b <Daub97Synthesis2D+0x84b>
mov    %ecx,%eax
cmp    $0x1,%ecx
mov    0x20(%rsp),%rdi
jne    1982 <Daub97Synthesis2D+0x852>
xor    %ecx,%ecx
jmp    1a99 <Daub97Synthesis2D+0x969>
xor    %ebp,%ebp
jmp    1a75 <Daub97Synthesis2D+0x945>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
xor    %edx,%edx
movapd 0x66e(%rip),%xmm8
xorpd  %xmm13,%xmm13
movapd 0x670(%rip),%xmm9
movapd 0x677(%rip),%xmm10
movapd 0x67e(%rip),%xmm11
movdqa 0x685(%rip),%xmm12
movdqa 0x68d(%rip),%xmm6
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd (%rdi,%rdx,8),%xmm3
addpd  %xmm8,%xmm3
movapd %xmm3,%xmm4
cmpnltpd %xmm13,%xmm4
shufps $0xe8,%xmm4,%xmm4
movapd %xmm3,%xmm0
cmpltpd %xmm13,%xmm0
movapd %xmm0,%xmm7
shufps $0xe8,%xmm0,%xmm7
movapd %xmm3,%xmm2
addpd  %xmm9,%xmm2
addpd  %xmm10,%xmm3
cvttpd2dq %xmm2,%xmm5
andpd  %xmm0,%xmm2
andnpd %xmm3,%xmm0
orpd   %xmm2,%xmm0
cvttpd2dq %xmm0,%xmm0
movapd %xmm0,%xmm2
xorpd  %xmm11,%xmm2
movdqa %xmm12,%xmm1
pcmpgtd %xmm2,%xmm1
cvttpd2dq %xmm3,%xmm2
pcmpgtd %xmm6,%xmm0
andps  %xmm1,%xmm7
andps  %xmm4,%xmm1
pand   %xmm6,%xmm0
andpd  %xmm7,%xmm5
andnpd %xmm0,%xmm7
orpd   %xmm5,%xmm7
andpd  %xmm1,%xmm2
andnpd %xmm7,%xmm1
orpd   %xmm2,%xmm1
cvtdq2pd %xmm1,%xmm0
movupd %xmm0,(%rdi,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%rcx
jne    19d0 <Daub97Synthesis2D+0x8a0>
xor    %ebp,%ebp
cmp    %rax,%rcx
jne    1a99 <Daub97Synthesis2D+0x969>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %r15,%rdi
call   1040 <free@plt>
mov    %ebp,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movsd  0x5be(%rip),%xmm8
movsd  0x5be(%rip),%xmm1
movsd  0x5be(%rip),%xmm2
xorpd  %xmm3,%xmm3
xor    %ebp,%ebp
jmp    1ad5 <Daub97Synthesis2D+0x9a5>
cvttsd2si %xmm6,%edx
xchg   %ax,%ax
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movsd  %xmm0,(%rdi,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
je     1a75 <Daub97Synthesis2D+0x945>
movsd  (%rdi,%rcx,8),%xmm5
addsd  %xmm8,%xmm5
movapd %xmm5,%xmm4
addsd  %xmm1,%xmm4
movapd %xmm5,%xmm6
addsd  %xmm2,%xmm6
movapd %xmm5,%xmm7
cmpltsd %xmm3,%xmm7
movapd %xmm7,%xmm0
andpd  %xmm4,%xmm0
andnpd %xmm6,%xmm7
orpd   %xmm0,%xmm7
cvttsd2si %xmm7,%esi
mov    $0x0,%edx
test   %esi,%esi
js     1ac0 <Daub97Synthesis2D+0x990>
mov    $0xff,%edx
cmp    $0xff,%esi
ja     1ac0 <Daub97Synthesis2D+0x990>
ucomisd %xmm5,%xmm3
jbe    1aba <Daub97Synthesis2D+0x98a>
cvttsd2si %xmm4,%edx
jmp    1ac0 <Daub97Synthesis2D+0x990>

LLVM IR (-O0):
define i32 @Daub97Synthesis2D(double* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store double* %0, double** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%21 = load i32, i32* %7
%22 = load i32, i32* %6
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %4
%25 = load i32, i32* %7
br label %28
26: ; preds = %4
%27 = load i32, i32* %6
br label %28
28: ; preds = %26, %24
%29 = phi i32 [ %25, %24 ], [ %27, %26 ]
store i32 %29, i32* %17
store double* null, double** %10
store double* null, double** %9
%30 = load i32, i32* %17
%31 = sext i32 %30 to i64
%32 = mul i64 %31, 8
%33 = trunc i64 %32 to i32
%34 = call i64 @malloc(i32 %33)
%35 = inttoptr i64 %34 to double*
store double* %35, double** %9
%36 = load i32, i32* %17
%37 = sext i32 %36 to i64
%38 = mul i64 %37, 8
%39 = trunc i64 %38 to i32
%40 = call i64 @malloc(i32 %39)
%41 = inttoptr i64 %40 to double*
store double* %41, double** %10
%42 = load double*, double** %9
%43 = icmp eq double* %42, null
br i1 %43, label %47, label %44
44: ; preds = %28
%45 = load double*, double** %10
%46 = icmp eq double* %45, null
br i1 %46, label %47, label %48
47: ; preds = %44, %28
store i32 1, i32* %20
br label %301
48: ; preds = %44
%49 = load i32, i32* %7
%50 = load i32, i32* %8
%51 = sub nsw i32 %50, 1
%52 = ashr i32 %49, %51
store i32 %52, i32* %13
%53 = load i32, i32* %6
%54 = load i32, i32* %8
%55 = sub nsw i32 %54, 1
%56 = ashr i32 %53, %55
store i32 %56, i32* %14
store i32 1, i32* %12
br label %57
57: ; preds = %189, %48
%58 = load i32, i32* %12
%59 = load i32, i32* %8
%60 = icmp sle i32 %58, %59
br i1 %60, label %61, label %192
61: ; preds = %57
store i32 1, i32* %18
store i32 0, i32* %15
br label %62
62: ; preds = %121, %61
%63 = load i32, i32* %15
%64 = load i32, i32* %14
%65 = icmp slt i32 %63, %64
br i1 %65, label %66, label %124
66: ; preds = %62
%67 = load double*, double** %5
%68 = load i32, i32* %15
%69 = load i32, i32* %7
%70 = mul nsw i32 %68, %69
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %67, i64 %71
store double* %72, double** %11
store i32 0, i32* %16
br label %73
73: ; preds = %88, %66
%74 = load i32, i32* %16
%75 = load i32, i32* %13
%76 = icmp slt i32 %74, %75
br i1 %76, label %77, label %91
77: ; preds = %73
%78 = load double*, double** %11
%79 = load double, double* %78
%80 = load double*, double** %9
%81 = load i32, i32* %16
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds double, double* %80, i64 %82
store double %79, double* %83
%84 = load i32, i32* %18
%85 = load double*, double** %11
%86 = sext i32 %84 to i64
%87 = getelementptr inbounds double, double* %85, i64 %86
store double* %87, double** %11
br label %88
88: ; preds = %77
%89 = load i32, i32* %16
%90 = add nsw i32 %89, 1
store i32 %90, i32* %16
br label %73
91: ; preds = %73
%92 = load double*, double** %9
%93 = load double*, double** %10
%94 = load i32, i32* %13
%95 = call i32 @Daub97Synthesis1D(double* %92, double* %93, i32 %94)
%96 = load double*, double** %5
%97 = load i32, i32* %15
%98 = load i32, i32* %7
%99 = mul nsw i32 %97, %98
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds double, double* %96, i64 %100
store double* %101, double** %11
store i32 0, i32* %16
br label %102
102: ; preds = %117, %91
%103 = load i32, i32* %16
%104 = load i32, i32* %13
%105 = icmp slt i32 %103, %104
br i1 %105, label %106, label %120
106: ; preds = %102
%107 = load double*, double** %10
%108 = load i32, i32* %16
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds double, double* %107, i64 %109
%111 = load double, double* %110
%112 = load double*, double** %11
store double %111, double* %112
%113 = load i32, i32* %18
%114 = load double*, double** %11
%115 = sext i32 %113 to i64
%116 = getelementptr inbounds double, double* %114, i64 %115
store double* %116, double** %11
br label %117
117: ; preds = %106
%118 = load i32, i32* %16
%119 = add nsw i32 %118, 1
store i32 %119, i32* %16
br label %102
120: ; preds = %102
br label %121
121: ; preds = %120
%122 = load i32, i32* %15
%123 = add nsw i32 %122, 1
store i32 %123, i32* %15
br label %62
124: ; preds = %62
%125 = load i32, i32* %7
store i32 %125, i32* %18
store i32 0, i32* %15
br label %126
126: ; preds = %181, %124
%127 = load i32, i32* %15
%128 = load i32, i32* %13
%129 = icmp slt i32 %127, %128
br i1 %129, label %130, label %184
130: ; preds = %126
%131 = load double*, double** %5
%132 = load i32, i32* %15
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds double, double* %131, i64 %133
store double* %134, double** %11
store i32 0, i32* %16
br label %135
135: ; preds = %150, %130
%136 = load i32, i32* %16
%137 = load i32, i32* %14
%138 = icmp slt i32 %136, %137
br i1 %138, label %139, label %153
139: ; preds = %135
%140 = load double*, double** %11
%141 = load double, double* %140
%142 = load double*, double** %9
%143 = load i32, i32* %16
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double, double* %142, i64 %144
store double %141, double* %145
%146 = load i32, i32* %18
%147 = load double*, double** %11
%148 = sext i32 %146 to i64
%149 = getelementptr inbounds double, double* %147, i64 %148
store double* %149, double** %11
br label %150
150: ; preds = %139
%151 = load i32, i32* %16
%152 = add nsw i32 %151, 1
store i32 %152, i32* %16
br label %135
153: ; preds = %135
%154 = load double*, double** %9
%155 = load double*, double** %10
%156 = load i32, i32* %14
%157 = call i32 @Daub97Synthesis1D(double* %154, double* %155, i32 %156)
%158 = load double*, double** %5
%159 = load i32, i32* %15
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double, double* %158, i64 %160
store double* %161, double** %11
store i32 0, i32* %16
br label %162
162: ; preds = %177, %153
%163 = load i32, i32* %16
%164 = load i32, i32* %14
%165 = icmp slt i32 %163, %164
br i1 %165, label %166, label %180
166: ; preds = %162
%167 = load double*, double** %10
%168 = load i32, i32* %16
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds double, double* %167, i64 %169
%171 = load double, double* %170
%172 = load double*, double** %11
store double %171, double* %172
%173 = load i32, i32* %18
%174 = load double*, double** %11
%175 = sext i32 %173 to i64
%176 = getelementptr inbounds double, double* %174, i64 %175
store double* %176, double** %11
br label %177
177: ; preds = %166
%178 = load i32, i32* %16
%179 = add nsw i32 %178, 1
store i32 %179, i32* %16
br label %162
180: ; preds = %162
br label %181
181: ; preds = %180
%182 = load i32, i32* %15
%183 = add nsw i32 %182, 1
store i32 %183, i32* %15
br label %126
184: ; preds = %126
%185 = load i32, i32* %13
%186 = shl i32 %185, 1
store i32 %186, i32* %13
%187 = load i32, i32* %14
%188 = shl i32 %187, 1
store i32 %188, i32* %14
br label %189
189: ; preds = %184
%190 = load i32, i32* %12
%191 = add nsw i32 %190, 1
store i32 %191, i32* %12
br label %57
192: ; preds = %57
%193 = load i32, i32* %7
%194 = load i32, i32* %6
%195 = mul nsw i32 %193, %194
store i32 %195, i32* %19
store i32 0, i32* %15
br label %196
196: ; preds = %297, %192
%197 = load i32, i32* %15
%198 = load i32, i32* %19
%199 = icmp slt i32 %197, %198
br i1 %199, label %200, label %300
200: ; preds = %196
%201 = load double*, double** %5
%202 = load i32, i32* %15
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds double, double* %201, i64 %203
%205 = load double, double* %204
%206 = fadd double %205, 1.280000e+02
%207 = fcmp olt double %206, 0.000000e+00
br i1 %207, label %208, label %217
208: ; preds = %200
%209 = load double*, double** %5
%210 = load i32, i32* %15
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double, double* %209, i64 %211
%213 = load double, double* %212
%214 = fadd double %213, 1.280000e+02
%215 = fsub double %214, 5.000000e-01
%216 = fptosi double %215 to i32
br label %226
217: ; preds = %200
%218 = load double*, double** %5
%219 = load i32, i32* %15
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds double, double* %218, i64 %220
%222 = load double, double* %221
%223 = fadd double %222, 1.280000e+02
%224 = fadd double %223, 5.000000e-01
%225 = fptosi double %224 to i32
br label %226
226: ; preds = %217, %208
%227 = phi i32 [ %216, %208 ], [ %225, %217 ]
%228 = icmp slt i32 %227, 0
br i1 %228, label %229, label %230
229: ; preds = %226
br label %290
230: ; preds = %226
%231 = load double*, double** %5
%232 = load i32, i32* %15
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds double, double* %231, i64 %233
%235 = load double, double* %234
%236 = fadd double %235, 1.280000e+02
%237 = fcmp olt double %236, 0.000000e+00
br i1 %237, label %238, label %247
238: ; preds = %230
%239 = load double*, double** %5
%240 = load i32, i32* %15
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds double, double* %239, i64 %241
%243 = load double, double* %242
%244 = fadd double %243, 1.280000e+02
%245 = fsub double %244, 5.000000e-01
%246 = fptosi double %245 to i32
br label %256
247: ; preds = %230
%248 = load double*, double** %5
%249 = load i32, i32* %15
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds double, double* %248, i64 %250
%252 = load double, double* %251
%253 = fadd double %252, 1.280000e+02
%254 = fadd double %253, 5.000000e-01
%255 = fptosi double %254 to i32
br label %256
256: ; preds = %247, %238
%257 = phi i32 [ %246, %238 ], [ %255, %247 ]
%258 = icmp sgt i32 %257, 255
br i1 %258, label %259, label %260
259: ; preds = %256
br label %288
260: ; preds = %256
%261 = load double*, double** %5
%262 = load i32, i32* %15
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds double, double* %261, i64 %263
%265 = load double, double* %264
%266 = fadd double %265, 1.280000e+02
%267 = fcmp olt double %266, 0.000000e+00
br i1 %267, label %268, label %277
268: ; preds = %260
%269 = load double*, double** %5
%270 = load i32, i32* %15
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds double, double* %269, i64 %271
%273 = load double, double* %272
%274 = fadd double %273, 1.280000e+02
%275 = fsub double %274, 5.000000e-01
%276 = fptosi double %275 to i32
br label %286
277: ; preds = %260
%278 = load double*, double** %5
%279 = load i32, i32* %15
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds double, double* %278, i64 %280
%282 = load double, double* %281
%283 = fadd double %282, 1.280000e+02
%284 = fadd double %283, 5.000000e-01
%285 = fptosi double %284 to i32
br label %286
286: ; preds = %277, %268
%287 = phi i32 [ %276, %268 ], [ %285, %277 ]
br label %288
288: ; preds = %286, %259
%289 = phi i32 [ 255, %259 ], [ %287, %286 ]
br label %290
290: ; preds = %288, %229
%291 = phi i32 [ 0, %229 ], [ %289, %288 ]
%292 = sitofp i32 %291 to double
%293 = load double*, double** %5
%294 = load i32, i32* %15
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds double, double* %293, i64 %295
store double %292, double* %296
br label %297
297: ; preds = %290
%298 = load i32, i32* %15
%299 = add nsw i32 %298, 1
store i32 %299, i32* %15
br label %196
300: ; preds = %196
store i32 0, i32* %20
br label %301
301: ; preds = %300, %47
%302 = load double*, double** %9
%303 = call i32 @free(double* %302)
%304 = load double*, double** %10
%305 = call i32 @free(double* %304)
%306 = load i32, i32* %20
ret i32 %306
}

LLVM IR (-O2):
define i32 @Daub97Synthesis2D(double* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %2, %1
%6 = select i1 %5, i32 %2, i32 %1
%7 = shl i32 %6, 3
%8 = tail call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to double*
%10 = inttoptr i64 %8 to i8*
%11 = tail call i64 @malloc(i32 %7)
%12 = inttoptr i64 %11 to double*
%13 = inttoptr i64 %11 to i8*
%14 = icmp eq i64 %8, 0
%15 = icmp eq i64 %11, 0
%16 = select i1 %14, i1 true, i1 %15
br i1 %16, label %505, label %17
17: ; preds = %4
%18 = add nsw i32 %3, -1
%19 = icmp slt i32 %3, 1
br i1 %19, label %445, label %20
20: ; preds = %17
%21 = ashr i32 %1, %18
%22 = ashr i32 %2, %18
%23 = sext i32 %2 to i64
br label %24
24: ; preds = %20, %440
%25 = phi i32 [ %21, %20 ], [ %442, %440 ]
%26 = phi i32 [ %22, %20 ], [ %441, %440 ]
%27 = phi i32 [ 1, %20 ], [ %443, %440 ]
%28 = icmp sgt i32 %25, 0
br i1 %28, label %29, label %60
29: ; preds = %24
%30 = icmp sgt i32 %26, 0
%31 = zext i32 %25 to i64
%32 = zext i32 %26 to i64
%33 = zext i32 %26 to i64
%34 = getelementptr double, double* %12, i64 %32
%35 = getelementptr double, double* %9, i64 %32
%36 = and i64 %32, 4294967292
%37 = and i64 %32, 4294967292
%38 = add nsw i64 %37, -4
%39 = lshr exact i64 %38, 2
%40 = add nuw nsw i64 %39, 1
%41 = add nsw i64 %36, -4
%42 = lshr exact i64 %41, 2
%43 = add nuw nsw i64 %42, 1
%44 = icmp ult i32 %26, 4
%45 = and i64 %32, 4294967292
%46 = and i64 %40, 3
%47 = icmp ult i64 %38, 12
%48 = and i64 %40, 9223372036854775804
%49 = icmp eq i64 %46, 0
%50 = icmp eq i64 %45, %32
%51 = and i64 %32, 3
%52 = icmp eq i64 %51, 0
%53 = icmp ult i32 %26, 4
%54 = and i64 %32, 4294967292
%55 = and i64 %43, 3
%56 = icmp ult i64 %41, 12
%57 = and i64 %43, 9223372036854775804
%58 = icmp eq i64 %55, 0
%59 = icmp eq i64 %54, %32
br label %74
60: ; preds = %339, %24
%61 = icmp sgt i32 %26, 0
br i1 %61, label %62, label %440
62: ; preds = %60
%63 = zext i32 %26 to i64
%64 = zext i32 %25 to i64
%65 = add nsw i64 %64, -1
%66 = and i64 %64, 3
%67 = icmp ult i64 %65, 3
%68 = and i64 %64, 4294967292
%69 = icmp eq i64 %66, 0
%70 = and i64 %64, 7
%71 = icmp ult i64 %65, 7
%72 = and i64 %64, 4294967288
%73 = icmp eq i64 %70, 0
br label %342
74: ; preds = %29, %339
%75 = phi i64 [ 0, %29 ], [ %340, %339 ]
%76 = mul i64 %75, %23
%77 = getelementptr double, double* %0, i64 %76
%78 = add i64 %76, %32
%79 = getelementptr double, double* %0, i64 %78
%80 = bitcast double* %79 to i8*
%81 = mul i64 %75, %23
%82 = getelementptr double, double* %0, i64 %81
%83 = add i64 %81, %32
%84 = getelementptr double, double* %0, i64 %83
%85 = bitcast double* %84 to i8*
%86 = mul nsw i64 %75, %23
%87 = getelementptr inbounds double, double* %0, i64 %86
br i1 %30, label %88, label %182
88: ; preds = %74
br i1 %44, label %163, label %89
89: ; preds = %88
%90 = icmp ult i8* %10, %80
%91 = icmp ult double* %77, %35
%92 = and i1 %90, %91
br i1 %92, label %163, label %93
93: ; preds = %89
%94 = getelementptr double, double* %87, i64 %45
br i1 %47, label %144, label %95
95: ; preds = %93, %95
%96 = phi i64 [ %141, %95 ], [ 0, %93 ]
%97 = phi i64 [ %142, %95 ], [ 0, %93 ]
%98 = getelementptr double, double* %87, i64 %96
%99 = bitcast double* %98 to <2 x double>*
%100 = load <2 x double>, <2 x double>* %99
%101 = getelementptr double, double* %98, i64 2
%102 = bitcast double* %101 to <2 x double>*
%103 = load <2 x double>, <2 x double>* %102
%104 = getelementptr inbounds double, double* %9, i64 %96
%105 = bitcast double* %104 to <2 x double>*
store <2 x double> %100, <2 x double>* %105
%106 = getelementptr inbounds double, double* %104, i64 2
%107 = bitcast double* %106 to <2 x double>*
store <2 x double> %103, <2 x double>* %107
%108 = or i64 %96, 4
%109 = getelementptr double, double* %87, i64 %108
%110 = bitcast double* %109 to <2 x double>*
%111 = load <2 x double>, <2 x double>* %110
%112 = getelementptr double, double* %109, i64 2
%113 = bitcast double* %112 to <2 x double>*
%114 = load <2 x double>, <2 x double>* %113
%115 = getelementptr inbounds double, double* %9, i64 %108
%116 = bitcast double* %115 to <2 x double>*
store <2 x double> %111, <2 x double>* %116
%117 = getelementptr inbounds double, double* %115, i64 2
%118 = bitcast double* %117 to <2 x double>*
store <2 x double> %114, <2 x double>* %118
%119 = or i64 %96, 8
%120 = getelementptr double, double* %87, i64 %119
%121 = bitcast double* %120 to <2 x double>*
%122 = load <2 x double>, <2 x double>* %121
%123 = getelementptr double, double* %120, i64 2
%124 = bitcast double* %123 to <2 x double>*
%125 = load <2 x double>, <2 x double>* %124
%126 = getelementptr inbounds double, double* %9, i64 %119
%127 = bitcast double* %126 to <2 x double>*
store <2 x double> %122, <2 x double>* %127
%128 = getelementptr inbounds double, double* %126, i64 2
%129 = bitcast double* %128 to <2 x double>*
store <2 x double> %125, <2 x double>* %129
%130 = or i64 %96, 12
%131 = getelementptr double, double* %87, i64 %130
%132 = bitcast double* %131 to <2 x double>*
%133 = load <2 x double>, <2 x double>* %132
%134 = getelementptr double, double* %131, i64 2
%135 = bitcast double* %134 to <2 x double>*
%136 = load <2 x double>, <2 x double>* %135
%137 = getelementptr inbounds double, double* %9, i64 %130
%138 = bitcast double* %137 to <2 x double>*
store <2 x double> %133, <2 x double>* %138
%139 = getelementptr inbounds double, double* %137, i64 2
%140 = bitcast double* %139 to <2 x double>*
store <2 x double> %136, <2 x double>* %140
%141 = add nuw i64 %96, 16
%142 = add nuw i64 %97, 4
%143 = icmp eq i64 %142, %48
br i1 %143, label %144, label %95
144: ; preds = %95, %93
%145 = phi i64 [ 0, %93 ], [ %141, %95 ]
br i1 %49, label %162, label %146
146: ; preds = %144, %146
%147 = phi i64 [ %159, %146 ], [ %145, %144 ]
%148 = phi i64 [ %160, %146 ], [ 0, %144 ]
%149 = getelementptr double, double* %87, i64 %147
%150 = bitcast double* %149 to <2 x double>*
%151 = load <2 x double>, <2 x double>* %150
%152 = getelementptr double, double* %149, i64 2
%153 = bitcast double* %152 to <2 x double>*
%154 = load <2 x double>, <2 x double>* %153
%155 = getelementptr inbounds double, double* %9, i64 %147
%156 = bitcast double* %155 to <2 x double>*
store <2 x double> %151, <2 x double>* %156
%157 = getelementptr inbounds double, double* %155, i64 2
%158 = bitcast double* %157 to <2 x double>*
store <2 x double> %154, <2 x double>* %158
%159 = add nuw i64 %147, 4
%160 = add i64 %148, 1
%161 = icmp eq i64 %160, %46
br i1 %161, label %162, label %146
162: ; preds = %146, %144
br i1 %50, label %204, label %163
163: ; preds = %89, %88, %162
%164 = phi i64 [ 0, %89 ], [ 0, %88 ], [ %45, %162 ]
%165 = phi double* [ %87, %89 ], [ %87, %88 ], [ %94, %162 ]
%166 = xor i64 %164, -1
%167 = add nsw i64 %166, %32
br i1 %52, label %178, label %168
168: ; preds = %163, %168
%169 = phi i64 [ %175, %168 ], [ %164, %163 ]
%170 = phi double* [ %174, %168 ], [ %165, %163 ]
%171 = phi i64 [ %176, %168 ], [ 0, %163 ]
%172 = load double, double* %170
%173 = getelementptr inbounds double, double* %9, i64 %169
store double %172, double* %173
%174 = getelementptr inbounds double, double* %170, i64 1
%175 = add nuw nsw i64 %169, 1
%176 = add i64 %171, 1
%177 = icmp eq i64 %176, %51
br i1 %177, label %178, label %168
178: ; preds = %168, %163
%179 = phi i64 [ %164, %163 ], [ %175, %168 ]
%180 = phi double* [ %165, %163 ], [ %174, %168 ]
%181 = icmp ult i64 %167, 3
br i1 %181, label %204, label %184
182: ; preds = %74
%183 = tail call i32 @Daub97Synthesis1D(double* %9, double* %12, i32 %26)
br label %339
184: ; preds = %178, %184
%185 = phi i64 [ %202, %184 ], [ %179, %178 ]
%186 = phi double* [ %201, %184 ], [ %180, %178 ]
%187 = load double, double* %186
%188 = getelementptr inbounds double, double* %9, i64 %185
store double %187, double* %188
%189 = getelementptr inbounds double, double* %186, i64 1
%190 = add nuw nsw i64 %185, 1
%191 = load double, double* %189
%192 = getelementptr inbounds double, double* %9, i64 %190
store double %191, double* %192
%193 = getelementptr inbounds double, double* %186, i64 2
%194 = add nuw nsw i64 %185, 2
%195 = load double, double* %193
%196 = getelementptr inbounds double, double* %9, i64 %194
store double %195, double* %196
%197 = getelementptr inbounds double, double* %186, i64 3
%198 = add nuw nsw i64 %185, 3
%199 = load double, double* %197
%200 = getelementptr inbounds double, double* %9, i64 %198
store double %199, double* %200
%201 = getelementptr inbounds double, double* %186, i64 4
%202 = add nuw nsw i64 %185, 4
%203 = icmp eq i64 %202, %32
br i1 %203, label %204, label %184
204: ; preds = %178, %184, %162
%205 = tail call i32 @Daub97Synthesis1D(double* %9, double* %12, i32 %26)
br i1 %30, label %206, label %339
206: ; preds = %204
br i1 %53, label %281, label %207
207: ; preds = %206
%208 = icmp ult double* %82, %34
%209 = icmp ult i8* %13, %85
%210 = and i1 %208, %209
br i1 %210, label %281, label %211
211: ; preds = %207
%212 = getelementptr double, double* %87, i64 %54
br i1 %56, label %262, label %213
213: ; preds = %211, %213
%214 = phi i64 [ %259, %213 ], [ 0, %211 ]
%215 = phi i64 [ %260, %213 ], [ 0, %211 ]
%216 = getelementptr double, double* %87, i64 %214
%217 = getelementptr inbounds double, double* %12, i64 %214
%218 = bitcast double* %217 to <2 x double>*
%219 = load <2 x double>, <2 x double>* %218
%220 = getelementptr inbounds double, double* %217, i64 2
%221 = bitcast double* %220 to <2 x double>*
%222 = load <2 x double>, <2 x double>* %221
%223 = bitcast double* %216 to <2 x double>*
store <2 x double> %219, <2 x double>* %223
%224 = getelementptr double, double* %216, i64 2
%225 = bitcast double* %224 to <2 x double>*
store <2 x double> %222, <2 x double>* %225
%226 = or i64 %214, 4
%227 = getelementptr double, double* %87, i64 %226
%228 = getelementptr inbounds double, double* %12, i64 %226
%229 = bitcast double* %228 to <2 x double>*
%230 = load <2 x double>, <2 x double>* %229
%231 = getelementptr inbounds double, double* %228, i64 2
%232 = bitcast double* %231 to <2 x double>*
%233 = load <2 x double>, <2 x double>* %232
%234 = bitcast double* %227 to <2 x double>*
store <2 x double> %230, <2 x double>* %234
%235 = getelementptr double, double* %227, i64 2
%236 = bitcast double* %235 to <2 x double>*
store <2 x double> %233, <2 x double>* %236
%237 = or i64 %214, 8
%238 = getelementptr double, double* %87, i64 %237
%239 = getelementptr inbounds double, double* %12, i64 %237
%240 = bitcast double* %239 to <2 x double>*
%241 = load <2 x double>, <2 x double>* %240
%242 = getelementptr inbounds double, double* %239, i64 2
%243 = bitcast double* %242 to <2 x double>*
%244 = load <2 x double>, <2 x double>* %243
%245 = bitcast double* %238 to <2 x double>*
store <2 x double> %241, <2 x double>* %245
%246 = getelementptr double, double* %238, i64 2
%247 = bitcast double* %246 to <2 x double>*
store <2 x double> %244, <2 x double>* %247
%248 = or i64 %214, 12
%249 = getelementptr double, double* %87, i64 %248
%250 = getelementptr inbounds double, double* %12, i64 %248
%251 = bitcast double* %250 to <2 x double>*
%252 = load <2 x double>, <2 x double>* %251
%253 = getelementptr inbounds double, double* %250, i64 2
%254 = bitcast double* %253 to <2 x double>*
%255 = load <2 x double>, <2 x double>* %254
%256 = bitcast double* %249 to <2 x double>*
store <2 x double> %252, <2 x double>* %256
%257 = getelementptr double, double* %249, i64 2
%258 = bitcast double* %257 to <2 x double>*
store <2 x double> %255, <2 x double>* %258
%259 = add nuw i64 %214, 16
%260 = add nuw i64 %215, 4
%261 = icmp eq i64 %260, %57
br i1 %261, label %262, label %213
262: ; preds = %213, %211
%263 = phi i64 [ 0, %211 ], [ %259, %213 ]
br i1 %58, label %280, label %264
264: ; preds = %262, %264
%265 = phi i64 [ %277, %264 ], [ %263, %262 ]
%266 = phi i64 [ %278, %264 ], [ 0, %262 ]
%267 = getelementptr double, double* %87, i64 %265
%268 = getelementptr inbounds double, double* %12, i64 %265
%269 = bitcast double* %268 to <2 x double>*
%270 = load <2 x double>, <2 x double>* %269
%271 = getelementptr inbounds double, double* %268, i64 2
%272 = bitcast double* %271 to <2 x double>*
%273 = load <2 x double>, <2 x double>* %272
%274 = bitcast double* %267 to <2 x double>*
store <2 x double> %270, <2 x double>* %274
%275 = getelementptr double, double* %267, i64 2
%276 = bitcast double* %275 to <2 x double>*
store <2 x double> %273, <2 x double>* %276
%277 = add nuw i64 %265, 4
%278 = add i64 %266, 1
%279 = icmp eq i64 %278, %55
br i1 %279, label %280, label %264
280: ; preds = %264, %262
br i1 %59, label %339, label %281
281: ; preds = %207, %206, %280
%282 = phi i64 [ 0, %207 ], [ 0, %206 ], [ %54, %280 ]
%283 = phi double* [ %87, %207 ], [ %87, %206 ], [ %212, %280 ]
%284 = sub nsw i64 %32, %282
%285 = xor i64 %282, -1
%286 = add nsw i64 %285, %32
%287 = and i64 %284, 7
%288 = icmp eq i64 %287, 0
br i1 %288, label %299, label %289
289: ; preds = %281, %289
%290 = phi i64 [ %296, %289 ], [ %282, %281 ]
%291 = phi double* [ %295, %289 ], [ %283, %281 ]
%292 = phi i64 [ %297, %289 ], [ 0, %281 ]
%293 = getelementptr inbounds double, double* %12, i64 %290
%294 = load double, double* %293
store double %294, double* %291
%295 = getelementptr inbounds double, double* %291, i64 1
%296 = add nuw nsw i64 %290, 1
%297 = add i64 %292, 1
%298 = icmp eq i64 %297, %287
br i1 %298, label %299, label %289
299: ; preds = %289, %281
%300 = phi i64 [ %282, %281 ], [ %296, %289 ]
%301 = phi double* [ %283, %281 ], [ %295, %289 ]
%302 = icmp ult i64 %286, 7
br i1 %302, label %339, label %303
303: ; preds = %299, %303
%304 = phi i64 [ %337, %303 ], [ %300, %299 ]
%305 = phi double* [ %336, %303 ], [ %301, %299 ]
%306 = getelementptr inbounds double, double* %12, i64 %304
%307 = load double, double* %306
store double %307, double* %305
%308 = getelementptr inbounds double, double* %305, i64 1
%309 = add nuw nsw i64 %304, 1
%310 = getelementptr inbounds double, double* %12, i64 %309
%311 = load double, double* %310
store double %311, double* %308
%312 = getelementptr inbounds double, double* %305, i64 2
%313 = add nuw nsw i64 %304, 2
%314 = getelementptr inbounds double, double* %12, i64 %313
%315 = load double, double* %314
store double %315, double* %312
%316 = getelementptr inbounds double, double* %305, i64 3
%317 = add nuw nsw i64 %304, 3
%318 = getelementptr inbounds double, double* %12, i64 %317
%319 = load double, double* %318
store double %319, double* %316
%320 = getelementptr inbounds double, double* %305, i64 4
%321 = add nuw nsw i64 %304, 4
%322 = getelementptr inbounds double, double* %12, i64 %321
%323 = load double, double* %322
store double %323, double* %320
%324 = getelementptr inbounds double, double* %305, i64 5
%325 = add nuw nsw i64 %304, 5
%326 = getelementptr inbounds double, double* %12, i64 %325
%327 = load double, double* %326
store double %327, double* %324
%328 = getelementptr inbounds double, double* %305, i64 6
%329 = add nuw nsw i64 %304, 6
%330 = getelementptr inbounds double, double* %12, i64 %329
%331 = load double, double* %330
store double %331, double* %328
%332 = getelementptr inbounds double, double* %305, i64 7
%333 = add nuw nsw i64 %304, 7
%334 = getelementptr inbounds double, double* %12, i64 %333
%335 = load double, double* %334
store double %335, double* %332
%336 = getelementptr inbounds double, double* %305, i64 8
%337 = add nuw nsw i64 %304, 8
%338 = icmp eq i64 %337, %33
br i1 %338, label %339, label %303
339: ; preds = %299, %303, %280, %182, %204
%340 = add nuw nsw i64 %75, 1
%341 = icmp eq i64 %340, %31
br i1 %341, label %60, label %74
342: ; preds = %62, %437
%343 = phi i64 [ 0, %62 ], [ %438, %437 ]
%344 = getelementptr inbounds double, double* %0, i64 %343
br i1 %28, label %345, label %346
345: ; preds = %342
br i1 %67, label %370, label %348
346: ; preds = %342
%347 = tail call i32 @Daub97Synthesis1D(double* %9, double* %12, i32 %25)
br label %437
348: ; preds = %345, %348
%349 = phi i64 [ %367, %348 ], [ 0, %345 ]
%350 = phi double* [ %366, %348 ], [ %344, %345 ]
%351 = phi i64 [ %368, %348 ], [ 0, %345 ]
%352 = load double, double* %350
%353 = getelementptr inbounds double, double* %9, i64 %349
store double %352, double* %353
%354 = getelementptr inbounds double, double* %350, i64 %23
%355 = or i64 %349, 1
%356 = load double, double* %354
%357 = getelementptr inbounds double, double* %9, i64 %355
store double %356, double* %357
%358 = getelementptr inbounds double, double* %354, i64 %23
%359 = or i64 %349, 2
%360 = load double, double* %358
%361 = getelementptr inbounds double, double* %9, i64 %359
store double %360, double* %361
%362 = getelementptr inbounds double, double* %358, i64 %23
%363 = or i64 %349, 3
%364 = load double, double* %362
%365 = getelementptr inbounds double, double* %9, i64 %363
store double %364, double* %365
%366 = getelementptr inbounds double, double* %362, i64 %23
%367 = add nuw nsw i64 %349, 4
%368 = add i64 %351, 4
%369 = icmp eq i64 %368, %68
br i1 %369, label %370, label %348
370: ; preds = %348, %345
%371 = phi i64 [ 0, %345 ], [ %367, %348 ]
%372 = phi double* [ %344, %345 ], [ %366, %348 ]
br i1 %69, label %383, label %373
373: ; preds = %370, %373
%374 = phi i64 [ %380, %373 ], [ %371, %370 ]
%375 = phi double* [ %379, %373 ], [ %372, %370 ]
%376 = phi i64 [ %381, %373 ], [ 0, %370 ]
%377 = load double, double* %375
%378 = getelementptr inbounds double, double* %9, i64 %374
store double %377, double* %378
%379 = getelementptr inbounds double, double* %375, i64 %23
%380 = add nuw nsw i64 %374, 1
%381 = add i64 %376, 1
%382 = icmp eq i64 %381, %66
br i1 %382, label %383, label %373
383: ; preds = %373, %370
%384 = tail call i32 @Daub97Synthesis1D(double* %9, double* %12, i32 %25)
br i1 %28, label %385, label %437
385: ; preds = %383
br i1 %71, label %424, label %386
386: ; preds = %385, %386
%387 = phi i64 [ %421, %386 ], [ 0, %385 ]
%388 = phi double* [ %420, %386 ], [ %344, %385 ]
%389 = phi i64 [ %422, %386 ], [ 0, %385 ]
%390 = getelementptr inbounds double, double* %12, i64 %387
%391 = load double, double* %390
store double %391, double* %388
%392 = getelementptr inbounds double, double* %388, i64 %23
%393 = or i64 %387, 1
%394 = getelementptr inbounds double, double* %12, i64 %393
%395 = load double, double* %394
store double %395, double* %392
%396 = getelementptr inbounds double, double* %392, i64 %23
%397 = or i64 %387, 2
%398 = getelementptr inbounds double, double* %12, i64 %397
%399 = load double, double* %398
store double %399, double* %396
%400 = getelementptr inbounds double, double* %396, i64 %23
%401 = or i64 %387, 3
%402 = getelementptr inbounds double, double* %12, i64 %401
%403 = load double, double* %402
store double %403, double* %400
%404 = getelementptr inbounds double, double* %400, i64 %23
%405 = or i64 %387, 4
%406 = getelementptr inbounds double, double* %12, i64 %405
%407 = load double, double* %406
store double %407, double* %404
%408 = getelementptr inbounds double, double* %404, i64 %23
%409 = or i64 %387, 5
%410 = getelementptr inbounds double, double* %12, i64 %409
%411 = load double, double* %410
store double %411, double* %408
%412 = getelementptr inbounds double, double* %408, i64 %23
%413 = or i64 %387, 6
%414 = getelementptr inbounds double, double* %12, i64 %413
%415 = load double, double* %414
store double %415, double* %412
%416 = getelementptr inbounds double, double* %412, i64 %23
%417 = or i64 %387, 7
%418 = getelementptr inbounds double, double* %12, i64 %417
%419 = load double, double* %418
store double %419, double* %416
%420 = getelementptr inbounds double, double* %416, i64 %23
%421 = add nuw nsw i64 %387, 8
%422 = add i64 %389, 8
%423 = icmp eq i64 %422, %72
br i1 %423, label %424, label %386
424: ; preds = %386, %385
%425 = phi i64 [ 0, %385 ], [ %421, %386 ]
%426 = phi double* [ %344, %385 ], [ %420, %386 ]
br i1 %73, label %437, label %427
427: ; preds = %424, %427
%428 = phi i64 [ %434, %427 ], [ %425, %424 ]
%429 = phi double* [ %433, %427 ], [ %426, %424 ]
%430 = phi i64 [ %435, %427 ], [ 0, %424 ]
%431 = getelementptr inbounds double, double* %12, i64 %428
%432 = load double, double* %431
store double %432, double* %429
%433 = getelementptr inbounds double, double* %429, i64 %23
%434 = add nuw nsw i64 %428, 1
%435 = add i64 %430, 1
%436 = icmp eq i64 %435, %70
br i1 %436, label %437, label %427
437: ; preds = %424, %427, %346, %383
%438 = add nuw nsw i64 %343, 1
%439 = icmp eq i64 %438, %63
br i1 %439, label %440, label %342
440: ; preds = %437, %60
%441 = shl i32 %26, 1
%442 = shl i32 %25, 1
%443 = add nuw i32 %27, 1
%444 = icmp eq i32 %27, %3
br i1 %444, label %445, label %24
445: ; preds = %440, %17
%446 = mul i32 %2, %1
%447 = icmp sgt i32 %446, 0
br i1 %447, label %448, label %505
448: ; preds = %445
%449 = zext i32 %446 to i64
%450 = icmp eq i32 %446, 1
br i1 %450, label %480, label %451
451: ; preds = %448
%452 = and i64 %449, 4294967294
br label %453
453: ; preds = %453, %451
%454 = phi i64 [ 0, %451 ], [ %476, %453 ]
%455 = getelementptr inbounds double, double* %0, i64 %454
%456 = bitcast double* %455 to <2 x double>*
%457 = load <2 x double>, <2 x double>* %456
%458 = fadd <2 x double> %457, <double 1.280000e+02, double 1.280000e+02>
%459 = fcmp olt <2 x double> %458, zeroinitializer
%460 = fadd <2 x double> %458, <double -5.000000e-01, double -5.000000e-01>
%461 = fadd <2 x double> %458, <double 5.000000e-01, double 5.000000e-01>
%462 = select <2 x i1> %459, <2 x double> %460, <2 x double> %461
%463 = fptosi <2 x double> %462 to <2 x i32>
%464 = icmp ult <2 x i32> %463, <i32 256, i32 256>
%465 = fptosi <2 x double> %461 to <2 x i32>
%466 = fptosi <2 x double> %460 to <2 x i32>
%467 = icmp sgt <2 x i32> %463, <i32 255, i32 255>
%468 = select <2 x i1> %464, <2 x i1> %459, <2 x i1> zeroinitializer
%469 = xor <2 x i1> %459, <i1 true, i1 true>
%470 = select <2 x i1> %464, <2 x i1> %469, <2 x i1> zeroinitializer
%471 = select <2 x i1> %467, <2 x i32> <i32 255, i32 255>, <2 x i32> zeroinitializer
%472 = select <2 x i1> %468, <2 x i32> %466, <2 x i32> %471
%473 = select <2 x i1> %470, <2 x i32> %465, <2 x i32> %472
%474 = sitofp <2 x i32> %473 to <2 x double>
%475 = bitcast double* %455 to <2 x double>*
store <2 x double> %474, <2 x double>* %475
%476 = add nuw i64 %454, 2
%477 = icmp eq i64 %476, %452
br i1 %477, label %478, label %453
478: ; preds = %453
%479 = icmp eq i64 %452, %449
br i1 %479, label %505, label %480
480: ; preds = %448, %478
%481 = phi i64 [ 0, %448 ], [ %452, %478 ]
br label %482
482: ; preds = %480, %500
%483 = phi i64 [ %503, %500 ], [ %481, %480 ]
%484 = getelementptr inbounds double, double* %0, i64 %483
%485 = load double, double* %484
%486 = fadd double %485, 1.280000e+02
%487 = fcmp olt double %486, 0.000000e+00
%488 = fadd double %486, -5.000000e-01
%489 = fadd double %486, 5.000000e-01
%490 = select i1 %487, double %488, double %489
%491 = fptosi double %490 to i32
%492 = icmp slt i32 %491, 0
br i1 %492, label %500, label %493
493: ; preds = %482
%494 = icmp ugt i32 %491, 255
br i1 %494, label %500, label %495
495: ; preds = %493
br i1 %487, label %496, label %498
496: ; preds = %495
%497 = fptosi double %488 to i32
br label %500
498: ; preds = %495
%499 = fptosi double %489 to i32
br label %500
500: ; preds = %493, %498, %496, %482
%501 = phi i32 [ 0, %482 ], [ 255, %493 ], [ %497, %496 ], [ %499, %498 ]
%502 = sitofp i32 %501 to double
store double %502, double* %484
%503 = add nuw nsw i64 %483, 1
%504 = icmp eq i64 %503, %449
br i1 %504, label %505, label %482
505: ; preds = %500, %478, %445, %4
%506 = phi i32 [ 1, %4 ], [ 0, %445 ], [ 0, %478 ], [ 0, %500 ]
%507 = tail call i32 @free(double* %9)
%508 = tail call i32 @free(double* %12)
ret i32 %506
}