#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*/ bzero(char *, int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ free(char **);
int /*<<< orphan*/ issuecmd(int, char **, int);
int /*<<< orphan*/ printf(char *);
int splitstr(char ***, char *, char);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int serve() {
  char request[1024];
  char **tokens;
  char *ptr;
  int cmd = -1;
  int cnt, i;
  char delim = ' ';
  while (cmd != 8) {
    tokens = NULL;
    printf("ftp>");
    fflush(stdout);
    bzero(request, 1024);
    fgets(request, 1024 - 1, stdin);
    i = strlen(request);
    request[i - 1] = 0;
    if (strcmp(request, "") == 0)
      continue;
    cnt = splitstr(&tokens, request, delim);
    ptr = *tokens;
    if (strcmp(ptr, "cd") == 0)
      cmd = 7;
    else if (strcmp(ptr, "ls") == 0)
      cmd = 3;
    else if (strcmp(ptr, "dir") == 0)
      cmd = 3;
    else if (strcmp(ptr, "pwd") == 0)
      cmd = 4;
    else if (strcmp(ptr, "get") == 0)
      cmd = 1;
    else if (strcmp(ptr, "rget") == 0)
      cmd = 5;
    else if (strcmp(ptr, "put") == 0)
      cmd = 2;
    else if (strcmp(ptr, "rput") == 0)
      cmd = 6;
    else if (strcmp(ptr, "quit") == 0)
      cmd = 8;
    else if (strcmp(ptr, "open") == 0)
      cmd = 10;
    else if (strcmp(ptr, "help") == 0)
      cmd = 9;
    else
      cmd = -1;
    issuecmd(cmd, tokens, cnt);
    free(tokens);
  }
}


