#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 */
typedef int /*<<< orphan*/ strbuf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ kill(int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int read_pid(char *);
char *strchr(char *, char);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  char strbuf[64], *strBld;
  FILE *fp;
  int argNum = 1, s_pid;
  if (argc > 1) {
    if (!(strcmp(argv[argNum], "enable"))) {
      if (!strcmp(argv[argNum + 1], "status")) {
        system("ShowStatus &");
        return 0;
      } else {
        printf("%s",
               "Usage:\tqc <test_item>\n\n\t <test_item>\n\t\t enable <status> "
               "   : Enable displaying DSL operational status\n\t\t disable "
               "<status> : Disable displaying DSL operation status\n\t\t "
               "datalinkspeed : Display upstream and downstream speed\n\t\t "
               "crc           : Display the number of CRC error packet\n\t\t "
               "swversion     : Display the Software Version\n\t\t hwversion   "
               "  : Display the Hardware version\n\n");
        return 0;
      }
    }
    if (!(strcmp(argv[argNum], "disable"))) {
      if (!strcmp(argv[argNum + 1], "status")) {
        s_pid = read_pid("/var/run/ShowStatus_pid");
        if (s_pid >= 1) {
          if (kill(s_pid, SIGTERM) != 0)
            printf("Cound not kill pid %d (ShowStatus)\n", s_pid);
        } else {
          printf("Can not find ShowStatus pid\n");
        }
      }
      return 0;
    } else if (!(strcmp(argv[argNum], "swversion"))) {
      strbuf[0] = 0;
      strBld = 0;
      fp = fopen("/etc/version", "r");
      if (fp != NULL) {
        fgets(strbuf, sizeof(strbuf), fp);
        fclose(fp);
        strBld = strchr(strbuf, ' ');
        *strBld = 0;
      }
      printf("Software Version: %s\n", strbuf);
      return 0;
    } else if (!(strcmp(argv[argNum], "hwversion"))) {
      printf("Hardware Version: %s\n", "8671");
      return 0;
    } else {
      printf("%s",
             "Usage:\tqc <test_item>\n\n\t <test_item>\n\t\t enable <status>   "
             " : Enable displaying DSL operational status\n\t\t disable "
             "<status> : Disable displaying DSL operation status\n\t\t "
             "datalinkspeed : Display upstream and downstream speed\n\t\t crc  "
             "         : Display the number of CRC error packet\n\t\t "
             "swversion     : Display the Software Version\n\t\t hwversion     "
             ": Display the Hardware version\n\n");
    }
  }
  printf(
      "%s",
      "Usage:\tqc <test_item>\n\n\t <test_item>\n\t\t enable <status>    : "
      "Enable displaying DSL operational status\n\t\t disable <status> : "
      "Disable displaying DSL operation status\n\t\t datalinkspeed : Display "
      "upstream and downstream speed\n\t\t crc           : Display the number "
      "of CRC error packet\n\t\t swversion     : Display the Software "
      "Version\n\t\t hwversion     : Display the Hardware version\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x64(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    13ee <main+0x25e>
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe36(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1237 <main+0xa7>
mov    -0x10(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe17(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1216 <main+0x86>
lea    0xe09(%rip),%rdi
call   1040 <system@plt>
movl   $0x0,-0x4(%rbp)
jmp    140a <main+0x27a>
lea    0xdfe(%rip),%rdi
lea    0xdfa(%rip),%rsi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    140a <main+0x27a>
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xf4d(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    12e7 <main+0x157>
mov    -0x10(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd97(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    12db <main+0x14b>
lea    0xf1a(%rip),%rdi
call   1090 <read_pid@plt>
mov    %eax,-0x68(%rbp)
cmpl   $0x1,-0x68(%rbp)
jl     12c8 <main+0x138>
mov    -0x68(%rbp),%edi
mov    0x2d47(%rip),%rax
mov    (%rax),%esi
call   10a0 <kill@plt>
cmp    $0x0,%rax
je     12c3 <main+0x133>
mov    -0x68(%rbp),%esi
lea    0xefb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    12d6 <main+0x146>
lea    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    12db <main+0x14b>
movl   $0x0,-0x4(%rbp)
jmp    140a <main+0x27a>
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xefe(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1388 <main+0x1f8>
movb   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
lea    0xee7(%rip),%rdi
lea    0xeed(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
je     136a <main+0x1da>
lea    -0x50(%rbp),%rdi
mov    -0x60(%rbp),%rdx
mov    $0x40,%esi
call   1070 <fgets@plt>
mov    -0x60(%rbp),%rdi
call   1030 <fclose@plt>
lea    -0x50(%rbp),%rdi
mov    $0x20,%esi
call   1050 <strchr@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x50(%rbp),%rsi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    140a <main+0x27a>
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe8c(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    13ca <main+0x23a>
lea    0xe81(%rip),%rdi
lea    0xe90(%rip),%rsi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    140a <main+0x27a>
lea    0xc4a(%rip),%rdi
lea    0xc46(%rip),%rsi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13e4 <main+0x254>
jmp    13e9 <main+0x259>
jmp    13ee <main+0x25e>
lea    0xc26(%rip),%rdi
lea    0xc22(%rip),%rsi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x48,%rsp
cmp    $0x2,%edi
jl     1231 <main+0x91>
mov    %rsi,%rbx
mov    0x8(%rsi),%r14
lea    0xe42(%rip),%rsi
mov    %r14,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1219 <main+0x79>
lea    0xe4a(%rip),%rsi
mov    %r14,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1247 <main+0xa7>
lea    0xe7b(%rip),%rsi
mov    %r14,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1298 <main+0xf8>
lea    0xe93(%rip),%rsi
mov    %r14,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     12ff <main+0x15f>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
jmp    1231 <main+0x91>
mov    0x10(%rbx),%rdi
lea    0xde3(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
je     12ee <main+0x14e>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret
mov    0x10(%rbx),%rdi
lea    0xdb5(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    123d <main+0x9d>
lea    0xdc1(%rip),%rdi
call   10a0 <read_pid@plt>
test   %eax,%eax
jle    1319 <main+0x179>
mov    %eax,%ebx
mov    0x2d70(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   10b0 <kill@plt>
test   %rax,%rax
je     123d <main+0x9d>
lea    0xdae(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    123d <main+0x9d>
movb   $0x0,(%rsp)
lea    0xdc6(%rip),%rdi
lea    0xdcc(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     12e2 <main+0x142>
mov    %rax,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x40,%esi
mov    %rax,%rdx
call   1080 <fgets@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    %r14,%rdi
mov    $0x20,%esi
call   1060 <strchr@plt>
movb   $0x0,(%rax)
lea    0xd8f(%rip),%rdi
mov    %rsp,%rsi
jmp    130d <main+0x16d>
lea    0xd19(%rip),%rdi
call   1050 <system@plt>
jmp    123d <main+0x9d>
lea    0xd92(%rip),%rdi
lea    0xda1(%rip),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    123d <main+0x9d>
lea    0xd93(%rip),%rdi
jmp    1238 <main+0x98>

LLVM IR (-O0):
@.str = [7 x i8] c"enable\00"
@.str.1 = [7 x i8] c"status\00"
@.str.2 = [13 x i8] c"ShowStatus &\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [377 x i8] c"Usage:\09qc <test_item>\0A\0A\09 <test_item>\0A\09\09 enable <status> : Enable displaying DSL operational status\0A\09\09 disable <status> : Disable displaying DSL operation status\0A\09\09 datalinkspeed : Display upstream and downstream speed\0A\09\09 crc : Display the number of CRC error packet\0A\09\09 swversion : Display the Software Version\0A\09\09 hwversion : Display the Hardware version\0A\0A\00"
@.str.5 = [8 x i8] c"disable\00"
@.str.6 = [24 x i8] c"/var/run/ShowStatus_pid\00"
@SIGTERM = global i32 0
@.str.7 = [36 x i8] c"Cound not kill pid %d (ShowStatus)\0A\00"
@.str.8 = [29 x i8] c"Can not find ShowStatus pid\0A\00"
@.str.9 = [10 x i8] c"swversion\00"
@.str.10 = [13 x i8] c"/etc/version\00"
@.str.11 = [2 x i8] c"r\00"
@.str.12 = [22 x i8] c"Software Version: %s\0A\00"
@.str.13 = [10 x i8] c"hwversion\00"
@.str.14 = [22 x i8] c"Hardware Version: %s\0A\00"
@.str.15 = [5 x i8] c"8671\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [64 x i8]
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %9
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 1
br i1 %12, label %13, label %108
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = load i32, i32* %9
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 @strcmp(i8* %18, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%20 = icmp ne i32 %19, 0
br i1 %20, label %34, label %21
21: ; preds = %13
%22 = load i8**, i8*** %5
%23 = load i32, i32* %9
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %22, i64 %25
%27 = load i8*, i8** %26
%28 = call i32 @strcmp(i8* %27, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
br i1 %29, label %32, label %30
30: ; preds = %21
%31 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %110
32: ; preds = %21
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([377 x i8], [377 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
br label %110
34: ; preds = %13
%35 = load i8**, i8*** %5
%36 = load i32, i32* %9
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %35, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @strcmp(i8* %39, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%41 = icmp ne i32 %40, 0
br i1 %41, label %68, label %42
42: ; preds = %34
%43 = load i8**, i8*** %5
%44 = load i32, i32* %9
%45 = add nsw i32 %44, 1
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %43, i64 %46
%48 = load i8*, i8** %47
%49 = call i32 @strcmp(i8* %48, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%50 = icmp ne i32 %49, 0
br i1 %50, label %67, label %51
51: ; preds = %42
%52 = call i32 @read_pid(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
store i32 %52, i32* %10
%53 = load i32, i32* %10
%54 = icmp sge i32 %53, 1
br i1 %54, label %55, label %64
55: ; preds = %51
%56 = load i32, i32* %10
%57 = load i32, i32* @SIGTERM
%58 = call i64 @kill(i32 %56, i32 %57)
%59 = icmp ne i64 %58, 0
br i1 %59, label %60, label %63
60: ; preds = %55
%61 = load i32, i32* %10
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i32 %61)
br label %63
63: ; preds = %60, %55
br label %66
64: ; preds = %51
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
br label %66
66: ; preds = %64, %63
br label %67
67: ; preds = %66, %42
store i32 0, i32* %3
br label %110
68: ; preds = %34
%69 = load i8**, i8*** %5
%70 = load i32, i32* %9
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i8*, i8** %69, i64 %71
%73 = load i8*, i8** %72
%74 = call i32 @strcmp(i8* %73, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%75 = icmp ne i32 %74, 0
br i1 %75, label %93, label %76
76: ; preds = %68
%77 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
store i8 0, i8* %77
store i8* null, i8** %7
%78 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
store i32* %78, i32** %8
%79 = load i32*, i32** %8
%80 = icmp ne i32* %79, null
br i1 %80, label %81, label %90
81: ; preds = %76
%82 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%83 = load i32*, i32** %8
%84 = call i32 @fgets(i8* %82, i32 64, i32* %83)
%85 = load i32*, i32** %8
%86 = call i32 @fclose(i32* %85)
%87 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%88 = call i8* @strchr(i8* %87, i8 signext 32)
store i8* %88, i8** %7
%89 = load i8*, i8** %7
store i8 0, i8* %89
br label %90
90: ; preds = %81, %76
%91 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0), i8* %91)
store i32 0, i32* %3
br label %110
93: ; preds = %68
%94 = load i8**, i8*** %5
%95 = load i32, i32* %9
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i8*, i8** %94, i64 %96
%98 = load i8*, i8** %97
%99 = call i32 @strcmp(i8* %98, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%100 = icmp ne i32 %99, 0
br i1 %100, label %103, label %101
101: ; preds = %93
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
store i32 0, i32* %3
br label %110
103: ; preds = %93
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([377 x i8], [377 x i8]* @.str.4, i64 0, i64 0))
br label %105
105: ; preds = %103
br label %106
106: ; preds = %105
br label %107
107: ; preds = %106
br label %108
108: ; preds = %107, %2
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([377 x i8], [377 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
br label %110
110: ; preds = %108, %101, %90, %67, %32, %30
%111 = load i32, i32* %3
ret i32 %111
}

LLVM IR (-O2):
@.str = [7 x i8] c"enable\00"
@.str.1 = [7 x i8] c"status\00"
@.str.2 = [13 x i8] c"ShowStatus &\00"
@.str.5 = [8 x i8] c"disable\00"
@.str.6 = [24 x i8] c"/var/run/ShowStatus_pid\00"
@SIGTERM = global i32 0
@.str.7 = [36 x i8] c"Cound not kill pid %d (ShowStatus)\0A\00"
@.str.9 = [10 x i8] c"swversion\00"
@.str.10 = [13 x i8] c"/etc/version\00"
@.str.11 = [2 x i8] c"r\00"
@.str.12 = [22 x i8] c"Software Version: %s\0A\00"
@.str.13 = [10 x i8] c"hwversion\00"
@.str.14 = [22 x i8] c"Hardware Version: %s\0A\00"
@.str.15 = [5 x i8] c"8671\00"
@str.17 = [28 x i8] c"Can not find ShowStatus pid\00"
@str.18 = [376 x i8] c"Usage:\09qc <test_item>\0A\0A\09 <test_item>\0A\09\09 enable <status> : Enable displaying DSL operational status\0A\09\09 disable <status> : Disable displaying DSL operation status\0A\09\09 datalinkspeed : Display upstream and downstream speed\0A\09\09 crc : Display the number of CRC error packet\0A\09\09 swversion : Display the Software Version\0A\09\09 hwversion : Display the Hardware version\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %58
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %8, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %6
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = tail call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %60
18: ; preds = %11
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([376 x i8], [376 x i8]* @str.18, i64 0, i64 0))
br label %60
20: ; preds = %6
%21 = tail call i32 @strcmp(i8* dereferenceable(1) %8, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %39
23: ; preds = %20
%24 = getelementptr inbounds i8*, i8** %1, i64 2
%25 = load i8*, i8** %24
%26 = tail call i32 @strcmp(i8* dereferenceable(1) %25, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %60
28: ; preds = %23
%29 = tail call i32 @read_pid(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %37
31: ; preds = %28
%32 = load i32, i32* @SIGTERM
%33 = tail call i64 @kill(i32 %29, i32 %32)
%34 = icmp eq i64 %33, 0
br i1 %34, label %60, label %35
35: ; preds = %31
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i32 %29)
br label %60
37: ; preds = %28
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.17, i64 0, i64 0))
br label %60
39: ; preds = %20
%40 = tail call i32 @strcmp(i8* dereferenceable(1) %8, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %51
42: ; preds = %39
store i8 0, i8* %4
%43 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%44 = icmp eq i32* %43, null
br i1 %44, label %49, label %45
45: ; preds = %42
%46 = call i32 @fgets(i8* %4, i32 64, i32* %43)
%47 = call i32 @fclose(i32* %43)
%48 = call i8* @strchr(i8* %4, i8 signext 32)
store i8 0, i8* %48
br label %49
49: ; preds = %45, %42
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0), i8* %4)
br label %60
51: ; preds = %39
%52 = tail call i32 @strcmp(i8* dereferenceable(1) %8, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
br label %60
56: ; preds = %51
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([376 x i8], [376 x i8]* @str.18, i64 0, i64 0))
br label %58
58: ; preds = %56, %2
%59 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([376 x i8], [376 x i8]* @str.18, i64 0, i64 0))
br label %60
60: ; preds = %23, %31, %35, %37, %58, %54, %49, %18, %16
ret i32 0
}