#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 /*<<< orphan*/ FILE;

/* Variables and functions */
char *concat(int, char *, char *, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ logOut(char *, ...);
int /*<<< orphan*/ mkstemp(char *);
scalar_t__ system(char *);
int /*<<< orphan*/ unlink(char *);
int validateCommand(char *);
bool validateDependencies() {
  bool phpInstalled = validateCommand("php");
  bool canInstall = true;
  if (phpInstalled) {
    logOut("PHP-CLI is installed\n");
  } else {
    logOut("PHP-CLI is not installed\n");
    canInstall = false;
  }
  if (validateCommand("git")) {
    logOut("Git is installed\n");
  } else {
    logOut("Git is not installed\n");
  }
  if (validateCommand("mysql")) {
    logOut("MySQL-Client is installed\n");
  } else {
    logOut("MySQL-Client is not installed\n");
    canInstall = false;
  }
  if (phpInstalled) {
    const char *exts[6] = {"curl",   "hash", "openssl",
                           "mcrypt", "pdo",  "pdo_mysql"};
    int i = 0;
    char *cmd;
    FILE *ofp;
    while (i < 6) {
      char tempName[19] = "PufferPanel.XXXXXX";
      mkstemp(tempName);
      ofp = fopen(tempName, "w");
      fprintf(ofp, "<?php exit(extension_loaded(\"%s\") ? 0 : 1); ?>", exts[i]);
      fclose(ofp);
      cmd = concat(3, "php -f ", tempName, " 1>/dev/null 2>&1");
      if (system(cmd) == 0) {
        logOut("PHP-%s is installed\n", exts[i]);
      } else {
        logOut("PHP-%s is not installed\n", exts[i]);
        canInstall = false;
      }
      unlink(tempName);
      i++;
    }
  } else {
    logOut("Cannot validate PHP dependencies as PHP is not installed\n");
  }
  return canInstall;
}


x86 assembly (clang, -O0):
<validateDependencies>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    0xe51(%rip),%rdi
call   10c0 <validateCommand@plt>
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11db <validateDependencies+0x3b>
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   10a0 <logOut@plt>
jmp    11f0 <validateDependencies+0x50>
lea    0xe38(%rip),%rdi
mov    $0x0,%al
call   10a0 <logOut@plt>
movl   $0x0,-0x8(%rbp)
lea    0xe3d(%rip),%rdi
call   10c0 <validateCommand@plt>
cmp    $0x0,%eax
je     1218 <validateDependencies+0x78>
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   10a0 <logOut@plt>
jmp    1226 <validateDependencies+0x86>
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   10a0 <logOut@plt>
lea    0xe8e(%rip),%rdi
call   10c0 <validateCommand@plt>
cmp    $0x0,%eax
je     124e <validateDependencies+0xae>
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   10a0 <logOut@plt>
jmp    1263 <validateDependencies+0xc3>
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   10a0 <logOut@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     13c2 <validateDependencies+0x222>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1070 <memset@plt>
lea    0xe16(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xe10(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe0a(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe07(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe03(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xdfc(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x6,-0x44(%rbp)
jge    13bd <validateDependencies+0x21d>
mov    0xea9(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xea6(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xea3(%rip),%ax
mov    %ax,-0x60(%rbp)
mov    0xe9b(%rip),%al
mov    %al,-0x5e(%rbp)
lea    -0x70(%rbp),%rdi
call   1090 <mkstemp@plt>
lea    -0x70(%rbp),%rdi
lea    0xdb3(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rdx
lea    0xd98(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x58(%rbp),%rdi
call   1040 <fclose@plt>
lea    -0x70(%rbp),%rdx
mov    $0x3,%edi
lea    0xda9(%rip),%rsi
lea    0xdaa(%rip),%rcx
call   1060 <concat@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
call   1050 <system@plt>
cmp    $0x0,%rax
jne    1388 <validateDependencies+0x1e8>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rsi
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   10a0 <logOut@plt>
jmp    13a6 <validateDependencies+0x206>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rsi
lea    0xd89(%rip),%rdi
mov    $0x0,%al
call   10a0 <logOut@plt>
movl   $0x0,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12c6 <validateDependencies+0x126>
jmp    13d0 <validateDependencies+0x230>
lea    0xd71(%rip),%rdi
mov    $0x0,%al
call   10a0 <logOut@plt>
mov    -0x8(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validateDependencies>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
lea    0xe5b(%rip),%rdi
call   10b0 <validateCommand@plt>
mov    %eax,%ebp
test   %eax,%eax
sete   %r14b
lea    0xe61(%rip),%rax
lea    0xe44(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1090 <logOut@plt>
lea    0xe62(%rip),%rdi
call   10b0 <validateCommand@plt>
test   %eax,%eax
lea    0xe6a(%rip),%rax
lea    0xe51(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1090 <logOut@plt>
lea    0xec2(%rip),%rdi
call   10b0 <validateCommand@plt>
test   %eax,%eax
sete   %bl
lea    0xe71(%rip),%rax
lea    0xe4f(%rip),%rdi
cmove  %rax,%rdi
or     %r14b,%bl
xor    $0x1,%bl
xor    %eax,%eax
call   1090 <logOut@plt>
movzbl %bl,%ebx
test   %ebp,%ebp
je     132b <validateDependencies+0x19b>
lea    0xe66(%rip),%rax
mov    %rax,0x20(%rsp)
lea    0xe5f(%rip),%rax
mov    %rax,0x28(%rsp)
lea    0xe58(%rip),%rax
mov    %rax,0x30(%rsp)
lea    0xe54(%rip),%rax
mov    %rax,0x38(%rsp)
lea    0xe4f(%rip),%rax
mov    %rax,0x40(%rsp)
lea    0xe47(%rip),%rax
mov    %rax,0x48(%rsp)
mov    %rsp,%r14
xor    %r13d,%r13d
nopl   0x0(%rax,%rax,1)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x585858,0xf(%rsp)
mov    %r14,%rdi
call   1080 <mkstemp@plt>
mov    %r14,%rdi
lea    0xe1c(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r12
mov    0x20(%rsp,%r13,8),%r15
mov    %rax,%rdi
lea    0xe07(%rip),%rsi
mov    %r15,%rdx
call   1070 <fprintf@plt>
mov    %r12,%rdi
xor    %ebp,%ebp
call   1040 <fclose@plt>
mov    $0x3,%edi
lea    0xe18(%rip),%rsi
mov    %r14,%rdx
lea    0xe16(%rip),%rcx
call   1060 <concat@plt>
mov    %rax,%rdi
call   1050 <system@plt>
test   %rax,%rax
lea    0xe26(%rip),%rdi
lea    0xe0a(%rip),%rax
cmove  %rax,%rdi
cmovne %ebp,%ebx
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <logOut@plt>
mov    %r14,%rdi
call   1030 <unlink@plt>
add    $0x1,%r13
cmp    $0x6,%r13
jne    1280 <validateDependencies+0xf0>
jmp    1339 <validateDependencies+0x1a9>
lea    0xe08(%rip),%rdi
xor    %eax,%eax
call   1090 <logOut@plt>
mov    %ebx,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"php\00"
@.str.1 = [22 x i8] c"PHP-CLI is installed\0A\00"
@.str.2 = [26 x i8] c"PHP-CLI is not installed\0A\00"
@.str.3 = [4 x i8] c"git\00"
@.str.4 = [18 x i8] c"Git is installed\0A\00"
@.str.5 = [22 x i8] c"Git is not installed\0A\00"
@.str.6 = [6 x i8] c"mysql\00"
@.str.7 = [27 x i8] c"MySQL-Client is installed\0A\00"
@.str.8 = [31 x i8] c"MySQL-Client is not installed\0A\00"
@.str.9 = [5 x i8] c"curl\00"
@.str.10 = [5 x i8] c"hash\00"
@.str.11 = [8 x i8] c"openssl\00"
@.str.12 = [7 x i8] c"mcrypt\00"
@.str.13 = [4 x i8] c"pdo\00"
@.str.14 = [10 x i8] c"pdo_mysql\00"
@__const.validateDependencies.tempName = [19 x i8] c"PufferPanel.XXXXXX\00"
@.str.15 = [2 x i8] c"w\00"
@.str.16 = [47 x i8] c"<?php exit(extension_loaded(\22%s\22) ? 0 : 1); ?>\00"
@.str.17 = [8 x i8] c"php -f \00"
@.str.18 = [18 x i8] c" 1>/dev/null 2>&1\00"
@.str.19 = [21 x i8] c"PHP-%s is installed\0A\00"
@.str.20 = [25 x i8] c"PHP-%s is not installed\0A\00"
@.str.21 = [58 x i8] c"Cannot validate PHP dependencies as PHP is not installed\0A\00"
define i32 @validateDependencies() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [6 x i8*]
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca [19 x i8]
%8 = call i32 @validateCommand(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 %8, i32* %1
store i32 1, i32* %2
%9 = load i32, i32* %1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 (i8*, ...) @logOut(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %15
13: ; preds = %0
%14 = call i32 (i8*, ...) @logOut(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %2
br label %15
15: ; preds = %13, %11
%16 = call i32 @validateCommand(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (i8*, ...) @logOut(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
br label %22
20: ; preds = %15
%21 = call i32 (i8*, ...) @logOut(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %22
22: ; preds = %20, %18
%23 = call i32 @validateCommand(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 (i8*, ...) @logOut(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
br label %29
27: ; preds = %22
%28 = call i32 (i8*, ...) @logOut(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %2
br label %29
29: ; preds = %27, %25
%30 = load i32, i32* %1
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %81
32: ; preds = %29
%33 = bitcast [6 x i8*]* %3 to i8*
%34 = bitcast i8* %33 to [6 x i8*]*
%35 = getelementptr inbounds [6 x i8*], [6 x i8*]* %34, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i32 0, i32 0), i8** %35
%36 = getelementptr inbounds [6 x i8*], [6 x i8*]* %34, i32 0, i32 1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i32 0, i32 0), i8** %36
%37 = getelementptr inbounds [6 x i8*], [6 x i8*]* %34, i32 0, i32 2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i32 0, i32 0), i8** %37
%38 = getelementptr inbounds [6 x i8*], [6 x i8*]* %34, i32 0, i32 3
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i32 0, i32 0), i8** %38
%39 = getelementptr inbounds [6 x i8*], [6 x i8*]* %34, i32 0, i32 4
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8** %39
%40 = getelementptr inbounds [6 x i8*], [6 x i8*]* %34, i32 0, i32 5
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i32 0, i32 0), i8** %40
store i32 0, i32* %4
br label %41
41: ; preds = %75, %32
%42 = load i32, i32* %4
%43 = icmp slt i32 %42, 6
br i1 %43, label %44, label %80
44: ; preds = %41
%45 = bitcast [19 x i8]* %7 to i8*
%46 = getelementptr inbounds [19 x i8], [19 x i8]* %7, i64 0, i64 0
%47 = call i32 @mkstemp(i8* %46)
%48 = getelementptr inbounds [19 x i8], [19 x i8]* %7, i64 0, i64 0
%49 = call i32* @fopen(i8* %48, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
store i32* %49, i32** %6
%50 = load i32*, i32** %6
%51 = load i32, i32* %4
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 %52
%54 = load i8*, i8** %53
%55 = call i32 @fprintf(i32* %50, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.16, i64 0, i64 0), i8* %54)
%56 = load i32*, i32** %6
%57 = call i32 @fclose(i32* %56)
%58 = getelementptr inbounds [19 x i8], [19 x i8]* %7, i64 0, i64 0
%59 = call i8* @concat(i32 3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i8* %58, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0))
store i8* %59, i8** %5
%60 = load i8*, i8** %5
%61 = call i64 @system(i8* %60)
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %69
63: ; preds = %44
%64 = load i32, i32* %4
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 %65
%67 = load i8*, i8** %66
%68 = call i32 (i8*, ...) @logOut(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.19, i64 0, i64 0), i8* %67)
br label %75
69: ; preds = %44
%70 = load i32, i32* %4
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 %71
%73 = load i8*, i8** %72
%74 = call i32 (i8*, ...) @logOut(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0), i8* %73)
store i32 0, i32* %2
br label %75
75: ; preds = %69, %63
%76 = getelementptr inbounds [19 x i8], [19 x i8]* %7, i64 0, i64 0
%77 = call i32 @unlink(i8* %76)
%78 = load i32, i32* %4
%79 = add nsw i32 %78, 1
store i32 %79, i32* %4
br label %41
80: ; preds = %41
br label %83
81: ; preds = %29
%82 = call i32 (i8*, ...) @logOut(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.21, i64 0, i64 0))
br label %83
83: ; preds = %81, %80
%84 = load i32, i32* %2
ret i32 %84
}

LLVM IR (-O2):
@.str = [4 x i8] c"php\00"
@.str.1 = [22 x i8] c"PHP-CLI is installed\0A\00"
@.str.2 = [26 x i8] c"PHP-CLI is not installed\0A\00"
@.str.3 = [4 x i8] c"git\00"
@.str.4 = [18 x i8] c"Git is installed\0A\00"
@.str.5 = [22 x i8] c"Git is not installed\0A\00"
@.str.6 = [6 x i8] c"mysql\00"
@.str.7 = [27 x i8] c"MySQL-Client is installed\0A\00"
@.str.8 = [31 x i8] c"MySQL-Client is not installed\0A\00"
@.str.9 = [5 x i8] c"curl\00"
@.str.10 = [5 x i8] c"hash\00"
@.str.11 = [8 x i8] c"openssl\00"
@.str.12 = [7 x i8] c"mcrypt\00"
@.str.13 = [4 x i8] c"pdo\00"
@.str.14 = [10 x i8] c"pdo_mysql\00"
@__const.validateDependencies.tempName = [19 x i8] c"PufferPanel.XXXXXX\00"
@.str.15 = [2 x i8] c"w\00"
@.str.16 = [47 x i8] c"<?php exit(extension_loaded(\22%s\22) ? 0 : 1); ?>\00"
@.str.17 = [8 x i8] c"php -f \00"
@.str.18 = [18 x i8] c" 1>/dev/null 2>&1\00"
@.str.19 = [21 x i8] c"PHP-%s is installed\0A\00"
@.str.20 = [25 x i8] c"PHP-%s is not installed\0A\00"
@.str.21 = [58 x i8] c"Cannot validate PHP dependencies as PHP is not installed\0A\00"
define i32 @validateDependencies() {
%1 = alloca [6 x i8*]
%2 = alloca [19 x i8]
%3 = tail call i32 @validateCommand(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 (i8*, ...) @logOut(i8* %5)
%7 = tail call i32 @validateCommand(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0)
%10 = tail call i32 (i8*, ...) @logOut(i8* %9)
%11 = tail call i32 @validateCommand(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0)
%14 = select i1 %12, i1 true, i1 %4
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
%17 = tail call i32 (i8*, ...) @logOut(i8* %13)
br i1 %4, label %46, label %18
18: ; preds = %0
%19 = bitcast [6 x i8*]* %1 to i8*
%20 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8** %20
%21 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8** %21
%22 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8** %22
%23 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 3
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8** %23
%24 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 4
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8** %24
%25 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 5
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8** %25
%26 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 0
br label %27
27: ; preds = %18, %27
%28 = phi i64 [ 0, %18 ], [ %43, %27 ]
%29 = phi i32 [ %16, %18 ], [ %40, %27 ]
%30 = call i32 @mkstemp(i8* %26)
%31 = call i32* @fopen(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%32 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 %28
%33 = load i8*, i8** %32
%34 = call i32 @fprintf(i32* %31, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.16, i64 0, i64 0), i8* %33)
%35 = call i32 @fclose(i32* %31)
%36 = call i8* @concat(i32 3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i8* %26, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0))
%37 = call i64 @system(i8* %36)
%38 = icmp eq i64 %37, 0
%39 = select i1 %38, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0)
%40 = select i1 %38, i32 %29, i32 0
%41 = call i32 (i8*, ...) @logOut(i8* %39, i8* %33)
%42 = call i32 @unlink(i8* %26)
%43 = add nuw nsw i64 %28, 1
%44 = icmp eq i64 %43, 6
br i1 %44, label %45, label %27
45: ; preds = %27
br label %48
46: ; preds = %0
%47 = tail call i32 (i8*, ...) @logOut(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.21, i64 0, i64 0))
br label %48
48: ; preds = %46, %45
%49 = phi i32 [ %40, %45 ], [ %16, %46 ]
ret i32 %49
}