#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*/ DisplayHelp(int);
int /*<<< orphan*/ EvalTraceOpts(char *, int);
int /*<<< orphan*/ WriteToLog(char *);
int send(int, char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
char toupper(char);
int ParseUserInput(char *cmd, int sockfd) {
  int idx;
  int bFlag = 0;
  char sCommand[100];
  char sOptions[200];
  char logText[] = "";
  sprintf(logText, "Client Sent :%s", cmd);
  WriteToLog(logText);
  WriteToLog("Parsing user input...");
  for (idx = 0; idx < strlen(cmd); idx++) {
    if (cmd[idx] == ' ') {
      sCommand[idx] = '\0';
      bFlag = 1;
      break;
    } else
      sCommand[idx] = toupper(cmd[idx]);
  }
  if (!bFlag)
    sCommand[idx] = '\0';
  int idx1, idx2 = 0;
  for (idx1 = idx + 1; idx1 < strlen(cmd); idx1++)
    sOptions[idx2++] = cmd[idx1];
  sOptions[idx2] = '\0';
  if (strcmp(sCommand, "HELP") == 0) {
    WriteToLog("Sending HELP Information");
    DisplayHelp(sockfd);
  } else if (strcmp(sCommand, "QUIT") == 0) {
    WriteToLog("Attempting to release connection");
    char message[] = "Goodbye!\n";
    if (send(sockfd, message, strlen(message), 0) != -1) {
    }
    return 1;
  } else if (strcmp(sCommand, "TRACEROUTE") == 0) {
    WriteToLog("Checking for Traceroute options...");
    EvalTraceOpts(sOptions, sockfd);
  } else {
    WriteToLog("Unknown command : Displaying HELP");
    char message[] = "Unknown Command\nUse 'HELP' to get assistance\n";
    if (send(sockfd, message, strlen(message), 0) != -1) {
    }
  }
  WriteToLog("Parse/Processing complete...");
  return 0;
}


x86 assembly (clang, -O0):
<ParseUserInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    -0x151(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1080 <memset@plt>
lea    -0x151(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe22(%rip),%rsi
call   10c0 <sprintf@plt>
lea    -0x151(%rbp),%rdi
call   1070 <WriteToLog@plt>
lea    0xe1a(%rip),%rdi
call   1070 <WriteToLog@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1a4(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x1a4(%rbp),%eax
cmp    %ecx,%eax
jge    127c <ParseUserInput+0xdc>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    124e <ParseUserInput+0xae>
movslq -0x18(%rbp),%rax
movb   $0x0,-0x80(%rbp,%rax,1)
movl   $0x1,-0x1c(%rbp)
jmp    127c <ParseUserInput+0xdc>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%cl
movslq -0x18(%rbp),%rax
mov    %cl,-0x80(%rbp,%rax,1)
jmp    126e <ParseUserInput+0xce>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1202 <ParseUserInput+0x62>
cmpl   $0x0,-0x1c(%rbp)
jne    128f <ParseUserInput+0xef>
movslq -0x18(%rbp),%rax
movb   $0x0,-0x80(%rbp,%rax,1)
movl   $0x0,-0x15c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x158(%rbp)
mov    -0x158(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x1a8(%rbp),%eax
cmp    %ecx,%eax
jge    1306 <ParseUserInput+0x166>
mov    -0x10(%rbp),%rax
movslq -0x158(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x15c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x15c(%rbp)
cltq
mov    %cl,-0x150(%rbp,%rax,1)
mov    -0x158(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x158(%rbp)
jmp    12a5 <ParseUserInput+0x105>
movslq -0x15c(%rbp),%rax
movb   $0x0,-0x150(%rbp,%rax,1)
lea    -0x80(%rbp),%rdi
lea    0xd9a(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1348 <ParseUserInput+0x1a8>
lea    0xcf0(%rip),%rdi
call   1070 <WriteToLog@plt>
mov    -0x14(%rbp),%edi
call   10b0 <DisplayHelp@plt>
jmp    1491 <ParseUserInput+0x2f1>
lea    -0x80(%rbp),%rdi
lea    0xcec(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13dd <ParseUserInput+0x23d>
lea    0xcdb(%rip),%rdi
call   1070 <WriteToLog@plt>
mov    0xcf0(%rip),%rax
mov    %rax,-0x166(%rbp)
mov    0xcea(%rip),%ax
mov    %ax,-0x15e(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1b4(%rbp)
lea    -0x166(%rbp),%rax
mov    %rax,-0x1b0(%rbp)
lea    -0x166(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x1b4(%rbp),%edi
mov    -0x1b0(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
cmp    $0xffffffff,%eax
je     13d1 <ParseUserInput+0x231>
jmp    13d1 <ParseUserInput+0x231>
movl   $0x1,-0x4(%rbp)
jmp    14a4 <ParseUserInput+0x304>
lea    -0x80(%rbp),%rdi
lea    0xc87(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1417 <ParseUserInput+0x277>
lea    0xc7c(%rip),%rdi
call   1070 <WriteToLog@plt>
lea    -0x150(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <EvalTraceOpts@plt>
jmp    1487 <ParseUserInput+0x2e7>
lea    0xc7f(%rip),%rdi
call   1070 <WriteToLog@plt>
lea    -0x1a0(%rbp),%rdi
lea    0xcaf(%rip),%rsi
mov    $0x2e,%edx
call   10a0 <memcpy@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c4(%rbp)
lea    -0x1a0(%rbp),%rax
mov    %rax,-0x1c0(%rbp)
lea    -0x1a0(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x1c4(%rbp),%edi
mov    -0x1c0(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
cmp    $0xffffffff,%eax
je     1482 <ParseUserInput+0x2e2>
jmp    1482 <ParseUserInput+0x2e2>
jmp    1487 <ParseUserInput+0x2e7>
jmp    148c <ParseUserInput+0x2ec>
jmp    1491 <ParseUserInput+0x2f1>
lea    0xc27(%rip),%rdi
call   1070 <WriteToLog@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ParseUserInput>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    %esi,%r14d
mov    %rdi,%r12
movb   $0x0,0xf(%rsp)
lea    0xe5d(%rip),%rsi
lea    0xf(%rsp),%rbp
mov    %rbp,%rdi
mov    %r12,%rdx
call   10a0 <sprintf@plt>
mov    %rbp,%rdi
call   1070 <WriteToLog@plt>
lea    0xe4e(%rip),%rdi
call   1070 <WriteToLog@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
test   %eax,%eax
jle    120d <ParseUserInput+0x8d>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%r12,%rbp,1),%eax
cmp    $0x20,%al
je     1215 <ParseUserInput+0x95>
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,0x40(%rsp,%rbp,1)
add    $0x1,%rbp
mov    %r12,%rdi
call   1050 <strlen@plt>
cltq
cmp    %rax,%rbp
jl     11e0 <ParseUserInput+0x60>
mov    %ebp,%r15d
jmp    1210 <ParseUserInput+0x90>
xor    %r15d,%r15d
mov    %r15d,%ebp
jmp    1218 <ParseUserInput+0x98>
mov    %ebp,%r15d
movb   $0x0,0x40(%rsp,%rbp,1)
lea    0x1(%r15),%r13d
mov    %r12,%rdi
call   1050 <strlen@plt>
cmp    %eax,%r13d
jge    1264 <ParseUserInput+0xe4>
mov    %r15d,%eax
lea    (%rax,%r12,1),%rbp
add    $0x1,%rbp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movzbl 0x0(%rbp,%rbx,1),%eax
mov    %al,0xb0(%rsp,%rbx,1)
add    $0x1,%rbx
mov    %r12,%rdi
call   1050 <strlen@plt>
lea    (%rbx,%r13,1),%ecx
cmp    %ecx,%eax
jg     1240 <ParseUserInput+0xc0>
mov    %ebx,%eax
jmp    1266 <ParseUserInput+0xe6>
xor    %eax,%eax
movb   $0x0,0xb0(%rsp,%rax,1)
lea    0xe45(%rip),%rsi
lea    0x40(%rsp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1302 <ParseUserInput+0x182>
lea    0xdb4(%rip),%rsi
lea    0x40(%rsp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1318 <ParseUserInput+0x198>
lea    0xdce(%rip),%rsi
lea    0x40(%rsp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     135d <ParseUserInput+0x1dd>
lea    0xde2(%rip),%rdi
call   1070 <WriteToLog@plt>
movups 0xe37(%rip),%xmm0
movups %xmm0,0x2e(%rsp)
movaps 0xe1d(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe01(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
jmp    1379 <ParseUserInput+0x1f9>
lea    0xd1d(%rip),%rdi
call   1070 <WriteToLog@plt>
mov    %r14d,%edi
call   1090 <DisplayHelp@plt>
jmp    1379 <ParseUserInput+0x1f9>
lea    0xd25(%rip),%rdi
call   1070 <WriteToLog@plt>
movabs $0x21657962646f6f47,%rax
79 65 21
mov    %rax,0x10(%rsp)
movw   $0xa,0x18(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
mov    $0x1,%eax
jmp    1387 <ParseUserInput+0x207>
lea    0xd16(%rip),%rdi
call   1070 <WriteToLog@plt>
lea    0xb0(%rsp),%rdi
mov    %r14d,%esi
call   1040 <EvalTraceOpts@plt>
lea    0xd3f(%rip),%rdi
call   1070 <WriteToLog@plt>
xor    %eax,%eax
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Client Sent :%s\00"
@.str.1 = [22 x i8] c"Parsing user input...\00"
@.str.2 = [5 x i8] c"HELP\00"
@.str.3 = [25 x i8] c"Sending HELP Information\00"
@.str.4 = [5 x i8] c"QUIT\00"
@.str.5 = [33 x i8] c"Attempting to release connection\00"
@__const.ParseUserInput.message = [10 x i8] c"Goodbye!\0A\00"
@.str.6 = [11 x i8] c"TRACEROUTE\00"
@.str.7 = [35 x i8] c"Checking for Traceroute options...\00"
@.str.8 = [34 x i8] c"Unknown command : Displaying HELP\00"
@__const.ParseUserInput.message.9 = [46 x i8] c"Unknown Command\0AUse 'HELP' to get assistance\0A\00"
@.str.10 = [29 x i8] c"Parse/Processing complete...\00"
define i32 @ParseUserInput(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [100 x i8]
%9 = alloca [200 x i8]
%10 = alloca [1 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca [10 x i8]
%14 = alloca [46 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 0, i32* %7
%15 = bitcast [1 x i8]* %10 to i8*
%16 = getelementptr inbounds [1 x i8], [1 x i8]* %10, i64 0, i64 0
%17 = load i8*, i8** %4
%18 = call i32 @sprintf(i8* %16, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [1 x i8], [1 x i8]* %10, i64 0, i64 0
%20 = call i32 @WriteToLog(i8* %19)
%21 = call i32 @WriteToLog(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %6
br label %22
22: ; preds = %50, %2
%23 = load i32, i32* %6
%24 = load i8*, i8** %4
%25 = call i32 @strlen(i8* %24)
%26 = icmp slt i32 %23, %25
br i1 %26, label %27, label %53
27: ; preds = %22
%28 = load i8*, i8** %4
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %28, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 32
br i1 %34, label %35, label %39
35: ; preds = %27
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 %37
store i8 0, i8* %38
store i32 1, i32* %7
br label %53
39: ; preds = %27
%40 = load i8*, i8** %4
%41 = load i32, i32* %6
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8, i8* %40, i64 %42
%44 = load i8, i8* %43
%45 = call signext i8 @toupper(i8 signext %44)
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 %47
store i8 %45, i8* %48
br label %49
49: ; preds = %39
br label %50
50: ; preds = %49
%51 = load i32, i32* %6
%52 = add nsw i32 %51, 1
store i32 %52, i32* %6
br label %22
53: ; preds = %35, %22
%54 = load i32, i32* %7
%55 = icmp ne i32 %54, 0
br i1 %55, label %60, label %56
56: ; preds = %53
%57 = load i32, i32* %6
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 %58
store i8 0, i8* %59
br label %60
60: ; preds = %56, %53
store i32 0, i32* %12
%61 = load i32, i32* %6
%62 = add nsw i32 %61, 1
store i32 %62, i32* %11
br label %63
63: ; preds = %78, %60
%64 = load i32, i32* %11
%65 = load i8*, i8** %4
%66 = call i32 @strlen(i8* %65)
%67 = icmp slt i32 %64, %66
br i1 %67, label %68, label %81
68: ; preds = %63
%69 = load i8*, i8** %4
%70 = load i32, i32* %11
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i8, i8* %69, i64 %71
%73 = load i8, i8* %72
%74 = load i32, i32* %12
%75 = add nsw i32 %74, 1
store i32 %75, i32* %12
%76 = sext i32 %74 to i64
%77 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 %76
store i8 %73, i8* %77
br label %78
78: ; preds = %68
%79 = load i32, i32* %11
%80 = add nsw i32 %79, 1
store i32 %80, i32* %11
br label %63
81: ; preds = %63
%82 = load i32, i32* %12
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 %83
store i8 0, i8* %84
%85 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%86 = call i64 @strcmp(i8* %85, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %92
88: ; preds = %81
%89 = call i32 @WriteToLog(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%90 = load i32, i32* %5
%91 = call i32 @DisplayHelp(i32 %90)
br label %129
92: ; preds = %81
%93 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%94 = call i64 @strcmp(i8* %93, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%95 = icmp eq i64 %94, 0
br i1 %95, label %96, label %107
96: ; preds = %92
%97 = call i32 @WriteToLog(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%98 = bitcast [10 x i8]* %13 to i8*
%99 = load i32, i32* %5
%100 = getelementptr inbounds [10 x i8], [10 x i8]* %13, i64 0, i64 0
%101 = getelementptr inbounds [10 x i8], [10 x i8]* %13, i64 0, i64 0
%102 = call i32 @strlen(i8* %101)
%103 = call i32 @send(i32 %99, i8* %100, i32 %102, i32 0)
%104 = icmp ne i32 %103, -1
br i1 %104, label %105, label %106
105: ; preds = %96
br label %106
106: ; preds = %105, %96
store i32 1, i32* %3
br label %131
107: ; preds = %92
%108 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%109 = call i64 @strcmp(i8* %108, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%110 = icmp eq i64 %109, 0
br i1 %110, label %111, label %116
111: ; preds = %107
%112 = call i32 @WriteToLog(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%113 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%114 = load i32, i32* %5
%115 = call i32 @EvalTraceOpts(i8* %113, i32 %114)
br label %127
116: ; preds = %107
%117 = call i32 @WriteToLog(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
%118 = bitcast [46 x i8]* %14 to i8*
%119 = load i32, i32* %5
%120 = getelementptr inbounds [46 x i8], [46 x i8]* %14, i64 0, i64 0
%121 = getelementptr inbounds [46 x i8], [46 x i8]* %14, i64 0, i64 0
%122 = call i32 @strlen(i8* %121)
%123 = call i32 @send(i32 %119, i8* %120, i32 %122, i32 0)
%124 = icmp ne i32 %123, -1
br i1 %124, label %125, label %126
125: ; preds = %116
br label %126
126: ; preds = %125, %116
br label %127
127: ; preds = %126, %111
br label %128
128: ; preds = %127
br label %129
129: ; preds = %128, %88
%130 = call i32 @WriteToLog(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %3
br label %131
131: ; preds = %129, %106
%132 = load i32, i32* %3
ret i32 %132
}

LLVM IR (-O2):
@.str = [16 x i8] c"Client Sent :%s\00"
@.str.1 = [22 x i8] c"Parsing user input...\00"
@.str.2 = [5 x i8] c"HELP\00"
@.str.3 = [25 x i8] c"Sending HELP Information\00"
@.str.4 = [5 x i8] c"QUIT\00"
@.str.5 = [33 x i8] c"Attempting to release connection\00"
@__const.ParseUserInput.message = [10 x i8] c"Goodbye!\0A\00"
@.str.6 = [11 x i8] c"TRACEROUTE\00"
@.str.7 = [35 x i8] c"Checking for Traceroute options...\00"
@.str.8 = [34 x i8] c"Unknown command : Displaying HELP\00"
@__const.ParseUserInput.message.9 = [46 x i8] c"Unknown Command\0AUse 'HELP' to get assistance\0A\00"
@.str.10 = [29 x i8] c"Parse/Processing complete...\00"
define i32 @ParseUserInput(i8* %0, i32 %1) {
%3 = alloca [100 x i8]
%4 = alloca [200 x i8]
%5 = alloca [1 x i8]
%6 = alloca [10 x i8]
%7 = alloca [46 x i8]
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 0, i8* %10
%11 = call i32 @sprintf(i8* %10, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
%12 = call i32 @WriteToLog(i8* %10)
%13 = call i32 @WriteToLog(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @strlen(i8* %0)
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %33
16: ; preds = %2, %24
%17 = phi i64 [ %27, %24 ], [ 0, %2 ]
%18 = getelementptr inbounds i8, i8* %0, i64 %17
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 32
br i1 %20, label %21, label %24
21: ; preds = %16
%22 = trunc i64 %17 to i32
%23 = and i64 %17, 4294967295
br label %36
24: ; preds = %16
%25 = call signext i8 @toupper(i8 signext %19)
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %17
store i8 %25, i8* %26
%27 = add nuw nsw i64 %17, 1
%28 = call i32 @strlen(i8* %0)
%29 = sext i32 %28 to i64
%30 = icmp slt i64 %27, %29
br i1 %30, label %16, label %31
31: ; preds = %24
%32 = trunc i64 %27 to i32
br label %33
33: ; preds = %31, %2
%34 = phi i32 [ 0, %2 ], [ %32, %31 ]
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %21, %33
%37 = phi i64 [ %23, %21 ], [ %35, %33 ]
%38 = phi i32 [ %22, %21 ], [ %34, %33 ]
%39 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %37
store i8 0, i8* %39
%40 = add nuw nsw i32 %38, 1
%41 = call i32 @strlen(i8* %0)
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %59
43: ; preds = %36
%44 = zext i32 %38 to i64
%45 = add nuw nsw i64 %44, 1
br label %46
46: ; preds = %43, %46
%47 = phi i64 [ 0, %43 ], [ %51, %46 ]
%48 = phi i64 [ %45, %43 ], [ %53, %46 ]
%49 = getelementptr inbounds i8, i8* %0, i64 %48
%50 = load i8, i8* %49
%51 = add nuw nsw i64 %47, 1
%52 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 %47
store i8 %50, i8* %52
%53 = add nuw nsw i64 %48, 1
%54 = call i32 @strlen(i8* %0)
%55 = trunc i64 %53 to i32
%56 = icmp sgt i32 %54, %55
br i1 %56, label %46, label %57
57: ; preds = %46
%58 = and i64 %51, 4294967295
br label %59
59: ; preds = %57, %36
%60 = phi i64 [ 0, %36 ], [ %58, %57 ]
%61 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 %60
store i8 0, i8* %61
%62 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %59
%65 = call i32 @WriteToLog(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%66 = call i32 @DisplayHelp(i32 %1)
br label %86
67: ; preds = %59
%68 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %75
70: ; preds = %67
%71 = call i32 @WriteToLog(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%72 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%73 = call i32 @strlen(i8* %72)
%74 = call i32 @send(i32 %1, i8* %72, i32 %73, i32 0)
br label %88
75: ; preds = %67
%76 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %81
78: ; preds = %75
%79 = call i32 @WriteToLog(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%80 = call i32 @EvalTraceOpts(i8* %9, i32 %1)
br label %86
81: ; preds = %75
%82 = call i32 @WriteToLog(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
%83 = getelementptr inbounds [46 x i8], [46 x i8]* %7, i64 0, i64 0
%84 = call i32 @strlen(i8* %83)
%85 = call i32 @send(i32 %1, i8* %83, i32 %84, i32 0)
br label %86
86: ; preds = %81, %78, %64
%87 = call i32 @WriteToLog(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
br label %88
88: ; preds = %86, %70
%89 = phi i32 [ 0, %86 ], [ 1, %70 ]
ret i32 %89
}