// File: /workspace/github_cpp_makefile_star2_O2/afinit[P]afin/contiglist.cpp
// Function: Contiglist::add_contigs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Contiglist::add_contigs( string contigsfiles ){
  stringstream ss;
  ss.str( contigsfiles );
  string filename;
  string buffer("");
  string line("");
  string contig_id("");
  
  while( getline( ss, filename, ',' )){
    Log::Inst()->log_it( "contigsfile: " + filename );
 
    // open contig file
    ifstream cont( filename );

    // read in contig objects
    while( getline( cont, line ) ){
      if( line[0] == '>' && buffer.length() != 0 ){
        if( buffer.length() > 2*initial_trim + contig_sub_len ){
          buffer = buffer.substr( initial_trim, buffer.length() - 2*initial_trim );
          contigs.push_back( Contig( reads, buffer, contig_id ));
          if( verbose ){
            Log::Inst()->log_it( "Added contig: " + contig_id );
          }
        }
        else if( buffer.length() > contig_sub_len ){
          int trim = (buffer.length() - contig_sub_len) / 2;
          buffer = buffer.substr( trim, buffer.length() - 2*trim );
          contigs.push_back( Contig( reads, buffer, contig_id ));
          if( verbose ){
            Log::Inst()->log_it( "Added contig: " + contig_id );
          }
        }

        buffer = "";
        contig_id = line.substr(1);
      }
      else if ( line[0] == '>' ){
        contig_id = line.substr(1);
      }
      else{
        buffer += line;
      }
    }
    
    // close contig file
    cont.close();
  }

  // insert last line into contigs list
  if( buffer.length() != 0 ){
    contigs.push_back( Contig( reads, buffer, contig_id ) );
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x598, %rsp            # imm = 0x598
movq %rsi, %rbx
movq %rdi, -0x30(%rbp)
leaq -0x5b8(%rbp), %rdi
callq 0x4220
leaq -0x5a0(%rbp), %rdi
movq %rbx, %rsi
callq 0x44b0
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x2d26(%rip), %rsi      # 0x12f4c
leaq -0x78(%rbp), %rdi
leaq -0x430(%rbp), %rdx
callq 0x4120
leaq 0x2d0f(%rip), %rsi      # 0x12f4c
leaq -0xb8(%rbp), %rdi
leaq -0x430(%rbp), %rdx
callq 0x4120
leaq 0x2cf5(%rip), %rsi      # 0x12f4c
leaq -0x58(%rbp), %rdi
leaq -0x430(%rbp), %rdx
callq 0x4120
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
leaq -0xb8(%rbp), %r15
leaq -0x228(%rbp), %r12
leaq -0x78(%rbp), %r14
leaq -0x5b8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
pushq $0x2c
popq %rdx
callq 0x45d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x10596
callq 0x81fe
movq %rax, %rbx
leaq -0x1b8(%rbp), %rdi
leaq 0x33de(%rip), %rsi      # 0x136a1
leaq -0x98(%rbp), %rdx
callq 0xae38
movq %rbx, %rdi
leaq -0x1b8(%rbp), %rbx
movq %rbx, %rsi
callq 0x83ae
movq %rbx, %rdi
callq 0x4160
leaq -0x430(%rbp), %rdi
leaq -0x98(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x4510
leaq -0x430(%rbp), %rdi
movq %r15, %rsi
callq 0x4080
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1057a
movq -0xb8(%rbp), %rax
cmpb $0x3e, (%rax)
jne 0x10438
movq -0x70(%rbp), %rcx
testq %rcx, %rcx
je 0x10448
leaq 0xb2f0(%rip), %rax      # 0x1b634
movslq (%rax), %rdx
leaq 0xb2ce(%rip), %rax      # 0x1b61c
movslq (%rax), %rsi
leaq (%rsi,%rdx,2), %rax
cmpq %rax, %rcx
jbe 0x1045e
leaq (%rdx,%rdx), %rax
cltq
subq %rax, %rcx
movq %r12, %rdi
movq %r14, %rsi
callq 0x4330
movq %r14, %rdi
movq %r12, %rsi
callq 0x4390
movq %r12, %rdi
callq 0x4160
movq -0x30(%rbp), %rax
movq (%rax), %rbx
leaq -0x138(%rbp), %rdi
movq %r14, %rsi
callq 0x4410
leaq -0x198(%rbp), %r13
movq %r13, %rdi
leaq -0x58(%rbp), %rsi
callq 0x4410
movq %r12, %rdi
movq %rbx, %rsi
leaq -0x138(%rbp), %rdx
movq %r13, %rcx
callq 0x528e
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x110cc
movq %r12, %rdi
callq 0x5328
leaq -0x198(%rbp), %rdi
callq 0x4160
leaq -0x138(%rbp), %rdi
callq 0x4160
leaq 0xb262(%rip), %rax      # 0x1b658
cmpl $0x0, (%rax)
je 0x10541
callq 0x81fe
movq %rax, %rbx
leaq -0x178(%rbp), %rdi
leaq 0x329a(%rip), %rsi      # 0x136af
leaq -0x58(%rbp), %rdx
callq 0xae38
movq %rbx, %rdi
leaq -0x178(%rbp), %rbx
movq %rbx, %rsi
callq 0x83ae
movq %rbx, %rdi
jmp 0x1053c
movq %r14, %rdi
movq %r15, %rsi
callq 0x4630
jmp 0x102ff
movq %r12, %rdi
movq %r15, %rsi
pushq $0x1
popq %rdx
pushq $-0x1
popq %rcx
callq 0x4330
jmp 0x10561
movq %rcx, %rax
subq %rsi, %rax
jbe 0x10541
shrq %rax
movslq %eax, %rdx
leal (%rdx,%rdx), %eax
cltq
subq %rax, %rcx
movq %r12, %rdi
movq %r14, %rsi
callq 0x4330
movq %r14, %rdi
movq %r12, %rsi
callq 0x4390
movq %r12, %rdi
callq 0x4160
movq -0x30(%rbp), %rax
movq (%rax), %rbx
leaq -0x118(%rbp), %rdi
movq %r14, %rsi
callq 0x4410
leaq -0x158(%rbp), %r13
movq %r13, %rdi
leaq -0x58(%rbp), %rsi
callq 0x4410
movq %r12, %rdi
movq %rbx, %rsi
leaq -0x118(%rbp), %rdx
movq %r13, %rcx
callq 0x528e
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x110cc
movq %r12, %rdi
callq 0x5328
leaq -0x158(%rbp), %rdi
callq 0x4160
leaq -0x118(%rbp), %rdi
callq 0x4160
leaq 0xb151(%rip), %rax      # 0x1b658
cmpl $0x0, (%rax)
je 0x10541
callq 0x81fe
leaq -0x1d8(%rbp), %r13
movq %rax, %rbx
movq %r13, %rdi
leaq 0x318a(%rip), %rsi      # 0x136af
leaq -0x58(%rbp), %rdx
callq 0xae38
movq %rbx, %rdi
movq %r13, %rsi
callq 0x83ae
movq %r13, %rdi
callq 0x4160
movq %r14, %rdi
leaq 0x2a01(%rip), %rsi      # 0x12f4c
callq 0x4600
movq %r12, %rdi
movq %r15, %rsi
pushq $0x1
popq %rdx
pushq $-0x1
popq %rcx
callq 0x4330
leaq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x4390
movq %r12, %rdi
callq 0x4160
jmp 0x102ff
leaq -0x430(%rbp), %rbx
movq %rbx, %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x40d0
jmp 0x10285
cmpq $0x0, -0x70(%rbp)
je 0x10615
movq -0x30(%rbp), %rax
movq (%rax), %rbx
leaq -0xf8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x4410
leaq -0xd8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4410
leaq -0x430(%rbp), %rdi
leaq -0xf8(%rbp), %rdx
leaq -0xd8(%rbp), %rcx
movq %rbx, %rsi
callq 0x528e
leaq -0x430(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x110cc
leaq -0x430(%rbp), %rdi
callq 0x5328
leaq -0xd8(%rbp), %rdi
callq 0x4160
leaq -0xf8(%rbp), %rdi
callq 0x4160
leaq -0x58(%rbp), %rdi
callq 0x4160
leaq -0xb8(%rbp), %rdi
callq 0x4160
leaq -0x78(%rbp), %rdi
callq 0x4160
leaq -0x98(%rbp), %rdi
callq 0x4160
leaq -0x5b8(%rbp), %rdi
callq 0x4250
addq $0x598, %rsp            # imm = 0x598
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x430(%rbp), %rdi
callq 0x5328
jmp 0x10671
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x4160
jmp 0x10682
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
jmp 0x106c1
jmp 0x10717
movq %rax, %rbx
jmp 0x1076f
movq %rax, %rbx
jmp 0x1077b
movq %rax, %rbx
jmp 0x10784
movq %rax, %rbx
jmp 0x10790
jmp 0x10757
jmp 0x10717
movq %rax, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x4160
jmp 0x10766
movq %rax, %rbx
leaq -0x1d8(%rbp), %rdi
jmp 0x1074a
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x5328
jmp 0x106f2
movq %rax, %rbx
jmp 0x106fe
jmp 0x10757
movq %rax, %rbx
leaq -0x158(%rbp), %rdi
callq 0x4160
leaq -0x118(%rbp), %rdi
jmp 0x1074a
jmp 0x10757
movq %rax, %rbx
leaq -0x178(%rbp), %rdi
jmp 0x1074a
jmp 0x10757
movq %rax, %rbx
jmp 0x10766
jmp 0x10757
movq %rax, %rbx
jmp 0x10732
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x5328
leaq -0x198(%rbp), %rdi
callq 0x4160
jmp 0x10743
movq %rax, %rbx
leaq -0x138(%rbp), %rdi
callq 0x4160
jmp 0x1075a
jmp 0x10757
jmp 0x10757
jmp 0x10757
movq %rax, %rbx
leaq -0x430(%rbp), %rdi
callq 0x40d0
leaq -0x58(%rbp), %rdi
callq 0x4160
leaq -0xb8(%rbp), %rdi
callq 0x4160
leaq -0x78(%rbp), %rdi
callq 0x4160
leaq -0x98(%rbp), %rdi
callq 0x4160
leaq -0x5b8(%rbp), %rdi
callq 0x4250
movq %rbx, %rdi
callq 0x4590