#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 /*<<< orphan*/ genrand64_int64();
int /*<<< orphan*/ init_by_array64(unsigned long long *, unsigned long long);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(void) {
  int i;
  unsigned long long init[4] = {0x12345ULL, 0x23456ULL, 0x34567ULL, 0x45678ULL},
                     length = 4;
  init_by_array64(init, length);
  for (i = 0; i < 65536; i++) {
    printf("%llx\n", genrand64_int64());
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb1(%rip),%rax
mov    %rax,-0x18(%rbp)
movq   $0x4,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1050 <init_by_array64@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x10000,-0x8(%rbp)
jge    11b7 <main+0x87>
mov    $0x0,%al
call   1030 <genrand64_int64@plt>
mov    %eax,%esi
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1187 <main+0x57>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
movaps 0xed3(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb7(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1050 <init_by_array64@plt>
mov    $0x10000,%ebp
lea    0xeba(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <genrand64_int64@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.init = [4 x i64] [i64 74565, i64 144470, i64 214375, i64 284280]
@.str = [6 x i8] c"%llx\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [4 x i64]
%4 = alloca i64
store i32 0, i32* %1
%5 = bitcast [4 x i64]* %3 to i8*
store i64 4, i64* %4
%6 = getelementptr inbounds [4 x i64], [4 x i64]* %3, i64 0, i64 0
%7 = load i64, i64* %4
%8 = call i32 @init_by_array64(i64* %6, i64 %7)
store i32 0, i32* %2
br label %9
9: ; preds = %15, %0
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 65536
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = call i32 (...) @genrand64_int64()
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %12
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %9
18: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@__const.main.init = [4 x i64] [i64 74565, i64 144470, i64 214375, i64 284280]
@.str = [6 x i8] c"%llx\0A\00"
define i32 @main() {
%1 = alloca [4 x i64]
%2 = bitcast [4 x i64]* %1 to i8*
%3 = getelementptr inbounds [4 x i64], [4 x i64]* %1, i64 0, i64 0
%4 = call i32 @init_by_array64(i64* %3, i64 4)
br label %5
5: ; preds = %0, %5
%6 = phi i32 [ 0, %0 ], [ %9, %5 ]
%7 = call i32 (...) @genrand64_int64()
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = add nuw nsw i32 %6, 1
%10 = icmp eq i32 %9, 65536
br i1 %10, label %11, label %5
11: ; preds = %5
ret i32 0
}