// File: /workspace/github_cpp_makefile_star2_O3/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 0x11943(%rip), %r8      # 0x602e0
leaq 0x27f18(%rip), %rsi     # 0x768bc
movl (%rsi), %ecx
notl %ecx
addl %edx, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movl (%r8,%rax,4), %r9d
movl 0xc(%r8,%rax,4), %r10d
orl %r9d, (%rdi,%rcx,8)
movslq (%rsi), %r9
movslq %edx, %rcx
movq %rcx, %rdx
subq %r9, %rdx
leaq (%rdx,%rdx,2), %rdx
orl %r10d, (%rdi,%rdx,8)
movl 0x18(%r8,%rax,4), %edx
leal 0x1(%rcx), %r9d
movl %r9d, %r10d
subl (%rsi), %r10d
movslq %r10d, %r10
leaq (%r10,%r10,2), %r10
orl %edx, (%rdi,%r10,8)
movl 0x24(%r8,%rax,4), %r10d
leaq (%rcx,%rcx,2), %rdx
orl %r10d, -0x18(%rdi,%rdx,8)
movl 0x30(%r8,%rax,4), %r10d
orl %r10d, 0x18(%rdi,%rdx,8)
movl 0x3c(%r8,%rax,4), %r10d
leal -0x1(%rcx), %r11d
addl (%rsi), %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, (%rdi,%r11,8)
movl 0x48(%r8,%rax,4), %r10d
movslq (%rsi), %r11
addq %rcx, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, (%rdi,%r11,8)
movl 0x54(%r8,%rax,4), %r10d
addl (%rsi), %r9d
movslq %r9d, %r9
leaq (%r9,%r9,2), %r9
orl %r10d, (%rdi,%r9,8)
movl 0x60(%r8,%rax,4), %r9d
movl (%rsi), %r10d
addl %r10d, %r10d
movl %ecx, %r11d
subl %r10d, %r11d
movslq %r11d, %r10
leaq (%r10,%r10,2), %r10
orl %r9d, (%rdi,%r10,8)
movl 0x6c(%r8,%rax,4), %r9d
leal 0x2(%rcx), %r10d
movslq %r10d, %r10
leaq (%r10,%r10,2), %r11
orl %r9d, (%rdi,%r11,8)
movl 0x78(%r8,%rax,4), %r9d
movslq (%rsi), %r11
leaq (%rcx,%r11,2), %r11
leaq (%r11,%r11,2), %r11
orl %r9d, (%rdi,%r11,8)
movl 0x84(%r8,%rax,4), %r11d
leal -0x2(%rcx), %r9d
movslq %r9d, %r9
leaq (%r9,%r9,2), %rbx
orl %r11d, (%rdi,%rbx,8)
movl 0x90(%r8,%rax,4), %r11d
movl (%rsi), %ebx
leal (%rbx,%rbx,2), %ebx
movl %ecx, %ebp
subl %ebx, %ebp
movslq %ebp, %rbx
leaq (%rbx,%rbx,2), %rbx
orl %r11d, 0x4(%rdi,%rbx,8)
movl 0x9c(%r8,%rax,4), %r11d
movl (%rsi), %ebx
addl %ebx, %ebx
movl %ecx, %ebp
subl %ebx, %ebp
movslq %ebp, %rbx
leaq (%rbx,%rbx,2), %rbx
orl %r11d, 0x1c(%rdi,%rbx,8)
movl 0xa8(%r8,%rax,4), %r11d
movl (%rsi), %ebx
movl %r10d, %ebp
subl %ebx, %ebp
movslq %ebp, %rbx
leaq (%rbx,%rbx,2), %rbx
orl %r11d, 0x4(%rdi,%rbx,8)
movl 0xb4(%r8,%rax,4), %r11d
orl %r11d, 0x4c(%rdi,%rdx,8)
movl 0xc0(%r8,%rax,4), %r11d
movslq (%rsi), %rbx
addq %r10, %rbx
leaq (%rbx,%rbx,2), %r10
orl %r11d, 0x4(%rdi,%r10,8)
movl 0xcc(%r8,%rax,4), %r10d
movslq (%rsi), %r11
leaq (%rcx,%r11,2), %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x1c(%rdi,%r11,8)
movl 0xd8(%r8,%rax,4), %r10d
movl (%rsi), %r11d
movl %r11d, %ebx
addl %ecx, %ebx
leal (%rbx,%r11,2), %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x4(%rdi,%r11,8)
movl 0xe4(%r8,%rax,4), %r10d
movslq (%rsi), %r11
leaq (%rcx,%r11,2), %r11
leaq (%r11,%r11,2), %r11
orl %r10d, -0x14(%rdi,%r11,8)
movl 0xf0(%r8,%rax,4), %r10d
movslq (%rsi), %r11
addq %r9, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x4(%rdi,%r11,8)
movl 0xfc(%r8,%rax,4), %r10d
orl %r10d, -0x44(%rdi,%rdx,8)
movl 0x108(%r8,%rax,4), %r10d
subl (%rsi), %r9d
movslq %r9d, %r9
leaq (%r9,%r9,2), %r9
orl %r10d, 0x4(%rdi,%r9,8)
movl 0x114(%r8,%rax,4), %r9d
movl (%rsi), %r10d
addl %r10d, %r10d
notl %r10d
addl %ecx, %r10d
movslq %r10d, %r10
leaq (%r10,%r10,2), %r10
orl %r9d, 0x4(%rdi,%r10,8)
movl 0x120(%r8,%rax,4), %r9d
movl (%rsi), %r10d
shll $0x2, %r10d
movl %ecx, %r11d
subl %r10d, %r11d
movslq %r11d, %r10
leaq (%r10,%r10,2), %r10
orl %r9d, 0x8(%rdi,%r10,8)
movl 0x12c(%r8,%rax,4), %r9d
movl (%rsi), %r10d
leal (%r10,%r10,2), %r10d
negl %r10d
addl %ecx, %r10d
incl %r10d
movslq %r10d, %r10
leaq (%r10,%r10,2), %r10
orl %r9d, 0x8(%rdi,%r10,8)
movl 0x138(%r8,%rax,4), %r9d
movl (%rsi), %r10d
addl %r10d, %r10d
negl %r10d
addl %ecx, %r10d
addl $0x2, %r10d
movslq %r10d, %r10
leaq (%r10,%r10,2), %r10
orl %r9d, 0x8(%rdi,%r10,8)
movl 0x144(%r8,%rax,4), %r9d
leal 0x3(%rcx), %r10d
movl %r10d, %r11d
subl (%rsi), %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r9d, 0x8(%rdi,%r11,8)
movl 0x150(%r8,%rax,4), %r11d
leal 0x4(%rcx), %r9d
movslq %r9d, %r9
leaq (%r9,%r9,2), %rbx
orl %r11d, 0x8(%rdi,%rbx,8)
movl 0x15c(%r8,%rax,4), %r11d
addl (%rsi), %r10d
movslq %r10d, %r10
leaq (%r10,%r10,2), %r10
orl %r11d, 0x8(%rdi,%r10,8)
movl 0x168(%r8,%rax,4), %r10d
movl (%rsi), %r11d
leal (%rcx,%r11,2), %r11d
addl $0x2, %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x8(%rdi,%r11,8)
movl 0x174(%r8,%rax,4), %r10d
movl (%rsi), %r11d
leal (%rcx,%r11), %ebx
incl %ebx
leal (%rbx,%r11,2), %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x8(%rdi,%r11,8)
movl 0x180(%r8,%rax,4), %r10d
movl (%rsi), %r11d
leal (%rcx,%r11,4), %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x8(%rdi,%r11,8)
movl 0x18c(%r8,%rax,4), %r10d
movl (%rsi), %r11d
leal (%rcx,%r11), %ebx
decl %ebx
leal (%rbx,%r11,2), %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x8(%rdi,%r11,8)
movl 0x198(%r8,%rax,4), %r10d
movl (%rsi), %r11d
leal (%rcx,%r11,2), %r11d
addl $-0x2, %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x8(%rdi,%r11,8)
movl 0x1a4(%r8,%rax,4), %r10d
movl (%rsi), %r11d
addl %ecx, %r11d
addl $-0x3, %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x8(%rdi,%r11,8)
movl 0x1b0(%r8,%rax,4), %r10d
leal -0x4(%rcx), %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x8(%rdi,%r11,8)
movl 0x1bc(%r8,%rax,4), %r10d
movl (%rsi), %r11d
notl %r11d
addl %ecx, %r11d
addl $-0x2, %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x8(%rdi,%r11,8)
movl 0x1c8(%r8,%rax,4), %r10d
movl (%rsi), %r11d
notl %r11d
leal (%rcx,%r11,2), %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orl %r10d, 0x8(%rdi,%r11,8)
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
leaq (%r10,%r10,2), %r10
orl %r8d, 0x8(%rdi,%r10,8)
leaq 0x1170e(%rip), %r8      # 0x604c0
movl (%rsi), %esi
leal (%rsi,%rsi,4), %r10d
movl %ecx, %r11d
subl %r10d, %r11d
movslq %r11d, %r10
leaq (%r10,%r10,2), %r10
movq (%r8,%rax,8), %r11
movq 0x18(%r8,%rax,8), %rbx
orq %r11, 0x10(%rdi,%r10,8)
movl %ecx, %r11d
leal (,%rsi,4), %r10d
subl %r10d, %r11d
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orq %rbx, 0x28(%rdi,%r11,8)
leal (%rsi,%rsi,2), %r11d
negl %r11d
addl %ecx, %r11d
addl $0x2, %r11d
movl %ecx, %ebx
movq 0x30(%r8,%rax,8), %r14
movslq %r11d, %r11
leaq (%r11,%r11,2), %r11
orq %r14, 0x10(%rdi,%r11,8)
movq 0x48(%r8,%rax,8), %r14
subl %esi, %ebx
subl %esi, %ebx
movslq %ebx, %r11
leaq (%r11,%r11,2), %rbx
orq %r14, 0x58(%rdi,%rbx,8)
movq 0x60(%r8,%rax,8), %r14
subl %esi, %r9d
movslq %r9d, %r9
leaq (%r9,%r9,2), %r9
orq %r14, 0x10(%rdi,%r9,8)
movq 0x78(%r8,%rax,8), %r9
orq %r9, 0x88(%rdi,%rdx,8)
leal (%rsi,%rcx), %r9d
incl %r9d
movq 0x90(%r8,%rax,8), %r14
movslq %r9d, %r9
leaq (%r9,%r9,2), %r9
orq %r14, 0x58(%rdi,%r9,8)
leal (%rcx,%rsi,2), %r9d
movq 0xa8(%r8,%rax,8), %r14
movslq %r9d, %r9
leaq (%r9,%r9,2), %r15
orq %r14, 0x58(%rdi,%r15,8)
movq 0xc0(%r8,%rax,8), %r14
leal (%rsi,%r9), %ebp
incl %ebp
movslq %ebp, %r12
leaq (%r12,%r12,2), %r12
orq %r14, 0x28(%rdi,%r12,8)
leal (%rcx,%rsi,4), %ebp
movq 0xd8(%r8,%rax,8), %r14
movslq %ebp, %r12
leaq (%r12,%r12,2), %r13
orq %r14, 0x28(%rdi,%r13,8)
movq 0xf0(%r8,%rax,8), %r14
addl %esi, %r12d
movslq %r12d, %r12
leaq (%r12,%r12,2), %r12
orq %r14, 0x10(%rdi,%r12,8)
movq 0x108(%r8,%rax,8), %r14
orq %r14, -0x8(%rdi,%r13,8)
movq 0x120(%r8,%rax,8), %r14
addl %esi, %r9d
decl %r9d
movslq %r9d, %r9
leaq (%r9,%r9,2), %r9
orq %r14, -0x8(%rdi,%r9,8)
movq 0x138(%r8,%rax,8), %r9
orq %r9, -0x38(%rdi,%r15,8)
leal (%rsi,%rcx), %r9d
decl %r9d
movq 0x150(%r8,%rax,8), %r14
movslq %r9d, %r9
leaq (%r9,%r9,2), %r9
orq %r14, -0x38(%rdi,%r9,8)
movq 0x168(%r8,%rax,8), %r9
orq %r9, -0x68(%rdi,%rdx,8)
notl %esi
leal (%rsi,%rcx), %edx
movq 0x180(%r8,%rax,8), %r9
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
orq %r9, -0x38(%rdi,%rdx,8)
movq 0x198(%r8,%rax,8), %rdx
orq %rdx, -0x38(%rdi,%rbx,8)
movq 0x1b0(%r8,%rax,8), %rdx
addl %esi, %r11d
movslq %r11d, %rsi
leaq (%rsi,%rsi,2), %rsi
orq %rdx, -0x8(%rdi,%rsi,8)
notl %r10d
addl %ecx, %r10d
movq 0x1c8(%r8,%rax,8), %rax
movslq %r10d, %rcx
leaq (%rcx,%rcx,2), %rcx
orq %rax, 0x10(%rdi,%rcx,8)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq