#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 int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ rand();
uint64_t rand_ID() {
  uint64_t ID;
  uint8_t *temp = (uint8_t *)&ID;
  temp[0] = rand();
  temp[1] = rand();
  temp[2] = rand();
  temp[3] = rand();
  temp[4] = rand();
  temp[5] = rand();
  temp[6] = rand();
  temp[7] = rand();
  return ID;
}


x86 assembly (clang, -O0):
<rand_ID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_ID>:
push   %rbx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
xor    %eax,%eax
call   1030 <rand@plt>
xor    %eax,%eax
call   1030 <rand@plt>
xor    %eax,%eax
call   1030 <rand@plt>
xor    %eax,%eax
call   1030 <rand@plt>
xor    %eax,%eax
call   1030 <rand@plt>
xor    %eax,%eax
call   1030 <rand@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_ID() {
%1 = alloca i32
%2 = alloca i32*
store i32* %1, i32** %2
%3 = call i32 (...) @rand()
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
store i32 %3, i32* %5
%6 = call i32 (...) @rand()
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %6, i32* %8
%9 = call i32 (...) @rand()
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 2
store i32 %9, i32* %11
%12 = call i32 (...) @rand()
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 3
store i32 %12, i32* %14
%15 = call i32 (...) @rand()
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 4
store i32 %15, i32* %17
%18 = call i32 (...) @rand()
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 5
store i32 %18, i32* %20
%21 = call i32 (...) @rand()
%22 = load i32*, i32** %2
%23 = getelementptr inbounds i32, i32* %22, i64 6
store i32 %21, i32* %23
%24 = call i32 (...) @rand()
%25 = load i32*, i32** %2
%26 = getelementptr inbounds i32, i32* %25, i64 7
store i32 %24, i32* %26
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
define i32 @rand_ID() {
%1 = tail call i32 (...) @rand()
%2 = tail call i32 (...) @rand()
%3 = tail call i32 (...) @rand()
%4 = tail call i32 (...) @rand()
%5 = tail call i32 (...) @rand()
%6 = tail call i32 (...) @rand()
%7 = tail call i32 (...) @rand()
%8 = tail call i32 (...) @rand()
ret i32 %1
}