#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 */
scalar_t__ ECHILD;
int EOF;
int /*<<< orphan*/ EXIT_FAILURE;
int O_CLOEXEC;
int O_RDONLY;
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ assert(int);
scalar_t__ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fdopen(int, char *);
int /*<<< orphan*/ ferror(int /*<<< orphan*/ *);
int fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
int fscanf(int /*<<< orphan*/ *, char *, int *, char **);
int open(char const *, int);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int wait(int /*<<< orphan*/ *);
int /*<<< orphan*/ wait_and_exec(int, char *);
int main(int argc, char **argv) {
  int r;
  if (argc != 2) {
    do {
      fprintf(stderr, "This program expects one argument."
                      "\n");
      exit(EXIT_FAILURE);
    } while (0);
  }
  const char *in_path = argv[1];
  int in_fd = open(in_path, O_RDONLY | O_CLOEXEC);
  do {
    if (!(in_fd > 0))
      do {
        fprintf(stderr,
                "Failed to open() input file \"%s\": %m"
                "\n",
                in_path);
        exit(EXIT_FAILURE);
      } while (0);
  } while (0);
  FILE *in_file = fdopen(in_fd, "r");
  do {
    if (!(in_file))
      do {
        fprintf(stderr,
                "Failed to fdopen() input fd %d: %m"
                "\n",
                in_fd);
        exit(EXIT_FAILURE);
      } while (0);
  } while (0);
  signal(SIGCHLD, SIG_IGN);
  for (;;) {
    int in_delay;
    char *in_path = NULL;
    r = fscanf(in_file, "%d %m[^\n] ", &in_delay, &in_path);
    if (r == EOF) {
      do {
        if (!(!ferror(in_file)))
          do {
            fprintf(stderr, "Failed to read next input line: %m"
                            "\n");
            exit(EXIT_FAILURE);
          } while (0);
      } while (0);
      break;
    }
    do {
      if (!(r == 2))
        do {
          fprintf(stderr,
                  "Failed to parse next input line: parsed %d entries of 2"
                  "\n",
                  r);
          exit(EXIT_FAILURE);
        } while (0);
    } while (0);
    int child_pid = fork();
    if (child_pid == 0) {
      wait_and_exec(in_delay, in_path);
    } else if (child_pid < 0) {
      do {
        fprintf(stderr, "Failed to fork() off a child: %m"
                        "\n");
        exit(EXIT_FAILURE);
      } while (0);
    }
    free(in_path);
  }
  r = wait(NULL);
  assert(r < 0 && errno == ECHILD);
  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)
