// File: kobanium[P]Ray/src/learn/FactorizationMachines.cpp
// Function: InitializeLearning()
static void
InitializeLearning( void )
{
  std::random_device rand;
  std::mt19937_64 mt(rand());
  std::normal_distribution<> dist(0.0, 0.1);
  int id = 0;

  lr_schedule[ 0] = 0.01;
  lr_schedule[ 5] = 0.005;
  lr_schedule[15] = 0.0025;
  lr_schedule[25] = 0.00125;
  lr_schedule[35] = 0.000625;
  lr_schedule[40] = -1.0;

  all_moves.store(0);
  counter.store(0);


  const std::string target_base_path = GetWorkingDirectory() + PATH_SEPARATOR +
    LEARNING_RESULT_DIR_NAME + PATH_SEPARATOR +
    PATTERN_TARGET_DIR_NAME + PATH_SEPARATOR;
  const std::string md2_target_path(target_base_path + MD2_TARGET_FILE_NAME);
  const std::string md3_target_path(target_base_path + MD3_TARGET_FILE_NAME);
  const std::string md4_target_path(target_base_path + MD4_TARGET_FILE_NAME);
  const std::string md5_target_path(target_base_path + MD5_TARGET_FILE_NAME);

  InputMD2Target(md2_target_path, md2_index, md2_list, md2_target);
  InputLargePatternTarget(md3_target_path, md3_index, md3_list, md3_target);
  InputLargePatternTarget(md4_target_path, md4_index, md4_list, md4_target);
  InputLargePatternTarget(md5_target_path, md5_index, md5_list, md5_target);

  std::vector<std::string> n_patterns;

  n_patterns.push_back(std::to_string(md3_target.size()));
  n_patterns.push_back(std::to_string(md4_target.size()));
  n_patterns.push_back(std::to_string(md5_target.size()));

  InitializeWeights(move_distance_1, MOVE_DISTANCE_MAX * 4, mt, dist, id);
  InitializeWeights(move_distance_2, MOVE_DISTANCE_MAX * 4, mt, dist, id);
  InitializeWeights(move_distance_3, MOVE_DISTANCE_MAX * 4, mt, dist, id);
  InitializeWeights(move_distance_4, MOVE_DISTANCE_MAX * 4, mt, dist, id);

  InitializeWeights(pat3, PAT3_MAX, mt, dist, id);
  InitializeWeights(md2, md2_target.size(), mt, dist, id);
  InitializeWeights(md3, md3_target.size(), mt, dist, id);
  InitializeWeights(md4, md4_target.size(), mt, dist, id);
  InitializeWeights(md5, md5_target.size(), mt, dist, id);
  InitializeWeights(pos_id, POS_ID_MAX, mt, dist, id);
  InitializeWeights(capture, UCT_CAPTURE_MAX, mt, dist, id);
  InitializeWeights(save_extension, UCT_SAVE_EXTENSION_MAX, mt, dist, id);
  InitializeWeights(atari, UCT_ATARI_MAX, mt, dist, id);
  InitializeWeights(extension, UCT_EXTENSION_MAX, mt, dist, id);
  InitializeWeights(dame, UCT_DAME_MAX, mt, dist, id);
  InitializeWeights(connect, UCT_CONNECT_MAX, mt, dist, id);
  InitializeWeights(throw_in, UCT_THROW_IN_MAX, mt, dist, id);
  InitializeWeights(pass, UCT_PASS_MAX, mt, dist, id);
  InitializeWeights(ko_exist, 1, mt, dist, id);

  capture[0].w = 1.0;
  save_extension[0].w = 1.0;
  atari[0].w = 1.0;
  extension[0].w = 1.0;
  dame[0].w = 1.0;
  connect[0].w = 1.0;
  throw_in[0].w = 1.0;
  for (int i = 0; i < FM_DIMENSION; i++) {
    capture[0].v[i] = 1.0;
    save_extension[0].v[i] = 1.0;
    atari[0].v[i] = 1.0;
    extension[0].v[i]= 1.0;
    dame[0].v[i] = 1.0;
    connect[0].v[i] = 1.0;
    throw_in[0].v[i] = 1.0;
  }

  unsigned int transpose[16];
  pat3_index = std::vector<int>(PAT3_MAX, -1);
  for (unsigned int pat_3x3 = 0; pat_3x3 < static_cast<unsigned int>(PAT3_MAX); pat_3x3++) {
    if (pat3_index[pat_3x3] == -1) {
      Pat3Transpose16(pat_3x3, transpose);
      const int tc = GetUniquePattern(transpose, 16);
      for (int i = 0; i < tc; i++) {
        pat3_index[transpose[i]] = pat_3x3;
      }
    }
  }

  mutex_terms = new std::mutex[id];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2120, %rsp           # imm = 0x2120
leaq -0x13b8(%rbp), %rdi
movq %rdi, -0x2088(%rbp)
callq 0x630a0
movq -0x2088(%rbp), %rdi
callq 0x63140
movl %eax, -0x2080(%rbp)
jmp 0x592b2
movl -0x2080(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
leaq -0x1d80(%rbp), %rdi
callq 0x63160
jmp 0x592ca
leaq -0x1db0(%rbp), %rdi
xorps %xmm0, %xmm0
movsd 0x530e4(%rip), %xmm1    # 0xac3c0
callq 0x63190
jmp 0x592e3
movl $0x0, -0x1db4(%rbp)
movl $0x0, -0x1db8(%rbp)
leaq 0x9022a(%rip), %rdi     # 0xe9528
leaq -0x1db8(%rbp), %rsi
callq 0x631e0
movq %rax, -0x2090(%rbp)
jmp 0x59313
movq -0x2090(%rbp), %rax
movabsq $0x3f847ae147ae147b, %rcx # imm = 0x3F847AE147AE147B
movq %rcx, (%rax)
movl $0x5, -0x1dbc(%rbp)
leaq 0x901f0(%rip), %rdi     # 0xe9528
leaq -0x1dbc(%rbp), %rsi
callq 0x631e0
movq %rax, -0x2098(%rbp)
jmp 0x5934d
movq -0x2098(%rbp), %rax
movabsq $0x3f747ae147ae147b, %rcx # imm = 0x3F747AE147AE147B
movq %rcx, (%rax)
movl $0xf, -0x1dc0(%rbp)
leaq 0x901b6(%rip), %rdi     # 0xe9528
leaq -0x1dc0(%rbp), %rsi
callq 0x631e0
movq %rax, -0x20a0(%rbp)
jmp 0x59387
movq -0x20a0(%rbp), %rax
movabsq $0x3f647ae147ae147b, %rcx # imm = 0x3F647AE147AE147B
movq %rcx, (%rax)
movl $0x19, -0x1dc4(%rbp)
leaq 0x9017c(%rip), %rdi     # 0xe9528
leaq -0x1dc4(%rbp), %rsi
callq 0x631e0
movq %rax, -0x20a8(%rbp)
jmp 0x593c1
movq -0x20a8(%rbp), %rax
movabsq $0x3f547ae147ae147b, %rcx # imm = 0x3F547AE147AE147B
movq %rcx, (%rax)
movl $0x23, -0x1dc8(%rbp)
leaq 0x90142(%rip), %rdi     # 0xe9528
leaq -0x1dc8(%rbp), %rsi
callq 0x631e0
movq %rax, -0x20b0(%rbp)
jmp 0x593fb
movq -0x20b0(%rbp), %rax
movabsq $0x3f447ae147ae147b, %rcx # imm = 0x3F447AE147AE147B
movq %rcx, (%rax)
movl $0x28, -0x1dcc(%rbp)
leaq 0x90108(%rip), %rdi     # 0xe9528
leaq -0x1dcc(%rbp), %rsi
callq 0x631e0
movq %rax, -0x20b8(%rbp)
jmp 0x59435
movq -0x20b8(%rbp), %rax
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq 0x90258(%rip), %rax     # 0xe96a8
movq %rax, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x5, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20c8(%rbp)
movl -0x10(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x25b00
movl %eax, -0x20bc(%rbp)
jmp 0x59482
movl -0x20bc(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x20cc(%rbp)
movl -0xc(%rbp), %ecx
movl %ecx, -0x18(%rbp)
subl $0x3, %eax
je 0x594bc
jmp 0x594a1
movl -0x20cc(%rbp), %eax
subl $0x5, %eax
je 0x594ca
jmp 0x594ae
movq -0x20c8(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x594e0
movq -0x20c8(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x594e0
movq -0x20c8(%rbp), %rcx
movl -0x18(%rbp), %eax
xchgl %eax, (%rcx)
jmp 0x594e0
movq %rax, %rdi
callq 0x25ac0
leaq 0x901c5(%rip), %rax     # 0xe96ac
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x5, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x20d8(%rbp)
movl -0x28(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x25b00
movl %eax, -0x20d0(%rbp)
jmp 0x59519
movl -0x20d0(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x20dc(%rbp)
movl -0x24(%rbp), %ecx
movl %ecx, -0x30(%rbp)
subl $0x3, %eax
je 0x59553
jmp 0x59538
movl -0x20dc(%rbp), %eax
subl $0x5, %eax
je 0x59561
jmp 0x59545
movq -0x20d8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x59577
movq -0x20d8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x59577
movq -0x20d8(%rbp), %rcx
movl -0x30(%rbp), %eax
xchgl %eax, (%rcx)
jmp 0x59577
movq %rax, %rdi
callq 0x25ac0
leaq -0x1e90(%rbp), %rdi
callq 0x2ccc0
jmp 0x59585
leaq 0x8fc24(%rip), %rdx     # 0xe91b0
leaq -0x1e70(%rbp), %rdi
leaq -0x1e90(%rbp), %rsi
callq 0x632c0
jmp 0x595a1
leaq 0x54a38(%rip), %rdx     # 0xadfe0
leaq -0x1e50(%rbp), %rdi
leaq -0x1e70(%rbp), %rsi
callq 0x63310
jmp 0x595bd
leaq 0x8fbec(%rip), %rdx     # 0xe91b0
leaq -0x1e30(%rbp), %rdi
leaq -0x1e50(%rbp), %rsi
callq 0x632c0
jmp 0x595d9
leaq 0x54a10(%rip), %rdx     # 0xadff0
leaq -0x1e10(%rbp), %rdi
leaq -0x1e30(%rbp), %rsi
callq 0x63310
jmp 0x595f5
leaq 0x8fbb4(%rip), %rdx     # 0xe91b0
leaq -0x1df0(%rbp), %rdi
leaq -0x1e10(%rbp), %rsi
callq 0x632c0
jmp 0x59611
leaq -0x1e10(%rbp), %rdi
callq 0x7ae8
leaq -0x1e30(%rbp), %rdi
callq 0x7ae8
leaq -0x1e50(%rbp), %rdi
callq 0x7ae8
leaq -0x1e70(%rbp), %rdi
callq 0x7ae8
leaq -0x1e90(%rbp), %rdi
callq 0x7ae8
leaq 0x549ab(%rip), %rdx     # 0xadfff
leaq -0x1eb0(%rbp), %rdi
leaq -0x1df0(%rbp), %rsi
callq 0x63360
jmp 0x59669
leaq 0x5499d(%rip), %rdx     # 0xae00d
leaq -0x1ed0(%rbp), %rdi
leaq -0x1df0(%rbp), %rsi
callq 0x63360
jmp 0x59685
leaq 0x5498f(%rip), %rdx     # 0xae01b
leaq -0x1ef0(%rbp), %rdi
leaq -0x1df0(%rbp), %rsi
callq 0x63360
jmp 0x596a1
leaq 0x54981(%rip), %rdx     # 0xae029
leaq -0x1f10(%rbp), %rdi
leaq -0x1df0(%rbp), %rsi
callq 0x63360
jmp 0x596bd
leaq -0x1f30(%rbp), %rdi
leaq -0x1eb0(%rbp), %rsi
callq 0x71f0
jmp 0x596d2
leaq 0x8fb0f(%rip), %rsi     # 0xe91e8
leaq 0x8fd30(%rip), %rdx     # 0xe9410
leaq 0x8fd89(%rip), %rcx     # 0xe9470
leaq -0x1f30(%rbp), %rdi
callq 0x7bd90
jmp 0x596f5
leaq -0x1f30(%rbp), %rdi
callq 0x7ae8
leaq -0x1f50(%rbp), %rdi
leaq -0x1ed0(%rbp), %rsi
callq 0x71f0
jmp 0x59716
leaq 0x8fae3(%rip), %rsi     # 0xe9200
leaq 0x8fd04(%rip), %rdx     # 0xe9428
leaq 0x8fd6d(%rip), %rcx     # 0xe9498
leaq -0x1f50(%rbp), %rdi
callq 0x7c0c0
jmp 0x59739
leaq -0x1f50(%rbp), %rdi
callq 0x7ae8
leaq -0x1f70(%rbp), %rdi
leaq -0x1ef0(%rbp), %rsi
callq 0x71f0
jmp 0x5975a
leaq 0x8fab7(%rip), %rsi     # 0xe9218
leaq 0x8fcd8(%rip), %rdx     # 0xe9440
leaq 0x8fd51(%rip), %rcx     # 0xe94c0
leaq -0x1f70(%rbp), %rdi
callq 0x7c0c0
jmp 0x5977d
leaq -0x1f70(%rbp), %rdi
callq 0x7ae8
leaq -0x1f90(%rbp), %rdi
leaq -0x1f10(%rbp), %rsi
callq 0x71f0
jmp 0x5979e
leaq 0x8fa8b(%rip), %rsi     # 0xe9230
leaq 0x8fcac(%rip), %rdx     # 0xe9458
leaq 0x8fd35(%rip), %rcx     # 0xe94e8
leaq -0x1f90(%rbp), %rdi
callq 0x7c0c0
jmp 0x597c1
leaq -0x1f90(%rbp), %rdi
callq 0x7ae8
leaq -0x1fa8(%rbp), %rdi
callq 0x29b60
leaq 0x8fcb8(%rip), %rdi     # 0xe9498
callq 0x634c0
movq %rax, %rsi
leaq -0x1fc8(%rbp), %rdi
callq 0x633e0
jmp 0x597f6
leaq -0x1fa8(%rbp), %rdi
leaq -0x1fc8(%rbp), %rsi
callq 0x29b80
jmp 0x5980b
leaq -0x1fc8(%rbp), %rdi
callq 0x7ae8
leaq 0x8fca2(%rip), %rdi     # 0xe94c0
callq 0x634c0
movq %rax, %rsi
leaq -0x1fe8(%rbp), %rdi
callq 0x633e0
jmp 0x59834
leaq -0x1fa8(%rbp), %rdi
leaq -0x1fe8(%rbp), %rsi
callq 0x29b80
jmp 0x59849
leaq -0x1fe8(%rbp), %rdi
callq 0x7ae8
leaq 0x8fc8c(%rip), %rdi     # 0xe94e8
callq 0x634c0
movq %rax, %rsi
leaq -0x2008(%rbp), %rdi
callq 0x633e0
jmp 0x59872
leaq -0x1fa8(%rbp), %rdi
leaq -0x2008(%rbp), %rsi
callq 0x29b80
jmp 0x59887
leaq -0x2008(%rbp), %rdi
callq 0x7ae8
leaq 0x8fae6(%rip), %rdi     # 0xe9380
movl $0x40, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x598bb
leaq 0x8fad6(%rip), %rdi     # 0xe9398
movl $0x40, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x598e3
leaq 0x8fac6(%rip), %rdi     # 0xe93b0
movl $0x40, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x5990b
leaq 0x8fab6(%rip), %rdi     # 0xe93c8
movl $0x40, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59933
leaq 0x8f90e(%rip), %rdi     # 0xe9248
movl $0x10000, %esi          # imm = 0x10000
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x5995b
leaq 0x8fb0e(%rip), %rdi     # 0xe9470
callq 0x634c0
movl %eax, %esi
leaq 0x8f8f0(%rip), %rdi     # 0xe9260
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x5998c
leaq 0x8fb05(%rip), %rdi     # 0xe9498
callq 0x634c0
movl %eax, %esi
leaq 0x8f8d7(%rip), %rdi     # 0xe9278
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x599bd
leaq 0x8fafc(%rip), %rdi     # 0xe94c0
callq 0x634c0
movl %eax, %esi
leaq 0x8f8be(%rip), %rdi     # 0xe9290
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x599ee
leaq 0x8faf3(%rip), %rdi     # 0xe94e8
callq 0x634c0
movl %eax, %esi
leaq 0x8f8a5(%rip), %rdi     # 0xe92a8
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59a1f
leaq 0x8f89a(%rip), %rdi     # 0xe92c0
movl $0x40, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59a47
leaq 0x8f88a(%rip), %rdi     # 0xe92d8
movl $0x1b, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59a6f
leaq 0x8f87a(%rip), %rdi     # 0xe92f0
movl $0x5, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59a97
leaq 0x8f86a(%rip), %rdi     # 0xe9308
movl $0x12, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59abf
leaq 0x8f85a(%rip), %rdi     # 0xe9320
movl $0x7, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59ae7
leaq 0x8f84a(%rip), %rdi     # 0xe9338
movl $0x5, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59b0f
leaq 0x8f83a(%rip), %rdi     # 0xe9350
movl $0x2, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59b37
leaq 0x8f82a(%rip), %rdi     # 0xe9368
movl $0x2, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59b5f
leaq 0x8f87a(%rip), %rdi     # 0xe93e0
movl $0x2, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59b87
leaq 0x8f86a(%rip), %rdi     # 0xe93f8
movl $0x1, %esi
leaq -0x1d80(%rbp), %rdx
leaq -0x1db0(%rbp), %rcx
leaq -0x1db4(%rbp), %r8
callq 0x5af30
jmp 0x59baf
leaq 0x8f722(%rip), %rdi     # 0xe92d8
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movsd 0x52441(%rip), %xmm0    # 0xac008
movsd %xmm0, (%rax)
leaq 0x8f71e(%rip), %rdi     # 0xe92f0
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movsd 0x52425(%rip), %xmm0    # 0xac008
movsd %xmm0, (%rax)
leaq 0x8f71a(%rip), %rdi     # 0xe9308
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movsd 0x52409(%rip), %xmm0    # 0xac008
movsd %xmm0, (%rax)
leaq 0x8f716(%rip), %rdi     # 0xe9320
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movsd 0x523ed(%rip), %xmm0    # 0xac008
movsd %xmm0, (%rax)
leaq 0x8f712(%rip), %rdi     # 0xe9338
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movsd 0x523d1(%rip), %xmm0    # 0xac008
movsd %xmm0, (%rax)
leaq 0x8f70e(%rip), %rdi     # 0xe9350
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movsd 0x523b5(%rip), %xmm0    # 0xac008
movsd %xmm0, (%rax)
leaq 0x8f70a(%rip), %rdi     # 0xe9368
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movsd 0x52399(%rip), %xmm0    # 0xac008
movsd %xmm0, (%rax)
movl $0x0, -0x200c(%rbp)
cmpl $0x5, -0x200c(%rbp)
jge 0x59fda
leaq 0x8f647(%rip), %rdi     # 0xe92d8
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movslq -0x200c(%rbp), %rcx
movsd 0x5235f(%rip), %xmm0    # 0xac008
movsd %xmm0, 0x8(%rax,%rcx,8)
leaq 0x8f63a(%rip), %rdi     # 0xe92f0
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movslq -0x200c(%rbp), %rcx
movsd 0x5233a(%rip), %xmm0    # 0xac008
movsd %xmm0, 0x8(%rax,%rcx,8)
leaq 0x8f62d(%rip), %rdi     # 0xe9308
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movslq -0x200c(%rbp), %rcx
movsd 0x52315(%rip), %xmm0    # 0xac008
movsd %xmm0, 0x8(%rax,%rcx,8)
leaq 0x8f620(%rip), %rdi     # 0xe9320
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movslq -0x200c(%rbp), %rcx
movsd 0x522f0(%rip), %xmm0    # 0xac008
movsd %xmm0, 0x8(%rax,%rcx,8)
leaq 0x8f613(%rip), %rdi     # 0xe9338
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movslq -0x200c(%rbp), %rcx
movsd 0x522cb(%rip), %xmm0    # 0xac008
movsd %xmm0, 0x8(%rax,%rcx,8)
leaq 0x8f606(%rip), %rdi     # 0xe9350
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movslq -0x200c(%rbp), %rcx
movsd 0x522a6(%rip), %xmm0    # 0xac008
movsd %xmm0, 0x8(%rax,%rcx,8)
leaq 0x8f5f9(%rip), %rdi     # 0xe9368
xorl %eax, %eax
movl %eax, %esi
callq 0x63540
movslq -0x200c(%rbp), %rcx
movsd 0x52281(%rip), %xmm0    # 0xac008
movsd %xmm0, 0x8(%rax,%rcx,8)
movl -0x200c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x200c(%rbp)
jmp 0x59c7d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x5a290
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x59e4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x59e3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x59e32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x59e26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
leaq -0x1e10(%rbp), %rdi
callq 0x7ae8
leaq -0x1e30(%rbp), %rdi
callq 0x7ae8
leaq -0x1e50(%rbp), %rdi
callq 0x7ae8
leaq -0x1e70(%rbp), %rdi
callq 0x7ae8
leaq -0x1e90(%rbp), %rdi
callq 0x7ae8
jmp 0x5a290
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x5a284
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x5a278
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x5a26c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x5a260
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x5a254
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
leaq -0x1f30(%rbp), %rdi
callq 0x7ae8
jmp 0x5a254
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
leaq -0x1f50(%rbp), %rdi
callq 0x7ae8
jmp 0x5a254
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
leaq -0x1f70(%rbp), %rdi
callq 0x7ae8
jmp 0x5a254
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
leaq -0x1f90(%rbp), %rdi
callq 0x7ae8
jmp 0x5a254
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
jmp 0x5a248
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
leaq -0x1fc8(%rbp), %rdi
callq 0x7ae8
jmp 0x5a248
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
leaq -0x1fe8(%rbp), %rdi
callq 0x7ae8
jmp 0x5a248
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
leaq -0x2008(%rbp), %rdi
callq 0x7ae8
jmp 0x5a248
movl $0xffffffff, -0x206c(%rbp) # imm = 0xFFFFFFFF
leaq -0x206d(%rbp), %rdi
movq %rdi, -0x20e8(%rbp)
callq 0x4d840
movq -0x20e8(%rbp), %rcx
leaq -0x2068(%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
leaq -0x206c(%rbp), %rdx
callq 0x4d860
jmp 0x5a018
leaq 0x8f1b1(%rip), %rdi     # 0xe91d0
leaq -0x2068(%rbp), %rsi
callq 0x63560
leaq -0x2068(%rbp), %rdi
callq 0x2d610
leaq -0x206d(%rbp), %rdi
callq 0x4d8e0
movl $0x0, -0x2074(%rbp)
cmpl $0x10000, -0x2074(%rbp) # imm = 0x10000
jae 0x5a147
movl -0x2074(%rbp), %eax
movl %eax, %esi
leaq 0x8f164(%rip), %rdi     # 0xe91d0
callq 0x63590
cmpl $-0x1, (%rax)
jne 0x5a131
movl -0x2074(%rbp), %edi
leaq -0x2050(%rbp), %rsi
callq 0x92da0
jmp 0x5a08e
leaq -0x2050(%rbp), %rdi
movl $0x10, %esi
callq 0x7c400
movl %eax, -0x20ec(%rbp)
jmp 0x5a0a7
movl -0x20ec(%rbp), %eax
movl %eax, -0x2078(%rbp)
movl $0x0, -0x207c(%rbp)
movl -0x207c(%rbp), %eax
cmpl -0x2078(%rbp), %eax
jge 0x5a12f
movl -0x2074(%rbp), %eax
movl %eax, -0x20f0(%rbp)
movslq -0x207c(%rbp), %rax
movl -0x2050(%rbp,%rax,4), %eax
movl %eax, %esi
leaq 0x8f0e2(%rip), %rdi     # 0xe91d0
callq 0x63590
movl -0x20f0(%rbp), %ecx
movl %ecx, (%rax)
movl -0x207c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x207c(%rbp)
jmp 0x5a0bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d88(%rbp)
movl %eax, -0x1d8c(%rbp)
leaq -0x206d(%rbp), %rdi
callq 0x4d8e0
jmp 0x5a248
jmp 0x5a131
jmp 0x5a133
movl -0x2074(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2074(%rbp)
jmp 0x5a04d
movslq -0x1db4(%rbp), %rax
movq %rax, -0x2100(%rbp)
movl $0x28, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x7040
movq %rax, -0x20f8(%rbp)
jmp 0x5a179
movq -0x2100(%rbp), %rax
cmpq $0x0, %rax
je 0x5a1dd
movq -0x20f8(%rbp), %rax
movq -0x2100(%rbp), %rcx
imulq $0x28, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x2110(%rbp)
movq %rax, -0x2108(%rbp)
movq -0x2108(%rbp), %rdi
movq %rdi, -0x2118(%rbp)
callq 0x635b0
movq -0x2118(%rbp), %rax
movq -0x2110(%rbp), %rcx
addq $0x28, %rax
cmpq %rcx, %rax
movq %rax, -0x2108(%rbp)
jne 0x5a1ac
movq -0x20f8(%rbp), %rax
movq %rax, 0x8f4c5(%rip)     # 0xe96b0
leaq -0x1fa8(%rbp), %rdi
callq 0x29bd0
leaq -0x1f10(%rbp), %rdi
callq 0x7ae8
leaq -0x1ef0(%rbp), %rdi
callq 0x7ae8
leaq -0x1ed0(%rbp), %rdi
callq 0x7ae8
leaq -0x1eb0(%rbp), %rdi
callq 0x7ae8
leaq -0x1df0(%rbp), %rdi
callq 0x7ae8
leaq -0x13b8(%rbp), %rdi
callq 0x635d0
addq $0x2120, %rsp           # imm = 0x2120
popq %rbp
retq
leaq -0x1fa8(%rbp), %rdi
callq 0x29bd0
leaq -0x1f10(%rbp), %rdi
callq 0x7ae8
leaq -0x1ef0(%rbp), %rdi
callq 0x7ae8
leaq -0x1ed0(%rbp), %rdi
callq 0x7ae8
leaq -0x1eb0(%rbp), %rdi
callq 0x7ae8
leaq -0x1df0(%rbp), %rdi
callq 0x7ae8
leaq -0x13b8(%rbp), %rdi
callq 0x635d0
movq -0x1d88(%rbp), %rdi
callq 0x79b0
nopl (%rax,%rax)