#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*/ free(char *);
char *getenv(char *);
scalar_t__ malloc(scalar_t__);
scalar_t__ sp_exists(char *);
char *sp_truepath(char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
char *strdup(char *);
scalar_t__ strlen(char const *);
scalar_t__ strncmp(char const *, char *, int);
char *strtok(char *, char *);
char *sp_executable_path(const char *argv0) {
  char *PATH;
  char *s;
  char *separateur = ":";
  if ((strncmp(argv0, "..", 2) == 0 && (argv0[2] == '/' || argv0[2] == '\\')) ||
      (strncmp(argv0, ".", 1) == 0 && (argv0[1] == '/' || argv0[1] == '\\')) ||
      (argv0[0] == '/' || argv0[0] == '\\')) {
    return sp_truepath(argv0);
  }
  PATH = getenv("PATH");
  if (!PATH)
    return strdup("");
  PATH = strdup(PATH);
  if (!PATH)
    return 0;
  s = strtok(PATH, separateur);
  while (s) {
    static char *path2;
    path2 = (char *)malloc(strlen(s) + 1 + strlen(argv0) + 1);
    if (!path2) {
      free(PATH);
      return 0;
    }
    strcpy(path2, s);
    strcpy(path2, "/");
    strcpy(path2, argv0);
    if (sp_exists(path2)) {
      static char *path;
      path = sp_truepath(path2);
      free(path2);
      if (!path) {
        free(PATH);
        return 0;
      }
      if (*path) {
        free(PATH);
        return path;
      }
      free(path);
    } else
      free(path2);
    s = strtok(0, separateur);
  }
  free(PATH);
  return strdup("");
}


x86 assembly (clang, -O0):
<sp_executable_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xe4d(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe40(%rip),%rsi
mov    $0x2,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
jne    11f8 <sp_executable_path+0x58>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x2f,%eax
je     1259 <sp_executable_path+0xb9>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x5c,%eax
je     1259 <sp_executable_path+0xb9>
mov    -0x10(%rbp),%rdi
lea    0xe00(%rip),%rsi
mov    $0x1,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
jne    1239 <sp_executable_path+0x99>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2f,%eax
je     1259 <sp_executable_path+0xb9>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x5c,%eax
je     1259 <sp_executable_path+0xb9>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     1259 <sp_executable_path+0xb9>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    126b <sp_executable_path+0xcb>
mov    -0x10(%rbp),%rdi
call   10a0 <sp_truepath@plt>
mov    %rax,-0x8(%rbp)
jmp    1432 <sp_executable_path+0x292>
lea    0xd93(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    129b <sp_executable_path+0xfb>
lea    0xd77(%rip),%rdi
call   10c0 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    1432 <sp_executable_path+0x292>
mov    -0x18(%rbp),%rdi
call   10c0 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    12c0 <sp_executable_path+0x120>
movq   $0x0,-0x8(%rbp)
jmp    1432 <sp_executable_path+0x292>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1419 <sp_executable_path+0x279>
mov    -0x20(%rbp),%rdi
call   1080 <strlen@plt>
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x30(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1090 <malloc@plt>
mov    %rax,0x2d6b(%rip)
cmpq   $0x0,0x2d63(%rip)
jne    1331 <sp_executable_path+0x191>
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    1432 <sp_executable_path+0x292>
mov    0x2d40(%rip),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <strcpy@plt>
mov    0x2d30(%rip),%rdi
lea    0xcbb(%rip),%rsi
call   1070 <strcpy@plt>
mov    0x2d1d(%rip),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <strcpy@plt>
mov    0x2d0d(%rip),%rdi
call   1060 <sp_exists@plt>
cmp    $0x0,%rax
je     13f7 <sp_executable_path+0x257>
mov    0x2cf7(%rip),%rdi
call   10a0 <sp_truepath@plt>
mov    %rax,0x2cf3(%rip)
mov    0x2ce4(%rip),%rdi
call   1040 <free@plt>
cmpq   $0x0,0x2cdf(%rip)
jne    13bd <sp_executable_path+0x21d>
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    1432 <sp_executable_path+0x292>
mov    0x2cbc(%rip),%rax
cmpb   $0x0,(%rax)
je     13e6 <sp_executable_path+0x246>
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
mov    0x2ca3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1432 <sp_executable_path+0x292>
mov    0x2c93(%rip),%rdi
call   1040 <free@plt>
jmp    1403 <sp_executable_path+0x263>
mov    0x2c7a(%rip),%rdi
call   1040 <free@plt>
mov    -0x28(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   10b0 <strtok@plt>
mov    %rax,-0x20(%rbp)
jmp    12d1 <sp_executable_path+0x131>
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
lea    0xbdb(%rip),%rdi
call   10c0 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sp_executable_path>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r13
lea    0xe4d(%rip),%rsi
mov    $0x2,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
je     130d <sp_executable_path+0x16d>
lea    0xe34(%rip),%rsi
mov    %r13,%rdi
mov    $0x1,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
je     131e <sp_executable_path+0x17e>
mov    0x0(%r13),%al
cmp    $0x5c,%al
je     132e <sp_executable_path+0x18e>
cmp    $0x2f,%al
je     132e <sp_executable_path+0x18e>
lea    0xe05(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1350 <sp_executable_path+0x1b0>
mov    %rax,%rdi
call   10c0 <strdup@plt>
test   %rax,%rax
je     1344 <sp_executable_path+0x1a4>
mov    %rax,%r14
lea    0xdd7(%rip),%rsi
mov    %rax,%rdi
call   10b0 <strtok@plt>
test   %rax,%rax
je     1348 <sp_executable_path+0x1a8>
mov    %rax,%rbx
lea    0xdc6(%rip),%r15
lea    0xdb5(%rip),%r12
jmp    126b <sp_executable_path+0xcb>
nopl   (%rax)
call   1040 <free@plt>
xor    %edi,%edi
mov    %r12,%rsi
call   10b0 <strtok@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1348 <sp_executable_path+0x1a8>
mov    %rbx,%rdi
call   1080 <strlen@plt>
mov    %rax,%rbp
mov    %r13,%rdi
call   1080 <strlen@plt>
lea    (%rax,%rbp,1),%rdi
add    $0x2,%rdi
call   1090 <malloc@plt>
mov    %rax,0x2de6(%rip)
test   %rax,%rax
je     136a <sp_executable_path+0x1ca>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1070 <strcpy@plt>
mov    0x2dcb(%rip),%rdi
mov    %r15,%rsi
call   1070 <strcpy@plt>
mov    0x2dbc(%rip),%rdi
mov    %r13,%rsi
call   1070 <strcpy@plt>
mov    0x2dad(%rip),%rdi
call   1060 <sp_exists@plt>
mov    0x2da1(%rip),%rdi
test   %rax,%rax
je     1250 <sp_executable_path+0xb0>
call   10a0 <sp_truepath@plt>
mov    %rax,%rbx
mov    %rax,0x2d91(%rip)
mov    0x2d82(%rip),%rdi
call   1040 <free@plt>
test   %rbx,%rbx
je     136a <sp_executable_path+0x1ca>
cmpb   $0x0,(%rbx)
jne    1376 <sp_executable_path+0x1d6>
mov    %rbx,%rdi
jmp    1250 <sp_executable_path+0xb0>
mov    0x2(%r13),%al
cmp    $0x2f,%al
je     132e <sp_executable_path+0x18e>
cmp    $0x5c,%al
je     132e <sp_executable_path+0x18e>
jmp    11c8 <sp_executable_path+0x28>
mov    0x1(%r13),%al
cmp    $0x2f,%al
je     132e <sp_executable_path+0x18e>
cmp    $0x5c,%al
jne    11e5 <sp_executable_path+0x45>
mov    %r13,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10a0 <sp_truepath@plt>
xor    %ebx,%ebx
jmp    137e <sp_executable_path+0x1de>
mov    %r14,%rdi
call   1040 <free@plt>
lea    0xcad(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10c0 <strdup@plt>
mov    %r14,%rdi
call   1040 <free@plt>
xor    %ebx,%ebx
jmp    137e <sp_executable_path+0x1de>
mov    %r14,%rdi
call   1040 <free@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c":\00"
@.str.1 = [3 x i8] c"..\00"
@.str.2 = [2 x i8] c".\00"
@.str.3 = [5 x i8] c"PATH\00"
@.str.4 = [1 x i8] zeroinitializer
@sp_executable_path.path2 = internal global i8* null
@.str.5 = [2 x i8] c"/\00"
@sp_executable_path.path = internal global i8* null
define i8* @sp_executable_path(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %3
%8 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %22
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 47
br i1 %15, label %50, label %16
16: ; preds = %10
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 92
br i1 %21, label %50, label %22
22: ; preds = %16, %1
%23 = load i8*, i8** %3
%24 = call i64 @strncmp(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 1)
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %38
26: ; preds = %22
%27 = load i8*, i8** %3
%28 = getelementptr inbounds i8, i8* %27, i64 1
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 47
br i1 %31, label %50, label %32
32: ; preds = %26
%33 = load i8*, i8** %3
%34 = getelementptr inbounds i8, i8* %33, i64 1
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 92
br i1 %37, label %50, label %38
38: ; preds = %32, %22
%39 = load i8*, i8** %3
%40 = getelementptr inbounds i8, i8* %39, i64 0
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 47
br i1 %43, label %50, label %44
44: ; preds = %38
%45 = load i8*, i8** %3
%46 = getelementptr inbounds i8, i8* %45, i64 0
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 92
br i1 %49, label %50, label %53
50: ; preds = %44, %38, %32, %26, %16, %10
%51 = load i8*, i8** %3
%52 = call i8* @sp_truepath(i8* %51)
store i8* %52, i8** %2
br label %130
53: ; preds = %44
%54 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
store i8* %54, i8** %4
%55 = load i8*, i8** %4
%56 = icmp ne i8* %55, null
br i1 %56, label %59, label %57
57: ; preds = %53
%58 = call i8* @strdup(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
store i8* %58, i8** %2
br label %130
59: ; preds = %53
%60 = load i8*, i8** %4
%61 = call i8* @strdup(i8* %60)
store i8* %61, i8** %4
%62 = load i8*, i8** %4
%63 = icmp ne i8* %62, null
br i1 %63, label %65, label %64
64: ; preds = %59
store i8* null, i8** %2
br label %130
65: ; preds = %59
%66 = load i8*, i8** %4
%67 = load i8*, i8** %6
%68 = call i8* @strtok(i8* %66, i8* %67)
store i8* %68, i8** %5
br label %69
69: ; preds = %123, %65
%70 = load i8*, i8** %5
%71 = icmp ne i8* %70, null
br i1 %71, label %72, label %126
72: ; preds = %69
%73 = load i8*, i8** %5
%74 = call i64 @strlen(i8* %73)
%75 = add nsw i64 %74, 1
%76 = load i8*, i8** %3
%77 = call i64 @strlen(i8* %76)
%78 = add nsw i64 %75, %77
%79 = add nsw i64 %78, 1
%80 = call i64 @malloc(i64 %79)
%81 = inttoptr i64 %80 to i8*
store i8* %81, i8** @sp_executable_path.path2
%82 = load i8*, i8** @sp_executable_path.path2
%83 = icmp ne i8* %82, null
br i1 %83, label %87, label %84
84: ; preds = %72
%85 = load i8*, i8** %4
%86 = call i32 @free(i8* %85)
store i8* null, i8** %2
br label %130
87: ; preds = %72
%88 = load i8*, i8** @sp_executable_path.path2
%89 = load i8*, i8** %5
%90 = call i32 @strcpy(i8* %88, i8* %89)
%91 = load i8*, i8** @sp_executable_path.path2
%92 = call i32 @strcpy(i8* %91, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%93 = load i8*, i8** @sp_executable_path.path2
%94 = load i8*, i8** %3
%95 = call i32 @strcpy(i8* %93, i8* %94)
%96 = load i8*, i8** @sp_executable_path.path2
%97 = call i64 @sp_exists(i8* %96)
%98 = icmp ne i64 %97, 0
br i1 %98, label %99, label %120
99: ; preds = %87
%100 = load i8*, i8** @sp_executable_path.path2
%101 = call i8* @sp_truepath(i8* %100)
store i8* %101, i8** @sp_executable_path.path
%102 = load i8*, i8** @sp_executable_path.path2
%103 = call i32 @free(i8* %102)
%104 = load i8*, i8** @sp_executable_path.path
%105 = icmp ne i8* %104, null
br i1 %105, label %109, label %106
106: ; preds = %99
%107 = load i8*, i8** %4
%108 = call i32 @free(i8* %107)
store i8* null, i8** %2
br label %130
109: ; preds = %99
%110 = load i8*, i8** @sp_executable_path.path
%111 = load i8, i8* %110
%112 = icmp ne i8 %111, 0
br i1 %112, label %113, label %117
113: ; preds = %109
%114 = load i8*, i8** %4
%115 = call i32 @free(i8* %114)
%116 = load i8*, i8** @sp_executable_path.path
store i8* %116, i8** %2
br label %130
117: ; preds = %109
%118 = load i8*, i8** @sp_executable_path.path
%119 = call i32 @free(i8* %118)
br label %123
120: ; preds = %87
%121 = load i8*, i8** @sp_executable_path.path2
%122 = call i32 @free(i8* %121)
br label %123
123: ; preds = %120, %117
%124 = load i8*, i8** %6
%125 = call i8* @strtok(i8* null, i8* %124)
store i8* %125, i8** %5
br label %69
126: ; preds = %69
%127 = load i8*, i8** %4
%128 = call i32 @free(i8* %127)
%129 = call i8* @strdup(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
store i8* %129, i8** %2
br label %130
130: ; preds = %126, %113, %106, %84, %64, %57, %50
%131 = load i8*, i8** %2
ret i8* %131
}

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
@.str.1 = [3 x i8] c"..\00"
@.str.2 = [2 x i8] c".\00"
@.str.3 = [5 x i8] c"PATH\00"
@.str.4 = [1 x i8] zeroinitializer
@sp_executable_path.path2 = internal unnamed_addr global i8* null
@.str.5 = [2 x i8] c"/\00"
@sp_executable_path.path = internal unnamed_addr global i8* null
define i8* @sp_executable_path(i8* %0) {
%2 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
switch i8 %6, label %7 [
i8 47, label %15
i8 92, label %15
]
7: ; preds = %4, %1
%8 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 1)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
switch i8 %12, label %13 [
i8 47, label %15
i8 92, label %15
]
13: ; preds = %10, %7
%14 = load i8, i8* %0
switch i8 %14, label %17 [
i8 47, label %15
i8 92, label %15
]
15: ; preds = %13, %13, %10, %10, %4, %4
%16 = tail call i8* @sp_truepath(i8* %0)
br label %71
17: ; preds = %13
%18 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%19 = icmp eq i8* %18, null
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = tail call dereferenceable_or_null(1) i8* @strdup(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %71
22: ; preds = %17
%23 = tail call i8* @strdup(i8* %18)
%24 = icmp eq i8* %23, null
br i1 %24, label %71, label %25
25: ; preds = %22
%26 = tail call i8* @strtok(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%27 = icmp eq i8* %26, null
br i1 %27, label %68, label %28
28: ; preds = %25, %65
%29 = phi i8* [ %66, %65 ], [ %26, %25 ]
%30 = tail call i64 @strlen(i8* %29)
%31 = tail call i64 @strlen(i8* %0)
%32 = add i64 %30, 2
%33 = add i64 %32, %31
%34 = tail call i64 @malloc(i64 %33)
%35 = inttoptr i64 %34 to i8*
store i8* %35, i8** @sp_executable_path.path2
%36 = icmp eq i64 %34, 0
br i1 %36, label %37, label %39
37: ; preds = %28
%38 = tail call i32 @free(i8* %23)
br label %71
39: ; preds = %28
%40 = tail call i32 @strcpy(i8* %35, i8* %29)
%41 = load i8*, i8** @sp_executable_path.path2
%42 = tail call i32 @strcpy(i8* %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%43 = load i8*, i8** @sp_executable_path.path2
%44 = tail call i32 @strcpy(i8* %43, i8* %0)
%45 = load i8*, i8** @sp_executable_path.path2
%46 = tail call i64 @sp_exists(i8* %45)
%47 = icmp eq i64 %46, 0
%48 = load i8*, i8** @sp_executable_path.path2
br i1 %47, label %63, label %49
49: ; preds = %39
%50 = tail call i8* @sp_truepath(i8* %48)
store i8* %50, i8** @sp_executable_path.path
%51 = load i8*, i8** @sp_executable_path.path2
%52 = tail call i32 @free(i8* %51)
%53 = icmp eq i8* %50, null
br i1 %53, label %54, label %56
54: ; preds = %49
%55 = tail call i32 @free(i8* %23)
br label %71
56: ; preds = %49
%57 = load i8, i8* %50
%58 = icmp eq i8 %57, 0
br i1 %58, label %61, label %59
59: ; preds = %56
%60 = tail call i32 @free(i8* %23)
br label %71
61: ; preds = %56
%62 = tail call i32 @free(i8* %50)
br label %65
63: ; preds = %39
%64 = tail call i32 @free(i8* %48)
br label %65
65: ; preds = %63, %61
%66 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%67 = icmp eq i8* %66, null
br i1 %67, label %68, label %28
68: ; preds = %65, %25
%69 = tail call i32 @free(i8* %23)
%70 = tail call dereferenceable_or_null(1) i8* @strdup(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %71
71: ; preds = %22, %68, %59, %54, %37, %20, %15
%72 = phi i8* [ %16, %15 ], [ %50, %59 ], [ null, %54 ], [ null, %37 ], [ %70, %68 ], [ %21, %20 ], [ null, %22 ]
ret i8* %72
}