// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x260, %rsp            # imm = 0x260
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x46f2
leaq 0x14c0e(%rip), %rsi     # 0x1b86a
movq %r15, %rdi
callq 0x3420
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6c8b
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x6c92
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
leaq 0x60(%rsp), %rdi
movl $0x14, %edx
callq 0x3250
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6cd5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x6cec
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
movl 0x40(%r14), %eax
leaq 0x5c(%rsp), %rsi
movl %eax, (%rsi)
movl 0x44(%r14), %eax
movl %eax, 0x34(%rsp)
movl 0x48(%r14), %eax
movl %eax, 0x30(%rsp)
movl 0x4c(%r14), %eax
movl %eax, 0x2c(%rsp)
leaq 0x60(%rsp), %rdi
movl $0x4, %edx
callq 0x32f0
leaq 0x60(%rsp), %rdi
leaq 0x34(%rsp), %rsi
movl $0x4, %edx
callq 0x32f0
leaq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movl $0x4, %edx
callq 0x32f0
leaq 0x60(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
movl $0x4, %edx
callq 0x32f0
leaq 0x60(%rsp), %rdi
callq 0x3320
leaq 0x38(%rsp), %rdi
movq %r12, (%rdi)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x46f2
leaq 0x14aed(%rip), %rsi     # 0x1b86f
leaq 0x38(%rsp), %rdi
callq 0x3420
movq %r15, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6daf
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x6db6
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
leaq 0x60(%rsp), %rdi
movl $0x10, %edx
callq 0x3040
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6df9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e10
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x6e7c
movl $0x8, %r12d
xorl %r13d, %r13d
leaq 0x60(%rsp), %r14
movq -0x8(%rax,%r12), %rsi
movq (%rax,%r12), %rdx
movq %r14, %rdi
callq 0x3280
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
incq %r13
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r12
cmpq %r13, %rcx
ja 0x6e27
leaq 0x60(%rsp), %rdi
callq 0x3320
movq 0xdf133(%rip), %rax     # 0xe5fc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x68(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x60(%rsp,%rcx)
callq 0x31d0
leaq 0x158(%rsp), %rdi
callq 0x30d0
addq $0x260, %rsp            # imm = 0x260
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6ee8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x6ee8
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x6f40
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x6f40
jmp 0x6f3d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6f22
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x6f22
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x6f4a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x6f4a
jmp 0x6f3d
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3340
movq %rbx, %rdi
callq 0x33e0