// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/random.c
// Function: vl_rand_seed_by_array
void
vl_rand_seed_by_array (VlRand * self, vl_uint32 const key [], vl_size keySize)
{
#define mti self->mti
#define mt self->mt
  int i, j, k;
  vl_rand_seed (self, VL_UINT32_C(19650218));
  i=1; j=0;
  k = (N > keySize ? N : (int)keySize);
  for (; k; k--) {
    mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * VL_UINT32_C(1664525)))
      + key[j] + j; /* non linear */
    mt[i] &= VL_UINT32_C(0xffffffff); /* for WORDSIZE > 32 machines */
    i++; j++;
    if (i>=N) { mt[0] = mt[N-1]; i=1; }
    if (j>=(signed)keySize) j=0;
  }
  for (k=N-1; k; k--) {
    mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * VL_UINT32_C(1566083941)))
      - i; /* non linear */
    mt[i] &= VL_UINT32_C(0xffffffff) ; /* for WORDSIZE > 32 machines */
    i++;
    if (i>=N) { mt[0] = mt[N-1]; i=1; }
  }

  mt[0] = VL_UINT32_C(0x80000000); /* MSB is 1; assuring non-zero initial array */
#undef mti
#undef mt
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0x12bd6aa, %esi        # imm = 0x12BD6AA
callq 0x94f0
movl $0x1, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x270, %eax            # imm = 0x270
cmpq 0x10(%rsp), %rax
jbe 0x48868
movl $0x270, %eax            # imm = 0x270
movl %eax, (%rsp)
jmp 0x48870
movq 0x10(%rsp), %rax
movl %eax, (%rsp)
movl (%rsp), %eax
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
je 0x48952
movq 0x20(%rsp), %rax
movslq 0xc(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x20(%rsp), %rax
movl 0xc(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq 0x20(%rsp), %rcx
movl 0xc(%rsp), %esi
subl $0x1, %esi
movslq %esi, %rsi
movl (%rcx,%rsi,4), %ecx
shrl $0x1e, %ecx
xorl %ecx, %eax
imull $0x19660d, %eax, %eax   # imm = 0x19660D
xorl %eax, %edx
movq 0x18(%rsp), %rax
movslq 0x8(%rsp), %rcx
addl (%rax,%rcx,4), %edx
addl 0x8(%rsp), %edx
movq 0x20(%rsp), %rax
movslq 0xc(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x20(%rsp), %rax
movslq 0xc(%rsp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
cmpl $0x270, 0xc(%rsp)       # imm = 0x270
jl 0x4892b
movq 0x20(%rsp), %rax
movl 0x9bc(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movl $0x1, 0xc(%rsp)
movl 0x8(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl %ecx, %eax
jl 0x48940
movl $0x0, 0x8(%rsp)
jmp 0x48942
movl 0x4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x48877
movl $0x26f, 0x4(%rsp)       # imm = 0x26F
cmpl $0x0, 0x4(%rsp)
je 0x48a08
movq 0x20(%rsp), %rax
movslq 0xc(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x20(%rsp), %rax
movl 0xc(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq 0x20(%rsp), %rcx
movl 0xc(%rsp), %esi
subl $0x1, %esi
movslq %esi, %rsi
movl (%rcx,%rsi,4), %ecx
shrl $0x1e, %ecx
xorl %ecx, %eax
imull $0x5d588b65, %eax, %eax # imm = 0x5D588B65
xorl %eax, %edx
subl 0xc(%rsp), %edx
movq 0x20(%rsp), %rax
movslq 0xc(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x20(%rsp), %rax
movslq 0xc(%rsp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
cmpl $0x270, 0xc(%rsp)       # imm = 0x270
jl 0x489f6
movq 0x20(%rsp), %rax
movl 0x9bc(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movl $0x1, 0xc(%rsp)
jmp 0x489f8
movl 0x4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4895a
movq 0x20(%rsp), %rax
movl $0x80000000, (%rax)     # imm = 0x80000000
addq $0x28, %rsp
retq
nopl (%rax,%rax)