#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__ time_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int, int,
                           unsigned long, int);
int rand();
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ time(scalar_t__ *);
void generateLine() {
  time_t now;
  time(&now);
  fprintf(stdout, "%d\t%d\t%d\t%lu.%d\n", rand(), rand(), rand(),
          (unsigned long)now, rand() % 1000);
}


x86 assembly (clang, -O0):
<generateLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x8(%rbp),%rdi
call   1040 <time@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x18(%rbp),%r9
mov    $0x3e8,%esi
cltd
idiv   %esi
mov    %edx,%eax
mov    -0xc(%rbp),%edx
lea    0xe64(%rip),%rsi
mov    %eax,(%rsp)
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateLine>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
call   1040 <time@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%r14d
xor    %eax,%eax
call   1050 <rand@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1050 <rand@plt>
mov    %eax,%r12d
xor    %eax,%eax
call   1050 <rand@plt>
mov    %eax,%ebp
mov    0x8(%rsp),%rbx
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%rsp)
lea    0xe5f(%rip),%rsi
mov    %r14d,%edi
mov    %r15d,%edx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    %rbx,%r9
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [17 x i8] c"%d\09%d\09%d\09%lu.%d\0A\00"
define void @generateLine() {
%1 = alloca i64
%2 = call i32 @time(i64* %1)
%3 = load i32, i32* @stdout
%4 = call i32 (...) @rand()
%5 = call i32 (...) @rand()
%6 = call i32 (...) @rand()
%7 = load i64, i64* %1
%8 = call i32 (...) @rand()
%9 = srem i32 %8, 1000
%10 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %6, i64 %7, i32 %9)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [17 x i8] c"%d\09%d\09%d\09%lu.%d\0A\00"
define void @generateLine() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @time(i64* %1)
%4 = load i32, i32* @stdout
%5 = call i32 (...) @rand()
%6 = call i32 (...) @rand()
%7 = call i32 (...) @rand()
%8 = load i64, i64* %1
%9 = call i32 (...) @rand()
%10 = srem i32 %9, 1000
%11 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %7, i64 %8, i32 %10)
ret void
}