// File: /workspace/github_c_makefile_star2_O2/fukunagatsu[P]RIblast/db_construction.cpp
// Function: DbConstruction::SaveBasicInformation(DbConstructionParameters, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void DbConstruction::SaveBasicInformation(DbConstructionParameters parameters, vector<string> &names){
  ofstream of((parameters.GetDbFilename()+".bas").c_str(), ios::out | ios::binary);
  int hash_size = parameters.GetHashSize();
  int repeat_flag = parameters.GetRepeatFlag();
  int maximal_span = parameters.GetMaximalSpan();
  int min_accessible_length = parameters.GetMinAccessibleLength();
  of.write(reinterpret_cast<const char*>(&hash_size), sizeof(int));
  of.write(reinterpret_cast<const char*>(&repeat_flag), sizeof(int));
  of.write(reinterpret_cast<const char*>(&maximal_span), sizeof(int));
  of.write(reinterpret_cast<const char*>(&min_accessible_length), sizeof(int));
  of.close();
  of.open((parameters.GetDbFilename()+".nam").c_str(), ios::out);
  for(int i = 0; i < names.size(); i++){
    of << names[i] << endl;
  }

  of.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x32d0
leaq 0x10ba6(%rip), %rdx     # 0x16872
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x4e73
movq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdi
pushq $0x14
popq %rdx
callq 0x3220
leaq 0x10(%rsp), %rdi
callq 0x3100
leaq 0x38(%rsp), %rdi
callq 0x3100
movl 0x40(%r14), %eax
leaq 0x34(%rsp), %rsi
movl %eax, (%rsi)
movl 0x44(%r14), %eax
movl %eax, 0xc(%rsp)
movl 0x48(%r14), %eax
movl %eax, 0x8(%rsp)
movl 0x4c(%r14), %eax
movl %eax, 0x4(%rsp)
leaq 0x58(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x32b0
leaq 0x58(%rsp), %rdi
leaq 0xc(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x32b0
leaq 0x58(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x32b0
leaq 0x58(%rsp), %rdi
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x32b0
leaq 0x58(%rsp), %rdi
callq 0x32f0
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x32d0
leaq 0x10af4(%rip), %rdx     # 0x16877
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x4e73
movq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x3030
leaq 0x10(%rsp), %rdi
callq 0x3100
leaq 0x38(%rsp), %rdi
callq 0x3100
xorl %r15d, %r15d
leaq 0x58(%rsp), %r14
xorl %r12d, %r12d
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x5df2
addq %r15, %rsi
movq %r14, %rdi
callq 0x31c0
movq %rax, %rdi
callq 0x3110
incq %r12
addq $0x20, %r15
jmp 0x5dc3
leaq 0x58(%rsp), %rdi
callq 0x32f0
leaq 0x58(%rsp), %rdi
callq 0x3310
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3100
jmp 0x5e27
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3100
jmp 0x5e58
jmp 0x5e55
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3100
jmp 0x5e47
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3100
jmp 0x5e62
jmp 0x5e55
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x3310
movq %rbx, %rdi
callq 0x33a0