#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*/ Expand_1D(double *, long, double *, double *, long, short);
int GetPyramidFilter(char *, long, double *, long *, double *, long *, short *);
int /*<<< orphan*/ Reduce_1D(double *, long, double *, double *, long, short);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  double InputSignal[10L];
  double ReducedSignal[10L / 2L];
  double ExpandedSignal[10L];
  double g[200L];
  long ng;
  double h[200L];
  long nh;
  long i;
  short IsCentered;
  printf("Filter: "
         "Spline"
         "\n");
  if (GetPyramidFilter("Centered Spline", 3L, g, &ng, h, &nh, &IsCentered) ==
      (!((int)(0 != 0)))) {
    printf("Unable to load the filter coeffiients");
    return 1;
  }
  printf("Size of the reduce filter: %ld\n", ng);
  printf("Size of the expand filter: %ld\n", nh);
  InputSignal[0] = 0.0;
  InputSignal[1] = 1.0;
  InputSignal[2] = 2.0;
  InputSignal[3] = 3.0;
  InputSignal[4] = 2.0;
  InputSignal[5] = 1.0;
  InputSignal[6] = 0.0;
  InputSignal[7] = -2.0;
  InputSignal[8] = -4.0;
  InputSignal[9] = -6.0;
  printf("Input   : ");
  for (i = 0L; i < 10L; i++)
    printf("%2.3f ", InputSignal[i]);
  printf("\n");
  Reduce_1D(InputSignal, 10L, ReducedSignal, g, ng, IsCentered);
  printf("Reduced : ");
  for (i = 0L; i < 10L / 2L; i++)
    printf("%2.3f ", ReducedSignal[i]);
  printf("\n");
  Expand_1D(ReducedSignal, 10L / 2L, ExpandedSignal, h, nh, IsCentered);
  printf("Expanded: ");
  for (i = 0L; i < 10L; i++)
    printf("%2.3f ", ExpandedSignal[i]);
  printf("\n");
  printf("Error   : ");
  for (i = 0L; i < 10L; i++)
    printf("%2.3f ", ExpandedSignal[i] - InputSignal[i]);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd90,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x720(%rbp),%rdx
