#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 */
struct dirent {
  char *d_name;
};
typedef int pid_t;
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int NAME_MAX;
scalar_t__ atoi(char *);
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ getpid();
int /*<<< orphan*/ isdigit(char);
scalar_t__ isspace(char);
int /*<<< orphan*/ kill(scalar_t__, int);
int /*<<< orphan*/ *opendir(char *);
struct dirent *readdir(int /*<<< orphan*/ *);
int /*<<< orphan*/ strcat(char *, char *);
char *strchr(char *, char);
scalar_t__ strcmp(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char *);
void killAll(const char *name, int sig) {
  DIR *d;
  struct dirent *e;
  char fn[NAME_MAX];
  d = opendir("/proc");
  if (!d)
    return;
  while ((e = readdir(d)) != NULL) {
    FILE *fp;
    char *p;
    if (!isdigit(*e->d_name))
      continue;
    if (atoi(e->d_name) == getpid())
      continue;
    strcpy(fn, "/proc/");
    strcpy(fn + 6, e->d_name);
    strcat(fn + 6, "/status");
    fp = fopen(fn, "r");
    if (fp == NULL)
      continue;
    if (fgets(fn, NAME_MAX - 1, fp) == NULL) {
      fclose(fp);
      continue;
    }
    fclose(fp);
    fn[NAME_MAX - 1] = '\0';
    p = strchr(fn, '\n');
    if (p != NULL)
      *p = '\0';
    for (p = fn; *p != '\0' && !isspace(*p); p++)
      ;
    while (*p != '\0' && isspace(*p))
      p++;
    if (*p == '\0')
      continue;
    if (strcmp(p, name) == 0) {
      pid_t pid;
      pid = atoi(e->d_name);
      if (pid > 1)
        kill(atoi(e->d_name), sig);
    }
  }
  closedir(d);
}


