// File: kobanium[P]Ray/src/mcts/Rating.cpp
// Function: LoadFeatureParameters()
static void
LoadFeatureParameters( void )
{
  std::string po_parameters_path = GetWorkingDirectory() + PATH_SEPARATOR + "sim_params" + PATH_SEPARATOR;
  std::string path;

  // 直前の着手からの距離の読み込み
  path = po_parameters_path + "PreviousDistance.txt";
  LoadParameter(path.c_str(), po_neighbor_orig, PREVIOUS_DISTANCE_MAX);

  // 直前の着手からの距離のγを補正して出力
  for (int i = 0; i < PREVIOUS_DISTANCE_MAX - 1; i++) {
    po_previous_distance[i] = static_cast<float>(po_neighbor_orig[i] * neighbor_bias);
  }
  po_previous_distance[2] = static_cast<float>(po_neighbor_orig[2] * jump_bias);

  // 戦術的特徴の読み込み
  path = po_parameters_path + "CaptureFeature.txt";
  LoadParameter(path.c_str(), sim_capture, SIM_CAPTURE_MAX);

  path = po_parameters_path + "SaveExtensionFeature.txt";
  LoadParameter(path.c_str(), sim_save_extension, SIM_SAVE_EXTENSION_MAX);

  path = po_parameters_path + "AtariFeature.txt";
  LoadParameter(path.c_str(), sim_atari, SIM_ATARI_MAX);

  path = po_parameters_path + "ExtensionFeature.txt";
  LoadParameter(path.c_str(), sim_extension, SIM_EXTENSION_MAX);

  path = po_parameters_path + "DameFeature.txt";
  LoadParameter(path.c_str(), sim_dame, SIM_DAME_MAX);

  path = po_parameters_path + "ThrowInFeature.txt";
  LoadParameter(path.c_str(), sim_throw_in, SIM_THROW_IN_MAX);

  // 3x3のパターンの読み込み
  path = po_parameters_path + "Pat3.txt";
  LoadParameter(path.c_str(), po_pat3, PAT3_MAX);

  // マンハッタン距離2のパターンの読み込み
  path = po_parameters_path + "MD2.txt";
  LoadMD2Parameter(path.c_str(), po_md2);

  // 3x3とMD2のパターンをまとめる
  for (int i = 0; i < MD2_MAX; i++){
    if (po_md2[i] > 0.0) {
      po_pattern[i] = static_cast<float>(po_md2[i] * 10.0);
    } else {
      po_pattern[i] = static_cast<float>(po_pat3[(i & 0xffff)] * 10.0);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
leaq -0x80(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x2ccc0
movq -0x1e8(%rbp), %rsi
leaq 0x68aef(%rip), %rdx     # 0xeb858
leaq -0x60(%rbp), %rdi
callq 0x632c0
jmp 0x82d74
leaq 0x2c359(%rip), %rdx     # 0xaf0d4
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x63310
jmp 0x82d8a
leaq 0x68ac7(%rip), %rdx     # 0xeb858
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x632c0
jmp 0x82da0
leaq -0x40(%rbp), %rdi
callq 0x7ae8
leaq -0x60(%rbp), %rdi
callq 0x7ae8
leaq -0x80(%rbp), %rdi
callq 0x7ae8
leaq -0xb0(%rbp), %rdi
callq 0x7770
leaq 0x2bf75(%rip), %rdx     # 0xaed43
leaq -0xd0(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x63360
jmp 0x82de0
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
leaq -0xd0(%rbp), %rsi
movq %rsi, -0x1f8(%rbp)
callq 0x76b0
movq -0x1f8(%rbp), %rdi
callq 0x7ae8
movq -0x1f0(%rbp), %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x4069089(%rip), %rsi   # 0x40ebeac
movl $0x3, %edx
callq 0x84f40
jmp 0x82e2f
movl $0x0, -0xd4(%rbp)
cmpl $0x2, -0xd4(%rbp)
jge 0x82f13
movslq -0xd4(%rbp), %rcx
leaq 0x4069058(%rip), %rax   # 0x40ebeac
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x64b53(%rip), %xmm0    # 0xe79b8
cvtsd2ss %xmm0, %xmm0
movslq -0xd4(%rbp), %rcx
leaq 0x4069029(%rip), %rax   # 0x40ebea0
movss %xmm0, (%rax,%rcx,4)
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x82e39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x82ed9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x82ed0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x7ae8
leaq -0x60(%rbp), %rdi
callq 0x7ae8
leaq -0x80(%rbp), %rdi
callq 0x7ae8
jmp 0x8335d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x7ae8
leaq -0x20(%rbp), %rdi
callq 0x7ae8
jmp 0x8335d
movss 0x4068f99(%rip), %xmm0  # 0x40ebeb4
cvtss2sd %xmm0, %xmm0
movsd 0x64a99(%rip), %xmm1    # 0xe79c0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4068f71(%rip)  # 0x40ebea8
leaq 0x2b1a7(%rip), %rdx     # 0xae0e5
leaq -0xf8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x63360
jmp 0x82f50
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x200(%rbp)
leaq -0xf8(%rbp), %rsi
movq %rsi, -0x208(%rbp)
callq 0x76b0
movq -0x208(%rbp), %rdi
callq 0x7ae8
movq -0x200(%rbp), %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x4068f2d(%rip), %rsi   # 0x40ebec0
movl $0x14, %edx
callq 0x84f40
jmp 0x82f9f
leaq 0x2b152(%rip), %rdx     # 0xae0f8
leaq -0x118(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x63360
jmp 0x82fb8
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x210(%rbp)
leaq -0x118(%rbp), %rsi
movq %rsi, -0x218(%rbp)
callq 0x76b0
movq -0x218(%rbp), %rdi
callq 0x7ae8
movq -0x210(%rbp), %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x4068f15(%rip), %rsi   # 0x40ebf10
movl $0x7, %edx
callq 0x84f40
jmp 0x83007
leaq 0x2b103(%rip), %rdx     # 0xae111
leaq -0x138(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x63360
jmp 0x83020
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x220(%rbp)
leaq -0x138(%rbp), %rsi
movq %rsi, -0x228(%rbp)
callq 0x76b0
movq -0x228(%rbp), %rdi
callq 0x7ae8
movq -0x220(%rbp), %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x4068ecd(%rip), %rsi   # 0x40ebf30
movl $0xa, %edx
callq 0x84f40
jmp 0x8306f
leaq 0x2b086(%rip), %rdx     # 0xae0fc
leaq -0x158(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x63360
jmp 0x83088
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x230(%rbp)
leaq -0x158(%rbp), %rsi
movq %rsi, -0x238(%rbp)
callq 0x76b0
movq -0x238(%rbp), %rdi
callq 0x7ae8
movq -0x230(%rbp), %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x4068e95(%rip), %rsi   # 0x40ebf60
movl $0x5, %edx
callq 0x84f40
jmp 0x830d7
leaq 0x2b044(%rip), %rdx     # 0xae122
leaq -0x178(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x63360
jmp 0x830f0
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x240(%rbp)
leaq -0x178(%rbp), %rsi
movq %rsi, -0x248(%rbp)
callq 0x76b0
movq -0x248(%rbp), %rdi
callq 0x7ae8
movq -0x240(%rbp), %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x4068e41(%rip), %rsi   # 0x40ebf74
movl $0x3, %edx
callq 0x84f40
jmp 0x8313f
leaq 0x2afff(%rip), %rdx     # 0xae145
leaq -0x198(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x63360
jmp 0x83158
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x250(%rbp)
leaq -0x198(%rbp), %rsi
movq %rsi, -0x258(%rbp)
callq 0x76b0
movq -0x258(%rbp), %rdi
callq 0x7ae8
movq -0x250(%rbp), %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x4068de5(%rip), %rsi   # 0x40ebf80
movl $0x2, %edx
callq 0x84f40
jmp 0x831a7
leaq 0x2affc(%rip), %rdx     # 0xae1aa
leaq -0x1b8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x63360
jmp 0x831c0
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x260(%rbp)
leaq -0x1b8(%rbp), %rsi
movq %rsi, -0x268(%rbp)
callq 0x76b0
movq -0x268(%rbp), %rdi
callq 0x7ae8
movq -0x260(%rbp), %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x4068d8d(%rip), %rsi   # 0x40ebf90
movl $0x10000, %edx          # imm = 0x10000
callq 0x84f40
jmp 0x8320f
leaq 0x2af9d(%rip), %rdx     # 0xae1b3
leaq -0x1d8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x63360
jmp 0x83228
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x270(%rbp)
leaq -0x1d8(%rbp), %rsi
movq %rsi, -0x278(%rbp)
callq 0x76b0
movq -0x278(%rbp), %rdi
callq 0x7ae8
movq -0x270(%rbp), %rdi
callq 0x71d0
movq %rax, %rdi
leaq 0x40a8d25(%rip), %rsi   # 0x412bf90
callq 0x85040
jmp 0x83272
movl $0x0, -0x1dc(%rbp)
cmpl $0x1000000, -0x1dc(%rbp) # imm = 0x1000000
jge 0x8333f
movslq -0x1dc(%rbp), %rcx
leaq 0x40a8cf6(%rip), %rax   # 0x412bf90
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x832e8
movslq -0x1dc(%rbp), %rcx
leaq 0x40a8cd6(%rip), %rax   # 0x412bf90
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2bdf5(%rip), %xmm1    # 0xaf0c0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movslq -0x1dc(%rbp), %rcx
leaq 0x68bbf(%rip), %rax     # 0xebea0
movss %xmm0, (%rax,%rcx,4)
jmp 0x83329
movl -0x1dc(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movslq %eax, %rcx
leaq 0x4068c93(%rip), %rax   # 0x40ebf90
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2bdb2(%rip), %xmm1    # 0xaf0c0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movslq -0x1dc(%rbp), %rcx
leaq 0x68b7c(%rip), %rax     # 0xebea0
movss %xmm0, (%rax,%rcx,4)
jmp 0x8332b
movl -0x1dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1dc(%rbp)
jmp 0x8327c
leaq -0xb0(%rbp), %rdi
callq 0x7ae8
leaq -0x20(%rbp), %rdi
callq 0x7ae8
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x79b0
nopl (%rax)