#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 EXIT_SUCCESS;
int /*<<< orphan*/ init_repo();
int /*<<< orphan*/ print_snap_usage();
int /*<<< orphan*/ print_usage();
int /*<<< orphan*/ show_commits();
int /*<<< orphan*/ snap_all(char *);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  if (argc > 1) {
    if (strcmp(argv[1], "init") == 0)
      init_repo();
    else if (strcmp(argv[1], "status") == 0)
      ;
    else if (strcmp(argv[1], "stage") == 0)
      ;
    else if (strcmp(argv[1], "destage") == 0)
      ;
    else if (strcmp(argv[1], "snap") == 0) {
      if (argv[2] == NULL)
        print_snap_usage();
      else
        snap_all(argv[2]);
    } else if (strcmp(argv[1], "branch") == 0)
      ;
    else if (strcmp(argv[1], "switch") == 0)
      ;
    else if (strcmp(argv[1], "merge") == 0)
      ;
    else if (strcmp(argv[1], "log") == 0)
      show_commits();
    else
      print_usage();
  } else
    print_usage();
  return EXIT_SUCCESS;
}


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    1325 <main+0x1c5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe71(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11aa <main+0x4a>
mov    $0x0,%al
call   1070 <init_repo@plt>
jmp    1320 <main+0x1c0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe4c(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11cd <main+0x6d>
jmp    131b <main+0x1bb>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe32(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11f0 <main+0x90>
jmp    1316 <main+0x1b6>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe0d(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1213 <main+0xb3>
jmp    1311 <main+0x1b1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf2(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    125e <main+0xfe>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x10(%rax)
jne    124c <main+0xec>
mov    $0x0,%al
call   1040 <print_snap_usage@plt>
jmp    1259 <main+0xf9>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <snap_all@plt>
jmp    130c <main+0x1ac>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdac(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1281 <main+0x121>
jmp    1307 <main+0x1a7>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd90(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    12a4 <main+0x144>
jmp    1302 <main+0x1a2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd74(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    12c7 <main+0x167>
jmp    12fd <main+0x19d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd57(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    12f1 <main+0x191>
mov    $0x0,%al
call   1030 <show_commits@plt>
jmp    12f8 <main+0x198>
mov    $0x0,%al
call   1080 <print_usage@plt>
jmp    12fd <main+0x19d>
jmp    1302 <main+0x1a2>
jmp    1307 <main+0x1a7>
jmp    130c <main+0x1ac>
jmp    1311 <main+0x1b1>
jmp    1316 <main+0x1b6>
jmp    131b <main+0x1bb>
jmp    1320 <main+0x1c0>
jmp    132c <main+0x1cc>
mov    $0x0,%al
call   1080 <print_usage@plt>
mov    0x2cad(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jl     1236 <main+0xd6>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xe88(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     123f <main+0xdf>
mov    0x8(%rbx),%rdi
lea    0xe74(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1246 <main+0xe6>
mov    0x8(%rbx),%rdi
lea    0xe64(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1246 <main+0xe6>
mov    0x8(%rbx),%rdi
lea    0xe49(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1246 <main+0xe6>
mov    0x8(%rbx),%rdi
lea    0xe3c(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1251 <main+0xf1>
mov    0x8(%rbx),%rdi
lea    0xe2c(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1246 <main+0xe6>
mov    0x8(%rbx),%rdi
lea    0xe1e(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1246 <main+0xe6>
mov    0x8(%rbx),%rdi
lea    0xe10(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1246 <main+0xe6>
mov    0x8(%rbx),%rdi
lea    0xe01(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     126a <main+0x10a>
xor    %eax,%eax
call   1080 <print_usage@plt>
jmp    1246 <main+0xe6>
xor    %eax,%eax
call   1070 <init_repo@plt>
mov    0x2d93(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret
mov    0x10(%rbx),%rdi
test   %rdi,%rdi
je     1261 <main+0x101>
call   1050 <snap_all@plt>
jmp    1246 <main+0xe6>
xor    %eax,%eax
call   1040 <print_snap_usage@plt>
jmp    1246 <main+0xe6>
xor    %eax,%eax
call   1030 <show_commits@plt>
jmp    1246 <main+0xe6>

LLVM IR (-O0):
@.str = [5 x i8] c"init\00"
@.str.1 = [7 x i8] c"status\00"
@.str.2 = [6 x i8] c"stage\00"
@.str.3 = [8 x i8] c"destage\00"
@.str.4 = [5 x i8] c"snap\00"
@.str.5 = [7 x i8] c"branch\00"
@.str.6 = [7 x i8] c"switch\00"
@.str.7 = [6 x i8] c"merge\00"
@.str.8 = [4 x i8] c"log\00"
@EXIT_SUCCESS = global i32 0
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 %96
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = call i32 (...) @init_repo()
br label %95
16: ; preds = %8
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %16
br label %94
23: ; preds = %16
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %30
29: ; preds = %23
br label %93
30: ; preds = %23
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %30
br label %92
37: ; preds = %30
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 1
%40 = load i8*, i8** %39
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %56
43: ; preds = %37
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 2
%46 = load i8*, i8** %45
%47 = icmp eq i8* %46, null
br i1 %47, label %48, label %50
48: ; preds = %43
%49 = call i32 (...) @print_snap_usage()
br label %55
50: ; preds = %43
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 2
%53 = load i8*, i8** %52
%54 = call i32 @snap_all(i8* %53)
br label %55
55: ; preds = %50, %48
br label %91
56: ; preds = %37
%57 = load i8**, i8*** %5
%58 = getelementptr inbounds i8*, i8** %57, i64 1
%59 = load i8*, i8** %58
%60 = call i64 @strcmp(i8* %59, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %63
62: ; preds = %56
br label %90
63: ; preds = %56
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 1
%66 = load i8*, i8** %65
%67 = call i64 @strcmp(i8* %66, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %70
69: ; preds = %63
br label %89
70: ; preds = %63
%71 = load i8**, i8*** %5
%72 = getelementptr inbounds i8*, i8** %71, i64 1
%73 = load i8*, i8** %72
%74 = call i64 @strcmp(i8* %73, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %77
76: ; preds = %70
br label %88
77: ; preds = %70
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 1
%80 = load i8*, i8** %79
%81 = call i64 @strcmp(i8* %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%82 = icmp eq i64 %81, 0
br i1 %82, label %83, label %85
83: ; preds = %77
%84 = call i32 (...) @show_commits()
br label %87
85: ; preds = %77
%86 = call i32 (...) @print_usage()
br label %87
87: ; preds = %85, %83
br label %88
88: ; preds = %87, %76
br label %89
89: ; preds = %88, %69
br label %90
90: ; preds = %89, %62
br label %91
91: ; preds = %90, %55
br label %92
92: ; preds = %91, %36
br label %93
93: ; preds = %92, %29
br label %94
94: ; preds = %93, %22
br label %95
95: ; preds = %94, %14
br label %98
96: ; preds = %2
%97 = call i32 (...) @print_usage()
br label %98
98: ; preds = %96, %95
%99 = load i32, i32* @EXIT_SUCCESS
ret i32 %99
}

LLVM IR (-O2):
@.str = [5 x i8] c"init\00"
@.str.1 = [7 x i8] c"status\00"
@.str.2 = [6 x i8] c"stage\00"
@.str.3 = [8 x i8] c"destage\00"
@.str.4 = [5 x i8] c"snap\00"
@.str.5 = [7 x i8] c"branch\00"
@.str.6 = [7 x i8] c"switch\00"
@.str.7 = [6 x i8] c"merge\00"
@.str.8 = [4 x i8] c"log\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %55
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 (...) @init_repo()
br label %57
11: ; preds = %4
%12 = load i8*, i8** %5
%13 = tail call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %57, label %15
15: ; preds = %11
%16 = load i8*, i8** %5
%17 = tail call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %57, label %19
19: ; preds = %15
%20 = load i8*, i8** %5
%21 = tail call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %57, label %23
23: ; preds = %19
%24 = load i8*, i8** %5
%25 = tail call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %35
27: ; preds = %23
%28 = getelementptr inbounds i8*, i8** %1, i64 2
%29 = load i8*, i8** %28
%30 = icmp eq i8* %29, null
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = tail call i32 (...) @print_snap_usage()
br label %57
33: ; preds = %27
%34 = tail call i32 @snap_all(i8* %29)
br label %57
35: ; preds = %23
%36 = load i8*, i8** %5
%37 = tail call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %57, label %39
39: ; preds = %35
%40 = load i8*, i8** %5
%41 = tail call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %57, label %43
43: ; preds = %39
%44 = load i8*, i8** %5
%45 = tail call i64 @strcmp(i8* %44, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %57, label %47
47: ; preds = %43
%48 = load i8*, i8** %5
%49 = tail call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %47
%52 = tail call i32 (...) @show_commits()
br label %57
53: ; preds = %47
%54 = tail call i32 (...) @print_usage()
br label %57
55: ; preds = %2
%56 = tail call i32 (...) @print_usage()
br label %57
57: ; preds = %9, %15, %33, %31, %39, %51, %53, %43, %35, %19, %11, %55
%58 = load i32, i32* @EXIT_SUCCESS
ret i32 %58
}