#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(int);
int /*<<< orphan*/ printf(char *);
void Done(int Err) {
  switch (Err) {
  case 1:
    printf("EWCMD ERROR 1 (SELECT OR I/O ERROR)\n");
    break;
  case 4:
    printf("EWCMD ERROR 4 (FAILED TO CREATE SOCKET)\n");
    break;
  case 5:
    printf("EWCMD ERROR 5 (FAILED TO RESOLVE ADDRESS)\n");
    break;
  case 6:
    printf("EWCMD ERROR 6 (CONNECTION FAILED)\n");
    break;
  case 9:
    printf("EWCMD ERROR 9 (FAILED TO CREATE CONNECTION WRAPPER)\n");
    break;
  case 101:
    printf("EWCMD ERROR 101 (LOGIN FAILED)\n");
    break;
  case 102:
    printf("EWCMD ERROR 102 (ATTACH FAILED)\n");
    break;
  case 103:
    printf("EWCMD ERROR 103 (LOGIN TIMEOUT)\n");
    break;
  case 104:
    printf("EWCMD ERROR 104 (COMMAND TIMEOUT)\n");
    break;
  case 105:
    printf("EWCMD ERROR 105 (LOGIN FAILED - SESSION IN USE)\n");
    break;
  }
  exit(Err);
}


x86 assembly (clang, -O0):
<Done>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     11d8 <Done+0xb8>
jmp    113f <Done+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x4,%eax
je     11e9 <Done+0xc9>
jmp    1150 <Done+0x30>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
je     11fa <Done+0xda>
jmp    1161 <Done+0x41>
mov    -0x8(%rbp),%eax
sub    $0x6,%eax
je     120b <Done+0xeb>
jmp    1172 <Done+0x52>
mov    -0x8(%rbp),%eax
sub    $0x9,%eax
je     121c <Done+0xfc>
jmp    1183 <Done+0x63>
mov    -0x8(%rbp),%eax
sub    $0x65,%eax
je     122d <Done+0x10d>
jmp    1194 <Done+0x74>
mov    -0x8(%rbp),%eax
sub    $0x66,%eax
je     123e <Done+0x11e>
jmp    11a5 <Done+0x85>
mov    -0x8(%rbp),%eax
sub    $0x67,%eax
je     124f <Done+0x12f>
jmp    11b6 <Done+0x96>
mov    -0x8(%rbp),%eax
sub    $0x68,%eax
je     1260 <Done+0x140>
jmp    11c7 <Done+0xa7>
mov    -0x8(%rbp),%eax
sub    $0x69,%eax
je     1271 <Done+0x151>
jmp    127d <Done+0x15d>
lea    0xe21(%rip),%rdi
call   1030 <printf@plt>
jmp    127d <Done+0x15d>
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
jmp    127d <Done+0x15d>
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
jmp    127d <Done+0x15d>
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
jmp    127d <Done+0x15d>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
jmp    127d <Done+0x15d>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    127d <Done+0x15d>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    127d <Done+0x15d>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
jmp    127d <Done+0x15d>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    127d <Done+0x15d>
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Done>:
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%eax
cmp    $0x8,%eax
jbe    114c <Done+0x2c>
lea    -0x65(%rbx),%eax
cmp    $0x4,%eax
ja     11ae <Done+0x8e>
lea    0xeea(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf80(%rip),%rdi
jmp    11a9 <Done+0x89>
lea    0x103e(%rip),%rdi
lea    0xea6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfff(%rip),%rdi
jmp    11a9 <Done+0x89>
lea    0xfcc(%rip),%rdi
jmp    11a9 <Done+0x89>
lea    0xfa1(%rip),%rdi
jmp    11a9 <Done+0x89>
lea    0xf64(%rip),%rdi
jmp    11a9 <Done+0x89>
lea    0xf1c(%rip),%rdi
jmp    11a9 <Done+0x89>
lea    0xef3(%rip),%rdi
jmp    11a9 <Done+0x89>
lea    0xec8(%rip),%rdi
jmp    11a9 <Done+0x89>
lea    0xe8f(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"EWCMD ERROR 1 (SELECT OR I/O ERROR)\0A\00"
@.str.1 = [41 x i8] c"EWCMD ERROR 4 (FAILED TO CREATE SOCKET)\0A\00"
@.str.2 = [43 x i8] c"EWCMD ERROR 5 (FAILED TO RESOLVE ADDRESS)\0A\00"
@.str.3 = [35 x i8] c"EWCMD ERROR 6 (CONNECTION FAILED)\0A\00"
@.str.4 = [53 x i8] c"EWCMD ERROR 9 (FAILED TO CREATE CONNECTION WRAPPER)\0A\00"
@.str.5 = [32 x i8] c"EWCMD ERROR 101 (LOGIN FAILED)\0A\00"
@.str.6 = [33 x i8] c"EWCMD ERROR 102 (ATTACH FAILED)\0A\00"
@.str.7 = [33 x i8] c"EWCMD ERROR 103 (LOGIN TIMEOUT)\0A\00"
@.str.8 = [35 x i8] c"EWCMD ERROR 104 (COMMAND TIMEOUT)\0A\00"
@.str.9 = [49 x i8] c"EWCMD ERROR 105 (LOGIN FAILED - SESSION IN USE)\0A\00"
define void @Done(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %24 [
i32 1, label %4
i32 4, label %6
i32 5, label %8
i32 6, label %10
i32 9, label %12
i32 101, label %14
i32 102, label %16
i32 103, label %18
i32 104, label %20
i32 105, label %22
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %24
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
br label %24
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
br label %24
10: ; preds = %1
%11 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
br label %24
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0))
br label %24
14: ; preds = %1
%15 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
br label %24
16: ; preds = %1
%17 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
br label %24
18: ; preds = %1
%19 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %24
20: ; preds = %1
%21 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0))
br label %24
22: ; preds = %1
%23 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0))
br label %24
24: ; preds = %1, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4
%25 = load i32, i32* %2
%26 = call i32 @exit(i32 %25)
unreachable
}

