#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*/ MessageDisplay(char *);
int /*<<< orphan*/ PyramidFilterCentered(double *, long *, double *, long *,
                                         long);
int /*<<< orphan*/ PyramidFilterCenteredL2(double *, long *, double *, long *,
                                           long);
int /*<<< orphan*/ PyramidFilterSplineL2(double *, long *, double *, long *,
                                         long);
int /*<<< orphan*/ PyramidFilterSplinel2(double *, long *, double *, long *,
                                         long);
int /*<<< orphan*/ strcmp(char *, char *);
extern int GetPyramidFilter(char *Filter, long Order, double g[], long *ng,
                            double h[], long *nh, short *IsCentered) {
  ng[0] = -1L;
  nh[0] = -1L;
  *IsCentered = ((int)(0 != 0));
  if (!strcmp(Filter, "Spline")) {
    PyramidFilterSplinel2(g, ng, h, nh, Order);
    *IsCentered = ((int)(0 != 0));
  }
  if (!strcmp(Filter, "Spline L2")) {
    PyramidFilterSplineL2(g, ng, h, nh, Order);
    *IsCentered = ((int)(0 != 0));
  }
  if (!strcmp(Filter, "Centered Spline")) {
    PyramidFilterCentered(g, ng, h, nh, Order);
    *IsCentered = (!((int)(0 != 0)));
  }
  if (!strcmp(Filter, "Centered Spline L2")) {
    PyramidFilterCenteredL2(g, ng, h, nh, Order);
    *IsCentered = (!((int)(0 != 0)));
  }
  if (ng[0] == -1L && nh[0] == -1L) {
    MessageDisplay("This familly filters is unknown");
    return ((!((int)(0 != 0))));
  }
  return (!(!((int)(0 != 0))));
}