x86 assembly (clang, -O0):
<killAll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2dd2(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
lea    0xdce(%rip),%rdi
call   1070 <opendir@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1252 <killAll+0x62>
movl   $0x1,-0x34(%rbp)
jmp    14a5 <killAll+0x2b5>
jmp    1257 <killAll+0x67>
mov    -0x18(%rbp),%rdi
call   10e0 <readdir@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     1495 <killAll+0x2a5>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    128b <killAll+0x9b>
jmp    1257 <killAll+0x67>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
call   1100 <atoi@plt>
mov    %rax,-0x60(%rbp)
mov    $0x0,%al
call   1050 <getpid@plt>
mov    %rax,%rcx
mov    -0x60(%rbp),%rax
cmp    %rcx,%rax
jne    12b7 <killAll+0xc7>
jmp    1257 <killAll+0x67>
mov    -0x58(%rbp),%rdi
lea    0xd44(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x58(%rbp),%rdi
add    $0x6,%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strcpy@plt>
mov    -0x58(%rbp),%rdi
add    $0x6,%rdi
lea    0xd23(%rip),%rsi
call   1110 <strcat@plt>
mov    -0x58(%rbp),%rdi
lea    0xd1b(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1313 <killAll+0x123>
jmp    1257 <killAll+0x67>
mov    -0x58(%rbp),%rdi
mov    0x2cba(%rip),%rax
mov    (%rax),%esi
sub    $0x1,%esi
mov    -0x40(%rbp),%rdx
call   10b0 <fgets@plt>
cmp    $0x0,%rax
jne    1344 <killAll+0x154>
mov    -0x40(%rbp),%rdi
call   1060 <fclose@plt>
jmp    1257 <killAll+0x67>
mov    -0x40(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x58(%rbp),%rdi
mov    0x2c80(%rip),%rax
mov    (%rax),%eax
sub    $0x1,%eax
cltq
movb   $0x0,(%rdi,%rax,1)
mov    $0xa,%esi
call   1080 <strchr@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
je     1383 <killAll+0x193>
mov    -0x48(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x58(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x61(%rbp)
je     13b8 <killAll+0x1c8>
mov    -0x48(%rbp),%rax
movsbl (%rax),%edi
call   10a0 <isspace@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
test   $0x1,%al
jne    13c8 <killAll+0x1d8>
jmp    13de <killAll+0x1ee>
jmp    13cd <killAll+0x1dd>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    138b <killAll+0x19b>
jmp    13e3 <killAll+0x1f3>
mov    -0x48(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x62(%rbp)
je     140e <killAll+0x21e>
mov    -0x48(%rbp),%rax
movsbl (%rax),%edi
call   10a0 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x62(%rbp)
mov    -0x62(%rbp),%al
test   $0x1,%al
jne    141e <killAll+0x22e>
jmp    142f <killAll+0x23f>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    13e3 <killAll+0x1f3>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1444 <killAll+0x254>
jmp    1257 <killAll+0x67>
mov    -0x48(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%rax
jne    1490 <killAll+0x2a0>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
call   1100 <atoi@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x1,-0x4c(%rbp)
jle    148b <killAll+0x29b>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
call   1100 <atoi@plt>
mov    %rax,%rdi
mov    -0xc(%rbp),%esi
call   10d0 <kill@plt>
jmp    1490 <killAll+0x2a0>
jmp    1257 <killAll+0x67>
mov    -0x18(%rbp),%rdi
call   1090 <closedir@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<killAll>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %esi,%r15d
mov    %rdi,%rbx
mov    0x2dca(%rip),%r13
mov    0x0(%r13),%eax
mov    %rsp,%r14
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
lea    0xdd6(%rip),%rdi
call   1070 <opendir@plt>
test   %rax,%rax
je     13f5 <killAll+0x205>
mov    %rax,%r12
mov    %rbx,-0x38(%rbp)
mov    %r15d,-0x2c(%rbp)
mov    %rax,%rdi
call   10e0 <readdir@plt>
test   %rax,%rax
je     13ed <killAll+0x1fd>
mov    %rax,%r15
lea    0x6(%r14),%rax
mov    %rax,-0x48(%rbp)
mov    %r14,-0x40(%rbp)
jmp    1284 <killAll+0x94>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rdi
call   10e0 <readdir@plt>
mov    %rax,%r15
test   %rax,%rax
je     13ed <killAll+0x1fd>
mov    (%r15),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1270 <killAll+0x80>
mov    (%r15),%rdi
call   1100 <atoi@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <getpid@plt>
cmp    %rax,%rbx
je     1270 <killAll+0x80>
mov    %r14,%rdi
lea    0xd52(%rip),%rsi
call   1040 <strcpy@plt>
mov    (%r15),%rsi
mov    -0x48(%rbp),%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
lea    0xd3b(%rip),%rsi
call   1110 <strcat@plt>
mov    %r14,%rdi
lea    0xd34(%rip),%rsi
call   10f0 <fopen@plt>
test   %rax,%rax
je     1270 <killAll+0x80>
mov    %rax,%rbx
mov    0x0(%r13),%esi
add    $0xffffffff,%esi
mov    %r14,%rdi
mov    %rax,%rdx
call   10b0 <fgets@plt>
mov    %r12,%r14
mov    %r13,%r12
mov    %rax,%r13
mov    %rbx,%rdi
call   1060 <fclose@plt>
test   %r13,%r13
mov    %r12,%r13
mov    %r14,%r12
mov    -0x40(%rbp),%r14
je     1270 <killAll+0x80>
movslq 0x0(%r13),%rax
movb   $0x0,-0x1(%rax,%r14,1)
mov    %r14,%rdi
mov    $0xa,%esi
call   1080 <strchr@plt>
test   %rax,%rax
je     1343 <killAll+0x153>
movb   $0x0,(%rax)
mov    (%r14),%al
test   %al,%al
je     1270 <killAll+0x80>
mov    %r14,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   10a0 <isspace@plt>
test   %rax,%rax
jne    137e <killAll+0x18e>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1360 <killAll+0x170>
jmp    1270 <killAll+0x80>
mov    (%rbx),%al
test   %al,%al
je     1270 <killAll+0x80>
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   10a0 <isspace@plt>
test   %rax,%rax
je     13ae <killAll+0x1be>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1390 <killAll+0x1a0>
jmp    1270 <killAll+0x80>
cmpb   $0x0,(%rbx)
je     1270 <killAll+0x80>
mov    %rbx,%rdi
mov    -0x38(%rbp),%rsi
call   10c0 <strcmp@plt>
test   %rax,%rax
jne    1270 <killAll+0x80>
mov    (%r15),%rdi
call   1100 <atoi@plt>
cmp    $0x2,%eax
jl     1270 <killAll+0x80>
mov    %rax,%rdi
mov    -0x2c(%rbp),%esi
call   10d0 <kill@plt>
jmp    1270 <killAll+0x80>
mov    %r12,%rdi
call   1090 <closedir@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.dirent = type { i8* }
@NAME_MAX = global i32 0
@.str = [6 x i8] c"/proc\00"
@.str.1 = [7 x i8] c"/proc/\00"
@.str.2 = [8 x i8] c"/status\00"
@.str.3 = [2 x i8] c"r\00"
define void @killAll(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
%6 = alloca %struct.dirent*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%13 = load i32, i32* @NAME_MAX
%14 = zext i32 %13 to i64
%15 = call i8* @llvm.stacksave()
store i8* %15, i8** %7
%16 = alloca i8, i64 %14
store i64 %14, i64* %8
%17 = call i32* @opendir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32* %17, i32** %5
%18 = load i32*, i32** %5
%19 = icmp ne i32* %18, null
br i1 %19, label %21, label %20
20: ; preds = %2
store i32 1, i32* %9
br label %141
21: ; preds = %2
br label %22
22: ; preds = %137, %115, %61, %54, %41, %33, %21
%23 = load i32*, i32** %5
%24 = call %struct.dirent* @readdir(i32* %23)
store %struct.dirent* %24, %struct.dirent** %6
%25 = icmp ne %struct.dirent* %24, null
br i1 %25, label %26, label %138
26: ; preds = %22
%27 = load %struct.dirent*, %struct.dirent** %6
%28 = getelementptr inbounds %struct.dirent, %struct.dirent* %27, i32 0, i32 0
%29 = load i8*, i8** %28
%30 = load i8, i8* %29
%31 = call i32 @isdigit(i8 signext %30)
%32 = icmp ne i32 %31, 0
br i1 %32, label %34, label %33
33: ; preds = %26
br label %22
34: ; preds = %26
%35 = load %struct.dirent*, %struct.dirent** %6
%36 = getelementptr inbounds %struct.dirent, %struct.dirent* %35, i32 0, i32 0
%37 = load i8*, i8** %36
%38 = call i64 @atoi(i8* %37)
%39 = call i64 (...) @getpid()
%40 = icmp eq i64 %38, %39
br i1 %40, label %41, label %42
41: ; preds = %34
br label %22
42: ; preds = %34
%43 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%44 = getelementptr inbounds i8, i8* %16, i64 6
%45 = load %struct.dirent*, %struct.dirent** %6
%46 = getelementptr inbounds %struct.dirent, %struct.dirent* %45, i32 0, i32 0
%47 = load i8*, i8** %46
%48 = call i32 @strcpy(i8* %44, i8* %47)
%49 = getelementptr inbounds i8, i8* %16, i64 6
%50 = call i32 @strcat(i8* %49, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%51 = call i32* @fopen(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %51, i32** %10
%52 = load i32*, i32** %10
%53 = icmp eq i32* %52, null
br i1 %53, label %54, label %55
54: ; preds = %42
br label %22
55: ; preds = %42
%56 = load i32, i32* @NAME_MAX
%57 = sub nsw i32 %56, 1
%58 = load i32*, i32** %10
%59 = call i32* @fgets(i8* %16, i32 %57, i32* %58)
%60 = icmp eq i32* %59, null
br i1 %60, label %61, label %64
61: ; preds = %55
%62 = load i32*, i32** %10
%63 = call i32 @fclose(i32* %62)
br label %22
64: ; preds = %55
%65 = load i32*, i32** %10
%66 = call i32 @fclose(i32* %65)
%67 = load i32, i32* @NAME_MAX
%68 = sub nsw i32 %67, 1
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8, i8* %16, i64 %69
store i8 0, i8* %70
%71 = call i8* @strchr(i8* %16, i8 signext 10)
store i8* %71, i8** %11
%72 = load i8*, i8** %11
%73 = icmp ne i8* %72, null
br i1 %73, label %74, label %76
74: ; preds = %64
%75 = load i8*, i8** %11
store i8 0, i8* %75
br label %76
76: ; preds = %74, %64
store i8* %16, i8** %11
br label %77
77: ; preds = %91, %76
%78 = load i8*, i8** %11
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp ne i32 %80, 0
br i1 %81, label %82, label %88
82: ; preds = %77
%83 = load i8*, i8** %11
%84 = load i8, i8* %83
%85 = call i64 @isspace(i8 signext %84)
%86 = icmp ne i64 %85, 0
%87 = xor i1 %86, true
br label %88
88: ; preds = %82, %77
%89 = phi i1 [ false, %77 ], [ %87, %82 ]
br i1 %89, label %90, label %94
90: ; preds = %88
br label %91
91: ; preds = %90
%92 = load i8*, i8** %11
%93 = getelementptr inbounds i8, i8* %92, i32 1
store i8* %93, i8** %11
br label %77
94: ; preds = %88
br label %95
95: ; preds = %107, %94
%96 = load i8*, i8** %11
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp ne i32 %98, 0
br i1 %99, label %100, label %105
100: ; preds = %95
%101 = load i8*, i8** %11
%102 = load i8, i8* %101
%103 = call i64 @isspace(i8 signext %102)
%104 = icmp ne i64 %103, 0
br label %105
105: ; preds = %100, %95
%106 = phi i1 [ false, %95 ], [ %104, %100 ]
br i1 %106, label %107, label %110
107: ; preds = %105
%108 = load i8*, i8** %11
%109 = getelementptr inbounds i8, i8* %108, i32 1
store i8* %109, i8** %11
br label %95
110: ; preds = %105
%111 = load i8*, i8** %11
%112 = load i8, i8* %111
%113 = sext i8 %112 to i32
%114 = icmp eq i32 %113, 0
br i1 %114, label %115, label %116
115: ; preds = %110
br label %22
116: ; preds = %110
%117 = load i8*, i8** %11
%118 = load i8*, i8** %3
%119 = call i64 @strcmp(i8* %117, i8* %118)
%120 = icmp eq i64 %119, 0
br i1 %120, label %121, label %137
121: ; preds = %116
%122 = load %struct.dirent*, %struct.dirent** %6
%123 = getelementptr inbounds %struct.dirent, %struct.dirent* %122, i32 0, i32 0
%124 = load i8*, i8** %123
%125 = call i64 @atoi(i8* %124)
%126 = trunc i64 %125 to i32
store i32 %126, i32* %12
%127 = load i32, i32* %12
%128 = icmp sgt i32 %127, 1
br i1 %128, label %129, label %136
129: ; preds = %121
%130 = load %struct.dirent*, %struct.dirent** %6
%131 = getelementptr inbounds %struct.dirent, %struct.dirent* %130, i32 0, i32 0
%132 = load i8*, i8** %131
%133 = call i64 @atoi(i8* %132)
%134 = load i32, i32* %4
%135 = call i32 @kill(i64 %133, i32 %134)
br label %136
136: ; preds = %129, %121
br label %137
137: ; preds = %136, %116
br label %22
138: ; preds = %22
%139 = load i32*, i32** %5
%140 = call i32 @closedir(i32* %139)
store i32 0, i32* %9
br label %141
141: ; preds = %138, %20
%142 = load i8*, i8** %7
%143 = load i32, i32* %9
switch i32 %143, label %145 [
i32 0, label %144
i32 1, label %144
]
144: ; preds = %141, %141
ret void
145: ; preds = %141
unreachable
}

LLVM IR (-O2):
%struct.dirent = type { i8* }
@NAME_MAX = global i32 0
@.str = [6 x i8] c"/proc\00"
@.str.1 = [7 x i8] c"/proc/\00"
@.str.2 = [8 x i8] c"/status\00"
@.str.3 = [2 x i8] c"r\00"
define void @killAll(i8* %0, i32 %1) {
%3 = load i32, i32* @NAME_MAX
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = tail call i32* @opendir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %88, label %8
8: ; preds = %2
%9 = call %struct.dirent* @readdir(i32* %6)
%10 = icmp eq %struct.dirent* %9, null
br i1 %10, label %86, label %11
11: ; preds = %8
%12 = getelementptr inbounds i8, i8* %5, i64 6
br label %13
13: ; preds = %11, %83
%14 = phi %struct.dirent* [ %9, %11 ], [ %84, %83 ]
%15 = getelementptr inbounds %struct.dirent, %struct.dirent* %14, i64 0, i32 0
%16 = load i8*, i8** %15
%17 = load i8, i8* %16
%18 = call i32 @isdigit(i8 signext %17)
%19 = icmp eq i32 %18, 0
br i1 %19, label %83, label %20
20: ; preds = %13
%21 = load i8*, i8** %15
%22 = call i64 @atoi(i8* %21)
%23 = call i64 (...) @getpid()
%24 = icmp eq i64 %22, %23
br i1 %24, label %83, label %25
25: ; preds = %20
%26 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%27 = load i8*, i8** %15
%28 = call i32 @strcpy(i8* %12, i8* %27)
%29 = call i32 @strcat(i8* %12, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%30 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp eq i32* %30, null
br i1 %31, label %83, label %32
32: ; preds = %25
%33 = load i32, i32* @NAME_MAX
%34 = add nsw i32 %33, -1
%35 = call i32* @fgets(i8* %5, i32 %34, i32* %30)
%36 = icmp eq i32* %35, null
%37 = call i32 @fclose(i32* %30)
br i1 %36, label %83, label %38
38: ; preds = %32
%39 = load i32, i32* @NAME_MAX
%40 = add nsw i32 %39, -1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8, i8* %5, i64 %41
store i8 0, i8* %42
%43 = call i8* @strchr(i8* %5, i8 signext 10)
%44 = icmp eq i8* %43, null
br i1 %44, label %46, label %45
45: ; preds = %38
store i8 0, i8* %43
br label %46
46: ; preds = %45, %38
%47 = load i8, i8* %5
%48 = icmp eq i8 %47, 0
br i1 %48, label %83, label %49
49: ; preds = %46, %54
%50 = phi i8 [ %56, %54 ], [ %47, %46 ]
%51 = phi i8* [ %55, %54 ], [ %5, %46 ]
%52 = call i64 @isspace(i8 signext %50)
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %58
54: ; preds = %49
%55 = getelementptr inbounds i8, i8* %51, i64 1
%56 = load i8, i8* %55
%57 = icmp eq i8 %56, 0
br i1 %57, label %83, label %49
58: ; preds = %49
%59 = load i8, i8* %51
%60 = icmp eq i8 %59, 0
br i1 %60, label %83, label %61
61: ; preds = %58, %66
%62 = phi i8 [ %68, %66 ], [ %59, %58 ]
%63 = phi i8* [ %67, %66 ], [ %51, %58 ]
%64 = call i64 @isspace(i8 signext %62)
%65 = icmp eq i64 %64, 0
br i1 %65, label %70, label %66
66: ; preds = %61
%67 = getelementptr inbounds i8, i8* %63, i64 1
%68 = load i8, i8* %67
%69 = icmp eq i8 %68, 0
br i1 %69, label %83, label %61
70: ; preds = %61
%71 = load i8, i8* %63
%72 = icmp eq i8 %71, 0
br i1 %72, label %83, label %73
73: ; preds = %70
%74 = call i64 @strcmp(i8* %63, i8* %0)
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %83
76: ; preds = %73
%77 = load i8*, i8** %15
%78 = call i64 @atoi(i8* %77)
%79 = trunc i64 %78 to i32
%80 = icmp sgt i32 %79, 1
br i1 %80, label %81, label %83
81: ; preds = %76
%82 = call i32 @kill(i64 %78, i32 %1)
br label %83
83: ; preds = %54, %66, %32, %46, %58, %73, %81, %76, %70, %25, %20, %13
%84 = call %struct.dirent* @readdir(i32* %6)
%85 = icmp eq %struct.dirent* %84, null
br i1 %85, label %86, label %13
86: ; preds = %83, %8
%87 = call i32 @closedir(i32* %6)
br label %88
88: ; preds = %2, %86
ret void
}