#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 ssize_t;
typedef int /*<<< orphan*/ pathBuff;
typedef int /*<<< orphan*/ defaultPath;

/* Variables and functions */
int /*<<< orphan*/ F_OK;
int PATH_MAX;
int access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ *getcwd(char *, int);
char *malloc(int);
int readlink(char *, char *, int);
int /*<<< orphan*/ snprintf(char *, size_t, char *, char *, char *);
int /*<<< orphan*/ stderr;
char *strdup(char const *);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
char *getAbsoluteProgramPath(int argc, char **argv, size_t *pathLength) {
  static const char *defaultPath =
      "/data/data/com.apython.python.pythonhost/python";
  char pathBuff[PATH_MAX];
  ssize_t length = readlink("/proc/self/exe", pathBuff,
                            sizeof(pathBuff) / sizeof(pathBuff[0]) - 1);
  if (length != -1) {
    *pathLength = (size_t)length;
    char *path = malloc(sizeof(char) * (length + 1));
    if (path == NULL) {
      fprintf(stderr,
              "Warning: Failed to allocate %d bytes for the program path!\n",
              length + 1);
    } else {
      strncpy(path, pathBuff, (size_t)length);
      path[length] = '\0';
      return path;
    }
  }
  if (argc > 0) {
    if (argv[0][0] == '/') {
      if (access(argv[0], F_OK) != -1) {
        *pathLength = strlen(argv[0]);
        char *path = strdup(argv[0]);
        if (path != NULL) {
          return path;
        }
        fprintf(stderr,
                "Warning: Failed to allocate %d bytes for the program path!\n",
                *pathLength);
      }
    } else {
      if (getcwd(pathBuff, sizeof(pathBuff) / sizeof(pathBuff[0])) != NULL &&
          pathBuff[0] != '(') {
        *pathLength = strlen(argv[0]) + 1 + strlen(pathBuff);
        char *path = malloc(sizeof(char) * (*pathLength));
        if (path != NULL) {
          snprintf(path, *pathLength, "%s/%s", pathBuff, argv[0]);
          if (access(argv[0], F_OK) != -1) {
            return path;
          }
          free(path);
        }
        fprintf(stderr,
                "Warning: Failed to allocate %d bytes for the program path!\n",
                *pathLength);
      }
    }
  }
  *pathLength = sizeof(defaultPath) / sizeof(defaultPath[0]);
  return strdup(defaultPath);
}


