// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rsi, %r14
movq %rdi, %rbx
movl $0x43b0, %edx           # imm = 0x43B0
callq 0x6320
movups 0x43b4(%r14), %xmm0
movups %xmm0, 0x43b4(%rbx)
movl $0x43f8, %esi           # imm = 0x43F8
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
movslq 0x21ea8(%rip), %r15     # 0x768b8
movq %r15, %rdx
callq 0x6320
movl $0x4748, %esi           # imm = 0x4748
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %rdx
callq 0x6320
movl $0x95720, %esi          # imm = 0x95720
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
movl $0xae0, %edx            # imm = 0xAE0
callq 0x6320
movl $0x96200, %esi          # imm = 0x96200
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
movl $0xae0, %edx            # imm = 0xAE0
callq 0x6320
movl $0x96ce0, %esi          # imm = 0x96CE0
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
movq %r15, %rdx
callq 0x6320
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 0x6320
movq 0x99cf8(%r14), %rax
movq %rax, 0x99cf8(%rbx)
testq %r15, %r15
jle 0x54ad2
movl %r15d, %eax
addq %rax, %rax
leaq (%rax,%rax,2), %rdx
leaq 0x97372(%rbx), %rdi
xorl %esi, %esi
callq 0x6200
movl $0x9de4, %r15d          # imm = 0x9DE4
cmpb $0x1, (%r14,%r15)
jne 0x54b01
leaq (%r14,%r15), %rsi
addq $-0x7c4, %rsi           # imm = 0xF83C
leaq (%rbx,%r15), %rdi
addq $-0x7c4, %rdi           # imm = 0xF83C
movl $0x7c8, %edx            # imm = 0x7C8
callq 0x6320
jmp 0x54b06
movb $0x0, (%rbx,%r15)
addq $0x7c8, %r15            # imm = 0x7C8
cmpq $0x95ee4, %r15          # imm = 0x95EE4
jne 0x54ad8
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)
popq %rbx
popq %r14
popq %r15
retq