// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rdx, -0x8(%rsp)
leaq 0x9a0(%rdi), %rax
leaq 0x9b0(%rdi), %rdx
xorl %ecx, %ecx
movl 0xc(%rax), %r9d
movl 0x8(%rax), %ebp
movq (%rax), %r14
movq %rdx, %rax
leaq (%rsi,%rcx), %rdx
movl 0xc(%rdi,%rcx), %r10d
movl 0x8(%rdi,%rcx), %r11d
movl (%rdi,%rcx), %r12d
movl 0x4(%rdi,%rcx), %ebx
shlq $0x28, %r10
shlq $0x8, %r11
orq %r11, %r10
movq %rbx, %r15
shlq $0x28, %r15
movq %r12, %r13
shlq $0x8, %r13
orq %r13, %r15
shrl $0x18, %ebx
orl %ebx, %r11d
shrq $0x20, %r10
movq %r9, %rbx
shlq $0x20, %rbx
orq %rbp, %rbx
shrdq $0x8, %rbp, %r14
shrq $0x8, %rbx
shrl $0x8, %r9d
movl 0x7a0(%rdi,%rcx), %ebp
shrl $0xb, %ebp
andl $-0x11, %ebp
movl (%rax), %r8d
shll $0x12, %r8d
xorl %ebp, %r8d
xorl %r14d, %r13d
xorl %r8d, %r13d
xorl %r12d, %r13d
movl %r13d, (%rsi,%rcx)
movl 0x7a4(%rdi,%rcx), %r8d
shrl $0xb, %r8d
andl $0x1ecb7f, %r8d         # imm = 0x1ECB7F
movl 0x4(%rax), %ebp
shll $0x12, %ebp
xorl %r8d, %ebp
xorq %r15, %r14
shrq $0x20, %r14
xorl 0x4(%rdi,%rcx), %r14d
xorl %ebp, %r14d
movl %r14d, 0x4(%rsi,%rcx)
movl 0x7a8(%rdi,%rcx), %r8d
shrl $0xb, %r8d
andl $0x1affff, %r8d         # imm = 0x1AFFFF
movl 0x8(%rax), %ebp
shll $0x12, %ebp
xorl %r11d, %ebx
xorl 0x8(%rdi,%rcx), %ebx
xorl %r8d, %ebp
xorl %ebp, %ebx
movl %ebx, 0x8(%rsi,%rcx)
movl 0x7ac(%rdi,%rcx), %r8d
shrl $0xb, %r8d
andl $-0xa, %r8d
movl 0xc(%rax), %r11d
shll $0x12, %r11d
xorl %r8d, %r11d
xorl %r10d, %r9d
xorl 0xc(%rdi,%rcx), %r9d
xorl %r11d, %r9d
movl %r9d, 0xc(%rsi,%rcx)
addq $0x10, %rcx
cmpq $0x220, %rcx            # imm = 0x220
jne 0x107c4
leaq 0x210(%rsi), %r10
leaq (%rsi,%rcx), %r9
addq $-0x10, %r9
movl $0x22c, %ecx            # imm = 0x22C
movl 0xc(%rax), %r8d
movl 0x8(%rax), %edx
movq (%rax), %r14
movq %r9, %rax
movl (%rdi,%rcx), %r9d
movl -0x4(%rdi,%rcx), %r11d
movl -0xc(%rdi,%rcx), %r12d
movl -0x8(%rdi,%rcx), %ebx
shlq $0x28, %r9
shlq $0x8, %r11
orq %r11, %r9
movq %rbx, %r15
shlq $0x28, %r15
shrl $0x18, %ebx
orl %ebx, %r11d
movq %r8, %rbx
shlq $0x20, %rbx
orq %rdx, %rbx
shrdq $0x8, %rdx, %r14
movl -0x210(%r10), %edx
shrl $0xb, %edx
andl $-0x11, %edx
movl (%rax), %ebp
shll $0x12, %ebp
xorl %edx, %ebp
movq %r12, %rdx
shlq $0x8, %rdx
orq %rdx, %r15
xorl %r14d, %edx
xorl %ebp, %edx
xorl %r12d, %edx
movl -0x20c(%r10), %ebp
movl %edx, 0x10(%r10)
shrl $0xb, %ebp
andl $0x1ecb7f, %ebp         # imm = 0x1ECB7F
xorq %r15, %r14
movl 0x4(%rax), %edx
shll $0x12, %edx
shrq $0x20, %r14
xorl -0x8(%rdi,%rcx), %r14d
xorl %ebp, %edx
xorl %edx, %r14d
shrq $0x8, %rbx
movl %r14d, 0x14(%r10)
movl -0x208(%r10), %edx
shrl $0xb, %edx
andl $0x1affff, %edx         # imm = 0x1AFFFF
xorl %r11d, %ebx
movl 0x8(%rax), %r11d
shll $0x12, %r11d
xorl -0x4(%rdi,%rcx), %ebx
xorl %edx, %r11d
xorl %r11d, %ebx
movl %ebx, 0x18(%r10)
movl -0x204(%r10), %edx
shrl $0xb, %edx
andl $-0xa, %edx
movl 0xc(%rax), %r11d
shll $0x12, %r11d
xorl %edx, %r11d
shrq $0x20, %r9
shrl $0x8, %r8d
xorl %r9d, %r8d
xorl (%rdi,%rcx), %r8d
xorl %r11d, %r8d
movl %r8d, 0x1c(%r10)
addq $0x10, %r10
addq $0x10, %rcx
movq %r10, %r9
cmpq $0x9cc, %rcx            # imm = 0x9CC
jne 0x108f1
movl $0x9c, %r8d
movq -0x8(%rsp), %r14
cmpl $0x139, %r14d           # imm = 0x139
jl 0x10b41
leal -0x9c(%r14), %r8d
movl %r8d, %r9d
leaq 0x9b0(%rsi), %rcx
addq $-0x9c, %r9
movl 0xc(%rax), %r11d
movl 0x8(%rax), %ebx
movq (%rax), %r15
movq %r10, %rax
movl -0x9a4(%rcx), %r10d
movl -0x9b0(%rcx), %ebp
movl -0x9ac(%rcx), %r14d
movq %r14, %r12
shlq $0x28, %r12
movl -0x210(%rcx), %edx
shrl $0xb, %edx
andl $-0x11, %edx
movl (%rax), %r13d
shll $0x12, %r13d
xorl %edx, %r13d
movq %rbp, %rdx
shlq $0x8, %rdx
orq %rdx, %r12
shrdq $0x8, %rbx, %r15
xorl %r15d, %edx
xorl %r13d, %edx
movl -0x9a8(%rcx), %r13d
xorl %ebp, %edx
movl %edx, 0x10(%rcx)
movl -0x20c(%rcx), %edx
shrl $0xb, %edx
andl $0x1ecb7f, %edx         # imm = 0x1ECB7F
movl 0x4(%rax), %ebp
shll $0x12, %ebp
xorl %edx, %ebp
xorq %r12, %r15
shrq $0x20, %r15
xorl %r14d, %ebp
xorl %r15d, %ebp
movq %r10, %r15
shlq $0x28, %r15
movl %ebp, 0x14(%rcx)
movl 0x8(%rax), %edx
shll $0x12, %edx
xorl %r13d, %edx
shlq $0x8, %r13
orq %r13, %r15
movl %r14d, %ebp
shrl $0x18, %ebp
orl %ebp, %r13d
movq %r11, %r14
shlq $0x20, %r14
orq %rbx, %r14
movl -0x208(%rcx), %ebx
shrl $0xb, %ebx
andl $0x1affff, %ebx         # imm = 0x1AFFFF
xorl %r13d, %ebx
shrq $0x8, %r14
xorl %ebx, %r14d
xorl %r14d, %edx
shrl $0x8, %r11d
movl %edx, 0x18(%rcx)
movl -0x204(%rcx), %edx
shrl $0xb, %edx
andl $-0xa, %edx
xorl %r11d, %edx
shrq $0x20, %r15
xorl %r15d, %edx
movl 0xc(%rax), %r11d
shll $0x12, %r11d
xorl %r10d, %r11d
xorl %edx, %r11d
movl %r11d, 0x1c(%rcx)
addq $0x10, %rcx
movq %rcx, %r10
decq %r9
jne 0x10a2f
movq -0x8(%rsp), %r14
jmp 0x10b44
movq %r10, %rcx
cmpl $0x137, %r14d           # imm = 0x137
jg 0x10b93
movl $0x138, %edx            # imm = 0x138
subl %r14d, %edx
movslq %r14d, %r10
cmpl $0x2, %edx
movl $0x1, %r9d
cmovgel %edx, %r9d
shlq $0x4, %r10
addq %rsi, %r10
addq $-0x9c0, %r10           # imm = 0xF640
movq %r9, %r11
shlq $0x4, %r11
xorl %ebx, %ebx
movups (%r10,%rbx), %xmm0
movups %xmm0, (%rdi,%rbx)
addq $0x10, %rbx
cmpq %rbx, %r11
jne 0x10b7c
movl %r9d, %r9d
jmp 0x10b96
xorl %r9d, %r9d
cmpl %r14d, %r8d
jge 0x10cd5
movl %r8d, %r8d
movl %r14d, %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), %r11
movq %rcx, %rax
movq %rsi, %rcx
movl -0x9b4(%rsi), %esi
movl -0x9c0(%rcx), %r15d
movl -0x9bc(%rcx), %r10d
movq %r10, %rbx
shlq $0x28, %rbx
movl -0x220(%rcx), %ebp
shrl $0xb, %ebp
andl $-0x11, %ebp
movl (%rax), %r14d
shll $0x12, %r14d
xorl %ebp, %r14d
movq %r15, %r12
shlq $0x8, %r12
orq %r12, %rbx
shrdq $0x8, %r9, %r11
xorl %r11d, %r12d
xorl %r14d, %r12d
movl -0x9b8(%rcx), %r14d
xorl %r15d, %r12d
movl %r12d, (%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, %r11
shrq $0x20, %r11
xorl %r10d, %r15d
xorl %r11d, %r15d
movq %rsi, %r11
shlq $0x28, %r11
movl %r15d, 0x4(%rcx)
movl 0x8(%rax), %ebx
shll $0x12, %ebx
xorl %r14d, %ebx
shlq $0x8, %r14
orq %r14, %r11
shrl $0x18, %r10d
orl %r10d, %r14d
movq %r8, %r10
shlq $0x20, %r10
orq %r9, %r10
movl -0x218(%rcx), %r9d
shrl $0xb, %r9d
andl $0x1affff, %r9d         # imm = 0x1AFFFF
xorl %r14d, %r9d
shrq $0x8, %r10
xorl %r9d, %r10d
xorl %r10d, %ebx
shrl $0x8, %r8d
movl %ebx, 0x8(%rcx)
movl -0x214(%rcx), %r9d
shrl $0xb, %r9d
andl $-0xa, %r9d
xorl %r8d, %r9d
shrq $0x20, %r11
xorl %r11d, %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 0x10bb6
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq