// File: /workspace/github_c_makefile_star2_O1/zpole[P]IICV/vl/random.c
// Function: vl_rand_uint32
vl_uint32
vl_rand_uint32 (VlRand * self)
{
  vl_uint32 y;
  static vl_uint32 mag01[2]={VL_UINT32_C(0x0), MATRIX_A};
  /* mag01[x] = x * MATRIX_A  for x=0,1 */

#define mti self->mti
#define mt self->mt

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

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

    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 & VL_UINT32_C(0x1)];
    }
    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 & VL_UINT32_C(0x1)];
    }
    y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK);
    mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & VL_UINT32_C(0x1)];

    mti = 0;
  }

  y = mt[mti++];

  /* Tempering */
  y ^= (y >> 11);
  y ^= (y << 7) & VL_UINT32_C(0x9d2c5680);
  y ^= (y << 15) & VL_UINT32_C(0xefc60000);
  y ^= (y >> 18);

  return (vl_uint32)y;

#undef mti
#undef mt
}

// Assembly:
movl 0x9c0(%rdi), %eax
cmpl $0x270, %eax            # imm = 0x270
jb 0x29ace
cmpl $0x271, %eax            # imm = 0x271
jne 0x29a04
movl $0x1571, (%rdi)         # imm = 0x1571
movl $0x1, 0x9c0(%rdi)
movl $0x1, %eax
leal -0x1(%rax), %ecx
movl (%rdi,%rcx,4), %ecx
movl %ecx, %edx
shrl $0x1e, %edx
xorl %ecx, %edx
imull $0x6c078965, %edx, %ecx # imm = 0x6C078965
addl %eax, %ecx
movl %eax, %eax
movl %ecx, (%rdi,%rax,4)
movl 0x9c0(%rdi), %eax
incl %eax
movl %eax, 0x9c0(%rdi)
cmpl $0x270, %eax            # imm = 0x270
jb 0x299d5
xorl %edx, %edx
movl $0x80000000, %ecx       # imm = 0x80000000
leaq 0xa916(%rip), %rax      # 0x34328
movl (%rdi,%rdx,4), %esi
andl %ecx, %esi
movl 0x4(%rdi,%rdx,4), %r8d
movl %r8d, %r9d
andl $0x7ffffffe, %r9d       # imm = 0x7FFFFFFE
orl %esi, %r9d
shrl %r9d
andl $0x1, %r8d
movl (%rax,%r8,4), %esi
xorl 0x634(%rdi,%rdx,4), %esi
xorl %r9d, %esi
movl %esi, (%rdi,%rdx,4)
leaq 0x1(%rdx), %rsi
movq %rsi, %rdx
cmpq $0xe3, %rsi
jne 0x29a12
movl $0xe4, %ecx
movl $0x80000000, %edx       # imm = 0x80000000
movl -0x4(%rdi,%rcx,4), %esi
andl %edx, %esi
movl (%rdi,%rcx,4), %r8d
movl %r8d, %r9d
andl $0x7ffffffe, %r9d       # imm = 0x7FFFFFFE
orl %esi, %r9d
shrl %r9d
andl $0x1, %r8d
movl (%rax,%r8,4), %esi
xorl -0x390(%rdi,%rcx,4), %esi
xorl %r9d, %esi
movl %esi, -0x4(%rdi,%rcx,4)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x29a5b
movl $0x80000000, %ecx       # imm = 0x80000000
andl 0x9bc(%rdi), %ecx
movl (%rdi), %edx
movl %edx, %esi
andl $0x7ffffffe, %esi       # imm = 0x7FFFFFFE
orl %ecx, %esi
andl $0x1, %edx
movl (%rax,%rdx,4), %eax
xorl 0x630(%rdi), %eax
shrl %esi
xorl %esi, %eax
movl %eax, 0x9bc(%rdi)
movl $0x0, 0x9c0(%rdi)
movl 0x9c0(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x9c0(%rdi)
movl (%rdi,%rax,4), %eax
movl %eax, %ecx
shrl $0xb, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0x7, %eax
andl $0x9d2c5680, %eax       # imm = 0x9D2C5680
xorl %ecx, %eax
movl %eax, %ecx
shll $0xf, %ecx
andl $0xefc60000, %ecx       # imm = 0xEFC60000
xorl %eax, %ecx
movl %ecx, %eax
shrl $0x12, %eax
xorl %ecx, %eax
retq