x86 assembly (clang, -O0):
<GetPyramidFilter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x28(%rbp),%rax
movq   $0xffffffffffffffff,(%rax)
mov    -0x38(%rbp),%rax
movq   $0xffffffffffffffff,(%rax)
mov    0x10(%rbp),%rax
movw   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
lea    0xe5b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11de <GetPyramidFilter+0x7e>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1070 <PyramidFilterSplinel2@plt>
mov    0x10(%rbp),%rax
movw   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
lea    0xe30(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1219 <GetPyramidFilter+0xb9>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1080 <PyramidFilterSplineL2@plt>
mov    0x10(%rbp),%rax
movw   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
lea    0xddc(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1254 <GetPyramidFilter+0xf4>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1040 <PyramidFilterCentered@plt>
mov    0x10(%rbp),%rax
movw   $0x1,(%rax)
mov    -0x10(%rbp),%rdi
lea    0xdb1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    128f <GetPyramidFilter+0x12f>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1060 <PyramidFilterCenteredL2@plt>
mov    0x10(%rbp),%rax
movw   $0x1,(%rax)
mov    -0x28(%rbp),%rax
cmpq   $0xffffffffffffffff,(%rax)
jne    12c3 <GetPyramidFilter+0x163>
mov    -0x38(%rbp),%rax
cmpq   $0xffffffffffffffff,(%rax)
jne    12c3 <GetPyramidFilter+0x163>
lea    0xd71(%rip),%rdi
call   1050 <MessageDisplay@plt>
movl   $0x1,-0x4(%rbp)
jmp    12ca <GetPyramidFilter+0x16a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetPyramidFilter>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%rbx
mov    %rdx,%r13
mov    %rsi,%r12
mov    %rdi,%rbp
mov    0x40(%rsp),%rax
movq   $0xffffffffffffffff,(%rcx)
movq   $0xffffffffffffffff,(%r9)
movw   $0x0,(%rax)
lea    0xe6d(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    11c3 <GetPyramidFilter+0x63>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r12,%r8
call   1070 <PyramidFilterSplinel2@plt>
mov    0x40(%rsp),%rax
movw   $0x0,(%rax)
lea    0xe4f(%rip),%rsi
mov    %rbp,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    11f4 <GetPyramidFilter+0x94>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r12,%r8
call   1080 <PyramidFilterSplineL2@plt>
mov    0x40(%rsp),%rax
movw   $0x0,(%rax)
lea    0xe05(%rip),%rsi
mov    %rbp,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    1225 <GetPyramidFilter+0xc5>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r12,%r8
call   1040 <PyramidFilterCentered@plt>
mov    0x40(%rsp),%rax
movw   $0x1,(%rax)
lea    0xde4(%rip),%rsi
mov    %rbp,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    1256 <GetPyramidFilter+0xf6>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r12,%r8
call   1060 <PyramidFilterCenteredL2@plt>
mov    0x40(%rsp),%rax
movw   $0x1,(%rax)
xor    %eax,%eax
cmpq   $0xffffffffffffffff,(%rbx)
jne    1275 <GetPyramidFilter+0x115>
cmpq   $0xffffffffffffffff,(%r14)
jne    1275 <GetPyramidFilter+0x115>
lea    0xdb8(%rip),%rdi
call   1050 <MessageDisplay@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Spline\00"
@.str.1 = [10 x i8] c"Spline L2\00"
@.str.2 = [16 x i8] c"Centered Spline\00"
@.str.3 = [19 x i8] c"Centered Spline L2\00"
@.str.4 = [32 x i8] c"This familly filters is unknown\00"
define i32 @GetPyramidFilter(i8* %0, i64 %1, double* %2, i64* %3, double* %4, i64* %5, i16* %6) {
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
%11 = alloca double*
%12 = alloca i64*
%13 = alloca double*
%14 = alloca i64*
%15 = alloca i16*
store i8* %0, i8** %9
store i64 %1, i64* %10
store double* %2, double** %11
store i64* %3, i64** %12
store double* %4, double** %13
store i64* %5, i64** %14
store i16* %6, i16** %15
%16 = load i64*, i64** %12
%17 = getelementptr inbounds i64, i64* %16, i64 0
store i64 -1, i64* %17
%18 = load i64*, i64** %14
%19 = getelementptr inbounds i64, i64* %18, i64 0
store i64 -1, i64* %19
%20 = load i16*, i16** %15
store i16 0, i16* %20
%21 = load i8*, i8** %9
%22 = call i32 @strcmp(i8* %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%23 = icmp ne i32 %22, 0
br i1 %23, label %32, label %24
24: ; preds = %7
%25 = load double*, double** %11
%26 = load i64*, i64** %12
%27 = load double*, double** %13
%28 = load i64*, i64** %14
%29 = load i64, i64* %10
%30 = call i32 @PyramidFilterSplinel2(double* %25, i64* %26, double* %27, i64* %28, i64 %29)
%31 = load i16*, i16** %15
store i16 0, i16* %31
br label %32
32: ; preds = %24, %7
%33 = load i8*, i8** %9
%34 = call i32 @strcmp(i8* %33, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%35 = icmp ne i32 %34, 0
br i1 %35, label %44, label %36
36: ; preds = %32
%37 = load double*, double** %11
%38 = load i64*, i64** %12
%39 = load double*, double** %13
%40 = load i64*, i64** %14
%41 = load i64, i64* %10
%42 = call i32 @PyramidFilterSplineL2(double* %37, i64* %38, double* %39, i64* %40, i64 %41)
%43 = load i16*, i16** %15
store i16 0, i16* %43
br label %44
44: ; preds = %36, %32
%45 = load i8*, i8** %9
%46 = call i32 @strcmp(i8* %45, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%47 = icmp ne i32 %46, 0
br i1 %47, label %56, label %48
48: ; preds = %44
%49 = load double*, double** %11
%50 = load i64*, i64** %12
%51 = load double*, double** %13
%52 = load i64*, i64** %14
%53 = load i64, i64* %10
%54 = call i32 @PyramidFilterCentered(double* %49, i64* %50, double* %51, i64* %52, i64 %53)
%55 = load i16*, i16** %15
store i16 1, i16* %55
br label %56
56: ; preds = %48, %44
%57 = load i8*, i8** %9
%58 = call i32 @strcmp(i8* %57, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%59 = icmp ne i32 %58, 0
br i1 %59, label %68, label %60
60: ; preds = %56
%61 = load double*, double** %11
%62 = load i64*, i64** %12
%63 = load double*, double** %13
%64 = load i64*, i64** %14
%65 = load i64, i64* %10
%66 = call i32 @PyramidFilterCenteredL2(double* %61, i64* %62, double* %63, i64* %64, i64 %65)
%67 = load i16*, i16** %15
store i16 1, i16* %67
br label %68
68: ; preds = %60, %56
%69 = load i64*, i64** %12
%70 = getelementptr inbounds i64, i64* %69, i64 0
%71 = load i64, i64* %70
%72 = icmp eq i64 %71, -1
br i1 %72, label %73, label %80
73: ; preds = %68
%74 = load i64*, i64** %14
%75 = getelementptr inbounds i64, i64* %74, i64 0
%76 = load i64, i64* %75
%77 = icmp eq i64 %76, -1
br i1 %77, label %78, label %80
78: ; preds = %73
%79 = call i32 @MessageDisplay(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %8
br label %81
80: ; preds = %73, %68
store i32 0, i32* %8
br label %81
81: ; preds = %80, %78
%82 = load i32, i32* %8
ret i32 %82
}

LLVM IR (-O2):
@.str = [7 x i8] c"Spline\00"
@.str.1 = [10 x i8] c"Spline L2\00"
@.str.2 = [16 x i8] c"Centered Spline\00"
@.str.3 = [19 x i8] c"Centered Spline L2\00"
@.str.4 = [32 x i8] c"This familly filters is unknown\00"
define i32 @GetPyramidFilter(i8* nocapture %0, i64 %1, double* %2, i64* %3, double* %4, i64* %5, i16* nocapture writeonly %6) {
store i64 -1, i64* %3
store i64 -1, i64* %5
store i16 0, i16* %6
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call i32 @PyramidFilterSplinel2(double* %2, i64* %3, double* %4, i64* %5, i64 %1)
store i16 0, i16* %6
br label %12
12: ; preds = %10, %7
%13 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = tail call i32 @PyramidFilterSplineL2(double* %2, i64* %3, double* %4, i64* %5, i64 %1)
store i16 0, i16* %6
br label %17
17: ; preds = %15, %12
%18 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(16) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = tail call i32 @PyramidFilterCentered(double* %2, i64* %3, double* %4, i64* %5, i64 %1)
store i16 1, i16* %6
br label %22
22: ; preds = %20, %17
%23 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(19) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = tail call i32 @PyramidFilterCenteredL2(double* %2, i64* %3, double* %4, i64* %5, i64 %1)
store i16 1, i16* %6
br label %27
27: ; preds = %25, %22
%28 = load i64, i64* %3
%29 = icmp eq i64 %28, -1
br i1 %29, label %30, label %35
30: ; preds = %27
%31 = load i64, i64* %5
%32 = icmp eq i64 %31, -1
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = tail call i32 @MessageDisplay(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
br label %35
35: ; preds = %27, %30, %33
%36 = phi i32 [ 1, %33 ], [ 0, %30 ], [ 0, %27 ]
ret i32 %36
}