// File: /workspace/github_c_makefile_star2_O0/fukunagatsu[P]RIblast/rna_interaction_search.cpp
// Function: RnaInteractionSearch::Run(RnaInteractionSearchParameters)
void RnaInteractionSearch::Run(const RnaInteractionSearchParameters parameters){
  vector<string> sequences; sequences.reserve(500);
  vector<string> names; names.reserve(500);
  
  LoadDatabase(parameters.GetDbFilename(), parameters.GetHashSize());
  ReadFastaFile(parameters, sequences, names);
  int count = 0;
  cout << "RIblast ris mode has started." << endl;
  for(int i = 0; i<sequences.size();i++){
    vector<unsigned char> query_encoded_sequence; query_encoded_sequence.reserve(10);
    vector<int> query_suffix_array;
    vector<float> query_accessibility; query_accessibility.reserve(10);
    vector<float> query_conditional_accessibility; query_conditional_accessibility.reserve(10);
    string query_sequence = sequences[i];
    string query_name = names[i];
    cout << "Rna interaction search of query:" << names[i] << " has started." << endl;
    CalculateAccessibility(parameters, query_sequence, query_accessibility, query_conditional_accessibility);
    ConstructSuffixArray(parameters, query_sequence, query_encoded_sequence, query_suffix_array);
    vector<Hit> hit_result; hit_result.reserve(50000000);
    SearchSeed(parameters,hit_result, query_encoded_sequence, query_suffix_array, query_accessibility, query_conditional_accessibility);
    ExtendWithoutGap(parameters,hit_result, query_encoded_sequence, query_accessibility, query_conditional_accessibility);
    ExtendWithGap(parameters,hit_result, query_encoded_sequence, query_accessibility, query_conditional_accessibility);
    int length_count = 0;
    for(int j= 0; j<query_encoded_sequence.size();j++){
      if(query_encoded_sequence[j]>=2 && query_encoded_sequence[j]<=5){
	length_count++;
      }
    }
    Output(parameters,hit_result,query_name,i,&count,length_count);
    hit_result.clear();
    cout << "Rna interaction search of query:" << names[i] << " has finished." << endl;
  }
  cout << "RIblast ris mode has finished." << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x660, %rsp            # imm = 0x660
movq %rsi, -0x5d0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x5c8(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0x5c0(%rbp)
callq 0x4700
movq -0x5c0(%rbp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0xb070
jmp 0x1cbb8
leaq -0x50(%rbp), %rdi
movq %rdi, -0x5d8(%rbp)
callq 0x4700
movq -0x5d8(%rbp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0xb070
jmp 0x1cbdb
movq -0x5d0(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x1fb70
jmp 0x1cbed
movq -0x5d0(%rbp), %rdi
callq 0x4270
movl %eax, -0x5dc(%rbp)
jmp 0x1cc01
movl -0x5dc(%rbp), %edx
movq -0x5c8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x1d420
jmp 0x1cc19
leaq -0x70(%rbp), %rdi
callq 0x3190
movq -0x5d0(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x4550
jmp 0x1cc37
movq -0x5c8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0x1e330
jmp 0x1cc54
leaq -0x110(%rbp), %rdi
callq 0x4600
movl $0x0, -0x114(%rbp)
movq 0x2f35f(%rip), %rdi     # 0x4bfd0
leaq 0x1bdd8(%rip), %rsi     # 0x38a50
callq 0x3270
movq %rax, -0x5e8(%rbp)
jmp 0x1cc86
movq -0x5e8(%rbp), %rdi
movq 0x2f314(%rip), %rsi     # 0x4bfa8
callq 0x32b0
jmp 0x1cc9b
movl $0x0, -0x118(%rbp)
movslq -0x118(%rbp), %rax
movq %rax, -0x5f0(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x9260
movq %rax, %rcx
movq -0x5f0(%rbp), %rax
cmpq %rcx, %rax
jae 0x1d3ab
leaq -0x130(%rbp), %rdi
movq %rdi, -0x5f8(%rbp)
callq 0x4740
movq -0x5f8(%rbp), %rdi
movl $0xa, %esi
callq 0x1fba0
jmp 0x1ccf5
leaq -0x148(%rbp), %rdi
callq 0x4720
leaq -0x160(%rbp), %rdi
movq %rdi, -0x600(%rbp)
callq 0x155c0
movq -0x600(%rbp), %rdi
movl $0xa, %esi
callq 0x1fc80
jmp 0x1cd27
leaq -0x178(%rbp), %rdi
movq %rdi, -0x608(%rbp)
callq 0x155c0
movq -0x608(%rbp), %rdi
movl $0xa, %esi
callq 0x1fc80
jmp 0x1cd4d
movslq -0x118(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0xb720
movq %rax, %rsi
leaq -0x198(%rbp), %rdi
callq 0x3120
jmp 0x1cd6e
movslq -0x118(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0xb720
movq %rax, %rsi
leaq -0x1b8(%rbp), %rdi
callq 0x3120
jmp 0x1cd8f
movq 0x2f23a(%rip), %rdi     # 0x4bfd0
leaq 0x1bcd1(%rip), %rsi     # 0x38a6e
callq 0x3270
movq %rax, -0x610(%rbp)
jmp 0x1cdab
movslq -0x118(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0xb720
movq -0x610(%rbp), %rdi
movq %rax, %rsi
callq 0x3260
movq %rax, -0x618(%rbp)
jmp 0x1cdd3
movq -0x618(%rbp), %rdi
leaq 0x1bc7f(%rip), %rsi     # 0x38a60
callq 0x3270
movq %rax, -0x620(%rbp)
jmp 0x1cdef
movq -0x620(%rbp), %rdi
movq 0x2f1ab(%rip), %rsi     # 0x4bfa8
callq 0x32b0
jmp 0x1ce04
movq -0x5d0(%rbp), %rsi
leaq -0x258(%rbp), %rdi
callq 0x4550
jmp 0x1ce19
movq -0x5c8(%rbp), %rdi
leaq -0x258(%rbp), %rsi
leaq -0x198(%rbp), %rdx
leaq -0x160(%rbp), %rcx
leaq -0x178(%rbp), %r8
callq 0x1e3b0
jmp 0x1ce43
leaq -0x258(%rbp), %rdi
callq 0x4600
movq -0x5d0(%rbp), %rsi
leaq -0x2f8(%rbp), %rdi
callq 0x4550
jmp 0x1ce64
movq -0x5c8(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
leaq -0x198(%rbp), %rdx
leaq -0x130(%rbp), %rcx
leaq -0x148(%rbp), %r8
callq 0x1e480
jmp 0x1ce8e
leaq -0x2f8(%rbp), %rdi
callq 0x4600
leaq -0x310(%rbp), %rdi
movq %rdi, -0x628(%rbp)
callq 0x1fd80
movq -0x628(%rbp), %rdi
movl $0x2faf080, %esi        # imm = 0x2FAF080
callq 0x1fda0
jmp 0x1cec0
movq -0x5d0(%rbp), %rsi
leaq -0x3b0(%rbp), %rdi
callq 0x4550
jmp 0x1ced5
movq -0x5c8(%rbp), %rdi
movq %rsp, %rax
leaq -0x178(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x3b0(%rbp), %rsi
leaq -0x310(%rbp), %rdx
leaq -0x130(%rbp), %rcx
leaq -0x148(%rbp), %r8
leaq -0x160(%rbp), %r9
callq 0x1e550
jmp 0x1cf13
leaq -0x3b0(%rbp), %rdi
callq 0x4600
movq -0x5d0(%rbp), %rsi
leaq -0x450(%rbp), %rdi
callq 0x4550
jmp 0x1cf34
movq -0x5c8(%rbp), %rdi
leaq -0x450(%rbp), %rsi
leaq -0x310(%rbp), %rdx
leaq -0x130(%rbp), %rcx
leaq -0x160(%rbp), %r8
leaq -0x178(%rbp), %r9
callq 0x1e6c0
jmp 0x1cf65
leaq -0x450(%rbp), %rdi
callq 0x4600
movq -0x5d0(%rbp), %rsi
leaq -0x4f0(%rbp), %rdi
callq 0x4550
jmp 0x1cf86
movq -0x5c8(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
leaq -0x310(%rbp), %rdx
leaq -0x130(%rbp), %rcx
leaq -0x160(%rbp), %r8
leaq -0x178(%rbp), %r9
callq 0x1e7c0
jmp 0x1cfb7
leaq -0x4f0(%rbp), %rdi
callq 0x4600
movl $0x0, -0x4f4(%rbp)
movl $0x0, -0x4f8(%rbp)
movslq -0x4f8(%rbp), %rax
movq %rax, -0x630(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xba80
movq %rax, %rcx
movq -0x630(%rbp), %rax
cmpq %rcx, %rax
jae 0x1d1bc
movslq -0x4f8(%rbp), %rsi
leaq -0x130(%rbp), %rdi
callq 0xbaa0
movzbl (%rax), %eax
cmpl $0x2, %eax
jl 0x1d1a6
movslq -0x4f8(%rbp), %rsi
leaq -0x130(%rbp), %rdi
callq 0xbaa0
movzbl (%rax), %eax
cmpl $0x5, %eax
jg 0x1d1a6
movl -0x4f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4f4(%rbp)
jmp 0x1d1a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1d400
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1d3f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3190
jmp 0x1d3f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x4600
jmp 0x1d3f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1d39d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1d385
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1d379
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1d36d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1d361
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x4600
jmp 0x1d361
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x4600
jmp 0x1d361
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1d355
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x4600
jmp 0x1d355
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x450(%rbp), %rdi
callq 0x4600
jmp 0x1d355
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x4f0(%rbp), %rdi
callq 0x4600
jmp 0x1d355
jmp 0x1d1a8
movl -0x4f8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4f8(%rbp)
jmp 0x1cfd7
movq -0x5d0(%rbp), %rsi
leaq -0x598(%rbp), %rdi
callq 0x4550
jmp 0x1d1d1
leaq -0x5b8(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x3120
jmp 0x1d1e6
movq -0x5c8(%rbp), %rdi
movl -0x118(%rbp), %r8d
movl -0x4f4(%rbp), %ecx
movq %rsp, %rax
movl %ecx, (%rax)
leaq -0x598(%rbp), %rsi
leaq -0x310(%rbp), %rdx
leaq -0x5b8(%rbp), %rcx
leaq -0x114(%rbp), %r9
callq 0x1e910
jmp 0x1d222
leaq -0x5b8(%rbp), %rdi
callq 0x3190
leaq -0x598(%rbp), %rdi
callq 0x4600
leaq -0x310(%rbp), %rdi
callq 0x1fea0
movq 0x2ed83(%rip), %rdi     # 0x4bfd0
leaq 0x1b81a(%rip), %rsi     # 0x38a6e
callq 0x3270
movq %rax, -0x638(%rbp)
jmp 0x1d262
movslq -0x118(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0xb720
movq -0x638(%rbp), %rdi
movq %rax, %rsi
callq 0x3260
movq %rax, -0x640(%rbp)
jmp 0x1d28a
movq -0x640(%rbp), %rdi
leaq 0x1b807(%rip), %rsi     # 0x38a9f
callq 0x3270
movq %rax, -0x648(%rbp)
jmp 0x1d2a6
movq -0x648(%rbp), %rdi
movq 0x2ecf4(%rip), %rsi     # 0x4bfa8
callq 0x32b0
jmp 0x1d2bb
leaq -0x310(%rbp), %rdi
callq 0x1fec0
leaq -0x1b8(%rbp), %rdi
callq 0x3190
leaq -0x198(%rbp), %rdi
callq 0x3190
leaq -0x178(%rbp), %rdi
callq 0x7a50
leaq -0x160(%rbp), %rdi
callq 0x7a50
leaq -0x148(%rbp), %rdi
callq 0x49d0
leaq -0x130(%rbp), %rdi
callq 0x4a90
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
jmp 0x1cca5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1d349
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x5b8(%rbp), %rdi
callq 0x3190
leaq -0x598(%rbp), %rdi
callq 0x4600
leaq -0x310(%rbp), %rdi
callq 0x1fec0
leaq -0x1b8(%rbp), %rdi
callq 0x3190
leaq -0x198(%rbp), %rdi
callq 0x3190
leaq -0x178(%rbp), %rdi
callq 0x7a50
leaq -0x160(%rbp), %rdi
callq 0x7a50
leaq -0x148(%rbp), %rdi
callq 0x49d0
leaq -0x130(%rbp), %rdi
callq 0x4a90
jmp 0x1d3f7
movq 0x2ec1e(%rip), %rdi     # 0x4bfd0
leaq 0x1b6d6(%rip), %rsi     # 0x38a8f
callq 0x3270
movq %rax, -0x650(%rbp)
jmp 0x1d3c7
movq -0x650(%rbp), %rdi
movq 0x2ebd3(%rip), %rsi     # 0x4bfa8
callq 0x32b0
jmp 0x1d3dc
leaq -0x50(%rbp), %rdi
callq 0x4af0
leaq -0x28(%rbp), %rdi
callq 0x4af0
addq $0x660, %rsp            # imm = 0x660
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0x4af0
leaq -0x28(%rbp), %rdi
callq 0x4af0
movq -0x30(%rbp), %rdi
callq 0x34d0
nopw %cs:(%rax,%rax)