LLVM IR (-O2):
@str = [48 x i8] c"EWCMD ERROR 105 (LOGIN FAILED - SESSION IN USE)\00"
@str.10 = [34 x i8] c"EWCMD ERROR 104 (COMMAND TIMEOUT)\00"
@str.11 = [32 x i8] c"EWCMD ERROR 103 (LOGIN TIMEOUT)\00"
@str.12 = [32 x i8] c"EWCMD ERROR 102 (ATTACH FAILED)\00"
@str.13 = [31 x i8] c"EWCMD ERROR 101 (LOGIN FAILED)\00"
@str.14 = [52 x i8] c"EWCMD ERROR 9 (FAILED TO CREATE CONNECTION WRAPPER)\00"
@str.15 = [34 x i8] c"EWCMD ERROR 6 (CONNECTION FAILED)\00"
@str.16 = [42 x i8] c"EWCMD ERROR 5 (FAILED TO RESOLVE ADDRESS)\00"
@str.17 = [40 x i8] c"EWCMD ERROR 4 (FAILED TO CREATE SOCKET)\00"
@str.18 = [36 x i8] c"EWCMD ERROR 1 (SELECT OR I/O ERROR)\00"
define void @Done(i32 %0) {
switch i32 %0, label %14 [
i32 1, label %11
i32 4, label %2
i32 5, label %3
i32 6, label %4
i32 9, label %5
i32 101, label %6
i32 102, label %7
i32 103, label %8
i32 104, label %9
i32 105, label %10
]
2: ; preds = %1
br label %11
3: ; preds = %1
br label %11
4: ; preds = %1
br label %11
5: ; preds = %1
br label %11
6: ; preds = %1
br label %11
7: ; preds = %1
br label %11
8: ; preds = %1
br label %11
9: ; preds = %1
br label %11
10: ; preds = %1
br label %11
11: ; preds = %1, %2, %3, %4, %5, %6, %7, %8, %9, %10
%12 = phi i8* [ getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0), %10 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @str.10, i64 0, i64 0), %9 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @str.11, i64 0, i64 0), %8 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @str.12, i64 0, i64 0), %7 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @str.13, i64 0, i64 0), %6 ], [ getelementptr inbounds ([52 x i8], [52 x i8]* @str.14, i64 0, i64 0), %5 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @str.15, i64 0, i64 0), %4 ], [ getelementptr inbounds ([42 x i8], [42 x i8]* @str.16, i64 0, i64 0), %3 ], [ getelementptr inbounds ([40 x i8], [40 x i8]* @str.17, i64 0, i64 0), %2 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @str.18, i64 0, i64 0), %1 ]
%13 = tail call i32 @puts(i8* dereferenceable(1) %12)
br label %14
14: ; preds = %11, %1
%15 = tail call i32 @exit(i32 %0)
unreachable
}