// File: /workspace/github_c_makefile_star2_O3/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 0x74b0
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 0x4834
leaq 0x40(%rbx), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movq $0x0, 0x70(%rsp)
movslq (%r15), %rsi
leaq 0x80(%rsp), %rdi
callq 0x4834
leaq 0x1e0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x1d0(%rsp), %rdi
callq 0x479e
leaq 0x1f0(%rsp), %rdi
leaq 0x200(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
callq 0x479e
movups (%r15), %xmm0
leaq 0x1d0(%rsp), %rsi
movups %xmm0, 0x40(%rsi)
leaq 0x40(%rsp), %rdx
movq %r14, %rdi
callq 0x671c
movq 0x1f0(%rsp), %rdi
cmpq %r13, %rdi
je 0x62aa
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x1d0(%rsp), %rdi
cmpq %r12, %rdi
je 0x62c7
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 0x479e
leaq 0x1a0(%rsp), %rdi
leaq 0x1b0(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
callq 0x479e
movups (%r15), %xmm0
leaq 0x180(%rsp), %rsi
movups %xmm0, 0x40(%rsi)
leaq 0x40(%rsp), %rdx
callq 0x688a
movq 0x1a0(%rsp), %rdi
cmpq %r13, %rdi
je 0x6346
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x180(%rsp), %rdi
cmpq %r12, %rdi
je 0x6363
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 0x479e
leaq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
callq 0x479e
movups (%r15), %xmm0
leaq 0x130(%rsp), %rsi
movups %xmm0, 0x40(%rsi)
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rsp, %r8
callq 0x696e
movq 0x150(%rsp), %rdi
cmpq %r13, %rdi
je 0x63ea
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x130(%rsp), %rdi
cmpq %r12, %rdi
je 0x6407
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 0x479e
leaq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
callq 0x479e
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 0x69d8
movq 0x100(%rsp), %rdi
cmpq %r13, %rdi
je 0x6499
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0xe0(%rsp), %rdi
cmpq %r12, %rdi
je 0x64b6
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 0x479e
leaq 0xc0(%rsp), %rsi
movq %rsp, %rdx
leaq 0x80(%rsp), %rcx
leaq 0x60(%rsp), %r8
callq 0x6c9a
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x6513
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 0x479e
leaq 0xa0(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq 0x6eb2
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x656a
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x60(%rsp), %rdi
callq 0x4972
leaq 0x80(%rsp), %rdi
callq 0x4972
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6597
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x65ae
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
leaq 0x40(%rsp), %rdi
callq 0x49c6
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 0x66c5
movq 0xb0(%rsp), %rsi
jmp 0x66ae
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x66c5
movq 0xd0(%rsp), %rsi
jmp 0x66ae
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
jmp 0x668f
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r12, %rdi
je 0x66c5
movq 0xf0(%rsp), %rsi
jmp 0x66ae
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
jmp 0x668f
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r12, %rdi
je 0x66c5
movq 0x140(%rsp), %rsi
jmp 0x66ae
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
jmp 0x668f
movq %rax, %rbx
movq 0x180(%rsp), %rdi
cmpq %r12, %rdi
je 0x66c5
movq 0x190(%rsp), %rsi
jmp 0x66ae
movq %rax, %rbx
leaq 0x1d0(%rsp), %rdi
callq 0x4386
jmp 0x66c5
movq %rax, %rbx
movq 0x1d0(%rsp), %rdi
cmpq %r12, %rdi
je 0x66c5
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x66c5
movq %rax, %rbx
jmp 0x66cf
movq %rax, %rbx
jmp 0x6709
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x4972
leaq 0x80(%rsp), %rdi
callq 0x4972
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x66f2
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x6709
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
leaq 0x40(%rsp), %rdi
callq 0x49c6
movq %rbx, %rdi
callq 0x33e0
nop