#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 tms {
  scalar_t__ tms_stime;
  scalar_t__ tms_utime;
};
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ _SC_CLK_TCK;
int atoi(char *);
unsigned int atol(char *);
int /*<<< orphan*/ close(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
int /*<<< orphan*/ open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, float, float, float);
int /*<<< orphan*/ strncmp(char *, char *, int);
long sysconf(int /*<<< orphan*/);
int /*<<< orphan*/ times(struct tms *);
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  char *file = "/bin/ls";
  unsigned int loops = 1000000;
  char *arg;
  unsigned int pos = 1;
  struct tms times1, times2;
  struct timeval tv1, tv2;
  long cps;
  int forks = 1;
  int children = 0;
  pid_t child;
  struct timespec ts;
  cps = sysconf(_SC_CLK_TCK);
  for (; argc > 1; pos++, argc--) {
    arg = argv[pos];
    if (!strncmp(arg, "-f", 2)) {
      arg += 2;
      file = arg;
    } else if (!strncmp(arg, "-l", 2)) {
      arg += 2;
      loops = atol(arg);
    } else if (!strncmp(arg, "-o", 2)) {
      arg += 2;
      forks = atoi(arg);
    }
  }
  ts.tv_sec = 0;
  ts.tv_nsec = 200000000;
  while (forks--) {
    child = fork();
    if (child == 0) {
      nanosleep(&ts, NULL);
      gettimeofday(&tv1, NULL);
      times(&times1);
      while (loops--) {
        close(open(file, O_RDONLY));
      }
      times(&times2);
      gettimeofday(&tv2, NULL);
      times2.tms_utime -= times1.tms_utime;
      times2.tms_stime -= times1.tms_stime;
      tv2.tv_sec -= tv1.tv_sec;
      tv2.tv_usec -= tv1.tv_usec;
      printf("%.3f-[%.3f/%.3f]\n",
             (float)tv2.tv_sec + (float)tv2.tv_usec / 1000000.0,
             (float)times2.tms_utime / (float)cps,
             (float)times2.tms_stime / (float)cps);
      return 0;
    } else if (child > 0) {
      children++;
    }
  }
  while (children--) {
    wait(NULL);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe28(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0xf4240,-0x1c(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x1,-0x7c(%rbp)
movl   $0x0,-0x80(%rbp)
mov    0x2dd1(%rip),%rax
mov    (%rax),%edi
call   10b0 <sysconf@plt>
mov    %rax,-0x78(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    12f9 <main+0x139>
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xdda(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1262 <main+0xa2>
mov    -0x28(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    12dd <main+0x11d>
mov    -0x28(%rbp),%rdi
lea    0xda6(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    129d <main+0xdd>
mov    -0x28(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1080 <atol@plt>
mov    %eax,-0x1c(%rbp)
jmp    12d8 <main+0x118>
mov    -0x28(%rbp),%rdi
lea    0xd6e(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12d3 <main+0x113>
mov    -0x28(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x7c(%rbp)
jmp    12d8 <main+0x118>
jmp    12dd <main+0x11d>
jmp    12e2 <main+0x122>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1212 <main+0x52>
movq   $0x0,-0x90(%rbp)
movl   $0xbebc200,-0x98(%rbp)
c2 eb 0b
mov    -0x7c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x7c(%rbp)
cmp    $0x0,%eax
je     1469 <main+0x2a9>
mov    $0x0,%al
call   10e0 <fork@plt>
mov    %rax,-0x88(%rbp)
cmpq   $0x0,-0x88(%rbp)
jne    1448 <main+0x288>
lea    -0x98(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <nanosleep@plt>
lea    -0x60(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <gettimeofday@plt>
lea    -0x40(%rbp),%rdi
call   10a0 <times@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x0,%eax
je     1396 <main+0x1d6>
mov    -0x18(%rbp),%rdi
mov    0x2c65(%rip),%rax
mov    (%rax),%esi
call   1090 <open@plt>
mov    %eax,%edi
call   1070 <close@plt>
jmp    1364 <main+0x1a4>
lea    -0x50(%rbp),%rdi
call   10a0 <times@plt>
lea    -0x70(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <gettimeofday@plt>
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rcx
mov    -0x50(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x58(%rbp),%rcx
mov    -0x68(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x60(%rbp),%rcx
mov    -0x70(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x70(%rbp)
cvtsi2ssq -0x68(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
cvtsi2ssq -0x70(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xbfc(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtsi2ssq -0x48(%rbp),%xmm1
cvtsi2ssq -0x78(%rbp),%xmm2
divss  %xmm2,%xmm1
cvtsi2ssq -0x50(%rbp),%xmm2
cvtsi2ssq -0x78(%rbp),%xmm3
divss  %xmm3,%xmm2
lea    0xbe2(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1497 <main+0x2d7>
cmpq   $0x0,-0x88(%rbp)
jle    145f <main+0x29f>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1464 <main+0x2a4>
jmp    130e <main+0x14e>
jmp    146e <main+0x2ae>
mov    -0x80(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x80(%rbp)
cmp    $0x0,%eax
je     1490 <main+0x2d0>
xor    %eax,%eax
mov    %eax,%edi
call   10d0 <wait@plt>
jmp    146e <main+0x2ae>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
mov    0x2dfe(%rip),%rax
mov    (%rax),%edi
call   10b0 <sysconf@plt>
mov    %rax,%r14
cmp    $0x1,%ebx
jle    12b4 <main+0xf4>
mov    %r14,0x20(%rsp)
mov    %ebx,%r13d
lea    0xe0c(%rip),%rax
mov    %rax,0x8(%rsp)
mov    $0xf4240,%r12d
mov    $0x1,%ebx
mov    $0x1,%r14d
jmp    1236 <main+0x76>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x2,%r15
mov    %r15,0x8(%rsp)
add    $0x1,%r14
cmp    %r14,%r13
je     12d9 <main+0x119>
mov    0x0(%rbp,%r14,8),%r15
mov    %r15,%rdi
lea    0xdcb(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1220 <main+0x60>
mov    %r15,%rdi
lea    0xdb6(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     12a0 <main+0xe0>
mov    %r15,%rdi
lea    0xda1(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    1229 <main+0x69>
add    $0x2,%r15
mov    %r15,%rdi
call   10c0 <atoi@plt>
mov    %eax,%ebx
jmp    1229 <main+0x69>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x2,%r15
mov    %r15,%rdi
call   1080 <atol@plt>
mov    %eax,%r12d
jmp    1229 <main+0x69>
movq   $0x0,0x18(%rsp)
movl   $0xbebc200,0x10(%rsp)
0b
lea    0xd3c(%rip),%r15
mov    $0xf4240,%r12d
mov    $0x1,%ebx
jmp    12fc <main+0x13c>
movq   $0x0,0x18(%rsp)
movl   $0xbebc200,0x10(%rsp)
0b
test   %ebx,%ebx
mov    0x20(%rsp),%r14
mov    0x8(%rsp),%r15
je     141a <main+0x25a>
xor    %ebp,%ebp
xchg   %ax,%ax
add    $0xffffffff,%ebx
xor    %eax,%eax
call   10e0 <fork@plt>
test   %rax,%rax
je     1341 <main+0x181>
setg   %al
movzbl %al,%eax
add    %eax,%ebp
test   %ebx,%ebx
jne    1300 <main+0x140>
test   %ebp,%ebp
je     141a <main+0x25a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %edi,%edi
call   10d0 <wait@plt>
add    $0xffffffff,%ebp
jne    1330 <main+0x170>
jmp    141a <main+0x25a>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <nanosleep@plt>
lea    0x48(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
lea    0x58(%rsp),%rdi
call   10a0 <times@plt>
test   %r12d,%r12d
je     1387 <main+0x1c7>
mov    0x2c79(%rip),%rbx
nop
mov    (%rbx),%esi
mov    %r15,%rdi
call   1090 <open@plt>
mov    %eax,%edi
call   1070 <close@plt>
add    $0xffffffff,%r12d
jne    1370 <main+0x1b0>
lea    0x38(%rsp),%rdi
call   10a0 <times@plt>
lea    0x28(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
mov    0x38(%rsp),%rax
mov    0x40(%rsp),%rcx
sub    0x60(%rsp),%rcx
sub    0x58(%rsp),%rax
mov    0x28(%rsp),%rdx
mov    0x30(%rsp),%rsi
sub    0x50(%rsp),%rsi
sub    0x48(%rsp),%rdx
cvtsi2ss %rsi,%xmm0
cvtsi2ss %rdx,%xmm1
mov    %rcx,0x40(%rsp)
cvtss2sd %xmm1,%xmm1
divsd  0xc20(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
mov    %rsi,0x30(%rsp)
xorps  %xmm1,%xmm1
cvtsi2ss %rcx,%xmm1
cvtsi2ss %r14,%xmm3
divss  %xmm3,%xmm1
cvtsi2ss %rax,%xmm2
divss  %xmm3,%xmm2
lea    0xc04(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tms = type { i64, i64 }
%struct.timeval = type { i64, i64 }
%struct.timespec = type { i32, i64 }
@.str = [8 x i8] c"/bin/ls\00"
@_SC_CLK_TCK = global i32 0
@.str.1 = [3 x i8] c"-f\00"
@.str.2 = [3 x i8] c"-l\00"
@.str.3 = [3 x i8] c"-o\00"
@O_RDONLY = global i32 0
@.str.4 = [18 x i8] c"%.3f-[%.3f/%.3f]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca %struct.tms
%11 = alloca %struct.tms
%12 = alloca %struct.timeval
%13 = alloca %struct.timeval
%14 = alloca i64
%15 = alloca i32
%16 = alloca i32
%17 = alloca i64
%18 = alloca %struct.timespec
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %6
store i32 1000000, i32* %7
store i32 1, i32* %9
store i32 1, i32* %15
store i32 0, i32* %16
%19 = load i32, i32* @_SC_CLK_TCK
%20 = call i64 @sysconf(i32 %19)
store i64 %20, i64* %14
br label %21
21: ; preds = %58, %2
%22 = load i32, i32* %4
%23 = icmp sgt i32 %22, 1
br i1 %23, label %24, label %63
24: ; preds = %21
%25 = load i8**, i8*** %5
%26 = load i32, i32* %9
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds i8*, i8** %25, i64 %27
%29 = load i8*, i8** %28
store i8* %29, i8** %8
%30 = load i8*, i8** %8
%31 = call i32 @strncmp(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%32 = icmp ne i32 %31, 0
br i1 %32, label %37, label %33
33: ; preds = %24
%34 = load i8*, i8** %8
%35 = getelementptr inbounds i8, i8* %34, i64 2
store i8* %35, i8** %8
%36 = load i8*, i8** %8
store i8* %36, i8** %6
br label %57
37: ; preds = %24
%38 = load i8*, i8** %8
%39 = call i32 @strncmp(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%40 = icmp ne i32 %39, 0
br i1 %40, label %46, label %41
41: ; preds = %37
%42 = load i8*, i8** %8
%43 = getelementptr inbounds i8, i8* %42, i64 2
store i8* %43, i8** %8
%44 = load i8*, i8** %8
%45 = call i32 @atol(i8* %44)
store i32 %45, i32* %7
br label %56
46: ; preds = %37
%47 = load i8*, i8** %8
%48 = call i32 @strncmp(i8* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
%49 = icmp ne i32 %48, 0
br i1 %49, label %55, label %50
50: ; preds = %46
%51 = load i8*, i8** %8
%52 = getelementptr inbounds i8, i8* %51, i64 2
store i8* %52, i8** %8
%53 = load i8*, i8** %8
%54 = call i32 @atoi(i8* %53)
store i32 %54, i32* %15
br label %55
55: ; preds = %50, %46
br label %56
56: ; preds = %55, %41
br label %57
57: ; preds = %56, %33
br label %58
58: ; preds = %57
%59 = load i32, i32* %9
%60 = add i32 %59, 1
store i32 %60, i32* %9
%61 = load i32, i32* %4
%62 = add nsw i32 %61, -1
store i32 %62, i32* %4
br label %21
63: ; preds = %21
%64 = getelementptr inbounds %struct.timespec, %struct.timespec* %18, i32 0, i32 1
store i64 0, i64* %64
%65 = getelementptr inbounds %struct.timespec, %struct.timespec* %18, i32 0, i32 0
store i32 200000000, i32* %65
br label %66
66: ; preds = %141, %63
%67 = load i32, i32* %15
%68 = add nsw i32 %67, -1
store i32 %68, i32* %15
%69 = icmp ne i32 %67, 0
br i1 %69, label %70, label %142
70: ; preds = %66
%71 = call i64 (...) @fork()
store i64 %71, i64* %17
%72 = load i64, i64* %17
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %134
74: ; preds = %70
%75 = call i32 @nanosleep(%struct.timespec* %18, i32* null)
%76 = call i32 @gettimeofday(%struct.timeval* %12, i32* null)
%77 = call i32 @times(%struct.tms* %10)
br label %78
78: ; preds = %82, %74
%79 = load i32, i32* %7
%80 = add i32 %79, -1
store i32 %80, i32* %7
%81 = icmp ne i32 %79, 0
br i1 %81, label %82, label %87
82: ; preds = %78
%83 = load i8*, i8** %6
%84 = load i32, i32* @O_RDONLY
%85 = call i32 @open(i8* %83, i32 %84)
%86 = call i32 @close(i32 %85)
br label %78
87: ; preds = %78
%88 = call i32 @times(%struct.tms* %11)
%89 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%90 = getelementptr inbounds %struct.tms, %struct.tms* %10, i32 0, i32 1
%91 = load i64, i64* %90
%92 = getelementptr inbounds %struct.tms, %struct.tms* %11, i32 0, i32 1
%93 = load i64, i64* %92
%94 = sub nsw i64 %93, %91
store i64 %94, i64* %92
%95 = getelementptr inbounds %struct.tms, %struct.tms* %10, i32 0, i32 0
%96 = load i64, i64* %95
%97 = getelementptr inbounds %struct.tms, %struct.tms* %11, i32 0, i32 0
%98 = load i64, i64* %97
%99 = sub nsw i64 %98, %96
store i64 %99, i64* %97
%100 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 1
%101 = load i64, i64* %100
%102 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 1
%103 = load i64, i64* %102
%104 = sub nsw i64 %103, %101
store i64 %104, i64* %102
%105 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 0
%106 = load i64, i64* %105
%107 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 0
%108 = load i64, i64* %107
%109 = sub nsw i64 %108, %106
store i64 %109, i64* %107
%110 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 1
%111 = load i64, i64* %110
%112 = sitofp i64 %111 to float
%113 = fpext float %112 to double
%114 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 0
%115 = load i64, i64* %114
%116 = sitofp i64 %115 to float
%117 = fpext float %116 to double
%118 = fdiv double %117, 1.000000e+06
%119 = fadd double %113, %118
%120 = fptrunc double %119 to float
%121 = getelementptr inbounds %struct.tms, %struct.tms* %11, i32 0, i32 1
%122 = load i64, i64* %121
%123 = sitofp i64 %122 to float
%124 = load i64, i64* %14
%125 = sitofp i64 %124 to float
%126 = fdiv float %123, %125
%127 = getelementptr inbounds %struct.tms, %struct.tms* %11, i32 0, i32 0
%128 = load i64, i64* %127
%129 = sitofp i64 %128 to float
%130 = load i64, i64* %14
%131 = sitofp i64 %130 to float
%132 = fdiv float %129, %131
%133 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), float %120, float %126, float %132)
store i32 0, i32* %3
br label %150
134: ; preds = %70
%135 = load i64, i64* %17
%136 = icmp sgt i64 %135, 0
br i1 %136, label %137, label %140
137: ; preds = %134
%138 = load i32, i32* %16
%139 = add nsw i32 %138, 1
store i32 %139, i32* %16
br label %140
140: ; preds = %137, %134
br label %141
141: ; preds = %140
br label %66
142: ; preds = %66
br label %143
143: ; preds = %147, %142
%144 = load i32, i32* %16
%145 = add nsw i32 %144, -1
store i32 %145, i32* %16
%146 = icmp ne i32 %144, 0
br i1 %146, label %147, label %149
147: ; preds = %143
%148 = call i32 @wait(i32* null)
br label %143
149: ; preds = %143
store i32 0, i32* %3
br label %150
150: ; preds = %149, %87
%151 = load i32, i32* %3
ret i32 %151
}

LLVM IR (-O2):
%struct.tms = type { i64, i64 }
%struct.timeval = type { i64, i64 }
%struct.timespec = type { i32, i64 }
@.str = [8 x i8] c"/bin/ls\00"
@_SC_CLK_TCK = global i32 0
@.str.1 = [3 x i8] c"-f\00"
@.str.2 = [3 x i8] c"-l\00"
@.str.3 = [3 x i8] c"-o\00"
@O_RDONLY = global i32 0
@.str.4 = [18 x i8] c"%.3f-[%.3f/%.3f]\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.tms
%4 = alloca %struct.tms
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = alloca %struct.timespec
%8 = bitcast %struct.tms* %3 to i8*
%9 = bitcast %struct.tms* %4 to i8*
%10 = bitcast %struct.timeval* %5 to i8*
%11 = bitcast %struct.timeval* %6 to i8*
%12 = bitcast %struct.timespec* %7 to i8*
%13 = load i32, i32* @_SC_CLK_TCK
%14 = tail call i64 @sysconf(i32 %13)
%15 = icmp sgt i32 %0, 1
br i1 %15, label %19, label %16
16: ; preds = %2
%17 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i64 0, i32 1
store i64 0, i64* %17
%18 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i64 0, i32 0
store i32 200000000, i32* %18
br label %54
19: ; preds = %2
%20 = zext i32 %0 to i64
br label %21
21: ; preds = %19, %44
%22 = phi i64 [ 1, %19 ], [ %48, %44 ]
%23 = phi i32 [ 1, %19 ], [ %47, %44 ]
%24 = phi i32 [ 1000000, %19 ], [ %46, %44 ]
%25 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %19 ], [ %45, %44 ]
%26 = getelementptr inbounds i8*, i8** %1, i64 %22
%27 = load i8*, i8** %26
%28 = tail call i32 @strncmp(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %21
%31 = getelementptr inbounds i8, i8* %27, i64 2
br label %44
32: ; preds = %21
%33 = tail call i32 @strncmp(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = getelementptr inbounds i8, i8* %27, i64 2
%37 = tail call i32 @atol(i8* %36)
br label %44
38: ; preds = %32
%39 = tail call i32 @strncmp(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = getelementptr inbounds i8, i8* %27, i64 2
%43 = tail call i32 @atoi(i8* %42)
br label %44
44: ; preds = %30, %38, %41, %35
%45 = phi i8* [ %25, %38 ], [ %25, %41 ], [ %25, %35 ], [ %31, %30 ]
%46 = phi i32 [ %24, %38 ], [ %24, %41 ], [ %37, %35 ], [ %24, %30 ]
%47 = phi i32 [ %23, %38 ], [ %43, %41 ], [ %23, %35 ], [ %23, %30 ]
%48 = add nuw nsw i64 %22, 1
%49 = icmp eq i64 %48, %20
br i1 %49, label %50, label %21
50: ; preds = %44
%51 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i64 0, i32 1
store i64 0, i64* %51
%52 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i64 0, i32 0
store i32 200000000, i32* %52
%53 = icmp eq i32 %47, 0
br i1 %53, label %124, label %54
54: ; preds = %16, %50
%55 = phi i32 [ 1, %16 ], [ %47, %50 ]
%56 = phi i32 [ 1000000, %16 ], [ %46, %50 ]
%57 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %16 ], [ %45, %50 ]
br label %60
58: ; preds = %114
%59 = icmp eq i32 %117, 0
br i1 %59, label %124, label %119
60: ; preds = %54, %114
%61 = phi i32 [ %63, %114 ], [ %55, %54 ]
%62 = phi i32 [ %117, %114 ], [ 0, %54 ]
%63 = add nsw i32 %61, -1
%64 = tail call i64 (...) @fork()
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %114
66: ; preds = %60
%67 = call i32 @nanosleep(%struct.timespec* %7, i32* null)
%68 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%69 = call i32 @times(%struct.tms* %3)
%70 = icmp eq i32 %56, 0
br i1 %70, label %78, label %71
71: ; preds = %66, %71
%72 = phi i32 [ %73, %71 ], [ %56, %66 ]
%73 = add i32 %72, -1
%74 = load i32, i32* @O_RDONLY
%75 = call i32 @open(i8* %57, i32 %74)
%76 = call i32 @close(i32 %75)
%77 = icmp eq i32 %73, 0
br i1 %77, label %78, label %71
78: ; preds = %71, %66
%79 = call i32 @times(%struct.tms* %4)
%80 = call i32 @gettimeofday(%struct.timeval* %6, i32* null)
%81 = getelementptr inbounds %struct.tms, %struct.tms* %3, i64 0, i32 1
%82 = load i64, i64* %81
%83 = getelementptr inbounds %struct.tms, %struct.tms* %4, i64 0, i32 1
%84 = load i64, i64* %83
%85 = sub nsw i64 %84, %82
store i64 %85, i64* %83
%86 = getelementptr inbounds %struct.tms, %struct.tms* %3, i64 0, i32 0
%87 = load i64, i64* %86
%88 = getelementptr inbounds %struct.tms, %struct.tms* %4, i64 0, i32 0
%89 = load i64, i64* %88
%90 = sub nsw i64 %89, %87
%91 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%92 = load i64, i64* %91
%93 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i64 0, i32 1
%94 = load i64, i64* %93
%95 = sub nsw i64 %94, %92
store i64 %95, i64* %93
%96 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%97 = load i64, i64* %96
%98 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i64 0, i32 0
%99 = load i64, i64* %98
%100 = sub nsw i64 %99, %97
%101 = sitofp i64 %95 to float
%102 = fpext float %101 to double
%103 = sitofp i64 %100 to float
%104 = fpext float %103 to double
%105 = fdiv double %104, 1.000000e+06
%106 = fadd double %105, %102
%107 = fptrunc double %106 to float
%108 = sitofp i64 %85 to float
%109 = sitofp i64 %14 to float
%110 = fdiv float %108, %109
%111 = sitofp i64 %90 to float
%112 = fdiv float %111, %109
%113 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), float %107, float %110, float %112)
br label %124
114: ; preds = %60
%115 = icmp sgt i64 %64, 0
%116 = zext i1 %115 to i32
%117 = add nuw nsw i32 %62, %116
%118 = icmp eq i32 %63, 0
br i1 %118, label %58, label %60
119: ; preds = %58, %119
%120 = phi i32 [ %121, %119 ], [ %117, %58 ]
%121 = add nsw i32 %120, -1
%122 = tail call i32 @wait(i32* null)
%123 = icmp eq i32 %121, 0
br i1 %123, label %124, label %119
124: ; preds = %119, %50, %58, %78
ret i32 0
}