// File: kobanium[P]Ray/src/feature/SimulationFeature.cpp
// Function: CheckFeatureLib3ForSimulation(game_info_t*, int, int, int*, int&)
static void
CheckFeatureLib3ForSimulation( game_info_t *game, const int color, const int id, int update[], int &update_num )
{
  const int *string_id = game->string_id;
  const string_t *string = game->string;
  const char *board = game->board;
  int neighbor = string[id].neighbor[0];
  int lib1, lib2, lib3;
  bool capturable1, capturable2;

  // 呼吸点が3つになった連の呼吸点を取り出す
  lib1 = string[id].lib[0];
  lib2 = string[id].lib[lib1];
  lib3 = string[id].lib[lib2];

  // 呼吸点の周囲が空点3つ, または呼吸点が3つ以上の自分の連に接続できるかで特徴を判定
  if (nb4_empty[Pat3(game->pat, lib1)] == 3 ||
      (board[NORTH(lib1)] == color && string_id[NORTH(lib1)] != id &&
       string[string_id[NORTH(lib1)]].libs >= 3) ||
      (board[ WEST(lib1)] == color && string_id[ WEST(lib1)] != id &&
       string[string_id[WEST(lib1)]].libs >= 3) ||
      (board[ EAST(lib1)] == color && string_id[ EAST(lib1)] != id &&
       string[string_id[EAST(lib1)]].libs >= 3) ||
      (board[SOUTH(lib1)] == color && string_id[SOUTH(lib1)] != id &&
       string[string_id[SOUTH(lib1)]].libs >= 3)) {
    CompareSwapFeature(game->tactical_features, lib1, EXTENSION, SIM_3POINT_EXTENSION_SAFELY);
  } else {
    CompareSwapFeature(game->tactical_features, lib1, EXTENSION, SIM_3POINT_EXTENSION);
  }

  // 呼吸点の周囲が空点3つ, または呼吸点が3つ以上の自分の連に接続できるかで特徴を判定
  if (nb4_empty[Pat3(game->pat, lib2)] == 3 ||
      (board[NORTH(lib2)] == color && string_id[NORTH(lib2)] != id &&
       string[string_id[NORTH(lib2)]].libs >= 3) ||
      (board[ WEST(lib2)] == color && string_id[ WEST(lib2)] != id &&
       string[string_id[WEST(lib2)]].libs >= 3) ||
      (board[ EAST(lib2)] == color && string_id[ EAST(lib2)] != id &&
       string[string_id[EAST(lib2)]].libs >= 3) ||
      (board[SOUTH(lib2)] == color && string_id[SOUTH(lib2)] != id &&
       string[string_id[SOUTH(lib2)]].libs >= 3)) {
    CompareSwapFeature(game->tactical_features, lib2, EXTENSION, SIM_3POINT_EXTENSION_SAFELY);
  } else {
    CompareSwapFeature(game->tactical_features, lib2, EXTENSION, SIM_3POINT_EXTENSION);
  }

  // 呼吸点の周囲が空点3つ, または呼吸点が3つ以上の自分の連に接続できるかで特徴を判定
  if (nb4_empty[Pat3(game->pat, lib3)] == 3 ||
      (board[NORTH(lib3)] == color && string_id[NORTH(lib3)] != id &&
       string[string_id[NORTH(lib3)]].libs >= 3) ||
      (board[ WEST(lib3)] == color && string_id[ WEST(lib3)] != id &&
       string[string_id[ WEST(lib3)]].libs >= 3) ||
      (board[ EAST(lib3)] == color && string_id[ EAST(lib3)] != id &&
       string[string_id[ EAST(lib3)]].libs >= 3) ||
      (board[SOUTH(lib3)] == color && string_id[SOUTH(lib3)] != id &&
       string[string_id[SOUTH(lib3)]].libs >= 3)) {
    CompareSwapFeature(game->tactical_features, lib3, EXTENSION, SIM_3POINT_EXTENSION_SAFELY);
  } else {
    CompareSwapFeature(game->tactical_features, lib3, EXTENSION, SIM_3POINT_EXTENSION);
  }

  // レートの更新対象に入れる
  update[update_num++] = lib1;
  update[update_num++] = lib2;
  update[update_num++] = lib3;

  // 呼吸点が3つになった連の周囲の敵連を調べる
  // 1. 呼吸点が1つの敵連
  // 2. 呼吸点が2つの敵連
  // 3. 呼吸点が3つの敵連
  // それぞれに対して, 特徴を判定する
  while (neighbor != NEIGHBOR_END) {
    if (string[neighbor].libs == 1) {
      lib1 = string[neighbor].lib[0];
      update[update_num++] = lib1;
      if (string[neighbor].size <= 2) {
        CompareSwapFeature(game->tactical_features, lib1, CAPTURE, SIM_3POINT_CAPTURE_SMALL);
      } else {
        CompareSwapFeature(game->tactical_features, lib1, CAPTURE, SIM_3POINT_CAPTURE_LARGE);
      }
    } else if (string[neighbor].libs == 2) {
      lib1 = string[neighbor].lib[0];
      lib2 = string[neighbor].lib[lib1];
      update[update_num++] = lib1;
      update[update_num++] = lib2;
      capturable1 = IsCapturableAtariForSimulation(game, lib1, color, neighbor);
      capturable2 = IsCapturableAtariForSimulation(game, lib2, color, neighbor);
      if (string[neighbor].size <= 2) {
        if (capturable1) {
          CompareSwapFeature(game->tactical_features, lib1, ATARI, SIM_3POINT_C_ATARI_SMALL);
        } else {
          CompareSwapFeature(game->tactical_features, lib1, ATARI, SIM_3POINT_ATARI_SMALL);
        }
        if (capturable2) {
          CompareSwapFeature(game->tactical_features, lib2, ATARI, SIM_3POINT_C_ATARI_SMALL);
        } else {
          CompareSwapFeature(game->tactical_features, lib2, ATARI, SIM_3POINT_ATARI_SMALL);
        }
      } else {
        if (capturable1) {
          CompareSwapFeature(game->tactical_features, lib1, ATARI, SIM_3POINT_C_ATARI_LARGE);
        } else {
          CompareSwapFeature(game->tactical_features, lib1, ATARI, SIM_3POINT_ATARI_LARGE);
        }
        if (capturable2) {
          CompareSwapFeature(game->tactical_features, lib2, ATARI, SIM_3POINT_C_ATARI_LARGE);
        } else {
          CompareSwapFeature(game->tactical_features, lib2, ATARI, SIM_3POINT_ATARI_LARGE);
        }
      }
    } else if (string[neighbor].libs == 3) {
      lib1 = string[neighbor].lib[0];
      lib2 = string[neighbor].lib[lib1];
      lib3 = string[neighbor].lib[lib2];
      update[update_num++] = lib1;
      update[update_num++] = lib2;
      update[update_num++] = lib3;
      if (string[neighbor].size <= 2) {
        CompareSwapFeature(game->tactical_features, lib1, DAME, SIM_3POINT_DAME_SMALL);
        CompareSwapFeature(game->tactical_features, lib2, DAME, SIM_3POINT_DAME_SMALL);
        CompareSwapFeature(game->tactical_features, lib3, DAME, SIM_3POINT_DAME_SMALL);
      } else {
        CompareSwapFeature(game->tactical_features, lib1, DAME, SIM_3POINT_DAME_LARGE);
        CompareSwapFeature(game->tactical_features, lib2, DAME, SIM_3POINT_DAME_LARGE);
        CompareSwapFeature(game->tactical_features, lib3, DAME, SIM_3POINT_DAME_LARGE);
      }
    }
    neighbor = string[id].neighbor[neighbor];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x95720, %rax          # imm = 0x95720
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
addq $0x9620, %rax           # imm = 0x9620
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x43f8, %rax           # imm = 0x43F8
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movswl 0x57c(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movswl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
movswl 0x8(%rax,%rcx,2), %eax
movl %eax, -0x44(%rbp)
movq -0x30(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movslq -0x44(%rbp), %rcx
movswl 0x8(%rax,%rcx,2), %eax
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
addq $0x4748, %rdi           # imm = 0x4748
movl -0x40(%rbp), %esi
callq 0x93d30
movl %eax, %eax
movl %eax, %ecx
leaq 0x1ab0ed8d(%rip), %rax  # 0x1abb0860
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
je 0xa1c4c
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
leaq 0x45f5e(%rip), %rdx     # 0xe7a4c
subl (%rdx), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1b46
movq -0x28(%rbp), %rax
movl -0x40(%rbp), %ecx
leaq 0x45f42(%rip), %rdx     # 0xe7a4c
subl (%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1b46
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x40(%rbp), %edx
leaq 0x45f23(%rip), %rsi     # 0xe7a4c
subl (%rsi), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jge 0xa1c4c
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1b9a
movq -0x28(%rbp), %rax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1b9a
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x40(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jge 0xa1c4c
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1bea
movq -0x28(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1bea
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x40(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jge 0xa1c4c
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
leaq 0x45e54(%rip), %rdx     # 0xe7a4c
addl (%rdx), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1c68
movq -0x28(%rbp), %rax
movl -0x40(%rbp), %ecx
leaq 0x45e38(%rip), %rdx     # 0xe7a4c
addl (%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1c68
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x40(%rbp), %edx
leaq 0x45e19(%rip), %rsi     # 0xe7a4c
addl (%rsi), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jl 0xa1c68
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x40(%rbp), %esi
movl $0x3, %ecx
movl %ecx, %edx
callq 0xa35f0
jmp 0xa1c85
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x40(%rbp), %esi
movl $0x3, %edx
movl $0x1, %ecx
callq 0xa35f0
movq -0x8(%rbp), %rdi
addq $0x4748, %rdi           # imm = 0x4748
movl -0x44(%rbp), %esi
callq 0x93d30
movl %eax, %eax
movl %eax, %ecx
leaq 0x1ab0ebbd(%rip), %rax  # 0x1abb0860
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
je 0xa1e1c
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
leaq 0x45d8e(%rip), %rdx     # 0xe7a4c
subl (%rdx), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1d16
movq -0x28(%rbp), %rax
movl -0x44(%rbp), %ecx
leaq 0x45d72(%rip), %rdx     # 0xe7a4c
subl (%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1d16
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
leaq 0x45d53(%rip), %rsi     # 0xe7a4c
subl (%rsi), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jge 0xa1e1c
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1d6a
movq -0x28(%rbp), %rax
movl -0x44(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1d6a
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jge 0xa1e1c
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1dba
movq -0x28(%rbp), %rax
movl -0x44(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1dba
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jge 0xa1e1c
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
leaq 0x45c84(%rip), %rdx     # 0xe7a4c
addl (%rdx), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1e38
movq -0x28(%rbp), %rax
movl -0x44(%rbp), %ecx
leaq 0x45c68(%rip), %rdx     # 0xe7a4c
addl (%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1e38
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x44(%rbp), %edx
leaq 0x45c49(%rip), %rsi     # 0xe7a4c
addl (%rsi), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jl 0xa1e38
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x44(%rbp), %esi
movl $0x3, %ecx
movl %ecx, %edx
callq 0xa35f0
jmp 0xa1e55
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x44(%rbp), %esi
movl $0x3, %edx
movl $0x1, %ecx
callq 0xa35f0
movq -0x8(%rbp), %rdi
addq $0x4748, %rdi           # imm = 0x4748
movl -0x48(%rbp), %esi
callq 0x93d30
movl %eax, %eax
movl %eax, %ecx
leaq 0x1ab0e9ed(%rip), %rax  # 0x1abb0860
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
je 0xa1fec
movq -0x38(%rbp), %rax
movl -0x48(%rbp), %ecx
leaq 0x45bbe(%rip), %rdx     # 0xe7a4c
subl (%rdx), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1ee6
movq -0x28(%rbp), %rax
movl -0x48(%rbp), %ecx
leaq 0x45ba2(%rip), %rdx     # 0xe7a4c
subl (%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1ee6
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x48(%rbp), %edx
leaq 0x45b83(%rip), %rsi     # 0xe7a4c
subl (%rsi), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jge 0xa1fec
movq -0x38(%rbp), %rax
movl -0x48(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1f3a
movq -0x28(%rbp), %rax
movl -0x48(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1f3a
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x48(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jge 0xa1fec
movq -0x38(%rbp), %rax
movl -0x48(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa1f8a
movq -0x28(%rbp), %rax
movl -0x48(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa1f8a
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x48(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jge 0xa1fec
movq -0x38(%rbp), %rax
movl -0x48(%rbp), %ecx
leaq 0x45ab4(%rip), %rdx     # 0xe7a4c
addl (%rdx), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0xa2008
movq -0x28(%rbp), %rax
movl -0x48(%rbp), %ecx
leaq 0x45a98(%rip), %rdx     # 0xe7a4c
addl (%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x10(%rbp), %eax
je 0xa2008
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl -0x48(%rbp), %edx
leaq 0x45a79(%rip), %rsi     # 0xe7a4c
addl (%rsi), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jl 0xa2008
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x48(%rbp), %esi
movl $0x3, %ecx
movl %ecx, %edx
callq 0xa35f0
jmp 0xa2025
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x48(%rbp), %esi
movl $0x3, %edx
movl $0x1, %ecx
callq 0xa35f0
movl -0x40(%rbp), %edx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x44(%rbp), %edx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x48(%rbp), %edx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
cmpl $0x11f, -0x3c(%rbp)     # imm = 0x11F
je 0xa24bd
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x1, 0x4(%rax)
jne 0xa2125
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movswl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %edx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x2, 0x7c0(%rax)
jg 0xa2106
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x40(%rbp), %esi
xorl %edx, %edx
movl $0x5, %ecx
callq 0xa35f0
jmp 0xa2120
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x40(%rbp), %esi
xorl %edx, %edx
movl $0x7, %ecx
callq 0xa35f0
jmp 0xa2497
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x2, 0x4(%rax)
jne 0xa2307
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movswl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
movswl 0x8(%rax,%rcx,2), %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %edx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x44(%rbp), %edx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rdi
movl -0x40(%rbp), %esi
movl -0xc(%rbp), %edx
movl -0x3c(%rbp), %ecx
callq 0xa8790
andb $0x1, %al
movb %al, -0x49(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0xc(%rbp), %edx
movl -0x3c(%rbp), %ecx
callq 0xa8790
andb $0x1, %al
movb %al, -0x4a(%rbp)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x2, 0x7c0(%rax)
jg 0xa227c
testb $0x1, -0x49(%rbp)
je 0xa221e
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x40(%rbp), %esi
movl $0x2, %edx
movl $0x6, %ecx
callq 0xa35f0
jmp 0xa2238
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x40(%rbp), %esi
movl $0x2, %ecx
movl %ecx, %edx
callq 0xa35f0
testb $0x1, -0x4a(%rbp)
je 0xa225d
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x44(%rbp), %esi
movl $0x2, %edx
movl $0x6, %ecx
callq 0xa35f0
jmp 0xa2277
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x44(%rbp), %esi
movl $0x2, %ecx
movl %ecx, %edx
callq 0xa35f0
jmp 0xa2302
testb $0x1, -0x49(%rbp)
je 0xa22a1
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x40(%rbp), %esi
movl $0x2, %edx
movl $0x8, %ecx
callq 0xa35f0
jmp 0xa22be
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x40(%rbp), %esi
movl $0x2, %edx
movl $0x4, %ecx
callq 0xa35f0
testb $0x1, -0x4a(%rbp)
je 0xa22e3
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x44(%rbp), %esi
movl $0x2, %edx
movl $0x8, %ecx
callq 0xa35f0
jmp 0xa2300
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x44(%rbp), %esi
movl $0x2, %edx
movl $0x4, %ecx
callq 0xa35f0
jmp 0xa2302
jmp 0xa2495
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jne 0xa2493
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movswl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
movswl 0x8(%rax,%rcx,2), %eax
movl %eax, -0x44(%rbp)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movslq -0x44(%rbp), %rcx
movswl 0x8(%rax,%rcx,2), %eax
movl %eax, -0x48(%rbp)
movl -0x40(%rbp), %edx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x44(%rbp), %edx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x48(%rbp), %edx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
cmpl $0x2, 0x7c0(%rax)
jg 0xa243a
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x40(%rbp), %esi
movl $0x4, %edx
movl $0x1, %ecx
callq 0xa35f0
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x44(%rbp), %esi
movl $0x4, %edx
movl $0x1, %ecx
callq 0xa35f0
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x48(%rbp), %esi
movl $0x4, %edx
movl $0x1, %ecx
callq 0xa35f0
jmp 0xa2491
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x40(%rbp), %esi
movl $0x4, %edx
movl $0x2, %ecx
callq 0xa35f0
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x44(%rbp), %esi
movl $0x4, %edx
movl $0x2, %ecx
callq 0xa35f0
movq -0x8(%rbp), %rdi
addq $0x97372, %rdi          # imm = 0x97372
movl -0x48(%rbp), %esi
movl $0x4, %edx
movl $0x2, %ecx
callq 0xa35f0
jmp 0xa2493
jmp 0xa2495
jmp 0xa2497
movq -0x30(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
addq %rcx, %rax
movslq -0x3c(%rbp), %rcx
movswl 0x57c(%rax,%rcx,2), %eax
movl %eax, -0x3c(%rbp)
jmp 0xa2073
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)