// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/pattern/Pattern.cpp
// Function: UpdatePatternStone(pattern_t*, int, int)
void
UpdatePatternStone( pattern_t *pat, const int color, const int pos )
{
  //  3x3 
  pat[pos + NW].list[MD_2] |= update_mask[0][color];
  pat[pos +  N].list[MD_2] |= update_mask[1][color];
  pat[pos + NE].list[MD_2] |= update_mask[2][color];
  pat[pos +  W].list[MD_2] |= update_mask[3][color];
  pat[pos +  E].list[MD_2] |= update_mask[4][color];
  pat[pos + SW].list[MD_2] |= update_mask[5][color];
  pat[pos +  S].list[MD_2] |= update_mask[6][color];
  pat[pos + SE].list[MD_2] |= update_mask[7][color];

  //  md2
  pat[pos + NN].list[MD_2] |= update_mask[8][color];
  pat[pos + EE].list[MD_2] |= update_mask[9][color];
  pat[pos + SS].list[MD_2] |= update_mask[10][color];
  pat[pos + WW].list[MD_2] |= update_mask[11][color];

  //  md3
  pat[pos + NN + N].list[MD_3] |= update_mask[12][color];
  pat[pos + NN + E].list[MD_3] |= update_mask[13][color];
  pat[pos + EE + N].list[MD_3] |= update_mask[14][color];
  pat[pos + EE + E].list[MD_3] |= update_mask[15][color];
  pat[pos + EE + S].list[MD_3] |= update_mask[16][color];
  pat[pos + SS + E].list[MD_3] |= update_mask[17][color];
  pat[pos + SS + S].list[MD_3] |= update_mask[18][color];
  pat[pos + SS + W].list[MD_3] |= update_mask[19][color];
  pat[pos + WW + S].list[MD_3] |= update_mask[20][color];
  pat[pos + WW + W].list[MD_3] |= update_mask[21][color];
  pat[pos + WW + N].list[MD_3] |= update_mask[22][color];
  pat[pos + NN + W].list[MD_3] |= update_mask[23][color];

  // md4 
  pat[pos + NN + NN].list[MD_4] |= update_mask[24][color];
  pat[pos + NN + NE].list[MD_4] |= update_mask[25][color];
  pat[pos + NE + NE].list[MD_4] |= update_mask[26][color];
  pat[pos + EE + NE].list[MD_4] |= update_mask[27][color];
  pat[pos + EE + EE].list[MD_4] |= update_mask[28][color];
  pat[pos + EE + SE].list[MD_4] |= update_mask[29][color];
  pat[pos + SE + SE].list[MD_4] |= update_mask[30][color];
  pat[pos + SS + SE].list[MD_4] |= update_mask[31][color];
  pat[pos + SS + SS].list[MD_4] |= update_mask[32][color];
  pat[pos + SS + SW].list[MD_4] |= update_mask[33][color];
  pat[pos + SW + SW].list[MD_4] |= update_mask[34][color];
  pat[pos + WW + SW].list[MD_4] |= update_mask[35][color];
  pat[pos + WW + WW].list[MD_4] |= update_mask[36][color];
  pat[pos + WW + NW].list[MD_4] |= update_mask[37][color];
  pat[pos + NW + NW].list[MD_4] |= update_mask[38][color];
  pat[pos + NN + NW].list[MD_4] |= update_mask[39][color];

  // md5
  pat[pos + NN + NN + N].large_list[MD_5] |= large_mask[0][color];
  pat[pos + NN + NN + E].large_list[MD_5] |= large_mask[1][color];
  pat[pos + NN + NE + E].large_list[MD_5] |= large_mask[2][color];
  pat[pos + NN + EE + E].large_list[MD_5] |= large_mask[3][color];
  pat[pos + NE + EE + E].large_list[MD_5] |= large_mask[4][color];
  pat[pos + EE + EE + E].large_list[MD_5] |= large_mask[5][color];
  pat[pos + SE + EE + E].large_list[MD_5] |= large_mask[6][color];
  pat[pos + SS + EE + E].large_list[MD_5] |= large_mask[7][color];
  pat[pos + SS + SE + E].large_list[MD_5] |= large_mask[8][color];
  pat[pos + SS + SS + E].large_list[MD_5] |= large_mask[9][color];
  pat[pos + SS + SS + S].large_list[MD_5] |= large_mask[10][color];
  pat[pos + SS + SS + W].large_list[MD_5] |= large_mask[11][color];
  pat[pos + SS + SW + W].large_list[MD_5] |= large_mask[12][color];
  pat[pos + SS + WW + W].large_list[MD_5] |= large_mask[13][color];
  pat[pos + SW + WW + W].large_list[MD_5] |= large_mask[14][color];
  pat[pos + WW + WW + W].large_list[MD_5] |= large_mask[15][color];
  pat[pos + NW + WW + W].large_list[MD_5] |= large_mask[16][color];
  pat[pos + NN + WW + W].large_list[MD_5] |= large_mask[17][color];
  pat[pos + NN + NW + W].large_list[MD_5] |= large_mask[18][color];
  pat[pos + NN + NN + W].large_list[MD_5] |= large_mask[19][color];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq %esi, %rax
leaq 0x105e0(%rip), %r8      # 0x47200
leaq 0x2ac95(%rip), %rsi     # 0x618bc
movl (%rsi), %ecx
notl %ecx
addl %edx, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
movl (%r8,%rax,4), %r9d
movl 0xc(%r8,%rax,4), %r10d
orl %r9d, (%rdi,%rcx)
movslq (%rsi), %r9
movslq %edx, %rcx
movq %rcx, %rdx
subq %r9, %rdx
imulq $0x18, %rdx, %rdx
orl %r10d, (%rdi,%rdx)
movl 0x18(%r8,%rax,4), %edx
leal 0x1(%rcx), %r9d
movl %r9d, %r10d
subl (%rsi), %r10d
movslq %r10d, %r10
imulq $0x18, %r10, %r10
orl %edx, (%rdi,%r10)
movl 0x24(%r8,%rax,4), %r10d
imulq $0x18, %rcx, %rdx
orl %r10d, -0x18(%rdi,%rdx)
movl 0x30(%r8,%rax,4), %r10d
orl %r10d, 0x18(%rdi,%rdx)
movl 0x3c(%r8,%rax,4), %r10d
leal -0x1(%rcx), %r11d
addl (%rsi), %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, (%rdi,%r11)
movl 0x48(%r8,%rax,4), %r10d
movslq (%rsi), %r11
addq %rcx, %r11
imulq $0x18, %r11, %r11
orl %r10d, (%rdi,%r11)
movl 0x54(%r8,%rax,4), %r10d
addl (%rsi), %r9d
movslq %r9d, %r9
imulq $0x18, %r9, %r9
orl %r10d, (%rdi,%r9)
movl 0x60(%r8,%rax,4), %r9d
movl (%rsi), %r10d
addl %r10d, %r10d
movl %ecx, %r11d
subl %r10d, %r11d
movslq %r11d, %r10
imulq $0x18, %r10, %r10
orl %r9d, (%rdi,%r10)
movl 0x6c(%r8,%rax,4), %r9d
leal 0x2(%rcx), %r10d
movslq %r10d, %r10
imulq $0x18, %r10, %r11
orl %r9d, (%rdi,%r11)
movl 0x78(%r8,%rax,4), %r9d
movslq (%rsi), %r11
leaq (%rcx,%r11,2), %r11
imulq $0x18, %r11, %r11
orl %r9d, (%rdi,%r11)
movl 0x84(%r8,%rax,4), %r11d
leal -0x2(%rcx), %r9d
movslq %r9d, %r9
imulq $0x18, %r9, %rbx
orl %r11d, (%rdi,%rbx)
movl 0x90(%r8,%rax,4), %r11d
imull $-0x3, (%rsi), %ebx
addl %ecx, %ebx
movslq %ebx, %rbx
imulq $0x18, %rbx, %rbx
orl %r11d, 0x4(%rdi,%rbx)
movl 0x9c(%r8,%rax,4), %r11d
movl (%rsi), %ebx
addl %ebx, %ebx
movl %ecx, %ebp
subl %ebx, %ebp
movslq %ebp, %rbx
imulq $0x18, %rbx, %rbx
orl %r11d, 0x1c(%rdi,%rbx)
movl 0xa8(%r8,%rax,4), %r11d
movl (%rsi), %ebx
movl %r10d, %ebp
subl %ebx, %ebp
movslq %ebp, %rbx
imulq $0x18, %rbx, %rbx
orl %r11d, 0x4(%rdi,%rbx)
movl 0xb4(%r8,%rax,4), %r11d
orl %r11d, 0x4c(%rdi,%rdx)
movl 0xc0(%r8,%rax,4), %r11d
movslq (%rsi), %rbx
addq %r10, %rbx
imulq $0x18, %rbx, %r10
orl %r11d, 0x4(%rdi,%r10)
movl 0xcc(%r8,%rax,4), %r10d
movslq (%rsi), %r11
leaq (%rcx,%r11,2), %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x1c(%rdi,%r11)
movl 0xd8(%r8,%rax,4), %r10d
movl (%rsi), %r11d
movl %r11d, %ebx
addl %ecx, %ebx
leal (%rbx,%r11,2), %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x4(%rdi,%r11)
movl 0xe4(%r8,%rax,4), %r10d
movslq (%rsi), %r11
leaq (%rcx,%r11,2), %r11
imulq $0x18, %r11, %r11
orl %r10d, -0x14(%rdi,%r11)
movl 0xf0(%r8,%rax,4), %r10d
movslq (%rsi), %r11
addq %r9, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x4(%rdi,%r11)
movl 0xfc(%r8,%rax,4), %r10d
orl %r10d, -0x44(%rdi,%rdx)
movl 0x108(%r8,%rax,4), %r10d
subl (%rsi), %r9d
movslq %r9d, %r9
imulq $0x18, %r9, %r9
orl %r10d, 0x4(%rdi,%r9)
movl 0x114(%r8,%rax,4), %r9d
movl (%rsi), %r10d
addl %r10d, %r10d
notl %r10d
addl %ecx, %r10d
movslq %r10d, %r10
imulq $0x18, %r10, %r10
orl %r9d, 0x4(%rdi,%r10)
movl 0x120(%r8,%rax,4), %r9d
movl (%rsi), %r10d
shll $0x2, %r10d
movl %ecx, %r11d
subl %r10d, %r11d
movslq %r11d, %r10
imulq $0x18, %r10, %r10
orl %r9d, 0x8(%rdi,%r10)
movl 0x12c(%r8,%rax,4), %r9d
imull $-0x3, (%rsi), %r10d
addl %ecx, %r10d
incl %r10d
movslq %r10d, %r10
imulq $0x18, %r10, %r10
orl %r9d, 0x8(%rdi,%r10)
movl 0x138(%r8,%rax,4), %r9d
movl (%rsi), %r10d
addl %r10d, %r10d
negl %r10d
addl %ecx, %r10d
addl $0x2, %r10d
movslq %r10d, %r10
imulq $0x18, %r10, %r10
orl %r9d, 0x8(%rdi,%r10)
movl 0x144(%r8,%rax,4), %r9d
leal 0x3(%rcx), %r10d
movl %r10d, %r11d
subl (%rsi), %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r9d, 0x8(%rdi,%r11)
movl 0x150(%r8,%rax,4), %r11d
leal 0x4(%rcx), %r9d
movslq %r9d, %r9
imulq $0x18, %r9, %rbx
orl %r11d, 0x8(%rdi,%rbx)
movl 0x15c(%r8,%rax,4), %r11d
addl (%rsi), %r10d
movslq %r10d, %r10
imulq $0x18, %r10, %r10
orl %r11d, 0x8(%rdi,%r10)
movl 0x168(%r8,%rax,4), %r10d
movl (%rsi), %r11d
leal (%rcx,%r11,2), %r11d
addl $0x2, %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x8(%rdi,%r11)
movl 0x174(%r8,%rax,4), %r10d
movl (%rsi), %r11d
leal (%rcx,%r11), %ebx
incl %ebx
leal (%rbx,%r11,2), %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x8(%rdi,%r11)
movl 0x180(%r8,%rax,4), %r10d
movl (%rsi), %r11d
leal (%rcx,%r11,4), %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x8(%rdi,%r11)
movl 0x18c(%r8,%rax,4), %r10d
movl (%rsi), %r11d
leal (%rcx,%r11), %ebx
decl %ebx
leal (%rbx,%r11,2), %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x8(%rdi,%r11)
movl 0x198(%r8,%rax,4), %r10d
movl (%rsi), %r11d
leal (%rcx,%r11,2), %r11d
addl $-0x2, %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x8(%rdi,%r11)
movl 0x1a4(%r8,%rax,4), %r10d
movl (%rsi), %r11d
addl %ecx, %r11d
addl $-0x3, %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x8(%rdi,%r11)
movl 0x1b0(%r8,%rax,4), %r10d
leal -0x4(%rcx), %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x8(%rdi,%r11)
movl 0x1bc(%r8,%rax,4), %r10d
movl (%rsi), %r11d
notl %r11d
addl %ecx, %r11d
addl $-0x2, %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x8(%rdi,%r11)
movl 0x1c8(%r8,%rax,4), %r10d
movl (%rsi), %r11d
notl %r11d
leal (%rcx,%r11,2), %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orl %r10d, 0x8(%rdi,%r11)
movl 0x1d4(%r8,%rax,4), %r8d
movl (%rsi), %r10d
movl %r10d, %r11d
notl %r11d
addl %ecx, %r11d
addl %r10d, %r10d
subl %r10d, %r11d
movslq %r11d, %r10
imulq $0x18, %r10, %r10
orl %r8d, 0x8(%rdi,%r10)
leaq 0x103b5(%rip), %r8      # 0x473e0
movl (%rsi), %r10d
imull $-0x5, %r10d, %esi
addl %ecx, %esi
movslq %esi, %rsi
imulq $0x18, %rsi, %rsi
movq (%r8,%rax,8), %r11
movq 0x18(%r8,%rax,8), %rbx
orq %r11, 0x10(%rdi,%rsi)
leal (,%r10,4), %esi
movl %ecx, %r11d
subl %esi, %r11d
movslq %r11d, %r11
imulq $0x18, %r11, %r11
orq %rbx, 0x28(%rdi,%r11)
movq 0x30(%r8,%rax,8), %r11
imull $-0x3, %r10d, %ebx
addl %ecx, %ebx
addl $0x2, %ebx
movslq %ebx, %rbx
imulq $0x18, %rbx, %rbx
orq %r11, 0x10(%rdi,%rbx)
movq 0x48(%r8,%rax,8), %r14
movl %ecx, %ebx
subl %r10d, %ebx
subl %r10d, %ebx
movslq %ebx, %r11
imulq $0x18, %r11, %rbx
orq %r14, 0x58(%rdi,%rbx)
movq 0x60(%r8,%rax,8), %r14
subl %r10d, %r9d
movslq %r9d, %r9
imulq $0x18, %r9, %r9
orq %r14, 0x10(%rdi,%r9)
movq 0x78(%r8,%rax,8), %r9
orq %r9, 0x88(%rdi,%rdx)
leal (%r10,%rcx), %r9d
incl %r9d
movq 0x90(%r8,%rax,8), %r14
movslq %r9d, %r9
imulq $0x18, %r9, %r9
orq %r14, 0x58(%rdi,%r9)
leal (%rcx,%r10,2), %r9d
movq 0xa8(%r8,%rax,8), %r14
movslq %r9d, %r9
imulq $0x18, %r9, %r15
orq %r14, 0x58(%rdi,%r15)
movq 0xc0(%r8,%rax,8), %r14
leal (%r10,%r9), %ebp
incl %ebp
movslq %ebp, %r12
imulq $0x18, %r12, %r12
orq %r14, 0x28(%rdi,%r12)
leal (%rcx,%r10,4), %ebp
movq 0xd8(%r8,%rax,8), %r14
movslq %ebp, %r12
imulq $0x18, %r12, %r13
orq %r14, 0x28(%rdi,%r13)
movq 0xf0(%r8,%rax,8), %r14
addl %r10d, %r12d
movslq %r12d, %r12
imulq $0x18, %r12, %r12
orq %r14, 0x10(%rdi,%r12)
movq 0x108(%r8,%rax,8), %r14
orq %r14, -0x8(%rdi,%r13)
movq 0x120(%r8,%rax,8), %r14
addl %r10d, %r9d
decl %r9d
movslq %r9d, %r9
imulq $0x18, %r9, %r9
orq %r14, -0x8(%rdi,%r9)
movq 0x138(%r8,%rax,8), %r9
orq %r9, -0x38(%rdi,%r15)
leal (%r10,%rcx), %r9d
decl %r9d
movq 0x150(%r8,%rax,8), %r14
movslq %r9d, %r9
imulq $0x18, %r9, %r9
orq %r14, -0x38(%rdi,%r9)
movq 0x168(%r8,%rax,8), %r9
orq %r9, -0x68(%rdi,%rdx)
notl %r10d
leal (%r10,%rcx), %edx
movq 0x180(%r8,%rax,8), %r9
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
orq %r9, -0x38(%rdi,%rdx)
movq 0x198(%r8,%rax,8), %rdx
orq %rdx, -0x38(%rdi,%rbx)
movq 0x1b0(%r8,%rax,8), %rdx
addl %r10d, %r11d
movslq %r11d, %r9
imulq $0x18, %r9, %r9
orq %rdx, -0x8(%rdi,%r9)
notl %esi
addl %ecx, %esi
movq 0x1c8(%r8,%rax,8), %rax
movslq %esi, %rcx
imulq $0x18, %rcx, %rcx
orq %rax, 0x10(%rdi,%rcx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq