#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*/ printf(char *, char *, char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  if (argc > 1) {
    if (!strcmp(argv[1], "-a"))
      puts(("ReferenceFinder"
            " "
            "4"));
    else if (!strcmp(argv[1], "-nl"))
      puts(("ReferenceFinder"
            " "
            "4"
            "."
            "0"
            "."
            "1"));
    else if (!strcmp(argv[1], "-nvb"))
      printf("%s.%s\n",
             ("ReferenceFinder"
              " "
              "4"
              "."
              "0"
              "."
              "1"),
             "20070210");
    else if (!strcmp(argv[1], "-nab"))
      puts(("ReferenceFinder"
            " "
            "4"
            "."
            "0"
            "."
            "1"));
    else if (!strcmp(argv[1], "-b")) {
      printf("%s.%s",
             ("ReferenceFinder"
              " "
              "4"
              "."
              "0"
              "."
              "1"),
             "20070210");
      putchar('\n');
    } else if (!strcmp(argv[1], "-p")) {
      puts("/usr/local");
    }
  } else
    puts(("ReferenceFinder"
          " "
          "4"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    12b3 <main+0x173>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe91(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    118e <main+0x4e>
lea    0xe7f(%rip),%rdi
call   1040 <puts@plt>
jmp    12ae <main+0x16e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe78(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    11bc <main+0x7c>
lea    0xe67(%rip),%rdi
call   1040 <puts@plt>
jmp    12a9 <main+0x169>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe64(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    11f8 <main+0xb8>
lea    0xe54(%rip),%rdi
lea    0xe32(%rip),%rsi
lea    0xe4d(%rip),%rdx
call   1050 <printf@plt>
jmp    12a4 <main+0x164>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe3d(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1226 <main+0xe6>
lea    0xdfd(%rip),%rdi
call   1040 <puts@plt>
jmp    129f <main+0x15f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe14(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    126c <main+0x12c>
lea    0xe02(%rip),%rdi
lea    0xdc8(%rip),%rsi
lea    0xde3(%rip),%rdx
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    129a <main+0x15a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdd7(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1295 <main+0x155>
lea    0xdc5(%rip),%rdi
call   1040 <puts@plt>
jmp    129a <main+0x15a>
jmp    129f <main+0x15f>
jmp    12a4 <main+0x164>
jmp    12a9 <main+0x169>
jmp    12ae <main+0x16e>
jmp    12bf <main+0x17f>
lea    0xd49(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jl     11c5 <main+0x85>
mov    0x8(%rsi),%rbx
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     11c5 <main+0x85>
lea    0xeb1(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     11d5 <main+0x95>
lea    0xeb8(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     11de <main+0x9e>
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     11d5 <main+0x95>
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     11fa <main+0xba>
lea    0xea2(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
jne    11d1 <main+0x91>
lea    0xe92(%rip),%rdi
jmp    11cc <main+0x8c>
lea    0xe37(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret
lea    0xe3d(%rip),%rdi
jmp    11cc <main+0x8c>
lea    0xe4f(%rip),%rdi
lea    0xe2d(%rip),%rsi
lea    0xe48(%rip),%rdx
call   1050 <printf@plt>
jmp    11d1 <main+0x91>
lea    0xe4b(%rip),%rdi
lea    0xe11(%rip),%rsi
lea    0xe2c(%rip),%rdx
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11d1 <main+0x91>

LLVM IR (-O0):
@.str = [3 x i8] c"-a\00"
@.str.1 = [18 x i8] c"ReferenceFinder 4\00"
@.str.2 = [4 x i8] c"-nl\00"
@.str.3 = [22 x i8] c"ReferenceFinder 4.0.1\00"
@.str.4 = [5 x i8] c"-nvb\00"
@.str.5 = [7 x i8] c"%s.%s\0A\00"
@.str.6 = [9 x i8] c"20070210\00"
@.str.7 = [5 x i8] c"-nab\00"
@.str.8 = [3 x i8] c"-b\00"
@.str.9 = [6 x i8] c"%s.%s\00"
@.str.10 = [3 x i8] c"-p\00"
@.str.11 = [11 x i8] c"/usr/local\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %63
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @strcmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%13 = icmp ne i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %8
%15 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %62
16: ; preds = %8
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @strcmp(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp ne i32 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %16
%23 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %61
24: ; preds = %16
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @strcmp(i8* %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
br i1 %29, label %32, label %30
30: ; preds = %24
%31 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
br label %60
32: ; preds = %24
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i32 @strcmp(i8* %35, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%37 = icmp ne i32 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %32
%39 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %59
40: ; preds = %32
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 1
%43 = load i8*, i8** %42
%44 = call i32 @strcmp(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%45 = icmp ne i32 %44, 0
br i1 %45, label %49, label %46
46: ; preds = %40
%47 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%48 = call i32 @putchar(i8 signext 10)
br label %58
49: ; preds = %40
%50 = load i8**, i8*** %5
%51 = getelementptr inbounds i8*, i8** %50, i64 1
%52 = load i8*, i8** %51
%53 = call i32 @strcmp(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%54 = icmp ne i32 %53, 0
br i1 %54, label %57, label %55
55: ; preds = %49
%56 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
br label %57
57: ; preds = %55, %49
br label %58
58: ; preds = %57, %46
br label %59
59: ; preds = %58, %38
br label %60
60: ; preds = %59, %30
br label %61
61: ; preds = %60, %22
br label %62
62: ; preds = %61, %14
br label %65
63: ; preds = %2
%64 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %65
65: ; preds = %63, %62
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-a\00"
@.str.1 = [18 x i8] c"ReferenceFinder 4\00"
@.str.2 = [4 x i8] c"-nl\00"
@.str.3 = [22 x i8] c"ReferenceFinder 4.0.1\00"
@.str.4 = [5 x i8] c"-nvb\00"
@.str.5 = [7 x i8] c"%s.%s\0A\00"
@.str.6 = [9 x i8] c"20070210\00"
@.str.7 = [5 x i8] c"-nab\00"
@.str.8 = [3 x i8] c"-b\00"
@.str.9 = [6 x i8] c"%s.%s\00"
@.str.10 = [3 x i8] c"-p\00"
@.str.11 = [11 x i8] c"/usr/local\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %37
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %39
11: ; preds = %4
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %39
16: ; preds = %11
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
br label %39
21: ; preds = %16
%22 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %39
26: ; preds = %21
%27 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%31 = tail call i32 @putchar(i8 signext 10)
br label %39
32: ; preds = %26
%33 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %39
35: ; preds = %32
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
br label %39
37: ; preds = %2
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %9, %19, %29, %35, %32, %24, %14, %37
ret i32 0
}