#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 EXIT_FAILURE;
int EXIT_SUCCESS;
char *allocateMemory(scalar_t__);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ readFileToStringArray(char *, char ***, unsigned int *);
int /*<<< orphan*/ removeFile(char *);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *, ...);
scalar_t__ stringEndsWith(char *, char const *);
scalar_t__ strlen(char const *);
scalar_t__ system(char *);
int main(int argc, char **argv) {
  if (argc != 3) {
    printf("program '%s' halted \n", argv[0]);
    printf("exactly two arguments (klee-last, output directory) expected \n");
    return EXIT_FAILURE;
  }
  const char *kleeLastDir = argv[1];
  const char *outputDir = argv[2];
  printf("kleeLastDir is '%s'\n", kleeLastDir);
  printf("outputDir is '%s'\n", outputDir);
  const char *errorFileName = "Errors.txt";
  const char *errorFileNamePattern = "test*.*.err";
  const char *assertionErrorEnding = ".assert.err";
  char *errorFile =
      allocateMemory(strlen(outputDir) + 1 + strlen(errorFileName) + 1);
  sprintf(errorFile, "%s/%s", outputDir, errorFileName);
  char *executingListCommand = allocateMemory(
      3 + strlen(kleeLastDir) + 1 + strlen(errorFileNamePattern) + 3 +
      strlen(outputDir) + 1 + strlen(errorFile) + 14 + 1);
  sprintf(executingListCommand, "ls %s/%s > %s 2> /dev/null", kleeLastDir,
          errorFileNamePattern, errorFile);
  if (system(executingListCommand)) {
    puts("\nResult: Programs seem to be equivalent.");
    puts("KLEE did not find any counterexamples or errors.");
    removeFile(errorFile);
    return EXIT_SUCCESS;
  }
  unsigned numErrors, numAssertionErrors = 0;
  char **errors;
  readFileToStringArray(errorFile, &errors, &numErrors);
  for (unsigned i = 0; i < numErrors; i++) {
    if (stringEndsWith(errors[i], assertionErrorEnding)) {
      printf("inc: %s, %s\n", errors[i], assertionErrorEnding);
      ++numAssertionErrors;
    }
  }
  if (numAssertionErrors > 0) {
    puts("\nResult: Programs are not equivalent.");
    puts("KLEE found at least one counterexample.");
  } else if (numErrors) {
    puts("\nResult: Programs are probably not equivalent.");
    puts("KLEE found at least one error that has to be checked.");
  }
  removeFile(errorFile);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11e7 <main+0x57>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2e03(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1440 <main+0x2b0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe53(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe53(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe54(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%rax
mov    %rax,-0x80(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x80(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   10a0 <allocateMemory@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0xe1b(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x3,%rax
add    $0x1,%rax
mov    %rax,-0x78(%rbp)
mov    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x78(%rbp),%rax
add    %rcx,%rax
add    $0x3,%rax
mov    %rax,-0x70(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x70(%rbp),%rax
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
mov    -0x40(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x68(%rbp),%rdi
add    %rax,%rdi
add    $0xe,%rdi
add    $0x1,%rdi
call   10a0 <allocateMemory@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x40(%rbp),%r8
lea    0xd97(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x48(%rbp),%rdi
call   1050 <system@plt>
cmp    $0x0,%rax
je     135b <main+0x1cb>
lea    0xd91(%rip),%rdi
call   1030 <puts@plt>
lea    0xdae(%rip),%rdi
call   1030 <puts@plt>
mov    -0x40(%rbp),%rdi
call   1080 <removeFile@plt>
mov    0x2c87(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1440 <main+0x2b0>
movl   $0x0,-0x50(%rbp)
mov    -0x40(%rbp),%rdi
lea    -0x58(%rbp),%rsi
lea    -0x4c(%rbp),%rdx
call   1070 <readFileToStringArray@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jae    13dd <main+0x24d>
mov    -0x58(%rbp),%rax
mov    -0x5c(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
mov    -0x38(%rbp),%rsi
call   10b0 <stringEndsWith@plt>
cmp    $0x0,%rax
je     13ca <main+0x23a>
mov    -0x58(%rbp),%rax
mov    -0x5c(%rbp),%ecx
mov    (%rax,%rcx,8),%rsi
mov    -0x38(%rbp),%rdx
lea    0xd61(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    13cf <main+0x23f>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    137a <main+0x1ea>
cmpl   $0x0,-0x50(%rbp)
jbe    1404 <main+0x274>
lea    0xd3a(%rip),%rdi
call   1030 <puts@plt>
lea    0xd54(%rip),%rdi
call   1030 <puts@plt>
jmp    142b <main+0x29b>
cmpl   $0x0,-0x4c(%rbp)
je     1426 <main+0x296>
lea    0xd61(%rip),%rdi
call   1030 <puts@plt>
lea    0xd84(%rip),%rdi
call   1030 <puts@plt>
jmp    142b <main+0x29b>
mov    -0x40(%rbp),%rdi
call   1080 <removeFile@plt>
mov    0x2ba5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
cmp    $0x3,%edi
jne    1286 <main+0xf6>
mov    0x8(%rsi),%r15
mov    0x10(%rsi),%rbx
lea    0xe62(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe66(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xc(%rax),%rdi
call   10a0 <allocateMemory@plt>
mov    %rax,%r14
lea    0xe77(%rip),%rsi
lea    0xe4d(%rip),%rcx
mov    %rax,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    %rax,%r12
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
add    %r12,%rbx
lea    (%rax,%rbx,1),%rdi
add    $0x22,%rdi
call   10a0 <allocateMemory@plt>
mov    %rax,%rbx
lea    0xe31(%rip),%rsi
lea    0xe0c(%rip),%rcx
mov    %rax,%rdi
mov    %r15,%rdx
mov    %r14,%r8
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <system@plt>
test   %rax,%rax
je     12a8 <main+0x118>
lea    0xe21(%rip),%rdi
call   1030 <puts@plt>
lea    0xe3e(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1080 <removeFile@plt>
mov    0x2d57(%rip),%rax
jmp    1360 <main+0x1d0>
mov    (%rsi),%rsi
lea    0xd70(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
jmp    1359 <main+0x1c9>
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
mov    %r14,%rdi
call   1070 <readFileToStringArray@plt>
cmpl   $0x0,0x4(%rsp)
je     1351 <main+0x1c1>
lea    0xd89(%rip),%r12
lea    0xe09(%rip),%r15
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    12ed <main+0x15d>
nopl   0x0(%rax)
add    $0x1,%rbx
mov    0x4(%rsp),%eax
cmp    %rax,%rbx
jae    131e <main+0x18e>
mov    0x8(%rsp),%rax
mov    (%rax,%rbx,8),%rdi
mov    %r12,%rsi
call   10b0 <stringEndsWith@plt>
test   %rax,%rax
je     12e0 <main+0x150>
mov    0x8(%rsp),%rax
mov    (%rax,%rbx,8),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%ebp
jmp    12e0 <main+0x150>
test   %ebp,%ebp
je     1332 <main+0x1a2>
lea    0xde6(%rip),%rbx
lea    0xdb9(%rip),%rdi
jmp    1344 <main+0x1b4>
test   %eax,%eax
je     1351 <main+0x1c1>
lea    0xe29(%rip),%rbx
lea    0xdf3(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1080 <removeFile@plt>
mov    0x2c80(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"program '%s' halted \0A\00"
@.str.1 = [63 x i8] c"exactly two arguments (klee-last, output directory) expected \0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [21 x i8] c"kleeLastDir is '%s'\0A\00"
@.str.3 = [19 x i8] c"outputDir is '%s'\0A\00"
@.str.4 = [11 x i8] c"Errors.txt\00"
@.str.5 = [12 x i8] c"test*.*.err\00"
@.str.6 = [12 x i8] c".assert.err\00"
@.str.7 = [6 x i8] c"%s/%s\00"
@.str.8 = [27 x i8] c"ls %s/%s > %s 2> /dev/null\00"
@.str.9 = [41 x i8] c"\0AResult: Programs seem to be equivalent.\00"
@.str.10 = [49 x i8] c"KLEE did not find any counterexamples or errors.\00"
@EXIT_SUCCESS = global i32 0
@.str.11 = [13 x i8] c"inc: %s, %s\0A\00"
@.str.12 = [38 x i8] c"\0AResult: Programs are not equivalent.\00"
@.str.13 = [40 x i8] c"KLEE found at least one counterexample.\00"
@.str.14 = [47 x i8] c"\0AResult: Programs are probably not equivalent.\00"
@.str.15 = [54 x i8] c"KLEE found at least one error that has to be checked.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8**
%16 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = load i32, i32* %4
%18 = icmp ne i32 %17, 3
br i1 %18, label %19, label %26
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 0
%22 = load i8*, i8** %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%25 = load i32, i32* @EXIT_FAILURE
store i32 %25, i32* %3
br label %128
26: ; preds = %2
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
store i8* %29, i8** %6
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 2
%32 = load i8*, i8** %31
store i8* %32, i8** %7
%33 = load i8*, i8** %6
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %33)
%35 = load i8*, i8** %7
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %35)
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8** %10
%37 = load i8*, i8** %7
%38 = call i64 @strlen(i8* %37)
%39 = add nsw i64 %38, 1
%40 = load i8*, i8** %8
%41 = call i64 @strlen(i8* %40)
%42 = add nsw i64 %39, %41
%43 = add nsw i64 %42, 1
%44 = call i8* @allocateMemory(i64 %43)
store i8* %44, i8** %11
%45 = load i8*, i8** %11
%46 = load i8*, i8** %7
%47 = load i8*, i8** %8
%48 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %45, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %46, i8* %47)
%49 = load i8*, i8** %6
%50 = call i64 @strlen(i8* %49)
%51 = add nsw i64 3, %50
%52 = add nsw i64 %51, 1
%53 = load i8*, i8** %9
%54 = call i64 @strlen(i8* %53)
%55 = add nsw i64 %52, %54
%56 = add nsw i64 %55, 3
%57 = load i8*, i8** %7
%58 = call i64 @strlen(i8* %57)
%59 = add nsw i64 %56, %58
%60 = add nsw i64 %59, 1
%61 = load i8*, i8** %11
%62 = call i64 @strlen(i8* %61)
%63 = add nsw i64 %60, %62
%64 = add nsw i64 %63, 14
%65 = add nsw i64 %64, 1
%66 = call i8* @allocateMemory(i64 %65)
store i8* %66, i8** %12
%67 = load i8*, i8** %12
%68 = load i8*, i8** %6
%69 = load i8*, i8** %9
%70 = load i8*, i8** %11
%71 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %67, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* %68, i8* %69, i8* %70)
%72 = load i8*, i8** %12
%73 = call i64 @system(i8* %72)
%74 = icmp ne i64 %73, 0
br i1 %74, label %75, label %81
75: ; preds = %26
%76 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0))
%77 = call i32 @puts(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0))
%78 = load i8*, i8** %11
%79 = call i32 @removeFile(i8* %78)
%80 = load i32, i32* @EXIT_SUCCESS
store i32 %80, i32* %3
br label %128
81: ; preds = %26
store i32 0, i32* %14
%82 = load i8*, i8** %11
%83 = call i32 @readFileToStringArray(i8* %82, i8*** %15, i32* %13)
store i32 0, i32* %16
br label %84
84: ; preds = %108, %81
%85 = load i32, i32* %16
%86 = load i32, i32* %13
%87 = icmp ult i32 %85, %86
br i1 %87, label %88, label %111
88: ; preds = %84
%89 = load i8**, i8*** %15
%90 = load i32, i32* %16
%91 = zext i32 %90 to i64
%92 = getelementptr inbounds i8*, i8** %89, i64 %91
%93 = load i8*, i8** %92
%94 = load i8*, i8** %10
%95 = call i64 @stringEndsWith(i8* %93, i8* %94)
%96 = icmp ne i64 %95, 0
br i1 %96, label %97, label %107
97: ; preds = %88
%98 = load i8**, i8*** %15
%99 = load i32, i32* %16
%100 = zext i32 %99 to i64
%101 = getelementptr inbounds i8*, i8** %98, i64 %100
%102 = load i8*, i8** %101
%103 = load i8*, i8** %10
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8* %102, i8* %103)
%105 = load i32, i32* %14
%106 = add i32 %105, 1
store i32 %106, i32* %14
br label %107
107: ; preds = %97, %88
br label %108
108: ; preds = %107
%109 = load i32, i32* %16
%110 = add i32 %109, 1
store i32 %110, i32* %16
br label %84
111: ; preds = %84
%112 = load i32, i32* %14
%113 = icmp ugt i32 %112, 0
br i1 %113, label %114, label %117
114: ; preds = %111
%115 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0))
%116 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0))
br label %124
117: ; preds = %111
%118 = load i32, i32* %13
%119 = icmp ne i32 %118, 0
br i1 %119, label %120, label %123
120: ; preds = %117
%121 = call i32 @puts(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0))
%122 = call i32 @puts(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.15, i64 0, i64 0))
br label %123
123: ; preds = %120, %117
br label %124
124: ; preds = %123, %114
%125 = load i8*, i8** %11
%126 = call i32 @removeFile(i8* %125)
%127 = load i32, i32* @EXIT_FAILURE
store i32 %127, i32* %3
br label %128
128: ; preds = %124, %75, %19
%129 = load i32, i32* %3
ret i32 %129
}

LLVM IR (-O2):
@.str = [22 x i8] c"program '%s' halted \0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [21 x i8] c"kleeLastDir is '%s'\0A\00"
@.str.3 = [19 x i8] c"outputDir is '%s'\0A\00"
@.str.4 = [11 x i8] c"Errors.txt\00"
@.str.5 = [12 x i8] c"test*.*.err\00"
@.str.6 = [12 x i8] c".assert.err\00"
@.str.7 = [6 x i8] c"%s/%s\00"
@.str.8 = [27 x i8] c"ls %s/%s > %s 2> /dev/null\00"
@.str.9 = [41 x i8] c"\0AResult: Programs seem to be equivalent.\00"
@.str.10 = [49 x i8] c"KLEE did not find any counterexamples or errors.\00"
@EXIT_SUCCESS = global i32 0
@.str.11 = [13 x i8] c"inc: %s, %s\0A\00"
@.str.12 = [38 x i8] c"\0AResult: Programs are not equivalent.\00"
@.str.13 = [40 x i8] c"KLEE found at least one counterexample.\00"
@.str.14 = [47 x i8] c"\0AResult: Programs are probably not equivalent.\00"
@.str.15 = [54 x i8] c"KLEE found at least one error that has to be checked.\00"
@str = [62 x i8] c"exactly two arguments (klee-last, output directory) expected \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = icmp eq i32 %0, 3
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
br label %75
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %15)
%18 = tail call i64 @strlen(i8* dereferenceable(1) %15)
%19 = add nsw i64 %18, 12
%20 = tail call i8* @allocateMemory(i64 %19)
%21 = tail call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %20, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %15, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%22 = tail call i64 @strlen(i8* dereferenceable(1) %13)
%23 = tail call i64 @strlen(i8* dereferenceable(1) %15)
%24 = tail call i64 @strlen(i8* dereferenceable(1) %20)
%25 = add i64 %22, 34
%26 = add i64 %25, %23
%27 = add i64 %26, %24
%28 = tail call i8* @allocateMemory(i64 %27)
%29 = tail call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %28, i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* %13, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* %20)
%30 = tail call i64 @system(i8* %28)
%31 = icmp eq i64 %30, 0
br i1 %31, label %37, label %32
32: ; preds = %11
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0))
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0))
%35 = tail call i32 @removeFile(i8* %20)
%36 = load i32, i32* @EXIT_SUCCESS
br label %75
37: ; preds = %11
%38 = bitcast i32* %3 to i8*
%39 = bitcast i8*** %4 to i8*
%40 = call i32 @readFileToStringArray(i8* %20, i8*** %4, i32* %3)
%41 = load i32, i32* %3
%42 = icmp eq i32 %41, 0
br i1 %42, label %72, label %45
43: ; preds = %59
%44 = icmp eq i32 %60, 0
br i1 %44, label %65, label %67
45: ; preds = %37, %59
%46 = phi i64 [ %61, %59 ], [ 0, %37 ]
%47 = phi i32 [ %60, %59 ], [ 0, %37 ]
%48 = load i8**, i8*** %4
%49 = getelementptr inbounds i8*, i8** %48, i64 %46
%50 = load i8*, i8** %49
%51 = call i64 @stringEndsWith(i8* %50, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %59, label %53
53: ; preds = %45
%54 = load i8**, i8*** %4
%55 = getelementptr inbounds i8*, i8** %54, i64 %46
%56 = load i8*, i8** %55
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8* %56, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%58 = add i32 %47, 1
br label %59
59: ; preds = %45, %53
%60 = phi i32 [ %58, %53 ], [ %47, %45 ]
%61 = add nuw nsw i64 %46, 1
%62 = load i32, i32* %3
%63 = zext i32 %62 to i64
%64 = icmp ult i64 %61, %63
br i1 %64, label %45, label %43
65: ; preds = %43
%66 = icmp eq i32 %62, 0
br i1 %66, label %72, label %67
67: ; preds = %65, %43
%68 = phi i8* [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0), %43 ], [ getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0), %65 ]
%69 = phi i8* [ getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0), %43 ], [ getelementptr inbounds ([54 x i8], [54 x i8]* @.str.15, i64 0, i64 0), %65 ]
%70 = call i32 @puts(i8* dereferenceable(1) %68)
%71 = call i32 @puts(i8* dereferenceable(1) %69)
br label %72
72: ; preds = %67, %37, %65
%73 = call i32 @removeFile(i8* %20)
%74 = load i32, i32* @EXIT_FAILURE
br label %75
75: ; preds = %32, %72, %6
%76 = phi i32 [ %10, %6 ], [ %36, %32 ], [ %74, %72 ]
ret i32 %76
}