lea    -0xd70(%rbp),%r8
lea    0xecb(%rip),%rdi
mov    $0x3,%esi
lea    -0x728(%rbp),%rcx
lea    -0xd78(%rbp),%r9
lea    -0xd82(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <GetPyramidFilter@plt>
cmp    $0x1,%eax
jne    11bb <main+0x7b>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    146f <main+0x32f>
mov    -0x728(%rbp),%rsi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xd78(%rbp),%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe23(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe1e(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe19(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe04(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xdef(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xdd2(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xdbd(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xda8(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0xd80(%rbp)
cmpq   $0xa,-0xd80(%rbp)
0a
jge    12b6 <main+0x176>
mov    -0xd80(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
lea    0xe29(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xd80(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xd80(%rbp)
jmp    1276 <main+0x136>
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
lea    -0x90(%rbp),%rdx
lea    -0x720(%rbp),%rcx
mov    -0x728(%rbp),%r8
mov    $0xa,%esi
movswl -0xd82(%rbp),%r9d
ff
call   1060 <Reduce_1D@plt>
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0xd80(%rbp)
cmpq   $0x5,-0xd80(%rbp)
05
jge    134b <main+0x20b>
mov    -0xd80(%rbp),%rax
movsd  -0x90(%rbp,%rax,8),%xmm0
ff ff
lea    0xd94(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xd80(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xd80(%rbp)
jmp    1308 <main+0x1c8>
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x90(%rbp),%rdi
lea    -0xe0(%rbp),%rdx
lea    -0xd70(%rbp),%rcx
mov    -0xd78(%rbp),%r8
mov    $0x5,%esi
movswl -0xd82(%rbp),%r9d
ff
call   1050 <Expand_1D@plt>
lea    0xd45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0xd80(%rbp)
cmpq   $0xa,-0xd80(%rbp)
0a
jge    13e3 <main+0x2a3>
mov    -0xd80(%rbp),%rax
movsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
lea    0xcfc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xd80(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xd80(%rbp)
jmp    13a0 <main+0x260>
lea    0xcca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xce6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0xd80(%rbp)
cmpq   $0xa,-0xd80(%rbp)
0a
jge    145a <main+0x31a>
mov    -0xd80(%rbp),%rax
movsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
mov    -0xd80(%rbp),%rax
subsd  -0x60(%rbp,%rax,8),%xmm0
lea    0xc85(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xd80(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xd80(%rbp)
jmp    140a <main+0x2ca>
lea    0xc53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0xd70,%rsp
lea    0xf77(%rip),%rdi
call   1040 <puts@plt>
lea    0xe(%rsp),%rax
mov    %rax,(%rsp)
lea    0xeb9(%rip),%rdi
lea    0x730(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0xf0(%rsp),%r8
lea    0x10(%rsp),%r9
mov    $0x3,%esi
call   1060 <GetPyramidFilter@plt>
cmp    $0x1,%eax
jne    11c9 <main+0x69>
lea    0xe99(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%r14d
jmp    1598 <main+0x438>
mov    0x18(%rsp),%rsi
lea    0xea1(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%rsi
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movhps 0xe01(%rip),%xmm1
movaps %xmm1,0x20(%rsp)
movaps 0xe05(%rip),%xmm1
movaps %xmm1,0x30(%rsp)
movaps 0xe09(%rip),%xmm1
movhps 0xdea(%rip),%xmm0
movaps %xmm1,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movaps 0xe01(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  0x20(%rsp),%xmm0
lea    0xe72(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x28(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x30(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x38(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x40(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x48(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x50(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x58(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x60(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x68(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%r8
movswl 0xe(%rsp),%r9d
lea    0x20(%rsp),%rdi
lea    0xc0(%rsp),%rbp
lea    0x730(%rsp),%rcx
mov    $0xa,%esi
mov    %rbp,%rdx
call   1080 <Reduce_1D@plt>
lea    0xda1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  0xc0(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xc8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xd0(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xd8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xe0(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%r8
movswl 0xe(%rsp),%r9d
lea    0x70(%rsp),%rdx
lea    0xf0(%rsp),%rcx
mov    $0x5,%esi
mov    %rbp,%rdi
call   1070 <Expand_1D@plt>
lea    0xd10(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  0x70(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x78(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x80(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x88(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x90(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x98(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xa0(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xa8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xb0(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xb8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xc4b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  0x70(%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x78(%rsp),%xmm0
subsd  0x28(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x80(%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x88(%rsp),%xmm0
subsd  0x38(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x90(%rsp),%xmm0
subsd  0x40(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x98(%rsp),%xmm0
subsd  0x48(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xa0(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xa8(%rsp),%xmm0
subsd  0x58(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xb0(%rsp),%xmm0
subsd  0x60(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xb8(%rsp),%xmm0
subsd  0x68(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14d,%eax
add    $0xd70,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Filter: Spline\0A\00"
@.str.1 = [16 x i8] c"Centered Spline\00"
@.str.2 = [38 x i8] c"Unable to load the filter coeffiients\00"
@.str.3 = [32 x i8] c"Size of the reduce filter: %ld\0A\00"
@.str.4 = [32 x i8] c"Size of the expand filter: %ld\0A\00"
@.str.5 = [11 x i8] c"Input : \00"
@.str.6 = [7 x i8] c"%2.3f \00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [11 x i8] c"Reduced : \00"
@.str.9 = [11 x i8] c"Expanded: \00"
@.str.10 = [11 x i8] c"Error : \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x double]
%3 = alloca [5 x double]
%4 = alloca [10 x double]
%5 = alloca [200 x double]
%6 = alloca i64
%7 = alloca [200 x double]
%8 = alloca i64
%9 = alloca i64
%10 = alloca i16
store i32 0, i32* %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [200 x double], [200 x double]* %5, i64 0, i64 0
%13 = getelementptr inbounds [200 x double], [200 x double]* %7, i64 0, i64 0
%14 = call i32 @GetPyramidFilter(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i64 3, double* %12, i64* %6, double* %13, i64* %8, i16* %10)
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %0
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %1
br label %105
18: ; preds = %0
%19 = load i64, i64* %6
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i64 %19)
%21 = load i64, i64* %8
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i64 %21)
%23 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 0
store double 0.000000e+00, double* %23
%24 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 1
store double 1.000000e+00, double* %24
%25 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 2
store double 2.000000e+00, double* %25
%26 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 3
store double 3.000000e+00, double* %26
%27 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 4
store double 2.000000e+00, double* %27
%28 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 5
store double 1.000000e+00, double* %28
%29 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 6
store double 0.000000e+00, double* %29
%30 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 7
store double -2.000000e+00, double* %30
%31 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 8
store double -4.000000e+00, double* %31
%32 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 9
store double -6.000000e+00, double* %32
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
store i64 0, i64* %9
br label %34
34: ; preds = %42, %18
%35 = load i64, i64* %9
%36 = icmp slt i64 %35, 10
br i1 %36, label %37, label %45
37: ; preds = %34
%38 = load i64, i64* %9
%39 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %38
%40 = load double, double* %39
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %40)
br label %42
42: ; preds = %37
%43 = load i64, i64* %9
%44 = add nsw i64 %43, 1
store i64 %44, i64* %9
br label %34
45: ; preds = %34
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%47 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 0
%48 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 0
%49 = getelementptr inbounds [200 x double], [200 x double]* %5, i64 0, i64 0
%50 = load i64, i64* %6
%51 = load i16, i16* %10
%52 = call i32 @Reduce_1D(double* %47, i64 10, double* %48, double* %49, i64 %50, i16 signext %51)
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
store i64 0, i64* %9
br label %54
54: ; preds = %62, %45
%55 = load i64, i64* %9
%56 = icmp slt i64 %55, 5
br i1 %56, label %57, label %65
57: ; preds = %54
%58 = load i64, i64* %9
%59 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 %58
%60 = load double, double* %59
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %60)
br label %62
62: ; preds = %57
%63 = load i64, i64* %9
%64 = add nsw i64 %63, 1
store i64 %64, i64* %9
br label %54
65: ; preds = %54
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%67 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 0
%68 = getelementptr inbounds [10 x double], [10 x double]* %4, i64 0, i64 0
%69 = getelementptr inbounds [200 x double], [200 x double]* %7, i64 0, i64 0
%70 = load i64, i64* %8
%71 = load i16, i16* %10
%72 = call i32 @Expand_1D(double* %67, i64 5, double* %68, double* %69, i64 %70, i16 signext %71)
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
store i64 0, i64* %9
br label %74
74: ; preds = %82, %65
%75 = load i64, i64* %9
%76 = icmp slt i64 %75, 10
br i1 %76, label %77, label %85
77: ; preds = %74
%78 = load i64, i64* %9
%79 = getelementptr inbounds [10 x double], [10 x double]* %4, i64 0, i64 %78
%80 = load double, double* %79
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %80)
br label %82
82: ; preds = %77
%83 = load i64, i64* %9
%84 = add nsw i64 %83, 1
store i64 %84, i64* %9
br label %74
85: ; preds = %74
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
store i64 0, i64* %9
br label %88
88: ; preds = %100, %85
%89 = load i64, i64* %9
%90 = icmp slt i64 %89, 10
br i1 %90, label %91, label %103
91: ; preds = %88
%92 = load i64, i64* %9
%93 = getelementptr inbounds [10 x double], [10 x double]* %4, i64 0, i64 %92
%94 = load double, double* %93
%95 = load i64, i64* %9
%96 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %95
%97 = load double, double* %96
%98 = fsub double %94, %97
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %98)
br label %100
100: ; preds = %91
%101 = load i64, i64* %9
%102 = add nsw i64 %101, 1
store i64 %102, i64* %9
br label %88
103: ; preds = %88
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %1
br label %105
105: ; preds = %103, %16
%106 = load i32, i32* %1
ret i32 %106
}

LLVM IR (-O2):
@.str.1 = [16 x i8] c"Centered Spline\00"
@.str.2 = [38 x i8] c"Unable to load the filter coeffiients\00"
@.str.3 = [32 x i8] c"Size of the reduce filter: %ld\0A\00"
@.str.4 = [32 x i8] c"Size of the expand filter: %ld\0A\00"
@.str.5 = [11 x i8] c"Input : \00"
@.str.6 = [7 x i8] c"%2.3f \00"
@.str.8 = [11 x i8] c"Reduced : \00"
@.str.9 = [11 x i8] c"Expanded: \00"
@.str.10 = [11 x i8] c"Error : \00"
@str = [15 x i8] c"Filter: Spline\00"
define i32 @main() {
%1 = alloca [10 x double]
%2 = alloca [5 x double]
%3 = alloca [10 x double]
%4 = alloca [200 x double]
%5 = alloca i64
%6 = alloca [200 x double]
%7 = alloca i64
%8 = alloca i16
%9 = bitcast [10 x double]* %1 to i8*
%10 = bitcast [5 x double]* %2 to i8*
%11 = bitcast [10 x double]* %3 to i8*
%12 = bitcast [200 x double]* %4 to i8*
%13 = bitcast i64* %5 to i8*
%14 = bitcast [200 x double]* %6 to i8*
%15 = bitcast i64* %7 to i8*
%16 = bitcast i16* %8 to i8*
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%18 = getelementptr inbounds [200 x double], [200 x double]* %4, i64 0, i64 0
%19 = getelementptr inbounds [200 x double], [200 x double]* %6, i64 0, i64 0
%20 = call i32 @GetPyramidFilter(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i64 3, double* %18, i64* %5, double* %19, i64* %7, i16* %8)
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %24
22: ; preds = %0
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
br label %163
24: ; preds = %0
%25 = load i64, i64* %5
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i64 %25)
%27 = load i64, i64* %7
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i64 %27)
%29 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 0, i64 0
%30 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 0, i64 1
%31 = bitcast [10 x double]* %1 to <2 x double>*
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %31
%32 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 0, i64 2
%33 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 0, i64 3
%34 = bitcast double* %32 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 3.000000e+00>, <2 x double>* %34
%35 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 0, i64 4
%36 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 0, i64 5
%37 = bitcast double* %35 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 1.000000e+00>, <2 x double>* %37
%38 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 0, i64 6
%39 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 0, i64 7
%40 = bitcast double* %38 to <2 x double>*
store <2 x double> <double 0.000000e+00, double -2.000000e+00>, <2 x double>* %40
%41 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 0, i64 8
%42 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 0, i64 9
%43 = bitcast double* %41 to <2 x double>*
store <2 x double> <double -4.000000e+00, double -6.000000e+00>, <2 x double>* %43
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%45 = load double, double* %29
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %45)
%47 = load double, double* %30
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %47)
%49 = load double, double* %32
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %49)
%51 = load double, double* %33
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %51)
%53 = load double, double* %35
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %53)
%55 = load double, double* %36
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %55)
%57 = load double, double* %38
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %57)
%59 = load double, double* %39
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %59)
%61 = load double, double* %41
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %61)
%63 = load double, double* %42
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %63)
%65 = call i32 @putchar(i32 10)
%66 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 0
%67 = load i64, i64* %5
%68 = load i16, i16* %8
%69 = call i32 @Reduce_1D(double* %29, i64 10, double* %66, double* %18, i64 %67, i16 signext %68)
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%71 = load double, double* %66
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %71)
%73 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 1
%74 = load double, double* %73
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %74)
%76 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 2
%77 = load double, double* %76
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %77)
%79 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 3
%80 = load double, double* %79
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %80)
%82 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 4
%83 = load double, double* %82
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %83)
%85 = call i32 @putchar(i32 10)
%86 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 0
%87 = load i64, i64* %7
%88 = load i16, i16* %8
%89 = call i32 @Expand_1D(double* %66, i64 5, double* %86, double* %19, i64 %87, i16 signext %88)
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%91 = load double, double* %86
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %91)
%93 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 1
%94 = load double, double* %93
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %94)
%96 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 2
%97 = load double, double* %96
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %97)
%99 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 3
%100 = load double, double* %99
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %100)
%102 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 4
%103 = load double, double* %102
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %103)
%105 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 5
%106 = load double, double* %105
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %106)
%108 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 6
%109 = load double, double* %108
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %109)
%111 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 7
%112 = load double, double* %111
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %112)
%114 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 8
%115 = load double, double* %114
%116 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %115)
%117 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 9
%118 = load double, double* %117
%119 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %118)
%120 = call i32 @putchar(i32 10)
%121 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%122 = load double, double* %86
%123 = load double, double* %29
%124 = fsub double %122, %123
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %124)
%126 = load double, double* %93
%127 = load double, double* %30
%128 = fsub double %126, %127
%129 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %128)
%130 = load double, double* %96
%131 = load double, double* %32
%132 = fsub double %130, %131
%133 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %132)
%134 = load double, double* %99
%135 = load double, double* %33
%136 = fsub double %134, %135
%137 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %136)
%138 = load double, double* %102
%139 = load double, double* %35
%140 = fsub double %138, %139
%141 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %140)
%142 = load double, double* %105
%143 = load double, double* %36
%144 = fsub double %142, %143
%145 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %144)
%146 = load double, double* %108
%147 = load double, double* %38
%148 = fsub double %146, %147
%149 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %148)
%150 = load double, double* %111
%151 = load double, double* %39
%152 = fsub double %150, %151
%153 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %152)
%154 = load double, double* %114
%155 = load double, double* %41
%156 = fsub double %154, %155
%157 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %156)
%158 = load double, double* %117
%159 = load double, double* %42
%160 = fsub double %158, %159
%161 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %160)
%162 = call i32 @putchar(i32 10)
br label %163
163: ; preds = %24, %22
%164 = phi i32 [ 1, %22 ], [ 0, %24 ]
ret i32 %164
}