#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*/ close_file(char *);
int /*<<< orphan*/ create_file(char *);
int /*<<< orphan*/ delete_file(char *);
int /*<<< orphan*/ destroy(char *);
char getchar();
int /*<<< orphan*/ list_file();
int /*<<< orphan*/ make_format(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ mountfs(char *);
int /*<<< orphan*/ on_exit();
int /*<<< orphan*/ open_file(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pull_file(char *);
int /*<<< orphan*/ push_file(char *);
int /*<<< orphan*/ read_file(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ seek_file(char *);
int /*<<< orphan*/ show_help();
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ umountfs();
int /*<<< orphan*/ write_file(char *);
int main(int argc, const char *argv[]) {
  show_help();
  while (1) {
    char Command[30], filename[256];
    printf(">");
    scanf("%s", Command);
    memset(filename, 0, 256);
    char catch = 0, hasArg = 0, name_index = 0;
    while ((catch = getchar()) != '\n') {
      if (!hasArg) {
        if (catch != ' ') {
          hasArg = 1;
          filename[name_index++] = catch;
        }
      } else {
        filename[name_index++] = catch;
      }
    }
    if (!strcmp(Command, "exit")) {
      if (!on_exit()) {
        break;
      }
    }
    if ((!strcmp(Command, "make")) || (!strcmp(Command, "format"))) {
      make_format(filename);
    }
    if (!strcmp(Command, "destroy")) {
      destroy(filename);
    }
    if (!strcmp(Command, "mount")) {
      mountfs(filename);
    }
    if (!strcmp(Command, "umount")) {
      umountfs();
    }
    if (!strcmp(Command, "create")) {
      create_file(filename);
    }
    if (!strcmp(Command, "delete")) {
      delete_file(filename);
    }
    if (!strcmp(Command, "open")) {
      open_file(filename);
    }
    if (!strcmp(Command, "close")) {
      close_file(filename);
    }
    if (!strcmp(Command, "help")) {
      show_help();
    }
    if (!strcmp(Command, "write")) {
      write_file(filename);
    }
    if (!strcmp(Command, "read")) {
      read_file(filename);
    }
    if (!strcmp(Command, "push")) {
      push_file(filename);
    }
    if (!strcmp(Command, "pull")) {
      pull_file(filename);
    }
    if (!strcmp(Command, "list")) {
      list_file();
    }
    if (!strcmp(Command, "seek")) {
      seek_file(filename);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1100 <show_help@plt>
lea    0xd89(%rip),%rdi
call   1070 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xd7b(%rip),%rdi
call   1130 <scanf@plt>
lea    -0x130(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10b0 <memset@plt>
movb   $0x0,-0x131(%rbp)
movb   $0x0,-0x132(%rbp)
movb   $0x0,-0x133(%rbp)
mov    $0x0,%al
call   10d0 <getchar@plt>
mov    %al,-0x131(%rbp)
movsbl %al,%eax
cmp    $0xa,%eax
je     133f <main+0xef>
cmpb   $0x0,-0x132(%rbp)
jne    1318 <main+0xc8>
movsbl -0x131(%rbp),%eax
cmp    $0x20,%eax
je     1313 <main+0xc3>
movb   $0x1,-0x132(%rbp)
mov    -0x131(%rbp),%cl
mov    -0x133(%rbp),%al
mov    %al,%dl
add    $0x1,%dl
mov    %dl,-0x133(%rbp)
movsbq %al,%rax
mov    %cl,-0x130(%rbp,%rax,1)
jmp    133a <main+0xea>
mov    -0x131(%rbp),%cl
mov    -0x133(%rbp),%al
mov    %al,%dl
add    $0x1,%dl
mov    %dl,-0x133(%rbp)
movsbq %al,%rax
mov    %cl,-0x130(%rbp,%rax,1)
jmp    12b4 <main+0x64>
lea    -0x30(%rbp),%rdi
lea    0xcbb(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1372 <main+0x122>
mov    $0x0,%al
call   1080 <on_exit@plt>
cmp    $0x0,%eax
jne    136d <main+0x11d>
jmp    15ac <main+0x35c>
jmp    1372 <main+0x122>
lea    -0x30(%rbp),%rdi
lea    0xc8d(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
je     13a4 <main+0x154>
lea    -0x30(%rbp),%rdi
lea    0xc79(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    13b0 <main+0x160>
lea    -0x130(%rbp),%rdi
call   1060 <make_format@plt>
lea    -0x30(%rbp),%rdi
lea    0xc5b(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    13d5 <main+0x185>
lea    -0x130(%rbp),%rdi
call   10e0 <destroy@plt>
lea    -0x30(%rbp),%rdi
lea    0xc3f(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    13fa <main+0x1aa>
lea    -0x130(%rbp),%rdi
call   1120 <mountfs@plt>
lea    -0x30(%rbp),%rdi
lea    0xc19(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    141a <main+0x1ca>
mov    $0x0,%al
call   1110 <umountfs@plt>
lea    -0x30(%rbp),%rdi
lea    0xc00(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    143f <main+0x1ef>
lea    -0x130(%rbp),%rdi
call   1150 <create_file@plt>
lea    -0x30(%rbp),%rdi
lea    0xbe2(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1464 <main+0x214>
lea    -0x130(%rbp),%rdi
call   1040 <delete_file@plt>
lea    -0x30(%rbp),%rdi
lea    0xbc4(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1489 <main+0x239>
lea    -0x130(%rbp),%rdi
call   1050 <open_file@plt>
lea    -0x30(%rbp),%rdi
lea    0xba4(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    14ae <main+0x25e>
lea    -0x130(%rbp),%rdi
call   1030 <close_file@plt>
lea    -0x30(%rbp),%rdi
lea    0xb85(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    14ce <main+0x27e>
mov    $0x0,%al
call   1100 <show_help@plt>
lea    -0x30(%rbp),%rdi
lea    0xb6a(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    14f3 <main+0x2a3>
lea    -0x130(%rbp),%rdi
call   1090 <write_file@plt>
lea    -0x30(%rbp),%rdi
lea    0xb4b(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1518 <main+0x2c8>
lea    -0x130(%rbp),%rdi
call   10f0 <read_file@plt>
lea    -0x30(%rbp),%rdi
lea    0xb2b(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    153d <main+0x2ed>
lea    -0x130(%rbp),%rdi
call   1160 <push_file@plt>
lea    -0x30(%rbp),%rdi
lea    0xb0b(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1562 <main+0x312>
lea    -0x130(%rbp),%rdi
call   1140 <pull_file@plt>
lea    -0x30(%rbp),%rdi
lea    0xaeb(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1582 <main+0x332>
mov    $0x0,%al
call   10a0 <list_file@plt>
lea    -0x30(%rbp),%rdi
lea    0xad0(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    15a7 <main+0x357>
lea    -0x130(%rbp),%rdi
call   1170 <seek_file@plt>
jmp    1270 <main+0x20>
xor    %eax,%eax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
xor    %eax,%eax
call   10f0 <show_help@plt>
lea    0x20(%rsp),%rbx
mov    $0x6c6c7570,%r14d
mov    $0x7473696c,%r13d
mov    $0x6b656573,%ebp
xchg   %ax,%ax
mov    $0x3e,%edi
call   1040 <putchar@plt>
lea    0xd7f(%rip),%rdi
mov    %rsp,%rsi
call   1120 <scanf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10b0 <memset@plt>
xor    %eax,%eax
call   10c0 <getchar@plt>
cmp    $0xa,%al
jne    1490 <main+0x250>
mov    (%rsp),%eax
mov    $0x74697865,%ecx
xor    %ecx,%eax
movzbl 0x4(%rsp),%ecx
or     %eax,%ecx
jne    12c9 <main+0x89>
xor    %eax,%eax
call   1080 <on_exit@plt>
test   %eax,%eax
je     14cc <main+0x28c>
mov    (%rsp),%eax
mov    $0x656b616d,%ecx
xor    %ecx,%eax
movzbl 0x4(%rsp),%ecx
or     %eax,%ecx
je     12f5 <main+0xb5>
mov    (%rsp),%eax
mov    $0x6d726f66,%ecx
xor    %ecx,%eax
mov    0x3(%rsp),%ecx
mov    $0x74616d,%edx
xor    %edx,%ecx
or     %eax,%ecx
jne    12fd <main+0xbd>
mov    %rbx,%rdi
call   1070 <make_format@plt>
movabs $0x796f7274736564,%rax
cmp    %rax,(%rsp)
jne    1315 <main+0xd5>
mov    %rbx,%rdi
call   10d0 <destroy@plt>
mov    (%rsp),%eax
mov    $0x6e756f6d,%ecx
xor    %ecx,%eax
movzwl 0x4(%rsp),%ecx
xor    $0x74,%ecx
or     %eax,%ecx
jne    1333 <main+0xf3>
mov    %rbx,%rdi
call   1110 <mountfs@plt>
mov    (%rsp),%eax
mov    $0x756f6d75,%ecx
xor    %ecx,%eax
mov    0x3(%rsp),%ecx
mov    $0x746e75,%edx
xor    %edx,%ecx
or     %eax,%ecx
jne    1353 <main+0x113>
xor    %eax,%eax
call   1100 <umountfs@plt>
mov    (%rsp),%eax
mov    $0x61657263,%ecx
xor    %ecx,%eax
mov    0x3(%rsp),%ecx
mov    $0x657461,%edx
xor    %edx,%ecx
or     %eax,%ecx
jne    1374 <main+0x134>
mov    %rbx,%rdi
call   1140 <create_file@plt>
mov    (%rsp),%eax
mov    $0x656c6564,%ecx
xor    %ecx,%eax
mov    0x3(%rsp),%ecx
mov    $0x657465,%edx
xor    %edx,%ecx
or     %eax,%ecx
jne    1395 <main+0x155>
mov    %rbx,%rdi
call   1050 <delete_file@plt>
mov    (%rsp),%eax
mov    $0x6e65706f,%ecx
xor    %ecx,%eax
movzbl 0x4(%rsp),%ecx
or     %eax,%ecx
jne    13b0 <main+0x170>
mov    %rbx,%rdi
call   1060 <open_file@plt>
mov    (%rsp),%eax
mov    $0x736f6c63,%ecx
xor    %ecx,%eax
movzwl 0x4(%rsp),%ecx
xor    $0x65,%ecx
or     %eax,%ecx
jne    13ce <main+0x18e>
mov    %rbx,%rdi
call   1030 <close_file@plt>
mov    (%rsp),%eax
mov    $0x706c6568,%ecx
xor    %ecx,%eax
movzbl 0x4(%rsp),%ecx
or     %eax,%ecx
jne    13e8 <main+0x1a8>
xor    %eax,%eax
call   10f0 <show_help@plt>
mov    (%rsp),%eax
mov    $0x74697277,%ecx
xor    %ecx,%eax
movzwl 0x4(%rsp),%ecx
xor    $0x65,%ecx
or     %eax,%ecx
jne    1406 <main+0x1c6>
mov    %rbx,%rdi
call   1090 <write_file@plt>
mov    (%rsp),%eax
mov    $0x64616572,%ecx
xor    %ecx,%eax
movzbl 0x4(%rsp),%ecx
or     %eax,%ecx
jne    1421 <main+0x1e1>
mov    %rbx,%rdi
call   10e0 <read_file@plt>
mov    (%rsp),%eax
mov    $0x68737570,%ecx
xor    %ecx,%eax
movzbl 0x4(%rsp),%ecx
or     %eax,%ecx
jne    143c <main+0x1fc>
mov    %rbx,%rdi
call   1150 <push_file@plt>
mov    (%rsp),%eax
xor    %r14d,%eax
movzbl 0x4(%rsp),%ecx
or     %eax,%ecx
jne    1453 <main+0x213>
mov    %rbx,%rdi
call   1130 <pull_file@plt>
mov    (%rsp),%eax
xor    %r13d,%eax
movzbl 0x4(%rsp),%ecx
or     %eax,%ecx
jne    1469 <main+0x229>
xor    %eax,%eax
call   10a0 <list_file@plt>
mov    (%rsp),%eax
xor    %ebp,%eax
movzbl 0x4(%rsp),%ecx
or     %eax,%ecx
jne    1270 <main+0x30>
mov    %rbx,%rdi
call   1160 <seek_file@plt>
jmp    1270 <main+0x30>
nopl   0x0(%rax,%rax,1)
xor    %r15d,%r15d
xor    %r12d,%r12d
jmp    14be <main+0x27e>
nopl   0x0(%rax,%rax,1)
movsbq %r15b,%rcx
add    $0x1,%r15b
mov    %al,0x20(%rsp,%rcx,1)
mov    $0x1,%r12b
xor    %eax,%eax
call   10c0 <getchar@plt>
cmp    $0xa,%al
je     12a7 <main+0x67>
test   %r12b,%r12b
jne    14a0 <main+0x260>
cmp    $0x20,%al
jne    14a0 <main+0x260>
xor    %r12d,%r12d
jmp    14af <main+0x26f>
xor    %eax,%eax
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c">\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c"exit\00"
@.str.3 = [5 x i8] c"make\00"
@.str.4 = [7 x i8] c"format\00"
@.str.5 = [8 x i8] c"destroy\00"
@.str.6 = [6 x i8] c"mount\00"
@.str.7 = [7 x i8] c"umount\00"
@.str.8 = [7 x i8] c"create\00"
@.str.9 = [7 x i8] c"delete\00"
@.str.10 = [5 x i8] c"open\00"
@.str.11 = [6 x i8] c"close\00"
@.str.12 = [5 x i8] c"help\00"
@.str.13 = [6 x i8] c"write\00"
@.str.14 = [5 x i8] c"read\00"
@.str.15 = [5 x i8] c"push\00"
@.str.16 = [5 x i8] c"pull\00"
@.str.17 = [5 x i8] c"list\00"
@.str.18 = [5 x i8] c"seek\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [30 x i8]
%7 = alloca [256 x i8]
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32 (...) @show_help()
br label %12
12: ; preds = %2, %158
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%17 = call i32 @memset(i8* %16, i32 0, i32 256)
store i8 0, i8* %8
store i8 0, i8* %9
store i8 0, i8* %10
br label %18
18: ; preds = %42, %12
%19 = call signext i8 (...) @getchar()
store i8 %19, i8* %8
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 10
br i1 %21, label %22, label %43
22: ; preds = %18
%23 = load i8, i8* %9
%24 = icmp ne i8 %23, 0
br i1 %24, label %36, label %25
25: ; preds = %22
%26 = load i8, i8* %8
%27 = sext i8 %26 to i32
%28 = icmp ne i32 %27, 32
br i1 %28, label %29, label %35
29: ; preds = %25
store i8 1, i8* %9
%30 = load i8, i8* %8
%31 = load i8, i8* %10
%32 = add i8 %31, 1
store i8 %32, i8* %10
%33 = sext i8 %31 to i64
%34 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 %33
store i8 %30, i8* %34
br label %35
35: ; preds = %29, %25
br label %42
36: ; preds = %22
%37 = load i8, i8* %8
%38 = load i8, i8* %10
%39 = add i8 %38, 1
store i8 %39, i8* %10
%40 = sext i8 %38 to i64
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 %40
store i8 %37, i8* %41
br label %42
42: ; preds = %36, %35
br label %18
43: ; preds = %18
%44 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%45 = call i32 @strcmp(i8* %44, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%46 = icmp ne i32 %45, 0
br i1 %46, label %52, label %47
47: ; preds = %43
%48 = call i32 (...) @on_exit()
%49 = icmp ne i32 %48, 0
br i1 %49, label %51, label %50
50: ; preds = %47
br label %159
51: ; preds = %47
br label %52
52: ; preds = %51, %43
%53 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%54 = call i32 @strcmp(i8* %53, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %60
56: ; preds = %52
%57 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%58 = call i32 @strcmp(i8* %57, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%59 = icmp ne i32 %58, 0
br i1 %59, label %63, label %60
60: ; preds = %56, %52
%61 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%62 = call i32 @make_format(i8* %61)
br label %63
63: ; preds = %60, %56
%64 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%65 = call i32 @strcmp(i8* %64, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%66 = icmp ne i32 %65, 0
br i1 %66, label %70, label %67
67: ; preds = %63
%68 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%69 = call i32 @destroy(i8* %68)
br label %70
70: ; preds = %67, %63
%71 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%72 = call i32 @strcmp(i8* %71, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%73 = icmp ne i32 %72, 0
br i1 %73, label %77, label %74
74: ; preds = %70
%75 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%76 = call i32 @mountfs(i8* %75)
br label %77
77: ; preds = %74, %70
%78 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%79 = call i32 @strcmp(i8* %78, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%80 = icmp ne i32 %79, 0
br i1 %80, label %83, label %81
81: ; preds = %77
%82 = call i32 (...) @umountfs()
br label %83
83: ; preds = %81, %77
%84 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%85 = call i32 @strcmp(i8* %84, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%86 = icmp ne i32 %85, 0
br i1 %86, label %90, label %87
87: ; preds = %83
%88 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%89 = call i32 @create_file(i8* %88)
br label %90
90: ; preds = %87, %83
%91 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%92 = call i32 @strcmp(i8* %91, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%93 = icmp ne i32 %92, 0
br i1 %93, label %97, label %94
94: ; preds = %90
%95 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%96 = call i32 @delete_file(i8* %95)
br label %97
97: ; preds = %94, %90
%98 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%99 = call i32 @strcmp(i8* %98, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%100 = icmp ne i32 %99, 0
br i1 %100, label %104, label %101
101: ; preds = %97
%102 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%103 = call i32 @open_file(i8* %102)
br label %104
104: ; preds = %101, %97
%105 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%106 = call i32 @strcmp(i8* %105, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%107 = icmp ne i32 %106, 0
br i1 %107, label %111, label %108
108: ; preds = %104
%109 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%110 = call i32 @close_file(i8* %109)
br label %111
111: ; preds = %108, %104
%112 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%113 = call i32 @strcmp(i8* %112, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%114 = icmp ne i32 %113, 0
br i1 %114, label %117, label %115
115: ; preds = %111
%116 = call i32 (...) @show_help()
br label %117
117: ; preds = %115, %111
%118 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%119 = call i32 @strcmp(i8* %118, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
%120 = icmp ne i32 %119, 0
br i1 %120, label %124, label %121
121: ; preds = %117
%122 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%123 = call i32 @write_file(i8* %122)
br label %124
124: ; preds = %121, %117
%125 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%126 = call i32 @strcmp(i8* %125, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
%127 = icmp ne i32 %126, 0
br i1 %127, label %131, label %128
128: ; preds = %124
%129 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%130 = call i32 @read_file(i8* %129)
br label %131
131: ; preds = %128, %124
%132 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%133 = call i32 @strcmp(i8* %132, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%134 = icmp ne i32 %133, 0
br i1 %134, label %138, label %135
135: ; preds = %131
%136 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%137 = call i32 @push_file(i8* %136)
br label %138
138: ; preds = %135, %131
%139 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%140 = call i32 @strcmp(i8* %139, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%141 = icmp ne i32 %140, 0
br i1 %141, label %145, label %142
142: ; preds = %138
%143 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%144 = call i32 @pull_file(i8* %143)
br label %145
145: ; preds = %142, %138
%146 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%147 = call i32 @strcmp(i8* %146, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%148 = icmp ne i32 %147, 0
br i1 %148, label %151, label %149
149: ; preds = %145
%150 = call i32 (...) @list_file()
br label %151
151: ; preds = %149, %145
%152 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%153 = call i32 @strcmp(i8* %152, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%154 = icmp ne i32 %153, 0
br i1 %154, label %158, label %155
155: ; preds = %151
%156 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%157 = call i32 @seek_file(i8* %156)
br label %158
158: ; preds = %155, %151
br label %12
159: ; preds = %50
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c"exit\00"
@.str.3 = [5 x i8] c"make\00"
@.str.4 = [7 x i8] c"format\00"
@.str.6 = [6 x i8] c"mount\00"
@.str.7 = [7 x i8] c"umount\00"
@.str.8 = [7 x i8] c"create\00"
@.str.9 = [7 x i8] c"delete\00"
@.str.10 = [5 x i8] c"open\00"
@.str.11 = [6 x i8] c"close\00"
@.str.12 = [5 x i8] c"help\00"
@.str.13 = [6 x i8] c"write\00"
@.str.14 = [5 x i8] c"read\00"
@.str.15 = [5 x i8] c"push\00"
@.str.16 = [5 x i8] c"pull\00"
@.str.17 = [5 x i8] c"list\00"
@.str.18 = [5 x i8] c"seek\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [30 x i8]
%4 = alloca [256 x i8]
%5 = tail call i32 (...) @show_help()
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%8 = bitcast [30 x i8]* %3 to i64*
br label %9
9: ; preds = %115, %2
%10 = call i32 @putchar(i32 62)
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%12 = call i32 @memset(i8* %7, i32 0, i32 256)
%13 = call signext i8 (...) @getchar()
%14 = icmp eq i8 %13, 10
br i1 %14, label %31, label %15
15: ; preds = %9, %26
%16 = phi i8 [ %29, %26 ], [ %13, %9 ]
%17 = phi i8 [ %28, %26 ], [ 0, %9 ]
%18 = phi i8 [ %27, %26 ], [ 0, %9 ]
%19 = icmp eq i8 %18, 0
%20 = icmp eq i8 %16, 32
%21 = and i1 %19, %20
br i1 %21, label %26, label %22
22: ; preds = %15
%23 = add i8 %17, 1
%24 = sext i8 %17 to i64
%25 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %24
store i8 %16, i8* %25
br label %26
26: ; preds = %15, %22
%27 = phi i8 [ 1, %22 ], [ 0, %15 ]
%28 = phi i8 [ %23, %22 ], [ %17, %15 ]
%29 = call signext i8 (...) @getchar()
%30 = icmp eq i8 %29, 10
br i1 %30, label %31, label %15
31: ; preds = %26, %9
%32 = call i32 @bcmp(i8* dereferenceable(5) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 5)
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = call i32 (...) @on_exit()
%36 = icmp eq i32 %35, 0
br i1 %36, label %116, label %37
37: ; preds = %34, %31
%38 = call i32 @bcmp(i8* dereferenceable(5) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 5)
%39 = icmp eq i32 %38, 0
br i1 %39, label %43, label %40
40: ; preds = %37
%41 = call i32 @bcmp(i8* dereferenceable(7) %6, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i64 7)
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %40, %37
%44 = call i32 @make_format(i8* %7)
br label %45
45: ; preds = %43, %40
%46 = load i64, i64* %8
%47 = icmp eq i64 %46, 34181009552663908
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 @destroy(i8* %7)
br label %50
50: ; preds = %48, %45
%51 = call i32 @bcmp(i8* dereferenceable(6) %6, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i64 6)
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = call i32 @mountfs(i8* %7)
br label %55
55: ; preds = %53, %50
%56 = call i32 @bcmp(i8* dereferenceable(7) %6, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i64 7)
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = call i32 (...) @umountfs()
br label %60
60: ; preds = %58, %55
%61 = call i32 @bcmp(i8* dereferenceable(7) %6, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i64 7)
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %60
%64 = call i32 @create_file(i8* %7)
br label %65
65: ; preds = %63, %60
%66 = call i32 @bcmp(i8* dereferenceable(7) %6, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i64 7)
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 @delete_file(i8* %7)
br label %70
70: ; preds = %68, %65
%71 = call i32 @bcmp(i8* dereferenceable(5) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i64 5)
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %70
%74 = call i32 @open_file(i8* %7)
br label %75
75: ; preds = %73, %70
%76 = call i32 @bcmp(i8* dereferenceable(6) %6, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i64 6)
%77 = icmp eq i32 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %75
%79 = call i32 @close_file(i8* %7)
br label %80
80: ; preds = %78, %75
%81 = call i32 @bcmp(i8* dereferenceable(5) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i64 5)
%82 = icmp eq i32 %81, 0
br i1 %82, label %83, label %85
83: ; preds = %80
%84 = call i32 (...) @show_help()
br label %85
85: ; preds = %83, %80
%86 = call i32 @bcmp(i8* dereferenceable(6) %6, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i64 6)
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %85
%89 = call i32 @write_file(i8* %7)
br label %90
90: ; preds = %88, %85
%91 = call i32 @bcmp(i8* dereferenceable(5) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i64 5)
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %95
93: ; preds = %90
%94 = call i32 @read_file(i8* %7)
br label %95
95: ; preds = %93, %90
%96 = call i32 @bcmp(i8* dereferenceable(5) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i64 5)
%97 = icmp eq i32 %96, 0
br i1 %97, label %98, label %100
98: ; preds = %95
%99 = call i32 @push_file(i8* %7)
br label %100
100: ; preds = %98, %95
%101 = call i32 @bcmp(i8* dereferenceable(5) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i64 5)
%102 = icmp eq i32 %101, 0
br i1 %102, label %103, label %105
103: ; preds = %100
%104 = call i32 @pull_file(i8* %7)
br label %105
105: ; preds = %103, %100
%106 = call i32 @bcmp(i8* dereferenceable(5) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i64 5)
%107 = icmp eq i32 %106, 0
br i1 %107, label %108, label %110
108: ; preds = %105
%109 = call i32 (...) @list_file()
br label %110
110: ; preds = %108, %105
%111 = call i32 @bcmp(i8* dereferenceable(5) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i64 5)
%112 = icmp eq i32 %111, 0
br i1 %112, label %113, label %115
113: ; preds = %110
%114 = call i32 @seek_file(i8* %7)
br label %115
115: ; preds = %110, %113
br label %9
116: ; preds = %34
ret i32 0
}