#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*/ Backup(char *);
int /*<<< orphan*/ ExtracttLog(char *, char *, char *, char *);
int /*<<< orphan*/ ImportTemplateFile(char *, char *, char *, char *);
int /*<<< orphan*/ Initialize(char *);
int /*<<< orphan*/ Restore(char *, char *);
int /*<<< orphan*/ RestoreAll(char *);
int /*<<< orphan*/ UpdateSchema();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ getuid();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
void ExtMainShell(int argc, char *argv[]) {
  if (getuid()) {
    printf("Only root can run this command!\n");
    exit(0);
  }
  if (argc == 6 && !strcmp(argv[1], "ImportTemplateFile"))
    ImportTemplateFile(argv[2], argv[3], argv[4], argv[5]);
  else if (argc == 3 && !strcmp(argv[1], "Initialize"))
    Initialize(argv[2]);
  else if (argc == 3 && !strcmp(argv[1], "Backup"))
    Backup(argv[2]);
  else if (argc == 4 && !strcmp(argv[1], "Restore"))
    Restore(argv[2], argv[3]);
  else if (argc == 3 && !strcmp(argv[1], "RestoreAll"))
    RestoreAll(argv[2]);
  else if (argc == 6 && !strcmp(argv[1], "ExtracttLog"))
    ExtracttLog(argv[2], argv[3], argv[4], argv[5]);
  else if (argc == 2 && !strcmp(argv[1], "UpdateSchema"))
    UpdateSchema();
  else {
    printf("\n%s %s Menu\n\nDatabase Ops:\n", argv[0], "");
    printf("\tInitialize|Backup|RestoreAll <mysql root passwd>\n");
    printf("\tRestore <mysql root passwd> <Restore table name>\n");
    printf("\nSpecial Admin Ops:\n");
    printf("\tImportTemplateFile <tTemplate.cLabel> <filespec> "
           "<tTemplateSet.cLabel> <tTemplateType.cLabel>\n");
    printf("\tExtracttLog <Mon> <Year> <mysql root passwd> <path to mysql "
           "table>\n");
    printf("\tUpdateSchema\n");
    printf("\n");
  }
  exit(0);
}


