// File: /workspace/github_c_makefile_star2_O1/fukunagatsu[P]RIblast/db_construction.cpp
// Function: DbConstruction::Run(DbConstructionParameters)
void DbConstruction::Run(const DbConstructionParameters parameters){
  vector<string> sequences; sequences.reserve(10);
  vector<unsigned char> encoded_sequences;
  vector<int> suffix_array;
  vector<vector <int> > start_hash; start_hash.reserve(parameters.GetHashSize());
  vector<vector <int> > end_hash; start_hash.reserve(parameters.GetHashSize());

  ReadFastaFile(parameters, sequences);
  CalculateAccessibility(parameters,sequences);
  ConstructSuffixArray(parameters, sequences,encoded_sequences,suffix_array);
  ConstructHashForShortSubstring(parameters, encoded_sequences, suffix_array, start_hash, end_hash);

  SaveIndexData(parameters.GetDbFilename(), suffix_array, start_hash, end_hash);
  SaveSequenceData(parameters.GetDbFilename(), sequences, encoded_sequences);
  
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0xa, %esi
callq 0x7078
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %eax, %eax
movq %rax, 0x30(%rsp)
movq %rax, 0x10(%rsp)
movaps %xmm0, (%rsp)
leaq 0x80(%rsp), %rdi
movq %rax, 0x10(%rdi)
movaps %xmm0, (%rdi)
movslq 0x40(%rbx), %rsi
callq 0x4782
leaq 0x40(%rbx), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movq $0x0, 0x70(%rsp)
movslq (%r15), %rsi
leaq 0x80(%rsp), %rdi
callq 0x4782
leaq 0x1e0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x1d0(%rsp), %rdi
callq 0x46f2
leaq 0x1f0(%rsp), %rdi
leaq 0x200(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
callq 0x46f2
movups (%r15), %xmm0
leaq 0x1d0(%rsp), %rsi
movups %xmm0, 0x40(%rsi)
leaq 0x40(%rsp), %rdx
movq %r14, %rdi
callq 0x62c8
movq 0x1f0(%rsp), %rdi
cmpq %r13, %rdi
je 0x5e56
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x1d0(%rsp), %rdi
cmpq %r12, %rdi
je 0x5e73
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x190(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x180(%rsp), %rdi
callq 0x46f2
leaq 0x1a0(%rsp), %rdi
leaq 0x1b0(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
callq 0x46f2
movups (%r15), %xmm0
leaq 0x180(%rsp), %rsi
movups %xmm0, 0x40(%rsi)
leaq 0x40(%rsp), %rdx
callq 0x6436
movq 0x1a0(%rsp), %rdi
cmpq %r13, %rdi
je 0x5ef2
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x180(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f0f
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x140(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x130(%rsp), %rdi
callq 0x46f2
leaq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
callq 0x46f2
movups (%r15), %xmm0
leaq 0x130(%rsp), %rsi
movups %xmm0, 0x40(%rsi)
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rsp, %r8
callq 0x651a
movq 0x150(%rsp), %rdi
cmpq %r13, %rdi
je 0x5f96
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x130(%rsp), %rdi
cmpq %r12, %rdi
je 0x5fb3
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0xf0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0xe0(%rsp), %rdi
callq 0x46f2
leaq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
callq 0x46f2
movups (%r15), %xmm0
leaq 0xe0(%rsp), %rsi
movups %xmm0, 0x40(%rsi)
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
leaq 0x80(%rsp), %r8
leaq 0x60(%rsp), %r9
movq %r14, %rdi
callq 0x6584
movq 0x100(%rsp), %rdi
cmpq %r13, %rdi
je 0x6045
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0xe0(%rsp), %rdi
cmpq %r12, %rdi
je 0x6062
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0xd0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0x46f2
leaq 0xc0(%rsp), %rsi
movq %rsp, %rdx
leaq 0x80(%rsp), %rcx
leaq 0x60(%rsp), %r8
callq 0x684a
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x60bf
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0xb0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x46f2
leaq 0xa0(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq 0x6a7a
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x6116
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x60(%rsp), %rdi
callq 0x48c8
leaq 0x80(%rsp), %rdi
callq 0x48c8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6143
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x615a
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
leaq 0x40(%rsp), %rdi
callq 0x4916
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x6271
movq 0xb0(%rsp), %rsi
jmp 0x625a
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x6271
movq 0xd0(%rsp), %rsi
jmp 0x625a
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
jmp 0x623b
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r12, %rdi
je 0x6271
movq 0xf0(%rsp), %rsi
jmp 0x625a
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
jmp 0x623b
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r12, %rdi
je 0x6271
movq 0x140(%rsp), %rsi
jmp 0x625a
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
jmp 0x623b
movq %rax, %rbx
movq 0x180(%rsp), %rdi
cmpq %r12, %rdi
je 0x6271
movq 0x190(%rsp), %rsi
jmp 0x625a
movq %rax, %rbx
leaq 0x1d0(%rsp), %rdi
callq 0x42c0
jmp 0x6271
movq %rax, %rbx
movq 0x1d0(%rsp), %rdi
cmpq %r12, %rdi
je 0x6271
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x6271
movq %rax, %rbx
jmp 0x627b
movq %rax, %rbx
jmp 0x62b5
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x48c8
leaq 0x80(%rsp), %rdi
callq 0x48c8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x629e
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x62b5
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
leaq 0x40(%rsp), %rdi
callq 0x4916
movq %rbx, %rdi
callq 0x33e0
nop