#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 */
scalar_t__ ERANGE;
scalar_t__ errno;
int execve(char *, char **, char **);
int /*<<< orphan*/ free(char *);
char *getexename(char *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
char *strchr(char *, char);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int /*<<< orphan*/);
char *strrchr(char *, char);
int main(int argc, char *argv[], char *envp[]) {
  char *buf, buf2[256], buf3[256];
  int size;
  static char *env2[1024];
  char **ep, *cp;
  buf = NULL;
  size = 32;
  for (;;) {
    char *res;
    buf = (char *)malloc(size);
    res = getexename(buf, size);
    if (res)
      break;
    if (errno != ERANGE) {
      perror("getexename() failed");
      free(buf);
      buf = NULL;
      break;
    }
    free(buf);
    size *= 2;
  }
  if (buf == NULL)
    return -1;
  cp = strrchr(buf, '/');
  if (cp != NULL)
    *cp = '\0';
  ep = env2;
  sprintf(buf2, "LD_LIBRARY_PATH=%s", buf);
  *(ep++) = buf2;
  sprintf(buf3, "CHICKEN_REPOSITORY=%s", buf);
  *(ep++) = buf3;
  while (*envp != NULL) {
    char *p2 = strchr(*envp, '=');
    if (!strncmp(p2, "CHICKEN_REPOSITORY", strlen("CHICKEN_REPOSITORY")) ||
        !strncmp(p2, "LD_LIBRARY_PATH", strlen("LD_LIBRARY_PATH")))
      ++envp;
    else {
      *ep = *(envp++);
      if (*(ep++) == NULL)
        break;
    }
  }
  *ep = NULL;
  strcat(buf, "/");
  strcat(buf, "main");
  if (execve(buf, argv + 1, env2) == -1)
    perror("execve failed");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x20,-0x224(%rbp)
mov    -0x224(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x224(%rbp),%esi
call   10d0 <getexename@plt>
mov    %rax,-0x240(%rbp)
cmpq   $0x0,-0x240(%rbp)
je     1217 <main+0x67>
jmp    1270 <main+0xc0>
mov    0x2dba(%rip),%rax
mov    (%rax),%rax
mov    0x2dc0(%rip),%rcx
cmp    (%rcx),%rax
je     1253 <main+0xa3>
lea    0xdc8(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x20(%rbp)
jmp    1270 <main+0xc0>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x224(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x224(%rbp)
jmp    11df <main+0x2f>
cmpq   $0x0,-0x20(%rbp)
jne    1287 <main+0xd7>
movl   $0xffffffff,-0x4(%rbp)
jmp    1481 <main+0x2d1>
mov    -0x20(%rbp),%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x238(%rbp)
cmpq   $0x0,-0x238(%rbp)
je     12b4 <main+0x104>
mov    -0x238(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2dd5(%rip),%rax
mov    %rax,-0x230(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xd40(%rip),%rsi
call   10c0 <sprintf@plt>
lea    -0x120(%rbp),%rcx
mov    -0x230(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x230(%rbp)
mov    %rcx,(%rax)
lea    -0x220(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xd1d(%rip),%rsi
call   10c0 <sprintf@plt>
lea    -0x220(%rbp),%rcx
mov    -0x230(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x230(%rbp)
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     141f <main+0x26f>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0x3d,%esi
call   1060 <strchr@plt>
mov    %rax,-0x248(%rbp)
mov    -0x248(%rbp),%rax
mov    %rax,-0x250(%rbp)
lea    0xcd4(%rip),%rdi
call   1050 <strlen@plt>
mov    -0x250(%rbp),%rdi
mov    %eax,%edx
lea    0xcbf(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%eax
je     13c4 <main+0x214>
mov    -0x248(%rbp),%rax
mov    %rax,-0x258(%rbp)
lea    0xcaf(%rip),%rdi
call   1050 <strlen@plt>
mov    -0x258(%rbp),%rdi
mov    %eax,%edx
lea    0xc9a(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    13d5 <main+0x225>
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    141a <main+0x26a>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%rcx
mov    -0x230(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x230(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x230(%rbp)
cmpq   $0x0,(%rax)
jne    1415 <main+0x265>
jmp    141f <main+0x26f>
jmp    141a <main+0x26a>
jmp    132e <main+0x17e>
mov    -0x230(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x20(%rbp),%rdi
lea    0xc28(%rip),%rsi
call   10b0 <strcat@plt>
mov    -0x20(%rbp),%rdi
lea    0xc1a(%rip),%rsi
call   10b0 <strcat@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
lea    0x2c30(%rip),%rdx
call   1080 <execve@plt>
cmp    $0xffffffff,%eax
jne    147a <main+0x2ca>
lea    0xbf2(%rip),%rdi
call   10a0 <perror@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x218,%rsp
mov    %rdx,%rbx
mov    %rsi,%r13
mov    $0x20,%edi
call   1090 <malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    $0x20,%esi
call   10d0 <getexename@plt>
test   %rax,%rax
je     12e1 <main+0x131>
test   %r15,%r15
je     1344 <main+0x194>
mov    %r15,%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
test   %rax,%rax
je     1208 <main+0x58>
movb   $0x0,(%rax)
mov    %r13,0x8(%rsp)
lea    0xe00(%rip),%rsi
lea    0x110(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rdx
call   10c0 <sprintf@plt>
mov    %rbp,0x2e62(%rip)
lea    0xdf2(%rip),%rsi
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rdx
call   10c0 <sprintf@plt>
mov    %rbp,0x2e4c(%rip)
mov    (%rbx),%rdi
test   %rdi,%rdi
je     134b <main+0x19b>
add    $0x8,%rbx
lea    0x2e3d(%rip),%r14
lea    0xdd3(%rip),%r12
lea    0xddf(%rip),%r13
jmp    1290 <main+0xe0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
je     1352 <main+0x1a2>
mov    $0x3d,%esi
call   1060 <strchr@plt>
mov    %rax,%rbp
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1280 <main+0xd0>
mov    %r13,%rdi
call   1050 <strlen@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1280 <main+0xd0>
mov    -0x8(%rbx),%rax
mov    %rax,(%r14)
add    $0x8,%r14
test   %rax,%rax
jne    1280 <main+0xd0>
jmp    1352 <main+0x1a2>
mov    0x2cf0(%rip),%r14
mov    (%r14),%rax
mov    0x2cf6(%rip),%r12
cmp    (%r12),%rax
jne    1330 <main+0x180>
mov    $0x20,%ebp
nopl   (%rax)
mov    %r15,%rdi
call   1030 <free@plt>
add    %ebp,%ebp
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %ebp,%esi
call   10d0 <getexename@plt>
test   %rax,%rax
jne    11ea <main+0x3a>
mov    (%r14),%rax
cmp    (%r12),%rax
je     1300 <main+0x150>
lea    0xcc9(%rip),%rdi
call   10a0 <perror@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    $0xffffffff,%ebx
jmp    1396 <main+0x1e6>
lea    0x2d4e(%rip),%r14
movq   $0x0,(%r14)
lea    0xd00(%rip),%rsi
mov    %r15,%rdi
call   10b0 <strcat@plt>
lea    0xcf3(%rip),%rsi
mov    %r15,%rdi
call   10b0 <strcat@plt>
mov    0x8(%rsp),%rsi
add    $0x8,%rsi
lea    0x2d09(%rip),%rdx
mov    %r15,%rdi
call   1080 <execve@plt>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
je     13aa <main+0x1fa>
mov    %ebx,%eax
add    $0x218,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcb6(%rip),%rdi
call   10a0 <perror@plt>
jmp    1396 <main+0x1e6>

LLVM IR (-O0):
@main.env2 = internal global [1024 x i8*] zeroinitializer
@errno = global i64 0
@ERANGE = global i64 0
@.str = [20 x i8] c"getexename() failed\00"
@.str.1 = [19 x i8] c"LD_LIBRARY_PATH=%s\00"
@.str.2 = [22 x i8] c"CHICKEN_REPOSITORY=%s\00"
@.str.3 = [19 x i8] c"CHICKEN_REPOSITORY\00"
@.str.4 = [16 x i8] c"LD_LIBRARY_PATH\00"
@.str.5 = [2 x i8] c"/\00"
@.str.6 = [5 x i8] c"main\00"
@.str.7 = [14 x i8] c"execve failed\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca [256 x i8]
%10 = alloca [256 x i8]
%11 = alloca i32
%12 = alloca i8**
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i8* null, i8** %8
store i32 32, i32* %11
br label %16
16: ; preds = %34, %3
%17 = load i32, i32* %11
%18 = call i64 @malloc(i32 %17)
%19 = inttoptr i64 %18 to i8*
store i8* %19, i8** %8
%20 = load i8*, i8** %8
%21 = load i32, i32* %11
%22 = call i8* @getexename(i8* %20, i32 %21)
store i8* %22, i8** %14
%23 = load i8*, i8** %14
%24 = icmp ne i8* %23, null
br i1 %24, label %25, label %26
25: ; preds = %16
br label %39
26: ; preds = %16
%27 = load i64, i64* @errno
%28 = load i64, i64* @ERANGE
%29 = icmp ne i64 %27, %28
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%32 = load i8*, i8** %8
%33 = call i32 @free(i8* %32)
store i8* null, i8** %8
br label %39
34: ; preds = %26
%35 = load i8*, i8** %8
%36 = call i32 @free(i8* %35)
%37 = load i32, i32* %11
%38 = mul nsw i32 %37, 2
store i32 %38, i32* %11
br label %16
39: ; preds = %30, %25
%40 = load i8*, i8** %8
%41 = icmp eq i8* %40, null
br i1 %41, label %42, label %43
42: ; preds = %39
store i32 -1, i32* %4
br label %109
43: ; preds = %39
%44 = load i8*, i8** %8
%45 = call i8* @strrchr(i8* %44, i8 signext 47)
store i8* %45, i8** %13
%46 = load i8*, i8** %13
%47 = icmp ne i8* %46, null
br i1 %47, label %48, label %50
48: ; preds = %43
%49 = load i8*, i8** %13
store i8 0, i8* %49
br label %50
50: ; preds = %48, %43
store i8** getelementptr inbounds ([1024 x i8*], [1024 x i8*]* @main.env2, i64 0, i64 0), i8*** %12
%51 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%52 = load i8*, i8** %8
%53 = call i32 @sprintf(i8* %51, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %52)
%54 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%55 = load i8**, i8*** %12
%56 = getelementptr inbounds i8*, i8** %55, i32 1
store i8** %56, i8*** %12
store i8* %54, i8** %55
%57 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%58 = load i8*, i8** %8
%59 = call i32 @sprintf(i8* %57, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %58)
%60 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%61 = load i8**, i8*** %12
%62 = getelementptr inbounds i8*, i8** %61, i32 1
store i8** %62, i8*** %12
store i8* %60, i8** %61
br label %63
63: ; preds = %94, %50
%64 = load i8**, i8*** %7
%65 = load i8*, i8** %64
%66 = icmp ne i8* %65, null
br i1 %66, label %67, label %95
67: ; preds = %63
%68 = load i8**, i8*** %7
%69 = load i8*, i8** %68
%70 = call i8* @strchr(i8* %69, i8 signext 61)
store i8* %70, i8** %15
%71 = load i8*, i8** %15
%72 = call i32 @strlen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%73 = call i32 @strncmp(i8* %71, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %72)
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %80
75: ; preds = %67
%76 = load i8*, i8** %15
%77 = call i32 @strlen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%78 = call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %77)
%79 = icmp ne i32 %78, 0
br i1 %79, label %83, label %80
80: ; preds = %75, %67
%81 = load i8**, i8*** %7
%82 = getelementptr inbounds i8*, i8** %81, i32 1
store i8** %82, i8*** %7
br label %94
83: ; preds = %75
%84 = load i8**, i8*** %7
%85 = getelementptr inbounds i8*, i8** %84, i32 1
store i8** %85, i8*** %7
%86 = load i8*, i8** %84
%87 = load i8**, i8*** %12
store i8* %86, i8** %87
%88 = load i8**, i8*** %12
%89 = getelementptr inbounds i8*, i8** %88, i32 1
store i8** %89, i8*** %12
%90 = load i8*, i8** %88
%91 = icmp eq i8* %90, null
br i1 %91, label %92, label %93
92: ; preds = %83
br label %95
93: ; preds = %83
br label %94
94: ; preds = %93, %80
br label %63
95: ; preds = %92, %63
%96 = load i8**, i8*** %12
store i8* null, i8** %96
%97 = load i8*, i8** %8
%98 = call i32 @strcat(i8* %97, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%99 = load i8*, i8** %8
%100 = call i32 @strcat(i8* %99, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%101 = load i8*, i8** %8
%102 = load i8**, i8*** %6
%103 = getelementptr inbounds i8*, i8** %102, i64 1
%104 = call i32 @execve(i8* %101, i8** %103, i8** getelementptr inbounds ([1024 x i8*], [1024 x i8*]* @main.env2, i64 0, i64 0))
%105 = icmp eq i32 %104, -1
br i1 %105, label %106, label %108
106: ; preds = %95
%107 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
br label %108
108: ; preds = %106, %95
store i32 0, i32* %4
br label %109
109: ; preds = %108, %42
%110 = load i32, i32* %4
ret i32 %110
}

LLVM IR (-O2):
@main.env2 = internal global [1024 x i8*] zeroinitializer
@errno = global i64 0
@ERANGE = global i64 0
@.str = [20 x i8] c"getexename() failed\00"
@.str.1 = [19 x i8] c"LD_LIBRARY_PATH=%s\00"
@.str.2 = [22 x i8] c"CHICKEN_REPOSITORY=%s\00"
@.str.3 = [19 x i8] c"CHICKEN_REPOSITORY\00"
@.str.4 = [16 x i8] c"LD_LIBRARY_PATH\00"
@.str.5 = [2 x i8] c"/\00"
@.str.6 = [5 x i8] c"main\00"
@.str.7 = [14 x i8] c"execve failed\00"
define i32 @main(i32 %0, i8** %1, i8** nocapture %2) {
%4 = alloca [256 x i8]
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%8 = tail call i64 @malloc(i32 32)
%9 = inttoptr i64 %8 to i8*
%10 = tail call i8* @getexename(i8* %9, i32 32)
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %36
12: ; preds = %3
%13 = load i64, i64* @errno
%14 = load i64, i64* @ERANGE
%15 = icmp eq i64 %13, %14
br i1 %15, label %25, label %20
16: ; preds = %25
%17 = load i64, i64* @errno
%18 = load i64, i64* @ERANGE
%19 = icmp eq i64 %17, %18
br i1 %19, label %25, label %20
20: ; preds = %16, %12
%21 = phi i64 [ %8, %12 ], [ %30, %16 ]
%22 = inttoptr i64 %21 to i8*
%23 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%24 = tail call i32 @free(i8* %22)
br label %79
25: ; preds = %12, %16
%26 = phi i32 [ %29, %16 ], [ 32, %12 ]
%27 = phi i8* [ %31, %16 ], [ %9, %12 ]
%28 = tail call i32 @free(i8* %27)
%29 = shl nsw i32 %26, 1
%30 = tail call i64 @malloc(i32 %29)
%31 = inttoptr i64 %30 to i8*
%32 = tail call i8* @getexename(i8* %31, i32 %29)
%33 = icmp eq i8* %32, null
br i1 %33, label %16, label %34
34: ; preds = %25
%35 = inttoptr i64 %30 to i8*
br label %36
36: ; preds = %34, %3
%37 = phi i8* [ %9, %3 ], [ %35, %34 ]
%38 = phi i64 [ %8, %3 ], [ %30, %34 ]
%39 = icmp eq i64 %38, 0
br i1 %39, label %79, label %40
40: ; preds = %36
%41 = tail call i8* @strrchr(i8* %37, i8 signext 47)
%42 = icmp eq i8* %41, null
br i1 %42, label %44, label %43
43: ; preds = %40
store i8 0, i8* %41
br label %44
44: ; preds = %43, %40
%45 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %37)
store i8* %6, i8** getelementptr inbounds ([1024 x i8*], [1024 x i8*]* @main.env2, i64 0, i64 0)
%46 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %37)
store i8* %7, i8** getelementptr inbounds ([1024 x i8*], [1024 x i8*]* @main.env2, i64 0, i64 1)
%47 = load i8*, i8** %2
%48 = icmp eq i8* %47, null
br i1 %48, label %70, label %49
49: ; preds = %44, %65
%50 = phi i8* [ %68, %65 ], [ %47, %44 ]
%51 = phi i8** [ %67, %65 ], [ %2, %44 ]
%52 = phi i8** [ %66, %65 ], [ getelementptr inbounds ([1024 x i8*], [1024 x i8*]* @main.env2, i64 0, i64 2), %44 ]
%53 = call i8* @strchr(i8* %50, i8 signext 61)
%54 = call i32 @strlen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%55 = call i32 @strncmp(i8* %53, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %54)
%56 = icmp eq i32 %55, 0
br i1 %56, label %65, label %57
57: ; preds = %49
%58 = call i32 @strlen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%59 = call i32 @strncmp(i8* %53, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %58)
%60 = icmp eq i32 %59, 0
br i1 %60, label %65, label %61
61: ; preds = %57
%62 = load i8*, i8** %51
store i8* %62, i8** %52
%63 = getelementptr inbounds i8*, i8** %52, i64 1
%64 = icmp eq i8* %62, null
br i1 %64, label %70, label %65
65: ; preds = %49, %57, %61
%66 = phi i8** [ %63, %61 ], [ %52, %57 ], [ %52, %49 ]
%67 = getelementptr inbounds i8*, i8** %51, i64 1
%68 = load i8*, i8** %67
%69 = icmp eq i8* %68, null
br i1 %69, label %70, label %49
70: ; preds = %65, %61, %44
%71 = phi i8** [ getelementptr inbounds ([1024 x i8*], [1024 x i8*]* @main.env2, i64 0, i64 2), %44 ], [ %63, %61 ], [ %66, %65 ]
store i8* null, i8** %71
%72 = call i32 @strcat(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%73 = call i32 @strcat(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%74 = getelementptr inbounds i8*, i8** %1, i64 1
%75 = call i32 @execve(i8* %37, i8** %74, i8** getelementptr inbounds ([1024 x i8*], [1024 x i8*]* @main.env2, i64 0, i64 0))
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %79
77: ; preds = %70
%78 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
br label %79
79: ; preds = %20, %70, %77, %36
%80 = phi i32 [ -1, %36 ], [ 0, %77 ], [ 0, %70 ], [ -1, %20 ]
ret i32 %80
}