// File: /workspace/github_cpp_makefile_star2_O1/JenTus[P]TCEM/src_TCEM/sfmt/SFMT.c
// Function: gen_rand_array(SFMT_T*, W128_T*, int)
inline static void gen_rand_array(sfmt_t * sfmt, w128_t *array, int size) {
    int i, j;
    w128_t *r1, *r2;

    r1 = &sfmt->state[SFMT_N - 2];
    r2 = &sfmt->state[SFMT_N - 1];
    for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
	do_recursion(&array[i], &sfmt->state[i], &sfmt->state[i + SFMT_POS1], r1, r2);
	r1 = r2;
	r2 = &array[i];
    }
    for (; i < SFMT_N; i++) {
	do_recursion(&array[i], &sfmt->state[i],
		     &array[i + SFMT_POS1 - SFMT_N], r1, r2);
	r1 = r2;
	r2 = &array[i];
    }
    for (; i < size - SFMT_N; i++) {
	do_recursion(&array[i], &array[i - SFMT_N],
		     &array[i + SFMT_POS1 - SFMT_N], r1, r2);
	r1 = r2;
	r2 = &array[i];
    }
    for (j = 0; j < 2 * SFMT_N - size; j++) {
	sfmt->state[j] = array[j + size - SFMT_N];
    }
    for (; i < size; i++, j++) {
	do_recursion(&array[i], &array[i - SFMT_N],
		     &array[i + SFMT_POS1 - SFMT_N], r1, r2);
	r1 = r2;
	r2 = &array[i];
	sfmt->state[j] = array[i];
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x9a0(%rdi), %rax
leaq 0x9b0(%rdi), %r9
xorl %ecx, %ecx
movl 0xc(%rax), %r8d
movl 0x8(%rax), %r12d
movq (%rax), %r14
movq %r9, %rax
movl 0xc(%rdi,%rcx), %r9d
movl 0x8(%rdi,%rcx), %r10d
movl (%rdi,%rcx), %r13d
movl 0x4(%rdi,%rcx), %ebx
shlq $0x28, %r9
shlq $0x8, %r10
orq %r10, %r9
movq %rbx, %r11
shlq $0x28, %r11
shrdq $0x8, %r12, %r14
movq %r14, %r15
xorl %r13d, %r14d
shlq $0x8, %r13
orq %r13, %r11
shrl $0x18, %ebx
orl %ebx, %r10d
movq %r8, %rbx
shlq $0x20, %rbx
orq %r12, %rbx
movl (%rax), %ebp
shll $0x12, %ebp
xorl %r13d, %ebp
movl 0x7a0(%rdi,%rcx), %r12d
shrl $0xb, %r12d
andl $-0x11, %r12d
xorl %r12d, %ebp
xorl %ebp, %r14d
shrq $0x20, %r15
movl %r14d, (%rsi,%rcx)
movl 0x7a4(%rdi,%rcx), %ebp
shrl $0xb, %ebp
andl $0x1ecb7f, %ebp         # imm = 0x1ECB7F
xorl %r15d, %ebp
movl 0x4(%rax), %r14d
shll $0x12, %r14d
xorl %r14d, %ebp
shrq $0x20, %r11
xorl 0x4(%rdi,%rcx), %r11d
xorl %r11d, %ebp
movl %ebp, 0x4(%rsi,%rcx)
movl 0x7a8(%rdi,%rcx), %r11d
shrl $0xb, %r11d
andl $0x1affff, %r11d        # imm = 0x1AFFFF
movl 0x8(%rax), %ebp
shll $0x12, %ebp
xorl %r11d, %ebp
shrq $0x8, %rbx
xorl %r10d, %ebx
xorl 0x8(%rdi,%rcx), %ebx
xorl %ebp, %ebx
movl %ebx, 0x8(%rsi,%rcx)
movl 0x7ac(%rdi,%rcx), %r10d
shrl $0xb, %r10d
andl $-0xa, %r10d
movl 0xc(%rax), %r11d
shll $0x12, %r11d
xorl %r10d, %r11d
shrq $0x20, %r9
shrl $0x8, %r8d
xorl %r9d, %r8d
xorl 0xc(%rdi,%rcx), %r8d
xorl %r11d, %r8d
movl %r8d, 0xc(%rsi,%rcx)
leaq (%rsi,%rcx), %r9
addq $0x10, %rcx
cmpq $0x220, %rcx            # imm = 0x220
jne 0x10b21
leaq 0x210(%rsi), %r10
leaq (%rsi,%rcx), %r9
addq $-0x10, %r9
movl $0x22c, %ecx            # imm = 0x22C
movl 0xc(%rax), %r8d
movl 0x8(%rax), %r13d
movq (%rax), %r15
movq %r9, %rax
movl (%rdi,%rcx), %r9d
movl -0x4(%rdi,%rcx), %r11d
movl -0xc(%rdi,%rcx), %ebp
movl -0x8(%rdi,%rcx), %r14d
shlq $0x28, %r9
shlq $0x8, %r11
orq %r11, %r9
movq %r14, %rbx
shlq $0x28, %rbx
shrdq $0x8, %r13, %r15
movq %r15, %r12
xorl %ebp, %r15d
shlq $0x8, %rbp
orq %rbp, %rbx
shrl $0x18, %r14d
orl %r14d, %r11d
movq %r8, %r14
shlq $0x20, %r14
orq %r13, %r14
movl (%rax), %r13d
shll $0x12, %r13d
xorl %ebp, %r13d
movl -0x210(%r10), %ebp
shrl $0xb, %ebp
andl $-0x11, %ebp
xorl %ebp, %r13d
xorl %r13d, %r15d
movl -0x20c(%r10), %ebp
movl %r15d, 0x10(%r10)
shrq $0x20, %rbx
shrq $0x20, %r12
xorl -0x8(%rdi,%rcx), %ebx
shrl $0xb, %ebp
andl $0x1ecb7f, %ebp         # imm = 0x1ECB7F
xorl %r12d, %ebp
movl 0x4(%rax), %r15d
shll $0x12, %r15d
xorl %r15d, %ebp
xorl %ebx, %ebp
shrq $0x8, %r14
movl %ebp, 0x14(%r10)
movl -0x208(%r10), %ebx
shrl $0xb, %ebx
andl $0x1affff, %ebx         # imm = 0x1AFFFF
xorl %r11d, %r14d
movl 0x8(%rax), %r11d
shll $0x12, %r11d
xorl -0x4(%rdi,%rcx), %r14d
xorl %ebx, %r11d
xorl %r11d, %r14d
movl %r14d, 0x18(%r10)
movl -0x204(%r10), %r11d
shrl $0xb, %r11d
andl $-0xa, %r11d
movl 0xc(%rax), %ebx
shll $0x12, %ebx
xorl %r11d, %ebx
shrq $0x20, %r9
shrl $0x8, %r8d
xorl %r9d, %r8d
xorl (%rdi,%rcx), %r8d
xorl %ebx, %r8d
movl %r8d, 0x1c(%r10)
addq $0x10, %r10
addq $0x10, %rcx
movq %r10, %r9
cmpq $0x9cc, %rcx            # imm = 0x9CC
jne 0x10c52
movl $0x9c, %r8d
cmpl $0x139, %edx            # imm = 0x139
jl 0x10eb8
movq %rdx, -0x8(%rsp)
addl $0xffffff64, %edx       # imm = 0xFFFFFF64
leaq 0x9b0(%rsi), %rcx
movl $0x9c, %r8d
movl 0xc(%rax), %r11d
movl 0x8(%rax), %ebx
movq (%rax), %r14
movq %r10, %rax
movl -0x9a4(%rcx), %r10d
movl -0x9b0(%rcx), %r13d
movl -0x9ac(%rcx), %r15d
movq %r15, %r12
shlq $0x28, %r12
shrdq $0x8, %rbx, %r14
movl %r14d, %ebp
xorl %r13d, %ebp
shlq $0x8, %r13
orq %r13, %r12
movl (%rax), %r9d
shll $0x12, %r9d
xorl %r13d, %r9d
movl -0x210(%rcx), %r13d
shrl $0xb, %r13d
andl $-0x11, %r13d
xorl %r13d, %r9d
movl -0x9a8(%rcx), %r13d
xorl %r9d, %ebp
movl %ebp, 0x10(%rcx)
movl -0x20c(%rcx), %r9d
shrl $0xb, %r9d
andl $0x1ecb7f, %r9d         # imm = 0x1ECB7F
movl 0x4(%rax), %ebp
shll $0x12, %ebp
xorl %r9d, %ebp
xorq %r12, %r14
xorl %r15d, %ebp
movl %r15d, %r9d
shrq $0x20, %r14
xorl %r14d, %ebp
movq %r10, %r14
shlq $0x28, %r14
movl %ebp, 0x14(%rcx)
movl 0x8(%rax), %ebp
shll $0x12, %ebp
xorl %r13d, %ebp
shlq $0x8, %r13
orq %r13, %r14
shrl $0x18, %r9d
orl %r9d, %r13d
movq %r11, %r9
shlq $0x20, %r9
orq %rbx, %r9
movl -0x208(%rcx), %ebx
shrl $0xb, %ebx
andl $0x1affff, %ebx         # imm = 0x1AFFFF
xorl %r13d, %ebx
shrq $0x8, %r9
xorl %ebx, %r9d
xorl %r9d, %ebp
shrl $0x8, %r11d
movl %ebp, 0x18(%rcx)
movl -0x204(%rcx), %r9d
shrl $0xb, %r9d
andl $-0xa, %r9d
xorl %r11d, %r9d
shrq $0x20, %r14
xorl %r14d, %r9d
movl 0xc(%rax), %r11d
shll $0x12, %r11d
xorl %r10d, %r11d
xorl %r9d, %r11d
movl %r11d, 0x1c(%rcx)
addq $0x10, %rcx
incq %r8
movq %rcx, %r10
cmpq %r8, %rdx
jne 0x10d96
movq -0x8(%rsp), %rdx
jmp 0x10ebb
movq %r10, %rcx
cmpl $0x137, %edx            # imm = 0x137
jg 0x10f09
movl $0x138, %r9d            # imm = 0x138
subl %edx, %r9d
movslq %edx, %r10
cmpl $0x2, %r9d
movl $0x1, %r11d
cmovgel %r9d, %r11d
shlq $0x4, %r10
addq %rsi, %r10
movq $-0x9c0, %rbx           # imm = 0xF640
xorl %r9d, %r9d
movups (%r10,%rbx), %xmm0
movups %xmm0, 0x9c0(%rdi,%rbx)
incq %r9
addq $0x10, %rbx
cmpq %r9, %r11
jne 0x10eee
jmp 0x10f0c
xorl %r9d, %r9d
cmpl %edx, %r8d
jge 0x1104c
movl %r8d, %r8d
movl %edx, %edx
subq %r8, %rdx
shlq $0x4, %r8
addq %r8, %rsi
shlq $0x4, %r9
addq %r9, %rdi
movl 0xc(%rax), %r8d
movl 0x8(%rax), %r9d
movq (%rax), %r10
movq %rcx, %rax
movq %rsi, %rcx
movl -0x9b4(%rsi), %esi
movl -0x9c0(%rcx), %r14d
movl -0x9bc(%rcx), %r11d
movq %r11, %rbx
shlq $0x28, %rbx
shrdq $0x8, %r9, %r10
movl %r10d, %ebp
xorl %r14d, %ebp
shlq $0x8, %r14
orq %r14, %rbx
movl (%rax), %r15d
shll $0x12, %r15d
xorl %r14d, %r15d
movl -0x220(%rcx), %r14d
shrl $0xb, %r14d
andl $-0x11, %r14d
xorl %r14d, %r15d
movl -0x9b8(%rcx), %r14d
xorl %r15d, %ebp
movl %ebp, (%rcx)
movl -0x21c(%rcx), %ebp
shrl $0xb, %ebp
andl $0x1ecb7f, %ebp         # imm = 0x1ECB7F
movl 0x4(%rax), %r15d
shll $0x12, %r15d
xorl %ebp, %r15d
xorq %rbx, %r10
xorl %r11d, %r15d
shrq $0x20, %r10
xorl %r10d, %r15d
movq %rsi, %r10
shlq $0x28, %r10
movl %r15d, 0x4(%rcx)
movl 0x8(%rax), %ebx
shll $0x12, %ebx
xorl %r14d, %ebx
shlq $0x8, %r14
orq %r14, %r10
shrl $0x18, %r11d
orl %r11d, %r14d
movq %r8, %r11
shlq $0x20, %r11
orq %r9, %r11
movl -0x218(%rcx), %r9d
shrl $0xb, %r9d
andl $0x1affff, %r9d         # imm = 0x1AFFFF
xorl %r14d, %r9d
shrq $0x8, %r11
xorl %r9d, %r11d
xorl %r11d, %ebx
shrl $0x8, %r8d
movl %ebx, 0x8(%rcx)
movl -0x214(%rcx), %r9d
shrl $0xb, %r9d
andl $-0xa, %r9d
xorl %r8d, %r9d
shrq $0x20, %r10
xorl %r10d, %r9d
movl 0xc(%rax), %r8d
shll $0x12, %r8d
xorl %esi, %r8d
xorl %r9d, %r8d
movl %r8d, 0xc(%rcx)
movups (%rcx), %xmm0
movups %xmm0, (%rdi)
leaq 0x10(%rcx), %rsi
addq $0x10, %rdi
decq %rdx
jne 0x10f2b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq