#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ initstate(int, char *, int);
char *malloc(int);
int /*<<< orphan*/ random64();
int /*<<< orphan*/ stdout;
int main(void) {
  char *states = malloc(1024 * 1024);
  initstate(67783234, states, 1024 * 1024);
  fprintf(stdout, "// hashrands.h\n// random numbers to use in hashing\n\n");
  fprintf(stdout, "#define WKingHash  Hash[0]\n");
  fprintf(stdout, "#define BKingHash  Hash[1]\n");
  fprintf(stdout, "#define WQueensHash    Hash[2]\n");
  fprintf(stdout, "#define BQueensHash    Hash[3]\n");
  fprintf(stdout, "#define WRooksHash Hash[4]\n");
  fprintf(stdout, "#define BRooksHash Hash[5]\n");
  fprintf(stdout, "#define WBishopsHash   Hash[6]\n");
  fprintf(stdout, "#define BBishopsHash   Hash[7]\n");
  fprintf(stdout, "#define WKnightsHash   Hash[8]\n");
  fprintf(stdout, "#define BKnightsHash   Hash[9]\n");
  fprintf(stdout, "#define WPawnsHash Hash[10]\n");
  fprintf(stdout, "#define BPawnsHash Hash[11]\n");
  fprintf(stdout, "\n");
  fprintf(stdout, "uint64_t ToMoveHash[2] = {\n");
  for (int i = 0; i < 2; i++) {
    fprintf(stdout, "0x%llx,\n", random64());
  }
  fprintf(stdout, "};\n\n");
  fprintf(stdout, "uint64_t EPHash[9] = {\n");
  for (int i = 0; i < 9; i++) {
    fprintf(stdout, "0x%llx,\n", random64());
  }
  fprintf(stdout, "};\n\n");
  fprintf(stdout, "uint64_t CastlingHash[16] = {\n");
  for (int i = 0; i < 16; i++) {
    fprintf(stdout, "0x%llx,\n", random64());
  }
  fprintf(stdout, "};\n\n");
  fprintf(stdout, "uint64_t Hash[12][64] = {\n");
  for (int i = 0; i < 12; i++) {
    fprintf(stdout, "{\n");
    for (int j = 0; j < 64; j++) {
      fprintf(stdout, "0x%llx,\n", random64());
    }
    fprintf(stdout, "},\n");
  }
  fprintf(stdout, "};\n\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x100000,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x40a4a42,%edi
mov    $0x100000,%edx
call   1030 <initstate@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
lea    0xe80(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%edi
lea    0xea3(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e24(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e0d(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2df6(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2dc8(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%edi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d6c(%rip),%rax
mov    (%rax),%edi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d55(%rip),%rax
mov    (%rax),%edi
lea    0xeee(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d3e(%rip),%rax
mov    (%rax),%edi
lea    0xf1c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d27(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    130e <main+0x1ce>
mov    0x2cff(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1060 <random64@plt>
mov    -0x28(%rbp),%edi
mov    %eax,%edx
lea    0xec2(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12d0 <main+0x190>
mov    0x2ccb(%rip),%rax
mov    (%rax),%edi
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2cb4(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x9,-0x18(%rbp)
jge    1381 <main+0x241>
mov    0x2c8c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1060 <random64@plt>
mov    -0x2c(%rbp),%edi
mov    %eax,%edx
lea    0xe4f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1343 <main+0x203>
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
lea    0xe33(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2c41(%rip),%rax
mov    (%rax),%edi
lea    0xe39(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x10,-0x1c(%rbp)
jge    13f4 <main+0x2b4>
mov    0x2c19(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    $0x0,%al
call   1060 <random64@plt>
mov    -0x30(%rbp),%edi
mov    %eax,%edx
lea    0xddc(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13b6 <main+0x276>
mov    0x2be5(%rip),%rax
mov    (%rax),%edi
lea    0xdc0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2bce(%rip),%rax
mov    (%rax),%edi
lea    0xde5(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0xc,-0x20(%rbp)
jge    14b4 <main+0x374>
mov    0x2ba6(%rip),%rax
mov    (%rax),%edi
lea    0xd75(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x40,-0x24(%rbp)
jge    148f <main+0x34f>
mov    0x2b7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   1060 <random64@plt>
mov    -0x34(%rbp),%edi
mov    %eax,%edx
lea    0xd41(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1451 <main+0x311>
mov    0x2b4a(%rip),%rax
mov    (%rax),%edi
lea    0xd7c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1429 <main+0x2e9>
mov    0x2b25(%rip),%rax
mov    (%rax),%edi
lea    0xd00(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x100000,%edi
call   1050 <malloc@plt>
mov    $0x40a4a42,%edi
mov    %rax,%rsi
mov    $0x100000,%edx
call   1030 <initstate@plt>
mov    0x2e72(%rip),%r12
mov    (%r12),%edi
lea    0xe87(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xeaa(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xeb4(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xebe(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xeda(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xee4(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xefc(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xf0a(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xf18(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xf26(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xf31(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xf64(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xf2a(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
lea    0xf2d(%rip),%r13
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xf04(%rip),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xef4(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xe0b(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xc7a(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xc87(%rip),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%r12),%edi
lea    0xc0d(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0x40,%r14d
nopl   0x0(%rax,%rax,1)
mov    (%r12),%ebp
xor    %eax,%eax
call   1060 <random64@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0xffffffff,%r14d
jne    15c0 <main+0x480>
mov    (%r12),%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x1,%ebx
cmp    $0xc,%ebx
jne    15a0 <main+0x460>
mov    (%r12),%edi
lea    0xbc4(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [53 x i8] c"// hashrands.h\0A// random numbers to use in hashing\0A\0A\00"
@.str.1 = [28 x i8] c"#define WKingHash Hash[0]\0A\00"
@.str.2 = [28 x i8] c"#define BKingHash Hash[1]\0A\00"
@.str.3 = [32 x i8] c"#define WQueensHash Hash[2]\0A\00"
@.str.4 = [32 x i8] c"#define BQueensHash Hash[3]\0A\00"
@.str.5 = [28 x i8] c"#define WRooksHash Hash[4]\0A\00"
@.str.6 = [28 x i8] c"#define BRooksHash Hash[5]\0A\00"
@.str.7 = [32 x i8] c"#define WBishopsHash Hash[6]\0A\00"
@.str.8 = [32 x i8] c"#define BBishopsHash Hash[7]\0A\00"
@.str.9 = [32 x i8] c"#define WKnightsHash Hash[8]\0A\00"
@.str.10 = [32 x i8] c"#define BKnightsHash Hash[9]\0A\00"
@.str.11 = [29 x i8] c"#define WPawnsHash Hash[10]\0A\00"
@.str.12 = [29 x i8] c"#define BPawnsHash Hash[11]\0A\00"
@.str.13 = [2 x i8] c"\0A\00"
@.str.14 = [28 x i8] c"uint64_t ToMoveHash[2] = {\0A\00"
@.str.15 = [9 x i8] c"0x%llx,\0A\00"
@.str.16 = [5 x i8] c"};\0A\0A\00"
@.str.17 = [24 x i8] c"uint64_t EPHash[9] = {\0A\00"
@.str.18 = [31 x i8] c"uint64_t CastlingHash[16] = {\0A\00"
@.str.19 = [27 x i8] c"uint64_t Hash[12][64] = {\0A\00"
@.str.20 = [3 x i8] c"{\0A\00"
@.str.21 = [4 x i8] c"},\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i8* @malloc(i32 1048576)
store i8* %8, i8** %2
%9 = load i8*, i8** %2
%10 = call i32 @initstate(i32 67783234, i8* %9, i32 1048576)
%11 = load i32, i32* @stdout
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @stdout
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* @stdout
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* @stdout
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%19 = load i32, i32* @stdout
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%21 = load i32, i32* @stdout
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%23 = load i32, i32* @stdout
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%25 = load i32, i32* @stdout
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%27 = load i32, i32* @stdout
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%29 = load i32, i32* @stdout
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0))
%31 = load i32, i32* @stdout
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0))
%33 = load i32, i32* @stdout
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
%35 = load i32, i32* @stdout
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0))
%37 = load i32, i32* @stdout
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%39 = load i32, i32* @stdout
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
store i32 0, i32* %3
br label %41
41: ; preds = %48, %0
%42 = load i32, i32* %3
%43 = icmp slt i32 %42, 2
br i1 %43, label %44, label %51
44: ; preds = %41
%45 = load i32, i32* @stdout
%46 = call i32 (...) @random64()
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %46)
br label %48
48: ; preds = %44
%49 = load i32, i32* %3
%50 = add nsw i32 %49, 1
store i32 %50, i32* %3
br label %41
51: ; preds = %41
%52 = load i32, i32* @stdout
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%54 = load i32, i32* @stdout
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0))
store i32 0, i32* %4
br label %56
56: ; preds = %63, %51
%57 = load i32, i32* %4
%58 = icmp slt i32 %57, 9
br i1 %58, label %59, label %66
59: ; preds = %56
%60 = load i32, i32* @stdout
%61 = call i32 (...) @random64()
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %61)
br label %63
63: ; preds = %59
%64 = load i32, i32* %4
%65 = add nsw i32 %64, 1
store i32 %65, i32* %4
br label %56
66: ; preds = %56
%67 = load i32, i32* @stdout
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%69 = load i32, i32* @stdout
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0))
store i32 0, i32* %5
br label %71
71: ; preds = %78, %66
%72 = load i32, i32* %5
%73 = icmp slt i32 %72, 16
br i1 %73, label %74, label %81
74: ; preds = %71
%75 = load i32, i32* @stdout
%76 = call i32 (...) @random64()
%77 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %76)
br label %78
78: ; preds = %74
%79 = load i32, i32* %5
%80 = add nsw i32 %79, 1
store i32 %80, i32* %5
br label %71
81: ; preds = %71
%82 = load i32, i32* @stdout
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%84 = load i32, i32* @stdout
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.19, i64 0, i64 0))
store i32 0, i32* %6
br label %86
86: ; preds = %105, %81
%87 = load i32, i32* %6
%88 = icmp slt i32 %87, 12
br i1 %88, label %89, label %108
89: ; preds = %86
%90 = load i32, i32* @stdout
%91 = call i32 (i32, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0))
store i32 0, i32* %7
br label %92
92: ; preds = %99, %89
%93 = load i32, i32* %7
%94 = icmp slt i32 %93, 64
br i1 %94, label %95, label %102
95: ; preds = %92
%96 = load i32, i32* @stdout
%97 = call i32 (...) @random64()
%98 = call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %97)
br label %99
99: ; preds = %95
%100 = load i32, i32* %7
%101 = add nsw i32 %100, 1
store i32 %101, i32* %7
br label %92
102: ; preds = %92
%103 = load i32, i32* @stdout
%104 = call i32 (i32, i8*, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0))
br label %105
105: ; preds = %102
%106 = load i32, i32* %6
%107 = add nsw i32 %106, 1
store i32 %107, i32* %6
br label %86
108: ; preds = %86
%109 = load i32, i32* @stdout
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [53 x i8] c"// hashrands.h\0A// random numbers to use in hashing\0A\0A\00"
@.str.1 = [28 x i8] c"#define WKingHash Hash[0]\0A\00"
@.str.2 = [28 x i8] c"#define BKingHash Hash[1]\0A\00"
@.str.3 = [32 x i8] c"#define WQueensHash Hash[2]\0A\00"
@.str.4 = [32 x i8] c"#define BQueensHash Hash[3]\0A\00"
@.str.5 = [28 x i8] c"#define WRooksHash Hash[4]\0A\00"
@.str.6 = [28 x i8] c"#define BRooksHash Hash[5]\0A\00"
@.str.7 = [32 x i8] c"#define WBishopsHash Hash[6]\0A\00"
@.str.8 = [32 x i8] c"#define BBishopsHash Hash[7]\0A\00"
@.str.9 = [32 x i8] c"#define WKnightsHash Hash[8]\0A\00"
@.str.10 = [32 x i8] c"#define BKnightsHash Hash[9]\0A\00"
@.str.11 = [29 x i8] c"#define WPawnsHash Hash[10]\0A\00"
@.str.12 = [29 x i8] c"#define BPawnsHash Hash[11]\0A\00"
@.str.13 = [2 x i8] c"\0A\00"
@.str.14 = [28 x i8] c"uint64_t ToMoveHash[2] = {\0A\00"
@.str.15 = [9 x i8] c"0x%llx,\0A\00"
@.str.16 = [5 x i8] c"};\0A\0A\00"
@.str.17 = [24 x i8] c"uint64_t EPHash[9] = {\0A\00"
@.str.18 = [31 x i8] c"uint64_t CastlingHash[16] = {\0A\00"
@.str.19 = [27 x i8] c"uint64_t Hash[12][64] = {\0A\00"
@.str.20 = [3 x i8] c"{\0A\00"
@.str.21 = [4 x i8] c"},\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(1048576) i8* @malloc(i32 1048576)
%2 = tail call i32 @initstate(i32 67783234, i8* %1, i32 1048576)
%3 = load i32, i32* @stdout
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* @stdout
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32, i32* @stdout
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32, i32* @stdout
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%17 = load i32, i32* @stdout
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%19 = load i32, i32* @stdout
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%21 = load i32, i32* @stdout
%22 = tail call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0))
%23 = load i32, i32* @stdout
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0))
%25 = load i32, i32* @stdout
%26 = tail call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
%27 = load i32, i32* @stdout
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0))
%29 = load i32, i32* @stdout
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%31 = load i32, i32* @stdout
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
%33 = load i32, i32* @stdout
%34 = tail call i32 (...) @random64()
%35 = tail call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %34)
%36 = load i32, i32* @stdout
%37 = tail call i32 (...) @random64()
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %37)
%39 = load i32, i32* @stdout
%40 = tail call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%41 = load i32, i32* @stdout
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0))
%43 = load i32, i32* @stdout
%44 = tail call i32 (...) @random64()
%45 = tail call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %44)
%46 = load i32, i32* @stdout
%47 = tail call i32 (...) @random64()
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %47)
%49 = load i32, i32* @stdout
%50 = tail call i32 (...) @random64()
%51 = tail call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %50)
%52 = load i32, i32* @stdout
%53 = tail call i32 (...) @random64()
%54 = tail call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %53)
%55 = load i32, i32* @stdout
%56 = tail call i32 (...) @random64()
%57 = tail call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %56)
%58 = load i32, i32* @stdout
%59 = tail call i32 (...) @random64()
%60 = tail call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %59)
%61 = load i32, i32* @stdout
%62 = tail call i32 (...) @random64()
%63 = tail call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %62)
%64 = load i32, i32* @stdout
%65 = tail call i32 (...) @random64()
%66 = tail call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %65)
%67 = load i32, i32* @stdout
%68 = tail call i32 (...) @random64()
%69 = tail call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %68)
%70 = load i32, i32* @stdout
%71 = tail call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%72 = load i32, i32* @stdout
%73 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0))
%74 = load i32, i32* @stdout
%75 = tail call i32 (...) @random64()
%76 = tail call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %75)
%77 = load i32, i32* @stdout
%78 = tail call i32 (...) @random64()
%79 = tail call i32 (i32, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %78)
%80 = load i32, i32* @stdout
%81 = tail call i32 (...) @random64()
%82 = tail call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %81)
%83 = load i32, i32* @stdout
%84 = tail call i32 (...) @random64()
%85 = tail call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %84)
%86 = load i32, i32* @stdout
%87 = tail call i32 (...) @random64()
%88 = tail call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %87)
%89 = load i32, i32* @stdout
%90 = tail call i32 (...) @random64()
%91 = tail call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %90)
%92 = load i32, i32* @stdout
%93 = tail call i32 (...) @random64()
%94 = tail call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %93)
%95 = load i32, i32* @stdout
%96 = tail call i32 (...) @random64()
%97 = tail call i32 (i32, i8*, ...) @fprintf(i32 %95, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %96)
%98 = load i32, i32* @stdout
%99 = tail call i32 (...) @random64()
%100 = tail call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %99)
%101 = load i32, i32* @stdout
%102 = tail call i32 (...) @random64()
%103 = tail call i32 (i32, i8*, ...) @fprintf(i32 %101, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %102)
%104 = load i32, i32* @stdout
%105 = tail call i32 (...) @random64()
%106 = tail call i32 (i32, i8*, ...) @fprintf(i32 %104, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %105)
%107 = load i32, i32* @stdout
%108 = tail call i32 (...) @random64()
%109 = tail call i32 (i32, i8*, ...) @fprintf(i32 %107, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %108)
%110 = load i32, i32* @stdout
%111 = tail call i32 (...) @random64()
%112 = tail call i32 (i32, i8*, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %111)
%113 = load i32, i32* @stdout
%114 = tail call i32 (...) @random64()
%115 = tail call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %114)
%116 = load i32, i32* @stdout
%117 = tail call i32 (...) @random64()
%118 = tail call i32 (i32, i8*, ...) @fprintf(i32 %116, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %117)
%119 = load i32, i32* @stdout
%120 = tail call i32 (...) @random64()
%121 = tail call i32 (i32, i8*, ...) @fprintf(i32 %119, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %120)
%122 = load i32, i32* @stdout
%123 = tail call i32 (i32, i8*, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%124 = load i32, i32* @stdout
%125 = tail call i32 (i32, i8*, ...) @fprintf(i32 %124, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.19, i64 0, i64 0))
br label %129
126: ; preds = %133
%127 = load i32, i32* @stdout
%128 = tail call i32 (i32, i8*, ...) @fprintf(i32 %127, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
ret i32 0
129: ; preds = %0, %133
%130 = phi i32 [ 0, %0 ], [ %136, %133 ]
%131 = load i32, i32* @stdout
%132 = tail call i32 (i32, i8*, ...) @fprintf(i32 %131, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0))
br label %138
133: ; preds = %138
%134 = load i32, i32* @stdout
%135 = tail call i32 (i32, i8*, ...) @fprintf(i32 %134, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0))
%136 = add nuw nsw i32 %130, 1
%137 = icmp eq i32 %136, 12
br i1 %137, label %126, label %129
138: ; preds = %129, %138
%139 = phi i32 [ 0, %129 ], [ %143, %138 ]
%140 = load i32, i32* @stdout
%141 = tail call i32 (...) @random64()
%142 = tail call i32 (i32, i8*, ...) @fprintf(i32 %140, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %141)
%143 = add nuw nsw i32 %139, 1
%144 = icmp eq i32 %143, 64
br i1 %144, label %133, label %138
}