#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*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int getopt(int, char **, char *);
scalar_t__ opterr;
size_t optind;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strlen(char *);
int OptHandler(int argc, char *argv[], char **FileName) {
  int opt = 0;
  opterr = 0;
  int WorkMode = 0;
  while ((opt = getopt(argc, argv, "i::rth")) != -1) {
    switch (opt) {
    case 'h': {
      printf(
          "\n\n********** ReceiveTransmitterTerminal v1 help: ************\n");
      printf("*                                                         *\n");
      printf("* rtterm [-r|-t] [-i /filepath]                           *\n");
      printf("*                                                         *\n");
      printf("* -r ---> Receive mode (to stdout)                        *\n");
      printf("*                                                         *\n");
      printf("* -t ---> Transmitter mode                                *\n");
      printf("*                                                         *\n");
      printf("* -i ---> Transmitted content (file PATH)                 *\n");
      printf("*                                                         *\n");
      printf("\033[94m*********************************************************"
             "**\n");
      printf("*                                                         *\n");
      printf("* Required program for working: none                      *\n");
      printf("*                                                         *\n");
      printf("***********************************************************\n");
      printf("\033[91m*                                                        "
             " *\n");
      printf("* Program is written on C by EdOS at 27.09.2015           *\n");
      printf("*                                                         *\n");
      printf("***********************************************************\033["
             "0m\n\n");
      exit(EXIT_SUCCESS);
      break;
    }
    case 'r': {
      if (WorkMode == 0)
        WorkMode = 1;
      else {
        fprintf(stderr, "Please, select one working mode.\n");
        return -1;
      }
      break;
    }
    case 't': {
      if (WorkMode == 0)
        WorkMode = 2;
      else {
        fprintf(stderr, "Please, select one working mode.\n");
        return -1;
      }
      break;
    }
    case 'i': {
      if (argv[optind] == NULL || strlen(argv[optind]) == 0 ||
          argv[optind][0] == '-') {
        fprintf(stderr, "Missing filepath after '-i'.\n");
        return -1;
      } else
        *FileName = argv[optind];
      break;
    }
    default: {
      fprintf(stderr, "Unrecognized command line option.\n");
      return -1;
    }
    }
  }
  if (WorkMode == 0) {
    fprintf(stderr, "Don't set a work mode. Use help for info.\n");
    return -1;
  }
  if (WorkMode == 2 && *FileName == NULL) {
    fprintf(stderr, "Mode transmitter, but no input file.\n");
    return -1;
  }
  if (WorkMode == 1 && *FileName != NULL) {
    fprintf(stderr, "In receiver mode path on file miss.\n");
  }
  return WorkMode;
}


