#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 */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};
struct TYPE_4__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct TYPE_3__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct rusage {
  TYPE_2__ ru_stime;
  TYPE_1__ ru_utime;
};
struct option {
  char *member_0;
  int member_3;
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ member_1;
};
typedef int /*<<< orphan*/ sigset_t;
typedef scalar_t__ pid_t;
typedef int /*<<< orphan*/ intmax_t;

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
scalar_t__ ENOENT;
int /*<<< orphan*/ RUSAGE_CHILDREN;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ SIG_SETMASK;
int WEXITSTATUS(int);
scalar_t__ WIFEXITED(int);
int /*<<< orphan*/ WTERMSIG(int);
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ err(int, char *, ...);
scalar_t__ errno;
int /*<<< orphan*/ errx(int, char *);
int /*<<< orphan*/ execvp(char *, char **);
scalar_t__ fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/, int,
                           int /*<<< orphan*/, long, int /*<<< orphan*/, long);
int getopt_long(int, char **, char *, struct option *, int /*<<< orphan*/ *);
int /*<<< orphan*/ getrusage(int /*<<< orphan*/, struct rusage *);
int help(char *, char *);
int /*<<< orphan*/ no_argument;
int optind;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int version(char *);
int /*<<< orphan*/ waitpid(scalar_t__, int *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  struct option longopts[] = {{"help", no_argument, 0, 0},
                              {"version", no_argument, 0, 1},
                              {0, 0, 0, 0}};
  int c;
  while ((c = getopt_long(argc, argv, "p", longopts, NULL)) != -1) {
    switch (c) {
    case 0:
      return help(argv[0], "[OPTIONS] UTILITY [ARGS...]\n"
                           "  -p                       (ignored)\n"
                           "      --help               display this help\n"
                           "      --version            display version info");
    case 1:
      return version(argv[0]);
    case 'p':
      break;
    case '?':
      return 1;
    }
  }
  if (optind >= argc)
    errx(1, "missing operand");
  sigset_t sigset;
  sigemptyset(&sigset);
  sigaddset(&sigset, SIGINT);
  sigaddset(&sigset, SIGQUIT);
  sigset_t oldMask;
  sigprocmask(SIG_BLOCK, &sigset, &oldMask);
  struct timespec start;
  clock_gettime(CLOCK_MONOTONIC, &start);
  pid_t pid = fork();
  if (pid < 0) {
    err(1, "fork");
  } else if (pid == 0) {
    sigprocmask(SIG_SETMASK, &oldMask, NULL);
    execvp(argv[optind], argv + optind);
    err(errno == ENOENT ? 127 : 126, "execvp: '%s'", argv[optind]);
  } else {
    int status;
    waitpid(pid, &status, 0);
    struct timespec end;
    clock_gettime(CLOCK_MONOTONIC, &end);
    struct timespec realTime;
    realTime.tv_sec = end.tv_sec - start.tv_sec;
    realTime.tv_nsec = end.tv_nsec - start.tv_nsec;
    if (realTime.tv_nsec < 0) {
      realTime.tv_sec--;
      realTime.tv_nsec += 1000000000;
    }
    struct rusage usage;
    getrusage(RUSAGE_CHILDREN, &usage);
    fprintf(stderr, "real %jd.%06ld\nuser %jd.%06ld\nsys %jd.%06ld\n",
            (intmax_t)realTime.tv_sec, realTime.tv_nsec / 1000,
            (intmax_t)usage.ru_utime.tv_sec, (long)usage.ru_utime.tv_usec,
            (intmax_t)usage.ru_stime.tv_sec, (long)usage.ru_stime.tv_usec);
    if (WIFEXITED(status)) {
      return WEXITSTATUS(status);
    } else {
      sigprocmask(SIG_SETMASK, &oldMask, NULL);
      signal(WTERMSIG(status), SIG_DFL);
      raise(WTERMSIG(status));
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xd9c(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x2d29(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x50(%rbp)
add    $0x18,%rdi
lea    0xd78(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0x2d00(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x1,-0x38(%rbp)
add    $0x18,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1080 <memset@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x60(%rbp),%rcx
lea    0xd36(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1060 <getopt_long@plt>
mov    %eax,-0x64(%rbp)
cmp    $0xffffffff,%eax
je     137a <main+0x13a>
mov    -0x64(%rbp),%eax
mov    %eax,-0xd4(%rbp)
test   %eax,%eax
je     1335 <main+0xf5>
jmp    12f9 <main+0xb9>
mov    -0xd4(%rbp),%eax
sub    $0x1,%eax
je     1350 <main+0x110>
jmp    130d <main+0xcd>
mov    -0xd4(%rbp),%eax
sub    $0x3f,%eax
je     1369 <main+0x129>
jmp    1321 <main+0xe1>
mov    -0xd4(%rbp),%eax
sub    $0x70,%eax
je     1364 <main+0x124>
jmp    1375 <main+0x135>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xcca(%rip),%rsi
call   1120 <help@plt>
mov    %eax,-0x4(%rbp)
jmp    1627 <main+0x3e7>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10c0 <version@plt>
mov    %eax,-0x4(%rbp)
jmp    1627 <main+0x3e7>
jmp    1375 <main+0x135>
movl   $0x1,-0x4(%rbp)
jmp    1627 <main+0x3e7>
jmp    12bb <main+0x7b>
mov    0x2c47(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jl     139d <main+0x15d>
mov    $0x1,%edi
lea    0xd13(%rip),%rsi
call   1070 <errx@plt>
lea    -0x68(%rbp),%rdi
call   10b0 <sigemptyset@plt>
mov    0x2c3b(%rip),%rax
mov    (%rax),%esi
lea    -0x68(%rbp),%rdi
call   1150 <sigaddset@plt>
mov    0x2c21(%rip),%rax
mov    (%rax),%esi
lea    -0x68(%rbp),%rdi
call   1150 <sigaddset@plt>
mov    0x2bcf(%rip),%rax
mov    (%rax),%edi
lea    -0x68(%rbp),%rsi
lea    -0x6c(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    0x2bf1(%rip),%rax
mov    (%rax),%edi
lea    -0x80(%rbp),%rsi
call   1050 <clock_gettime@plt>
mov    $0x0,%al
call   1160 <fork@plt>
mov    %rax,-0x88(%rbp)
cmpq   $0x0,-0x88(%rbp)
jge    1426 <main+0x1e6>
mov    $0x1,%edi
lea    0xca1(%rip),%rsi
mov    $0x0,%al
call   10d0 <err@plt>
jmp    1627 <main+0x3e7>
cmpq   $0x0,-0x88(%rbp)
jne    14bf <main+0x27f>
mov    0x2b95(%rip),%rax
mov    (%rax),%edi
lea    -0x6c(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
mov    -0x10(%rbp),%rax
mov    0x2b73(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2b61(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
add    %rax,%rsi
call   1130 <execvp@plt>
mov    0x2b2b(%rip),%rax
mov    (%rax),%rcx
mov    0x2af9(%rip),%rax
mov    (%rax),%rdx
mov    $0x7e,%edi
mov    $0x7f,%eax
cmp    %rdx,%rcx
cmove  %eax,%edi
mov    -0x10(%rbp),%rax
mov    0x2b23(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xc0d(%rip),%rsi
mov    $0x0,%al
call   10d0 <err@plt>
jmp    1622 <main+0x3e2>
mov    -0x88(%rbp),%rdi
lea    -0x8c(%rbp),%rsi
xor    %edx,%edx
call   1100 <waitpid@plt>
mov    0x2afd(%rip),%rax
mov    (%rax),%edi
lea    -0xa0(%rbp),%rsi
call   1050 <clock_gettime@plt>
mov    -0x98(%rbp),%rax
sub    -0x78(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0xa0(%rbp),%eax
sub    -0x80(%rbp),%eax
mov    %eax,-0xb0(%rbp)
cmpl   $0x0,-0xb0(%rbp)
jge    153a <main+0x2fa>
mov    -0xa8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0xa8(%rbp)
mov    -0xb0(%rbp),%eax
add    $0x3b9aca00,%eax
mov    %eax,-0xb0(%rbp)
mov    0x2a6f(%rip),%rax
mov    (%rax),%edi
lea    -0xd0(%rbp),%rsi
call   1110 <getrusage@plt>
mov    0x2a62(%rip),%rax
mov    (%rax),%edi
mov    -0xa8(%rbp),%rax
mov    %eax,-0xd8(%rbp)
mov    -0xb0(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    -0xd8(%rbp),%edx
mov    %eax,%ecx
mov    -0xb8(%rbp),%rax
mov    %eax,%r8d
mov    -0xc0(%rbp),%r9
mov    -0xc8(%rbp),%rax
mov    %eax,%r10d
mov    -0xd0(%rbp),%rax
lea    0xb29(%rip),%rsi
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   10a0 <fprintf@plt>
mov    -0x8c(%rbp),%edi
call   1140 <WIFEXITED@plt>
cmp    $0x0,%rax
je     15da <main+0x39a>
mov    -0x8c(%rbp),%edi
call   10f0 <WEXITSTATUS@plt>
mov    %eax,-0x4(%rbp)
jmp    1627 <main+0x3e7>
mov    0x29ef(%rip),%rax
mov    (%rax),%edi
lea    -0x6c(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
mov    -0x8c(%rbp),%edi
call   10e0 <WTERMSIG@plt>
mov    %eax,%edi
mov    0x298c(%rip),%rax
mov    (%rax),%esi
call   1090 <signal@plt>
mov    -0x8c(%rbp),%edi
call   10e0 <WTERMSIG@plt>
mov    %eax,%edi
call   1040 <raise@plt>
jmp    1622 <main+0x3e2>
jmp    1627 <main+0x3e7>
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xa0,%rsp
mov    %rsi,%r15
mov    %edi,%ebp
lea    0xdb5(%rip),%rax
mov    %rax,0x50(%rsp)
mov    0x2d41(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x58(%rsp)
movq   $0x0,0x5c(%rsp)
lea    0xd98(%rip),%rcx
mov    %rcx,0x68(%rsp)
mov    %eax,0x70(%rsp)
movabs $0x100000000,%rax
mov    %rax,0x74(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x80(%rsp)
movq   $0x0,0x90(%rsp)
lea    0xd60(%rip),%r14
lea    0x50(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
xor    %r8d,%r8d
call   1060 <getopt_long@plt>
test   %eax,%eax
jg     12e0 <main+0xb0>
cmp    $0xffffffff,%eax
je     12f9 <main+0xc9>
test   %eax,%eax
jne    12b0 <main+0x80>
jmp    1440 <main+0x210>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0x1,%eax
je     1457 <main+0x227>
cmp    $0x3f,%eax
jne    12b0 <main+0x80>
mov    $0x1,%r14d
jmp    1521 <main+0x2f1>
mov    0x2cc8(%rip),%r12
cmp    %ebp,(%r12)
jl     1317 <main+0xe7>
lea    0xd9e(%rip),%rsi
mov    $0x1,%edi
call   1070 <errx@plt>
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   10a0 <sigemptyset@plt>
mov    0x2cbd(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1140 <sigaddset@plt>
mov    0x2ca4(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1140 <sigaddset@plt>
mov    0x2c53(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rdx
mov    %rbx,%rsi
call   1030 <sigprocmask@plt>
mov    0x2c75(%rip),%rbx
mov    (%rbx),%edi
lea    0x20(%rsp),%rsi
call   1050 <clock_gettime@plt>
xor    %eax,%eax
call   1150 <fork@plt>
test   %rax,%rax
js     1467 <main+0x237>
je     1482 <main+0x252>
lea    0x4(%rsp),%rsi
mov    %rax,%rdi
xor    %edx,%edx
call   10f0 <waitpid@plt>
mov    (%rbx),%edi
lea    0x10(%rsp),%rsi
call   1050 <clock_gettime@plt>
mov    0x10(%rsp),%eax
mov    0x18(%rsp),%r14d
sub    0x28(%rsp),%r14d
sub    0x20(%rsp),%eax
lea    0x3b9aca00(%rax),%ebp
mov    %eax,%ebx
sar    $0x1f,%ebx
test   %eax,%eax
cmovns %eax,%ebp
mov    0x2be7(%rip),%rax
mov    (%rax),%edi
lea    0x30(%rsp),%rsi
call   1100 <getrusage@plt>
mov    0x2bdc(%rip),%rax
mov    (%rax),%edi
add    %r14d,%ebx
movslq %ebp,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x26,%rcx
add    %eax,%ecx
mov    0x48(%rsp),%r8d
mov    0x40(%rsp),%r9
mov    0x38(%rsp),%eax
lea    0xcc0(%rip),%rsi
mov    %ebx,%edx
push   0x30(%rsp)
push   %rax
call   1090 <fprintf@plt>
add    $0x10,%rsp
mov    0x4(%rsp),%edi
call   1130 <WIFEXITED@plt>
test   %rax,%rax
je     14e0 <main+0x2b0>
mov    0x4(%rsp),%edi
call   10e0 <WEXITSTATUS@plt>
mov    %eax,%r14d
jmp    1521 <main+0x2f1>
mov    (%r15),%rdi
lea    0xbc3(%rip),%rsi
call   1110 <help@plt>
mov    %eax,%r14d
jmp    1521 <main+0x2f1>
mov    (%r15),%rdi
call   10b0 <version@plt>
mov    %eax,%r14d
jmp    1521 <main+0x2f1>
lea    0xc4d(%rip),%rsi
xor    %r14d,%r14d
mov    $0x1,%edi
xor    %eax,%eax
call   10c0 <err@plt>
jmp    1521 <main+0x2f1>
mov    0x2b47(%rip),%rax
mov    (%rax),%edi
xor    %r14d,%r14d
lea    0x8(%rsp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
movslq (%r12),%rax
lea    (%r15,%rax,8),%rsi
mov    (%r15,%rax,8),%rdi
call   1120 <execvp@plt>
mov    0x2af6(%rip),%rax
mov    (%rax),%rax
mov    0x2ac4(%rip),%rcx
xor    %edi,%edi
cmp    (%rcx),%rax
sete   %dil
or     $0x7e,%edi
movslq (%r12),%rax
mov    (%r15,%rax,8),%rdx
lea    0xbe9(%rip),%rsi
xor    %eax,%eax
call   10c0 <err@plt>
jmp    1521 <main+0x2f1>
mov    0x2ae9(%rip),%rax
mov    (%rax),%edi
xor    %r14d,%r14d
lea    0x8(%rsp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
mov    0x4(%rsp),%edi
call   10d0 <WTERMSIG@plt>
mov    0x2a88(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1080 <signal@plt>
mov    0x4(%rsp),%edi
call   10d0 <WTERMSIG@plt>
mov    %eax,%edi
call   1040 <raise@plt>
mov    %r14d,%eax
add    $0xa0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.option = type { i8*, i32, i32, i32 }
%struct.timespec = type { i32, i64 }
%struct.rusage = type { %struct.TYPE_4__, %struct.TYPE_3__ }
%struct.TYPE_4__ = type { i64, i64 }
%struct.TYPE_3__ = type { i64, i64 }
@.str = [5 x i8] c"help\00"
@no_argument = global i32 0
@.str.1 = [8 x i8] c"version\00"
@.str.2 = [2 x i8] c"p\00"
@.str.3 = [158 x i8] c"[OPTIONS] UTILITY [ARGS...]\0A -p (ignored)\0A --help display this help\0A --version display version info\00"
@optind = global i32 0
@.str.4 = [16 x i8] c"missing operand\00"
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIG_BLOCK = global i32 0
@CLOCK_MONOTONIC = global i32 0
@.str.5 = [5 x i8] c"fork\00"
@SIG_SETMASK = global i32 0
@errno = global i64 0
@ENOENT = global i64 0
@.str.6 = [13 x i8] c"execvp: '%s'\00"
@RUSAGE_CHILDREN = global i32 0
@stderr = global i32 0
@.str.7 = [45 x i8] c"real %jd.%06ld\0Auser %jd.%06ld\0Asys %jd.%06ld\0A\00"
@SIG_DFL = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x %struct.option]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.timespec
%11 = alloca i64
%12 = alloca i32
%13 = alloca %struct.timespec
%14 = alloca %struct.timespec
%15 = alloca %struct.rusage
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %6, i64 0, i64 0
%17 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %17
%18 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 1
%19 = load i32, i32* @no_argument
store i32 %19, i32* %18
%20 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 2
store i32 0, i32* %20
%21 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 3
store i32 0, i32* %21
%22 = getelementptr inbounds %struct.option, %struct.option* %16, i64 1
%23 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %23
%24 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 1
%25 = load i32, i32* @no_argument
store i32 %25, i32* %24
%26 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 2
store i32 0, i32* %26
%27 = getelementptr inbounds %struct.option, %struct.option* %22, i32 0, i32 3
store i32 1, i32* %27
%28 = getelementptr inbounds %struct.option, %struct.option* %22, i64 1
%29 = bitcast %struct.option* %28 to i8*
br label %30
30: ; preds = %50, %2
%31 = load i32, i32* %4
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %6, i64 0, i64 0
%34 = call i32 @getopt_long(i32 %31, i8** %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), %struct.option* %33, i32* null)
store i32 %34, i32* %7
%35 = icmp ne i32 %34, -1
br i1 %35, label %36, label %51
36: ; preds = %30
%37 = load i32, i32* %7
switch i32 %37, label %50 [
i32 0, label %38
i32 1, label %43
i32 112, label %48
i32 63, label %49
]
38: ; preds = %36
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 0
%41 = load i8*, i8** %40
%42 = call i32 @help(i8* %41, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.3, i64 0, i64 0))
store i32 %42, i32* %3
br label %169
43: ; preds = %36
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 0
%46 = load i8*, i8** %45
%47 = call i32 @version(i8* %46)
store i32 %47, i32* %3
br label %169
48: ; preds = %36
br label %50
49: ; preds = %36
store i32 1, i32* %3
br label %169
50: ; preds = %36, %48
br label %30
51: ; preds = %30
%52 = load i32, i32* @optind
%53 = load i32, i32* %4
%54 = icmp sge i32 %52, %53
br i1 %54, label %55, label %57
55: ; preds = %51
%56 = call i32 @errx(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %57
57: ; preds = %55, %51
%58 = call i32 @sigemptyset(i32* %8)
%59 = load i32, i32* @SIGINT
%60 = call i32 @sigaddset(i32* %8, i32 %59)
%61 = load i32, i32* @SIGQUIT
%62 = call i32 @sigaddset(i32* %8, i32 %61)
%63 = load i32, i32* @SIG_BLOCK
%64 = call i32 @sigprocmask(i32 %63, i32* %8, i32* %9)
%65 = load i32, i32* @CLOCK_MONOTONIC
%66 = call i32 @clock_gettime(i32 %65, %struct.timespec* %10)
%67 = call i64 (...) @fork()
store i64 %67, i64* %11
%68 = load i64, i64* %11
%69 = icmp slt i64 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %57
%71 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %169
72: ; preds = %57
%73 = load i64, i64* %11
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %99
75: ; preds = %72
%76 = load i32, i32* @SIG_SETMASK
%77 = call i32 @sigprocmask(i32 %76, i32* %9, i32* null)
%78 = load i8**, i8*** %5
%79 = load i32, i32* @optind
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8*, i8** %78, i64 %80
%82 = load i8*, i8** %81
%83 = load i8**, i8*** %5
%84 = load i32, i32* @optind
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i8*, i8** %83, i64 %85
%87 = call i32 @execvp(i8* %82, i8** %86)
%88 = load i64, i64* @errno
%89 = load i64, i64* @ENOENT
%90 = icmp eq i64 %88, %89
%91 = zext i1 %90 to i64
%92 = select i1 %90, i32 127, i32 126
%93 = load i8**, i8*** %5
%94 = load i32, i32* @optind
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8*, i8** %93, i64 %95
%97 = load i8*, i8** %96
%98 = call i32 (i32, i8*, ...) @err(i32 %92, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* %97)
br label %168
99: ; preds = %72
%100 = load i64, i64* %11
%101 = call i32 @waitpid(i64 %100, i32* %12, i32 0)
%102 = load i32, i32* @CLOCK_MONOTONIC
%103 = call i32 @clock_gettime(i32 %102, %struct.timespec* %13)
%104 = getelementptr inbounds %struct.timespec, %struct.timespec* %13, i32 0, i32 1
%105 = load i64, i64* %104
%106 = getelementptr inbounds %struct.timespec, %struct.timespec* %10, i32 0, i32 1
%107 = load i64, i64* %106
%108 = sub nsw i64 %105, %107
%109 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 1
store i64 %108, i64* %109
%110 = getelementptr inbounds %struct.timespec, %struct.timespec* %13, i32 0, i32 0
%111 = load i32, i32* %110
%112 = getelementptr inbounds %struct.timespec, %struct.timespec* %10, i32 0, i32 0
%113 = load i32, i32* %112
%114 = sub nsw i32 %111, %113
%115 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 0
store i32 %114, i32* %115
%116 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 0
%117 = load i32, i32* %116
%118 = icmp slt i32 %117, 0
br i1 %118, label %119, label %126
119: ; preds = %99
%120 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 1
%121 = load i64, i64* %120
%122 = add nsw i64 %121, -1
store i64 %122, i64* %120
%123 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 0
%124 = load i32, i32* %123
%125 = add nsw i32 %124, 1000000000
store i32 %125, i32* %123
br label %126
126: ; preds = %119, %99
%127 = load i32, i32* @RUSAGE_CHILDREN
%128 = call i32 @getrusage(i32 %127, %struct.rusage* %15)
%129 = load i32, i32* @stderr
%130 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 1
%131 = load i64, i64* %130
%132 = trunc i64 %131 to i32
%133 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 0
%134 = load i32, i32* %133
%135 = sdiv i32 %134, 1000
%136 = getelementptr inbounds %struct.rusage, %struct.rusage* %15, i32 0, i32 1
%137 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %136, i32 0, i32 1
%138 = load i64, i64* %137
%139 = trunc i64 %138 to i32
%140 = getelementptr inbounds %struct.rusage, %struct.rusage* %15, i32 0, i32 1
%141 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %140, i32 0, i32 0
%142 = load i64, i64* %141
%143 = getelementptr inbounds %struct.rusage, %struct.rusage* %15, i32 0, i32 0
%144 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %143, i32 0, i32 1
%145 = load i64, i64* %144
%146 = trunc i64 %145 to i32
%147 = getelementptr inbounds %struct.rusage, %struct.rusage* %15, i32 0, i32 0
%148 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %147, i32 0, i32 0
%149 = load i64, i64* %148
%150 = call i32 @fprintf(i32 %129, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i32 %132, i32 %135, i32 %139, i64 %142, i32 %146, i64 %149)
%151 = load i32, i32* %12
%152 = call i64 @WIFEXITED(i32 %151)
%153 = icmp ne i64 %152, 0
br i1 %153, label %154, label %157
154: ; preds = %126
%155 = load i32, i32* %12
%156 = call i32 @WEXITSTATUS(i32 %155)
store i32 %156, i32* %3
br label %169
157: ; preds = %126
%158 = load i32, i32* @SIG_SETMASK
%159 = call i32 @sigprocmask(i32 %158, i32* %9, i32* null)
%160 = load i32, i32* %12
%161 = call i32 @WTERMSIG(i32 %160)
%162 = load i32, i32* @SIG_DFL
%163 = call i32 @signal(i32 %161, i32 %162)
%164 = load i32, i32* %12
%165 = call i32 @WTERMSIG(i32 %164)
%166 = call i32 @raise(i32 %165)
br label %167
167: ; preds = %157
br label %168
168: ; preds = %167, %75
br label %169
169: ; preds = %38, %43, %49, %154, %168, %70
%170 = load i32, i32* %3
ret i32 %170
}

LLVM IR (-O2):
%struct.option = type { i8*, i32, i32, i32 }
%struct.timespec = type { i32, i64 }
%struct.rusage = type { %struct.TYPE_4__, %struct.TYPE_3__ }
%struct.TYPE_4__ = type { i64, i64 }
%struct.TYPE_3__ = type { i64, i64 }
@.str = [5 x i8] c"help\00"
@no_argument = global i32 0
@.str.1 = [8 x i8] c"version\00"
@.str.2 = [2 x i8] c"p\00"
@.str.3 = [158 x i8] c"[OPTIONS] UTILITY [ARGS...]\0A -p (ignored)\0A --help display this help\0A --version display version info\00"
@optind = global i32 0
@.str.4 = [16 x i8] c"missing operand\00"
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIG_BLOCK = global i32 0
@CLOCK_MONOTONIC = global i32 0
@.str.5 = [5 x i8] c"fork\00"
@SIG_SETMASK = global i32 0
@errno = global i64 0
@ENOENT = global i64 0
@.str.6 = [13 x i8] c"execvp: '%s'\00"
@RUSAGE_CHILDREN = global i32 0
@stderr = global i32 0
@.str.7 = [45 x i8] c"real %jd.%06ld\0Auser %jd.%06ld\0Asys %jd.%06ld\0A\00"
@SIG_DFL = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [3 x %struct.option]
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.timespec
%7 = alloca i32
%8 = alloca %struct.timespec
%9 = alloca %struct.rusage
%10 = bitcast [3 x %struct.option]* %3 to i8*
%11 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %3, i64 0, i64 0
%12 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %3, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %3, i64 0, i64 0, i32 1
%14 = load i32, i32* @no_argument
store i32 %14, i32* %13
%15 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %3, i64 0, i64 0, i32 2
store i32 0, i32* %15
%16 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %3, i64 0, i64 0, i32 3
store i32 0, i32* %16
%17 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %3, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %17
%18 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %3, i64 0, i64 1, i32 1
store i32 %14, i32* %18
%19 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %3, i64 0, i64 1, i32 2
store i32 0, i32* %19
%20 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %3, i64 0, i64 1, i32 3
store i32 1, i32* %20
%21 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %3, i64 0, i64 2
%22 = bitcast %struct.option* %21 to i8*
br label %23
23: ; preds = %23, %2
%24 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), %struct.option* %11, i32* null)
switch i32 %24, label %23 [
i32 -1, label %31
i32 0, label %25
i32 1, label %28
i32 63, label %130
]
25: ; preds = %23
%26 = load i8*, i8** %1
%27 = call i32 @help(i8* %26, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.3, i64 0, i64 0))
br label %130
28: ; preds = %23
%29 = load i8*, i8** %1
%30 = call i32 @version(i8* %29)
br label %130
31: ; preds = %23
%32 = load i32, i32* @optind
%33 = icmp slt i32 %32, %0
br i1 %33, label %36, label %34
34: ; preds = %31
%35 = call i32 @errx(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %36
36: ; preds = %34, %31
%37 = bitcast i32* %4 to i8*
%38 = call i32 @sigemptyset(i32* %4)
%39 = load i32, i32* @SIGINT
%40 = call i32 @sigaddset(i32* %4, i32 %39)
%41 = load i32, i32* @SIGQUIT
%42 = call i32 @sigaddset(i32* %4, i32 %41)
%43 = bitcast i32* %5 to i8*
%44 = load i32, i32* @SIG_BLOCK
%45 = call i32 @sigprocmask(i32 %44, i32* %4, i32* %5)
%46 = bitcast %struct.timespec* %6 to i8*
%47 = load i32, i32* @CLOCK_MONOTONIC
%48 = call i32 @clock_gettime(i32 %47, %struct.timespec* %6)
%49 = call i64 (...) @fork()
%50 = icmp slt i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %36
%52 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %128
53: ; preds = %36
%54 = icmp eq i64 %49, 0
br i1 %54, label %55, label %72
55: ; preds = %53
%56 = load i32, i32* @SIG_SETMASK
%57 = call i32 @sigprocmask(i32 %56, i32* %5, i32* null)
%58 = load i32, i32* @optind
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8*, i8** %1, i64 %59
%61 = load i8*, i8** %60
%62 = call i32 @execvp(i8* %61, i8** %60)
%63 = load i64, i64* @errno
%64 = load i64, i64* @ENOENT
%65 = icmp eq i64 %63, %64
%66 = select i1 %65, i32 127, i32 126
%67 = load i32, i32* @optind
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8*, i8** %1, i64 %68
%70 = load i8*, i8** %69
%71 = call i32 (i32, i8*, ...) @err(i32 %66, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* %70)
br label %128
72: ; preds = %53
%73 = bitcast i32* %7 to i8*
%74 = call i32 @waitpid(i64 %49, i32* %7, i32 0)
%75 = bitcast %struct.timespec* %8 to i8*
%76 = load i32, i32* @CLOCK_MONOTONIC
%77 = call i32 @clock_gettime(i32 %76, %struct.timespec* %8)
%78 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i64 0, i32 1
%79 = load i64, i64* %78
%80 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i64 0, i32 1
%81 = load i64, i64* %80
%82 = sub nsw i64 %79, %81
%83 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i64 0, i32 0
%84 = load i32, i32* %83
%85 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i64 0, i32 0
%86 = load i32, i32* %85
%87 = sub nsw i32 %84, %86
%88 = icmp slt i32 %87, 0
%89 = add nsw i32 %87, 1000000000
%90 = ashr i32 %87, 31
%91 = select i1 %88, i32 %89, i32 %87
%92 = bitcast %struct.rusage* %9 to i8*
%93 = load i32, i32* @RUSAGE_CHILDREN
%94 = call i32 @getrusage(i32 %93, %struct.rusage* %9)
%95 = load i32, i32* @stderr
%96 = trunc i64 %82 to i32
%97 = add i32 %90, %96
%98 = sdiv i32 %91, 1000
%99 = getelementptr inbounds %struct.rusage, %struct.rusage* %9, i64 0, i32 1, i32 1
%100 = load i64, i64* %99
%101 = trunc i64 %100 to i32
%102 = getelementptr inbounds %struct.rusage, %struct.rusage* %9, i64 0, i32 1, i32 0
%103 = load i64, i64* %102
%104 = getelementptr inbounds %struct.rusage, %struct.rusage* %9, i64 0, i32 0, i32 1
%105 = load i64, i64* %104
%106 = trunc i64 %105 to i32
%107 = getelementptr inbounds %struct.rusage, %struct.rusage* %9, i64 0, i32 0, i32 0
%108 = load i64, i64* %107
%109 = call i32 @fprintf(i32 %95, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i32 %97, i32 %98, i32 %101, i64 %103, i32 %106, i64 %108)
%110 = load i32, i32* %7
%111 = call i64 @WIFEXITED(i32 %110)
%112 = icmp eq i64 %111, 0
br i1 %112, label %116, label %113
113: ; preds = %72
%114 = load i32, i32* %7
%115 = call i32 @WEXITSTATUS(i32 %114)
br label %126
116: ; preds = %72
%117 = load i32, i32* @SIG_SETMASK
%118 = call i32 @sigprocmask(i32 %117, i32* %5, i32* null)
%119 = load i32, i32* %7
%120 = call i32 @WTERMSIG(i32 %119)
%121 = load i32, i32* @SIG_DFL
%122 = call i32 @signal(i32 %120, i32 %121)
%123 = load i32, i32* %7
%124 = call i32 @WTERMSIG(i32 %123)
%125 = call i32 @raise(i32 %124)
br label %126
126: ; preds = %116, %113
%127 = phi i32 [ %115, %113 ], [ 0, %116 ]
br label %128
128: ; preds = %126, %51, %55
%129 = phi i32 [ 0, %51 ], [ 0, %55 ], [ %127, %126 ]
br label %130
130: ; preds = %23, %128, %28, %25
%131 = phi i32 [ %30, %28 ], [ %27, %25 ], [ %129, %128 ], [ 1, %23 ]
ret i32 %131
}