x86 assembly (clang, -O0):
<serve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
movl   $0xffffffff,-0x424(%rbp)
ff ff ff
movb   $0x20,-0x42d(%rbp)
cmpl   $0x8,-0x424(%rbp)
je     14ca <serve+0x33a>
movq   $0x0,-0x418(%rbp)
lea    0xe35(%rip),%rdi
call   1070 <printf@plt>
mov    0x2e01(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
lea    -0x410(%rbp),%rdi
mov    $0x400,%esi
call   10b0 <bzero@plt>
lea    -0x410(%rbp),%rdi
mov    0x2deb(%rip),%rax
mov    (%rax),%edx
mov    $0x3ff,%esi
call   1080 <fgets@plt>
lea    -0x410(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x42c(%rbp)
mov    -0x42c(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x410(%rbp,%rax,1)
lea    -0x410(%rbp),%rdi
lea    0xdc8(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1250 <serve+0xc0>
jmp    11ac <serve+0x1c>
lea    -0x410(%rbp),%rsi
lea    -0x418(%rbp),%rdi
movsbl -0x42d(%rbp),%edx
call   1040 <splitstr@plt>
mov    %eax,-0x428(%rbp)
mov    -0x418(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x420(%rbp)
mov    -0x420(%rbp),%rdi
lea    0xd76(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    12ad <serve+0x11d>
movl   $0x7,-0x424(%rbp)
jmp    14a1 <serve+0x311>
mov    -0x420(%rbp),%rdi
lea    0xd4d(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    12d9 <serve+0x149>
movl   $0x3,-0x424(%rbp)
jmp    149c <serve+0x30c>
mov    -0x420(%rbp),%rdi
lea    0xd24(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1305 <serve+0x175>
movl   $0x3,-0x424(%rbp)
jmp    1497 <serve+0x307>
mov    -0x420(%rbp),%rdi
lea    0xcfc(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1331 <serve+0x1a1>
movl   $0x4,-0x424(%rbp)
jmp    1492 <serve+0x302>
mov    -0x420(%rbp),%rdi
lea    0xcd5(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    135d <serve+0x1cd>
movl   $0x1,-0x424(%rbp)
jmp    148d <serve+0x2fd>
mov    -0x420(%rbp),%rdi
lea    0xca8(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1389 <serve+0x1f9>
movl   $0x5,-0x424(%rbp)
jmp    1488 <serve+0x2f8>
mov    -0x420(%rbp),%rdi
lea    0xc82(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13b5 <serve+0x225>
movl   $0x2,-0x424(%rbp)
jmp    1483 <serve+0x2f3>
mov    -0x420(%rbp),%rdi
lea    0xc55(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13e1 <serve+0x251>
movl   $0x6,-0x424(%rbp)
jmp    147e <serve+0x2ee>
mov    -0x420(%rbp),%rdi
lea    0xc2e(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    140d <serve+0x27d>
movl   $0x8,-0x424(%rbp)
jmp    1479 <serve+0x2e9>
mov    -0x420(%rbp),%rdi
lea    0xc07(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1439 <serve+0x2a9>
movl   $0xa,-0x424(%rbp)
jmp    1474 <serve+0x2e4>
mov    -0x420(%rbp),%rdi
lea    0xbe0(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1465 <serve+0x2d5>
movl   $0x9,-0x424(%rbp)
jmp    146f <serve+0x2df>
movl   $0xffffffff,-0x424(%rbp)
ff ff ff
jmp    1474 <serve+0x2e4>
jmp    1479 <serve+0x2e9>
jmp    147e <serve+0x2ee>
jmp    1483 <serve+0x2f3>
jmp    1488 <serve+0x2f8>
jmp    148d <serve+0x2fd>
jmp    1492 <serve+0x302>
jmp    1497 <serve+0x307>
jmp    149c <serve+0x30c>
jmp    14a1 <serve+0x311>
mov    -0x424(%rbp),%edi
mov    -0x418(%rbp),%rsi
mov    -0x428(%rbp),%edx
call   1050 <issuecmd@plt>
mov    -0x418(%rbp),%rdi
call   1030 <free@plt>
jmp    11ac <serve+0x1c>
mov    -0x4(%rbp),%eax
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serve>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
lea    0x10(%rsp),%rbx
mov    0x2e3b(%rip),%r14
lea    0xe50(%rip),%r15
jmp    11e9 <serve+0x59>
cs nopw 0x0(%rax,%rax,1)
mov    $0x7,%r13d
mov    0x8(%rsp),%rsi
mov    %r13d,%edi
mov    %ebp,%edx
call   1050 <issuecmd@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
cmp    $0x8,%r13d
je     13b5 <serve+0x225>
movq   $0x0,0x8(%rsp)
lea    0xe07(%rip),%rdi
call   1070 <printf@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
call   10b0 <bzero@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x3ff,%esi
call   1080 <fgets@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
mov    %r15,%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     11e9 <serve+0x59>
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1040 <splitstr@plt>
mov    %eax,%ebp
mov    0x8(%rsp),%rax
mov    (%rax),%r12
mov    %r12,%rdi
lea    0xd97(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     11c0 <serve+0x30>
mov    %r12,%rdi
lea    0xd82(%rip),%rsi
call   1090 <strcmp@plt>
mov    $0x3,%r13d
test   %rax,%rax
je     11c6 <serve+0x36>
mov    %r12,%rdi
lea    0xd67(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     11c6 <serve+0x36>
mov    %r12,%rdi
lea    0xd53(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1368 <serve+0x1d8>
mov    %r12,%rdi
lea    0xd40(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1373 <serve+0x1e3>
mov    %r12,%rdi
lea    0xd27(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     137e <serve+0x1ee>
mov    %r12,%rdi
lea    0xd15(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1389 <serve+0x1f9>
mov    %r12,%rdi
lea    0xd00(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1394 <serve+0x204>
mov    %r12,%rdi
lea    0xcf1(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     139f <serve+0x20f>
mov    %r12,%rdi
lea    0xce2(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     13aa <serve+0x21a>
mov    %r12,%rdi
lea    0xcd3(%rip),%rsi
call   1090 <strcmp@plt>
neg    %rax
sbb    %r13d,%r13d
or     $0x9,%r13d
jmp    11c6 <serve+0x36>
mov    $0x4,%r13d
jmp    11c6 <serve+0x36>
mov    $0x1,%r13d
jmp    11c6 <serve+0x36>
mov    $0x5,%r13d
jmp    11c6 <serve+0x36>
mov    $0x2,%r13d
jmp    11c6 <serve+0x36>
mov    $0x6,%r13d
jmp    11c6 <serve+0x36>
mov    $0x8,%r13d
jmp    11c6 <serve+0x36>
mov    $0xa,%r13d
jmp    11c6 <serve+0x36>
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"ftp>\00"
@stdout = global i32 0
@stdin = global i32 0
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [3 x i8] c"cd\00"
@.str.3 = [3 x i8] c"ls\00"
@.str.4 = [4 x i8] c"dir\00"
@.str.5 = [4 x i8] c"pwd\00"
@.str.6 = [4 x i8] c"get\00"
@.str.7 = [5 x i8] c"rget\00"
@.str.8 = [4 x i8] c"put\00"
@.str.9 = [5 x i8] c"rput\00"
@.str.10 = [5 x i8] c"quit\00"
@.str.11 = [5 x i8] c"open\00"
@.str.12 = [5 x i8] c"help\00"
define i32 @serve() {
%1 = alloca i32
%2 = alloca [1024 x i8]
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
store i32 -1, i32* %5
store i8 32, i8* %8
br label %9
9: ; preds = %102, %30, %0
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 8
br i1 %11, label %12, label %109
12: ; preds = %9
store i8** null, i8*** %3
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* @stdout
%15 = call i32 @fflush(i32 %14)
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%17 = call i32 @bzero(i8* %16, i32 1024)
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%19 = load i32, i32* @stdin
%20 = call i32 @fgets(i8* %18, i32 1023, i32 %19)
%21 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%22 = call i32 @strlen(i8* %21)
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = sub nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %25
store i8 0, i8* %26
%27 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %12
br label %9
31: ; preds = %12
%32 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%33 = load i8, i8* %8
%34 = call i32 @splitstr(i8*** %3, i8* %32, i8 signext %33)
store i32 %34, i32* %6
%35 = load i8**, i8*** %3
%36 = load i8*, i8** %35
store i8* %36, i8** %4
%37 = load i8*, i8** %4
%38 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %31
store i32 7, i32* %5
br label %102
41: ; preds = %31
%42 = load i8*, i8** %4
%43 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %41
store i32 3, i32* %5
br label %101
46: ; preds = %41
%47 = load i8*, i8** %4
%48 = call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %51
50: ; preds = %46
store i32 3, i32* %5
br label %100
51: ; preds = %46
%52 = load i8*, i8** %4
%53 = call i64 @strcmp(i8* %52, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %56
55: ; preds = %51
store i32 4, i32* %5
br label %99
56: ; preds = %51
%57 = load i8*, i8** %4
%58 = call i64 @strcmp(i8* %57, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %61
60: ; preds = %56
store i32 1, i32* %5
br label %98
61: ; preds = %56
%62 = load i8*, i8** %4
%63 = call i64 @strcmp(i8* %62, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %66
65: ; preds = %61
store i32 5, i32* %5
br label %97
66: ; preds = %61
%67 = load i8*, i8** %4
%68 = call i64 @strcmp(i8* %67, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %71
70: ; preds = %66
store i32 2, i32* %5
br label %96
71: ; preds = %66
%72 = load i8*, i8** %4
%73 = call i64 @strcmp(i8* %72, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %76
75: ; preds = %71
store i32 6, i32* %5
br label %95
76: ; preds = %71
%77 = load i8*, i8** %4
%78 = call i64 @strcmp(i8* %77, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %81
80: ; preds = %76
store i32 8, i32* %5
br label %94
81: ; preds = %76
%82 = load i8*, i8** %4
%83 = call i64 @strcmp(i8* %82, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %86
85: ; preds = %81
store i32 10, i32* %5
br label %93
86: ; preds = %81
%87 = load i8*, i8** %4
%88 = call i64 @strcmp(i8* %87, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
br i1 %89, label %90, label %91
90: ; preds = %86
store i32 9, i32* %5
br label %92
91: ; preds = %86
store i32 -1, i32* %5
br label %92
92: ; preds = %91, %90
br label %93
93: ; preds = %92, %85
br label %94
94: ; preds = %93, %80
br label %95
95: ; preds = %94, %75
br label %96
96: ; preds = %95, %70
br label %97
97: ; preds = %96, %65
br label %98
98: ; preds = %97, %60
br label %99
99: ; preds = %98, %55
br label %100
100: ; preds = %99, %50
br label %101
101: ; preds = %100, %45
br label %102
102: ; preds = %101, %40
%103 = load i32, i32* %5
%104 = load i8**, i8*** %3
%105 = load i32, i32* %6
%106 = call i32 @issuecmd(i32 %103, i8** %104, i32 %105)
%107 = load i8**, i8*** %3
%108 = call i32 @free(i8** %107)
br label %9
109: ; preds = %9
%110 = load i32, i32* %1
ret i32 %110
}

LLVM IR (-O2):
@.str = [5 x i8] c"ftp>\00"
@stdout = global i32 0
@stdin = global i32 0
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [3 x i8] c"cd\00"
@.str.3 = [3 x i8] c"ls\00"
@.str.4 = [4 x i8] c"dir\00"
@.str.5 = [4 x i8] c"pwd\00"
@.str.6 = [4 x i8] c"get\00"
@.str.7 = [5 x i8] c"rget\00"
@.str.8 = [4 x i8] c"put\00"
@.str.9 = [5 x i8] c"rput\00"
@.str.10 = [5 x i8] c"quit\00"
@.str.11 = [5 x i8] c"open\00"
@.str.12 = [5 x i8] c"help\00"
define i32 @serve() {
%1 = alloca [1024 x i8]
%2 = alloca i8**
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%4 = bitcast i8*** %2 to i8*
br label %5
5: ; preds = %18, %0
store i8** null, i8*** %2
%6 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
%9 = call i32 @bzero(i8* %3, i32 1024)
%10 = load i32, i32* @stdin
%11 = call i32 @fgets(i8* %3, i32 1023, i32 %10)
%12 = call i32 @strlen(i8* %3)
%13 = add nsw i32 %12, -1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 %14
store i8 0, i8* %15
%16 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %5, %56
br label %5
19: ; preds = %5
%20 = call i32 @splitstr(i8*** %2, i8* %3, i8 signext 32)
%21 = load i8**, i8*** %2
%22 = load i8*, i8** %21
%23 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %56, label %25
25: ; preds = %19
%26 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %56, label %28
28: ; preds = %25
%29 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %56, label %31
31: ; preds = %28
%32 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %56, label %34
34: ; preds = %31
%35 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %56, label %37
37: ; preds = %34
%38 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %56, label %40
40: ; preds = %37
%41 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %56, label %43
43: ; preds = %40
%44 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %56, label %46
46: ; preds = %43
%47 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %56, label %49
49: ; preds = %46
%50 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %56, label %52
52: ; preds = %49
%53 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
%55 = select i1 %54, i32 9, i32 -1
br label %56
56: ; preds = %52, %49, %46, %43, %40, %37, %34, %31, %28, %25, %19
%57 = phi i32 [ 7, %19 ], [ 3, %25 ], [ 3, %28 ], [ 4, %31 ], [ 1, %34 ], [ 5, %37 ], [ 2, %40 ], [ 6, %43 ], [ 8, %46 ], [ 10, %49 ], [ %55, %52 ]
%58 = load i8**, i8*** %2
%59 = call i32 @issuecmd(i32 %57, i8** %58, i32 %20)
%60 = load i8**, i8*** %2
%61 = call i32 @free(i8** %60)
%62 = icmp eq i32 %57, 8
br i1 %62, label %63, label %18
63: ; preds = %56
ret i32 undef
}