cmpl   $0x2,-0x8(%rbp)
je     120a <main+0x4a>
jmp    11e5 <main+0x25>
mov    0x2dd4(%rip),%rax
mov    (%rax),%edi
lea    0xe0b(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2dad(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    0x2dc7(%rip),%rax
mov    (%rax),%esi
mov    0x2d6e(%rip),%rax
or     (%rax),%esi
call   10b0 <open@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jg     126c <main+0xac>
jmp    1243 <main+0x83>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xdcd(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2d4b(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    1271 <main+0xb1>
mov    -0x24(%rbp),%edi
lea    0xdcf(%rip),%rsi
call   10a0 <fdopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    12bc <main+0xfc>
jmp    1294 <main+0xd4>
mov    0x2d25(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
lea    0xda5(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2cfb(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    12c1 <main+0x101>
mov    0x2d18(%rip),%rax
mov    (%rax),%edi
mov    0x2cff(%rip),%rax
mov    (%rax),%esi
call   1070 <signal@plt>
movq   $0x0,-0x40(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xd85(%rip),%rsi
lea    -0x34(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   1060 <fscanf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2cd3(%rip),%rcx
cmp    (%rcx),%eax
jne    1358 <main+0x198>
jmp    1312 <main+0x152>
mov    -0x30(%rbp),%rdi
call   1050 <ferror@plt>
cmp    $0x0,%eax
je     134e <main+0x18e>
jmp    1329 <main+0x169>
mov    0x2c90(%rip),%rax
mov    (%rax),%edi
lea    0xd42(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2c69(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    1353 <main+0x193>
jmp    1405 <main+0x245>
jmp    135d <main+0x19d>
cmpl   $0x2,-0x14(%rbp)
je     1394 <main+0x1d4>
jmp    136c <main+0x1ac>
mov    0x2c4d(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xd20(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2c23(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    1399 <main+0x1d9>
mov    $0x0,%al
call   10e0 <fork@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    13be <main+0x1fe>
mov    -0x34(%rbp),%edi
mov    -0x40(%rbp),%rsi
call   1040 <wait_and_exec@plt>
jmp    13f7 <main+0x237>
cmpl   $0x0,-0x44(%rbp)
jge    13f2 <main+0x232>
jmp    13cd <main+0x20d>
mov    0x2bec(%rip),%rax
mov    (%rax),%edi
lea    0xcfb(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2bc5(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    13f7 <main+0x237>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
jmp    12d8 <main+0x118>
xor    %eax,%eax
mov    %eax,%edi
call   10d0 <wait@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x45(%rbp)
jge    143a <main+0x27a>
mov    0x2b91(%rip),%rax
mov    (%rax),%rax
mov    0x2b77(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x45(%rbp)
mov    -0x45(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1080 <assert@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
cmp    $0x2,%edi
jne    134a <main+0x18a>
mov    0x8(%rsi),%rbx
mov    0x2e08(%rip),%rax
mov    0x2db1(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    %rbx,%rdi
call   10b0 <open@plt>
test   %eax,%eax
jle    135c <main+0x19c>
mov    %eax,%ebp
lea    0xe46(%rip),%rsi
mov    %eax,%edi
call   10a0 <fdopen@plt>
test   %rax,%rax
je     1378 <main+0x1b8>
mov    %rax,%rbx
mov    0x2dc2(%rip),%rax
mov    (%rax),%edi
mov    0x2da9(%rip),%rax
mov    (%rax),%esi
call   1070 <signal@plt>
movq   $0x0,(%rsp)
lea    0xe33(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rsp,%rcx
mov    %rbx,%rdi
call   1060 <fscanf@plt>
mov    0x2d84(%rip),%rbp
cmp    0x0(%rbp),%eax
jne    12a5 <main+0xe5>
mov    %rbx,%rdi
call   1050 <ferror@plt>
test   %eax,%eax
jne    138c <main+0x1cc>
xor    %edi,%edi
call   10d0 <wait@plt>
test   %eax,%eax
sets   %al
mov    0x2d3c(%rip),%rcx
mov    (%rcx),%rcx
mov    0x2d22(%rip),%rdx
cmp    (%rdx),%rcx
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1080 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdc4(%rip),%r14
lea    0xc(%rsp),%r15
mov    %rsp,%r12
jmp    12f8 <main+0x138>
cs nopw 0x0(%rax,%rax,1)
mov    0xc(%rsp),%edi
mov    (%rsp),%rsi
call   1040 <wait_and_exec@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
movq   $0x0,(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
call   1060 <fscanf@plt>
cmp    0x0(%rbp),%eax
je     1259 <main+0x99>
cmp    $0x2,%eax
jne    1323 <main+0x163>
xor    %eax,%eax
call   10e0 <fork@plt>
test   %eax,%eax
je     12c0 <main+0x100>
jns    12cd <main+0x10d>
mov    0x2caf(%rip),%rax
mov    (%rax),%edi
lea    0xdbe(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    133c <main+0x17c>
mov    0x2c96(%rip),%rcx
mov    (%rcx),%edi
lea    0xd6c(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x2c6d(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    0x2c6f(%rip),%rax
mov    (%rax),%edi
lea    0xca6(%rip),%rsi
jmp    131a <main+0x15a>
mov    0x2c5d(%rip),%rax
mov    (%rax),%edi
lea    0xcb8(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    133c <main+0x17c>
mov    0x2c41(%rip),%rax
mov    (%rax),%edi
lea    0xcc4(%rip),%rsi
mov    %ebp,%edx
jmp    1335 <main+0x175>
mov    0x2c2d(%rip),%rax
mov    (%rax),%edi
lea    0xcdf(%rip),%rsi
jmp    131a <main+0x15a>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"This program expects one argument.\0A\00"
@EXIT_FAILURE = global i32 0
@O_RDONLY = global i32 0
@O_CLOEXEC = global i32 0
@.str.1 = [38 x i8] c"Failed to open() input file \22%s\22: %m\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [36 x i8] c"Failed to fdopen() input fd %d: %m\0A\00"
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
@.str.4 = [11 x i8] c"%d %m[^\0A] \00"
@EOF = global i32 0
@.str.5 = [36 x i8] c"Failed to read next input line: %m\0A\00"
@.str.6 = [57 x i8] c"Failed to parse next input line: parsed %d entries of 2\0A\00"
@.str.7 = [34 x i8] c"Failed to fork() off a child: %m\0A\00"
@errno = global i64 0
@ECHILD = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 2
br i1 %14, label %15, label %22
15: ; preds = %2
br label %16
16: ; preds = %15
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* @EXIT_FAILURE
%20 = call i32 @exit(i32 %19)
unreachable
21: ; No predecessors!
br label %22
22: ; preds = %21, %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
store i8* %25, i8** %7
%26 = load i8*, i8** %7
%27 = load i32, i32* @O_RDONLY
%28 = load i32, i32* @O_CLOEXEC
%29 = or i32 %27, %28
%30 = call i32 @open(i8* %26, i32 %29)
store i32 %30, i32* %8
br label %31
31: ; preds = %22
%32 = load i32, i32* %8
%33 = icmp sgt i32 %32, 0
br i1 %33, label %42, label %34
34: ; preds = %31
br label %35
35: ; preds = %34
%36 = load i32, i32* @stderr
%37 = load i8*, i8** %7
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %37)
%39 = load i32, i32* @EXIT_FAILURE
%40 = call i32 @exit(i32 %39)
unreachable
41: ; No predecessors!
br label %42
42: ; preds = %41, %31
br label %43
43: ; preds = %42
%44 = load i32, i32* %8
%45 = call i32* @fdopen(i32 %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %45, i32** %9
br label %46
46: ; preds = %43
%47 = load i32*, i32** %9
%48 = icmp ne i32* %47, null
br i1 %48, label %57, label %49
49: ; preds = %46
br label %50
50: ; preds = %49
%51 = load i32, i32* @stderr
%52 = load i32, i32* %8
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %52)
%54 = load i32, i32* @EXIT_FAILURE
%55 = call i32 @exit(i32 %54)
unreachable
56: ; No predecessors!
br label %57
57: ; preds = %56, %46
br label %58
58: ; preds = %57
%59 = load i32, i32* @SIGCHLD
%60 = load i32, i32* @SIG_IGN
%61 = call i32 @signal(i32 %59, i32 %60)
br label %62
62: ; preds = %114, %58
store i8* null, i8** %11
%63 = load i32*, i32** %9
%64 = call i32 @fscanf(i32* %63, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32* %10, i8** %11)
store i32 %64, i32* %6
%65 = load i32, i32* %6
%66 = load i32, i32* @EOF
%67 = icmp eq i32 %65, %66
br i1 %67, label %68, label %82
68: ; preds = %62
br label %69
69: ; preds = %68
%70 = load i32*, i32** %9
%71 = call i32 @ferror(i32* %70)
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %80
73: ; preds = %69
br label %74
74: ; preds = %73
%75 = load i32, i32* @stderr
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%77 = load i32, i32* @EXIT_FAILURE
%78 = call i32 @exit(i32 %77)
unreachable
79: ; No predecessors!
br label %80
80: ; preds = %79, %69
br label %81
81: ; preds = %80
br label %117
82: ; preds = %62
br label %83
83: ; preds = %82
%84 = load i32, i32* %6
%85 = icmp eq i32 %84, 2
br i1 %85, label %94, label %86
86: ; preds = %83
br label %87
87: ; preds = %86
%88 = load i32, i32* @stderr
%89 = load i32, i32* %6
%90 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0), i32 %89)
%91 = load i32, i32* @EXIT_FAILURE
%92 = call i32 @exit(i32 %91)
unreachable
93: ; No predecessors!
br label %94
94: ; preds = %93, %83
br label %95
95: ; preds = %94
%96 = call i32 (...) @fork()
store i32 %96, i32* %12
%97 = load i32, i32* %12
%98 = icmp eq i32 %97, 0
br i1 %98, label %99, label %103
99: ; preds = %95
%100 = load i32, i32* %10
%101 = load i8*, i8** %11
%102 = call i32 @wait_and_exec(i32 %100, i8* %101)
br label %114
103: ; preds = %95
%104 = load i32, i32* %12
%105 = icmp slt i32 %104, 0
br i1 %105, label %106, label %113
106: ; preds = %103
br label %107
107: ; preds = %106
%108 = load i32, i32* @stderr
%109 = call i32 (i32, i8*, ...) @fprintf(i32 %108, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%110 = load i32, i32* @EXIT_FAILURE
%111 = call i32 @exit(i32 %110)
unreachable
112: ; No predecessors!
br label %113
113: ; preds = %112, %103
br label %114
114: ; preds = %113, %99
%115 = load i8*, i8** %11
%116 = call i32 @free(i8* %115)
br label %62
117: ; preds = %81
%118 = call i32 @wait(i32* null)
store i32 %118, i32* %6
%119 = load i32, i32* %6
%120 = icmp slt i32 %119, 0
br i1 %120, label %121, label %125
121: ; preds = %117
%122 = load i64, i64* @errno
%123 = load i64, i64* @ECHILD
%124 = icmp eq i64 %122, %123
br label %125
125: ; preds = %121, %117
%126 = phi i1 [ false, %117 ], [ %124, %121 ]
%127 = zext i1 %126 to i32
%128 = call i32 @assert(i32 %127)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"This program expects one argument.\0A\00"
@EXIT_FAILURE = global i32 0
@O_RDONLY = global i32 0
@O_CLOEXEC = global i32 0
@.str.1 = [38 x i8] c"Failed to open() input file \22%s\22: %m\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [36 x i8] c"Failed to fdopen() input fd %d: %m\0A\00"
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
@.str.4 = [11 x i8] c"%d %m[^\0A] \00"
@EOF = global i32 0
@.str.5 = [36 x i8] c"Failed to read next input line: %m\0A\00"
@.str.6 = [57 x i8] c"Failed to parse next input line: parsed %d entries of 2\0A\00"
@.str.7 = [34 x i8] c"Failed to fork() off a child: %m\0A\00"
@errno = global i64 0
@ECHILD = global i64 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = icmp eq i32 %0, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = load i32, i32* @O_RDONLY
%15 = load i32, i32* @O_CLOEXEC
%16 = or i32 %15, %14
%17 = tail call i32 @open(i8* %13, i32 %16)
%18 = icmp sgt i32 %17, 0
br i1 %18, label %24, label %19
19: ; preds = %11
%20 = load i32, i32* @stderr
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%22 = load i32, i32* @EXIT_FAILURE
%23 = tail call i32 @exit(i32 %22)
unreachable
24: ; preds = %11
%25 = tail call i32* @fdopen(i32 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%26 = icmp eq i32* %25, null
br i1 %26, label %27, label %32
27: ; preds = %24
%28 = load i32, i32* @stderr
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%30 = load i32, i32* @EXIT_FAILURE
%31 = tail call i32 @exit(i32 %30)
unreachable
32: ; preds = %24
%33 = load i32, i32* @SIGCHLD
%34 = load i32, i32* @SIG_IGN
%35 = tail call i32 @signal(i32 %33, i32 %34)
%36 = bitcast i32* %3 to i8*
%37 = bitcast i8** %4 to i8*
store i8* null, i8** %4
%38 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32* %3, i8** %4)
%39 = load i32, i32* @EOF
%40 = icmp eq i32 %38, %39
br i1 %40, label %41, label %49
41: ; preds = %71, %32
%42 = call i32 @ferror(i32* %25)
%43 = icmp eq i32 %42, 0
br i1 %43, label %77, label %44
44: ; preds = %41
%45 = load i32, i32* @stderr
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%47 = load i32, i32* @EXIT_FAILURE
%48 = call i32 @exit(i32 %47)
unreachable
49: ; preds = %32, %71
%50 = phi i32 [ %74, %71 ], [ %38, %32 ]
%51 = icmp eq i32 %50, 2
br i1 %51, label %57, label %52
52: ; preds = %49
%53 = load i32, i32* @stderr
%54 = call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0), i32 %50)
%55 = load i32, i32* @EXIT_FAILURE
%56 = call i32 @exit(i32 %55)
unreachable
57: ; preds = %49
%58 = call i32 (...) @fork()
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %64
60: ; preds = %57
%61 = load i32, i32* %3
%62 = load i8*, i8** %4
%63 = call i32 @wait_and_exec(i32 %61, i8* %62)
br label %71
64: ; preds = %57
%65 = icmp slt i32 %58, 0
br i1 %65, label %66, label %71
66: ; preds = %64
%67 = load i32, i32* @stderr
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%69 = load i32, i32* @EXIT_FAILURE
%70 = call i32 @exit(i32 %69)
unreachable
71: ; preds = %60, %64
%72 = load i8*, i8** %4
%73 = call i32 @free(i8* %72)
store i8* null, i8** %4
%74 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32* %3, i8** %4)
%75 = load i32, i32* @EOF
%76 = icmp eq i32 %74, %75
br i1 %76, label %41, label %49
77: ; preds = %41
%78 = call i32 @wait(i32* null)
%79 = icmp slt i32 %78, 0
%80 = load i64, i64* @errno
%81 = load i64, i64* @ECHILD
%82 = icmp eq i64 %80, %81
%83 = select i1 %79, i1 %82, i1 false
%84 = zext i1 %83 to i32
%85 = call i32 @assert(i32 %84)
ret i32 0
}