#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 */
struct sched_param {
  void *sched_priority;
};
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ CLONE_NEWNET;
int /*<<< orphan*/ CLONE_NEWNS;
int /*<<< orphan*/ CLONE_NEWPID;
int /*<<< orphan*/ CLONE_NEWUTS;
int MS_MGC_VAL;
int MS_NODEV;
int MS_NOEXEC;
int MS_NOSUID;
int MS_PRIVATE;
int MS_REC;
int PATH_MAX;
int /*<<< orphan*/ SCHED_RR;
int WEXITSTATUS(int);
int /*<<< orphan*/ WIFEXITED(int);
int /*<<< orphan*/ WIFSIGNALED(int);
int /*<<< orphan*/ WTERMSIG(int);
void *atoi(int /*<<< orphan*/);
scalar_t__ attachToNS(char *);
int /*<<< orphan*/ cgroup(int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int fork();
int getdtablesize();
int getopt(int, char **, char *);
scalar_t__ getpgrp();
int getpid();
int /*<<< orphan*/ kill(int, int /*<<< orphan*/);
int mount(char *, char *, char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ optarg;
int optind;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sched_setscheduler(int, int /*<<< orphan*/,
                                      struct sched_param *);
int /*<<< orphan*/ setsid();
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ stdout;
int unshare(int /*<<< orphan*/);
int /*<<< orphan*/ usage(char *);
int waitpid(int, int *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int c;
  int fd;
  char path[PATH_MAX];
  int pid;
  int detach = 0;
  int netns = 0;
  int mountns = 0;
  int mountnspid = 0;
  int pidns = 0;
  int printpid = 0;
  int mountprocfs = 0;
  static struct sched_param sp;
  while ((c = getopt(argc, argv, "+cdnmiufpa:b:k:j:g:r:vh")) != -1)
    switch (c) {
    case 'c':
      for (fd = getdtablesize(); fd > 2; fd--)
        close(fd);
      break;
    case 'd':
      detach = 1;
      break;
    case 'n':
      if (unshare(CLONE_NEWNET) == -1) {
        perror("unshare");
        return 1;
      }
      netns = 1;
      break;
    case 'm':
      if (unshare(CLONE_NEWNS) == -1) {
        perror("unshare");
        return 1;
      }
      mountns = 1;
      break;
    case 'i':
      if (unshare(CLONE_NEWPID) == -1) {
        perror("unshare");
        return 1;
      }
      pidns = 1;
      break;
    case 'u':
      if (unshare(CLONE_NEWUTS) == -1) {
        perror("unshare");
        return 1;
      }
      break;
    case 'f':
      mountprocfs = 1;
      break;
    case 'p':
      printpid = 1;
      break;
    case 'a':
      pid = atoi(optarg);
      sprintf(path, "/proc/%d/ns/net", pid);
      if (attachToNS(path) != 0) {
        return 1;
      }
      netns = 2;
      break;
    case 'b':
      mountns = 2;
      mountnspid = atoi(optarg);
      break;
    case 'k':
      pid = atoi(optarg);
      sprintf(path, "/proc/%d/ns/pid", pid);
      if (attachToNS(path) != 0) {
        return 1;
      }
      pidns = 2;
      break;
    case 'j':
      pid = atoi(optarg);
      sprintf(path, "/proc/%d/ns/uts", pid);
      if (attachToNS(path) != 0) {
        return 1;
      }
      break;
    case 'g':
      cgroup(optarg);
      break;
    case 'r':
      sp.sched_priority = atoi(optarg);
      if (sched_setscheduler(getpid(), SCHED_RR, &sp) < 0) {
        perror("sched_setscheduler");
        return 1;
      }
      break;
    case 'v':
      printf("%s\n", "(devel)");
      exit(0);
    case 'h':
      usage(argv[0]);
      exit(0);
    default:
      usage(argv[0]);
      exit(1);
    }
  if (pidns == 1 || pidns == 2) {
    int status = 0;
    pid_t pid = fork();
    switch (pid) {
    case -1:
      perror("fork");
      return 1;
    case 0:
      break;
    default:
      if (printpid == 1) {
        printf("\001%d\n", pid);
        fflush(stdout);
      }
      if (waitpid(pid, &status, 0) == -1)
        return 1;
      if (WIFEXITED(status))
        return WEXITSTATUS(status);
      else if (WIFSIGNALED(status))
        kill(getpid(), WTERMSIG(status));
      return 1;
    }
  }
  if (mountns == 2 && mountnspid != 0) {
    sprintf(path, "/proc/%d/ns/mnt", pid);
    if (attachToNS(path) != 0) {
      return 1;
    }
  }
  if (mountprocfs && (pidns != 1 || mountns != 1)) {
    return 1;
  }
  if (mountprocfs &&
      (mount("none", "/proc", NULL, MS_PRIVATE | MS_REC, NULL) != 0 ||
       mount("proc", "/proc", "proc", MS_NOSUID | MS_NOEXEC | MS_NODEV, NULL) !=
           0)) {
    perror("mount");
  }
  if (netns == 1 && mountns == 1) {
    if (mount("sysfs", "/sys", "sysfs", MS_MGC_VAL, NULL) == -1) {
      perror("mount");
      return 1;
    }
  }
  if (detach == 1 && pidns == 0) {
    if (getpgrp() == getpid()) {
      switch (fork()) {
      case -1:
        perror("fork");
        return 1;
      case 0:
        break;
      default:
        return 0;
      }
    }
    setsid();
  }
  if (printpid == 1 && pidns == 0) {
    printf("\001%d\n", getpid());
    fflush(stdout);
  }
  if (optind < argc) {
    execvp(argv[optind], &argv[optind]);
    perror(argv[optind]);
    return 1;
  }
  usage(argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2d28(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x60(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xd34(%rip),%rdx
call   1150 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     1687 <main+0x3e7>
mov    -0x14(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x68(%rbp)
sub    $0x15,%eax
ja     166c <main+0x3cc>
mov    -0x68(%rbp),%rax
lea    0xcab(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   11c0 <getdtablesize@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x2,-0x18(%rbp)
jle    1388 <main+0xe8>
mov    -0x18(%rbp),%edi
call   10a0 <close@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1368 <main+0xc8>
jmp    1682 <main+0x3e2>
movl   $0x1,-0x30(%rbp)
jmp    1682 <main+0x3e2>
mov    0x2c30(%rip),%rax
mov    (%rax),%edi
call   1040 <unshare@plt>
cmp    $0xffffffff,%eax
jne    13cf <main+0x12f>
lea    0xcb9(%rip),%rdi
call   1140 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
movl   $0x1,-0x34(%rbp)
jmp    1682 <main+0x3e2>
mov    0x2bae(%rip),%rax
mov    (%rax),%edi
call   1040 <unshare@plt>
cmp    $0xffffffff,%eax
jne    1411 <main+0x171>
lea    0xc77(%rip),%rdi
call   1140 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
movl   $0x1,-0x38(%rbp)
jmp    1682 <main+0x3e2>
mov    0x2b74(%rip),%rax
mov    (%rax),%edi
call   1040 <unshare@plt>
cmp    $0xffffffff,%eax
jne    1453 <main+0x1b3>
lea    0xc35(%rip),%rdi
call   1140 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
movl   $0x1,-0x40(%rbp)
jmp    1682 <main+0x3e2>
mov    0x2b1a(%rip),%rax
mov    (%rax),%edi
call   1040 <unshare@plt>
cmp    $0xffffffff,%eax
jne    1495 <main+0x1f5>
lea    0xbf3(%rip),%rdi
call   1140 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
jmp    1682 <main+0x3e2>
movl   $0x1,-0x48(%rbp)
jmp    1682 <main+0x3e2>
movl   $0x1,-0x44(%rbp)
jmp    1682 <main+0x3e2>
mov    0x2b3f(%rip),%rax
mov    (%rax),%edi
call   1170 <atoi@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edx
lea    0xba7(%rip),%rsi
call   1190 <sprintf@plt>
mov    -0x60(%rbp),%rdi
call   1030 <attachToNS@plt>
cmp    $0x0,%rax
je     14fc <main+0x25c>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
movl   $0x2,-0x34(%rbp)
jmp    1682 <main+0x3e2>
movl   $0x2,-0x38(%rbp)
mov    0x2ae2(%rip),%rax
mov    (%rax),%edi
call   1170 <atoi@plt>
mov    %eax,-0x3c(%rbp)
jmp    1682 <main+0x3e2>
mov    0x2acc(%rip),%rax
mov    (%rax),%edi
call   1170 <atoi@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edx
lea    0xb44(%rip),%rsi
call   1190 <sprintf@plt>
mov    -0x60(%rbp),%rdi
call   1030 <attachToNS@plt>
cmp    $0x0,%rax
je     156f <main+0x2cf>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
movl   $0x2,-0x40(%rbp)
jmp    1682 <main+0x3e2>
mov    0x2a76(%rip),%rax
mov    (%rax),%edi
call   1170 <atoi@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edx
lea    0xafe(%rip),%rsi
call   1190 <sprintf@plt>
mov    -0x60(%rbp),%rdi
call   1030 <attachToNS@plt>
cmp    $0x0,%rax
je     15c5 <main+0x325>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
jmp    1682 <main+0x3e2>
mov    0x2a27(%rip),%rax
mov    (%rax),%edi
call   1080 <cgroup@plt>
jmp    1682 <main+0x3e2>
mov    0x2a14(%rip),%rax
mov    (%rax),%edi
call   1170 <atoi@plt>
mov    %rax,0x2b0e(%rip)
mov    $0x0,%al
call   1050 <getpid@plt>
mov    %eax,%edi
mov    0x296e(%rip),%rax
mov    (%rax),%esi
lea    0x2af5(%rip),%rdx
call   1090 <sched_setscheduler@plt>
cmp    $0x0,%eax
jge    1638 <main+0x398>
lea    0xa88(%rip),%rdi
call   1140 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
jmp    1682 <main+0x3e2>
lea    0xa77(%rip),%rdi
lea    0xa74(%rip),%rsi
mov    $0x0,%al
call   1070 <printf@plt>
xor    %edi,%edi
call   11a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1100 <usage@plt>
xor    %edi,%edi
call   11a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1100 <usage@plt>
mov    $0x1,%edi
call   11a0 <exit@plt>
jmp    1316 <main+0x76>
cmpl   $0x1,-0x40(%rbp)
je     169b <main+0x3fb>
cmpl   $0x2,-0x40(%rbp)
jne    17b9 <main+0x519>
movl   $0x0,-0x50(%rbp)
xor    %eax,%eax
call   11b0 <fork@plt>
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x6c(%rbp)
sub    $0xffffffff,%eax
je     16d0 <main+0x430>
jmp    16c0 <main+0x420>
mov    -0x6c(%rbp),%eax
test   %eax,%eax
je     16ef <main+0x44f>
jmp    16f4 <main+0x454>
lea    0x9f0(%rip),%rdi
call   1140 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
jmp    17b4 <main+0x514>
cmpl   $0x1,-0x44(%rbp)
jne    171d <main+0x47d>
mov    -0x54(%rbp),%esi
lea    0x9c4(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2872(%rip),%rax
mov    (%rax),%edi
call   10e0 <fflush@plt>
mov    -0x54(%rbp),%edi
lea    -0x50(%rbp),%rsi
xor    %edx,%edx
call   1120 <waitpid@plt>
cmp    $0xffffffff,%eax
jne    1747 <main+0x4a7>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
mov    -0x50(%rbp),%edi
call   1180 <WIFEXITED@plt>
cmp    $0x0,%eax
je     176f <main+0x4cf>
mov    -0x50(%rbp),%edi
call   1110 <WEXITSTATUS@plt>
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
mov    -0x50(%rbp),%edi
call   10c0 <WIFSIGNALED@plt>
cmp    $0x0,%eax
je     179c <main+0x4fc>
mov    $0x0,%al
call   1050 <getpid@plt>
mov    %eax,-0x70(%rbp)
mov    -0x50(%rbp),%edi
call   10f0 <WTERMSIG@plt>
mov    -0x70(%rbp),%edi
mov    %eax,%esi
call   10d0 <kill@plt>
jmp    17a1 <main+0x501>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
jmp    17b9 <main+0x519>
cmpl   $0x2,-0x38(%rbp)
jne    180b <main+0x56b>
cmpl   $0x0,-0x3c(%rbp)
je     180b <main+0x56b>
mov    -0x60(%rbp),%rdi
mov    -0x2c(%rbp),%edx
lea    0x8f6(%rip),%rsi
call   1190 <sprintf@plt>
mov    -0x60(%rbp),%rdi
call   1030 <attachToNS@plt>
cmp    $0x0,%rax
je     1806 <main+0x566>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
jmp    180b <main+0x56b>
cmpl   $0x0,-0x48(%rbp)
je     183c <main+0x59c>
cmpl   $0x1,-0x40(%rbp)
jne    1829 <main+0x589>
cmpl   $0x1,-0x38(%rbp)
je     183c <main+0x59c>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
cmpl   $0x0,-0x48(%rbp)
je     18c7 <main+0x627>
mov    0x275b(%rip),%rax
mov    (%rax),%ecx
mov    0x276a(%rip),%rax
or     (%rax),%ecx
lea    0x882(%rip),%rdi
lea    0x880(%rip),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
call   1060 <mount@plt>
cmp    $0x0,%eax
jne    18bb <main+0x61b>
mov    0x2745(%rip),%rax
mov    (%rax),%ecx
mov    0x26dc(%rip),%rax
or     (%rax),%ecx
mov    0x274b(%rip),%rax
or     (%rax),%ecx
lea    0x849(%rip),%rdx
lea    0x841(%rip),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %rdx,%rdi
call   1060 <mount@plt>
cmp    $0x0,%eax
je     18c7 <main+0x627>
lea    0x82a(%rip),%rdi
call   1140 <perror@plt>
cmpl   $0x1,-0x34(%rbp)
jne    192c <main+0x68c>
cmpl   $0x1,-0x38(%rbp)
jne    192c <main+0x68c>
mov    0x26be(%rip),%rax
mov    (%rax),%ecx
lea    0x807(%rip),%rdx
lea    0x806(%rip),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %rdx,%rdi
call   1060 <mount@plt>
cmp    $0xffffffff,%eax
jne    1927 <main+0x687>
lea    0x7dd(%rip),%rdi
call   1140 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
jmp    192c <main+0x68c>
cmpl   $0x1,-0x30(%rbp)
jne    19d1 <main+0x731>
cmpl   $0x0,-0x40(%rbp)
jne    19d1 <main+0x731>
mov    $0x0,%al
call   1130 <getpgrp@plt>
mov    %rax,-0x78(%rbp)
mov    $0x0,%al
call   1050 <getpid@plt>
mov    %eax,%ecx
mov    -0x78(%rbp),%rax
movslq %ecx,%rcx
cmp    %rcx,%rax
jne    19ca <main+0x72a>
xor    %eax,%eax
call   11b0 <fork@plt>
mov    %eax,%ecx
mov    %ecx,-0x7c(%rbp)
sub    $0xffffffff,%eax
je     198e <main+0x6ee>
jmp    197e <main+0x6de>
mov    -0x7c(%rbp),%eax
test   %eax,%eax
je     19ad <main+0x70d>
jmp    19b2 <main+0x712>
lea    0x732(%rip),%rdi
call   1140 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
jmp    19c5 <main+0x725>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
jmp    19ca <main+0x72a>
mov    $0x0,%al
call   10b0 <setsid@plt>
cmpl   $0x1,-0x44(%rbp)
jne    1a0a <main+0x76a>
cmpl   $0x0,-0x40(%rbp)
jne    1a0a <main+0x76a>
mov    $0x0,%al
call   1050 <getpid@plt>
mov    %eax,%esi
lea    0x6d7(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2585(%rip),%rax
mov    (%rax),%edi
call   10e0 <fflush@plt>
mov    0x25a7(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    1a72 <main+0x7d2>
mov    -0x10(%rbp),%rax
mov    0x2591(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x10(%rbp),%rsi
mov    0x257f(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
add    %rax,%rsi
call   1160 <execvp@plt>
mov    -0x10(%rbp),%rax
mov    0x2565(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
call   1140 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1a8c <main+0x7ec>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1100 <usage@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    -0x20(%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    $0x48,%rsp
mov    %rsi,-0x48(%rbp)
mov    %edi,%ebx
mov    0x2d1a(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rcx,%rsp
lea    0xd14(%rip),%r14
xor    %ecx,%ecx
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
xor    %eax,%eax
mov    %rax,-0x68(%rbp)
xor    %eax,%eax
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    %edi,-0x2c(%rbp)
jmp    1335 <main+0x85>
mov    0x2c5e(%rip),%rax
mov    (%rax),%edi
call   1050 <unshare@plt>
mov    %r12d,%ecx
cmp    $0xffffffff,%eax
je     174d <main+0x49d>
mov    %ecx,%r12d
mov    %ebx,%edi
mov    -0x48(%rbp),%rsi
lea    0xe9b(%rip),%rdx
call   1160 <getopt@plt>
add    $0x1,%eax
cmp    $0x77,%eax
ja     182e <main+0x57e>
mov    $0x1,%ecx
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
mov    0x2c8d(%rip),%rax
mov    (%rax),%edi
call   1180 <atoi@plt>
mov    %rax,%r13
mov    -0x58(%rbp),%rbx
mov    %rbx,%rdi
lea    0xe7d(%rip),%rsi
mov    %r13d,%edx
call   11a0 <sprintf@plt>
mov    %rbx,%rdi
mov    -0x2c(%rbp),%ebx
call   1030 <attachToNS@plt>
movl   $0x2,-0x38(%rbp)
mov    %r12d,%ecx
test   %rax,%rax
je     1335 <main+0x85>
jmp    156a <main+0x2ba>
mov    0x2c47(%rip),%rax
mov    (%rax),%edi
call   1180 <atoi@plt>
mov    %rax,-0x68(%rbp)
movl   $0x2,-0x3c(%rbp)
mov    %r12d,%ecx
jmp    1335 <main+0x85>
xor    %eax,%eax
call   11d0 <getdtablesize@plt>
mov    %r12d,%ecx
cmp    $0x3,%eax
jl     1335 <main+0x85>
mov    %eax,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15d,%edi
call   10b0 <close@plt>
lea    -0x1(%r15),%eax
cmp    $0x3,%r15d
mov    %eax,%r15d
ja     13f0 <main+0x140>
mov    %r12d,%ecx
jmp    1335 <main+0x85>
movl   $0x1,-0x4c(%rbp)
mov    %r12d,%ecx
jmp    1335 <main+0x85>
mov    0x2bd5(%rip),%rax
mov    (%rax),%edi
call   1090 <cgroup@plt>
mov    %r12d,%ecx
jmp    1335 <main+0x85>
mov    0x2b5f(%rip),%rax
mov    (%rax),%edi
call   1050 <unshare@plt>
mov    $0x1,%ecx
mov    %rcx,-0x60(%rbp)
jmp    1329 <main+0x79>
mov    0x2ba3(%rip),%rax
mov    (%rax),%edi
call   1180 <atoi@plt>
mov    %rax,%r13
mov    -0x58(%rbp),%rbx
mov    %rbx,%rdi
lea    0xdb3(%rip),%rsi
mov    %r13d,%edx
call   11a0 <sprintf@plt>
mov    %rbx,%rdi
mov    -0x2c(%rbp),%ebx
call   1030 <attachToNS@plt>
mov    %r12d,%ecx
test   %rax,%rax
je     1335 <main+0x85>
jmp    156a <main+0x2ba>
mov    0x2b60(%rip),%rax
mov    (%rax),%edi
call   1180 <atoi@plt>
mov    %rax,%r13
mov    -0x58(%rbp),%rbx
mov    %rbx,%rdi
lea    0xd60(%rip),%rsi
mov    %r13d,%edx
call   11a0 <sprintf@plt>
mov    %rbx,%rdi
mov    -0x2c(%rbp),%ebx
call   1030 <attachToNS@plt>
mov    $0x2,%ecx
mov    %rcx,-0x60(%rbp)
mov    %r12d,%ecx
test   %rax,%rax
je     1335 <main+0x85>
jmp    156a <main+0x2ba>
mov    0x2aac(%rip),%rax
mov    (%rax),%edi
call   1050 <unshare@plt>
movl   $0x1,-0x3c(%rbp)
jmp    1329 <main+0x79>
mov    0x2ad2(%rip),%rax
mov    (%rax),%edi
call   1050 <unshare@plt>
movl   $0x1,-0x38(%rbp)
jmp    1329 <main+0x79>
movl   $0x1,-0x34(%rbp)
mov    %r12d,%ecx
jmp    1335 <main+0x85>
mov    0x2ad1(%rip),%rax
mov    (%rax),%edi
call   1180 <atoi@plt>
mov    %rax,0x2bd3(%rip)
xor    %eax,%eax
call   1060 <getpid@plt>
mov    0x2a2d(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
lea    0x2bba(%rip),%rdx
call   10a0 <sched_setscheduler@plt>
mov    %r12d,%ecx
test   %eax,%eax
jns    1335 <main+0x85>
lea    0xccb(%rip),%rdi
jmp    1754 <main+0x4a4>
mov    $0x1,%ebx
mov    %ebx,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    -0x60(%rbp),%r14
lea    -0x1(%r14),%eax
cmp    $0x1,%eax
ja     1607 <main+0x357>
movl   $0x0,-0x30(%rbp)
xor    %eax,%eax
call   11c0 <fork@plt>
test   %eax,%eax
je     1607 <main+0x357>
mov    %eax,%r15d
cmp    $0xffffffff,%eax
je     1744 <main+0x494>
cmpl   $0x1,-0x34(%rbp)
jne    15d0 <main+0x320>
lea    0xc98(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x29bf(%rip),%rax
mov    (%rax),%edi
call   10f0 <fflush@plt>
lea    -0x30(%rbp),%rsi
mov    %r15d,%edi
xor    %edx,%edx
call   1130 <waitpid@plt>
mov    $0x1,%ebx
cmp    $0xffffffff,%eax
je     156f <main+0x2bf>
mov    -0x30(%rbp),%edi
call   1190 <WIFEXITED@plt>
mov    -0x30(%rbp),%edi
test   %eax,%eax
je     17bc <main+0x50c>
call   1120 <WEXITSTATUS@plt>
mov    %eax,%ebx
jmp    156f <main+0x2bf>
mov    -0x3c(%rbp),%r15d
cmp    $0x2,%r15d
jne    1643 <main+0x393>
cmpl   $0x0,-0x68(%rbp)
je     1643 <main+0x393>
lea    0xc37(%rip),%rsi
mov    -0x58(%rbp),%rbx
mov    %rbx,%rdi
mov    %r13d,%edx
call   11a0 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <attachToNS@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    156f <main+0x2bf>
cmpl   $0x0,-0x4c(%rbp)
je     16d4 <main+0x424>
mov    $0x1,%ebx
cmp    $0x1,%r14d
jne    156f <main+0x2bf>
cmp    $0x1,%r15d
jne    156f <main+0x2bf>
mov    0x293b(%rip),%rax
mov    0x294c(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
lea    0xbe6(%rip),%rdi
lea    0xbe4(%rip),%rsi
xor    %edx,%edx
xor    %r8d,%r8d
call   1070 <mount@plt>
test   %eax,%eax
jne    17ea <main+0x53a>
mov    0x2929(%rip),%rax
mov    0x28c2(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    0x292f(%rip),%rax
or     (%rax),%ecx
lea    0xbb0(%rip),%rsi
lea    0xbaa(%rip),%rdi
mov    %rdi,%rdx
xor    %r8d,%r8d
call   1070 <mount@plt>
test   %eax,%eax
jne    17ea <main+0x53a>
cmpl   $0x1,-0x38(%rbp)
jne    170b <main+0x45b>
cmp    $0x1,%r15d
jne    170b <main+0x45b>
mov    0x28b9(%rip),%rax
mov    (%rax),%ecx
lea    0xb8c(%rip),%rsi
lea    0xb7f(%rip),%rdi
mov    %rdi,%rdx
xor    %r8d,%r8d
call   1070 <mount@plt>
cmp    $0xffffffff,%eax
je     1822 <main+0x572>
cmp    $0x1,%r12d
jne    176a <main+0x4ba>
test   %r14d,%r14d
jne    176a <main+0x4ba>
xor    %ebx,%ebx
xor    %eax,%eax
call   1140 <getpgrp@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1060 <getpid@plt>
cltq
cmp    %rax,%r15
jne    1763 <main+0x4b3>
xor    %eax,%eax
call   11c0 <fork@plt>
test   %eax,%eax
je     1763 <main+0x4b3>
cmp    $0xffffffff,%eax
jne    156f <main+0x2bf>
lea    0xb00(%rip),%rdi
jmp    1754 <main+0x4a4>
lea    0xaa4(%rip),%rdi
call   1150 <perror@plt>
mov    $0x1,%ebx
jmp    156f <main+0x2bf>
xor    %eax,%eax
call   10c0 <setsid@plt>
cmpl   $0x1,-0x34(%rbp)
jne    179a <main+0x4ea>
test   %r14d,%r14d
jne    179a <main+0x4ea>
xor    %eax,%eax
call   1060 <getpid@plt>
lea    0xacd(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x27f5(%rip),%rax
mov    (%rax),%edi
call   10f0 <fflush@plt>
mov    0x2817(%rip),%rbx
movslq (%rbx),%rax
cmp    -0x2c(%rbp),%eax
jl     1805 <main+0x555>
mov    -0x48(%rbp),%rax
mov    (%rax),%rdi
call   1110 <usage@plt>
xor    %ebx,%ebx
jmp    156f <main+0x2bf>
call   10d0 <WIFSIGNALED@plt>
test   %eax,%eax
je     156f <main+0x2bf>
xor    %eax,%eax
call   1060 <getpid@plt>
mov    %eax,%r14d
mov    -0x30(%rbp),%edi
call   1100 <WTERMSIG@plt>
mov    %r14d,%edi
mov    %eax,%esi
call   10e0 <kill@plt>
jmp    156f <main+0x2bf>
lea    0xa7f(%rip),%rdi
call   1150 <perror@plt>
cmpl   $0x1,-0x38(%rbp)
je     16da <main+0x42a>
jmp    170b <main+0x45b>
mov    -0x48(%rbp),%r14
lea    (%r14,%rax,8),%rsi
mov    (%r14,%rax,8),%rdi
call   1170 <execvp@plt>
movslq (%rbx),%rax
mov    (%r14,%rax,8),%rdi
jmp    1754 <main+0x4a4>
lea    0xa47(%rip),%rdi
jmp    1754 <main+0x4a4>
mov    -0x48(%rbp),%rax
mov    (%rax),%rdi
call   1110 <usage@plt>
mov    $0x1,%edi
call   11b0 <exit@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%rdi
call   1110 <usage@plt>
xor    %edi,%edi
call   11b0 <exit@plt>
lea    0x9e5(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   11b0 <exit@plt>

LLVM IR (-O0):
%struct.sched_param = type { i8* }
@PATH_MAX = global i32 0
@main.sp = internal global %struct.sched_param zeroinitializer
@.str = [24 x i8] c"+cdnmiufpa:b:k:j:g:r:vh\00"
@CLONE_NEWNET = global i32 0
@.str.1 = [8 x i8] c"unshare\00"
@CLONE_NEWNS = global i32 0
@CLONE_NEWPID = global i32 0
@CLONE_NEWUTS = global i32 0
@optarg = global i32 0
@.str.2 = [16 x i8] c"/proc/%d/ns/net\00"
@.str.3 = [16 x i8] c"/proc/%d/ns/pid\00"
@.str.4 = [16 x i8] c"/proc/%d/ns/uts\00"
@SCHED_RR = global i32 0
@.str.5 = [19 x i8] c"sched_setscheduler\00"
@.str.6 = [4 x i8] c"%s\0A\00"
@.str.7 = [8 x i8] c"(devel)\00"
@.str.8 = [5 x i8] c"fork\00"
@.str.9 = [5 x i8] c"\01%d\0A\00"
@stdout = global i32 0
@.str.10 = [16 x i8] c"/proc/%d/ns/mnt\00"
@.str.11 = [5 x i8] c"none\00"
@.str.12 = [6 x i8] c"/proc\00"
@MS_PRIVATE = global i32 0
@MS_REC = global i32 0
@.str.13 = [5 x i8] c"proc\00"
@MS_NOSUID = global i32 0
@MS_NOEXEC = global i32 0
@MS_NODEV = global i32 0
@.str.14 = [6 x i8] c"mount\00"
@.str.15 = [6 x i8] c"sysfs\00"
@.str.16 = [5 x i8] c"/sys\00"
@MS_MGC_VAL = global i32 0
@optind = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%21 = load i32, i32* @PATH_MAX
%22 = zext i32 %21 to i64
%23 = call i8* @llvm.stacksave()
store i8* %23, i8** %8
%24 = alloca i8, i64 %22
store i64 %22, i64* %9
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
br label %25
25: ; preds = %137, %2
%26 = load i32, i32* %4
%27 = load i8**, i8*** %5
%28 = call i32 @getopt(i32 %26, i8** %27, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 %28, i32* %6
%29 = icmp ne i32 %28, -1
br i1 %29, label %30, label %138
30: ; preds = %25
%31 = load i32, i32* %6
switch i32 %31, label %131 [
i32 99, label %32
i32 100, label %44
i32 110, label %45
i32 109, label %52
i32 105, label %59
i32 117, label %66
i32 102, label %73
i32 112, label %74
i32 97, label %75
i32 98, label %85
i32 107, label %89
i32 106, label %99
i32 103, label %109
i32 114, label %112
i32 118, label %122
i32 104, label %125
]
32: ; preds = %30
%33 = call i32 (...) @getdtablesize()
store i32 %33, i32* %7
br label %34
34: ; preds = %40, %32
%35 = load i32, i32* %7
%36 = icmp sgt i32 %35, 2
br i1 %36, label %37, label %43
37: ; preds = %34
%38 = load i32, i32* %7
%39 = call i32 @close(i32 %38)
br label %40
40: ; preds = %37
%41 = load i32, i32* %7
%42 = add nsw i32 %41, -1
store i32 %42, i32* %7
br label %34
43: ; preds = %34
br label %137
44: ; preds = %30
store i32 1, i32* %11
br label %137
45: ; preds = %30
%46 = load i32, i32* @CLONE_NEWNET
%47 = call i32 @unshare(i32 %46)
%48 = icmp eq i32 %47, -1
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
51: ; preds = %45
store i32 1, i32* %12
br label %137
52: ; preds = %30
%53 = load i32, i32* @CLONE_NEWNS
%54 = call i32 @unshare(i32 %53)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %58
56: ; preds = %52
%57 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
58: ; preds = %52
store i32 1, i32* %13
br label %137
59: ; preds = %30
%60 = load i32, i32* @CLONE_NEWPID
%61 = call i32 @unshare(i32 %60)
%62 = icmp eq i32 %61, -1
br i1 %62, label %63, label %65
63: ; preds = %59
%64 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
65: ; preds = %59
store i32 1, i32* %15
br label %137
66: ; preds = %30
%67 = load i32, i32* @CLONE_NEWUTS
%68 = call i32 @unshare(i32 %67)
%69 = icmp eq i32 %68, -1
br i1 %69, label %70, label %72
70: ; preds = %66
%71 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
72: ; preds = %66
br label %137
73: ; preds = %30
store i32 1, i32* %17
br label %137
74: ; preds = %30
store i32 1, i32* %16
br label %137
75: ; preds = %30
%76 = load i32, i32* @optarg
%77 = call i8* @atoi(i32 %76)
%78 = ptrtoint i8* %77 to i32
store i32 %78, i32* %10
%79 = load i32, i32* %10
%80 = call i32 @sprintf(i8* %24, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %79)
%81 = call i64 @attachToNS(i8* %24)
%82 = icmp ne i64 %81, 0
br i1 %82, label %83, label %84
83: ; preds = %75
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
84: ; preds = %75
store i32 2, i32* %12
br label %137
85: ; preds = %30
store i32 2, i32* %13
%86 = load i32, i32* @optarg
%87 = call i8* @atoi(i32 %86)
%88 = ptrtoint i8* %87 to i32
store i32 %88, i32* %14
br label %137
89: ; preds = %30
%90 = load i32, i32* @optarg
%91 = call i8* @atoi(i32 %90)
%92 = ptrtoint i8* %91 to i32
store i32 %92, i32* %10
%93 = load i32, i32* %10
%94 = call i32 @sprintf(i8* %24, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %93)
%95 = call i64 @attachToNS(i8* %24)
%96 = icmp ne i64 %95, 0
br i1 %96, label %97, label %98
97: ; preds = %89
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
98: ; preds = %89
store i32 2, i32* %15
br label %137
99: ; preds = %30
%100 = load i32, i32* @optarg
%101 = call i8* @atoi(i32 %100)
%102 = ptrtoint i8* %101 to i32
store i32 %102, i32* %10
%103 = load i32, i32* %10
%104 = call i32 @sprintf(i8* %24, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %103)
%105 = call i64 @attachToNS(i8* %24)
%106 = icmp ne i64 %105, 0
br i1 %106, label %107, label %108
107: ; preds = %99
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
108: ; preds = %99
br label %137
109: ; preds = %30
%110 = load i32, i32* @optarg
%111 = call i32 @cgroup(i32 %110)
br label %137
112: ; preds = %30
%113 = load i32, i32* @optarg
%114 = call i8* @atoi(i32 %113)
store i8* %114, i8** getelementptr inbounds (%struct.sched_param, %struct.sched_param* @main.sp, i32 0, i32 0)
%115 = call i32 (...) @getpid()
%116 = load i32, i32* @SCHED_RR
%117 = call i32 @sched_setscheduler(i32 %115, i32 %116, %struct.sched_param* @main.sp)
%118 = icmp slt i32 %117, 0
br i1 %118, label %119, label %121
119: ; preds = %112
%120 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
121: ; preds = %112
br label %137
122: ; preds = %30
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%124 = call i32 @exit(i32 0)
unreachable
125: ; preds = %30
%126 = load i8**, i8*** %5
%127 = getelementptr inbounds i8*, i8** %126, i64 0
%128 = load i8*, i8** %127
%129 = call i32 @usage(i8* %128)
%130 = call i32 @exit(i32 0)
unreachable
131: ; preds = %30
%132 = load i8**, i8*** %5
%133 = getelementptr inbounds i8*, i8** %132, i64 0
%134 = load i8*, i8** %133
%135 = call i32 @usage(i8* %134)
%136 = call i32 @exit(i32 1)
unreachable
137: ; preds = %121, %109, %108, %98, %85, %84, %74, %73, %72, %65, %58, %51, %44, %43
br label %25
138: ; preds = %25
%139 = load i32, i32* %15
%140 = icmp eq i32 %139, 1
br i1 %140, label %144, label %141
141: ; preds = %138
%142 = load i32, i32* %15
%143 = icmp eq i32 %142, 2
br i1 %143, label %144, label %182
144: ; preds = %141, %138
store i32 0, i32* %19
%145 = call i32 (...) @fork()
store i32 %145, i32* %20
%146 = load i32, i32* %20
switch i32 %146, label %150 [
i32 -1, label %147
i32 0, label %149
]
147: ; preds = %144
%148 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
149: ; preds = %144
br label %181
150: ; preds = %144
%151 = load i32, i32* %16
%152 = icmp eq i32 %151, 1
br i1 %152, label %153, label %158
153: ; preds = %150
%154 = load i32, i32* %20
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %154)
%156 = load i32, i32* @stdout
%157 = call i32 @fflush(i32 %156)
br label %158
158: ; preds = %153, %150
%159 = load i32, i32* %20
%160 = call i32 @waitpid(i32 %159, i32* %19, i32 0)
%161 = icmp eq i32 %160, -1
br i1 %161, label %162, label %163
162: ; preds = %158
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
163: ; preds = %158
%164 = load i32, i32* %19
%165 = call i32 @WIFEXITED(i32 %164)
%166 = icmp ne i32 %165, 0
br i1 %166, label %167, label %170
167: ; preds = %163
%168 = load i32, i32* %19
%169 = call i32 @WEXITSTATUS(i32 %168)
store i32 %169, i32* %3
store i32 1, i32* %18
br label %294
170: ; preds = %163
%171 = load i32, i32* %19
%172 = call i32 @WIFSIGNALED(i32 %171)
%173 = icmp ne i32 %172, 0
br i1 %173, label %174, label %179
174: ; preds = %170
%175 = call i32 (...) @getpid()
%176 = load i32, i32* %19
%177 = call i32 @WTERMSIG(i32 %176)
%178 = call i32 @kill(i32 %175, i32 %177)
br label %179
179: ; preds = %174, %170
br label %180
180: ; preds = %179
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
181: ; preds = %149
br label %182
182: ; preds = %181, %141
%183 = load i32, i32* %13
%184 = icmp eq i32 %183, 2
br i1 %184, label %185, label %195
185: ; preds = %182
%186 = load i32, i32* %14
%187 = icmp ne i32 %186, 0
br i1 %187, label %188, label %195
188: ; preds = %185
%189 = load i32, i32* %10
%190 = call i32 @sprintf(i8* %24, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %189)
%191 = call i64 @attachToNS(i8* %24)
%192 = icmp ne i64 %191, 0
br i1 %192, label %193, label %194
193: ; preds = %188
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
194: ; preds = %188
br label %195
195: ; preds = %194, %185, %182
%196 = load i32, i32* %17
%197 = icmp ne i32 %196, 0
br i1 %197, label %198, label %205
198: ; preds = %195
%199 = load i32, i32* %15
%200 = icmp ne i32 %199, 1
br i1 %200, label %204, label %201
201: ; preds = %198
%202 = load i32, i32* %13
%203 = icmp ne i32 %202, 1
br i1 %203, label %204, label %205
204: ; preds = %201, %198
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
205: ; preds = %201, %195
%206 = load i32, i32* %17
%207 = icmp ne i32 %206, 0
br i1 %207, label %208, label %224
208: ; preds = %205
%209 = load i32, i32* @MS_PRIVATE
%210 = load i32, i32* @MS_REC
%211 = or i32 %209, %210
%212 = call i32 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i8* null, i32 %211, i32* null)
%213 = icmp ne i32 %212, 0
br i1 %213, label %222, label %214
214: ; preds = %208
%215 = load i32, i32* @MS_NOSUID
%216 = load i32, i32* @MS_NOEXEC
%217 = or i32 %215, %216
%218 = load i32, i32* @MS_NODEV
%219 = or i32 %217, %218
%220 = call i32 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i32 %219, i32* null)
%221 = icmp ne i32 %220, 0
br i1 %221, label %222, label %224
222: ; preds = %214, %208
%223 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
br label %224
224: ; preds = %222, %214, %205
%225 = load i32, i32* %12
%226 = icmp eq i32 %225, 1
br i1 %226, label %227, label %237
227: ; preds = %224
%228 = load i32, i32* %13
%229 = icmp eq i32 %228, 1
br i1 %229, label %230, label %237
230: ; preds = %227
%231 = load i32, i32* @MS_MGC_VAL
%232 = call i32 @mount(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %231, i32* null)
%233 = icmp eq i32 %232, -1
br i1 %233, label %234, label %236
234: ; preds = %230
%235 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
236: ; preds = %230
br label %237
237: ; preds = %236, %227, %224
%238 = load i32, i32* %11
%239 = icmp eq i32 %238, 1
br i1 %239, label %240, label %257
240: ; preds = %237
%241 = load i32, i32* %15
%242 = icmp eq i32 %241, 0
br i1 %242, label %243, label %257
243: ; preds = %240
%244 = call i64 (...) @getpgrp()
%245 = call i32 (...) @getpid()
%246 = sext i32 %245 to i64
%247 = icmp eq i64 %244, %246
br i1 %247, label %248, label %255
248: ; preds = %243
%249 = call i32 (...) @fork()
switch i32 %249, label %253 [
i32 -1, label %250
i32 0, label %252
]
250: ; preds = %248
%251 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
252: ; preds = %248
br label %254
253: ; preds = %248
store i32 0, i32* %3
store i32 1, i32* %18
br label %294
254: ; preds = %252
br label %255
255: ; preds = %254, %243
%256 = call i32 (...) @setsid()
br label %257
257: ; preds = %255, %240, %237
%258 = load i32, i32* %16
%259 = icmp eq i32 %258, 1
br i1 %259, label %260, label %268
260: ; preds = %257
%261 = load i32, i32* %15
%262 = icmp eq i32 %261, 0
br i1 %262, label %263, label %268
263: ; preds = %260
%264 = call i32 (...) @getpid()
%265 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %264)
%266 = load i32, i32* @stdout
%267 = call i32 @fflush(i32 %266)
br label %268
268: ; preds = %263, %260, %257
%269 = load i32, i32* @optind
%270 = load i32, i32* %4
%271 = icmp slt i32 %269, %270
br i1 %271, label %272, label %289
272: ; preds = %268
%273 = load i8**, i8*** %5
%274 = load i32, i32* @optind
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds i8*, i8** %273, i64 %275
%277 = load i8*, i8** %276
%278 = load i8**, i8*** %5
%279 = load i32, i32* @optind
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds i8*, i8** %278, i64 %280
%282 = call i32 @execvp(i8* %277, i8** %281)
%283 = load i8**, i8*** %5
%284 = load i32, i32* @optind
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds i8*, i8** %283, i64 %285
%287 = load i8*, i8** %286
%288 = call i32 @perror(i8* %287)
store i32 1, i32* %3
store i32 1, i32* %18
br label %294
289: ; preds = %268
%290 = load i8**, i8*** %5
%291 = getelementptr inbounds i8*, i8** %290, i64 0
%292 = load i8*, i8** %291
%293 = call i32 @usage(i8* %292)
store i32 0, i32* %3
store i32 1, i32* %18
br label %294
294: ; preds = %289, %272, %253, %250, %234, %204, %193, %180, %167, %162, %147, %119, %107, %97, %83, %70, %63, %56, %49
%295 = load i8*, i8** %8
%296 = load i32, i32* %3
ret i32 %296
}

LLVM IR (-O2):
%struct.sched_param = type { i8* }
@PATH_MAX = global i32 0
@main.sp = internal global %struct.sched_param zeroinitializer
@.str = [24 x i8] c"+cdnmiufpa:b:k:j:g:r:vh\00"
@CLONE_NEWNET = global i32 0
@.str.1 = [8 x i8] c"unshare\00"
@CLONE_NEWNS = global i32 0
@CLONE_NEWPID = global i32 0
@CLONE_NEWUTS = global i32 0
@optarg = global i32 0
@.str.2 = [16 x i8] c"/proc/%d/ns/net\00"
@.str.3 = [16 x i8] c"/proc/%d/ns/pid\00"
@.str.4 = [16 x i8] c"/proc/%d/ns/uts\00"
@SCHED_RR = global i32 0
@.str.5 = [19 x i8] c"sched_setscheduler\00"
@.str.7 = [8 x i8] c"(devel)\00"
@.str.8 = [5 x i8] c"fork\00"
@.str.9 = [5 x i8] c"\01%d\0A\00"
@stdout = global i32 0
@.str.10 = [16 x i8] c"/proc/%d/ns/mnt\00"
@.str.11 = [5 x i8] c"none\00"
@.str.12 = [6 x i8] c"/proc\00"
@MS_PRIVATE = global i32 0
@MS_REC = global i32 0
@.str.13 = [5 x i8] c"proc\00"
@MS_NOSUID = global i32 0
@MS_NOEXEC = global i32 0
@MS_NODEV = global i32 0
@.str.14 = [6 x i8] c"mount\00"
@.str.15 = [6 x i8] c"sysfs\00"
@.str.16 = [5 x i8] c"/sys\00"
@MS_MGC_VAL = global i32 0
@optind = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = load i32, i32* @PATH_MAX
%5 = zext i32 %4 to i64
%6 = alloca i8, i64 %5
br label %7
7: ; preds = %20, %2
%8 = phi i32 [ undef, %2 ], [ %21, %20 ]
%9 = phi i32 [ 0, %2 ], [ %22, %20 ]
%10 = phi i32 [ 0, %2 ], [ %23, %20 ]
%11 = phi i32 [ 0, %2 ], [ %24, %20 ]
%12 = phi i32 [ 0, %2 ], [ %25, %20 ]
%13 = phi i32 [ 0, %2 ], [ %26, %20 ]
%14 = phi i32 [ 0, %2 ], [ %27, %20 ]
%15 = phi i32 [ 0, %2 ], [ %28, %20 ]
%16 = call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
switch i32 %16, label %108 [
i32 -1, label %112
i32 99, label %17
i32 100, label %20
i32 110, label %34
i32 109, label %40
i32 105, label %46
i32 117, label %52
i32 102, label %58
i32 112, label %59
i32 97, label %60
i32 98, label %68
i32 107, label %73
i32 106, label %81
i32 103, label %89
i32 114, label %92
i32 118, label %101
i32 104, label %104
]
17: ; preds = %7
%18 = call i32 (...) @getdtablesize()
%19 = icmp sgt i32 %18, 2
br i1 %19, label %29, label %20
20: ; preds = %29, %17, %73, %60, %46, %40, %34, %7, %92, %81, %52, %89, %68, %59, %58
%21 = phi i32 [ %8, %92 ], [ %8, %89 ], [ %85, %81 ], [ %8, %68 ], [ %8, %59 ], [ %8, %58 ], [ %8, %52 ], [ %8, %7 ], [ %8, %34 ], [ %8, %40 ], [ %8, %46 ], [ %64, %60 ], [ %77, %73 ], [ %8, %17 ], [ %8, %29 ]
%22 = phi i32 [ %9, %92 ], [ %9, %89 ], [ %9, %81 ], [ %9, %68 ], [ %9, %59 ], [ %9, %58 ], [ %9, %52 ], [ 1, %7 ], [ %9, %34 ], [ %9, %40 ], [ %9, %46 ], [ %9, %60 ], [ %9, %73 ], [ %9, %17 ], [ %9, %29 ]
%23 = phi i32 [ %10, %92 ], [ %10, %89 ], [ %10, %81 ], [ %10, %68 ], [ %10, %59 ], [ %10, %58 ], [ %10, %52 ], [ %10, %7 ], [ 1, %34 ], [ %10, %40 ], [ %10, %46 ], [ 2, %60 ], [ %10, %73 ], [ %10, %17 ], [ %10, %29 ]
%24 = phi i32 [ %11, %92 ], [ %11, %89 ], [ %11, %81 ], [ 2, %68 ], [ %11, %59 ], [ %11, %58 ], [ %11, %52 ], [ %11, %7 ], [ %11, %34 ], [ 1, %40 ], [ %11, %46 ], [ %11, %60 ], [ %11, %73 ], [ %11, %17 ], [ %11, %29 ]
%25 = phi i32 [ %12, %92 ], [ %12, %89 ], [ %12, %81 ], [ %72, %68 ], [ %12, %59 ], [ %12, %58 ], [ %12, %52 ], [ %12, %7 ], [ %12, %34 ], [ %12, %40 ], [ %12, %46 ], [ %12, %60 ], [ %12, %73 ], [ %12, %17 ], [ %12, %29 ]
%26 = phi i32 [ %13, %92 ], [ %13, %89 ], [ %13, %81 ], [ %13, %68 ], [ %13, %59 ], [ %13, %58 ], [ %13, %52 ], [ %13, %7 ], [ %13, %34 ], [ %13, %40 ], [ 1, %46 ], [ %13, %60 ], [ 2, %73 ], [ %13, %17 ], [ %13, %29 ]
%27 = phi i32 [ %14, %92 ], [ %14, %89 ], [ %14, %81 ], [ %14, %68 ], [ 1, %59 ], [ %14, %58 ], [ %14, %52 ], [ %14, %7 ], [ %14, %34 ], [ %14, %40 ], [ %14, %46 ], [ %14, %60 ], [ %14, %73 ], [ %14, %17 ], [ %14, %29 ]
%28 = phi i32 [ %15, %92 ], [ %15, %89 ], [ %15, %81 ], [ %15, %68 ], [ %15, %59 ], [ 1, %58 ], [ %15, %52 ], [ %15, %7 ], [ %15, %34 ], [ %15, %40 ], [ %15, %46 ], [ %15, %60 ], [ %15, %73 ], [ %15, %17 ], [ %15, %29 ]
br label %7
29: ; preds = %17, %29
%30 = phi i32 [ %32, %29 ], [ %18, %17 ]
%31 = call i32 @close(i32 %30)
%32 = add nsw i32 %30, -1
%33 = icmp ugt i32 %30, 3
br i1 %33, label %29, label %20
34: ; preds = %7
%35 = load i32, i32* @CLONE_NEWNET
%36 = call i32 @unshare(i32 %35)
%37 = icmp eq i32 %36, -1
br i1 %37, label %38, label %20
38: ; preds = %34
%39 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %226
40: ; preds = %7
%41 = load i32, i32* @CLONE_NEWNS
%42 = call i32 @unshare(i32 %41)
%43 = icmp eq i32 %42, -1
br i1 %43, label %44, label %20
44: ; preds = %40
%45 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %226
46: ; preds = %7
%47 = load i32, i32* @CLONE_NEWPID
%48 = call i32 @unshare(i32 %47)
%49 = icmp eq i32 %48, -1
br i1 %49, label %50, label %20
50: ; preds = %46
%51 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %226
52: ; preds = %7
%53 = load i32, i32* @CLONE_NEWUTS
%54 = call i32 @unshare(i32 %53)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %20
56: ; preds = %52
%57 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %226
58: ; preds = %7
br label %20
59: ; preds = %7
br label %20
60: ; preds = %7
%61 = load i32, i32* @optarg
%62 = call i8* @atoi(i32 %61)
%63 = ptrtoint i8* %62 to i64
%64 = trunc i64 %63 to i32
%65 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %64)
%66 = call i64 @attachToNS(i8* %6)
%67 = icmp eq i64 %66, 0
br i1 %67, label %20, label %226
68: ; preds = %7
%69 = load i32, i32* @optarg
%70 = call i8* @atoi(i32 %69)
%71 = ptrtoint i8* %70 to i64
%72 = trunc i64 %71 to i32
br label %20
73: ; preds = %7
%74 = load i32, i32* @optarg
%75 = call i8* @atoi(i32 %74)
%76 = ptrtoint i8* %75 to i64
%77 = trunc i64 %76 to i32
%78 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %77)
%79 = call i64 @attachToNS(i8* %6)
%80 = icmp eq i64 %79, 0
br i1 %80, label %20, label %226
81: ; preds = %7
%82 = load i32, i32* @optarg
%83 = call i8* @atoi(i32 %82)
%84 = ptrtoint i8* %83 to i64
%85 = trunc i64 %84 to i32
%86 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %85)
%87 = call i64 @attachToNS(i8* %6)
%88 = icmp eq i64 %87, 0
br i1 %88, label %20, label %226
89: ; preds = %7
%90 = load i32, i32* @optarg
%91 = call i32 @cgroup(i32 %90)
br label %20
92: ; preds = %7
%93 = load i32, i32* @optarg
%94 = call i8* @atoi(i32 %93)
store i8* %94, i8** getelementptr inbounds (%struct.sched_param, %struct.sched_param* @main.sp, i64 0, i32 0)
%95 = call i32 (...) @getpid()
%96 = load i32, i32* @SCHED_RR
%97 = call i32 @sched_setscheduler(i32 %95, i32 %96, %struct.sched_param* @main.sp)
%98 = icmp slt i32 %97, 0
br i1 %98, label %99, label %20
99: ; preds = %92
%100 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
br label %226
101: ; preds = %7
%102 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%103 = call i32 @exit(i32 0)
unreachable
104: ; preds = %7
%105 = load i8*, i8** %1
%106 = call i32 @usage(i8* %105)
%107 = call i32 @exit(i32 0)
unreachable
108: ; preds = %7
%109 = load i8*, i8** %1
%110 = call i32 @usage(i8* %109)
%111 = call i32 @exit(i32 1)
unreachable
112: ; preds = %7
%113 = add nsw i32 %13, -1
%114 = icmp ult i32 %113, 2
br i1 %114, label %115, label %147
115: ; preds = %112
%116 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%117 = call i32 (...) @fork()
switch i32 %117, label %120 [
i32 -1, label %118
i32 0, label %146
]
118: ; preds = %115
%119 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %144
120: ; preds = %115
%121 = icmp eq i32 %14, 1
br i1 %121, label %122, label %126
122: ; preds = %120
%123 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %117)
%124 = load i32, i32* @stdout
%125 = call i32 @fflush(i32 %124)
br label %126
126: ; preds = %122, %120
%127 = call i32 @waitpid(i32 %117, i32* %3, i32 0)
%128 = icmp eq i32 %127, -1
br i1 %128, label %144, label %129
129: ; preds = %126
%130 = load i32, i32* %3
%131 = call i32 @WIFEXITED(i32 %130)
%132 = icmp eq i32 %131, 0
%133 = load i32, i32* %3
br i1 %132, label %136, label %134
134: ; preds = %129
%135 = call i32 @WEXITSTATUS(i32 %133)
br label %144
136: ; preds = %129
%137 = call i32 @WIFSIGNALED(i32 %133)
%138 = icmp eq i32 %137, 0
br i1 %138, label %144, label %139
139: ; preds = %136
%140 = call i32 (...) @getpid()
%141 = load i32, i32* %3
%142 = call i32 @WTERMSIG(i32 %141)
%143 = call i32 @kill(i32 %140, i32 %142)
br label %144
144: ; preds = %134, %118, %126, %136, %139
%145 = phi i32 [ 1, %139 ], [ 1, %136 ], [ 1, %126 ], [ 1, %118 ], [ %135, %134 ]
br label %226
146: ; preds = %115
br label %147
147: ; preds = %146, %112
%148 = icmp eq i32 %11, 2
%149 = icmp ne i32 %12, 0
%150 = select i1 %148, i1 %149, i1 false
br i1 %150, label %151, label %155
151: ; preds = %147
%152 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %8)
%153 = call i64 @attachToNS(i8* %6)
%154 = icmp eq i64 %153, 0
br i1 %154, label %155, label %226
155: ; preds = %151, %147
%156 = icmp eq i32 %15, 0
br i1 %156, label %177, label %157
157: ; preds = %155
%158 = icmp ne i32 %13, 1
%159 = icmp ne i32 %11, 1
%160 = select i1 %158, i1 true, i1 %159
br i1 %160, label %226, label %161
161: ; preds = %157
%162 = load i32, i32* @MS_PRIVATE
%163 = load i32, i32* @MS_REC
%164 = or i32 %163, %162
%165 = call i32 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i8* null, i32 %164, i32* null)
%166 = icmp eq i32 %165, 0
br i1 %166, label %167, label %175
167: ; preds = %161
%168 = load i32, i32* @MS_NOSUID
%169 = load i32, i32* @MS_NOEXEC
%170 = or i32 %169, %168
%171 = load i32, i32* @MS_NODEV
%172 = or i32 %170, %171
%173 = call i32 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i32 %172, i32* null)
%174 = icmp eq i32 %173, 0
br i1 %174, label %177, label %175
175: ; preds = %167, %161
%176 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
br label %177
177: ; preds = %155, %175, %167
%178 = icmp eq i32 %10, 1
%179 = icmp eq i32 %11, 1
%180 = select i1 %178, i1 %179, i1 false
br i1 %180, label %181, label %187
181: ; preds = %177
%182 = load i32, i32* @MS_MGC_VAL
%183 = call i32 @mount(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %182, i32* null)
%184 = icmp eq i32 %183, -1
br i1 %184, label %185, label %187
185: ; preds = %181
%186 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
br label %226
187: ; preds = %181, %177
%188 = icmp eq i32 %9, 1
%189 = icmp eq i32 %13, 0
%190 = select i1 %188, i1 %189, i1 false
br i1 %190, label %191, label %202
191: ; preds = %187
%192 = call i64 (...) @getpgrp()
%193 = call i32 (...) @getpid()
%194 = sext i32 %193 to i64
%195 = icmp eq i64 %192, %194
br i1 %195, label %196, label %200
196: ; preds = %191
%197 = call i32 (...) @fork()
switch i32 %197, label %226 [
i32 -1, label %198
i32 0, label %200
]
198: ; preds = %196
%199 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %226
200: ; preds = %196, %191
%201 = call i32 (...) @setsid()
br label %202
202: ; preds = %200, %187
%203 = icmp eq i32 %14, 1
%204 = select i1 %203, i1 %189, i1 false
br i1 %204, label %205, label %210
205: ; preds = %202
%206 = call i32 (...) @getpid()
%207 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %206)
%208 = load i32, i32* @stdout
%209 = call i32 @fflush(i32 %208)
br label %210
210: ; preds = %205, %202
%211 = load i32, i32* @optind
%212 = icmp slt i32 %211, %0
br i1 %212, label %213, label %223
213: ; preds = %210
%214 = sext i32 %211 to i64
%215 = getelementptr inbounds i8*, i8** %1, i64 %214
%216 = load i8*, i8** %215
%217 = call i32 @execvp(i8* %216, i8** %215)
%218 = load i32, i32* @optind
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds i8*, i8** %1, i64 %219
%221 = load i8*, i8** %220
%222 = call i32 @perror(i8* %221)
br label %226
223: ; preds = %210
%224 = load i8*, i8** %1
%225 = call i32 @usage(i8* %224)
br label %226
226: ; preds = %81, %73, %60, %144, %196, %157, %151, %223, %213, %198, %185, %99, %56, %50, %44, %38
%227 = phi i32 [ 1, %99 ], [ 1, %56 ], [ 1, %50 ], [ 1, %44 ], [ 1, %38 ], [ 1, %185 ], [ 1, %213 ], [ 0, %223 ], [ 1, %198 ], [ 1, %151 ], [ 1, %157 ], [ 0, %196 ], [ %145, %144 ], [ 1, %60 ], [ 1, %73 ], [ 1, %81 ]
ret i32 %227
}