x86 assembly (clang, -O0):
<getAbsoluteProgramPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    0x2e36(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x68(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x60(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x30(%rbp)
shr    $0x0,%rax
sub    $0x1,%rax
mov    %eax,%edx
lea    0xe3c(%rip),%rdi
call   1050 <readlink@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
je     128c <getAbsoluteProgramPath+0xec>
movslq -0x34(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1256 <getAbsoluteProgramPath+0xb6>
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
mov    -0x34(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
lea    0xdf3(%rip),%rsi
call   1090 <fprintf@plt>
jmp    1287 <getAbsoluteProgramPath+0xe7>
mov    -0x60(%rbp),%rsi
mov    -0x40(%rbp),%rdi
movslq -0x34(%rbp),%rdx
call   1040 <strncpy@plt>
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x40(%rbp),%rax
mov    %rax,-0x8(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    144c <getAbsoluteProgramPath+0x2ac>
jmp    128c <getAbsoluteProgramPath+0xec>
cmpl   $0x0,-0xc(%rbp)
jle    142a <getAbsoluteProgramPath+0x28a>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    132d <getAbsoluteProgramPath+0x18d>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    0x2d11(%rip),%rax
mov    (%rax),%esi
call   10b0 <access@plt>
cmp    $0xffffffff,%eax
je     1328 <getAbsoluteProgramPath+0x188>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1060 <strlen@plt>
movslq %eax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   10c0 <strdup@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
je     130c <getAbsoluteProgramPath+0x16c>
mov    -0x50(%rbp),%rax
mov    %rax,-0x8(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    144c <getAbsoluteProgramPath+0x2ac>
mov    0x2cc5(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
lea    0xd1c(%rip),%rsi
call   1090 <fprintf@plt>
jmp    1425 <getAbsoluteProgramPath+0x285>
mov    -0x60(%rbp),%rdi
mov    -0x68(%rbp),%rax
shr    $0x0,%rax
mov    %eax,%esi
call   1080 <getcwd@plt>
cmp    $0x0,%rax
je     1420 <getAbsoluteProgramPath+0x280>
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
je     1420 <getAbsoluteProgramPath+0x280>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1060 <strlen@plt>
mov    -0x60(%rbp),%rdi
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x6c(%rbp),%eax
add    %ecx,%eax
movslq %eax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
je     1404 <getAbsoluteProgramPath+0x264>
mov    -0x60(%rbp),%rcx
mov    -0x58(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%r8
lea    0xcb7(%rip),%rdx
call   1070 <snprintf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    0x2bf1(%rip),%rax
mov    (%rax),%esi
call   10b0 <access@plt>
cmp    $0xffffffff,%eax
je     13fb <getAbsoluteProgramPath+0x25b>
mov    -0x58(%rbp),%rax
mov    %rax,-0x8(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    144c <getAbsoluteProgramPath+0x2ac>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    0x2bcd(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
lea    0xc24(%rip),%rsi
call   1090 <fprintf@plt>
jmp    1425 <getAbsoluteProgramPath+0x285>
jmp    142a <getAbsoluteProgramPath+0x28a>
mov    -0x20(%rbp),%rax
movq   $0x8,(%rax)
mov    0x2c34(%rip),%rdi
call   10c0 <strdup@plt>
mov    %rax,-0x8(%rbp)
movl   $0x1,-0x44(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x8(%rbp),%rax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAbsoluteProgramPath>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %edi,-0x2c(%rbp)
mov    0x2e2f(%rip),%rax
mov    (%rax),%r12d
mov    %rsp,%r13
mov    %r12,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
lea    -0x1(%r12),%edx
lea    0xe4c(%rip),%rdi
mov    %r13,%rsi
call   1050 <readlink@plt>
cmp    $0xffffffff,%eax
je     1246 <getAbsoluteProgramPath+0xa6>
mov    %eax,%r14d
mov    %r15,-0x38(%rbp)
movslq %eax,%r15
mov    %r15,(%rbx)
add    $0x1,%r14d
mov    %r14d,%edi
call   10a0 <malloc@plt>
test   %rax,%rax
je     122a <getAbsoluteProgramPath+0x8a>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
call   1040 <strncpy@plt>
movb   $0x0,(%rbx,%r15,1)
jmp    1379 <getAbsoluteProgramPath+0x1d9>
movslq %r14d,%rdx
mov    0x2da4(%rip),%rax
mov    (%rax),%edi
lea    0xe02(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x38(%rbp),%r15
cmpl   $0x0,-0x2c(%rbp)
jle    1363 <getAbsoluteProgramPath+0x1c3>
mov    (%r15),%rdi
cmpb   $0x2f,(%rdi)
jne    12b4 <getAbsoluteProgramPath+0x114>
mov    0x2d69(%rip),%rax
mov    (%rax),%esi
call   10b0 <access@plt>
cmp    $0xffffffff,%eax
je     1363 <getAbsoluteProgramPath+0x1c3>
mov    (%r15),%rdi
call   1060 <strlen@plt>
movslq %eax,%r14
mov    %r14,(%rbx)
mov    (%r15),%rdi
call   10c0 <strdup@plt>
mov    %rbx,%r15
mov    %rax,%rbx
test   %rax,%rax
jne    1379 <getAbsoluteProgramPath+0x1d9>
mov    0x2d3d(%rip),%rax
mov    (%rax),%edi
lea    0xd9b(%rip),%rsi
mov    %r14,%rdx
call   1090 <fprintf@plt>
mov    %r15,%rbx
jmp    1363 <getAbsoluteProgramPath+0x1c3>
mov    %r13,%rdi
mov    %r12d,%esi
call   1080 <getcwd@plt>
test   %rax,%rax
je     1363 <getAbsoluteProgramPath+0x1c3>
cmpb   $0x28,0x0(%r13)
je     1363 <getAbsoluteProgramPath+0x1c3>
mov    (%r15),%rdi
call   1060 <strlen@plt>
mov    %eax,%r14d
mov    %r13,%rdi
call   1060 <strlen@plt>
add    %r14d,%eax
add    $0x1,%eax
movslq %eax,%r14
mov    %r15,%r12
mov    %rbx,%r15
mov    %r14,(%rbx)
mov    %r14d,%edi
call   10a0 <malloc@plt>
test   %rax,%rax
je     1348 <getAbsoluteProgramPath+0x1a8>
mov    %rax,%rbx
mov    (%r12),%r8
lea    0xd68(%rip),%rdx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r13,%rcx
call   1070 <snprintf@plt>
mov    (%r12),%rdi
mov    0x2c9c(%rip),%rax
mov    (%rax),%esi
call   10b0 <access@plt>
cmp    $0xffffffff,%eax
jne    1379 <getAbsoluteProgramPath+0x1d9>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r15,%rbx
mov    (%r15),%r14
jmp    134b <getAbsoluteProgramPath+0x1ab>
mov    %r15,%rbx
mov    0x2c86(%rip),%rax
mov    (%rax),%edi
lea    0xce4(%rip),%rsi
mov    %r14,%rdx
call   1090 <fprintf@plt>
movq   $0x8,(%rbx)
lea    0xc8f(%rip),%rdi
call   10c0 <strdup@plt>
mov    %rax,%rbx
mov    %rbx,%rax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@getAbsoluteProgramPath.defaultPath = internal global i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i32 0, i32 0)
@.str = [48 x i8] c"/data/data/com.apython.python.pythonhost/python\00"
@PATH_MAX = global i32 0
@.str.1 = [15 x i8] c"/proc/self/exe\00"
@stderr = global i32 0
@.str.2 = [60 x i8] c"Warning: Failed to allocate %d bytes for the program path!\0A\00"
@F_OK = global i32 0
@.str.3 = [6 x i8] c"%s/%s\00"
define i8* @getAbsoluteProgramPath(i32 %0, i8** %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i64*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8*
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i64* %2, i64** %7
%15 = load i32, i32* @PATH_MAX
%16 = zext i32 %15 to i64
%17 = call i8* @llvm.stacksave()
store i8* %17, i8** %8
%18 = alloca i8, i64 %16
store i64 %16, i64* %9
%19 = udiv i64 %16, 1
%20 = sub i64 %19, 1
%21 = trunc i64 %20 to i32
%22 = call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %18, i32 %21)
store i32 %22, i32* %10
%23 = load i32, i32* %10
%24 = icmp ne i32 %23, -1
br i1 %24, label %25, label %54
25: ; preds = %3
%26 = load i32, i32* %10
%27 = sext i32 %26 to i64
%28 = load i64*, i64** %7
store i64 %27, i64* %28
%29 = load i32, i32* %10
%30 = add nsw i32 %29, 1
%31 = sext i32 %30 to i64
%32 = mul i64 1, %31
%33 = trunc i64 %32 to i32
%34 = call i8* @malloc(i32 %33)
store i8* %34, i8** %11
%35 = load i8*, i8** %11
%36 = icmp eq i8* %35, null
br i1 %36, label %37, label %43
37: ; preds = %25
%38 = load i32, i32* @stderr
%39 = load i32, i32* %10
%40 = add nsw i32 %39, 1
%41 = sext i32 %40 to i64
%42 = call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i64 %41)
br label %53
43: ; preds = %25
%44 = load i8*, i8** %11
%45 = load i32, i32* %10
%46 = sext i32 %45 to i64
%47 = call i32 @strncpy(i8* %44, i8* %18, i64 %46)
%48 = load i8*, i8** %11
%49 = load i32, i32* %10
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8, i8* %48, i64 %50
store i8 0, i8* %51
%52 = load i8*, i8** %11
store i8* %52, i8** %4
store i32 1, i32* %12
br label %150
53: ; preds = %37
br label %54
54: ; preds = %53, %3
%55 = load i32, i32* %5
%56 = icmp sgt i32 %55, 0
br i1 %56, label %57, label %146
57: ; preds = %54
%58 = load i8**, i8*** %6
%59 = getelementptr inbounds i8*, i8** %58, i64 0
%60 = load i8*, i8** %59
%61 = getelementptr inbounds i8, i8* %60, i64 0
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 47
br i1 %64, label %65, label %93
65: ; preds = %57
%66 = load i8**, i8*** %6
%67 = getelementptr inbounds i8*, i8** %66, i64 0
%68 = load i8*, i8** %67
%69 = load i32, i32* @F_OK
%70 = call i32 @access(i8* %68, i32 %69)
%71 = icmp ne i32 %70, -1
br i1 %71, label %72, label %92
72: ; preds = %65
%73 = load i8**, i8*** %6
%74 = getelementptr inbounds i8*, i8** %73, i64 0
%75 = load i8*, i8** %74
%76 = call i32 @strlen(i8* %75)
%77 = sext i32 %76 to i64
%78 = load i64*, i64** %7
store i64 %77, i64* %78
%79 = load i8**, i8*** %6
%80 = getelementptr inbounds i8*, i8** %79, i64 0
%81 = load i8*, i8** %80
%82 = call i8* @strdup(i8* %81)
store i8* %82, i8** %13
%83 = load i8*, i8** %13
%84 = icmp ne i8* %83, null
br i1 %84, label %85, label %87
85: ; preds = %72
%86 = load i8*, i8** %13
store i8* %86, i8** %4
store i32 1, i32* %12
br label %150
87: ; preds = %72
%88 = load i32, i32* @stderr
%89 = load i64*, i64** %7
%90 = load i64, i64* %89
%91 = call i32 @fprintf(i32 %88, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i64 %90)
br label %92
92: ; preds = %87, %65
br label %145
93: ; preds = %57
%94 = udiv i64 %16, 1
%95 = trunc i64 %94 to i32
%96 = call i32* @getcwd(i8* %18, i32 %95)
%97 = icmp ne i32* %96, null
br i1 %97, label %98, label %144
98: ; preds = %93
%99 = getelementptr inbounds i8, i8* %18, i64 0
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp ne i32 %101, 40
br i1 %102, label %103, label %144
103: ; preds = %98
%104 = load i8**, i8*** %6
%105 = getelementptr inbounds i8*, i8** %104, i64 0
%106 = load i8*, i8** %105
%107 = call i32 @strlen(i8* %106)
%108 = add nsw i32 %107, 1
%109 = call i32 @strlen(i8* %18)
%110 = add nsw i32 %108, %109
%111 = sext i32 %110 to i64
%112 = load i64*, i64** %7
store i64 %111, i64* %112
%113 = load i64*, i64** %7
%114 = load i64, i64* %113
%115 = mul i64 1, %114
%116 = trunc i64 %115 to i32
%117 = call i8* @malloc(i32 %116)
store i8* %117, i8** %14
%118 = load i8*, i8** %14
%119 = icmp ne i8* %118, null
br i1 %119, label %120, label %139
120: ; preds = %103
%121 = load i8*, i8** %14
%122 = load i64*, i64** %7
%123 = load i64, i64* %122
%124 = load i8**, i8*** %6
%125 = getelementptr inbounds i8*, i8** %124, i64 0
%126 = load i8*, i8** %125
%127 = call i32 @snprintf(i8* %121, i64 %123, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %18, i8* %126)
%128 = load i8**, i8*** %6
%129 = getelementptr inbounds i8*, i8** %128, i64 0
%130 = load i8*, i8** %129
%131 = load i32, i32* @F_OK
%132 = call i32 @access(i8* %130, i32 %131)
%133 = icmp ne i32 %132, -1
br i1 %133, label %134, label %136
134: ; preds = %120
%135 = load i8*, i8** %14
store i8* %135, i8** %4
store i32 1, i32* %12
br label %150
136: ; preds = %120
%137 = load i8*, i8** %14
%138 = call i32 @free(i8* %137)
br label %139
139: ; preds = %136, %103
%140 = load i32, i32* @stderr
%141 = load i64*, i64** %7
%142 = load i64, i64* %141
%143 = call i32 @fprintf(i32 %140, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i64 %142)
br label %144
144: ; preds = %139, %98, %93
br label %145
145: ; preds = %144, %92
br label %146
146: ; preds = %145, %54
%147 = load i64*, i64** %7
store i64 8, i64* %147
%148 = load i8*, i8** @getAbsoluteProgramPath.defaultPath
%149 = call i8* @strdup(i8* %148)
store i8* %149, i8** %4
store i32 1, i32* %12
br label %150
150: ; preds = %146, %134, %85, %43
%151 = load i8*, i8** %8
%152 = load i8*, i8** %4
ret i8* %152
}

LLVM IR (-O2):
@.str = [48 x i8] c"/data/data/com.apython.python.pythonhost/python\00"
@PATH_MAX = global i32 0
@.str.1 = [15 x i8] c"/proc/self/exe\00"
@stderr = global i32 0
@.str.2 = [60 x i8] c"Warning: Failed to allocate %d bytes for the program path!\0A\00"
@F_OK = global i32 0
@.str.3 = [6 x i8] c"%s/%s\00"
define i8* @getAbsoluteProgramPath(i32 %0, i8** nocapture %1, i64* nocapture %2) {
%4 = load i32, i32* @PATH_MAX
%5 = zext i32 %4 to i64
%6 = alloca i8, i64 %5
%7 = add i32 %4, -1
%8 = call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %6, i32 %7)
%9 = icmp eq i32 %8, -1
br i1 %9, label %22, label %10
10: ; preds = %3
%11 = sext i32 %8 to i64
store i64 %11, i64* %2
%12 = add nuw nsw i32 %8, 1
%13 = tail call i8* @malloc(i32 %12)
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %19
15: ; preds = %10
%16 = sext i32 %12 to i64
%17 = load i32, i32* @stderr
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i64 %16)
br label %22
19: ; preds = %10
%20 = call i32 @strncpy(i8* %13, i8* %6, i64 %11)
%21 = getelementptr inbounds i8, i8* %13, i64 %11
store i8 0, i8* %21
br label %73
22: ; preds = %15, %3
%23 = icmp sgt i32 %0, 0
br i1 %23, label %24, label %71
24: ; preds = %22
%25 = load i8*, i8** %1
%26 = load i8, i8* %25
%27 = icmp eq i8 %26, 47
br i1 %27, label %28, label %42
28: ; preds = %24
%29 = load i32, i32* @F_OK
%30 = tail call i32 @access(i8* %25, i32 %29)
%31 = icmp eq i32 %30, -1
br i1 %31, label %71, label %32
32: ; preds = %28
%33 = load i8*, i8** %1
%34 = tail call i32 @strlen(i8* %33)
%35 = sext i32 %34 to i64
store i64 %35, i64* %2
%36 = load i8*, i8** %1
%37 = tail call i8* @strdup(i8* %36)
%38 = icmp eq i8* %37, null
br i1 %38, label %39, label %73
39: ; preds = %32
%40 = load i32, i32* @stderr
%41 = tail call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i64 %35)
br label %71
42: ; preds = %24
%43 = call i32* @getcwd(i8* %6, i32 %4)
%44 = icmp eq i32* %43, null
br i1 %44, label %71, label %45
45: ; preds = %42
%46 = load i8, i8* %6
%47 = icmp eq i8 %46, 40
br i1 %47, label %71, label %48
48: ; preds = %45
%49 = load i8*, i8** %1
%50 = call i32 @strlen(i8* %49)
%51 = add nsw i32 %50, 1
%52 = call i32 @strlen(i8* %6)
%53 = add nsw i32 %51, %52
%54 = sext i32 %53 to i64
store i64 %54, i64* %2
%55 = call i8* @malloc(i32 %53)
%56 = icmp eq i8* %55, null
br i1 %56, label %67, label %57
57: ; preds = %48
%58 = load i8*, i8** %1
%59 = call i32 @snprintf(i8* %55, i64 %54, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %6, i8* %58)
%60 = load i8*, i8** %1
%61 = load i32, i32* @F_OK
%62 = call i32 @access(i8* %60, i32 %61)
%63 = icmp eq i32 %62, -1
br i1 %63, label %64, label %73
64: ; preds = %57
%65 = call i32 @free(i8* %55)
%66 = load i64, i64* %2
br label %67
67: ; preds = %48, %64
%68 = phi i64 [ %54, %48 ], [ %66, %64 ]
%69 = load i32, i32* @stderr
%70 = call i32 @fprintf(i32 %69, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i64 %68)
br label %71
71: ; preds = %67, %39, %28, %45, %42, %22
store i64 8, i64* %2
%72 = call dereferenceable_or_null(48) i8* @strdup(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %73
73: ; preds = %57, %32, %19, %71
%74 = phi i8* [ %72, %71 ], [ %13, %19 ], [ %37, %32 ], [ %55, %57 ]
ret i8* %74
}