// File: /workspace/github_cpp_makefile_star2_O1/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:
movl 0xdd76(%rip), %ecx      # 0x1a23c
cmpl $0x1380, %ecx           # imm = 0x1380
jb 0xc637
je 0xc539
movq 0x1257d(%rip), %rax     # 0x1ea58
movq $0x0, 0x12572(%rip) # 0x1ea58
xorl %ecx, %ecx
leaq 0x12571(%rip), %rdx     # 0x1ea60
xorl %esi, %esi
imulq $0x7ff8a3ed, %rsi, %rsi # imm = 0x7FF8A3ED
addq $0x2aa01d31, %rsi       # imm = 0x2AA01D31
movq %rsi, %rdi
shrq $0x10, %rdi
movq %rsi, %r8
shlq $0x10, %r8
addq %rdi, %r8
xorq $0x31415926, %r8        # imm = 0x31415926
movq %r8, (%rcx,%rdx)
addq $0x8, %rcx
cmpq $0x1380, %rcx           # imm = 0x1380
jne 0xc4f1
movq %rax, 0x12529(%rip)     # 0x1ea58
movl $0x1380, 0xdd03(%rip)   # imm = 0x1380
movl $0x9908b0df, %eax       # imm = 0x9908B0DF
xorl %edx, %edx
leaq 0x12519(%rip), %rcx     # 0x1ea60
movl $0x80000000, %esi       # imm = 0x80000000
movq 0x8(%rcx,%rdx,8), %rdi
movl $0x9908b0df, %r8d       # imm = 0x9908B0DF
testb $0x1, %dil
jne 0xc560
xorl %r8d, %r8d
movl (%rcx,%rdx,8), %r9d
andl %esi, %r9d
andl $0x7ffffffe, %edi       # imm = 0x7FFFFFFE
orl %r9d, %edi
shrl %edi
xorq 0xc68(%rcx,%rdx,8), %r8
xorq %rdi, %r8
movq %r8, (%rcx,%rdx,8)
leaq 0x1(%rdx), %rdi
movq %rdi, %rdx
cmpq $0xe3, %rdi
jne 0xc54c
xorl %edx, %edx
movdqa 0x5c05(%rip), %xmm0     # 0x121a0
movdqa 0x5c0d(%rip), %xmm1     # 0x121b0
movdqa 0x5c15(%rip), %xmm2     # 0x121c0
movdqu 0x718(%rcx,%rdx,8), %xmm3
pand %xmm0, %xmm3
movdqa 0x720(%rcx,%rdx,8), %xmm4
movdqa %xmm4, %xmm5
pand %xmm1, %xmm5
por %xmm3, %xmm5
psrlq $0x1, %xmm5
pslld $0x1f, %xmm4
psrad $0x1f, %xmm4
pand %xmm2, %xmm4
pxor (%rcx,%rdx,8), %xmm4
pxor %xmm5, %xmm4
movdqu %xmm4, 0x718(%rcx,%rdx,8)
addq $0x2, %rdx
cmpq $0x18c, %rdx            # imm = 0x18C
jne 0xc5ab
movl $0x80000000, %ecx       # imm = 0x80000000
andl 0x137ce(%rip), %ecx     # 0x1fdd8
movq 0x1244f(%rip), %rdx     # 0x1ea60
movl %edx, %esi
andl $0x7ffffffe, %esi       # imm = 0x7FFFFFFE
orl %ecx, %esi
shrl %esi
xorl %ecx, %ecx
testb $0x1, %dl
cmoveq %rcx, %rax
xorq 0x13093(%rip), %rax     # 0x1f6c0
xorq %rsi, %rax
movq %rax, 0x137a1(%rip)     # 0x1fdd8
movl %ecx, %eax
addl $0x8, %ecx
movl %ecx, 0xdbfa(%rip)      # 0x1a23c
leaq 0x12417(%rip), %rcx     # 0x1ea60
movq (%rax,%rcx), %rax
movq %rax, %rcx
shrq $0xb, %rcx
xorq %rax, %rcx
movl %ecx, %eax
shll $0x7, %eax
andl $0x9d2c5680, %eax       # imm = 0x9D2C5680
xorq %rcx, %rax
movl %eax, %ecx
shll $0xf, %ecx
andl $0xefc60000, %ecx       # imm = 0xEFC60000
xorq %rax, %rcx
movq %rcx, %rax
shrq $0x12, %rax
xorq %rcx, %rax
retq