// File: antoniogarro[P]Hara/goban.cpp
// Function: Goban::erase_neighbour(Group*)
void Goban::erase_neighbour(Group *neigh)
{
  for (Group::StoneIterator st(neigh);  st; ++st) {
    points[*st] = 0;
    stones_on_board[neigh->get_color()]--;
#ifdef ZOBRIST
    zobrist.update(*st, neigh->get_color());
#endif    
    empty_points.add(*st);

    GroupSet<4> meta_neigh;
    int nmeta = neighbour_groups(*st, meta_neigh);
    for (int k = 0; k < nmeta; k++) {
      meta_neigh[k]->add_liberties(*st);
      if (meta_neigh[k] == last_atari[meta_neigh[k]->get_color()]) {
        last_atari[meta_neigh[k]->get_color()] = 0;
      }
    }
  }
  
  if (neigh == last_atari[neigh->get_color()]) {
    last_atari[neigh->get_color()] = 0;
  }
  neigh->clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x7460
leaq -0x18(%rbp), %rdi
callq 0x74a0
testb $0x1, %al
jne 0x6baa
jmp 0x6d29
leaq -0x18(%rbp), %rdi
callq 0x74c0
movl %eax, %ecx
movq -0x60(%rbp), %rax
movslq %ecx, %rcx
movq $0x0, 0x18(%rax,%rcx,8)
movq -0x10(%rbp), %rdi
callq 0x7400
movb %al, %cl
movq -0x60(%rbp), %rax
andb $0x1, %cl
movzbl %cl, %ecx
movl 0xd63c8(%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, 0xd63c8(%rax,%rcx,4)
addq $0xfd7d0, %rax          # imm = 0xFD7D0
movq %rax, -0x78(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x74c0
movl %eax, -0x6c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7400
movq -0x78(%rbp), %rdi
movl -0x6c(%rbp), %esi
movzbl %al, %edx
andl $0x1, %edx
callq 0x13880
movq -0x60(%rbp), %rax
addq $0xfc120, %rax          # imm = 0xFC120
movq %rax, -0x68(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x74c0
movq -0x68(%rbp), %rdi
movl %eax, %esi
callq 0x7200
leaq -0x50(%rbp), %rdi
callq 0x73c0
leaq -0x18(%rbp), %rdi
callq 0x74c0
movq -0x60(%rbp), %rdi
movl %eax, %esi
leaq -0x50(%rbp), %rdx
callq 0x7a10
movl %eax, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x6d19
movl -0x58(%rbp), %esi
leaq -0x50(%rbp), %rdi
callq 0x73e0
movq %rax, -0x88(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x74c0
movq -0x88(%rbp), %rdi
movl %eax, %esi
callq 0x8ca0
movl -0x58(%rbp), %esi
leaq -0x50(%rbp), %rdi
callq 0x73e0
movq %rax, -0x80(%rbp)
movl -0x58(%rbp), %esi
leaq -0x50(%rbp), %rdi
callq 0x73e0
movq %rax, %rdi
callq 0x7400
movq -0x60(%rbp), %rcx
movb %al, %dl
movq -0x80(%rbp), %rax
andb $0x1, %dl
movzbl %dl, %edx
cmpq 0xd63d0(%rcx,%rdx,8), %rax
jne 0x6d09
movl -0x58(%rbp), %esi
leaq -0x50(%rbp), %rdi
callq 0x73e0
movq %rax, %rdi
callq 0x7400
movb %al, %cl
movq -0x60(%rbp), %rax
andb $0x1, %cl
movzbl %cl, %ecx
movq $0x0, 0xd63d0(%rax,%rcx,8)
jmp 0x6d0b
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x6c69
jmp 0x6d1b
leaq -0x18(%rbp), %rdi
callq 0x74e0
jmp 0x6b98
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7400
movq -0x60(%rbp), %rcx
movb %al, %dl
movq -0x90(%rbp), %rax
andb $0x1, %dl
movzbl %dl, %edx
cmpq 0xd63d0(%rcx,%rdx,8), %rax
jne 0x6d7b
movq -0x10(%rbp), %rdi
callq 0x7400
movb %al, %cl
movq -0x60(%rbp), %rax
andb $0x1, %cl
movzbl %cl, %ecx
movq $0x0, 0xd63d0(%rax,%rcx,8)
movq -0x10(%rbp), %rdi
callq 0x8de0
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)