// File: kobanium[P]Ray/src/pattern/Pattern.cpp
// Function: UpdateMD2Stone(pattern_t*, int, int)
void
UpdateMD2Stone( pattern_t *pat, const int color, const int pos )
{
  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];
  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];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x1e657(%rip), %rax     # 0xaf330
movl (%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
xorl %esi, %esi
leaq 0x56d60(%rip), %rdi     # 0xe7a4c
subl (%rdi), %esi
addl $-0x1, %esi
addl %esi, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e624(%rip), %rax     # 0xaf330
movl 0xc(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
xorl %esi, %esi
leaq 0x56d2c(%rip), %rdi     # 0xe7a4c
subl (%rdi), %esi
addl %esi, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e5f3(%rip), %rax     # 0xaf330
movl 0x18(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
xorl %esi, %esi
leaq 0x56cfb(%rip), %rdi     # 0xe7a4c
subl (%rdi), %esi
addl $0x1, %esi
addl %esi, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e5bf(%rip), %rax     # 0xaf330
movl 0x24(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
addl $-0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e598(%rip), %rax     # 0xaf330
movl 0x30(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e571(%rip), %rax     # 0xaf330
movl 0x3c(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
leaq 0x56c7b(%rip), %rsi     # 0xe7a4c
movl (%rsi), %esi
addl $-0x1, %esi
addl %esi, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e53f(%rip), %rax     # 0xaf330
movl 0x48(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
leaq 0x56c49(%rip), %rsi     # 0xe7a4c
addl (%rsi), %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e512(%rip), %rax     # 0xaf330
movl 0x54(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
leaq 0x56c1c(%rip), %rsi     # 0xe7a4c
movl (%rsi), %esi
addl $0x1, %esi
addl %esi, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e4e0(%rip), %rax     # 0xaf330
movl 0x60(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
xorl %esi, %esi
leaq 0x56be8(%rip), %rdi     # 0xe7a4c
subl (%rdi), %esi
xorl %edi, %edi
leaq 0x56bdd(%rip), %r8      # 0xe7a4c
subl (%r8), %edi
addl %edi, %esi
addl %esi, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e4a1(%rip), %rax     # 0xaf330
movl 0x6c(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e47a(%rip), %rax     # 0xaf330
movl 0x78(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
leaq 0x56b84(%rip), %rsi     # 0xe7a4c
movl (%rsi), %esi
leaq 0x56b7b(%rip), %rdi     # 0xe7a4c
addl (%rdi), %esi
addl %esi, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1e442(%rip), %rax     # 0xaf330
movl 0x84(%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
addl $-0x2, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movl %ecx, (%rax)
popq %rbp
retq
nop