#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*/ genrand_int32();
double genrand_real2();
int /*<<< orphan*/ init_by_array(unsigned long *, unsigned long);
int /*<<< orphan*/ init_genrand(int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  printf("import 'package:unittest/unittest.dart';\n");
  printf("import 'package:mt19937/mt19937.dart';\n");
  printf("\n");
  printf("\n");
  printf("\n");
  printf("void main() {\n");
  printf("\n");
  printf("  test(\"test mersenne twister output for seed=123\", () {\n");
  printf("    MersenneTwister m = new MersenneTwister.withSeed(123);\n");
  printf("    int i;\n");
  printf("    for (i = 0; i < 1000; i++) {\n");
  printf("      expect(m.genrand_int32(), equals(result1[i]));\n");
  printf("    }\n");
  printf("  });\n");
  printf("\n");
  printf("  test(\"test mersenne twister output for seedWithArray\", () {\n");
  printf("    MersenneTwister m = new MersenneTwister.withArray([0x123, 0x234, "
         "0x345, 0x456]);\n");
  printf("    String s;\n");
  printf("    double d;\n");
  printf("\n");
  printf("    int i;\n");
  printf("    for (i = 0; i < 1000; i++) {\n");
  printf("        expect(m.genrand_int32(), equals(result2[i]));\n");
  printf("    }\n");
  printf("\n");
  printf("    for (i = 0; i < 1000; i++) {\n");
  printf("        d = m.genrand_real2();\n");
  printf("        d = (d*100000000).roundToDouble();\n");
  printf("        d = d/100000000;\n");
  printf("        expect(d, equals(result3[i]));\n");
  printf("    }\n");
  printf("  });\n");
  printf("\n");
  printf("}\n");
  int i;
  init_genrand(123);
  printf("List<int> result1 = [ // 1000 outputs of genrand_int32()\n\n");
  for (i = 0; i < 1000; i++) {
    if (i == 999) {
      printf("\t%10lu]; ", genrand_int32());
    } else {
      printf("\t%10lu, ", genrand_int32());
      if (i % 5 == 4)
        printf("\n");
    }
  }
  unsigned long init[4] = {0x123, 0x234, 0x345, 0x456}, length = 4;
  init_by_array(init, length);
  printf("\n\n");
  printf("List<int> result2 = [ // 1000 outputs of genrand_int32()\n\n");
  for (i = 0; i < 1000; i++) {
    if (i == 999) {
      printf("\t%10lu];", genrand_int32());
    } else {
      printf("\t%10lu, ", genrand_int32());
      if (i % 5 == 4)
        printf("\n");
    }
  }
  printf("\n\n");
  printf("List<double> result3 = [ // 1000 outputs of genrand_real2()\n\n");
  for (i = 0; i < 1000; i++) {
    if (i == 999) {
      printf("\t%10.8f];", genrand_real2());
    } else {
      printf("\t%10.8f, ", genrand_real2());
      if (i % 5 == 4)
        printf("\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x1179(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x116b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x115d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x1141(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf2d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf26(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x10d1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf11(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf42(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf8b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x108b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x1045(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf74(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfd5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe0b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x7b,%edi
call   1070 <init_genrand@plt>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    13e1 <main+0x291>
cmpl   $0x3e7,-0x8(%rbp)
jne    1390 <main+0x240>
mov    $0x0,%al
call   1030 <genrand_int32@plt>
mov    %eax,%esi
lea    0xf79(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13ce <main+0x27e>
mov    $0x0,%al
call   1030 <genrand_int32@plt>
mov    %eax,%esi
lea    0xf67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x4,%edx
jne    13c9 <main+0x279>
lea    0xf39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13ce <main+0x27e>
jmp    13d3 <main+0x283>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    135a <main+0x20a>
mov    0xfc8(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xfc5(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xfc2(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xfbf(%rip),%rax
mov    %rax,-0x18(%rbp)
movq   $0x4,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1060 <init_by_array@plt>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    14cc <main+0x37c>
cmpl   $0x3e7,-0x8(%rbp)
jne    147b <main+0x32b>
mov    $0x0,%al
call   1030 <genrand_int32@plt>
mov    %eax,%esi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14b9 <main+0x369>
mov    $0x0,%al
call   1030 <genrand_int32@plt>
mov    %eax,%esi
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x4,%edx
jne    14b4 <main+0x364>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14b9 <main+0x369>
jmp    14be <main+0x36e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1445 <main+0x2f5>
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1572 <main+0x422>
cmpl   $0x3e7,-0x8(%rbp)
jne    1523 <main+0x3d3>
mov    $0x0,%al
call   1050 <genrand_real2@plt>
lea    0xe7b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    155f <main+0x40f>
mov    $0x0,%al
call   1050 <genrand_real2@plt>
lea    0xe6b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x4,%edx
jne    155a <main+0x40a>
lea    0xda8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    155f <main+0x40f>
jmp    1564 <main+0x414>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14ef <main+0x39f>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
lea    0xead(%rip),%rdi
call   1040 <puts@plt>
lea    0xeca(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xec7(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebf(%rip),%rdi
call   1040 <puts@plt>
lea    0xeec(%rip),%rdi
call   1040 <puts@plt>
lea    0xfff(%rip),%r12
mov    %r12,%rdi
call   1040 <puts@plt>
lea    0x1032(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xefd(%rip),%rdi
call   1040 <puts@plt>
lea    0x10c2(%rip),%r15
mov    %r15,%rdi
call   1040 <puts@plt>
lea    0x10b9(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xefe(%rip),%rdi
call   1040 <puts@plt>
lea    0xf30(%rip),%rdi
call   1040 <puts@plt>
lea    0xf79(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7b(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xf6e(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xfa0(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb3(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd2(%rip),%rdi
call   1040 <puts@plt>
lea    0xfdf(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfe4(%rip),%rdi
call   1040 <puts@plt>
mov    $0x7b,%edi
call   1090 <init_genrand@plt>
lea    0xfd6(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <genrand_int32@plt>
mov    $0x4,%r12w
mov    $0x3e7,%r15d
lea    0xce3(%rip),%r14
xor    %ebx,%ebx
jmp    1344 <main+0x1d4>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <genrand_int32@plt>
add    $0xffffffff,%r12d
add    $0x1,%ebx
add    $0xffffffff,%r15d
je     1371 <main+0x201>
movzwl %bx,%ecx
imul   $0xcccd,%ecx,%ecx
shr    $0x12,%ecx
lea    (%rcx,%rcx,4),%ebp
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
add    %r12w,%bp
jne    1330 <main+0x1c0>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1330 <main+0x1c0>
lea    0xc88(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movaps 0x1018(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xffc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1080 <init_by_array@plt>
lea    0xf6b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf61(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <genrand_int32@plt>
mov    $0x4,%r12w
mov    $0x3e7,%r15d
lea    0xc34(%rip),%r14
xor    %ebx,%ebx
jmp    13f4 <main+0x284>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <genrand_int32@plt>
add    $0xffffffff,%r12d
add    $0x1,%ebx
add    $0xffffffff,%r15d
je     1421 <main+0x2b1>
movzwl %bx,%ecx
imul   $0xcccd,%ecx,%ecx
shr    $0x12,%ecx
lea    (%rcx,%rcx,4),%ebp
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
add    %r12w,%bp
jne    13e0 <main+0x270>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    13e0 <main+0x270>
lea    0xbeb(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xedf(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1070 <genrand_real2@plt>
mov    $0x4,%r12w
mov    $0x3e7,%r15d
lea    0xbc4(%rip),%r14
xor    %ebx,%ebx
jmp    1484 <main+0x314>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <genrand_real2@plt>
add    $0xffffffff,%r12d
add    $0x1,%ebx
add    $0xffffffff,%r15d
je     14af <main+0x33f>
movzwl %bx,%eax
imul   $0xcccd,%eax,%eax
shr    $0x12,%eax
lea    (%rax,%rax,4),%ebp
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
add    %r12w,%bp
jne    1470 <main+0x300>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1470 <main+0x300>
lea    0xb66(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [42 x i8] c"import 'package:unittest/unittest.dart';\0A\00"
@.str.1 = [40 x i8] c"import 'package:mt19937/mt19937.dart';\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [15 x i8] c"void main() {\0A\00"
@.str.4 = [58 x i8] c" test(\22test mersenne twister output for seed=123\22, () {\0A\00"
@.str.5 = [60 x i8] c" MersenneTwister m = new MersenneTwister.withSeed(123);\0A\00"
@.str.6 = [12 x i8] c" int i;\0A\00"
@.str.7 = [34 x i8] c" for (i = 0; i < 1000; i++) {\0A\00"
@.str.8 = [54 x i8] c" expect(m.genrand_int32(), equals(result1[i]));\0A\00"
@.str.9 = [7 x i8] c" }\0A\00"
@.str.10 = [7 x i8] c" });\0A\00"
@.str.11 = [63 x i8] c" test(\22test mersenne twister output for seedWithArray\22, () {\0A\00"
@.str.12 = [86 x i8] c" MersenneTwister m = new MersenneTwister.withArray([0x123, 0x234, 0x345, 0x456]);\0A\00"
@.str.13 = [15 x i8] c" String s;\0A\00"
@.str.14 = [15 x i8] c" double d;\0A\00"
@.str.15 = [56 x i8] c" expect(m.genrand_int32(), equals(result2[i]));\0A\00"
@.str.16 = [32 x i8] c" d = m.genrand_real2();\0A\00"
@.str.17 = [44 x i8] c" d = (d*100000000).roundToDouble();\0A\00"
@.str.18 = [26 x i8] c" d = d/100000000;\0A\00"
@.str.19 = [40 x i8] c" expect(d, equals(result3[i]));\0A\00"
@.str.20 = [3 x i8] c"}\0A\00"
@.str.21 = [59 x i8] c"List<int> result1 = [ // 1000 outputs of genrand_int32()\0A\0A\00"
@.str.22 = [10 x i8] c"\09%10lu]; \00"
@.str.23 = [9 x i8] c"\09%10lu, \00"
@__const.main.init = [4 x i64] [i64 291, i64 564, i64 837, i64 1110]
@.str.24 = [3 x i8] c"\0A\0A\00"
@.str.25 = [59 x i8] c"List<int> result2 = [ // 1000 outputs of genrand_int32()\0A\0A\00"
@.str.26 = [9 x i8] c"\09%10lu];\00"
@.str.27 = [62 x i8] c"List<double> result3 = [ // 1000 outputs of genrand_real2()\0A\0A\00"
@.str.28 = [10 x i8] c"\09%10.8f];\00"
@.str.29 = [10 x i8] c"\09%10.8f, \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [4 x i64]
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.11, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.12, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.15, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.17, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0))
%39 = call i32 @init_genrand(i32 123)
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.21, i64 0, i64 0))
store i32 0, i32* %2
br label %41
41: ; preds = %60, %0
%42 = load i32, i32* %2
%43 = icmp slt i32 %42, 1000
br i1 %43, label %44, label %63
44: ; preds = %41
%45 = load i32, i32* %2
%46 = icmp eq i32 %45, 999
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = call i32 (...) @genrand_int32()
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0), i32 %48)
br label %59
50: ; preds = %44
%51 = call i32 (...) @genrand_int32()
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32 %51)
%53 = load i32, i32* %2
%54 = srem i32 %53, 5
%55 = icmp eq i32 %54, 4
br i1 %55, label %56, label %58
56: ; preds = %50
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %58
58: ; preds = %56, %50
br label %59
59: ; preds = %58, %47
br label %60
60: ; preds = %59
%61 = load i32, i32* %2
%62 = add nsw i32 %61, 1
store i32 %62, i32* %2
br label %41
63: ; preds = %41
%64 = bitcast [4 x i64]* %3 to i8*
store i64 4, i64* %4
%65 = getelementptr inbounds [4 x i64], [4 x i64]* %3, i64 0, i64 0
%66 = load i64, i64* %4
%67 = call i32 @init_by_array(i64* %65, i64 %66)
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.25, i64 0, i64 0))
store i32 0, i32* %2
br label %70
70: ; preds = %89, %63
%71 = load i32, i32* %2
%72 = icmp slt i32 %71, 1000
br i1 %72, label %73, label %92
73: ; preds = %70
%74 = load i32, i32* %2
%75 = icmp eq i32 %74, 999
br i1 %75, label %76, label %79
76: ; preds = %73
%77 = call i32 (...) @genrand_int32()
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.26, i64 0, i64 0), i32 %77)
br label %88
79: ; preds = %73
%80 = call i32 (...) @genrand_int32()
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32 %80)
%82 = load i32, i32* %2
%83 = srem i32 %82, 5
%84 = icmp eq i32 %83, 4
br i1 %84, label %85, label %87
85: ; preds = %79
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %87
87: ; preds = %85, %79
br label %88
88: ; preds = %87, %76
br label %89
89: ; preds = %88
%90 = load i32, i32* %2
%91 = add nsw i32 %90, 1
store i32 %91, i32* %2
br label %70
92: ; preds = %70
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.27, i64 0, i64 0))
store i32 0, i32* %2
br label %95
95: ; preds = %114, %92
%96 = load i32, i32* %2
%97 = icmp slt i32 %96, 1000
br i1 %97, label %98, label %117
98: ; preds = %95
%99 = load i32, i32* %2
%100 = icmp eq i32 %99, 999
br i1 %100, label %101, label %104
101: ; preds = %98
%102 = call double (...) @genrand_real2()
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.28, i64 0, i64 0), double %102)
br label %113
104: ; preds = %98
%105 = call double (...) @genrand_real2()
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.29, i64 0, i64 0), double %105)
%107 = load i32, i32* %2
%108 = srem i32 %107, 5
%109 = icmp eq i32 %108, 4
br i1 %109, label %110, label %112
110: ; preds = %104
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %112
112: ; preds = %110, %104
br label %113
113: ; preds = %112, %101
br label %114
114: ; preds = %113
%115 = load i32, i32* %2
%116 = add nsw i32 %115, 1
store i32 %116, i32* %2
br label %95
117: ; preds = %95
ret i32 0
}

LLVM IR (-O2):
@.str.22 = [10 x i8] c"\09%10lu]; \00"
@.str.23 = [9 x i8] c"\09%10lu, \00"
@__const.main.init = [4 x i64] [i64 291, i64 564, i64 837, i64 1110]
@.str.26 = [9 x i8] c"\09%10lu];\00"
@.str.28 = [10 x i8] c"\09%10.8f];\00"
@.str.29 = [10 x i8] c"\09%10.8f, \00"
@str = [41 x i8] c"import 'package:unittest/unittest.dart';\00"
@str.30 = [39 x i8] c"import 'package:mt19937/mt19937.dart';\00"
@str.31 = [14 x i8] c"void main() {\00"
@str.32 = [57 x i8] c" test(\22test mersenne twister output for seed=123\22, () {\00"
@str.33 = [59 x i8] c" MersenneTwister m = new MersenneTwister.withSeed(123);\00"
@str.36 = [53 x i8] c" expect(m.genrand_int32(), equals(result1[i]));\00"
@str.39 = [62 x i8] c" test(\22test mersenne twister output for seedWithArray\22, () {\00"
@str.40 = [85 x i8] c" MersenneTwister m = new MersenneTwister.withArray([0x123, 0x234, 0x345, 0x456]);\00"
@str.41 = [14 x i8] c" String s;\00"
@str.42 = [14 x i8] c" double d;\00"
@str.43 = [11 x i8] c" int i;\00"
@str.45 = [55 x i8] c" expect(m.genrand_int32(), equals(result2[i]));\00"
@str.47 = [33 x i8] c" for (i = 0; i < 1000; i++) {\00"
@str.48 = [31 x i8] c" d = m.genrand_real2();\00"
@str.49 = [43 x i8] c" d = (d*100000000).roundToDouble();\00"
@str.50 = [25 x i8] c" d = d/100000000;\00"
@str.51 = [39 x i8] c" expect(d, equals(result3[i]));\00"
@str.52 = [6 x i8] c" }\00"
@str.53 = [6 x i8] c" });\00"
@str.54 = [2 x i8] c"}\00"
@str.55 = [58 x i8] c"List<int> result1 = [ // 1000 outputs of genrand_int32()\0A\00"
@str.57 = [58 x i8] c"List<int> result2 = [ // 1000 outputs of genrand_int32()\0A\00"
@str.58 = [2 x i8] c"\0A\00"
@str.59 = [61 x i8] c"List<double> result3 = [ // 1000 outputs of genrand_real2()\0A\00"
define i32 @main() {
%1 = alloca [4 x i64]
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.30, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.31, i64 0, i64 0))
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.32, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.33, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.43, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.47, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.36, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.52, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.53, i64 0, i64 0))
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.39, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str.40, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.41, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.42, i64 0, i64 0))
%21 = tail call i32 @putchar(i32 10)
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.43, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.47, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.45, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.52, i64 0, i64 0))
%26 = tail call i32 @putchar(i32 10)
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.47, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.48, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.49, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.50, i64 0, i64 0))
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.51, i64 0, i64 0))
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.52, i64 0, i64 0))
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.53, i64 0, i64 0))
%34 = tail call i32 @putchar(i32 10)
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.54, i64 0, i64 0))
%36 = tail call i32 @init_genrand(i32 123)
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.55, i64 0, i64 0))
%38 = tail call i32 (...) @genrand_int32()
br label %39
39: ; preds = %0, %48
%40 = phi i32 [ %38, %0 ], [ %51, %48 ]
%41 = phi i32 [ 0, %0 ], [ %49, %48 ]
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32 %40)
%43 = trunc i32 %41 to i16
%44 = urem i16 %43, 5
%45 = icmp eq i16 %44, 4
br i1 %45, label %46, label %48
46: ; preds = %39
%47 = tail call i32 @putchar(i32 10)
br label %48
48: ; preds = %46, %39
%49 = add nuw nsw i32 %41, 1
%50 = icmp eq i32 %49, 999
%51 = tail call i32 (...) @genrand_int32()
br i1 %50, label %52, label %39
52: ; preds = %48
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0), i32 %51)
%54 = bitcast [4 x i64]* %1 to i8*
%55 = getelementptr inbounds [4 x i64], [4 x i64]* %1, i64 0, i64 0
%56 = call i32 @init_by_array(i64* %55, i64 4)
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.58, i64 0, i64 0))
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.57, i64 0, i64 0))
%59 = call i32 (...) @genrand_int32()
br label %60
60: ; preds = %52, %69
%61 = phi i32 [ %59, %52 ], [ %72, %69 ]
%62 = phi i32 [ 0, %52 ], [ %70, %69 ]
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i32 %61)
%64 = trunc i32 %62 to i16
%65 = urem i16 %64, 5
%66 = icmp eq i16 %65, 4
br i1 %66, label %67, label %69
67: ; preds = %60
%68 = call i32 @putchar(i32 10)
br label %69
69: ; preds = %67, %60
%70 = add nuw nsw i32 %62, 1
%71 = icmp eq i32 %70, 999
%72 = call i32 (...) @genrand_int32()
br i1 %71, label %73, label %60
73: ; preds = %69
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.26, i64 0, i64 0), i32 %72)
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.58, i64 0, i64 0))
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.59, i64 0, i64 0))
%77 = call double (...) @genrand_real2()
br label %78
78: ; preds = %73, %87
%79 = phi double [ %77, %73 ], [ %90, %87 ]
%80 = phi i32 [ 0, %73 ], [ %88, %87 ]
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.29, i64 0, i64 0), double %79)
%82 = trunc i32 %80 to i16
%83 = urem i16 %82, 5
%84 = icmp eq i16 %83, 4
br i1 %84, label %85, label %87
85: ; preds = %78
%86 = call i32 @putchar(i32 10)
br label %87
87: ; preds = %85, %78
%88 = add nuw nsw i32 %80, 1
%89 = icmp eq i32 %88, 999
%90 = call double (...) @genrand_real2()
br i1 %89, label %91, label %78
91: ; preds = %87
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.28, i64 0, i64 0), double %90)
ret i32 0
}