#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_cstime;
  scalar_t__ tms_cutime;
  scalar_t__ tms_stime;
  scalar_t__ tms_utime;
};
typedef scalar_t__ clock_t;

/* Variables and functions */
int /*<<< orphan*/ _SC_CLK_TCK;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
double sysconf(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
scalar_t__ times(struct tms *);
int main(int argc, char *argv[]) {
  struct tms startT, endT;
  clock_t StartTime, EndTime;
  double Zeit, ticks, usr, sys, cusr, csys;
  ticks = sysconf(_SC_CLK_TCK);
  if (argc > 1) {
    StartTime = times(&startT);
    system(argv[1]);
    EndTime = times(&endT);
  } else {
    printf("Missing argument\n");
    exit(0);
  }
  Zeit = (double)(EndTime - StartTime) / ticks;
  usr = (double)(endT.tms_utime - startT.tms_utime) / ticks;
  sys = (double)(endT.tms_stime - startT.tms_stime) / ticks;
  cusr = (double)(endT.tms_cutime - startT.tms_cutime) / ticks;
  csys = (double)(endT.tms_cstime - startT.tms_cstime) / ticks;
  printf("\n\n");
  printf("Befehl:\t\t\t\t%s\n", argv[1]);
  printf("Uhrzeit:\t\t\t%4.3f\n", Zeit);
  printf("User CPU-time:\t\t\t%4.3f\n", usr);
  printf("System CPU-time:\t\t%4.3f\n", sys);
  printf("Children user CPU-time:\t\t%4.3f\n", cusr);
  printf("Children system CPU-time:\t%4.3f\n", csys);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    11b2 <main+0x62>
lea    -0x30(%rbp),%rdi
call   1050 <times@plt>
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <system@plt>
lea    -0x50(%rbp),%rdi
call   1050 <times@plt>
mov    %rax,-0x60(%rbp)
jmp    11c7 <main+0x77>
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>
mov    -0x60(%rbp),%rax
sub    -0x58(%rbp),%rax
cvtsi2sd %rax,%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x38(%rbp),%rax
sub    -0x18(%rbp),%rax
cvtsi2sd %rax,%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x40(%rbp),%rax
sub    -0x20(%rbp),%rax
cvtsi2sd %rax,%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x48(%rbp),%rax
sub    -0x28(%rbp),%rax
cvtsi2sd %rax,%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x50(%rbp),%rax
sub    -0x30(%rbp),%rax
cvtsi2sd %rax,%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
lea    0xdcb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xdb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x68(%rbp),%xmm0
lea    0xdb4(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x78(%rbp),%xmm0
lea    0xdb3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x80(%rbp),%xmm0
lea    0xdb8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x88(%rbp),%xmm0
ff
lea    0xdbb(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x90(%rbp),%xmm0
ff
lea    0xdc5(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1070 <sysconf@plt>
cmp    $0x2,%ebp
jl     12b5 <main+0x155>
lea    0x48(%rsp),%rdi
movsd  %xmm0,(%rsp)
call   1060 <times@plt>
mov    %rax,%rbp
mov    0x8(%rbx),%rdi
call   1040 <system@plt>
lea    0x28(%rsp),%rdi
call   1060 <times@plt>
sub    %rbp,%rax
cvtsi2sd %rax,%xmm1
mov    0x40(%rsp),%rax
sub    0x60(%rsp),%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm2
divsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rsp)
mov    0x38(%rsp),%rax
sub    0x58(%rsp),%rax
divsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    0x28(%rsp),%rax
mov    0x30(%rsp),%rcx
sub    0x50(%rsp),%rcx
xorps  %xmm0,%xmm0
cvtsi2sd %rcx,%xmm0
sub    0x48(%rsp),%rax
divsd  %xmm2,%xmm0
movsd  %xmm0,0x18(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,(%rsp)
lea    0xe03(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rbx),%rsi
lea    0xdbc(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdbd(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xdbb(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xdbf(%rip),%rdi
movsd  0x20(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xdc4(%rip),%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xdd0(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   1080 <exit@plt>
lea    0xdd7(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
%struct.tms = type { i64, i64, i64, i64 }
@_SC_CLK_TCK = global i32 0
@.str = [18 x i8] c"Missing argument\0A\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
@.str.2 = [15 x i8] c"Befehl:\09\09\09\09%s\0A\00"
@.str.3 = [18 x i8] c"Uhrzeit:\09\09\09%4.3f\0A\00"
@.str.4 = [24 x i8] c"User CPU-time:\09\09\09%4.3f\0A\00"
@.str.5 = [25 x i8] c"System CPU-time:\09\09%4.3f\0A\00"
@.str.6 = [32 x i8] c"Children user CPU-time:\09\09%4.3f\0A\00"
@.str.7 = [33 x i8] c"Children system CPU-time:\09%4.3f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.tms
%7 = alloca %struct.tms
%8 = alloca i64
%9 = alloca i64
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* @_SC_CLK_TCK
%17 = call double @sysconf(i32 %16)
store double %17, double* %11
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 1
br i1 %19, label %20, label %27
20: ; preds = %2
%21 = call i64 @times(%struct.tms* %6)
store i64 %21, i64* %8
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32 @system(i8* %24)
%26 = call i64 @times(%struct.tms* %7)
store i64 %26, i64* %9
br label %30
27: ; preds = %2
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%29 = call i32 @exit(i32 0)
unreachable
30: ; preds = %20
%31 = load i64, i64* %9
%32 = load i64, i64* %8
%33 = sub nsw i64 %31, %32
%34 = sitofp i64 %33 to double
%35 = load double, double* %11
%36 = fdiv double %34, %35
store double %36, double* %10
%37 = getelementptr inbounds %struct.tms, %struct.tms* %7, i32 0, i32 3
%38 = load i64, i64* %37
%39 = getelementptr inbounds %struct.tms, %struct.tms* %6, i32 0, i32 3
%40 = load i64, i64* %39
%41 = sub nsw i64 %38, %40
%42 = sitofp i64 %41 to double
%43 = load double, double* %11
%44 = fdiv double %42, %43
store double %44, double* %12
%45 = getelementptr inbounds %struct.tms, %struct.tms* %7, i32 0, i32 2
%46 = load i64, i64* %45
%47 = getelementptr inbounds %struct.tms, %struct.tms* %6, i32 0, i32 2
%48 = load i64, i64* %47
%49 = sub nsw i64 %46, %48
%50 = sitofp i64 %49 to double
%51 = load double, double* %11
%52 = fdiv double %50, %51
store double %52, double* %13
%53 = getelementptr inbounds %struct.tms, %struct.tms* %7, i32 0, i32 1
%54 = load i64, i64* %53
%55 = getelementptr inbounds %struct.tms, %struct.tms* %6, i32 0, i32 1
%56 = load i64, i64* %55
%57 = sub nsw i64 %54, %56
%58 = sitofp i64 %57 to double
%59 = load double, double* %11
%60 = fdiv double %58, %59
store double %60, double* %14
%61 = getelementptr inbounds %struct.tms, %struct.tms* %7, i32 0, i32 0
%62 = load i64, i64* %61
%63 = getelementptr inbounds %struct.tms, %struct.tms* %6, i32 0, i32 0
%64 = load i64, i64* %63
%65 = sub nsw i64 %62, %64
%66 = sitofp i64 %65 to double
%67 = load double, double* %11
%68 = fdiv double %66, %67
store double %68, double* %15
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%70 = load i8**, i8*** %5
%71 = getelementptr inbounds i8*, i8** %70, i64 1
%72 = load i8*, i8** %71
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* %72)
%74 = load double, double* %10
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double %74)
%76 = load double, double* %12
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), double %76)
%78 = load double, double* %13
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), double %78)
%80 = load double, double* %14
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), double %80)
%82 = load double, double* %15
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), double %82)
%84 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.tms = type { i64, i64, i64, i64 }
@_SC_CLK_TCK = global i32 0
@.str.2 = [15 x i8] c"Befehl:\09\09\09\09%s\0A\00"
@.str.3 = [18 x i8] c"Uhrzeit:\09\09\09%4.3f\0A\00"
@.str.4 = [24 x i8] c"User CPU-time:\09\09\09%4.3f\0A\00"
@.str.5 = [25 x i8] c"System CPU-time:\09\09%4.3f\0A\00"
@.str.6 = [32 x i8] c"Children user CPU-time:\09\09%4.3f\0A\00"
@.str.7 = [33 x i8] c"Children system CPU-time:\09%4.3f\0A\00"
@str = [17 x i8] c"Missing argument\00"
@str.8 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.tms
%4 = alloca %struct.tms
%5 = bitcast %struct.tms* %3 to i8*
%6 = bitcast %struct.tms* %4 to i8*
%7 = load i32, i32* @_SC_CLK_TCK
%8 = tail call double @sysconf(i32 %7)
%9 = icmp sgt i32 %0, 1
br i1 %9, label %10, label %56
10: ; preds = %2
%11 = call i64 @times(%struct.tms* %3)
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = tail call i32 @system(i8* %13)
%15 = call i64 @times(%struct.tms* %4)
%16 = sub nsw i64 %15, %11
%17 = sitofp i64 %16 to double
%18 = fdiv double %17, %8
%19 = getelementptr inbounds %struct.tms, %struct.tms* %4, i64 0, i32 3
%20 = load i64, i64* %19
%21 = getelementptr inbounds %struct.tms, %struct.tms* %3, i64 0, i32 3
%22 = load i64, i64* %21
%23 = sub nsw i64 %20, %22
%24 = sitofp i64 %23 to double
%25 = fdiv double %24, %8
%26 = getelementptr inbounds %struct.tms, %struct.tms* %4, i64 0, i32 2
%27 = load i64, i64* %26
%28 = getelementptr inbounds %struct.tms, %struct.tms* %3, i64 0, i32 2
%29 = load i64, i64* %28
%30 = sub nsw i64 %27, %29
%31 = sitofp i64 %30 to double
%32 = fdiv double %31, %8
%33 = getelementptr inbounds %struct.tms, %struct.tms* %4, i64 0, i32 1
%34 = load i64, i64* %33
%35 = getelementptr inbounds %struct.tms, %struct.tms* %3, i64 0, i32 1
%36 = load i64, i64* %35
%37 = sub nsw i64 %34, %36
%38 = sitofp i64 %37 to double
%39 = fdiv double %38, %8
%40 = getelementptr inbounds %struct.tms, %struct.tms* %4, i64 0, i32 0
%41 = load i64, i64* %40
%42 = getelementptr inbounds %struct.tms, %struct.tms* %3, i64 0, i32 0
%43 = load i64, i64* %42
%44 = sub nsw i64 %41, %43
%45 = sitofp i64 %44 to double
%46 = fdiv double %45, %8
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0))
%48 = load i8*, i8** %12
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* %48)
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double %18)
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), double %25)
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), double %32)
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), double %39)
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), double %46)
%55 = tail call i32 @exit(i32 0)
unreachable
56: ; preds = %2
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%58 = tail call i32 @exit(i32 0)
unreachable
}