#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 /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, int, int,
                           int);
int getpgrp();
int getpid();
scalar_t__ pipe(int *);
int read(int, char *, int);
int /*<<< orphan*/ setpgid(int, int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ wait(int *);
int /*<<< orphan*/ write(int, char *, int);
main() {
  int pid1 = 0, pid2 = 0, fds[2];
  int status;
  char ok;
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            11, getpid(), pid1, pid2);
  } while (0);
  switch (pid1 = fork()) {
  case -1:
    do {
      fprintf(stderr, "%s:%d %d %d %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
              "tests/129-pgrps/129-pgrps.c",
              14, getpid(), pid1, pid2);
    } while (0);
    exit(1);
  case 0:
    do {
      fprintf(stderr, "%s:%d %d %d %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
              "tests/129-pgrps/129-pgrps.c",
              17, getpid(), pid1, pid2);
    } while (0);
    setpgid(0, getpid());
    exit(0);
  }
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            21, getpid(), pid1, pid2);
  } while (0);
  setpgid(pid1, pid1);
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            24, getpid(), pid1, pid2);
  } while (0);
  sleep(2);
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            27, getpid(), pid1, pid2);
  } while (0);
  if (pipe(fds) < 0)
    exit(2);
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            31, getpid(), pid1, pid2);
  } while (0);
  switch (pid2 = fork()) {
  case -1:
    do {
      fprintf(stderr, "%s:%d %d %d %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
              "tests/129-pgrps/129-pgrps.c",
              34, getpid(), pid1, pid2);
    } while (0);
    exit(3);
  case 0:
    do {
      fprintf(stderr, "%s:%d %d %d %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
              "tests/129-pgrps/129-pgrps.c",
              37, getpid(), pid1, pid2);
    } while (0);
    setpgid(0, pid1);
    do {
      fprintf(stderr, "%s:%d %d %d %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
              "tests/129-pgrps/129-pgrps.c",
              39, getpid(), pid1, pid2);
    } while (0);
    ok = getpgrp() == pid1;
    do {
      fprintf(stderr, "%s:%d %d %d %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
              "tests/129-pgrps/129-pgrps.c",
              41, getpid(), pid1, pid2);
    } while (0);
    write(fds[1], &ok, 1);
    do {
      fprintf(stderr, "%s:%d %d %d %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
              "tests/129-pgrps/129-pgrps.c",
              43, getpid(), pid1, pid2);
    } while (0);
    exit(0);
  }
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            46, getpid(), pid1, pid2);
  } while (0);
  setpgid(pid2, pid1);
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            49, getpid(), pid1, pid2);
  } while (0);
  close(fds[1]);
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            51, getpid(), pid1, pid2);
  } while (0);
  if (read(fds[0], &ok, 1) != 1)
    exit(4);
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            54, getpid(), pid1, pid2);
  } while (0);
  wait(&status);
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            56, getpid(), pid1, pid2);
  } while (0);
  wait(&status);
  do {
    fprintf(stderr, "%s:%d %d %d %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/"
            "tests/129-pgrps/129-pgrps.c",
            58, getpid(), pid1, pid2);
  } while (0);
  exit(ok ? 0 : 5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    0x2df9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x20(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xdf9(%rip),%rsi
lea    0xe02(%rip),%rdx
mov    $0xb,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
xor    %eax,%eax
call   10e0 <fork@plt>
mov    %eax,-0x8(%rbp)
mov    %eax,%ecx
mov    %ecx,-0x24(%rbp)
sub    $0xffffffff,%eax
je     1248 <main+0x88>
jmp    1238 <main+0x78>
mov    -0x24(%rbp),%eax
test   %eax,%eax
je     1292 <main+0xd2>
jmp    12e9 <main+0x129>
jmp    124d <main+0x8d>
mov    0x2d8c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x28(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xd8c(%rip),%rsi
lea    0xd95(%rip),%rdx
mov    $0xe,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
jmp    1297 <main+0xd7>
mov    0x2d42(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x2c(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xd42(%rip),%rsi
lea    0xd4b(%rip),%rdx
mov    $0x11,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    $0x0,%al
call   1040 <getpid@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10a0 <setpgid@plt>
xor    %edi,%edi
call   10b0 <exit@plt>
jmp    12ee <main+0x12e>
mov    0x2ceb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x30(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xceb(%rip),%rsi
lea    0xcf4(%rip),%rdx
mov    $0x15,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   10a0 <setpgid@plt>
mov    0x2ca5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x34(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xca5(%rip),%rsi
lea    0xcae(%rip),%rdx
mov    $0x18,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    $0x2,%edi
call   10c0 <sleep@plt>
mov    0x2c60(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x38(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xc60(%rip),%rsi
lea    0xc69(%rip),%rdx
mov    $0x1b,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
lea    -0x14(%rbp),%rdi
call   1060 <pipe@plt>
cmp    $0x0,%rax
jge    13d1 <main+0x211>
mov    $0x2,%edi
call   10b0 <exit@plt>
jmp    13d6 <main+0x216>
mov    0x2c03(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x3c(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xc03(%rip),%rsi
lea    0xc0c(%rip),%rdx
mov    $0x1f,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
xor    %eax,%eax
call   10e0 <fork@plt>
mov    %eax,-0xc(%rbp)
mov    %eax,%ecx
mov    %ecx,-0x40(%rbp)
sub    $0xffffffff,%eax
je     143e <main+0x27e>
jmp    142e <main+0x26e>
mov    -0x40(%rbp),%eax
test   %eax,%eax
je     1488 <main+0x2c8>
jmp    15b0 <main+0x3f0>
jmp    1443 <main+0x283>
mov    0x2b96(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x44(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xb96(%rip),%rsi
lea    0xb9f(%rip),%rdx
mov    $0x22,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    $0x3,%edi
call   10b0 <exit@plt>
jmp    148d <main+0x2cd>
mov    0x2b4c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x48(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xb4c(%rip),%rsi
lea    0xb55(%rip),%rdx
mov    $0x25,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    -0x8(%rbp),%esi
xor    %edi,%edi
call   10a0 <setpgid@plt>
mov    0x2b07(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x4c(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xb07(%rip),%rsi
lea    0xb10(%rip),%rdx
mov    $0x27,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    $0x0,%al
call   1090 <getpgrp@plt>
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0x19(%rbp)
mov    0x2ab7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x50(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x50(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xab7(%rip),%rsi
lea    0xac0(%rip),%rdx
mov    $0x29,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%edi
lea    -0x19(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    0x2a6b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x54(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xa6b(%rip),%rsi
lea    0xa74(%rip),%rdx
mov    $0x2b,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
xor    %edi,%edi
call   10b0 <exit@plt>
jmp    15b5 <main+0x3f5>
mov    0x2a24(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x58(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xa24(%rip),%rsi
lea    0xa2d(%rip),%rdx
mov    $0x2e,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   10a0 <setpgid@plt>
mov    0x29de(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x5c(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0x9de(%rip),%rsi
lea    0x9e7(%rip),%rdx
mov    $0x31,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%edi
call   1050 <close@plt>
mov    0x299b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x60(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x60(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0x99b(%rip),%rsi
lea    0x9a4(%rip),%rdx
mov    $0x33,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%edi
lea    -0x19(%rbp),%rsi
mov    $0x1,%edx
call   1070 <read@plt>
cmp    $0x1,%eax
je     169d <main+0x4dd>
mov    $0x4,%edi
call   10b0 <exit@plt>
jmp    16a2 <main+0x4e2>
mov    0x2937(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x64(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0x937(%rip),%rsi
lea    0x940(%rip),%rdx
mov    $0x36,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
lea    -0x18(%rbp),%rdi
call   10d0 <wait@plt>
mov    0x28f3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x68(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0x8f3(%rip),%rsi
lea    0x8fc(%rip),%rdx
mov    $0x38,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
lea    -0x18(%rbp),%rdi
call   10d0 <wait@plt>
mov    0x28af(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x6c(%rbp),%edi
mov    %eax,%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0x8af(%rip),%rsi
lea    0x8b8(%rip),%rdx
mov    $0x3a,%ecx
mov    %eax,(%rsp)
call   1080 <fprintf@plt>
movsbl -0x19(%rbp),%ecx
mov    $0x5,%edi
xor    %eax,%eax
cmp    $0x0,%ecx
cmovne %eax,%edi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2e0b(%rip),%r13
mov    0x0(%r13),%ebx
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
lea    0xe12(%rip),%rsi
lea    0xe1b(%rip),%rdx
mov    %ebx,%edi
mov    $0xb,%ecx
mov    %eax,%r8d
xor    %r9d,%r9d
call   1080 <fprintf@plt>
xor    %eax,%eax
call   10e0 <fork@plt>
test   %eax,%eax
je     125c <main+0x9c>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    12a5 <main+0xe5>
mov    0x0(%r13),%ebx
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
lea    0xdca(%rip),%rsi
lea    0xdd3(%rip),%rdx
mov    %ebx,%edi
mov    $0xe,%ecx
mov    %eax,%r8d
mov    $0xffffffff,%r9d
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    0x0(%r13),%ebx
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
lea    0xd8b(%rip),%rsi
lea    0xd94(%rip),%rdx
mov    %ebx,%edi
mov    $0x11,%ecx
mov    %eax,%r8d
xor    %r9d,%r9d
call   1080 <fprintf@plt>
xor    %eax,%eax
call   1040 <getpid@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10a0 <setpgid@plt>
xor    %edi,%edi
call   10b0 <exit@plt>
mov    0x0(%r13),%ebp
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
lea    0xd42(%rip),%r15
lea    0xd4b(%rip),%r14
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x15,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
mov    %ebx,%edi
mov    %ebx,%esi
call   10a0 <setpgid@plt>
mov    0x0(%r13),%ebp
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x18,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
mov    $0x2,%edi
call   10c0 <sleep@plt>
mov    0x0(%r13),%ebp
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x1b,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
lea    0xc(%rsp),%rdi
call   1060 <pipe@plt>
test   %rax,%rax
jns    135d <main+0x19d>
mov    $0x2,%edi
call   10b0 <exit@plt>
mov    0x0(%r13),%ebp
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
lea    0xc8a(%rip),%rsi
lea    0xc93(%rip),%rdx
mov    %ebp,%edi
mov    $0x1f,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
xor    %eax,%eax
call   10e0 <fork@plt>
test   %eax,%eax
je     13e1 <main+0x221>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
jne    14c8 <main+0x308>
mov    0x0(%r13),%ebp
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0xffffffff,(%rsp)
lea    0xc42(%rip),%rsi
lea    0xc4b(%rip),%rdx
mov    %ebp,%edi
mov    $0x22,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
mov    $0x3,%edi
call   10b0 <exit@plt>
mov    0x0(%r13),%ebp
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
lea    0xc06(%rip),%r15
lea    0xc0f(%rip),%r14
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x25,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
xor    %edi,%edi
mov    %ebx,%esi
call   10a0 <setpgid@plt>
mov    0x0(%r13),%ebp
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x27,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
xor    %eax,%eax
call   1090 <getpgrp@plt>
cmp    %ebx,%eax
sete   0xb(%rsp)
mov    0x0(%r13),%ebp
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x29,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
mov    0x10(%rsp),%edi
lea    0xb(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    0x0(%r13),%ebp
xor    %eax,%eax
call   1040 <getpid@plt>
movl   $0x0,(%rsp)
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x2b,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
xor    %edi,%edi
call   10b0 <exit@plt>
mov    0x0(%r13),%r12d
xor    %eax,%eax
call   1040 <getpid@plt>
mov    %ebp,(%rsp)
lea    0xb23(%rip),%r14
lea    0xb2c(%rip),%r15
mov    %r12d,%edi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0x2e,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   10a0 <setpgid@plt>
mov    0x0(%r13),%r12d
xor    %eax,%eax
call   1040 <getpid@plt>
mov    %ebp,(%rsp)
mov    %r12d,%edi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0x31,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
mov    0x10(%rsp),%edi
call   1050 <close@plt>
mov    0x0(%r13),%r12d
xor    %eax,%eax
call   1040 <getpid@plt>
mov    %ebp,(%rsp)
mov    %r12d,%edi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0x33,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
mov    0xc(%rsp),%edi
lea    0xb(%rsp),%rsi
mov    $0x1,%edx
call   1070 <read@plt>
cmp    $0x1,%eax
jne    1628 <main+0x468>
mov    0x0(%r13),%r12d
xor    %eax,%eax
call   1040 <getpid@plt>
mov    %ebp,(%rsp)
lea    0xa72(%rip),%r15
lea    0xa7b(%rip),%rdx
mov    %r12d,%edi
mov    %r15,%rsi
mov    $0x36,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
lea    0x14(%rsp),%r12
mov    %r12,%rdi
call   10d0 <wait@plt>
mov    0x0(%r13),%r14d
xor    %eax,%eax
call   1040 <getpid@plt>
mov    %ebp,(%rsp)
mov    %r14d,%edi
mov    %r15,%rsi
lea    0xa3d(%rip),%rdx
mov    $0x38,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
mov    %r12,%rdi
call   10d0 <wait@plt>
mov    0x0(%r13),%r12d
xor    %eax,%eax
call   1040 <getpid@plt>
mov    %ebp,(%rsp)
mov    %r12d,%edi
mov    %r15,%rsi
lea    0xa0a(%rip),%rdx
mov    $0x3a,%ecx
mov    %eax,%r8d
mov    %ebx,%r9d
call   1080 <fprintf@plt>
xor    %eax,%eax
cmpb   $0x0,0xb(%rsp)
sete   %al
lea    (%rax,%rax,4),%edi
call   10b0 <exit@plt>
mov    $0x4,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"%s:%d %d %d %d\0A\00"
@.str.1 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/tests/129-pgrps/129-pgrps.c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [2 x i32]
%5 = alloca i32
%6 = alloca i8
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
br label %7
7: ; preds = %0
%8 = load i32, i32* @stderr
%9 = call i32 (...) @getpid()
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 11, i32 %9, i32 %10, i32 %11)
br label %13
13: ; preds = %7
%14 = call i32 (...) @fork()
store i32 %14, i32* %2
switch i32 %14, label %35 [
i32 -1, label %15
i32 0, label %24
]
15: ; preds = %13
br label %16
16: ; preds = %15
%17 = load i32, i32* @stderr
%18 = call i32 (...) @getpid()
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 14, i32 %18, i32 %19, i32 %20)
br label %22
22: ; preds = %16
%23 = call i32 @exit(i32 1)
unreachable
24: ; preds = %13
br label %25
25: ; preds = %24
%26 = load i32, i32* @stderr
%27 = call i32 (...) @getpid()
%28 = load i32, i32* %2
%29 = load i32, i32* %3
%30 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 17, i32 %27, i32 %28, i32 %29)
br label %31
31: ; preds = %25
%32 = call i32 (...) @getpid()
%33 = call i32 @setpgid(i32 0, i32 %32)
%34 = call i32 @exit(i32 0)
unreachable
35: ; preds = %13
br label %36
36: ; preds = %35
%37 = load i32, i32* @stderr
%38 = call i32 (...) @getpid()
%39 = load i32, i32* %2
%40 = load i32, i32* %3
%41 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 21, i32 %38, i32 %39, i32 %40)
br label %42
42: ; preds = %36
%43 = load i32, i32* %2
%44 = load i32, i32* %2
%45 = call i32 @setpgid(i32 %43, i32 %44)
br label %46
46: ; preds = %42
%47 = load i32, i32* @stderr
%48 = call i32 (...) @getpid()
%49 = load i32, i32* %2
%50 = load i32, i32* %3
%51 = call i32 @fprintf(i32 %47, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 24, i32 %48, i32 %49, i32 %50)
br label %52
52: ; preds = %46
%53 = call i32 @sleep(i32 2)
br label %54
54: ; preds = %52
%55 = load i32, i32* @stderr
%56 = call i32 (...) @getpid()
%57 = load i32, i32* %2
%58 = load i32, i32* %3
%59 = call i32 @fprintf(i32 %55, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 27, i32 %56, i32 %57, i32 %58)
br label %60
60: ; preds = %54
%61 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%62 = call i64 @pipe(i32* %61)
%63 = icmp slt i64 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %60
%65 = call i32 @exit(i32 2)
unreachable
66: ; preds = %60
br label %67
67: ; preds = %66
%68 = load i32, i32* @stderr
%69 = call i32 (...) @getpid()
%70 = load i32, i32* %2
%71 = load i32, i32* %3
%72 = call i32 @fprintf(i32 %68, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 31, i32 %69, i32 %70, i32 %71)
br label %73
73: ; preds = %67
%74 = call i32 (...) @fork()
store i32 %74, i32* %3
switch i32 %74, label %124 [
i32 -1, label %75
i32 0, label %84
]
75: ; preds = %73
br label %76
76: ; preds = %75
%77 = load i32, i32* @stderr
%78 = call i32 (...) @getpid()
%79 = load i32, i32* %2
%80 = load i32, i32* %3
%81 = call i32 @fprintf(i32 %77, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 34, i32 %78, i32 %79, i32 %80)
br label %82
82: ; preds = %76
%83 = call i32 @exit(i32 3)
unreachable
84: ; preds = %73
br label %85
85: ; preds = %84
%86 = load i32, i32* @stderr
%87 = call i32 (...) @getpid()
%88 = load i32, i32* %2
%89 = load i32, i32* %3
%90 = call i32 @fprintf(i32 %86, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 37, i32 %87, i32 %88, i32 %89)
br label %91
91: ; preds = %85
%92 = load i32, i32* %2
%93 = call i32 @setpgid(i32 0, i32 %92)
br label %94
94: ; preds = %91
%95 = load i32, i32* @stderr
%96 = call i32 (...) @getpid()
%97 = load i32, i32* %2
%98 = load i32, i32* %3
%99 = call i32 @fprintf(i32 %95, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 39, i32 %96, i32 %97, i32 %98)
br label %100
100: ; preds = %94
%101 = call i32 (...) @getpgrp()
%102 = load i32, i32* %2
%103 = icmp eq i32 %101, %102
%104 = zext i1 %103 to i32
%105 = trunc i32 %104 to i8
store i8 %105, i8* %6
br label %106
106: ; preds = %100
%107 = load i32, i32* @stderr
%108 = call i32 (...) @getpid()
%109 = load i32, i32* %2
%110 = load i32, i32* %3
%111 = call i32 @fprintf(i32 %107, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 41, i32 %108, i32 %109, i32 %110)
br label %112
112: ; preds = %106
%113 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%114 = load i32, i32* %113
%115 = call i32 @write(i32 %114, i8* %6, i32 1)
br label %116
116: ; preds = %112
%117 = load i32, i32* @stderr
%118 = call i32 (...) @getpid()
%119 = load i32, i32* %2
%120 = load i32, i32* %3
%121 = call i32 @fprintf(i32 %117, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 43, i32 %118, i32 %119, i32 %120)
br label %122
122: ; preds = %116
%123 = call i32 @exit(i32 0)
unreachable
124: ; preds = %73
br label %125
125: ; preds = %124
%126 = load i32, i32* @stderr
%127 = call i32 (...) @getpid()
%128 = load i32, i32* %2
%129 = load i32, i32* %3
%130 = call i32 @fprintf(i32 %126, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 46, i32 %127, i32 %128, i32 %129)
br label %131
131: ; preds = %125
%132 = load i32, i32* %3
%133 = load i32, i32* %2
%134 = call i32 @setpgid(i32 %132, i32 %133)
br label %135
135: ; preds = %131
%136 = load i32, i32* @stderr
%137 = call i32 (...) @getpid()
%138 = load i32, i32* %2
%139 = load i32, i32* %3
%140 = call i32 @fprintf(i32 %136, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 49, i32 %137, i32 %138, i32 %139)
br label %141
141: ; preds = %135
%142 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%143 = load i32, i32* %142
%144 = call i32 @close(i32 %143)
br label %145
145: ; preds = %141
%146 = load i32, i32* @stderr
%147 = call i32 (...) @getpid()
%148 = load i32, i32* %2
%149 = load i32, i32* %3
%150 = call i32 @fprintf(i32 %146, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 51, i32 %147, i32 %148, i32 %149)
br label %151
151: ; preds = %145
%152 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%153 = load i32, i32* %152
%154 = call i32 @read(i32 %153, i8* %6, i32 1)
%155 = icmp ne i32 %154, 1
br i1 %155, label %156, label %158
156: ; preds = %151
%157 = call i32 @exit(i32 4)
unreachable
158: ; preds = %151
br label %159
159: ; preds = %158
%160 = load i32, i32* @stderr
%161 = call i32 (...) @getpid()
%162 = load i32, i32* %2
%163 = load i32, i32* %3
%164 = call i32 @fprintf(i32 %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 54, i32 %161, i32 %162, i32 %163)
br label %165
165: ; preds = %159
%166 = call i32 @wait(i32* %5)
br label %167
167: ; preds = %165
%168 = load i32, i32* @stderr
%169 = call i32 (...) @getpid()
%170 = load i32, i32* %2
%171 = load i32, i32* %3
%172 = call i32 @fprintf(i32 %168, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 56, i32 %169, i32 %170, i32 %171)
br label %173
173: ; preds = %167
%174 = call i32 @wait(i32* %5)
br label %175
175: ; preds = %173
%176 = load i32, i32* @stderr
%177 = call i32 (...) @getpid()
%178 = load i32, i32* %2
%179 = load i32, i32* %3
%180 = call i32 @fprintf(i32 %176, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 58, i32 %177, i32 %178, i32 %179)
br label %181
181: ; preds = %175
%182 = load i8, i8* %6
%183 = sext i8 %182 to i32
%184 = icmp ne i32 %183, 0
%185 = zext i1 %184 to i64
%186 = select i1 %184, i32 0, i32 5
%187 = call i32 @exit(i32 %186)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"%s:%d %d %d %d\0A\00"
@.str.1 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pipcet/asmjs/refs/heads/everything/tests/129-pgrps/129-pgrps.c\00"
define i32 @main() {
%1 = alloca [2 x i32]
%2 = alloca i32
%3 = alloca i8
%4 = bitcast [2 x i32]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = load i32, i32* @stderr
%7 = tail call i32 (...) @getpid()
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 11, i32 %7, i32 0, i32 0)
%9 = tail call i32 (...) @fork()
switch i32 %9, label %22 [
i32 -1, label %10
i32 0, label %15
]
10: ; preds = %0
%11 = load i32, i32* @stderr
%12 = tail call i32 (...) @getpid()
%13 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 14, i32 %12, i32 -1, i32 0)
%14 = tail call i32 @exit(i32 1)
unreachable
15: ; preds = %0
%16 = load i32, i32* @stderr
%17 = tail call i32 (...) @getpid()
%18 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 17, i32 %17, i32 0, i32 0)
%19 = tail call i32 (...) @getpid()
%20 = tail call i32 @setpgid(i32 0, i32 %19)
%21 = tail call i32 @exit(i32 0)
unreachable
22: ; preds = %0
%23 = load i32, i32* @stderr
%24 = tail call i32 (...) @getpid()
%25 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 21, i32 %24, i32 %9, i32 0)
%26 = tail call i32 @setpgid(i32 %9, i32 %9)
%27 = load i32, i32* @stderr
%28 = tail call i32 (...) @getpid()
%29 = tail call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 24, i32 %28, i32 %9, i32 0)
%30 = tail call i32 @sleep(i32 2)
%31 = load i32, i32* @stderr
%32 = tail call i32 (...) @getpid()
%33 = tail call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 27, i32 %32, i32 %9, i32 0)
%34 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%35 = call i64 @pipe(i32* %34)
%36 = icmp slt i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %22
%38 = call i32 @exit(i32 2)
unreachable
39: ; preds = %22
%40 = load i32, i32* @stderr
%41 = call i32 (...) @getpid()
%42 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 31, i32 %41, i32 %9, i32 0)
%43 = call i32 (...) @fork()
switch i32 %43, label %70 [
i32 -1, label %44
i32 0, label %49
]
44: ; preds = %39
%45 = load i32, i32* @stderr
%46 = call i32 (...) @getpid()
%47 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 34, i32 %46, i32 %9, i32 -1)
%48 = call i32 @exit(i32 3)
unreachable
49: ; preds = %39
%50 = load i32, i32* @stderr
%51 = call i32 (...) @getpid()
%52 = call i32 @fprintf(i32 %50, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 37, i32 %51, i32 %9, i32 0)
%53 = call i32 @setpgid(i32 0, i32 %9)
%54 = load i32, i32* @stderr
%55 = call i32 (...) @getpid()
%56 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 39, i32 %55, i32 %9, i32 0)
%57 = call i32 (...) @getpgrp()
%58 = icmp eq i32 %57, %9
%59 = zext i1 %58 to i8
store i8 %59, i8* %3
%60 = load i32, i32* @stderr
%61 = call i32 (...) @getpid()
%62 = call i32 @fprintf(i32 %60, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 41, i32 %61, i32 %9, i32 0)
%63 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
%64 = load i32, i32* %63
%65 = call i32 @write(i32 %64, i8* %3, i32 1)
%66 = load i32, i32* @stderr
%67 = call i32 (...) @getpid()
%68 = call i32 @fprintf(i32 %66, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 43, i32 %67, i32 %9, i32 0)
%69 = call i32 @exit(i32 0)
unreachable
70: ; preds = %39
%71 = load i32, i32* @stderr
%72 = call i32 (...) @getpid()
%73 = call i32 @fprintf(i32 %71, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 46, i32 %72, i32 %9, i32 %43)
%74 = call i32 @setpgid(i32 %43, i32 %9)
%75 = load i32, i32* @stderr
%76 = call i32 (...) @getpid()
%77 = call i32 @fprintf(i32 %75, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 49, i32 %76, i32 %9, i32 %43)
%78 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
%79 = load i32, i32* %78
%80 = call i32 @close(i32 %79)
%81 = load i32, i32* @stderr
%82 = call i32 (...) @getpid()
%83 = call i32 @fprintf(i32 %81, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 51, i32 %82, i32 %9, i32 %43)
%84 = load i32, i32* %34
%85 = call i32 @read(i32 %84, i8* %3, i32 1)
%86 = icmp eq i32 %85, 1
br i1 %86, label %89, label %87
87: ; preds = %70
%88 = call i32 @exit(i32 4)
unreachable
89: ; preds = %70
%90 = load i32, i32* @stderr
%91 = call i32 (...) @getpid()
%92 = call i32 @fprintf(i32 %90, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 54, i32 %91, i32 %9, i32 %43)
%93 = call i32 @wait(i32* %2)
%94 = load i32, i32* @stderr
%95 = call i32 (...) @getpid()
%96 = call i32 @fprintf(i32 %94, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 56, i32 %95, i32 %9, i32 %43)
%97 = call i32 @wait(i32* %2)
%98 = load i32, i32* @stderr
%99 = call i32 (...) @getpid()
%100 = call i32 @fprintf(i32 %98, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 58, i32 %99, i32 %9, i32 %43)
%101 = load i8, i8* %3
%102 = icmp eq i8 %101, 0
%103 = select i1 %102, i32 5, i32 0
%104 = call i32 @exit(i32 %103)
unreachable
}