#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*/ cleanup();
int /*<<< orphan*/ createModel();
int /*<<< orphan*/ generateNMNEncoder();
scalar_t__ getFlag(int);
int /*<<< orphan*/ initialize(int, char **);
int /*<<< orphan*/ loadDataSet();
int /*<<< orphan*/ loadModel();
int /*<<< orphan*/ printModel();
int /*<<< orphan*/ saveModel();
int /*<<< orphan*/ testModel();
int /*<<< orphan*/ trainModel();
int main(int argc, char **argv) {
  if (!initialize(argc, argv))
    return 1;
  if (getFlag((1 << 0))) {
    if (!createModel())
      return 1;
    if (!saveModel())
      return 1;
    printModel();
  } else if (getFlag((1 << 1))) {
    if (!loadModel())
      return 1;
    printModel();
    if (!loadDataSet())
      return 1;
    if (!trainModel())
      return 1;
    if (!saveModel())
      return 1;
    printModel();
  } else if (getFlag((1 << 2))) {
    if (!loadModel())
      return 1;
    printModel();
    if (!loadDataSet())
      return 1;
    if (!testModel())
      return 1;
  } else if (getFlag((1 << 3))) {
    if (!loadModel())
      return 1;
    printModel();
  } else if (getFlag((1 << 4))) {
    generateNMNEncoder();
  }
  cleanup();
  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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <initialize@plt>
cmp    $0x0,%eax
jne    11e7 <main+0x37>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
mov    $0x1,%edi
call   10d0 <getFlag@plt>
cmp    $0x0,%rax
je     123f <main+0x8f>
mov    $0x0,%al
call   1080 <createModel@plt>
cmp    $0x0,%eax
jne    1217 <main+0x67>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
mov    $0x0,%al
call   10c0 <saveModel@plt>
cmp    $0x0,%eax
jne    1233 <main+0x83>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
mov    $0x0,%al
call   1040 <printModel@plt>
jmp    13b5 <main+0x205>
mov    $0x2,%edi
call   10d0 <getFlag@plt>
cmp    $0x0,%rax
je     12d6 <main+0x126>
mov    $0x0,%al
call   1070 <loadModel@plt>
cmp    $0x0,%eax
jne    126f <main+0xbf>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
mov    $0x0,%al
call   1040 <printModel@plt>
mov    $0x0,%al
call   1060 <loadDataSet@plt>
cmp    $0x0,%eax
jne    1292 <main+0xe2>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
mov    $0x0,%al
call   10a0 <trainModel@plt>
cmp    $0x0,%eax
jne    12ae <main+0xfe>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
mov    $0x0,%al
call   10c0 <saveModel@plt>
cmp    $0x0,%eax
jne    12ca <main+0x11a>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
mov    $0x0,%al
call   1040 <printModel@plt>
jmp    13b0 <main+0x200>
mov    $0x4,%edi
call   10d0 <getFlag@plt>
cmp    $0x0,%rax
je     134a <main+0x19a>
mov    $0x0,%al
call   1070 <loadModel@plt>
cmp    $0x0,%eax
jne    1306 <main+0x156>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
mov    $0x0,%al
call   1040 <printModel@plt>
mov    $0x0,%al
call   1060 <loadDataSet@plt>
cmp    $0x0,%eax
jne    1329 <main+0x179>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
mov    $0x0,%al
call   1030 <testModel@plt>
cmp    $0x0,%eax
jne    1345 <main+0x195>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
jmp    13ab <main+0x1fb>
mov    $0x8,%edi
call   10d0 <getFlag@plt>
cmp    $0x0,%rax
je     1386 <main+0x1d6>
mov    $0x0,%al
call   1070 <loadModel@plt>
cmp    $0x0,%eax
jne    137a <main+0x1ca>
movl   $0x1,-0x4(%rbp)
jmp    13c3 <main+0x213>
mov    $0x0,%al
call   1040 <printModel@plt>
jmp    13a6 <main+0x1f6>
mov    $0x10,%edi
call   10d0 <getFlag@plt>
cmp    $0x0,%rax
je     13a1 <main+0x1f1>
mov    $0x0,%al
call   10b0 <generateNMNEncoder@plt>
jmp    13a6 <main+0x1f6>
jmp    13ab <main+0x1fb>
jmp    13b0 <main+0x200>
jmp    13b5 <main+0x205>
mov    $0x0,%al
call   1090 <cleanup@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
call   1050 <initialize@plt>
mov    $0x1,%ebx
test   %eax,%eax
je     1295 <main+0xe5>
mov    $0x1,%edi
call   10d0 <getFlag@plt>
test   %rax,%rax
je     1205 <main+0x55>
xor    %eax,%eax
call   1080 <createModel@plt>
test   %eax,%eax
je     1295 <main+0xe5>
xor    %eax,%eax
call   10c0 <saveModel@plt>
test   %eax,%eax
je     1295 <main+0xe5>
xor    %eax,%eax
call   1040 <printModel@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1090 <cleanup@plt>
jmp    1295 <main+0xe5>
mov    $0x2,%edi
call   10d0 <getFlag@plt>
test   %rax,%rax
je     123e <main+0x8e>
xor    %eax,%eax
call   1070 <loadModel@plt>
test   %eax,%eax
je     1295 <main+0xe5>
xor    %eax,%eax
call   1040 <printModel@plt>
xor    %eax,%eax
call   1060 <loadDataSet@plt>
test   %eax,%eax
je     1295 <main+0xe5>
xor    %eax,%eax
call   10a0 <trainModel@plt>
test   %eax,%eax
jne    11e1 <main+0x31>
jmp    1295 <main+0xe5>
mov    $0x4,%edi
call   10d0 <getFlag@plt>
test   %rax,%rax
je     1277 <main+0xc7>
xor    %eax,%eax
call   1070 <loadModel@plt>
test   %eax,%eax
je     1295 <main+0xe5>
xor    %eax,%eax
call   1040 <printModel@plt>
xor    %eax,%eax
call   1060 <loadDataSet@plt>
test   %eax,%eax
je     1295 <main+0xe5>
xor    %eax,%eax
call   1030 <testModel@plt>
test   %eax,%eax
jne    11f7 <main+0x47>
jmp    1295 <main+0xe5>
mov    $0x8,%edi
call   10d0 <getFlag@plt>
test   %rax,%rax
je     1299 <main+0xe9>
xor    %eax,%eax
call   1070 <loadModel@plt>
test   %eax,%eax
jne    11f0 <main+0x40>
mov    %ebx,%eax
pop    %rbx
ret
mov    $0x10,%edi
call   10d0 <getFlag@plt>
test   %rax,%rax
je     11f7 <main+0x47>
xor    %eax,%eax
call   10b0 <generateNMNEncoder@plt>
jmp    11f7 <main+0x47>

LLVM IR (-O0):
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 = load i8**, i8*** %5
%8 = call i32 @initialize(i32 %6, i8** %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %2
store i32 1, i32* %3
br label %83
11: ; preds = %2
%12 = call i64 @getFlag(i32 1)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = call i32 (...) @createModel()
%16 = icmp ne i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %14
store i32 1, i32* %3
br label %83
18: ; preds = %14
%19 = call i32 (...) @saveModel()
%20 = icmp ne i32 %19, 0
br i1 %20, label %22, label %21
21: ; preds = %18
store i32 1, i32* %3
br label %83
22: ; preds = %18
%23 = call i32 (...) @printModel()
br label %81
24: ; preds = %11
%25 = call i64 @getFlag(i32 2)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %46
27: ; preds = %24
%28 = call i32 (...) @loadModel()
%29 = icmp ne i32 %28, 0
br i1 %29, label %31, label %30
30: ; preds = %27
store i32 1, i32* %3
br label %83
31: ; preds = %27
%32 = call i32 (...) @printModel()
%33 = call i32 (...) @loadDataSet()
%34 = icmp ne i32 %33, 0
br i1 %34, label %36, label %35
35: ; preds = %31
store i32 1, i32* %3
br label %83
36: ; preds = %31
%37 = call i32 (...) @trainModel()
%38 = icmp ne i32 %37, 0
br i1 %38, label %40, label %39
39: ; preds = %36
store i32 1, i32* %3
br label %83
40: ; preds = %36
%41 = call i32 (...) @saveModel()
%42 = icmp ne i32 %41, 0
br i1 %42, label %44, label %43
43: ; preds = %40
store i32 1, i32* %3
br label %83
44: ; preds = %40
%45 = call i32 (...) @printModel()
br label %80
46: ; preds = %24
%47 = call i64 @getFlag(i32 4)
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %63
49: ; preds = %46
%50 = call i32 (...) @loadModel()
%51 = icmp ne i32 %50, 0
br i1 %51, label %53, label %52
52: ; preds = %49
store i32 1, i32* %3
br label %83
53: ; preds = %49
%54 = call i32 (...) @printModel()
%55 = call i32 (...) @loadDataSet()
%56 = icmp ne i32 %55, 0
br i1 %56, label %58, label %57
57: ; preds = %53
store i32 1, i32* %3
br label %83
58: ; preds = %53
%59 = call i32 (...) @testModel()
%60 = icmp ne i32 %59, 0
br i1 %60, label %62, label %61
61: ; preds = %58
store i32 1, i32* %3
br label %83
62: ; preds = %58
br label %79
63: ; preds = %46
%64 = call i64 @getFlag(i32 8)
%65 = icmp ne i64 %64, 0
br i1 %65, label %66, label %72
66: ; preds = %63
%67 = call i32 (...) @loadModel()
%68 = icmp ne i32 %67, 0
br i1 %68, label %70, label %69
69: ; preds = %66
store i32 1, i32* %3
br label %83
70: ; preds = %66
%71 = call i32 (...) @printModel()
br label %78
72: ; preds = %63
%73 = call i64 @getFlag(i32 16)
%74 = icmp ne i64 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = call i32 (...) @generateNMNEncoder()
br label %77
77: ; preds = %75, %72
br label %78
78: ; preds = %77, %70
br label %79
79: ; preds = %78, %62
br label %80
80: ; preds = %79, %44
br label %81
81: ; preds = %80, %22
%82 = call i32 (...) @cleanup()
store i32 0, i32* %3
br label %83
83: ; preds = %81, %69, %61, %57, %52, %43, %39, %35, %30, %21, %17, %10
%84 = load i32, i32* %3
ret i32 %84
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @initialize(i32 %0, i8** %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %62, label %5
5: ; preds = %2
%6 = tail call i64 @getFlag(i32 1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %5
%9 = tail call i32 (...) @createModel()
%10 = icmp eq i32 %9, 0
br i1 %10, label %62, label %11
11: ; preds = %8
%12 = tail call i32 (...) @saveModel()
%13 = icmp eq i32 %12, 0
br i1 %13, label %62, label %14
14: ; preds = %11
%15 = tail call i32 (...) @printModel()
br label %60
16: ; preds = %5
%17 = tail call i64 @getFlag(i32 2)
%18 = icmp eq i64 %17, 0
br i1 %18, label %34, label %19
19: ; preds = %16
%20 = tail call i32 (...) @loadModel()
%21 = icmp eq i32 %20, 0
br i1 %21, label %62, label %22
22: ; preds = %19
%23 = tail call i32 (...) @printModel()
%24 = tail call i32 (...) @loadDataSet()
%25 = icmp eq i32 %24, 0
br i1 %25, label %62, label %26
26: ; preds = %22
%27 = tail call i32 (...) @trainModel()
%28 = icmp eq i32 %27, 0
br i1 %28, label %62, label %29
29: ; preds = %26
%30 = tail call i32 (...) @saveModel()
%31 = icmp eq i32 %30, 0
br i1 %31, label %62, label %32
32: ; preds = %29
%33 = tail call i32 (...) @printModel()
br label %60
34: ; preds = %16
%35 = tail call i64 @getFlag(i32 4)
%36 = icmp eq i64 %35, 0
br i1 %36, label %47, label %37
37: ; preds = %34
%38 = tail call i32 (...) @loadModel()
%39 = icmp eq i32 %38, 0
br i1 %39, label %62, label %40
40: ; preds = %37
%41 = tail call i32 (...) @printModel()
%42 = tail call i32 (...) @loadDataSet()
%43 = icmp eq i32 %42, 0
br i1 %43, label %62, label %44
44: ; preds = %40
%45 = tail call i32 (...) @testModel()
%46 = icmp eq i32 %45, 0
br i1 %46, label %62, label %60
47: ; preds = %34
%48 = tail call i64 @getFlag(i32 8)
%49 = icmp eq i64 %48, 0
br i1 %49, label %55, label %50
50: ; preds = %47
%51 = tail call i32 (...) @loadModel()
%52 = icmp eq i32 %51, 0
br i1 %52, label %62, label %53
53: ; preds = %50
%54 = tail call i32 (...) @printModel()
br label %60
55: ; preds = %47
%56 = tail call i64 @getFlag(i32 16)
%57 = icmp eq i64 %56, 0
br i1 %57, label %60, label %58
58: ; preds = %55
%59 = tail call i32 (...) @generateNMNEncoder()
br label %60
60: ; preds = %32, %53, %58, %55, %44, %14
%61 = tail call i32 (...) @cleanup()
br label %62
62: ; preds = %50, %44, %40, %37, %29, %26, %22, %19, %11, %8, %2, %60
%63 = phi i32 [ 0, %60 ], [ 1, %2 ], [ 1, %8 ], [ 1, %11 ], [ 1, %19 ], [ 1, %22 ], [ 1, %26 ], [ 1, %29 ], [ 1, %37 ], [ 1, %40 ], [ 1, %44 ], [ 1, %50 ]
ret i32 %63
}