x86 assembly (clang, -O0):
<OptHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    0x2e5f(%rip),%rax
movq   $0x0,(%rax)
movl   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xea7(%rip),%rdx
call   1060 <getopt@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
je     13ed <OptHandler+0x29d>
mov    -0x1c(%rbp),%eax
add    $0xffffff98,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0xc,%eax
ja     13c7 <OptHandler+0x277>
mov    -0x28(%rbp),%rax
lea    0xe42(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe6d(%rip),%rdi
call   1040 <printf@plt>
lea    0x1018(%rip),%rdi
call   1040 <printf@plt>
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
lea    0x1000(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
lea    0xfe8(%rip),%rdi
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
call   1040 <printf@plt>
lea    0xfd0(%rip),%rdi
call   1040 <printf@plt>
lea    0xf03(%rip),%rdi
call   1040 <printf@plt>
lea    0xfb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xf28(%rip),%rdi
call   1040 <printf@plt>
lea    0xfa0(%rip),%rdi
call   1040 <printf@plt>
lea    0xf52(%rip),%rdi
call   1040 <printf@plt>
lea    0xf88(%rip),%rdi
call   1040 <printf@plt>
lea    0xefd(%rip),%rdi
call   1040 <printf@plt>
lea    0xf6b(%rip),%rdi
call   1040 <printf@plt>
lea    0xfa1(%rip),%rdi
call   1040 <printf@plt>
lea    0xf58(%rip),%rdi
call   1040 <printf@plt>
lea    0xfc6(%rip),%rdi
call   1040 <printf@plt>
mov    0x2d16(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
cmpl   $0x0,-0x20(%rbp)
jne    12cf <OptHandler+0x17f>
movl   $0x1,-0x20(%rbp)
jmp    12f0 <OptHandler+0x1a0>
mov    0x2d02(%rip),%rax
mov    (%rax),%edi
lea    0xfcf(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1484 <OptHandler+0x334>
jmp    13e8 <OptHandler+0x298>
cmpl   $0x0,-0x20(%rbp)
jne    130b <OptHandler+0x1bb>
movl   $0x2,-0x20(%rbp)
jmp    132c <OptHandler+0x1dc>
mov    0x2cc6(%rip),%rax
mov    (%rax),%edi
lea    0xf93(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1484 <OptHandler+0x334>
jmp    13e8 <OptHandler+0x298>
mov    -0x10(%rbp),%rax
mov    0x2cac(%rip),%rcx
mov    (%rcx),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1388 <OptHandler+0x238>
mov    -0x10(%rbp),%rax
mov    0x2c93(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
je     1388 <OptHandler+0x238>
mov    -0x10(%rbp),%rax
mov    0x2c73(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    13a9 <OptHandler+0x259>
mov    0x2c49(%rip),%rax
mov    (%rax),%edi
lea    0xf38(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1484 <OptHandler+0x334>
mov    -0x10(%rbp),%rax
mov    0x2c34(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rax,%rcx,8),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
jmp    13e8 <OptHandler+0x298>
mov    0x2c0a(%rip),%rax
mov    (%rax),%edi
lea    0xf17(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1484 <OptHandler+0x334>
jmp    117f <OptHandler+0x2f>
cmpl   $0x0,-0x20(%rbp)
jne    1418 <OptHandler+0x2c8>
mov    0x2bda(%rip),%rax
mov    (%rax),%edi
lea    0xf0a(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1484 <OptHandler+0x334>
cmpl   $0x2,-0x20(%rbp)
jne    1451 <OptHandler+0x301>
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1451 <OptHandler+0x301>
mov    0x2ba1(%rip),%rax
mov    (%rax),%edi
lea    0xefc(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1484 <OptHandler+0x334>
cmpl   $0x1,-0x20(%rbp)
jne    147e <OptHandler+0x32e>
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     147e <OptHandler+0x32e>
mov    0x2b68(%rip),%rax
mov    (%rax),%edi
lea    0xee9(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OptHandler>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rsi,%rbp
mov    %edi,%ebx
mov    0x2e66(%rip),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
lea    0xe86(%rip),%r13
mov    0x2e67(%rip),%r14
mov    $0xffffffff,%r15d
mov    %eax,0x4(%rsp)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r13,%rdx
call   1060 <getopt@plt>
cmp    $0x69,%eax
jne    11d0 <OptHandler+0x80>
mov    (%r14),%rax
mov    0x0(%rbp,%rax,8),%rdi
test   %rdi,%rdi
je     1206 <OptHandler+0xb6>
call   1040 <strlen@plt>
test   %eax,%eax
je     1206 <OptHandler+0xb6>
mov    (%r14),%rax
mov    0x0(%rbp,%rax,8),%rax
cmpb   $0x2d,(%rax)
je     1206 <OptHandler+0xb6>
mov    %rax,(%r12)
jmp    1190 <OptHandler+0x40>
nopl   0x0(%rax,%rax,1)
cmp    $0x71,%eax
jle    122d <OptHandler+0xdd>
cmp    $0x72,%eax
je     11f1 <OptHandler+0xa1>
cmp    $0x74,%eax
jne    1346 <OptHandler+0x1f6>
cmpl   $0x0,0x4(%rsp)
mov    $0x2,%eax
je     1187 <OptHandler+0x37>
jmp    11fd <OptHandler+0xad>
cmpl   $0x0,0x4(%rsp)
mov    $0x1,%eax
je     1187 <OptHandler+0x37>
lea    0xe03(%rip),%rsi
jmp    120d <OptHandler+0xbd>
lea    0xe1c(%rip),%rsi
mov    0x2dc4(%rip),%rax
mov    (%rax),%edi
call   1050 <fprintf@plt>
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0xffffffff,%eax
jne    1261 <OptHandler+0x111>
mov    0x4(%rsp),%eax
test   %eax,%eax
je     1352 <OptHandler+0x202>
cmp    $0x1,%eax
je     135e <OptHandler+0x20e>
cmp    $0x2,%eax
jne    121e <OptHandler+0xce>
mov    $0x2,%eax
cmpq   $0x0,(%r12)
jne    121e <OptHandler+0xce>
lea    0xe36(%rip),%rsi
jmp    120d <OptHandler+0xbd>
cmp    $0x68,%eax
lea    0xddc(%rip),%rsi
jne    120d <OptHandler+0xbd>
lea    0xe6c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1010(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xe8f(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf07(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf5c(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf78(%rip),%rdi
call   1030 <puts@plt>
lea    0xfad(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xfd5(%rip),%rdi
call   1030 <puts@plt>
mov    0x2c89(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
lea    0xcfa(%rip),%rsi
jmp    120d <OptHandler+0xbd>
lea    0xd11(%rip),%rsi
jmp    120d <OptHandler+0xbd>
mov    $0x1,%r15d
cmpq   $0x0,(%r12)
je     1377 <OptHandler+0x227>
lea    0xd49(%rip),%rsi
jmp    120d <OptHandler+0xbd>
mov    $0x1,%eax
jmp    121e <OptHandler+0xce>

LLVM IR (-O0):
@opterr = global i64 0
@.str = [7 x i8] c"i::rth\00"
@.str.1 = [63 x i8] c"\0A\0A********** ReceiveTransmitterTerminal v1 help: ************\0A\00"
@.str.2 = [61 x i8] c"* *\0A\00"
@.str.3 = [61 x i8] c"* rtterm [-r|-t] [-i /filepath] *\0A\00"
@.str.4 = [61 x i8] c"* -r ---> Receive mode (to stdout) *\0A\00"
@.str.5 = [61 x i8] c"* -t ---> Transmitter mode *\0A\00"
@.str.6 = [61 x i8] c"* -i ---> Transmitted content (file PATH) *\0A\00"
@.str.7 = [66 x i8] c"\1B[94m***********************************************************\0A\00"
@.str.8 = [61 x i8] c"* Required program for working: none *\0A\00"
@.str.9 = [61 x i8] c"***********************************************************\0A\00"
@.str.10 = [66 x i8] c"\1B[91m* *\0A\00"
@.str.11 = [61 x i8] c"* Program is written on C by EdOS at 27.09.2015 *\0A\00"
@.str.12 = [66 x i8] c"***********************************************************\1B[0m\0A\0A\00"
@EXIT_SUCCESS = global i32 0
@stderr = global i32 0
@.str.13 = [34 x i8] c"Please, select one working mode.\0A\00"
@optind = global i64 0
@.str.14 = [30 x i8] c"Missing filepath after '-i'.\0A\00"
@.str.15 = [35 x i8] c"Unrecognized command line option.\0A\00"
@.str.16 = [43 x i8] c"Don't set a work mode. Use help for info.\0A\00"
@.str.17 = [38 x i8] c"Mode transmitter, but no input file.\0A\00"
@.str.18 = [37 x i8] c"In receiver mode path on file miss.\0A\00"
define i32 @OptHandler(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i32 0, i32* %8
store i64 0, i64* @opterr
store i32 0, i32* %9
br label %10
10: ; preds = %90, %3
%11 = load i32, i32* %5
%12 = load i8**, i8*** %6
%13 = call i32 @getopt(i32 %11, i8** %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %13, i32* %8
%14 = icmp ne i32 %13, -1
br i1 %14, label %15, label %91
15: ; preds = %10
%16 = load i32, i32* %8
switch i32 %16, label %87 [
i32 104, label %17
i32 114, label %39
i32 116, label %47
i32 105, label %55
]
17: ; preds = %15
%18 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.6, i64 0, i64 0))
%27 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%28 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.7, i64 0, i64 0))
%29 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%30 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.8, i64 0, i64 0))
%31 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%32 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.9, i64 0, i64 0))
%33 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
%34 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.11, i64 0, i64 0))
%35 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%36 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.12, i64 0, i64 0))
%37 = load i32, i32* @EXIT_SUCCESS
%38 = call i32 @exit(i32 %37)
unreachable
39: ; preds = %15
%40 = load i32, i32* %9
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %43
42: ; preds = %39
store i32 1, i32* %9
br label %46
43: ; preds = %39
%44 = load i32, i32* @stderr
%45 = call i32 @fprintf(i32 %44, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0))
store i32 -1, i32* %4
br label %119
46: ; preds = %42
br label %90
47: ; preds = %15
%48 = load i32, i32* %9
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %51
50: ; preds = %47
store i32 2, i32* %9
br label %54
51: ; preds = %47
%52 = load i32, i32* @stderr
%53 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0))
store i32 -1, i32* %4
br label %119
54: ; preds = %50
br label %90
55: ; preds = %15
%56 = load i8**, i8*** %6
%57 = load i64, i64* @optind
%58 = getelementptr inbounds i8*, i8** %56, i64 %57
%59 = load i8*, i8** %58
%60 = icmp eq i8* %59, null
br i1 %60, label %77, label %61
61: ; preds = %55
%62 = load i8**, i8*** %6
%63 = load i64, i64* @optind
%64 = getelementptr inbounds i8*, i8** %62, i64 %63
%65 = load i8*, i8** %64
%66 = call i32 @strlen(i8* %65)
%67 = icmp eq i32 %66, 0
br i1 %67, label %77, label %68
68: ; preds = %61
%69 = load i8**, i8*** %6
%70 = load i64, i64* @optind
%71 = getelementptr inbounds i8*, i8** %69, i64 %70
%72 = load i8*, i8** %71
%73 = getelementptr inbounds i8, i8* %72, i64 0
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 45
br i1 %76, label %77, label %80
77: ; preds = %68, %61, %55
%78 = load i32, i32* @stderr
%79 = call i32 @fprintf(i32 %78, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0))
store i32 -1, i32* %4
br label %119
80: ; preds = %68
%81 = load i8**, i8*** %6
%82 = load i64, i64* @optind
%83 = getelementptr inbounds i8*, i8** %81, i64 %82
%84 = load i8*, i8** %83
%85 = load i8**, i8*** %7
store i8* %84, i8** %85
br label %86
86: ; preds = %80
br label %90
87: ; preds = %15
%88 = load i32, i32* @stderr
%89 = call i32 @fprintf(i32 %88, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0))
store i32 -1, i32* %4
br label %119
90: ; preds = %86, %54, %46
br label %10
91: ; preds = %10
%92 = load i32, i32* %9
%93 = icmp eq i32 %92, 0
br i1 %93, label %94, label %97
94: ; preds = %91
%95 = load i32, i32* @stderr
%96 = call i32 @fprintf(i32 %95, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.16, i64 0, i64 0))
store i32 -1, i32* %4
br label %119
97: ; preds = %91
%98 = load i32, i32* %9
%99 = icmp eq i32 %98, 2
br i1 %99, label %100, label %107
100: ; preds = %97
%101 = load i8**, i8*** %7
%102 = load i8*, i8** %101
%103 = icmp eq i8* %102, null
br i1 %103, label %104, label %107
104: ; preds = %100
%105 = load i32, i32* @stderr
%106 = call i32 @fprintf(i32 %105, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.17, i64 0, i64 0))
store i32 -1, i32* %4
br label %119
107: ; preds = %100, %97
%108 = load i32, i32* %9
%109 = icmp eq i32 %108, 1
br i1 %109, label %110, label %117
110: ; preds = %107
%111 = load i8**, i8*** %7
%112 = load i8*, i8** %111
%113 = icmp ne i8* %112, null
br i1 %113, label %114, label %117
114: ; preds = %110
%115 = load i32, i32* @stderr
%116 = call i32 @fprintf(i32 %115, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0))
br label %117
117: ; preds = %114, %110, %107
%118 = load i32, i32* %9
store i32 %118, i32* %4
br label %119
119: ; preds = %117, %104, %94, %87, %77, %51, %43
%120 = load i32, i32* %4
ret i32 %120
}

