#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*/ client(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ server(int, char *);
scalar_t__ strcmp(char *, char *);
int main(int a, char *b[]) {
  if (a < 2) {
    printf("                                ______________\n"
           "                                            / \n"
           "                                           /  \n"
           "                                          /   \n"
           "                                         /    \n"
           "                                        /     \n"
           "                                       /      \n"
           "                                      /       \n"
           "                                     /        \n"
           "                                    /         \n"
           "                                   /          \n"
           "                                  /           \n"
           "                                 /            \n"
           "                                /             \n"
           "                                ______________\n");
    printf("Usage: $EXEC opt\n");
  } else {
    printf("				______________\n"
           "                                            / \n"
           "                                           /  \n"
           "                                          /   \n"
           "                                         /    \n"
           "                                        /     \n"
           "                                       /      \n"
           "                                      /       \n"
           "                                     /        \n"
           "                                    /         \n"
           "                                   /          \n"
           "                                  /           \n"
           "                                 /            \n"
           "                                /             \n"
           "				______________\n");
    if (strcmp(b[1], "--server") == 0) {
      if (a > 2) {
        server(a, b[2]);
      } else {
        server(a, NULL);
      }
    } else if (strcmp(b[1], "--client") == 0) {
      client(b[2]);
    } else if (strcmp(b[1], "--help") == 0) {
      printf("Usage:			./zod --{server,client, or help}\n");
    } else {
      printf("Syntax error\n");
    }
  }
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    117d <main+0x3d>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
lea    0x114f(%rip),%rdi
call   1030 <printf@plt>
jmp    1251 <main+0x111>
lea    0x1150(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0x13c6(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11d7 <main+0x97>
cmpl   $0x2,-0x8(%rbp)
jle    11c6 <main+0x86>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1050 <server@plt>
jmp    11d2 <main+0x92>
mov    -0x8(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <server@plt>
jmp    124c <main+0x10c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0x1381(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1207 <main+0xc7>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <client@plt>
jmp    1247 <main+0x107>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0x135a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1236 <main+0xf6>
lea    0x134b(%rip),%rdi
call   1030 <printf@plt>
jmp    1242 <main+0x102>
lea    0x1365(%rip),%rdi
call   1030 <printf@plt>
jmp    1247 <main+0x107>
jmp    124c <main+0x10c>
jmp    1251 <main+0x111>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x1,%edi
jg     1160 <main+0x20>
lea    0x118a(%rip),%rdi
call   1030 <puts@plt>
lea    0x143f(%rip),%rdi
jmp    11eb <main+0xab>
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rbx),%rdi
lea    0xe84(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11b9 <main+0x79>
mov    0x8(%rbx),%rdi
lea    0xe78(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11cb <main+0x8b>
mov    0x8(%rbx),%rdi
lea    0xe6c(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11e4 <main+0xa4>
lea    0x10eb(%rip),%rdi
jmp    11eb <main+0xab>
cmp    $0x3,%ebp
jb     11d6 <main+0x96>
mov    0x10(%rbx),%rsi
mov    %ebp,%edi
call   1050 <server@plt>
jmp    11f0 <main+0xb0>
mov    0x10(%rbx),%rdi
call   1060 <client@plt>
jmp    11f0 <main+0xb0>
mov    $0x2,%edi
xor    %esi,%esi
call   1050 <server@plt>
jmp    11f0 <main+0xb0>
lea    0x10c4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [706 x i8] c" ______________\0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A ______________\0A\00"
@.str.1 = [18 x i8] c"Usage: $EXEC opt\0A\00"
@.str.2 = [650 x i8] c"\09\09\09\09______________\0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A\09\09\09\09______________\0A\00"
@.str.3 = [9 x i8] c"--server\00"
@.str.4 = [9 x i8] c"--client\00"
@.str.5 = [7 x i8] c"--help\00"
@.str.6 = [43 x i8] c"Usage:\09\09\09./zod --{server,client, or help}\0A\00"
@.str.7 = [14 x i8] c"Syntax error\0A\00"
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 = icmp slt i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([706 x i8], [706 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %55
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([650 x i8], [650 x i8]* @.str.2, i64 0, i64 0))
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %31
18: ; preds = %11
%19 = load i32, i32* %4
%20 = icmp sgt i32 %19, 2
br i1 %20, label %21, label %27
21: ; preds = %18
%22 = load i32, i32* %4
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 2
%25 = load i8*, i8** %24
%26 = call i32 @server(i32 %22, i8* %25)
br label %30
27: ; preds = %18
%28 = load i32, i32* %4
%29 = call i32 @server(i32 %28, i8* null)
br label %30
30: ; preds = %27, %21
br label %54
31: ; preds = %11
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = call i64 @strcmp(i8* %34, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %42
37: ; preds = %31
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = call i32 @client(i8* %40)
br label %53
42: ; preds = %31
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
%46 = call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %42
%49 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
br label %52
50: ; preds = %42
%51 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
br label %52
52: ; preds = %50, %48
br label %53
53: ; preds = %52, %37
br label %54
54: ; preds = %53, %30
br label %55
55: ; preds = %54, %8
%56 = load i32, i32* %3
ret i32 %56
}

LLVM IR (-O2):
@.str.3 = [9 x i8] c"--server\00"
@.str.4 = [9 x i8] c"--client\00"
@.str.5 = [7 x i8] c"--help\00"
@str = [649 x i8] c"\09\09\09\09______________\0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A\09\09\09\09______________\00"
@str.8 = [13 x i8] c"Syntax error\00"
@str.9 = [42 x i8] c"Usage:\09\09\09./zod --{server,client, or help}\00"
@str.10 = [705 x i8] c" ______________\0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A / \0A ______________\00"
@str.11 = [17 x i8] c"Usage: $EXEC opt\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([705 x i8], [705 x i8]* @str.10, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.11, i64 0, i64 0))
br label %37
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([649 x i8], [649 x i8]* @str, i64 0, i64 0))
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %7
%14 = icmp ugt i32 %0, 2
br i1 %14, label %15, label %19
15: ; preds = %13
%16 = getelementptr inbounds i8*, i8** %1, i64 2
%17 = load i8*, i8** %16
%18 = tail call i32 @server(i32 %0, i8* %17)
br label %37
19: ; preds = %13
%20 = tail call i32 @server(i32 2, i8* null)
br label %37
21: ; preds = %7
%22 = load i8*, i8** %9
%23 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = getelementptr inbounds i8*, i8** %1, i64 2
%27 = load i8*, i8** %26
%28 = tail call i32 @client(i8* %27)
br label %37
29: ; preds = %21
%30 = load i8*, i8** %9
%31 = tail call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.9, i64 0, i64 0))
br label %37
35: ; preds = %29
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.8, i64 0, i64 0))
br label %37
37: ; preds = %19, %15, %33, %35, %25, %4
ret i32 0
}