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

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
scalar_t__ doesMatch(char *, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ *opendir(char *);
int /*<<< orphan*/ printf(char *);
struct dirent *readdir(int /*<<< orphan*/ *);
int readlink(char *, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int isAppRunning(char *pzName, char *pzCommandPattern) {
  DIR *proc_fd = opendir("/proc");
  if (proc_fd != NULL) {
    struct dirent *procEntry;
    while ((procEntry = readdir(proc_fd)) != NULL) {
      if (doesMatch("^[0-9][0-9]*$", procEntry->d_name)) {
        char exePath[64] = {
            0,
        };
        char link[256] = {
            0,
        };
        char cmdlinePath[64] = {
            0,
        };
        char buffer[1024] = {
            0,
        };
        int len;
        sprintf(exePath, "/proc/%s/exe", procEntry->d_name);
        sprintf(cmdlinePath, "/proc/%s/cmdline", procEntry->d_name);
        if ((len = readlink(exePath, link, sizeof(link) - 1)) != -1) {
          char executable[256] = {
              0,
          };
          strcat(executable, pzName);
          strcat(executable, "$");
          if (!doesMatch(executable, link)) {
            continue;
          }
        } else
          continue;
        if (pzCommandPattern != NULL) {
          FILE *cmdline = fopen(cmdlinePath, "r");
          if (!cmdline) {
            continue;
          }
          if (fgets(buffer, 1024, cmdline) == NULL) {
            fclose(cmdline);
            continue;
          }
          fclose(cmdline);
          if (!doesMatch(pzCommandPattern, buffer)) {
            continue;
          }
        }
        closedir(proc_fd);
        return atoi(procEntry->d_name);
      }
    }
    closedir(proc_fd);
  } else {
    printf("/proc failed to open\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<isAppRunning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x6d0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    0xe16(%rip),%rdi
call   1050 <opendir@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1402 <isAppRunning+0x232>
jmp    1203 <isAppRunning+0x33>
mov    -0x20(%rbp),%rdi
call   10b0 <readdir@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     13f4 <isAppRunning+0x224>
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
lea    0xdde(%rip),%rdi
call   1070 <doesMatch@plt>
cmp    $0x0,%rax
je     13ef <isAppRunning+0x21f>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    -0x170(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1080 <memset@plt>
lea    -0x1b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    -0x5b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1080 <memset@plt>
lea    -0x70(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
lea    0xd82(%rip),%rsi
call   10f0 <sprintf@plt>
lea    -0x1b0(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
lea    0xd75(%rip),%rsi
call   10f0 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    -0x170(%rbp),%rsi
mov    $0xff,%edx
call   1030 <readlink@plt>
mov    %eax,-0x5b4(%rbp)
cmp    $0xffffffff,%eax
je     1332 <isAppRunning+0x162>
lea    -0x6c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1080 <memset@plt>
lea    -0x6c0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   10e0 <strcat@plt>
lea    -0x6c0(%rbp),%rdi
lea    0xd0c(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x6c0(%rbp),%rdi
lea    -0x170(%rbp),%rsi
call   1070 <doesMatch@plt>
cmp    $0x0,%rax
jne    132d <isAppRunning+0x15d>
jmp    1203 <isAppRunning+0x33>
jmp    1337 <isAppRunning+0x167>
jmp    1203 <isAppRunning+0x33>
cmpq   $0x0,-0x18(%rbp)
je     13d2 <isAppRunning+0x202>
lea    -0x1b0(%rbp),%rdi
lea    0xce2(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x6c8(%rbp)
cmpq   $0x0,-0x6c8(%rbp)
jne    136f <isAppRunning+0x19f>
jmp    1203 <isAppRunning+0x33>
lea    -0x5b0(%rbp),%rdi
mov    -0x6c8(%rbp),%rdx
mov    $0x400,%esi
call   10a0 <fgets@plt>
cmp    $0x0,%rax
jne    13a2 <isAppRunning+0x1d2>
mov    -0x6c8(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1203 <isAppRunning+0x33>
mov    -0x6c8(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x18(%rbp),%rdi
lea    -0x5b0(%rbp),%rsi
call   1070 <doesMatch@plt>
cmp    $0x0,%rax
jne    13cd <isAppRunning+0x1fd>
jmp    1203 <isAppRunning+0x33>
jmp    13d2 <isAppRunning+0x202>
mov    -0x20(%rbp),%rdi
call   1090 <closedir@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x4(%rbp)
jmp    1415 <isAppRunning+0x245>
jmp    1203 <isAppRunning+0x33>
mov    -0x20(%rbp),%rdi
call   1090 <closedir@plt>
jmp    140e <isAppRunning+0x23e>
lea    0xc2b(%rip),%rdi
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x6d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAppRunning>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x698,%rsp
mov    %rsi,(%rsp)
mov    %rdi,%r14
lea    0xe11(%rip),%rdi
call   1060 <opendir@plt>
test   %rax,%rax
je     14a5 <isAppRunning+0x2d5>
mov    %rax,%r15
mov    %rax,%rdi
call   10b0 <readdir@plt>
test   %rax,%rax
je     149b <isAppRunning+0x2cb>
mov    %rax,%rbx
lea    0xdeb(%rip),%r12
mov    %r15,0x8(%rsp)
jmp    1244 <isAppRunning+0x74>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
call   10b0 <readdir@plt>
mov    %rax,%rbx
test   %rax,%rax
je     149b <isAppRunning+0x2cb>
mov    (%rbx),%rsi
mov    %r12,%rdi
call   1070 <doesMatch@plt>
test   %rax,%rax
je     1230 <isAppRunning+0x60>
xorps  %xmm0,%xmm0
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
mov    $0x400,%edx
lea    0x290(%rsp),%rdi
xor    %esi,%esi
call   1080 <memset@plt>
mov    (%rbx),%rdx
lea    0x50(%rsp),%rbp
mov    %rbp,%rdi
lea    0xcec(%rip),%rsi
call   10f0 <sprintf@plt>
mov    (%rbx),%rdx
lea    0x10(%rsp),%rdi
lea    0xce5(%rip),%rsi
call   10f0 <sprintf@plt>
mov    %rbp,%rdi
lea    0x90(%rsp),%rsi
mov    $0xff,%edx
call   1040 <readlink@plt>
cmp    $0xffffffff,%eax
je     1230 <isAppRunning+0x60>
xorps  %xmm0,%xmm0
movaps %xmm0,0x280(%rsp)
movaps %xmm0,0x270(%rsp)
movaps %xmm0,0x260(%rsp)
movaps %xmm0,0x250(%rsp)
movaps %xmm0,0x240(%rsp)
movaps %xmm0,0x230(%rsp)
movaps %xmm0,0x220(%rsp)
movaps %xmm0,0x210(%rsp)
movaps %xmm0,0x200(%rsp)
movaps %xmm0,0x1f0(%rsp)
movaps %xmm0,0x1e0(%rsp)
movaps %xmm0,0x1d0(%rsp)
movaps %xmm0,0x1c0(%rsp)
movaps %xmm0,0x1b0(%rsp)
movaps %xmm0,0x1a0(%rsp)
movaps %xmm0,0x190(%rsp)
lea    0x190(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
call   10e0 <strcat@plt>
mov    %rbp,%rdi
lea    0xc13(%rip),%rsi
call   10e0 <strcat@plt>
mov    %rbp,%rdi
lea    0x90(%rsp),%rsi
call   1070 <doesMatch@plt>
test   %rax,%rax
je     1230 <isAppRunning+0x60>
cmpq   $0x0,(%rsp)
je     1489 <isAppRunning+0x2b9>
lea    0x10(%rsp),%rdi
lea    0xc02(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1230 <isAppRunning+0x60>
mov    %rax,%r13
lea    0x290(%rsp),%rdi
mov    $0x400,%esi
mov    %rax,%rdx
call   10a0 <fgets@plt>
mov    %rax,%rbp
mov    %r13,%rdi
call   1050 <fclose@plt>
test   %rbp,%rbp
mov    0x8(%rsp),%r15
je     1230 <isAppRunning+0x60>
mov    (%rsp),%rdi
lea    0x290(%rsp),%rsi
call   1070 <doesMatch@plt>
test   %rax,%rax
je     1230 <isAppRunning+0x60>
mov    %r15,%rdi
call   1090 <closedir@plt>
mov    (%rbx),%rdi
call   10d0 <atoi@plt>
jmp    14b3 <isAppRunning+0x2e3>
mov    %r15,%rdi
call   1090 <closedir@plt>
jmp    14b1 <isAppRunning+0x2e1>
lea    0xb88(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x698,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.dirent = type { i8* }
@.str = [6 x i8] c"/proc\00"
@.str.1 = [14 x i8] c"^[0-9][0-9]*$\00"
@.str.2 = [13 x i8] c"/proc/%s/exe\00"
@.str.3 = [17 x i8] c"/proc/%s/cmdline\00"
@.str.4 = [2 x i8] c"$\00"
@.str.5 = [2 x i8] c"r\00"
@.str.6 = [22 x i8] c"/proc failed to open\0A\00"
define i32 @isAppRunning(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca %struct.dirent*
%8 = alloca [64 x i8]
%9 = alloca [256 x i8]
%10 = alloca [64 x i8]
%11 = alloca [1024 x i8]
%12 = alloca i32
%13 = alloca [256 x i8]
%14 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
%15 = call i32* @opendir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32* %15, i32** %6
%16 = load i32*, i32** %6
%17 = icmp ne i32* %16, null
br i1 %17, label %18, label %99
18: ; preds = %2
br label %19
19: ; preds = %95, %86, %76, %70, %61, %59, %18
%20 = load i32*, i32** %6
%21 = call %struct.dirent* @readdir(i32* %20)
store %struct.dirent* %21, %struct.dirent** %7
%22 = icmp ne %struct.dirent* %21, null
br i1 %22, label %23, label %96
23: ; preds = %19
%24 = load %struct.dirent*, %struct.dirent** %7
%25 = getelementptr inbounds %struct.dirent, %struct.dirent* %24, i32 0, i32 0
%26 = load i8*, i8** %25
%27 = call i64 @doesMatch(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %95
29: ; preds = %23
%30 = bitcast [64 x i8]* %8 to i8*
%31 = bitcast [256 x i8]* %9 to i8*
%32 = bitcast [64 x i8]* %10 to i8*
%33 = bitcast [1024 x i8]* %11 to i8*
%34 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%35 = load %struct.dirent*, %struct.dirent** %7
%36 = getelementptr inbounds %struct.dirent, %struct.dirent* %35, i32 0, i32 0
%37 = load i8*, i8** %36
%38 = call i32 @sprintf(i8* %34, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %37)
%39 = getelementptr inbounds [64 x i8], [64 x i8]* %10, i64 0, i64 0
%40 = load %struct.dirent*, %struct.dirent** %7
%41 = getelementptr inbounds %struct.dirent, %struct.dirent* %40, i32 0, i32 0
%42 = load i8*, i8** %41
%43 = call i32 @sprintf(i8* %39, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* %42)
%44 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%45 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%46 = call i32 @readlink(i8* %44, i8* %45, i32 255)
store i32 %46, i32* %12
%47 = icmp ne i32 %46, -1
br i1 %47, label %48, label %61
48: ; preds = %29
%49 = bitcast [256 x i8]* %13 to i8*
%50 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%51 = load i8*, i8** %4
%52 = call i32 @strcat(i8* %50, i8* %51)
%53 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%54 = call i32 @strcat(i8* %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%55 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%56 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%57 = call i64 @doesMatch(i8* %55, i8* %56)
%58 = icmp ne i64 %57, 0
br i1 %58, label %60, label %59
59: ; preds = %48
br label %19
60: ; preds = %48
br label %62
61: ; preds = %29
br label %19
62: ; preds = %60
%63 = load i8*, i8** %5
%64 = icmp ne i8* %63, null
br i1 %64, label %65, label %88
65: ; preds = %62
%66 = getelementptr inbounds [64 x i8], [64 x i8]* %10, i64 0, i64 0
%67 = call i32* @fopen(i8* %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %67, i32** %14
%68 = load i32*, i32** %14
%69 = icmp ne i32* %68, null
br i1 %69, label %71, label %70
70: ; preds = %65
br label %19
71: ; preds = %65
%72 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%73 = load i32*, i32** %14
%74 = call i32* @fgets(i8* %72, i32 1024, i32* %73)
%75 = icmp eq i32* %74, null
br i1 %75, label %76, label %79
76: ; preds = %71
%77 = load i32*, i32** %14
%78 = call i32 @fclose(i32* %77)
br label %19
79: ; preds = %71
%80 = load i32*, i32** %14
%81 = call i32 @fclose(i32* %80)
%82 = load i8*, i8** %5
%83 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%84 = call i64 @doesMatch(i8* %82, i8* %83)
%85 = icmp ne i64 %84, 0
br i1 %85, label %87, label %86
86: ; preds = %79
br label %19
87: ; preds = %79
br label %88
88: ; preds = %87, %62
%89 = load i32*, i32** %6
%90 = call i32 @closedir(i32* %89)
%91 = load %struct.dirent*, %struct.dirent** %7
%92 = getelementptr inbounds %struct.dirent, %struct.dirent* %91, i32 0, i32 0
%93 = load i8*, i8** %92
%94 = call i32 @atoi(i8* %93)
store i32 %94, i32* %3
br label %102
95: ; preds = %23
br label %19
96: ; preds = %19
%97 = load i32*, i32** %6
%98 = call i32 @closedir(i32* %97)
br label %101
99: ; preds = %2
%100 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %101
101: ; preds = %99, %96
store i32 0, i32* %3
br label %102
102: ; preds = %101, %88
%103 = load i32, i32* %3
ret i32 %103
}

LLVM IR (-O2):
%struct.dirent = type { i8* }
@.str = [6 x i8] c"/proc\00"
@.str.1 = [14 x i8] c"^[0-9][0-9]*$\00"
@.str.2 = [13 x i8] c"/proc/%s/exe\00"
@.str.3 = [17 x i8] c"/proc/%s/cmdline\00"
@.str.4 = [2 x i8] c"$\00"
@.str.5 = [2 x i8] c"r\00"
@str = [21 x i8] c"/proc failed to open\00"
define i32 @isAppRunning(i8* %0, i8* %1) {
%3 = alloca [64 x i8]
%4 = alloca [256 x i8]
%5 = alloca [64 x i8]
%6 = alloca [1024 x i8]
%7 = alloca [256 x i8]
%8 = tail call i32* @opendir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i32* %8, null
br i1 %9, label %60, label %10
10: ; preds = %2
%11 = call %struct.dirent* @readdir(i32* %8)
%12 = icmp eq %struct.dirent* %11, null
br i1 %12, label %58, label %13
13: ; preds = %10
%14 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%16 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%18 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%19 = icmp eq i8* %1, null
br label %20
20: ; preds = %13, %55
%21 = phi %struct.dirent* [ %11, %13 ], [ %56, %55 ]
%22 = getelementptr inbounds %struct.dirent, %struct.dirent* %21, i64 0, i32 0
%23 = load i8*, i8** %22
%24 = call i64 @doesMatch(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %23)
%25 = icmp eq i64 %24, 0
br i1 %25, label %55, label %26
26: ; preds = %20
%27 = load i8*, i8** %22
%28 = call i32 @sprintf(i8* %14, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %27)
%29 = load i8*, i8** %22
%30 = call i32 @sprintf(i8* %16, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* %29)
%31 = call i32 @readlink(i8* %14, i8* %15, i32 255)
%32 = icmp eq i32 %31, -1
br i1 %32, label %53, label %33
33: ; preds = %26
%34 = call i32 @strcat(i8* %18, i8* %0)
%35 = call i32 @strcat(i8* %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%36 = call i64 @doesMatch(i8* %18, i8* %15)
%37 = icmp eq i64 %36, 0
br i1 %37, label %53, label %38
38: ; preds = %33
br i1 %19, label %49, label %39
39: ; preds = %38
%40 = call i32* @fopen(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%41 = icmp eq i32* %40, null
br i1 %41, label %53, label %42
42: ; preds = %39
%43 = call i32* @fgets(i8* %17, i32 1024, i32* %40)
%44 = icmp eq i32* %43, null
%45 = call i32 @fclose(i32* %40)
br i1 %44, label %53, label %46
46: ; preds = %42
%47 = call i64 @doesMatch(i8* %1, i8* %17)
%48 = icmp eq i64 %47, 0
br i1 %48, label %54, label %49
49: ; preds = %38, %46
%50 = call i32 @closedir(i32* %8)
%51 = load i8*, i8** %22
%52 = call i32 @atoi(i8* %51)
br label %62
53: ; preds = %42, %33, %26, %39
br label %55
54: ; preds = %46
br label %55
55: ; preds = %54, %53, %20
%56 = call %struct.dirent* @readdir(i32* %8)
%57 = icmp eq %struct.dirent* %56, null
br i1 %57, label %58, label %20
58: ; preds = %55, %10
%59 = call i32 @closedir(i32* %8)
br label %62
60: ; preds = %2
%61 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %62
62: ; preds = %49, %60, %58
%63 = phi i32 [ 0, %58 ], [ 0, %60 ], [ %52, %49 ]
ret i32 %63
}