#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*/ net_learn(char *, char *);
int net_test(char *);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  int ret = 0;
  switch (argc) {
  case 2: {
    if (argv[1] == "L" || argv[1] == "l") {
      net_learn(NULL, NULL);
    } else {
      usage();
    }
  } break;
  case 3: {
    if (argv[1] == "T" || argv[1] == "t") {
      ret = net_test(argv[2]);
    } else if (argv[1] == "L" || argv[1] == "l") {
      net_learn(argv[2], argv[2]);
    } else {
      usage();
    }
  }
  default:
    usage();
  }
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
sub    $0x2,%eax
je     1172 <main+0x42>
jmp    1161 <main+0x31>
mov    -0x18(%rbp),%eax
sub    $0x3,%eax
je     11b9 <main+0x89>
jmp    124d <main+0x11d>
mov    -0x10(%rbp),%rax
lea    0xe83(%rip),%rcx
cmp    %rcx,0x8(%rax)
je     119c <main+0x6c>
mov    -0x10(%rbp),%rax
lea    0xe70(%rip),%rcx
cmp    %rcx,0x8(%rax)
jne    11ad <main+0x7d>
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1050 <net_learn@plt>
jmp    11b4 <main+0x84>
mov    $0x0,%al
call   1040 <usage@plt>
jmp    1254 <main+0x124>
mov    -0x10(%rbp),%rax
lea    0xe40(%rip),%rcx
cmp    %rcx,0x8(%rax)
je     11e3 <main+0xb3>
mov    -0x10(%rbp),%rax
lea    0xe2d(%rip),%rcx
cmp    %rcx,0x8(%rax)
jne    11f8 <main+0xc8>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <net_test@plt>
mov    %eax,-0x14(%rbp)
jmp    1248 <main+0x118>
mov    -0x10(%rbp),%rax
lea    0xdfd(%rip),%rcx
cmp    %rcx,0x8(%rax)
je     1222 <main+0xf2>
mov    -0x10(%rbp),%rax
lea    0xdea(%rip),%rcx
cmp    %rcx,0x8(%rax)
jne    123c <main+0x10c>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1050 <net_learn@plt>
jmp    1243 <main+0x113>
mov    $0x0,%al
call   1040 <usage@plt>
jmp    1248 <main+0x118>
jmp    124d <main+0x11d>
mov    $0x0,%al
call   1040 <usage@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cmp    $0x3,%edi
je     1161 <main+0x31>
cmp    $0x2,%edi
jne    11c6 <main+0x96>
mov    0x8(%rsi),%rax
lea    0xeb4(%rip),%rcx
cmp    %rcx,%rax
je     11a0 <main+0x70>
lea    0xeaa(%rip),%rcx
cmp    %rcx,%rax
je     11a0 <main+0x70>
xor    %ebx,%ebx
jmp    11c6 <main+0x96>
mov    0x8(%rsi),%rax
lea    0xe98(%rip),%rcx
cmp    %rcx,%rax
je     11ad <main+0x7d>
lea    0xe8e(%rip),%rcx
cmp    %rcx,%rax
je     11ad <main+0x7d>
lea    0xe7c(%rip),%rcx
cmp    %rcx,%rax
je     11ba <main+0x8a>
lea    0xe72(%rip),%rcx
cmp    %rcx,%rax
je     11ba <main+0x8a>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <usage@plt>
jmp    11c6 <main+0x96>
xor    %ebx,%ebx
xor    %edi,%edi
xor    %esi,%esi
call   1050 <net_learn@plt>
jmp    11cd <main+0x9d>
mov    0x10(%rsi),%rdi
call   1030 <net_test@plt>
mov    %eax,%ebx
jmp    11c6 <main+0x96>
mov    0x10(%rsi),%rdi
mov    %rdi,%rsi
call   1050 <net_learn@plt>
xor    %eax,%eax
call   1040 <usage@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"L\00"
@.str.1 = [2 x i8] c"l\00"
@.str.2 = [2 x i8] c"T\00"
@.str.3 = [2 x i8] c"t\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
switch i32 %7, label %60 [
i32 2, label %8
i32 3, label %23
]
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
br i1 %12, label %18, label %13
13: ; preds = %8
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = icmp eq i8* %16, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
br i1 %17, label %18, label %20
18: ; preds = %13, %8
%19 = call i32 @net_learn(i8* null, i8* null)
br label %22
20: ; preds = %13
%21 = call i32 (...) @usage()
br label %22
22: ; preds = %20, %18
br label %62
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = icmp eq i8* %26, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
br i1 %27, label %33, label %28
28: ; preds = %23
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = icmp eq i8* %31, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0)
br i1 %32, label %33, label %38
33: ; preds = %28, %23
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 2
%36 = load i8*, i8** %35
%37 = call i32 @net_test(i8* %36)
store i32 %37, i32* %6
br label %59
38: ; preds = %28
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = icmp eq i8* %41, getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
br i1 %42, label %48, label %43
43: ; preds = %38
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 1
%46 = load i8*, i8** %45
%47 = icmp eq i8* %46, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
br i1 %47, label %48, label %56
48: ; preds = %43, %38
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 2
%51 = load i8*, i8** %50
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 2
%54 = load i8*, i8** %53
%55 = call i32 @net_learn(i8* %51, i8* %54)
br label %58
56: ; preds = %43
%57 = call i32 (...) @usage()
br label %58
58: ; preds = %56, %48
br label %59
59: ; preds = %58, %33
br label %60
60: ; preds = %2, %59
%61 = call i32 (...) @usage()
br label %62
62: ; preds = %60, %22
%63 = load i32, i32* %6
ret i32 %63
}

LLVM IR (-O2):
@.str = [2 x i8] c"L\00"
@.str.1 = [2 x i8] c"l\00"
@.str.2 = [2 x i8] c"T\00"
@.str.3 = [2 x i8] c"t\00"
define i32 @main(i32 %0, i8** nocapture %1) {
switch i32 %0, label %33 [
i32 2, label %3
i32 3, label %13
]
3: ; preds = %2
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
%7 = icmp eq i8* %5, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%8 = or i1 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = tail call i32 @net_learn(i8* null, i8* null)
br label %36
11: ; preds = %3
%12 = tail call i32 (...) @usage()
br label %36
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = icmp eq i8* %15, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%17 = icmp eq i8* %15, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0)
%18 = or i1 %16, %17
br i1 %18, label %19, label %23
19: ; preds = %13
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = tail call i32 @net_test(i8* %21)
br label %33
23: ; preds = %13
%24 = icmp eq i8* %15, getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
%25 = icmp eq i8* %15, getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%26 = or i1 %24, %25
br i1 %26, label %27, label %31
27: ; preds = %23
%28 = getelementptr inbounds i8*, i8** %1, i64 2
%29 = load i8*, i8** %28
%30 = tail call i32 @net_learn(i8* %29, i8* %29)
br label %33
31: ; preds = %23
%32 = tail call i32 (...) @usage()
br label %33
33: ; preds = %19, %31, %27, %2
%34 = phi i32 [ 0, %2 ], [ %22, %19 ], [ 0, %27 ], [ 0, %31 ]
%35 = tail call i32 (...) @usage()
br label %36
36: ; preds = %9, %11, %33
%37 = phi i32 [ %34, %33 ], [ 0, %9 ], [ 0, %11 ]
ret i32 %37
}