#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;
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ PATH_MAX;
int atoi(char *);
int /*<<< orphan*/ execl(char *, char *, char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
int getpid();
int /*<<< orphan*/ isdigit(char);
int pipe(int *);
int /*<<< orphan*/ printf(char *, ...);
int rand();
char *realpath(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ stderr;
int strlen(char *);
int /*<<< orphan*/ waitpid(int, int *, int /*<<< orphan*/);
int write(int, int *, int);
int main(int argc, char **argv) {
  if (argc != 2) {
    printf("Usage: %s [number].\n", argv[0]);
    return (-1);
  }
  int pid = getpid();
  int str_size = strlen(argv[1]);
  for (int o = 0; o < str_size; ++o) {
    if (!(isdigit(argv[1][o]))) {
      fprintf(stderr, "%s process [%d]: %s is not a valid input.\n", argv[0],
              pid, argv[1]);
      return (2);
    }
  }
  srand(atoi(argv[1]));
  int pipefd[2][2];
  int buffer[2];
  int nbytes[2];
  int r_val[2];
  pid_t child_id[2];
  for (int i = 0; i < 2; i++) {
    if (pipe(pipefd[i]) == -1) {
      fprintf(stderr, "Error: pipe() failed.\n");
      exit(1);
    }
    r_val[i] = -1;
    nbytes[i] = write(pipefd[i][1], &r_val[i], sizeof(buffer[i]));
    if ((child_id[i] = fork()) == -1) {
      fprintf(stderr, "Error: fork() failed.\n");
      return (1);
    }
    if (child_id[i] == 0) {
      char buf[PATH_MAX + 1];
      char *full_path = realpath("Beta", buf);
      if (full_path == NULL) {
        fprintf(stderr, "Error: %s can not be found.\n", "Beta");
        exit(1);
      }
      char pipe_buf[21];
      sprintf(pipe_buf, "%d", pipefd[i][0]);
      execl(full_path, "Beta", pipe_buf, argv[1], NULL);
      free(full_path);
    } else {
      r_val[i] = rand() % 100000;
      nbytes[i] = write(pipefd[i][1], &r_val[i], sizeof(buffer[i]));
      printf("%s: forked process with ID %d\n", argv[0], child_id[i]);
      printf("%s: wrote number %d to pipe (%d bytes)\n", argv[0], r_val[i],
             nbytes[i]);
    }
  }
  for (int i = 0; i < 2; i++) {
    int status = 0;
    printf("%s: waiting on child process ID %d...\n", argv[0], child_id[i]);
    waitpid(child_id[i], &status, 0);
    int val = r_val[i] * atoi(argv[1]);
    if (status) {
      printf("%d is not even as %s returned %d.\n", val, "Beta", status);
    } else {
      printf("%d is even as %s returned %d.\n", val, "Beta", status);
    }
  }
  printf("%s: exiting.\n", argv[0]);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1254 <main+0x44>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1636 <main+0x426>
mov    $0x0,%al
call   1060 <getpid@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <strlen@plt>
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12e7 <main+0xd7>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <isdigit@plt>
cmp    $0x0,%eax
jne    12d4 <main+0xc4>
mov    0x2d32(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%r8
lea    0xd54(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1636 <main+0x426>
jmp    12d9 <main+0xc9>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1275 <main+0x65>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10e0 <atoi@plt>
mov    %eax,%edi
call   10a0 <srand@plt>
movl   $0x0,-0x54(%rbp)
cmpl   $0x2,-0x54(%rbp)
jge    1524 <main+0x314>
movslq -0x54(%rbp),%rax
lea    -0x30(%rbp),%rdi
shl    $0x3,%rax
add    %rax,%rdi
call   1090 <pipe@plt>
cmp    $0xffffffff,%eax
jne    134a <main+0x13a>
mov    0x2ca8(%rip),%rax
mov    (%rax),%edi
lea    0xd07(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
movslq -0x54(%rbp),%rax
movl   $0xffffffff,-0x48(%rbp,%rax,4)
ff
movslq -0x54(%rbp),%rax
mov    -0x2c(%rbp,%rax,8),%edi
movslq -0x54(%rbp),%rax
lea    -0x48(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
mov    $0x4,%edx
call   1050 <write@plt>
mov    %eax,%ecx
movslq -0x54(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
mov    $0x0,%al
call   1120 <fork@plt>
movslq -0x54(%rbp),%rcx
mov    %eax,-0x50(%rbp,%rcx,4)
cmp    $0xffffffff,%eax
jne    13bc <main+0x1ac>
mov    0x2c38(%rip),%rax
mov    (%rax),%edi
lea    0xcae(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1636 <main+0x426>
movslq -0x54(%rbp),%rax
cmpl   $0x0,-0x50(%rbp,%rax,4)
jne    148d <main+0x27d>
mov    0x2c1e(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x60(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x68(%rbp)
lea    0xc71(%rip),%rdi
call   10c0 <realpath@plt>
mov    %rax,-0x70(%rbp)
cmpq   $0x0,-0x70(%rbp)
jne    1439 <main+0x229>
mov    0x2bc0(%rip),%rax
mov    (%rax),%edi
lea    0xc52(%rip),%rsi
lea    0xc46(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
lea    -0x90(%rbp),%rdi
movslq -0x54(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%edx
lea    0xc41(%rip),%rsi
call   10f0 <sprintf@plt>
mov    -0x70(%rbp),%rdi
lea    -0x90(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xc00(%rip),%rsi
xor    %eax,%eax
mov    %eax,%r8d
call   1110 <execl@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rax
mov    %rax,%rsp
jmp    1511 <main+0x301>
mov    $0x0,%al
call   1130 <rand@plt>
mov    $0x186a0,%ecx
cltd
idiv   %ecx
movslq -0x54(%rbp),%rax
mov    %edx,-0x48(%rbp,%rax,4)
movslq -0x54(%rbp),%rax
mov    -0x2c(%rbp,%rax,8),%edi
movslq -0x54(%rbp),%rax
lea    -0x48(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
mov    $0x4,%edx
call   1050 <write@plt>
mov    %eax,%ecx
movslq -0x54(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
movslq -0x54(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%edx
lea    0xbae(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
movslq -0x54(%rbp),%rax
mov    -0x48(%rbp,%rax,4),%edx
movslq -0x54(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%ecx
lea    0xba8(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1516 <main+0x306>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1302 <main+0xf2>
movl   $0x0,-0x94(%rbp)
cmpl   $0x2,-0x94(%rbp)
jge    161a <main+0x40a>
movl   $0x0,-0x98(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
movslq -0x94(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%edx
lea    0xb7c(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movslq -0x94(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%edi
lea    -0x98(%rbp),%rsi
xor    %edx,%edx
call   10d0 <waitpid@plt>
movslq -0x94(%rbp),%rax
mov    -0x48(%rbp,%rax,4),%eax
mov    %eax,-0xa0(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10e0 <atoi@plt>
mov    %eax,%ecx
mov    -0xa0(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x9c(%rbp)
cmpl   $0x0,-0x98(%rbp)
je     15e0 <main+0x3d0>
mov    -0x9c(%rbp),%esi
mov    -0x98(%rbp),%ecx
lea    0xb34(%rip),%rdi
lea    0xa9a(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1601 <main+0x3f1>
mov    -0x9c(%rbp),%esi
mov    -0x98(%rbp),%ecx
lea    0xb31(%rip),%rdi
lea    0xa74(%rip),%rdx
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1606 <main+0x3f6>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    152e <main+0x31e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xb1b(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x0,-0x4(%rbp)
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    $0x48,%rsp
mov    %rsi,%r12
cmp    $0x2,%edi
jne    1338 <main+0x128>
xor    %eax,%eax
call   1060 <getpid@plt>
mov    %eax,%r14d
mov    0x8(%r12),%rdi
call   1070 <strlen@plt>
test   %eax,%eax
jle    126f <main+0x5f>
mov    %eax,%r15d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    0x8(%r12),%rax
movsbl (%rax,%rbx,1),%edi
call   1040 <isdigit@plt>
test   %eax,%eax
je     1354 <main+0x144>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1250 <main+0x40>
mov    0x8(%r12),%rdi
call   10e0 <atoi@plt>
mov    %eax,%edi
call   10a0 <srand@plt>
lea    -0x40(%rbp),%rdi
call   1090 <pipe@plt>
cmp    $0xffffffff,%eax
je     1648 <main+0x438>
movl   $0xffffffff,-0x30(%rbp)
mov    -0x3c(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x4,%edx
call   1050 <write@plt>
xor    %eax,%eax
call   1120 <fork@plt>
mov    %eax,%r14d
test   %eax,%eax
je     1381 <main+0x171>
cmp    $0xffffffff,%r14d
je     14c5 <main+0x2b5>
xor    %eax,%eax
call   1130 <rand@plt>
movslq %eax,%rbx
imul   $0x14f8b589,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x2d,%rax
add    %ecx,%eax
imul   $0x186a0,%eax,%eax
sub    %eax,%ebx
mov    %ebx,-0x30(%rbp)
mov    -0x3c(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x4,%edx
call   1050 <write@plt>
mov    %eax,%r15d
mov    (%r12),%rsi
lea    0xd85(%rip),%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1080 <printf@plt>
mov    (%r12),%rsi
lea    0xd8f(%rip),%rdi
mov    %rbx,-0x68(%rbp)
mov    %ebx,%edx
mov    %r15d,%ecx
xor    %eax,%eax
call   1080 <printf@plt>
jmp    13fd <main+0x1ed>
mov    (%r12),%rsi
lea    0xcbd(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0xffffffff,%ebx
jmp    1637 <main+0x427>
mov    0x2c7d(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
mov    0x8(%r12),%r8
lea    0xca8(%rip),%rsi
mov    %r14d,%ecx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    $0x2,%ebx
jmp    1637 <main+0x427>
mov    %rsp,%r13
mov    0x2c65(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %rsp,%rsi
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rsi
mov    %rsi,%rsp
lea    0xcc6(%rip),%rdi
call   10c0 <realpath@plt>
test   %rax,%rax
je     1669 <main+0x459>
mov    %rax,%r15
mov    -0x40(%rbp),%edx
lea    0xccd(%rip),%rsi
lea    -0x60(%rbp),%rbx
mov    %rbx,%rdi
call   10f0 <sprintf@plt>
mov    0x8(%r12),%rcx
lea    0xc93(%rip),%rsi
mov    %r15,%rdi
mov    %rbx,%rdx
xor    %r8d,%r8d
call   1110 <execl@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    $0xffffffff,%eax
mov    %rax,-0x68(%rbp)
mov    %r13,%rsp
lea    -0x38(%rbp),%rdi
call   1090 <pipe@plt>
cmp    $0xffffffff,%eax
je     1648 <main+0x438>
lea    -0x2c(%rbp),%rbx
movl   $0xffffffff,-0x2c(%rbp)
mov    -0x34(%rbp),%edi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1050 <write@plt>
xor    %eax,%eax
call   1120 <fork@plt>
cmp    $0xffffffff,%eax
je     14c5 <main+0x2b5>
mov    %eax,%r15d
test   %eax,%eax
jne    14e6 <main+0x2d6>
mov    %rsp,-0x70(%rbp)
mov    0x2ba0(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %rsp,%rsi
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rsi
mov    %rsi,%rsp
lea    0xc01(%rip),%rdi
call   10c0 <realpath@plt>
test   %rax,%rax
je     1669 <main+0x459>
mov    %rax,%r13
mov    -0x38(%rbp),%edx
lea    0xc08(%rip),%rsi
lea    -0x60(%rbp),%rbx
mov    %rbx,%rdi
call   10f0 <sprintf@plt>
mov    0x8(%r12),%rcx
lea    0xbce(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
xor    %r8d,%r8d
call   1110 <execl@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    $0xffffffff,%r13d
mov    -0x70(%rbp),%rsp
jmp    154f <main+0x33f>
mov    0x2b0c(%rip),%rax
mov    (%rax),%edi
lea    0xb82(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    $0x1,%ebx
jmp    1637 <main+0x427>
xor    %eax,%eax
call   1130 <rand@plt>
movslq %eax,%r13
imul   $0x14f8b589,%r13,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x2d,%rax
add    %ecx,%eax
imul   $0x186a0,%eax,%eax
sub    %eax,%r13d
mov    %r13d,-0x2c(%rbp)
mov    -0x34(%rbp),%edi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1050 <write@plt>
mov    %eax,%ebx
mov    (%r12),%rsi
lea    0xb65(%rip),%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1080 <printf@plt>
mov    (%r12),%rsi
lea    0xb6f(%rip),%rdi
mov    %r13d,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1080 <printf@plt>
movl   $0x0,-0x60(%rbp)
mov    (%r12),%rsi
lea    0xb79(%rip),%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1080 <printf@plt>
lea    -0x60(%rbp),%rsi
mov    %r14d,%edi
xor    %edx,%edx
call   10d0 <waitpid@plt>
mov    0x8(%r12),%rdi
call   10e0 <atoi@plt>
imul   -0x68(%rbp),%eax
mov    -0x60(%rbp),%ecx
test   %ecx,%ecx
je     15a0 <main+0x390>
lea    0xb6c(%rip),%rdi
lea    0xad2(%rip),%rdx
mov    %eax,%esi
jmp    15b2 <main+0x3a2>
lea    0xb7d(%rip),%rdi
lea    0xac0(%rip),%rdx
mov    %eax,%esi
xor    %ecx,%ecx
xor    %eax,%eax
call   1080 <printf@plt>
movl   $0x0,-0x60(%rbp)
mov    (%r12),%rsi
lea    0xb0f(%rip),%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1080 <printf@plt>
lea    -0x60(%rbp),%rsi
mov    %r15d,%edi
xor    %edx,%edx
call   10d0 <waitpid@plt>
mov    0x8(%r12),%rdi
call   10e0 <atoi@plt>
imul   %r13d,%eax
mov    -0x60(%rbp),%ecx
test   %ecx,%ecx
je     160a <main+0x3fa>
lea    0xb02(%rip),%rdi
lea    0xa68(%rip),%rdx
mov    %eax,%esi
jmp    161c <main+0x40c>
lea    0xb13(%rip),%rdi
lea    0xa56(%rip),%rdx
mov    %eax,%esi
xor    %ecx,%ecx
xor    %eax,%eax
call   1080 <printf@plt>
mov    (%r12),%rsi
lea    0xb15(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebx,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2989(%rip),%rax
mov    (%rax),%edi
lea    0x9e8(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
mov    0x2968(%rip),%rax
mov    (%rax),%edi
lea    0x9fa(%rip),%rsi
lea    0x9ee(%rip),%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s [number].\0A\00"
@stderr = global i32 0
@.str.1 = [43 x i8] c"%s process [%d]: %s is not a valid input.\0A\00"
@.str.2 = [23 x i8] c"Error: pipe() failed.\0A\00"
@.str.3 = [23 x i8] c"Error: fork() failed.\0A\00"
@PATH_MAX = global i32 0
@.str.4 = [5 x i8] c"Beta\00"
@.str.5 = [29 x i8] c"Error: %s can not be found.\0A\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [31 x i8] c"%s: forked process with ID %d\0A\00"
@.str.8 = [40 x i8] c"%s: wrote number %d to pipe (%d bytes)\0A\00"
@.str.9 = [39 x i8] c"%s: waiting on child process ID %d...\0A\00"
@.str.10 = [35 x i8] c"%d is not even as %s returned %d.\0A\00"
@.str.11 = [31 x i8] c"%d is even as %s returned %d.\0A\00"
@.str.12 = [14 x i8] c"%s: exiting.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [2 x [2 x i32]]
%10 = alloca [2 x i32]
%11 = alloca [2 x i32]
%12 = alloca [2 x i32]
%13 = alloca [2 x i32]
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i64
%17 = alloca i8*
%18 = alloca [21 x i8]
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%22 = load i32, i32* %4
%23 = icmp ne i32 %22, 2
br i1 %23, label %24, label %29
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 0
%27 = load i8*, i8** %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %27)
store i32 -1, i32* %3
br label %231
29: ; preds = %2
%30 = call i32 (...) @getpid()
store i32 %30, i32* %6
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32 @strlen(i8* %33)
store i32 %34, i32* %7
store i32 0, i32* %8
br label %35
35: ; preds = %60, %29
%36 = load i32, i32* %8
%37 = load i32, i32* %7
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %63
39: ; preds = %35
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 1
%42 = load i8*, i8** %41
%43 = load i32, i32* %8
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8, i8* %42, i64 %44
%46 = load i8, i8* %45
%47 = call i32 @isdigit(i8 signext %46)
%48 = icmp ne i32 %47, 0
br i1 %48, label %59, label %49
49: ; preds = %39
%50 = load i32, i32* @stderr
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 0
%53 = load i8*, i8** %52
%54 = load i32, i32* %6
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 1
%57 = load i8*, i8** %56
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %53, i32 %54, i8* %57)
store i32 2, i32* %3
br label %231
59: ; preds = %39
br label %60
60: ; preds = %59
%61 = load i32, i32* %8
%62 = add nsw i32 %61, 1
store i32 %62, i32* %8
br label %35
63: ; preds = %35
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 1
%66 = load i8*, i8** %65
%67 = call i32 @atoi(i8* %66)
%68 = call i32 @srand(i32 %67)
store i32 0, i32* %14
br label %69
69: ; preds = %182, %63
%70 = load i32, i32* %14
%71 = icmp slt i32 %70, 2
br i1 %71, label %72, label %185
72: ; preds = %69
%73 = load i32, i32* %14
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %9, i64 0, i64 %74
%76 = getelementptr inbounds [2 x i32], [2 x i32]* %75, i64 0, i64 0
%77 = call i32 @pipe(i32* %76)
%78 = icmp eq i32 %77, -1
br i1 %78, label %79, label %83
79: ; preds = %72
%80 = load i32, i32* @stderr
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%82 = call i32 @exit(i32 1)
unreachable
83: ; preds = %72
%84 = load i32, i32* %14
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 %85
store i32 -1, i32* %86
%87 = load i32, i32* %14
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %9, i64 0, i64 %88
%90 = getelementptr inbounds [2 x i32], [2 x i32]* %89, i64 0, i64 1
%91 = load i32, i32* %90
%92 = load i32, i32* %14
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 %93
%95 = call i32 @write(i32 %91, i32* %94, i32 4)
%96 = load i32, i32* %14
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 %97
store i32 %95, i32* %98
%99 = call i32 (...) @fork()
%100 = load i32, i32* %14
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 %101
store i32 %99, i32* %102
%103 = icmp eq i32 %99, -1
br i1 %103, label %104, label %107
104: ; preds = %83
%105 = load i32, i32* @stderr
%106 = call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %231
107: ; preds = %83
%108 = load i32, i32* %14
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 %109
%111 = load i32, i32* %110
%112 = icmp eq i32 %111, 0
br i1 %112, label %113, label %143
113: ; preds = %107
%114 = load i32, i32* @PATH_MAX
%115 = add nsw i32 %114, 1
%116 = zext i32 %115 to i64
%117 = call i8* @llvm.stacksave()
store i8* %117, i8** %15
%118 = alloca i8, i64 %116
store i64 %116, i64* %16
%119 = call i8* @realpath(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %118)
store i8* %119, i8** %17
%120 = load i8*, i8** %17
%121 = icmp eq i8* %120, null
br i1 %121, label %122, label %126
122: ; preds = %113
%123 = load i32, i32* @stderr
%124 = call i32 (i32, i8*, ...) @fprintf(i32 %123, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%125 = call i32 @exit(i32 1)
unreachable
126: ; preds = %113
%127 = getelementptr inbounds [21 x i8], [21 x i8]* %18, i64 0, i64 0
%128 = load i32, i32* %14
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %9, i64 0, i64 %129
%131 = getelementptr inbounds [2 x i32], [2 x i32]* %130, i64 0, i64 0
%132 = load i32, i32* %131
%133 = call i32 @sprintf(i8* %127, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %132)
%134 = load i8*, i8** %17
%135 = getelementptr inbounds [21 x i8], [21 x i8]* %18, i64 0, i64 0
%136 = load i8**, i8*** %5
%137 = getelementptr inbounds i8*, i8** %136, i64 1
%138 = load i8*, i8** %137
%139 = call i32 @execl(i8* %134, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %135, i8* %138, i32* null)
%140 = load i8*, i8** %17
%141 = call i32 @free(i8* %140)
%142 = load i8*, i8** %15
br label %181
143: ; preds = %107
%144 = call i32 (...) @rand()
%145 = srem i32 %144, 100000
%146 = load i32, i32* %14
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 %147
store i32 %145, i32* %148
%149 = load i32, i32* %14
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %9, i64 0, i64 %150
%152 = getelementptr inbounds [2 x i32], [2 x i32]* %151, i64 0, i64 1
%153 = load i32, i32* %152
%154 = load i32, i32* %14
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 %155
%157 = call i32 @write(i32 %153, i32* %156, i32 4)
%158 = load i32, i32* %14
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 %159
store i32 %157, i32* %160
%161 = load i8**, i8*** %5
%162 = getelementptr inbounds i8*, i8** %161, i64 0
%163 = load i8*, i8** %162
%164 = load i32, i32* %14
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 %165
%167 = load i32, i32* %166
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* %163, i32 %167)
%169 = load i8**, i8*** %5
%170 = getelementptr inbounds i8*, i8** %169, i64 0
%171 = load i8*, i8** %170
%172 = load i32, i32* %14
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 %173
%175 = load i32, i32* %174
%176 = load i32, i32* %14
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 %177
%179 = load i32, i32* %178
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* %171, i32 %175, i32 %179)
br label %181
181: ; preds = %143, %126
br label %182
182: ; preds = %181
%183 = load i32, i32* %14
%184 = add nsw i32 %183, 1
store i32 %184, i32* %14
br label %69
185: ; preds = %69
store i32 0, i32* %19
br label %186
186: ; preds = %223, %185
%187 = load i32, i32* %19
%188 = icmp slt i32 %187, 2
br i1 %188, label %189, label %226
189: ; preds = %186
store i32 0, i32* %20
%190 = load i8**, i8*** %5
%191 = getelementptr inbounds i8*, i8** %190, i64 0
%192 = load i8*, i8** %191
%193 = load i32, i32* %19
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 %194
%196 = load i32, i32* %195
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i8* %192, i32 %196)
%198 = load i32, i32* %19
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 %199
%201 = load i32, i32* %200
%202 = call i32 @waitpid(i32 %201, i32* %20, i32 0)
%203 = load i32, i32* %19
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 %204
%206 = load i32, i32* %205
%207 = load i8**, i8*** %5
%208 = getelementptr inbounds i8*, i8** %207, i64 1
%209 = load i8*, i8** %208
%210 = call i32 @atoi(i8* %209)
%211 = mul nsw i32 %206, %210
store i32 %211, i32* %21
%212 = load i32, i32* %20
%213 = icmp ne i32 %212, 0
br i1 %213, label %214, label %218
214: ; preds = %189
%215 = load i32, i32* %21
%216 = load i32, i32* %20
%217 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0), i32 %215, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %216)
br label %222
218: ; preds = %189
%219 = load i32, i32* %21
%220 = load i32, i32* %20
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i32 %219, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %220)
br label %222
222: ; preds = %218, %214
br label %223
223: ; preds = %222
%224 = load i32, i32* %19
%225 = add nsw i32 %224, 1
store i32 %225, i32* %19
br label %186
226: ; preds = %186
%227 = load i8**, i8*** %5
%228 = getelementptr inbounds i8*, i8** %227, i64 0
%229 = load i8*, i8** %228
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i8* %229)
store i32 0, i32* %3
br label %231
231: ; preds = %226, %104, %49, %24
%232 = load i32, i32* %3
ret i32 %232
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [number].\0A\00"
@stderr = global i32 0
@.str.1 = [43 x i8] c"%s process [%d]: %s is not a valid input.\0A\00"
@.str.2 = [23 x i8] c"Error: pipe() failed.\0A\00"
@.str.3 = [23 x i8] c"Error: fork() failed.\0A\00"
@PATH_MAX = global i32 0
@.str.4 = [5 x i8] c"Beta\00"
@.str.5 = [29 x i8] c"Error: %s can not be found.\0A\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [31 x i8] c"%s: forked process with ID %d\0A\00"
@.str.8 = [40 x i8] c"%s: wrote number %d to pipe (%d bytes)\0A\00"
@.str.9 = [39 x i8] c"%s: waiting on child process ID %d...\0A\00"
@.str.10 = [35 x i8] c"%d is not even as %s returned %d.\0A\00"
@.str.11 = [31 x i8] c"%d is even as %s returned %d.\0A\00"
@.str.12 = [14 x i8] c"%s: exiting.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2 x [2 x i32]]
%4 = alloca [2 x i32]
%5 = alloca [21 x i8]
%6 = alloca i32
%7 = icmp eq i32 %0, 2
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %151
11: ; preds = %2
%12 = tail call i32 (...) @getpid()
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32 @strlen(i8* %14)
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %34
17: ; preds = %11
%18 = zext i32 %15 to i64
br label %21
19: ; preds = %21
%20 = icmp eq i64 %28, %18
br i1 %20, label %34, label %21
21: ; preds = %17, %19
%22 = phi i64 [ 0, %17 ], [ %28, %19 ]
%23 = load i8*, i8** %13
%24 = getelementptr inbounds i8, i8* %23, i64 %22
%25 = load i8, i8* %24
%26 = tail call i32 @isdigit(i8 signext %25)
%27 = icmp eq i32 %26, 0
%28 = add nuw nsw i64 %22, 1
br i1 %27, label %29, label %19
29: ; preds = %21
%30 = load i32, i32* @stderr
%31 = load i8*, i8** %1
%32 = load i8*, i8** %13
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %31, i32 %12, i8* %32)
br label %151
34: ; preds = %19, %11
%35 = load i8*, i8** %13
%36 = tail call i32 @atoi(i8* %35)
%37 = tail call i32 @srand(i32 %36)
%38 = bitcast [2 x [2 x i32]]* %3 to i8*
%39 = bitcast [2 x i32]* %4 to i8*
%40 = getelementptr inbounds [21 x i8], [21 x i8]* %5, i64 0, i64 0
%41 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 0, i64 0
%42 = call i32 @pipe(i32* %41)
%43 = icmp eq i32 %42, -1
br i1 %43, label %44, label %48
44: ; preds = %84, %34
%45 = load i32, i32* @stderr
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%47 = call i32 @exit(i32 1)
unreachable
48: ; preds = %34
%49 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 -1, i32* %49
%50 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 0, i64 1
%51 = load i32, i32* %50
%52 = call i32 @write(i32 %51, i32* %49, i32 4)
%53 = call i32 (...) @fork()
switch i32 %53, label %75 [
i32 -1, label %54
i32 0, label %57
]
54: ; preds = %89, %48
%55 = load i32, i32* @stderr
%56 = call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
br label %149
57: ; preds = %48
%58 = load i32, i32* @PATH_MAX
%59 = add nsw i32 %58, 1
%60 = zext i32 %59 to i64
%61 = call i8* @llvm.stacksave()
%62 = alloca i8, i64 %60
%63 = call i8* @realpath(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %62)
%64 = icmp eq i8* %63, null
br i1 %64, label %65, label %69
65: ; preds = %95, %57
%66 = load i32, i32* @stderr
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%68 = call i32 @exit(i32 1)
unreachable
69: ; preds = %57
%70 = load i32, i32* %41
%71 = call i32 @sprintf(i8* %40, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %70)
%72 = load i8*, i8** %13
%73 = call i32 @execl(i8* %63, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %40, i8* %72, i32* null)
%74 = call i32 @free(i8* %63)
br label %84
75: ; preds = %48
%76 = call i32 (...) @rand()
%77 = srem i32 %76, 100000
store i32 %77, i32* %49
%78 = load i32, i32* %50
%79 = call i32 @write(i32 %78, i32* %49, i32 4)
%80 = load i8*, i8** %1
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* %80, i32 %53)
%82 = load i8*, i8** %1
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* %82, i32 %77, i32 %79)
br label %84
84: ; preds = %69, %75
%85 = phi i32 [ -1, %69 ], [ %77, %75 ]
%86 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 1, i64 0
%87 = call i32 @pipe(i32* %86)
%88 = icmp eq i32 %87, -1
br i1 %88, label %44, label %89
89: ; preds = %84
%90 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 -1, i32* %90
%91 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 1, i64 1
%92 = load i32, i32* %91
%93 = call i32 @write(i32 %92, i32* %90, i32 4)
%94 = call i32 (...) @fork()
switch i32 %94, label %109 [
i32 -1, label %54
i32 0, label %95
]
95: ; preds = %89
%96 = load i32, i32* @PATH_MAX
%97 = add nsw i32 %96, 1
%98 = zext i32 %97 to i64
%99 = call i8* @llvm.stacksave()
%100 = alloca i8, i64 %98
%101 = call i8* @realpath(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %100)
%102 = icmp eq i8* %101, null
br i1 %102, label %65, label %103
103: ; preds = %95
%104 = load i32, i32* %86
%105 = call i32 @sprintf(i8* %40, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %104)
%106 = load i8*, i8** %13
%107 = call i32 @execl(i8* %101, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %40, i8* %106, i32* null)
%108 = call i32 @free(i8* %101)
br label %118
109: ; preds = %89
%110 = call i32 (...) @rand()
%111 = srem i32 %110, 100000
store i32 %111, i32* %90
%112 = load i32, i32* %91
%113 = call i32 @write(i32 %112, i32* %90, i32 4)
%114 = load i8*, i8** %1
%115 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* %114, i32 %94)
%116 = load i8*, i8** %1
%117 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* %116, i32 %111, i32 %113)
br label %118
118: ; preds = %109, %103
%119 = phi i32 [ %111, %109 ], [ -1, %103 ]
%120 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%121 = load i8*, i8** %1
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i8* %121, i32 %53)
%123 = call i32 @waitpid(i32 %53, i32* %6, i32 0)
%124 = load i8*, i8** %13
%125 = call i32 @atoi(i8* %124)
%126 = mul nsw i32 %125, %85
%127 = load i32, i32* %6
%128 = icmp eq i32 %127, 0
br i1 %128, label %131, label %129
129: ; preds = %118
%130 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0), i32 %126, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %127)
br label %133
131: ; preds = %118
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i32 %126, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 0)
br label %133
133: ; preds = %131, %129
store i32 0, i32* %6
%134 = load i8*, i8** %1
%135 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i8* %134, i32 %94)
%136 = call i32 @waitpid(i32 %94, i32* %6, i32 0)
%137 = load i8*, i8** %13
%138 = call i32 @atoi(i8* %137)
%139 = mul nsw i32 %138, %119
%140 = load i32, i32* %6
%141 = icmp eq i32 %140, 0
br i1 %141, label %144, label %142
142: ; preds = %133
%143 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0), i32 %139, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %140)
br label %146
144: ; preds = %133
%145 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i32 %139, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 0)
br label %146
146: ; preds = %144, %142
%147 = load i8*, i8** %1
%148 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i8* %147)
br label %149
149: ; preds = %54, %146
%150 = phi i32 [ 0, %146 ], [ 1, %54 ]
br label %151
151: ; preds = %29, %149, %8
%152 = phi i32 [ -1, %8 ], [ %150, %149 ], [ 2, %29 ]
ret i32 %152
}