#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int clock();
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, ...);
int /*<<< orphan*/ system(char *);
main(int arg, char **f) {
  if (arg < 3)
    return 0;
  char cmd[99];
  if (arg <= 3)
    sprintf(cmd, "%s < %s", f[1], f[2]);
  else
    sprintf(cmd, "%s < %s >%s", f[1], f[2], f[3]);
  int st = clock();
  system(cmd);
  printf("%d.%03d\n", (st = clock() - st) / 1000, st % 1000);
}


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)
cmpl   $0x3,-0x8(%rbp)
jge    116f <main+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1217 <main+0xd7>
cmpl   $0x3,-0x8(%rbp)
jg     11a0 <main+0x60>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
lea    0xe6c(%rip),%rsi
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    11ca <main+0x8a>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%r8
lea    0xe45(%rip),%rsi
mov    $0x0,%al
call   1060 <sprintf@plt>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x84(%rbp)
lea    -0x80(%rbp),%rdi
call   1040 <system@plt>
mov    $0x0,%al
call   1030 <clock@plt>
sub    -0x84(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x84(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
lea    0xe02(%rip),%rdi
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x3,%edi
jl     11cb <main+0x8b>
push   %rbx
lea    -0x70(%rsp),%rsp
mov    0x8(%rsi),%rdx
mov    0x10(%rsi),%rcx
jne    116c <main+0x2c>
lea    0xea0(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1060 <sprintf@plt>
jmp    1181 <main+0x41>
mov    0x18(%rsi),%r8
lea    0xe91(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1060 <sprintf@plt>
xor    %eax,%eax
call   1030 <clock@plt>
mov    %eax,%ebx
mov    %rsp,%rdi
call   1040 <system@plt>
xor    %eax,%eax
call   1030 <clock@plt>
sub    %ebx,%eax
movslq %eax,%rdx
imul   $0x10624dd3,%rdx,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x26,%rsi
add    %eax,%esi
imul   $0x3e8,%esi,%eax
sub    %eax,%edx
lea    0xe53(%rip),%rdi
call   1050 <printf@plt>
add    $0x70,%rsp
pop    %rbx
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%s < %s\00"
@.str.1 = [12 x i8] c"%s < %s >%s\00"
@.str.2 = [9 x i8] c"%d.%03d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [99 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %46
11: ; preds = %2
%12 = load i32, i32* %4
%13 = icmp sle i32 %12, 3
br i1 %13, label %14, label %23
14: ; preds = %11
%15 = getelementptr inbounds [99 x i8], [99 x i8]* %6, i64 0, i64 0
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %18, i8* %21)
br label %35
23: ; preds = %11
%24 = getelementptr inbounds [99 x i8], [99 x i8]* %6, i64 0, i64 0
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 2
%30 = load i8*, i8** %29
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 3
%33 = load i8*, i8** %32
%34 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %24, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %27, i8* %30, i8* %33)
br label %35
35: ; preds = %23, %14
%36 = call i32 (...) @clock()
store i32 %36, i32* %7
%37 = getelementptr inbounds [99 x i8], [99 x i8]* %6, i64 0, i64 0
%38 = call i32 @system(i8* %37)
%39 = call i32 (...) @clock()
%40 = load i32, i32* %7
%41 = sub nsw i32 %39, %40
store i32 %41, i32* %7
%42 = sdiv i32 %41, 1000
%43 = load i32, i32* %7
%44 = srem i32 %43, 1000
%45 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %42, i32 %44)
br label %46
46: ; preds = %35, %10
%47 = load i32, i32* %3
ret i32 %47
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s < %s\00"
@.str.1 = [12 x i8] c"%s < %s >%s\00"
@.str.2 = [9 x i8] c"%d.%03d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [99 x i8]
%4 = icmp slt i32 %0, 3
br i1 %4, label %26, label %5
5: ; preds = %2
%6 = getelementptr inbounds [99 x i8], [99 x i8]* %3, i64 0, i64 0
%7 = icmp eq i32 %0, 3
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
br i1 %7, label %12, label %14
12: ; preds = %5
%13 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %11)
br label %18
14: ; preds = %5
%15 = getelementptr inbounds i8*, i8** %1, i64 3
%16 = load i8*, i8** %15
%17 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %9, i8* %11, i8* %16)
br label %18
18: ; preds = %14, %12
%19 = tail call i32 (...) @clock()
%20 = call i32 @system(i8* %6)
%21 = tail call i32 (...) @clock()
%22 = sub nsw i32 %21, %19
%23 = sdiv i32 %22, 1000
%24 = srem i32 %22, 1000
%25 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %23, i32 %24)
br label %26
26: ; preds = %2, %18
ret i32 0
}