#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*/ get_active_processes(char *, int);
int /*<<< orphan*/ get_bound_sockets(int);
int /*<<< orphan*/ get_dependencies(char *, int);
int /*<<< orphan*/ get_filesystem(char *, int);
int /*<<< orphan*/ get_installed(int);
int /*<<< orphan*/ get_pid(int);
int /*<<< orphan*/ get_ps(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ send(int, char *, int, int /*<<< orphan*/);
char *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
bool process_cmd(char *cmd, int clientfd) {
  printf("CMD: %s", cmd);
  char *newline = strchr(cmd, '\n');
  if (newline == NULL) {
    printf("expected new line!;\n");
    return false;
  }
  *newline = '\0';
  if (*(newline - 1) == '\r') {
    *(newline - 1) = '\0';
  }
  char *space = strchr(cmd, ' ');
  char *arg = NULL;
  if (space != NULL) {
    arg = space + 1;
    *space = '\0';
  }
  if (strcmp(cmd, "exit") == 0) {
    char *empty = "";
    send(clientfd, empty, 1, 0);
    return false;
  } else if (strcmp(cmd, "get_dependencies") == 0) {
    if (arg == NULL) {
      printf("expected argument with get dependencies\n");
      return false;
    } else {
      get_dependencies(arg, clientfd);
    }
  } else if (strcmp(cmd, "get_filesystem") == 0) {
    get_filesystem(arg, clientfd);
  } else if (strcmp(cmd, "get_installed") == 0) {
    get_installed(clientfd);
  } else if (strcmp(cmd, "get_bound_sockets") == 0) {
    get_bound_sockets(clientfd);
  } else if (strcmp(cmd, "get_ps") == 0) {
    get_ps(clientfd);
  } else if (strcmp(cmd, "get_active_processes") == 0) {
    if (arg == NULL) {
      printf("expected argument with get_active_processes\n");
      return false;
    } else {
      get_active_processes(arg, clientfd);
    }
  } else if (strcmp(cmd, "get_pid") == 0) {
    get_pid(clientfd);
  } else {
    char *unknown = "UNKNOWN_CMD";
    int len = strlen(unknown);
    send(clientfd, unknown, len + 1, 0);
  }
  return true;
}


x86 assembly (clang, -O0):
<process_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1070 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1218 <process_cmd+0x58>
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1470 <process_cmd+0x2b0>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x20(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0xd,%eax
jne    1238 <process_cmd+0x78>
mov    -0x20(%rbp),%rax
movb   $0x0,-0x1(%rax)
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1070 <strchr@plt>
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1270 <process_cmd+0xb0>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
lea    0xda2(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    12b4 <process_cmd+0xf4>
lea    0xd8b(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x38(%rbp),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
movl   $0x0,-0x4(%rbp)
jmp    1470 <process_cmd+0x2b0>
mov    -0x10(%rbp),%rdi
lea    0xd63(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1304 <process_cmd+0x144>
cmpq   $0x0,-0x30(%rbp)
jne    12f3 <process_cmd+0x133>
lea    0xd53(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1470 <process_cmd+0x2b0>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   10b0 <get_dependencies@plt>
jmp    1464 <process_cmd+0x2a4>
mov    -0x10(%rbp),%rdi
lea    0xd4d(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    132f <process_cmd+0x16f>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <get_filesystem@plt>
jmp    145f <process_cmd+0x29f>
mov    -0x10(%rbp),%rdi
lea    0xd31(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1356 <process_cmd+0x196>
mov    -0x14(%rbp),%edi
call   10d0 <get_installed@plt>
jmp    145a <process_cmd+0x29a>
mov    -0x10(%rbp),%rdi
lea    0xd18(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    137d <process_cmd+0x1bd>
mov    -0x14(%rbp),%edi
call   10c0 <get_bound_sockets@plt>
jmp    1455 <process_cmd+0x295>
mov    -0x10(%rbp),%rdi
lea    0xd03(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13a4 <process_cmd+0x1e4>
mov    -0x14(%rbp),%edi
call   1040 <get_ps@plt>
jmp    1450 <process_cmd+0x290>
mov    -0x10(%rbp),%rdi
lea    0xce3(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13f4 <process_cmd+0x234>
cmpq   $0x0,-0x30(%rbp)
jne    13e3 <process_cmd+0x223>
lea    0xcd7(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1470 <process_cmd+0x2b0>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   10a0 <get_active_processes@plt>
jmp    144b <process_cmd+0x28b>
mov    -0x10(%rbp),%rdi
lea    0xcd5(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    141b <process_cmd+0x25b>
mov    -0x14(%rbp),%edi
call   10e0 <get_pid@plt>
jmp    1446 <process_cmd+0x286>
lea    0xcba(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x44(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x40(%rbp),%rsi
mov    -0x44(%rbp),%edx
add    $0x1,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
jmp    144b <process_cmd+0x28b>
jmp    1450 <process_cmd+0x290>
jmp    1455 <process_cmd+0x295>
jmp    145a <process_cmd+0x29a>
jmp    145f <process_cmd+0x29f>
jmp    1464 <process_cmd+0x2a4>
jmp    1469 <process_cmd+0x2a9>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_cmd>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0xe1f(%rip),%rdi
xor    %ebp,%ebp
mov    %rbx,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1080 <strchr@plt>
test   %rax,%rax
je     122a <process_cmd+0x5a>
movb   $0x0,(%rax)
cmpb   $0xd,-0x1(%rax)
jne    120c <process_cmd+0x3c>
movb   $0x0,-0x1(%rax)
mov    %rbx,%rdi
mov    $0x20,%esi
call   1080 <strchr@plt>
test   %rax,%rax
je     123b <process_cmd+0x6b>
mov    %rax,%rbp
add    $0x1,%rbp
movb   $0x0,(%rax)
jmp    123d <process_cmd+0x6d>
lea    0xe8b(%rip),%rdi
call   1040 <puts@plt>
jmp    13a7 <process_cmd+0x1d7>
xor    %ebp,%ebp
lea    0xdc4(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1321 <process_cmd+0x151>
lea    0xdb1(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     133b <process_cmd+0x16b>
lea    0xdaa(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     134d <process_cmd+0x17d>
lea    0xda1(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     135a <process_cmd+0x18a>
lea    0xd97(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1374 <process_cmd+0x1a4>
lea    0xd91(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     137e <process_cmd+0x1ae>
lea    0xdab(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1388 <process_cmd+0x1b8>
lea    0xd68(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     139a <process_cmd+0x1ca>
lea    0xd58(%rip),%rbx
mov    %rbx,%rdi
call   1060 <strlen@plt>
lea    0x1(%rax),%edx
mov    %r14d,%edi
mov    %rbx,%rsi
xor    %ecx,%ecx
call   1070 <send@plt>
jmp    13a2 <process_cmd+0x1d2>
lea    0xda7(%rip),%rsi
xor    %ebp,%ebp
mov    %r14d,%edi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1070 <send@plt>
jmp    13a7 <process_cmd+0x1d7>
test   %rbp,%rbp
je     1364 <process_cmd+0x194>
mov    %rbp,%rdi
mov    %r14d,%esi
call   10c0 <get_dependencies@plt>
jmp    13a2 <process_cmd+0x1d2>
mov    %rbp,%rdi
mov    %r14d,%esi
call   1030 <get_filesystem@plt>
jmp    13a2 <process_cmd+0x1d2>
mov    %r14d,%edi
call   10e0 <get_installed@plt>
jmp    13a2 <process_cmd+0x1d2>
lea    0xd29(%rip),%rdi
call   1040 <puts@plt>
xor    %ebp,%ebp
jmp    13a7 <process_cmd+0x1d7>
mov    %r14d,%edi
call   10d0 <get_bound_sockets@plt>
jmp    13a2 <process_cmd+0x1d2>
mov    %r14d,%edi
call   1050 <get_ps@plt>
jmp    13a2 <process_cmd+0x1d2>
test   %rbp,%rbp
je     13ae <process_cmd+0x1de>
mov    %rbp,%rdi
mov    %r14d,%esi
call   10b0 <get_active_processes@plt>
jmp    13a2 <process_cmd+0x1d2>
mov    %r14d,%edi
call   10f0 <get_pid@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xcb3(%rip),%rdi
jmp    136b <process_cmd+0x19b>

LLVM IR (-O0):
@.str = [8 x i8] c"CMD: %s\00"
@.str.1 = [21 x i8] c"expected new line!;\0A\00"
@.str.2 = [5 x i8] c"exit\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [17 x i8] c"get_dependencies\00"
@.str.5 = [41 x i8] c"expected argument with get dependencies\0A\00"
@.str.6 = [15 x i8] c"get_filesystem\00"
@.str.7 = [14 x i8] c"get_installed\00"
@.str.8 = [18 x i8] c"get_bound_sockets\00"
@.str.9 = [7 x i8] c"get_ps\00"
@.str.10 = [21 x i8] c"get_active_processes\00"
@.str.11 = [45 x i8] c"expected argument with get_active_processes\0A\00"
@.str.12 = [8 x i8] c"get_pid\00"
@.str.13 = [12 x i8] c"UNKNOWN_CMD\00"
define i32 @process_cmd(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%12 = load i8*, i8** %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %4
%15 = call i8* @strchr(i8* %14, i8 signext 10)
store i8* %15, i8** %6
%16 = load i8*, i8** %6
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %127
20: ; preds = %2
%21 = load i8*, i8** %6
store i8 0, i8* %21
%22 = load i8*, i8** %6
%23 = getelementptr inbounds i8, i8* %22, i64 -1
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 13
br i1 %26, label %27, label %30
27: ; preds = %20
%28 = load i8*, i8** %6
%29 = getelementptr inbounds i8, i8* %28, i64 -1
store i8 0, i8* %29
br label %30
30: ; preds = %27, %20
%31 = load i8*, i8** %4
%32 = call i8* @strchr(i8* %31, i8 signext 32)
store i8* %32, i8** %7
store i8* null, i8** %8
%33 = load i8*, i8** %7
%34 = icmp ne i8* %33, null
br i1 %34, label %35, label %39
35: ; preds = %30
%36 = load i8*, i8** %7
%37 = getelementptr inbounds i8, i8* %36, i64 1
store i8* %37, i8** %8
%38 = load i8*, i8** %7
store i8 0, i8* %38
br label %39
39: ; preds = %35, %30
%40 = load i8*, i8** %4
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %47
43: ; preds = %39
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8** %9
%44 = load i32, i32* %5
%45 = load i8*, i8** %9
%46 = call i32 @send(i32 %44, i8* %45, i32 1, i32 0)
store i32 0, i32* %3
br label %127
47: ; preds = %39
%48 = load i8*, i8** %4
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %61
51: ; preds = %47
%52 = load i8*, i8** %8
%53 = icmp eq i8* %52, null
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %3
br label %127
56: ; preds = %51
%57 = load i8*, i8** %8
%58 = load i32, i32* %5
%59 = call i32 @get_dependencies(i8* %57, i32 %58)
br label %60
60: ; preds = %56
br label %125
61: ; preds = %47
%62 = load i8*, i8** %4
%63 = call i64 @strcmp(i8* %62, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %69
65: ; preds = %61
%66 = load i8*, i8** %8
%67 = load i32, i32* %5
%68 = call i32 @get_filesystem(i8* %66, i32 %67)
br label %124
69: ; preds = %61
%70 = load i8*, i8** %4
%71 = call i64 @strcmp(i8* %70, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%72 = icmp eq i64 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %69
%74 = load i32, i32* %5
%75 = call i32 @get_installed(i32 %74)
br label %123
76: ; preds = %69
%77 = load i8*, i8** %4
%78 = call i64 @strcmp(i8* %77, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %83
80: ; preds = %76
%81 = load i32, i32* %5
%82 = call i32 @get_bound_sockets(i32 %81)
br label %122
83: ; preds = %76
%84 = load i8*, i8** %4
%85 = call i64 @strcmp(i8* %84, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%86 = icmp eq i64 %85, 0
br i1 %86, label %87, label %90
87: ; preds = %83
%88 = load i32, i32* %5
%89 = call i32 @get_ps(i32 %88)
br label %121
90: ; preds = %83
%91 = load i8*, i8** %4
%92 = call i64 @strcmp(i8* %91, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%93 = icmp eq i64 %92, 0
br i1 %93, label %94, label %104
94: ; preds = %90
%95 = load i8*, i8** %8
%96 = icmp eq i8* %95, null
br i1 %96, label %97, label %99
97: ; preds = %94
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %3
br label %127
99: ; preds = %94
%100 = load i8*, i8** %8
%101 = load i32, i32* %5
%102 = call i32 @get_active_processes(i8* %100, i32 %101)
br label %103
103: ; preds = %99
br label %120
104: ; preds = %90
%105 = load i8*, i8** %4
%106 = call i64 @strcmp(i8* %105, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%107 = icmp eq i64 %106, 0
br i1 %107, label %108, label %111
108: ; preds = %104
%109 = load i32, i32* %5
%110 = call i32 @get_pid(i32 %109)
br label %119
111: ; preds = %104
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8** %10
%112 = load i8*, i8** %10
%113 = call i32 @strlen(i8* %112)
store i32 %113, i32* %11
%114 = load i32, i32* %5
%115 = load i8*, i8** %10
%116 = load i32, i32* %11
%117 = add nsw i32 %116, 1
%118 = call i32 @send(i32 %114, i8* %115, i32 %117, i32 0)
br label %119
119: ; preds = %111, %108
br label %120
120: ; preds = %119, %103
br label %121
121: ; preds = %120, %87
br label %122
122: ; preds = %121, %80
br label %123
123: ; preds = %122, %73
br label %124
124: ; preds = %123, %65
br label %125
125: ; preds = %124, %60
br label %126
126: ; preds = %125
store i32 1, i32* %3
br label %127
127: ; preds = %126, %97, %54, %43, %18
%128 = load i32, i32* %3
ret i32 %128
}

LLVM IR (-O2):
@.str = [8 x i8] c"CMD: %s\00"
@.str.2 = [5 x i8] c"exit\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [17 x i8] c"get_dependencies\00"
@.str.6 = [15 x i8] c"get_filesystem\00"
@.str.7 = [14 x i8] c"get_installed\00"
@.str.8 = [18 x i8] c"get_bound_sockets\00"
@.str.9 = [7 x i8] c"get_ps\00"
@.str.10 = [21 x i8] c"get_active_processes\00"
@.str.12 = [8 x i8] c"get_pid\00"
@.str.13 = [12 x i8] c"UNKNOWN_CMD\00"
@str = [44 x i8] c"expected argument with get_active_processes\00"
@str.14 = [40 x i8] c"expected argument with get dependencies\00"
@str.15 = [20 x i8] c"expected new line!;\00"
define i32 @process_cmd(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.15, i64 0, i64 0))
br label %71
8: ; preds = %2
store i8 0, i8* %4
%9 = getelementptr inbounds i8, i8* %4, i64 -1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 13
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 0, i8* %9
br label %13
13: ; preds = %12, %8
%14 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 32)
%15 = icmp eq i8* %14, null
br i1 %15, label %18, label %16
16: ; preds = %13
%17 = getelementptr inbounds i8, i8* %14, i64 1
store i8 0, i8* %14
br label %18
18: ; preds = %16, %13
%19 = phi i8* [ %17, %16 ], [ null, %13 ]
%20 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = tail call i32 @send(i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 0)
br label %71
24: ; preds = %18
%25 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %33
27: ; preds = %24
%28 = icmp eq i8* %19, null
br i1 %28, label %29, label %31
29: ; preds = %27
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.14, i64 0, i64 0))
br label %71
31: ; preds = %27
%32 = tail call i32 @get_dependencies(i8* %19, i32 %1)
br label %71
33: ; preds = %24
%34 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = tail call i32 @get_filesystem(i8* %19, i32 %1)
br label %71
38: ; preds = %33
%39 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = tail call i32 @get_installed(i32 %1)
br label %71
43: ; preds = %38
%44 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = tail call i32 @get_bound_sockets(i32 %1)
br label %71
48: ; preds = %43
%49 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = tail call i32 @get_ps(i32 %1)
br label %71
53: ; preds = %48
%54 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %62
56: ; preds = %53
%57 = icmp eq i8* %19, null
br i1 %57, label %58, label %60
58: ; preds = %56
%59 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
br label %71
60: ; preds = %56
%61 = tail call i32 @get_active_processes(i8* %19, i32 %1)
br label %71
62: ; preds = %53
%63 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = tail call i32 @get_pid(i32 %1)
br label %71
67: ; preds = %62
%68 = tail call i32 @strlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0))
%69 = add nsw i32 %68, 1
%70 = tail call i32 @send(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i32 %69, i32 0)
br label %71
71: ; preds = %22, %29, %58, %31, %41, %51, %65, %67, %60, %46, %36, %6
%72 = phi i32 [ 0, %6 ], [ 0, %22 ], [ 0, %29 ], [ 0, %58 ], [ 1, %31 ], [ 1, %41 ], [ 1, %51 ], [ 1, %65 ], [ 1, %67 ], [ 1, %60 ], [ 1, %46 ], [ 1, %36 ]
ret i32 %72
}