x86 assembly (clang, -O0):
<ExtMainShell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getuid@plt>
cmp    $0x0,%rax
je     11e5 <ExtMainShell+0x35>
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
cmpl   $0x6,-0x4(%rbp)
jne    1236 <ExtMainShell+0x86>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe23(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1236 <ExtMainShell+0x86>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rcx
call   1090 <ImportTemplateFile@plt>
jmp    1442 <ExtMainShell+0x292>
cmpl   $0x3,-0x4(%rbp)
jne    126f <ExtMainShell+0xbf>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xde5(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    126f <ExtMainShell+0xbf>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10b0 <Initialize@plt>
jmp    143d <ExtMainShell+0x28d>
cmpl   $0x3,-0x4(%rbp)
jne    12a8 <ExtMainShell+0xf8>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdb7(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    12a8 <ExtMainShell+0xf8>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10a0 <Backup@plt>
jmp    1438 <ExtMainShell+0x288>
cmpl   $0x4,-0x4(%rbp)
jne    12e9 <ExtMainShell+0x139>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd85(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    12e9 <ExtMainShell+0x139>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1030 <Restore@plt>
jmp    1433 <ExtMainShell+0x283>
cmpl   $0x3,-0x4(%rbp)
jne    1322 <ExtMainShell+0x172>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd4c(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1322 <ExtMainShell+0x172>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10d0 <RestoreAll@plt>
jmp    142e <ExtMainShell+0x27e>
cmpl   $0x6,-0x4(%rbp)
jne    1373 <ExtMainShell+0x1c3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd1e(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1373 <ExtMainShell+0x1c3>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rcx
call   1080 <ExtracttLog@plt>
jmp    1429 <ExtMainShell+0x279>
cmpl   $0x2,-0x4(%rbp)
jne    13a6 <ExtMainShell+0x1f6>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcd9(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    13a6 <ExtMainShell+0x1f6>
mov    $0x0,%al
call   1060 <UpdateSchema@plt>
jmp    1424 <ExtMainShell+0x274>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xcbe(%rip),%rdi
lea    0xc65(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcea(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd0f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd16(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc02(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1429 <ExtMainShell+0x279>
jmp    142e <ExtMainShell+0x27e>
jmp    1433 <ExtMainShell+0x283>
jmp    1438 <ExtMainShell+0x288>
jmp    143d <ExtMainShell+0x28d>
jmp    1442 <ExtMainShell+0x292>
xor    %edi,%edi
call   10c0 <exit@plt>

x86 assembly (clang, -O2):
<ExtMainShell>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %edi,%ebx
xor    %eax,%eax
call   1060 <getuid@plt>
test   %rax,%rax
jne    1228 <ExtMainShell+0x58>
add    $0xfffffffe,%ebx
cmp    $0x4,%ebx
ja     1336 <ExtMainShell+0x166>
lea    0xe07(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    0x8(%r15),%rdi
lea    0xf83(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    1336 <ExtMainShell+0x166>
xor    %eax,%eax
call   1080 <UpdateSchema@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
lea    0xf6e(%rip),%rdi
call   1050 <puts@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
mov    0x8(%r15),%rdi
lea    0xdf3(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    1336 <ExtMainShell+0x166>
mov    0x10(%r15),%rdi
mov    0x18(%r15),%rsi
call   1040 <Restore@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
mov    0x8(%r15),%r14
lea    0xdb5(%rip),%rsi
mov    %r14,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    12c1 <ExtMainShell+0xf1>
mov    0x10(%r15),%rdi
call   10d0 <Initialize@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
mov    0x8(%r15),%rbx
lea    0xd7b(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    12e4 <ExtMainShell+0x114>
mov    0x10(%r15),%rdi
mov    0x18(%r15),%rsi
mov    0x20(%r15),%rdx
mov    0x28(%r15),%rcx
call   10b0 <ImportTemplateFile@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
lea    0xd6a(%rip),%rsi
mov    %r14,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    1313 <ExtMainShell+0x143>
mov    0x10(%r15),%rdi
call   10c0 <Backup@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
lea    0xd61(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    1336 <ExtMainShell+0x166>
mov    0x10(%r15),%rdi
mov    0x18(%r15),%rsi
mov    0x20(%r15),%rdx
mov    0x28(%r15),%rcx
call   10a0 <ExtracttLog@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
lea    0xd27(%rip),%rsi
mov    %r14,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    1336 <ExtMainShell+0x166>
mov    0x10(%r15),%rdi
call   10f0 <RestoreAll@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
mov    (%r15),%rsi
lea    0xd18(%rip),%rdi
lea    0xd2c(%rip),%rdx
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd1f(%rip),%rdi
call   1050 <puts@plt>
lea    0xd45(%rip),%rdi
call   1050 <puts@plt>
lea    0xd6b(%rip),%rdi
call   1050 <puts@plt>
lea    0xd73(%rip),%rdi
call   1050 <puts@plt>
lea    0xdc6(%rip),%rdi
call   1050 <puts@plt>
lea    0xdfe(%rip),%rdi
call   1050 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Only root can run this command!\0A\00"
@.str.1 = [19 x i8] c"ImportTemplateFile\00"
@.str.2 = [11 x i8] c"Initialize\00"
@.str.3 = [7 x i8] c"Backup\00"
@.str.4 = [8 x i8] c"Restore\00"
@.str.5 = [11 x i8] c"RestoreAll\00"
@.str.6 = [12 x i8] c"ExtracttLog\00"
@.str.7 = [13 x i8] c"UpdateSchema\00"
@.str.8 = [28 x i8] c"\0A%s %s Menu\0A\0ADatabase Ops:\0A\00"
@.str.9 = [1 x i8] zeroinitializer
@.str.10 = [51 x i8] c"\09Initialize|Backup|RestoreAll <mysql root passwd>\0A\00"
@.str.11 = [51 x i8] c"\09Restore <mysql root passwd> <Restore table name>\0A\00"
@.str.12 = [21 x i8] c"\0ASpecial Admin Ops:\0A\00"
@.str.13 = [96 x i8] c"\09ImportTemplateFile <tTemplate.cLabel> <filespec> <tTemplateSet.cLabel> <tTemplateType.cLabel>\0A\00"
@.str.14 = [69 x i8] c"\09ExtracttLog <Mon> <Year> <mysql root passwd> <path to mysql table>\0A\00"
@.str.15 = [15 x i8] c"\09UpdateSchema\0A\00"
@.str.16 = [2 x i8] c"\0A\00"
define void @ExtMainShell(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i64 (...) @getuid()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %2
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 6
br i1 %12, label %13, label %33
13: ; preds = %10
%14 = load i8**, i8*** %4
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
br i1 %18, label %33, label %19
19: ; preds = %13
%20 = load i8**, i8*** %4
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
%23 = load i8**, i8*** %4
%24 = getelementptr inbounds i8*, i8** %23, i64 3
%25 = load i8*, i8** %24
%26 = load i8**, i8*** %4
%27 = getelementptr inbounds i8*, i8** %26, i64 4
%28 = load i8*, i8** %27
%29 = load i8**, i8*** %4
%30 = getelementptr inbounds i8*, i8** %29, i64 5
%31 = load i8*, i8** %30
%32 = call i32 @ImportTemplateFile(i8* %22, i8* %25, i8* %28, i8* %31)
br label %144
33: ; preds = %13, %10
%34 = load i32, i32* %3
%35 = icmp eq i32 %34, 3
br i1 %35, label %36, label %47
36: ; preds = %33
%37 = load i8**, i8*** %4
%38 = getelementptr inbounds i8*, i8** %37, i64 1
%39 = load i8*, i8** %38
%40 = call i32 @strcmp(i8* %39, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%41 = icmp ne i32 %40, 0
br i1 %41, label %47, label %42
42: ; preds = %36
%43 = load i8**, i8*** %4
%44 = getelementptr inbounds i8*, i8** %43, i64 2
%45 = load i8*, i8** %44
%46 = call i32 @Initialize(i8* %45)
br label %143
47: ; preds = %36, %33
%48 = load i32, i32* %3
%49 = icmp eq i32 %48, 3
br i1 %49, label %50, label %61
50: ; preds = %47
%51 = load i8**, i8*** %4
%52 = getelementptr inbounds i8*, i8** %51, i64 1
%53 = load i8*, i8** %52
%54 = call i32 @strcmp(i8* %53, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%55 = icmp ne i32 %54, 0
br i1 %55, label %61, label %56
56: ; preds = %50
%57 = load i8**, i8*** %4
%58 = getelementptr inbounds i8*, i8** %57, i64 2
%59 = load i8*, i8** %58
%60 = call i32 @Backup(i8* %59)
br label %142
61: ; preds = %50, %47
%62 = load i32, i32* %3
%63 = icmp eq i32 %62, 4
br i1 %63, label %64, label %78
64: ; preds = %61
%65 = load i8**, i8*** %4
%66 = getelementptr inbounds i8*, i8** %65, i64 1
%67 = load i8*, i8** %66
%68 = call i32 @strcmp(i8* %67, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%69 = icmp ne i32 %68, 0
br i1 %69, label %78, label %70
70: ; preds = %64
%71 = load i8**, i8*** %4
%72 = getelementptr inbounds i8*, i8** %71, i64 2
%73 = load i8*, i8** %72
%74 = load i8**, i8*** %4
%75 = getelementptr inbounds i8*, i8** %74, i64 3
%76 = load i8*, i8** %75
%77 = call i32 @Restore(i8* %73, i8* %76)
br label %141
78: ; preds = %64, %61
%79 = load i32, i32* %3
%80 = icmp eq i32 %79, 3
br i1 %80, label %81, label %92
81: ; preds = %78
%82 = load i8**, i8*** %4
%83 = getelementptr inbounds i8*, i8** %82, i64 1
%84 = load i8*, i8** %83
%85 = call i32 @strcmp(i8* %84, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%86 = icmp ne i32 %85, 0
br i1 %86, label %92, label %87
87: ; preds = %81
%88 = load i8**, i8*** %4
%89 = getelementptr inbounds i8*, i8** %88, i64 2
%90 = load i8*, i8** %89
%91 = call i32 @RestoreAll(i8* %90)
br label %140
92: ; preds = %81, %78
%93 = load i32, i32* %3
%94 = icmp eq i32 %93, 6
br i1 %94, label %95, label %115
95: ; preds = %92
%96 = load i8**, i8*** %4
%97 = getelementptr inbounds i8*, i8** %96, i64 1
%98 = load i8*, i8** %97
%99 = call i32 @strcmp(i8* %98, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%100 = icmp ne i32 %99, 0
br i1 %100, label %115, label %101
101: ; preds = %95
%102 = load i8**, i8*** %4
%103 = getelementptr inbounds i8*, i8** %102, i64 2
%104 = load i8*, i8** %103
%105 = load i8**, i8*** %4
%106 = getelementptr inbounds i8*, i8** %105, i64 3
%107 = load i8*, i8** %106
%108 = load i8**, i8*** %4
%109 = getelementptr inbounds i8*, i8** %108, i64 4
%110 = load i8*, i8** %109
%111 = load i8**, i8*** %4
%112 = getelementptr inbounds i8*, i8** %111, i64 5
%113 = load i8*, i8** %112
%114 = call i32 @ExtracttLog(i8* %104, i8* %107, i8* %110, i8* %113)
br label %139
115: ; preds = %95, %92
%116 = load i32, i32* %3
%117 = icmp eq i32 %116, 2
br i1 %117, label %118, label %126
118: ; preds = %115
%119 = load i8**, i8*** %4
%120 = getelementptr inbounds i8*, i8** %119, i64 1
%121 = load i8*, i8** %120
%122 = call i32 @strcmp(i8* %121, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%123 = icmp ne i32 %122, 0
br i1 %123, label %126, label %124
124: ; preds = %118
%125 = call i32 (...) @UpdateSchema()
br label %138
126: ; preds = %118, %115
%127 = load i8**, i8*** %4
%128 = getelementptr inbounds i8*, i8** %127, i64 0
%129 = load i8*, i8** %128
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i8* %129, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.10, i64 0, i64 0))
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.11, i64 0, i64 0))
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.13, i64 0, i64 0))
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.14, i64 0, i64 0))
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0))
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %138
138: ; preds = %126, %124
br label %139
139: ; preds = %138, %101
br label %140
140: ; preds = %139, %87
br label %141
141: ; preds = %140, %70
br label %142
142: ; preds = %141, %56
br label %143
143: ; preds = %142, %42
br label %144
144: ; preds = %143, %19
%145 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"ImportTemplateFile\00"
@.str.2 = [11 x i8] c"Initialize\00"
@.str.3 = [7 x i8] c"Backup\00"
@.str.4 = [8 x i8] c"Restore\00"
@.str.5 = [11 x i8] c"RestoreAll\00"
@.str.6 = [12 x i8] c"ExtracttLog\00"
@.str.7 = [13 x i8] c"UpdateSchema\00"
@.str.8 = [28 x i8] c"\0A%s %s Menu\0A\0ADatabase Ops:\0A\00"
@.str.9 = [1 x i8] zeroinitializer
@str = [50 x i8] c"\09Initialize|Backup|RestoreAll <mysql root passwd>\00"
@str.17 = [50 x i8] c"\09Restore <mysql root passwd> <Restore table name>\00"
@str.18 = [20 x i8] c"\0ASpecial Admin Ops:\00"
@str.19 = [95 x i8] c"\09ImportTemplateFile <tTemplate.cLabel> <filespec> <tTemplateSet.cLabel> <tTemplateType.cLabel>\00"
@str.20 = [68 x i8] c"\09ExtracttLog <Mon> <Year> <mysql root passwd> <path to mysql table>\00"
@str.21 = [14 x i8] c"\09UpdateSchema\00"
@str.22 = [32 x i8] c"Only root can run this command!\00"
define void @ExtMainShell(i32 %0, i8** %1) {
%3 = tail call i64 (...) @getuid()
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.22, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2
switch i32 %0, label %78 [
i32 6, label %9
i32 3, label %24
i32 4, label %40
i32 2, label %71
]
9: ; preds = %8
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %11, i8* dereferenceable(19) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %58
14: ; preds = %9
%15 = getelementptr inbounds i8*, i8** %1, i64 2
%16 = load i8*, i8** %15
%17 = getelementptr inbounds i8*, i8** %1, i64 3
%18 = load i8*, i8** %17
%19 = getelementptr inbounds i8*, i8** %1, i64 4
%20 = load i8*, i8** %19
%21 = getelementptr inbounds i8*, i8** %1, i64 5
%22 = load i8*, i8** %21
%23 = tail call i32 @ImportTemplateFile(i8* %16, i8* %18, i8* %20, i8* %22)
br label %88
24: ; preds = %8
%25 = getelementptr inbounds i8*, i8** %1, i64 1
%26 = load i8*, i8** %25
%27 = tail call i32 @strcmp(i8* dereferenceable(1) %26, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %33
29: ; preds = %24
%30 = getelementptr inbounds i8*, i8** %1, i64 2
%31 = load i8*, i8** %30
%32 = tail call i32 @Initialize(i8* %31)
br label %88
33: ; preds = %24
%34 = tail call i32 @strcmp(i8* dereferenceable(1) %26, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %51
36: ; preds = %33
%37 = getelementptr inbounds i8*, i8** %1, i64 2
%38 = load i8*, i8** %37
%39 = tail call i32 @Backup(i8* %38)
br label %88
40: ; preds = %8
%41 = getelementptr inbounds i8*, i8** %1, i64 1
%42 = load i8*, i8** %41
%43 = tail call i32 @strcmp(i8* dereferenceable(1) %42, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %78
45: ; preds = %40
%46 = getelementptr inbounds i8*, i8** %1, i64 2
%47 = load i8*, i8** %46
%48 = getelementptr inbounds i8*, i8** %1, i64 3
%49 = load i8*, i8** %48
%50 = tail call i32 @Restore(i8* %47, i8* %49)
br label %88
51: ; preds = %33
%52 = tail call i32 @strcmp(i8* dereferenceable(1) %26, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %78
54: ; preds = %51
%55 = getelementptr inbounds i8*, i8** %1, i64 2
%56 = load i8*, i8** %55
%57 = tail call i32 @RestoreAll(i8* %56)
br label %88
58: ; preds = %9
%59 = tail call i32 @strcmp(i8* dereferenceable(1) %11, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %78
61: ; preds = %58
%62 = getelementptr inbounds i8*, i8** %1, i64 2
%63 = load i8*, i8** %62
%64 = getelementptr inbounds i8*, i8** %1, i64 3
%65 = load i8*, i8** %64
%66 = getelementptr inbounds i8*, i8** %1, i64 4
%67 = load i8*, i8** %66
%68 = getelementptr inbounds i8*, i8** %1, i64 5
%69 = load i8*, i8** %68
%70 = tail call i32 @ExtracttLog(i8* %63, i8* %65, i8* %67, i8* %69)
br label %88
71: ; preds = %8
%72 = getelementptr inbounds i8*, i8** %1, i64 1
%73 = load i8*, i8** %72
%74 = tail call i32 @strcmp(i8* dereferenceable(1) %73, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%75 = icmp eq i32 %74, 0
br i1 %75, label %76, label %78
76: ; preds = %71
%77 = tail call i32 (...) @UpdateSchema()
br label %88
78: ; preds = %8, %58, %51, %40, %71
%79 = load i8*, i8** %1
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i8* %79, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
%81 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%82 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.17, i64 0, i64 0))
%83 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.18, i64 0, i64 0))
%84 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.19, i64 0, i64 0))
%85 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.20, i64 0, i64 0))
%86 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.21, i64 0, i64 0))
%87 = tail call i32 @putchar(i32 10)
br label %88
88: ; preds = %29, %45, %61, %78, %76, %54, %36, %14
%89 = tail call i32 @exit(i32 0)
unreachable
}