// File: attractivechaos[P]udb2/stb/./stb.h
// Function: stb_rand
unsigned long stb_rand()
{
   unsigned long * b = stb__mt_buffer;
   int idx = stb__mt_index;
   unsigned long s,r;
   int i;
	
   if (idx >= STB__MT_LEN*sizeof(unsigned long)) {
      if (idx > STB__MT_LEN*sizeof(unsigned long))
         stb_srand(0);
      idx = 0;
      i = 0;
      for (; i < STB__MT_IB; i++) {
         s = STB__TWIST(b, i, i+1);
         b[i] = b[i + STB__MT_IA] ^ (s >> 1) ^ STB__MAGIC(s);
      }
      for (; i < STB__MT_LEN-1; i++) {
         s = STB__TWIST(b, i, i+1);
         b[i] = b[i - STB__MT_IB] ^ (s >> 1) ^ STB__MAGIC(s);
      }
      
      s = STB__TWIST(b, STB__MT_LEN-1, 0);
      b[STB__MT_LEN-1] = b[STB__MT_IA-1] ^ (s >> 1) ^ STB__MAGIC(s);
   }
   stb__mt_index = idx + sizeof(unsigned long);
   
   r = *(unsigned long *)((unsigned char *)b + idx);
   
   r ^= (r >> 11);
   r ^= (r << 7) & 0x9D2C5680;
   r ^= (r << 15) & 0xEFC60000;
   r ^= (r >> 18);
   
   return r;
}

// Assembly:
subq $0x28, %rsp
leaq 0x161e5(%rip), %rax     # 0x2abc0
movq %rax, 0x20(%rsp)
movl 0x1199e(%rip), %eax     # 0x26384
movl %eax, 0x1c(%rsp)
movslq 0x1c(%rsp), %rax
cmpq $0x1380, %rax           # imm = 0x1380
jb 0x14bcf
movslq 0x1c(%rsp), %rax
cmpq $0x1380, %rax           # imm = 0x1380
jbe 0x14a11
xorl %eax, %eax
movl %eax, %edi
callq 0x14960
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x4(%rsp)
cmpl $0xe3, 0x4(%rsp)
jge 0x14ac2
movq 0x20(%rsp), %rcx
movslq 0x4(%rsp), %rdx
movabsq $0x80000000, %rax       # imm = 0x80000000
andq (%rcx,%rdx,8), %rax
movq 0x20(%rsp), %rcx
movl 0x4(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
orq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x18d, %ecx            # imm = 0x18D
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x10(%rsp), %rax
shrq %rax
xorq %rax, %rdx
movq 0x10(%rsp), %rax
andq $0x1, %rax
movabsq $0x9908b0df, %rcx       # imm = 0x9908B0DF
imulq %rcx, %rax
xorq %rax, %rdx
movq 0x20(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x14a21
jmp 0x14ac4
cmpl $0x26f, 0x4(%rsp)       # imm = 0x26F
jge 0x14b65
movq 0x20(%rsp), %rcx
movslq 0x4(%rsp), %rdx
movabsq $0x80000000, %rax       # imm = 0x80000000
andq (%rcx,%rdx,8), %rax
movq 0x20(%rsp), %rcx
movl 0x4(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
orq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl 0x4(%rsp), %ecx
subl $0xe3, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x10(%rsp), %rax
shrq %rax
xorq %rax, %rdx
movq 0x10(%rsp), %rax
andq $0x1, %rax
movabsq $0x9908b0df, %rcx       # imm = 0x9908B0DF
imulq %rcx, %rax
xorq %rax, %rdx
movq 0x20(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x14ac4
movq 0x20(%rsp), %rcx
movabsq $0x80000000, %rax       # imm = 0x80000000
andq 0x1378(%rcx), %rax
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
orq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0xc60(%rax), %rcx
movq 0x10(%rsp), %rax
shrq %rax
xorq %rax, %rcx
movq 0x10(%rsp), %rax
andq $0x1, %rax
movabsq $0x9908b0df, %rdx       # imm = 0x9908B0DF
imulq %rdx, %rax
xorq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x1378(%rax)
movslq 0x1c(%rsp), %rax
addq $0x8, %rax
movl %eax, 0x117a6(%rip)     # 0x26384
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movq (%rax,%rcx), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
shrq $0xb, %rax
xorq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
shlq $0x7, %rax
movabsq $0x9d2c5680, %rcx       # imm = 0x9D2C5680
andq %rcx, %rax
xorq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
shlq $0xf, %rax
movabsq $0xefc60000, %rcx       # imm = 0xEFC60000
andq %rcx, %rax
xorq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
shrq $0x12, %rax
xorq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)