// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/board/GoBoard.cpp
// Function: CopyGame(game_info_t*, game_info_t const*)
void
CopyGame( game_info_t *dst, const game_info_t *src )
{
  memcpy(dst->record,             src->record,             sizeof(record_t) * MAX_RECORDS);
  memcpy(dst->prisoner,           src->prisoner,           sizeof(int) * S_MAX);
  memcpy(dst->board,              src->board,              sizeof(char) * board_max);  
  memcpy(dst->pat,                src->pat,                sizeof(pattern_t) * board_max); 
  memcpy(dst->string_id,          src->string_id,          sizeof(int) * STRING_POS_MAX);
  memcpy(dst->string_next,        src->string_next,        sizeof(int) * STRING_POS_MAX);
  memcpy(dst->candidates,         src->candidates,         sizeof(bool) * board_max); 
  memcpy(dst->capture_num,        src->capture_num,        sizeof(int) * 2);
  memcpy(dst->capture_dir,        src->capture_dir,        sizeof(int) * 2);
  memcpy(dst->capture_pos,        src->capture_pos,        sizeof(int) * 2 * CAPTURE_MAX);
  memcpy(dst->update_num,         src->update_num,         sizeof(int) * 2);

  std::fill_n(dst->tactical_features, board_max * ALL_MAX, 0);

  for (int i = 0; i < MAX_STRING; i++) {
    if (src->string[i].flag) {
      memcpy(&dst->string[i], &src->string[i], sizeof(string_t));
    } else {
      dst->string[i].flag = false;
    }
  }

  dst->current_hash = src->current_hash;
  dst->previous1_hash = src->previous1_hash;
  dst->previous2_hash = src->previous2_hash;
  dst->positional_hash = src->positional_hash;
  dst->move_hash = src->move_hash;

  dst->pass_count = src->pass_count;

  dst->moves = src->moves;
  dst->ko_move = src->ko_move;
  dst->ko_pos = src->ko_pos;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x43b0, %edx           # imm = 0x43B0
callq 0x6310
movups 0x43b4(%r14), %xmm0
movups %xmm0, 0x43b4(%rbx)
movl $0x43f8, %esi           # imm = 0x43F8
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
movslq 0x2628b(%rip), %r15     # 0x618b8
movq %r15, %rdx
callq 0x6310
movl $0x4748, %esi           # imm = 0x4748
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
imulq $0x18, %r15, %rdx
callq 0x6310
movl $0x95720, %esi          # imm = 0x95720
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
movl $0xae0, %edx            # imm = 0xAE0
callq 0x6310
movl $0x96200, %esi          # imm = 0x96200
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
movl $0xae0, %edx            # imm = 0xAE0
callq 0x6310
movl $0x96ce0, %esi          # imm = 0x96CE0
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
movq %r15, %rdx
callq 0x6310
movq 0x98728(%r14), %rax
movq %rax, 0x98728(%rbx)
movq 0x98730(%r14), %rax
movq %rax, 0x98730(%rbx)
movl $0x98738, %esi          # imm = 0x98738
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
movl $0x15c0, %edx           # imm = 0x15C0
callq 0x6310
movq 0x99cf8(%r14), %rax
movq %rax, 0x99cf8(%rbx)
leaq 0x97372(%rbx), %rdi
imull $0x6, %r15d, %esi
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
callq 0x3cbc0
movl $0x9de4, %r15d          # imm = 0x9DE4
cmpq $0x95ee4, %r15          # imm = 0x95EE4
je 0x3b728
cmpb $0x1, (%r14,%r15)
jne 0x3b71a
leaq (%r14,%r15), %rsi
addq $-0x7c4, %rsi           # imm = 0xF83C
leaq (%rbx,%r15), %rdi
addq $-0x7c4, %rdi           # imm = 0xF83C
movl $0x7c8, %edx            # imm = 0x7C8
callq 0x6310
jmp 0x3b71f
movb $0x0, (%rbx,%r15)
addq $0x7c8, %r15            # imm = 0x7C8
jmp 0x3b6e8
movups 0x43d0(%r14), %xmm0
movups %xmm0, 0x43d0(%rbx)
movups 0x43e0(%r14), %xmm0
movups %xmm0, 0x43e0(%rbx)
movq 0x43f0(%r14), %rax
movq %rax, 0x43f0(%rbx)
movl 0x4744(%r14), %eax
movl %eax, 0x4744(%rbx)
movl 0x43b0(%r14), %eax
movl %eax, 0x43b0(%rbx)
movq 0x43c4(%r14), %rax
movq %rax, 0x43c4(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq