// File: boczeratul[P]StarCraftGA/mt19937ar.cpp
// Function: genrand_int32()
unsigned long
genrand_int32 (void)
{
    unsigned long y;
    static unsigned long mag01[2] = { 0x0UL, MATRIX_A };
    /* mag01[x] = x * MATRIX_A  for x=0,1 */

    if (mti >= N) {
                                 /* generate N words at one time */
        int kk;

        if (mti == N + 1)        /* if init_genrand() has not been called, */
                                 /* a default initial seed is used */
            init_genrand (5489UL);

        for (kk = 0; kk < N - M; kk++) {
            y = (mt[kk] & UPPER_MASK) | (mt[kk + 1] & LOWER_MASK);
            mt[kk] = mt[kk + M] ^ (y >> 1) ^ mag01[y & 0x1UL];
        }
        for (; kk < N - 1; kk++) {
            y = (mt[kk] & UPPER_MASK) | (mt[kk + 1] & LOWER_MASK);
            mt[kk] = mt[kk + (M - N)] ^ (y >> 1) ^ mag01[y & 0x1UL];
        }
        y = (mt[N - 1] & UPPER_MASK) | (mt[0] & LOWER_MASK);
        mt[N - 1] = mt[M - 1] ^ (y >> 1) ^ mag01[y & 0x1UL];

        mti = 0;
    }

    y = mt[mti++];

    /* Tempering */
    y ^= (y >> 11);
    y ^= (y << 7) & 0x9d2c5680UL;
    y ^= (y << 15) & 0xefc60000UL;
    y ^= (y >> 18);

    return y;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0x270, 0xad6e(%rip)    # imm = 0x270
jl 0x3502
cmpl $0x271, 0xad5e(%rip)    # imm = 0x271
jne 0x336e
movl $0x1571, %edi           # imm = 0x1571
callq 0x3060
movl $0x0, -0xc(%rbp)
cmpl $0xe3, -0xc(%rbp)
jge 0x340d
movslq -0xc(%rbp), %rdx
leaq 0xb0d3(%rip), %rcx      # 0xe460
movabsq $0x80000000, %rax       # imm = 0x80000000
andq (%rcx,%rdx,8), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rdx
leaq 0xb0b5(%rip), %rcx      # 0xe460
movq (%rcx,%rdx,8), %rcx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
orq %rcx, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $0x18d, %eax            # imm = 0x18D
movslq %eax, %rcx
leaq 0xb091(%rip), %rax      # 0xe460
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
shrq %rax
xorq %rax, %rdx
movq -0x8(%rbp), %rcx
andq $0x1, %rcx
leaq 0xace4(%rip), %rax      # 0xe0d0
xorq (%rax,%rcx,8), %rdx
movslq -0xc(%rbp), %rcx
leaq 0xb065(%rip), %rax      # 0xe460
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3375
jmp 0x340f
cmpl $0x26f, -0xc(%rbp)      # imm = 0x26F
jge 0x34a7
movslq -0xc(%rbp), %rdx
leaq 0xb039(%rip), %rcx      # 0xe460
movabsq $0x80000000, %rax       # imm = 0x80000000
andq (%rcx,%rdx,8), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rdx
leaq 0xb01b(%rip), %rcx      # 0xe460
movq (%rcx,%rdx,8), %rcx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
orq %rcx, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $0xffffff1d, %eax       # imm = 0xFFFFFF1D
movslq %eax, %rcx
leaq 0xaff7(%rip), %rax      # 0xe460
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
shrq %rax
xorq %rax, %rdx
movq -0x8(%rbp), %rcx
andq $0x1, %rcx
leaq 0xac4a(%rip), %rax      # 0xe0d0
xorq (%rax,%rcx,8), %rdx
movslq -0xc(%rbp), %rcx
leaq 0xafcb(%rip), %rax      # 0xe460
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x340f
movabsq $0x80000000, %rax       # imm = 0x80000000
andq 0xc320(%rip), %rax      # 0xf7d8
movq 0xafa1(%rip), %rcx      # 0xe460
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
orq %rcx, %rax
movq %rax, -0x8(%rbp)
movq 0xbbec(%rip), %rax      # 0xf0c0
movq -0x8(%rbp), %rcx
shrq %rcx
xorq %rcx, %rax
movq -0x8(%rbp), %rdx
andq $0x1, %rdx
leaq 0xabe3(%rip), %rcx      # 0xe0d0
xorq (%rcx,%rdx,8), %rax
movq %rax, 0xc2e0(%rip)      # 0xf7d8
movl $0x0, 0xabbe(%rip)      # 0xe0c0
movl 0xabb8(%rip), %eax      # 0xe0c0
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0xabad(%rip)      # 0xe0c0
movslq %eax, %rcx
leaq 0xaf43(%rip), %rax      # 0xe460
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0xb, %rax
xorq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shlq $0x7, %rax
movabsq $0x9d2c5680, %rcx       # imm = 0x9D2C5680
andq %rcx, %rax
xorq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shlq $0xf, %rax
movabsq $0xefc60000, %rcx       # imm = 0xEFC60000
andq %rcx, %rax
xorq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x12, %rax
xorq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)