// File: kobanium[P]Ray/src/learn/FactorizationMachines.cpp
// Function: Backup(int)
static void
Backup( const int k )
{
  const std::string output_directory = GetWorkingDirectory() + PATH_SEPARATOR +
    LEARNING_RESULT_DIR_NAME + PATH_SEPARATOR +
    TREE_RESULT_DIR_NAME + PATH_SEPARATOR +
    "result" + std::to_string(k) + PATH_SEPARATOR;
  const std::string cmd = "mkdir " + output_directory;
  
  system(cmd.c_str());

  //  パス
  OutputBTFMParameter(output_directory + "Pass.txt", pass);

  //  劫の存在
  OutputBTFMParameter(output_directory + "KoExist.txt", ko_exist);

  //  戦術的特徴
  OutputBTFMParameter(output_directory + "CaptureFeature.txt", capture);
  OutputBTFMParameter(output_directory + "SaveExtensionFeature.txt", save_extension);
  OutputBTFMParameter(output_directory + "AtariFeature.txt", atari);
  OutputBTFMParameter(output_directory + "ExtensionFeature.txt", extension);
  OutputBTFMParameter(output_directory + "DameFeature.txt", dame);
  OutputBTFMParameter(output_directory + "ConnectionFeature.txt", connect);
  OutputBTFMParameter(output_directory + "ThrowInFeature.txt", throw_in);

  //  盤上の位置
  OutputBTFMParameter(output_directory + "PosID.txt", pos_id);

  //  直前の手との距離
  OutputBTFMParameter(output_directory + "MoveDistance1.txt", move_distance_1);
  OutputBTFMParameter(output_directory + "MoveDistance2.txt", move_distance_2);
  OutputBTFMParameter(output_directory + "MoveDistance3.txt", move_distance_3);
  OutputBTFMParameter(output_directory + "MoveDistance4.txt", move_distance_4);

  //  近傍の配石パターン(3x3, md2, md3, md4, md5)
  OutputBTFMParameter(output_directory + "Pat3.txt", pat3);
  OutputBTFMParameter(output_directory + "MD2.txt", md2, md2_list, md2_target);
  OutputBTFMParameter(output_directory + "MD3.txt", md3, md3_list, md3_index, md3_target);
  OutputBTFMParameter(output_directory + "MD4.txt", md4, md4_list, md4_index, md4_target);
  OutputBTFMParameter(output_directory + "MD5.txt", md5, md5_list, md5_index, md5_target);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3e0, %rsp            # imm = 0x3E0
movl %edi, -0x4(%rbp)
leaq -0x128(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x2ccc0
movq -0x3e0(%rbp), %rsi
leaq 0x8cd21(%rip), %rdx     # 0xe91b0
leaq -0x108(%rbp), %rdi
callq 0x632c0
jmp 0x5c49d
leaq 0x51b3c(%rip), %rdx     # 0xadfe0
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x63310
jmp 0x5c4b9
leaq 0x8ccf0(%rip), %rdx     # 0xe91b0
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x632c0
jmp 0x5c4d5
leaq 0x51b6a(%rip), %rdx     # 0xae046
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x63310
jmp 0x5c4f1
leaq 0x8ccb8(%rip), %rdx     # 0xe91b0
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x632c0
jmp 0x5c50d
leaq 0x529cc(%rip), %rdx     # 0xaeee0
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x63310
jmp 0x5c526
movl -0x4(%rbp), %esi
leaq -0x158(%rbp), %rdi
callq 0x669f0
jmp 0x5c537
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x158(%rbp), %rdx
callq 0x66810
jmp 0x5c54d
leaq 0x8cc5c(%rip), %rdx     # 0xe91b0
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x632c0
jmp 0x5c563
leaq -0x48(%rbp), %rdi
callq 0x7ae8
leaq -0x158(%rbp), %rdi
callq 0x7ae8
leaq -0x68(%rbp), %rdi
callq 0x7ae8
leaq -0x88(%rbp), %rdi
callq 0x7ae8
leaq -0xa8(%rbp), %rdi
callq 0x7ae8
leaq -0xc8(%rbp), %rdi
callq 0x7ae8
leaq -0xe8(%rbp), %rdi
callq 0x7ae8
leaq -0x108(%rbp), %rdi
callq 0x7ae8
leaq -0x128(%rbp), %rdi
callq 0x7ae8
leaq 0x51c29(%rip), %rsi     # 0xae1f9
leaq -0x178(%rbp), %rdi
leaq -0x28(%rbp), %rdx
callq 0x668e0
jmp 0x5c5e2
leaq -0x178(%rbp), %rdi
callq 0x71d0
movq %rax, %rdi
callq 0x7450
jmp 0x5c5f8
leaq 0x51add(%rip), %rdx     # 0xae0dc
leaq -0x198(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c611
leaq 0x8cdc8(%rip), %rsi     # 0xe93e0
leaq -0x198(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c626
leaq -0x198(%rbp), %rdi
callq 0x7ae8
leaq 0x51b9a(%rip), %rdx     # 0xae1d3
leaq -0x1b8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c64b
leaq 0x8cda6(%rip), %rsi     # 0xe93f8
leaq -0x1b8(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c660
leaq -0x1b8(%rbp), %rdi
callq 0x7ae8
leaq 0x51a72(%rip), %rdx     # 0xae0e5
leaq -0x1d8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c685
leaq 0x8cc4c(%rip), %rsi     # 0xe92d8
leaq -0x1d8(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c69a
leaq -0x1d8(%rbp), %rdi
callq 0x7ae8
leaq 0x51a4b(%rip), %rdx     # 0xae0f8
leaq -0x1f8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c6bf
leaq 0x8cc2a(%rip), %rsi     # 0xe92f0
leaq -0x1f8(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c6d4
leaq -0x1f8(%rbp), %rdi
callq 0x7ae8
leaq 0x51a2a(%rip), %rdx     # 0xae111
leaq -0x218(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c6f9
leaq 0x8cc08(%rip), %rsi     # 0xe9308
leaq -0x218(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c70e
leaq -0x218(%rbp), %rdi
callq 0x7ae8
leaq 0x519db(%rip), %rdx     # 0xae0fc
leaq -0x238(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c733
leaq 0x8cbe6(%rip), %rsi     # 0xe9320
leaq -0x238(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c748
leaq -0x238(%rbp), %rdi
callq 0x7ae8
leaq 0x519c7(%rip), %rdx     # 0xae122
leaq -0x258(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c76d
leaq 0x8cbc4(%rip), %rsi     # 0xe9338
leaq -0x258(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c782
leaq -0x258(%rbp), %rdi
callq 0x7ae8
leaq 0x51a6b(%rip), %rdx     # 0xae200
leaq -0x278(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c7a7
leaq 0x8cba2(%rip), %rsi     # 0xe9350
leaq -0x278(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c7bc
leaq -0x278(%rbp), %rdi
callq 0x7ae8
leaq 0x51976(%rip), %rdx     # 0xae145
leaq -0x298(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c7e1
leaq 0x8cb80(%rip), %rsi     # 0xe9368
leaq -0x298(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c7f6
leaq -0x298(%rbp), %rdi
callq 0x7ae8
leaq 0x51997(%rip), %rdx     # 0xae1a0
leaq -0x2b8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c81b
leaq 0x8ca9e(%rip), %rsi     # 0xe92c0
leaq -0x2b8(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c830
leaq -0x2b8(%rbp), %rdi
callq 0x7ae8
leaq 0x51915(%rip), %rdx     # 0xae158
leaq -0x2d8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c855
leaq 0x8cb24(%rip), %rsi     # 0xe9380
leaq -0x2d8(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c86a
leaq -0x2d8(%rbp), %rdi
callq 0x7ae8
leaq 0x518ed(%rip), %rdx     # 0xae16a
leaq -0x2f8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c88f
leaq 0x8cb02(%rip), %rsi     # 0xe9398
leaq -0x2f8(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c8a4
leaq -0x2f8(%rbp), %rdi
callq 0x7ae8
leaq 0x518c5(%rip), %rdx     # 0xae17c
leaq -0x318(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c8c9
leaq 0x8cae0(%rip), %rsi     # 0xe93b0
leaq -0x318(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c8de
leaq -0x318(%rbp), %rdi
callq 0x7ae8
leaq 0x5189d(%rip), %rdx     # 0xae18e
leaq -0x338(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c903
leaq 0x8cabe(%rip), %rsi     # 0xe93c8
leaq -0x338(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c918
leaq -0x338(%rbp), %rdi
callq 0x7ae8
leaq 0x5187f(%rip), %rdx     # 0xae1aa
leaq -0x358(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c93d
leaq 0x8c904(%rip), %rsi     # 0xe9248
leaq -0x358(%rbp), %rdi
callq 0x7b3c0
jmp 0x5c952
leaq -0x358(%rbp), %rdi
callq 0x7ae8
leaq 0x5184e(%rip), %rdx     # 0xae1b3
leaq -0x378(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c977
leaq 0x8c8e2(%rip), %rsi     # 0xe9260
leaq 0x8ca8b(%rip), %rdx     # 0xe9410
leaq 0x8cae4(%rip), %rcx     # 0xe9470
leaq -0x378(%rbp), %rdi
callq 0x7b630
jmp 0x5c99a
leaq -0x378(%rbp), %rdi
callq 0x7ae8
leaq 0x5180e(%rip), %rdx     # 0xae1bb
leaq -0x398(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5c9bf
leaq 0x8c8b2(%rip), %rsi     # 0xe9278
leaq 0x8ca5b(%rip), %rdx     # 0xe9428
leaq 0x8c82c(%rip), %rcx     # 0xe9200
leaq 0x8cabd(%rip), %r8      # 0xe9498
leaq -0x398(%rbp), %rdi
callq 0x7b8f0
jmp 0x5c9e9
leaq -0x398(%rbp), %rdi
callq 0x7ae8
leaq 0x517c7(%rip), %rdx     # 0xae1c3
leaq -0x3b8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5ca0e
leaq 0x8c87b(%rip), %rsi     # 0xe9290
leaq 0x8ca24(%rip), %rdx     # 0xe9440
leaq 0x8c7f5(%rip), %rcx     # 0xe9218
leaq 0x8ca96(%rip), %r8      # 0xe94c0
leaq -0x3b8(%rbp), %rdi
callq 0x7b8f0
jmp 0x5ca38
leaq -0x3b8(%rbp), %rdi
callq 0x7ae8
leaq 0x51780(%rip), %rdx     # 0xae1cb
leaq -0x3d8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x63360
jmp 0x5ca5d
leaq 0x8c844(%rip), %rsi     # 0xe92a8
leaq 0x8c9ed(%rip), %rdx     # 0xe9458
leaq 0x8c7be(%rip), %rcx     # 0xe9230
leaq 0x8ca6f(%rip), %r8      # 0xe94e8
leaq -0x3d8(%rbp), %rdi
callq 0x7b8f0
jmp 0x5ca87
leaq -0x3d8(%rbp), %rdi
callq 0x7ae8
leaq -0x178(%rbp), %rdi
callq 0x7ae8
leaq -0x28(%rbp), %rdi
callq 0x7ae8
addq $0x3e0, %rsp            # imm = 0x3E0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x5cbc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x5cbbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x5cbb1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x5cba5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x5cb99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x5cb8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x5cb84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x5cb78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x7ae8
leaq -0x158(%rbp), %rdi
callq 0x7ae8
leaq -0x68(%rbp), %rdi
callq 0x7ae8
leaq -0x88(%rbp), %rdi
callq 0x7ae8
leaq -0xa8(%rbp), %rdi
callq 0x7ae8
leaq -0xc8(%rbp), %rdi
callq 0x7ae8
leaq -0xe8(%rbp), %rdi
callq 0x7ae8
leaq -0x108(%rbp), %rdi
callq 0x7ae8
leaq -0x128(%rbp), %rdi
callq 0x7ae8
jmp 0x5cea5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x5ce9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x7ae8
jmp 0x5ce90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x3d8(%rbp), %rdi
callq 0x7ae8
leaq -0x178(%rbp), %rdi
callq 0x7ae8
leaq -0x28(%rbp), %rdi
callq 0x7ae8
movq -0x130(%rbp), %rdi
callq 0x79b0
nopw %cs:(%rax,%rax)