#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 */
scalar_t__ EOF;
scalar_t__ fputc(char, int /*<<< orphan*/);
size_t fwrite(char *, int, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ io_error(int /*<<< orphan*/);
double monotonic_seconds();
size_t snprintf(char *, int, char *, double);
int /*<<< orphan*/ stdout;
void print_time() {
  enum { buffer_max = 32 };
  char buffer[buffer_max];
  double time = monotonic_seconds();
  size_t len = snprintf(buffer, buffer_max, "%.6f", time);
  if (len != fwrite(buffer, 1, len, stdout)) {
    io_error(stdout);
  }
  if (fputc('\t', stdout) == EOF) {
    io_error(stdout);
  }
}


x86 assembly (clang, -O0):
<print_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x0,%al
call   1050 <monotonic_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
mov    $0x20,%esi
lea    0xe87(%rip),%rdx
call   1030 <snprintf@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    0x2e3f(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1060 <fwrite@plt>
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
cmp    %rcx,%rax
je     11c3 <print_time+0x73>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
call   1070 <io_error@plt>
mov    0x2e0e(%rip),%rax
mov    (%rax),%esi
mov    $0x9,%edi
call   1040 <fputc@plt>
mov    0x2e0b(%rip),%rcx
cmp    (%rcx),%rax
jne    11f4 <print_time+0xa4>
mov    0x2deb(%rip),%rax
mov    (%rax),%edi
call   1070 <io_error@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_time>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
xor    %eax,%eax
call   1050 <monotonic_seconds@plt>
lea    0xe99(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
mov    %rax,%rbx
mov    0x2e57(%rip),%r15
mov    (%r15),%ecx
mov    %r14,%rdi
mov    $0x1,%esi
mov    %rax,%rdx
call   1060 <fwrite@plt>
cmp    %rax,%rbx
je     11a1 <print_time+0x51>
mov    (%r15),%edi
call   1070 <io_error@plt>
mov    (%r15),%esi
mov    $0x9,%edi
call   1040 <fputc@plt>
mov    0x2e33(%rip),%rcx
cmp    (%rcx),%rax
jne    11c2 <print_time+0x72>
mov    (%r15),%edi
call   1070 <io_error@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.6f\00"
@stdout = global i32 0
@EOF = global i64 0
define void @print_time() {
%1 = alloca [32 x i8]
%2 = alloca double
%3 = alloca i64
%4 = call double (...) @monotonic_seconds()
store double %4, double* %2
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%6 = load double, double* %2
%7 = call i64 @snprintf(i8* %5, i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %6)
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%10 = load i64, i64* %3
%11 = load i32, i32* @stdout
%12 = call i64 @fwrite(i8* %9, i32 1, i64 %10, i32 %11)
%13 = icmp ne i64 %8, %12
br i1 %13, label %14, label %17
14: ; preds = %0
%15 = load i32, i32* @stdout
%16 = call i32 @io_error(i32 %15)
br label %17
17: ; preds = %14, %0
%18 = load i32, i32* @stdout
%19 = call i64 @fputc(i8 signext 9, i32 %18)
%20 = load i64, i64* @EOF
%21 = icmp eq i64 %19, %20
br i1 %21, label %22, label %25
22: ; preds = %17
%23 = load i32, i32* @stdout
%24 = call i32 @io_error(i32 %23)
br label %25
25: ; preds = %22, %17
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.6f\00"
@stdout = global i32 0
@EOF = global i64 0
define void @print_time() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = tail call double (...) @monotonic_seconds()
%4 = call i64 @snprintf(i8* %2, i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %3)
%5 = load i32, i32* @stdout
%6 = call i64 @fwrite(i8* %2, i32 1, i64 %4, i32 %5)
%7 = icmp eq i64 %4, %6
br i1 %7, label %11, label %8
8: ; preds = %0
%9 = load i32, i32* @stdout
%10 = call i32 @io_error(i32 %9)
br label %11
11: ; preds = %8, %0
%12 = load i32, i32* @stdout
%13 = call i64 @fputc(i8 signext 9, i32 %12)
%14 = load i64, i64* @EOF
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %11
%17 = load i32, i32* @stdout
%18 = call i32 @io_error(i32 %17)
br label %19
19: ; preds = %16, %11
ret void
}