LLVM IR (-O2):
@opterr = global i64 0
@.str = [7 x i8] c"i::rth\00"
@EXIT_SUCCESS = global i32 0
@stderr = global i32 0
@.str.13 = [34 x i8] c"Please, select one working mode.\0A\00"
@optind = global i64 0
@.str.14 = [30 x i8] c"Missing filepath after '-i'.\0A\00"
@.str.15 = [35 x i8] c"Unrecognized command line option.\0A\00"
@.str.16 = [43 x i8] c"Don't set a work mode. Use help for info.\0A\00"
@.str.17 = [38 x i8] c"Mode transmitter, but no input file.\0A\00"
@.str.18 = [37 x i8] c"In receiver mode path on file miss.\0A\00"
@str = [62 x i8] c"\0A\0A********** ReceiveTransmitterTerminal v1 help: ************\00"
@str.20 = [60 x i8] c"* rtterm [-r|-t] [-i /filepath] *\00"
@str.22 = [60 x i8] c"* -r ---> Receive mode (to stdout) *\00"
@str.24 = [60 x i8] c"* -t ---> Transmitter mode *\00"
@str.26 = [60 x i8] c"* -i ---> Transmitted content (file PATH) *\00"
@str.28 = [65 x i8] c"\1B[94m***********************************************************\00"
@str.30 = [60 x i8] c"* Required program for working: none *\00"
@str.32 = [60 x i8] c"***********************************************************\00"
@str.33 = [65 x i8] c"\1B[91m* *\00"
@str.34 = [60 x i8] c"* Program is written on C by EdOS at 27.09.2015 *\00"
@str.35 = [60 x i8] c"* *\00"
@str.36 = [65 x i8] c"***********************************************************\1B[0m\0A\00"
define i32 @OptHandler(i32 %0, i8** %1, i8** nocapture %2) {
store i64 0, i64* @opterr
br label %4
4: ; preds = %32, %3
%5 = phi i32 [ 0, %3 ], [ %33, %32 ]
br label %6
6: ; preds = %4, %50
%7 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
switch i32 %7, label %58 [
i32 -1, label %51
i32 104, label %8
i32 114, label %30
i32 116, label %34
i32 105, label %36
]
8: ; preds = %6
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.35, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.20, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.35, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.22, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.35, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.24, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.35, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.26, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.35, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.28, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.35, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.30, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.35, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.32, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.33, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.34, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.35, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.36, i64 0, i64 0))
%28 = load i32, i32* @EXIT_SUCCESS
%29 = tail call i32 @exit(i32 %28)
unreachable
30: ; preds = %6
%31 = icmp eq i32 %5, 0
br i1 %31, label %32, label %58
32: ; preds = %30, %34
%33 = phi i32 [ 2, %34 ], [ 1, %30 ]
br label %4
34: ; preds = %6
%35 = icmp eq i32 %5, 0
br i1 %35, label %32, label %58
36: ; preds = %6
%37 = load i64, i64* @optind
%38 = getelementptr inbounds i8*, i8** %1, i64 %37
%39 = load i8*, i8** %38
%40 = icmp eq i8* %39, null
br i1 %40, label %58, label %41
41: ; preds = %36
%42 = tail call i32 @strlen(i8* %39)
%43 = icmp eq i32 %42, 0
br i1 %43, label %58, label %44
44: ; preds = %41
%45 = load i64, i64* @optind
%46 = getelementptr inbounds i8*, i8** %1, i64 %45
%47 = load i8*, i8** %46
%48 = load i8, i8* %47
%49 = icmp eq i8 %48, 45
br i1 %49, label %58, label %50
50: ; preds = %44
store i8* %47, i8** %2
br label %6
51: ; preds = %6
switch i32 %5, label %63 [
i32 0, label %58
i32 2, label %52
i32 1, label %55
]
52: ; preds = %51
%53 = load i8*, i8** %2
%54 = icmp eq i8* %53, null
br i1 %54, label %58, label %63
55: ; preds = %51
%56 = load i8*, i8** %2
%57 = icmp eq i8* %56, null
br i1 %57, label %63, label %58
58: ; preds = %6, %36, %41, %44, %34, %30, %55, %52, %51
%59 = phi i8* [ getelementptr inbounds ([43 x i8], [43 x i8]* @.str.16, i64 0, i64 0), %51 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.17, i64 0, i64 0), %52 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0), %55 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), %6 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0), %36 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0), %41 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0), %44 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), %34 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), %30 ]
%60 = phi i32 [ -1, %51 ], [ -1, %52 ], [ 1, %55 ], [ -1, %30 ], [ -1, %34 ], [ -1, %44 ], [ -1, %41 ], [ -1, %36 ], [ -1, %6 ]
%61 = load i32, i32* @stderr
%62 = tail call i32 @fprintf(i32 %61, i8* %59)
br label %63
63: ; preds = %58, %52, %55, %51
%64 = phi i32 [ %5, %51 ], [ 1, %55 ], [ 2, %52 ], [ %60, %58 ]
ret i32 %64
}