#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 rand();
size_t rand_size_t() {
  return ((size_t)(rand() & 0xff) << 56) | ((size_t)(rand() & 0xff) << 48) |
         ((size_t)(rand() & 0xff) << 40) | ((size_t)(rand() & 0xff) << 32) |
         ((size_t)(rand() & 0xff) << 24) | ((size_t)(rand() & 0xff) << 16) |
         ((size_t)(rand() & 0xff) << 8) | ((size_t)(rand() & 0xff) << 0);
}


x86 assembly (clang, -O0):
<rand_size_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
and    $0xff,%eax
cltq
shl    $0x38,%rax
mov    %rax,-0x38(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
and    $0xff,%ecx
movslq %ecx,%rcx
shl    $0x30,%rcx
or     %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
and    $0xff,%ecx
movslq %ecx,%rcx
shl    $0x28,%rcx
or     %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
and    $0xff,%ecx
movslq %ecx,%rcx
shl    $0x20,%rcx
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
and    $0xff,%ecx
movslq %ecx,%rcx
shl    $0x18,%rcx
or     %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
and    $0xff,%ecx
movslq %ecx,%rcx
shl    $0x10,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
and    $0xff,%ecx
movslq %ecx,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
and    $0xff,%ecx
movslq %ecx,%rcx
shl    $0x0,%rcx
or     %rcx,%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_size_t>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%r14d
shl    $0x38,%r14
xor    %eax,%eax
call   1030 <rand@plt>
movzbl %al,%ebx
shl    $0x30,%rbx
or     %r14,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
movzbl %al,%r14d
shl    $0x28,%r14
or     %rbx,%r14
xor    %eax,%eax
call   1030 <rand@plt>
movzbl %al,%ebx
shl    $0x20,%rbx
or     %r14,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%r14d
shl    $0x18,%r14d
or     %rbx,%r14
xor    %eax,%eax
call   1030 <rand@plt>
movzbl %al,%ebx
shl    $0x10,%ebx
or     %r14,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
shl    $0x8,%eax
movzwl %ax,%r14d
or     %rbx,%r14
xor    %eax,%eax
call   1030 <rand@plt>
movzbl %al,%eax
or     %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @rand_size_t() {
%1 = call i32 (...) @rand()
%2 = and i32 %1, 255
%3 = sext i32 %2 to i64
%4 = shl i64 %3, 56
%5 = call i32 (...) @rand()
%6 = and i32 %5, 255
%7 = sext i32 %6 to i64
%8 = shl i64 %7, 48
%9 = or i64 %4, %8
%10 = call i32 (...) @rand()
%11 = and i32 %10, 255
%12 = sext i32 %11 to i64
%13 = shl i64 %12, 40
%14 = or i64 %9, %13
%15 = call i32 (...) @rand()
%16 = and i32 %15, 255
%17 = sext i32 %16 to i64
%18 = shl i64 %17, 32
%19 = or i64 %14, %18
%20 = call i32 (...) @rand()
%21 = and i32 %20, 255
%22 = sext i32 %21 to i64
%23 = shl i64 %22, 24
%24 = or i64 %19, %23
%25 = call i32 (...) @rand()
%26 = and i32 %25, 255
%27 = sext i32 %26 to i64
%28 = shl i64 %27, 16
%29 = or i64 %24, %28
%30 = call i32 (...) @rand()
%31 = and i32 %30, 255
%32 = sext i32 %31 to i64
%33 = shl i64 %32, 8
%34 = or i64 %29, %33
%35 = call i32 (...) @rand()
%36 = and i32 %35, 255
%37 = sext i32 %36 to i64
%38 = shl i64 %37, 0
%39 = or i64 %34, %38
ret i64 %39
}

LLVM IR (-O2):
define i64 @rand_size_t() {
%1 = tail call i32 (...) @rand()
%2 = zext i32 %1 to i64
%3 = shl i64 %2, 56
%4 = tail call i32 (...) @rand()
%5 = and i32 %4, 255
%6 = zext i32 %5 to i64
%7 = shl nuw nsw i64 %6, 48
%8 = or i64 %7, %3
%9 = tail call i32 (...) @rand()
%10 = and i32 %9, 255
%11 = zext i32 %10 to i64
%12 = shl nuw nsw i64 %11, 40
%13 = or i64 %8, %12
%14 = tail call i32 (...) @rand()
%15 = and i32 %14, 255
%16 = zext i32 %15 to i64
%17 = shl nuw nsw i64 %16, 32
%18 = or i64 %13, %17
%19 = tail call i32 (...) @rand()
%20 = shl i32 %19, 24
%21 = zext i32 %20 to i64
%22 = or i64 %18, %21
%23 = tail call i32 (...) @rand()
%24 = shl i32 %23, 16
%25 = and i32 %24, 16711680
%26 = zext i32 %25 to i64
%27 = or i64 %22, %26
%28 = tail call i32 (...) @rand()
%29 = shl i32 %28, 8
%30 = and i32 %29, 65280
%31 = zext i32 %30 to i64
%32 = or i64 %27, %31
%33 = tail call i32 (...) @rand()
%34 = and i32 %33, 255
%35 = zext i32 %34 to i64
%36 = or i64 %32, %35
ret i64 %36
}