#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 pid_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ F_OK;
scalar_t__ WEXITSTATUS(int);
scalar_t__ WIFEXITED(int);
scalar_t__ access(char *, int /*<<< orphan*/);
int execlp(char *, char *, char *, char *, int /*<<< orphan*/ *);
int execvp(char *, char **);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
int strlen(char *);
int wait(int *);
int main(int argc, char *argv[], char *envp[]) {
  pid_t pid;
  int i, status;
  char *tmp[argc];
  if (argc <= 1) {
    fprintf(stderr, "Not enought argument!\n");
    exit(EXIT_FAILURE);
  }
  tmp[0] = "gcc";
  for (i = 1; i < argc; i++) {
    if (access(argv[i], F_OK) == 0) {
      tmp[i] = argv[i];
      if ((pid = fork()) == -1) {
        perror("fork");
        exit(EXIT_FAILURE);
      }
      if (pid == 0) {
        if ((execlp("gcc", "gcc", "-c", argv[i], NULL)) == -1) {
          perror("execvp");
          exit(EXIT_FAILURE);
        }
      }
    } else {
      fprintf(stderr, "%s : Not a file\n", argv[i]);
      exit(EXIT_FAILURE);
    }
  }
  tmp[argc] = NULL;
  for (i = 1; i < argc; i++) {
    tmp[i][strlen(argv[i]) - 1] = 'o';
  }
  if ((wait(&status)) != -1) {
    if ((WIFEXITED(status) && WEXITSTATUS(status)) == EXIT_SUCCESS) {
      if ((execvp("gcc", tmp)) == -1) {
        perror("execvp");
        exit(EXIT_FAILURE);
      }
    } else {
      fprintf(stderr, "Error with the compilation! \n");
      exit(EXIT_FAILURE);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1220 <main+0x70>
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
lea    0xdf5(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    -0x40(%rbp),%rax
lea    0xdec(%rip),%rcx
mov    %rcx,(%rax)
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    134c <main+0x19c>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    0x2d6c(%rip),%rax
mov    (%rax),%esi
call   1060 <access@plt>
cmp    $0x0,%rax
jne    1308 <main+0x158>
mov    -0x40(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq -0x20(%rbp),%rdx
mov    (%rcx,%rdx,8),%rdx
movslq -0x20(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    $0x0,%al
call   10d0 <fork@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
jne    12aa <main+0xfa>
lea    0xd84(%rip),%rdi
call   1070 <perror@plt>
mov    0x2d35(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
cmpl   $0x0,-0x1c(%rbp)
jne    1303 <main+0x153>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xd50(%rip),%rsi
lea    0xd52(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rsi,%rdi
call   10b0 <execlp@plt>
cmp    $0xffffffff,%eax
jne    12fe <main+0x14e>
lea    0xd38(%rip),%rdi
call   1070 <perror@plt>
mov    0x2ce1(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
jmp    1303 <main+0x153>
jmp    1339 <main+0x189>
mov    0x2cd1(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xd06(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2ca6(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
jmp    133e <main+0x18e>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1235 <main+0x85>
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13ae <main+0x1fe>
mov    -0x40(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x6f,(%rax,%rcx,1)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1363 <main+0x1b3>
lea    -0x24(%rbp),%rdi
call   10c0 <wait@plt>
cmp    $0xffffffff,%eax
je     1465 <main+0x2b5>
mov    -0x24(%rbp),%edi
call   1090 <WIFEXITED@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x49(%rbp)
je     13ec <main+0x23c>
mov    -0x24(%rbp),%edi
call   1050 <WEXITSTATUS@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    0x2bd5(%rip),%rcx
cmp    (%rcx),%eax
jne    143b <main+0x28b>
mov    -0x40(%rbp),%rsi
lea    0xc09(%rip),%rdi
call   1080 <execvp@plt>
cmp    $0xffffffff,%eax
jne    1436 <main+0x286>
lea    0xc00(%rip),%rdi
call   1070 <perror@plt>
mov    0x2ba9(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
jmp    1460 <main+0x2b0>
mov    0x2b9e(%rip),%rax
mov    (%rax),%edi
lea    0xbf0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2b7f(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
jmp    1465 <main+0x2b5>
movl   $0x0,-0x4(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsp,-0x38(%rbp)
mov    %edi,%r15d
mov    %rsp,%r14
lea    0xf(,%r15,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
mov    %edi,-0x30(%rbp)
cmp    $0x1,%edi
jle    134c <main+0x19c>
mov    %rsi,%r12
lea    0xe24(%rip),%rbx
mov    %rbx,(%r14)
mov    $0x1,%r13d
jmp    1212 <main+0x62>
xchg   %ax,%ax
cmp    $0xffffffff,%eax
je     1332 <main+0x182>
add    $0x1,%r13
cmp    %r13,%r15
je     126a <main+0xba>
mov    (%r12,%r13,8),%rdi
mov    0x2da3(%rip),%rax
mov    (%rax),%esi
call   1060 <access@plt>
test   %rax,%rax
jne    1315 <main+0x165>
mov    (%r12,%r13,8),%rax
mov    %rax,(%r14,%r13,8)
xor    %eax,%eax
call   10d0 <fork@plt>
test   %eax,%eax
jne    1200 <main+0x50>
mov    (%r12,%r13,8),%rcx
mov    %rbx,%rdi
mov    %rbx,%rsi
lea    0xdcf(%rip),%rdx
xor    %r8d,%r8d
call   10b0 <execlp@plt>
cmp    $0xffffffff,%eax
jne    1209 <main+0x59>
lea    0xdbe(%rip),%rdi
jmp    1339 <main+0x189>
mov    -0x30(%rbp),%ecx
movslq %ecx,%rax
movq   $0x0,(%r14,%rax,8)
cmp    $0x2,%ecx
jl     12ae <main+0xfe>
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%r13
mov    (%r12,%rbx,8),%rdi
call   1030 <strlen@plt>
cltq
movb   $0x6f,-0x1(%rax,%r13,1)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1290 <main+0xe0>
lea    -0x2c(%rbp),%rdi
call   10c0 <wait@plt>
cmp    $0xffffffff,%eax
je     1300 <main+0x150>
mov    -0x2c(%rbp),%edi
call   1090 <WIFEXITED@plt>
test   %rax,%rax
je     12db <main+0x12b>
mov    -0x2c(%rbp),%edi
call   1050 <WEXITSTATUS@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
jmp    12dd <main+0x12d>
xor    %ecx,%ecx
mov    0x2cec(%rip),%rax
cmp    (%rax),%ecx
jne    135e <main+0x1ae>
lea    0xd28(%rip),%rdi
mov    %r14,%rsi
call   1080 <execvp@plt>
cmp    $0xffffffff,%eax
je     125e <main+0xae>
mov    -0x38(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cc4(%rip),%rax
mov    (%rax),%edi
mov    (%r12,%r13,8),%rdx
lea    0xd01(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    133e <main+0x18e>
lea    0xce2(%rip),%rdi
call   1070 <perror@plt>
mov    0x2c93(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    0x2c8d(%rip),%rax
mov    (%rax),%edi
lea    0xca4(%rip),%rsi
jmp    136e <main+0x1be>
mov    0x2c7b(%rip),%rax
mov    (%rax),%edi
lea    0xccd(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    133e <main+0x18e>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"Not enought argument!\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [4 x i8] c"gcc\00"
@F_OK = global i32 0
@.str.2 = [5 x i8] c"fork\00"
@.str.3 = [3 x i8] c"-c\00"
@.str.4 = [7 x i8] c"execvp\00"
@.str.5 = [17 x i8] c"%s : Not a file\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.6 = [30 x i8] c"Error with the compilation! \0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i64
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%13 = load i32, i32* %5
%14 = zext i32 %13 to i64
%15 = call i8* @llvm.stacksave()
store i8* %15, i8** %11
%16 = alloca i8*, i64 %14
store i64 %14, i64* %12
%17 = load i32, i32* %5
%18 = icmp sle i32 %17, 1
br i1 %18, label %19, label %24
19: ; preds = %3
%20 = load i32, i32* @stderr
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%22 = load i32, i32* @EXIT_FAILURE
%23 = call i32 @exit(i32 %22)
unreachable
24: ; preds = %3
%25 = getelementptr inbounds i8*, i8** %16, i64 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %25
store i32 1, i32* %9
br label %26
26: ; preds = %82, %24
%27 = load i32, i32* %9
%28 = load i32, i32* %5
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %85
30: ; preds = %26
%31 = load i8**, i8*** %6
%32 = load i32, i32* %9
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %31, i64 %33
%35 = load i8*, i8** %34
%36 = load i32, i32* @F_OK
%37 = call i64 @access(i8* %35, i32 %36)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %71
39: ; preds = %30
%40 = load i8**, i8*** %6
%41 = load i32, i32* %9
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8*, i8** %40, i64 %42
%44 = load i8*, i8** %43
%45 = load i32, i32* %9
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %16, i64 %46
store i8* %44, i8** %47
%48 = call i32 (...) @fork()
store i32 %48, i32* %8
%49 = icmp eq i32 %48, -1
br i1 %49, label %50, label %54
50: ; preds = %39
%51 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%52 = load i32, i32* @EXIT_FAILURE
%53 = call i32 @exit(i32 %52)
unreachable
54: ; preds = %39
%55 = load i32, i32* %8
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %70
57: ; preds = %54
%58 = load i8**, i8*** %6
%59 = load i32, i32* %9
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8*, i8** %58, i64 %60
%62 = load i8*, i8** %61
%63 = call i32 @execlp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %62, i32* null)
%64 = icmp eq i32 %63, -1
br i1 %64, label %65, label %69
65: ; preds = %57
%66 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%67 = load i32, i32* @EXIT_FAILURE
%68 = call i32 @exit(i32 %67)
unreachable
69: ; preds = %57
br label %70
70: ; preds = %69, %54
br label %81
71: ; preds = %30
%72 = load i32, i32* @stderr
%73 = load i8**, i8*** %6
%74 = load i32, i32* %9
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i8*, i8** %73, i64 %75
%77 = load i8*, i8** %76
%78 = call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %77)
%79 = load i32, i32* @EXIT_FAILURE
%80 = call i32 @exit(i32 %79)
unreachable
81: ; preds = %70
br label %82
82: ; preds = %81
%83 = load i32, i32* %9
%84 = add nsw i32 %83, 1
store i32 %84, i32* %9
br label %26
85: ; preds = %26
%86 = load i32, i32* %5
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8*, i8** %16, i64 %87
store i8* null, i8** %88
store i32 1, i32* %9
br label %89
89: ; preds = %107, %85
%90 = load i32, i32* %9
%91 = load i32, i32* %5
%92 = icmp slt i32 %90, %91
br i1 %92, label %93, label %110
93: ; preds = %89
%94 = load i32, i32* %9
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8*, i8** %16, i64 %95
%97 = load i8*, i8** %96
%98 = load i8**, i8*** %6
%99 = load i32, i32* %9
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8*, i8** %98, i64 %100
%102 = load i8*, i8** %101
%103 = call i32 @strlen(i8* %102)
%104 = sub nsw i32 %103, 1
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds i8, i8* %97, i64 %105
store i8 111, i8* %106
br label %107
107: ; preds = %93
%108 = load i32, i32* %9
%109 = add nsw i32 %108, 1
store i32 %109, i32* %9
br label %89
110: ; preds = %89
%111 = call i32 @wait(i32* %10)
%112 = icmp ne i32 %111, -1
br i1 %112, label %113, label %140
113: ; preds = %110
%114 = load i32, i32* %10
%115 = call i64 @WIFEXITED(i32 %114)
%116 = icmp ne i64 %115, 0
br i1 %116, label %117, label %121
117: ; preds = %113
%118 = load i32, i32* %10
%119 = call i64 @WEXITSTATUS(i32 %118)
%120 = icmp ne i64 %119, 0
br label %121
121: ; preds = %117, %113
%122 = phi i1 [ false, %113 ], [ %120, %117 ]
%123 = zext i1 %122 to i32
%124 = load i32, i32* @EXIT_SUCCESS
%125 = icmp eq i32 %123, %124
br i1 %125, label %126, label %134
126: ; preds = %121
%127 = call i32 @execvp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %16)
%128 = icmp eq i32 %127, -1
br i1 %128, label %129, label %133
129: ; preds = %126
%130 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%131 = load i32, i32* @EXIT_FAILURE
%132 = call i32 @exit(i32 %131)
unreachable
133: ; preds = %126
br label %139
134: ; preds = %121
%135 = load i32, i32* @stderr
%136 = call i32 (i32, i8*, ...) @fprintf(i32 %135, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%137 = load i32, i32* @EXIT_FAILURE
%138 = call i32 @exit(i32 %137)
unreachable
139: ; preds = %133
br label %140
140: ; preds = %139, %110
store i32 0, i32* %4
%141 = load i8*, i8** %11
%142 = load i32, i32* %4
ret i32 %142
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"Not enought argument!\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [4 x i8] c"gcc\00"
@F_OK = global i32 0
@.str.2 = [5 x i8] c"fork\00"
@.str.3 = [3 x i8] c"-c\00"
@.str.4 = [7 x i8] c"execvp\00"
@.str.5 = [17 x i8] c"%s : Not a file\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.6 = [30 x i8] c"Error with the compilation! \0A\00"
define i32 @main(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = zext i32 %0 to i64
%7 = tail call i8* @llvm.stacksave()
%8 = alloca i8*, i64 %6
%9 = icmp slt i32 %0, 2
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i32, i32* @stderr
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = tail call i32 @exit(i32 %13)
unreachable
15: ; preds = %3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %8
br label %16
16: ; preds = %15, %45
%17 = phi i64 [ 1, %15 ], [ %46, %45 ]
%18 = getelementptr inbounds i8*, i8** %1, i64 %17
%19 = load i8*, i8** %18
%20 = load i32, i32* @F_OK
%21 = tail call i64 @access(i8* %19, i32 %20)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %39
23: ; preds = %16
%24 = load i8*, i8** %18
%25 = getelementptr inbounds i8*, i8** %8, i64 %17
store i8* %24, i8** %25
%26 = tail call i32 (...) @fork()
switch i32 %26, label %45 [
i32 -1, label %27
i32 0, label %31
]
27: ; preds = %23
%28 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%29 = load i32, i32* @EXIT_FAILURE
%30 = tail call i32 @exit(i32 %29)
unreachable
31: ; preds = %23
%32 = load i8*, i8** %18
%33 = tail call i32 @execlp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %32, i32* null)
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %45
35: ; preds = %31
%36 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%37 = load i32, i32* @EXIT_FAILURE
%38 = tail call i32 @exit(i32 %37)
unreachable
39: ; preds = %16
%40 = load i32, i32* @stderr
%41 = load i8*, i8** %18
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %41)
%43 = load i32, i32* @EXIT_FAILURE
%44 = tail call i32 @exit(i32 %43)
unreachable
45: ; preds = %23, %31
%46 = add nuw nsw i64 %17, 1
%47 = icmp eq i64 %46, %6
br i1 %47, label %48, label %16
48: ; preds = %45
%49 = sext i32 %0 to i64
%50 = getelementptr inbounds i8*, i8** %8, i64 %49
store i8* null, i8** %50
%51 = icmp sgt i32 %0, 1
br i1 %51, label %52, label %64
52: ; preds = %48, %52
%53 = phi i64 [ %62, %52 ], [ 1, %48 ]
%54 = getelementptr inbounds i8*, i8** %8, i64 %53
%55 = load i8*, i8** %54
%56 = getelementptr inbounds i8*, i8** %1, i64 %53
%57 = load i8*, i8** %56
%58 = tail call i32 @strlen(i8* %57)
%59 = add nsw i32 %58, -1
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8, i8* %55, i64 %60
store i8 111, i8* %61
%62 = add nuw nsw i64 %53, 1
%63 = icmp eq i64 %62, %6
br i1 %63, label %64, label %52
64: ; preds = %52, %48
%65 = call i32 @wait(i32* %4)
%66 = icmp eq i32 %65, -1
br i1 %66, label %92, label %67
67: ; preds = %64
%68 = load i32, i32* %4
%69 = call i64 @WIFEXITED(i32 %68)
%70 = icmp eq i64 %69, 0
br i1 %70, label %76, label %71
71: ; preds = %67
%72 = load i32, i32* %4
%73 = call i64 @WEXITSTATUS(i32 %72)
%74 = icmp ne i64 %73, 0
%75 = zext i1 %74 to i32
br label %76
76: ; preds = %71, %67
%77 = phi i32 [ 0, %67 ], [ %75, %71 ]
%78 = load i32, i32* @EXIT_SUCCESS
%79 = icmp eq i32 %77, %78
br i1 %79, label %80, label %87
80: ; preds = %76
%81 = call i32 @execvp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %8)
%82 = icmp eq i32 %81, -1
br i1 %82, label %83, label %92
83: ; preds = %80
%84 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%85 = load i32, i32* @EXIT_FAILURE
%86 = call i32 @exit(i32 %85)
unreachable
87: ; preds = %76
%88 = load i32, i32* @stderr
%89 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%90 = load i32, i32* @EXIT_FAILURE
%91 = call i32 @exit(i32 %90)
unreachable
92: ; preds = %80, %64
ret i32 0
}