// File: /workspace/github_c_makefile_star2_O0/debbiemarkslab[P]plmc/src/lib/twister.c
// Function: init_by_array
void init_by_array(unsigned long init_key[], int key_length)
{
    int i, j, k;
    init_genrand(19650218UL);
    i=1; j=0;
    k = (N>key_length ? N : key_length);
    for (; k; k--) {
        mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL))
          + init_key[j] + j; /* non linear */
        mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
        i++; j++;
        if (i>=N) { mt[0] = mt[N-1]; i=1; }
        if (j>=key_length) j=0;
    }
    for (k=N-1; k; k--) {
        mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL))
          - i; /* non linear */
        mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
        i++;
        if (i>=N) { mt[0] = mt[N-1]; i=1; }
    }

    mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ 
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl $0x12bd6aa, %edi        # imm = 0x12BD6AA
callq 0x1330
movl $0x1, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x270, %eax            # imm = 0x270
cmpl 0x1c(%rsp), %eax
jle 0x143d
movl $0x270, %eax            # imm = 0x270
movl %eax, 0xc(%rsp)
jmp 0x1445
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0x1548
movslq 0x18(%rsp), %rcx
leaq 0x1ad1c(%rip), %rax     # 0x1c180
movq (%rax,%rcx,8), %rdx
movl 0x18(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x1ad07(%rip), %rax     # 0x1c180
movq (%rax,%rcx,8), %rax
movl 0x18(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rsi
leaq 0x1acf2(%rip), %rcx     # 0x1c180
movq (%rcx,%rsi,8), %rcx
shrq $0x1e, %rcx
xorq %rcx, %rax
imulq $0x19660d, %rax, %rax   # imm = 0x19660D
xorq %rax, %rdx
movq 0x20(%rsp), %rax
movslq 0x14(%rsp), %rcx
addq (%rax,%rcx,8), %rdx
movslq 0x14(%rsp), %rax
addq %rax, %rdx
movslq 0x18(%rsp), %rcx
leaq 0x1acbb(%rip), %rax     # 0x1c180
movq %rdx, (%rax,%rcx,8)
movslq 0x18(%rsp), %rcx
leaq 0x1acab(%rip), %rax     # 0x1c180
movabsq $0xffffffff, %rdx       # imm = 0xFFFFFFFF
andq (%rax,%rcx,8), %rdx
leaq 0x1ac96(%rip), %rax     # 0x1c180
movq %rdx, (%rax,%rcx,8)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
cmpl $0x270, 0x18(%rsp)      # imm = 0x270
jl 0x1524
movq 0x1bfe3(%rip), %rax     # 0x1d4f8
movq %rax, 0x1ac64(%rip)     # 0x1c180
movl $0x1, 0x18(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jl 0x1536
movl $0x0, 0x14(%rsp)
jmp 0x1538
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x144d
movl $0x26f, 0x10(%rsp)      # imm = 0x26F
cmpl $0x0, 0x10(%rsp)
je 0x1620
movslq 0x18(%rsp), %rcx
leaq 0x1ac19(%rip), %rax     # 0x1c180
movq (%rax,%rcx,8), %rdx
movl 0x18(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x1ac04(%rip), %rax     # 0x1c180
movq (%rax,%rcx,8), %rax
movl 0x18(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rsi
leaq 0x1abef(%rip), %rcx     # 0x1c180
movq (%rcx,%rsi,8), %rcx
shrq $0x1e, %rcx
xorq %rcx, %rax
imulq $0x5d588b65, %rax, %rax # imm = 0x5D588B65
xorq %rax, %rdx
movslq 0x18(%rsp), %rax
subq %rax, %rdx
movslq 0x18(%rsp), %rcx
leaq 0x1abc6(%rip), %rax     # 0x1c180
movq %rdx, (%rax,%rcx,8)
movslq 0x18(%rsp), %rcx
leaq 0x1abb6(%rip), %rax     # 0x1c180
movabsq $0xffffffff, %rdx       # imm = 0xFFFFFFFF
andq (%rax,%rcx,8), %rdx
leaq 0x1aba1(%rip), %rax     # 0x1c180
movq %rdx, (%rax,%rcx,8)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
cmpl $0x270, 0x18(%rsp)      # imm = 0x270
jl 0x160e
movq 0x1bef9(%rip), %rax     # 0x1d4f8
movq %rax, 0x1ab7a(%rip)     # 0x1c180
movl $0x1, 0x18(%rsp)
jmp 0x1610
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x1550
movl $0x80000000, %eax       # imm = 0x80000000
movq %rax, 0x1ab54(%rip)     # 0x1c180
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)