#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 __get_random_byte(unsigned int *);
unsigned long long __get_random_llu(unsigned *ctx) {
  return 0 | __get_random_byte(ctx) | (__get_random_byte(ctx)) << 8 |
         (__get_random_byte(ctx)) << 16 | (__get_random_byte(ctx)) << 24 |
         (__get_random_byte(ctx)) << 32 | (__get_random_byte(ctx)) << 40 |
         (__get_random_byte(ctx)) << 48 | (__get_random_byte(ctx)) << 56;
}


x86 assembly (clang, -O0):
<__get_random_llu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_random_byte@plt>
or     $0x0,%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_random_byte@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_random_byte@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_random_byte@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_random_byte@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_random_byte@plt>
mov    %eax,%edx
mov    -0x14(%rbp),%eax
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_random_byte@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%eax
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_random_byte@plt>
mov    %eax,%edx
mov    -0xc(%rbp),%eax
mov    $0x38,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
cltq
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_random_llu>:
push   %rbx
mov    %rdi,%rbx
call   1030 <__get_random_byte@plt>
mov    %rbx,%rdi
call   1030 <__get_random_byte@plt>
mov    %rbx,%rdi
call   1030 <__get_random_byte@plt>
mov    %rbx,%rdi
call   1030 <__get_random_byte@plt>
mov    %rbx,%rdi
call   1030 <__get_random_byte@plt>
mov    %rbx,%rdi
call   1030 <__get_random_byte@plt>
mov    %rbx,%rdi
call   1030 <__get_random_byte@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <__get_random_byte@plt>

LLVM IR (-O0):
define i64 @__get_random_llu(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @__get_random_byte(i32* %3)
%5 = or i32 0, %4
%6 = load i32*, i32** %2
%7 = call i32 @__get_random_byte(i32* %6)
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32*, i32** %2
%11 = call i32 @__get_random_byte(i32* %10)
%12 = shl i32 %11, 16
%13 = or i32 %9, %12
%14 = load i32*, i32** %2
%15 = call i32 @__get_random_byte(i32* %14)
%16 = shl i32 %15, 24
%17 = or i32 %13, %16
%18 = load i32*, i32** %2
%19 = call i32 @__get_random_byte(i32* %18)
%20 = shl i32 %19, 32
%21 = or i32 %17, %20
%22 = load i32*, i32** %2
%23 = call i32 @__get_random_byte(i32* %22)
%24 = shl i32 %23, 40
%25 = or i32 %21, %24
%26 = load i32*, i32** %2
%27 = call i32 @__get_random_byte(i32* %26)
%28 = shl i32 %27, 48
%29 = or i32 %25, %28
%30 = load i32*, i32** %2
%31 = call i32 @__get_random_byte(i32* %30)
%32 = shl i32 %31, 56
%33 = or i32 %29, %32
%34 = sext i32 %33 to i64
ret i64 %34
}

LLVM IR (-O2):
define i64 @__get_random_llu(i32* %0) {
%2 = tail call i32 @__get_random_byte(i32* %0)
%3 = tail call i32 @__get_random_byte(i32* %0)
%4 = tail call i32 @__get_random_byte(i32* %0)
%5 = tail call i32 @__get_random_byte(i32* %0)
%6 = tail call i32 @__get_random_byte(i32* %0)
%7 = tail call i32 @__get_random_byte(i32* %0)
%8 = tail call i32 @__get_random_byte(i32* %0)
%9 = tail call i32 @__get_random_byte(i32* %0)
ret i64 poison
}