#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 */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ load();
int /*<<< orphan*/ printf(char *, scalar_t__);
int /*<<< orphan*/ smooth5();
int /*<<< orphan*/ store();
scalar_t__ tick();
int main(int argc, char *argv[]) {
  do {
    uint64_t t0 = tick();
    load();
    printf("load"
           ": %ld\n",
           tick() - t0);
  } while (0);
  do {
    uint64_t t0 = tick();
    smooth5();
    printf("smooth5"
           ": %ld\n",
           tick() - t0);
  } while (0);
  do {
    uint64_t t0 = tick();
    store();
    printf("store"
           ": %ld\n",
           tick() - t0);
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <tick@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1070 <load@plt>
mov    $0x0,%al
call   1030 <tick@plt>
mov    %rax,%rsi
sub    -0x18(%rbp),%rsi
lea    0xe73(%rip),%rdi
call   1050 <printf@plt>
jmp    1197 <main+0x47>
mov    $0x0,%al
call   1030 <tick@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1060 <smooth5@plt>
mov    $0x0,%al
call   1030 <tick@plt>
mov    %rax,%rsi
sub    -0x20(%rbp),%rsi
lea    0xe4d(%rip),%rdi
call   1050 <printf@plt>
jmp    11c8 <main+0x78>
mov    $0x0,%al
call   1030 <tick@plt>
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1040 <store@plt>
mov    $0x0,%al
call   1030 <tick@plt>
mov    %rax,%rsi
sub    -0x28(%rbp),%rsi
lea    0xe2a(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <tick@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1070 <load@plt>
xor    %eax,%eax
call   1030 <tick@plt>
sub    %rbx,%rax
lea    0xe8d(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <tick@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <smooth5@plt>
xor    %eax,%eax
call   1030 <tick@plt>
sub    %rbx,%rax
lea    0xe6e(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <tick@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <store@plt>
xor    %eax,%eax
call   1030 <tick@plt>
sub    %rbx,%rax
lea    0xe52(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"load: %ld\0A\00"
@.str.1 = [14 x i8] c"smooth5: %ld\0A\00"
@.str.2 = [12 x i8] c"store: %ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %9
9: ; preds = %2
%10 = call i64 (...) @tick()
store i64 %10, i64* %6
%11 = call i32 (...) @load()
%12 = call i64 (...) @tick()
%13 = load i64, i64* %6
%14 = sub nsw i64 %12, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %14)
br label %16
16: ; preds = %9
br label %17
17: ; preds = %16
%18 = call i64 (...) @tick()
store i64 %18, i64* %7
%19 = call i32 (...) @smooth5()
%20 = call i64 (...) @tick()
%21 = load i64, i64* %7
%22 = sub nsw i64 %20, %21
%23 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i64 %22)
br label %24
24: ; preds = %17
br label %25
25: ; preds = %24
%26 = call i64 (...) @tick()
store i64 %26, i64* %8
%27 = call i32 (...) @store()
%28 = call i64 (...) @tick()
%29 = load i64, i64* %8
%30 = sub nsw i64 %28, %29
%31 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i64 %30)
br label %32
32: ; preds = %25
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"load: %ld\0A\00"
@.str.1 = [14 x i8] c"smooth5: %ld\0A\00"
@.str.2 = [12 x i8] c"store: %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @tick()
%4 = tail call i32 (...) @load()
%5 = tail call i64 (...) @tick()
%6 = sub nsw i64 %5, %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = tail call i64 (...) @tick()
%9 = tail call i32 (...) @smooth5()
%10 = tail call i64 (...) @tick()
%11 = sub nsw i64 %10, %8
%12 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i64 %11)
%13 = tail call i64 (...) @tick()
%14 = tail call i32 (...) @store()
%15 = tail call i64 (...) @tick()
%16 = sub nsw i64 %15, %13
%17 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i64 %16)
ret i32 0
}