// File: /workspace/github_cpp_makefile_star2_O3/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 -0x3b0(%rbp), %rdi
callq 0x4220
leaq -0x398(%rbp), %rdi
movq %rbx, %rsi
callq 0x44c0
leaq -0xe8(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2957(%rip), %rdx      # 0x15f4c
leaq -0x50(%rbp), %rdi
movq %rdx, %rsi
callq 0x6be0
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2939(%rip), %rdx      # 0x15f4c
leaq -0x98(%rbp), %rdi
movq %rdx, %rsi
callq 0x6be0
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x291b(%rip), %rdx      # 0x15f4c
leaq -0x78(%rbp), %rdi
movq %rdx, %rsi
callq 0x6be0
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x58(%rbp)
leaq -0x5b8(%rbp), %r15
leaq -0x98(%rbp), %r13
leaq -0x228(%rbp), %r12
leaq -0x3b0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
movl $0x2c, %edx
callq 0x45d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x13a81
callq 0x9692
movq %rax, %rbx
leaq -0x178(%rbp), %rdi
leaq 0x3003(%rip), %rsi      # 0x166a1
leaq -0xf8(%rbp), %rdx
callq 0xd79e
movq %rbx, %rdi
leaq -0x178(%rbp), %rsi
callq 0x98ba
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x136d1
callq 0x42f0
movq %r15, %rdi
leaq -0xf8(%rbp), %rsi
movl $0x8, %edx
callq 0x4520
movq -0x5b8(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4300
movsbl %al, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x45d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x13a6c
movq -0x98(%rbp), %rsi
cmpb $0x3e, (%rsi)
jne 0x13894
movq -0x48(%rbp), %rcx
testq %rcx, %rcx
je 0x138a9
leaq 0x9ee3(%rip), %rax      # 0x1d624
movslq (%rax), %rdx
leaq 0x9ec1(%rip), %rax      # 0x1d60c
movslq (%rax), %rsi
leaq (%rsi,%rdx,2), %rax
cmpq %rax, %rcx
jbe 0x138c5
leaq (%rdx,%rdx), %rax
cltq
subq %rax, %rcx
movq %r12, %rdi
leaq -0x50(%rbp), %rbx
movq %rbx, %rsi
callq 0x4330
movq %rbx, %rdi
movq %r12, %rsi
callq 0x43b0
movq -0x228(%rbp), %rdi
leaq -0x218(%rbp), %rax
cmpq %rax, %rdi
je 0x13796
callq 0x42f0
movq -0x30(%rbp), %rax
movq (%rax), %rbx
leaq -0xc8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %rdi
callq 0x68f6
leaq -0x128(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x138(%rbp), %r14
movq %r14, %rdi
callq 0x68f6
movq %r12, %rdi
movq %rbx, %rsi
leaq -0xd8(%rbp), %rdx
movq %r14, %rcx
callq 0x58ee
movq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x149b8
movq %r12, %rdi
callq 0x59be
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x1382b
callq 0x42f0
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x13843
callq 0x42f0
leaq 0x9dfe(%rip), %rax      # 0x1d648
cmpl $0x0, (%rax)
je 0x13a0f
callq 0x9692
movq %rax, %rbx
leaq -0x158(%rbp), %rdi
leaq 0x2e46(%rip), %rsi      # 0x166af
leaq -0x78(%rbp), %rdx
callq 0xd79e
movq %rbx, %rdi
leaq -0x158(%rbp), %rsi
callq 0x98ba
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
jmp 0x13a05
movq -0x90(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x40f0
jmp 0x136e5
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
movq $-0x1, %rcx
callq 0x4330
jmp 0x13a3f
movq %rcx, %rax
subq %rsi, %rax
jbe 0x13a0f
shrq %rax
movslq %eax, %rdx
leal (%rdx,%rdx), %eax
cltq
subq %rax, %rcx
movq %r12, %rdi
leaq -0x50(%rbp), %rbx
movq %rbx, %rsi
callq 0x4330
movq %rbx, %rdi
movq %r12, %rsi
callq 0x43b0
movq -0x228(%rbp), %rdi
leaq -0x218(%rbp), %rax
cmpq %rax, %rdi
je 0x13911
callq 0x42f0
movq -0x30(%rbp), %rax
movq (%rax), %rbx
leaq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x68f6
leaq -0x108(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x118(%rbp), %r14
movq %r14, %rdi
callq 0x68f6
movq %r12, %rdi
movq %rbx, %rsi
leaq -0xb8(%rbp), %rdx
movq %r14, %rcx
callq 0x58ee
movq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x149b8
movq %r12, %rdi
callq 0x59be
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x139a6
callq 0x42f0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x139be
callq 0x42f0
leaq 0x9c83(%rip), %rax      # 0x1d648
cmpl $0x0, (%rax)
je 0x13a0f
callq 0x9692
leaq -0x1d8(%rbp), %r14
movq %rax, %rbx
movq %r14, %rdi
leaq 0x2ccc(%rip), %rsi      # 0x166af
leaq -0x78(%rbp), %rdx
callq 0xd79e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x98ba
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x13a0f
callq 0x42f0
movq -0x48(%rbp), %rdx
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
leaq 0x252c(%rip), %rcx      # 0x15f4c
xorl %r8d, %r8d
callq 0x44f0
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
movq $-0x1, %rcx
callq 0x4330
leaq -0x78(%rbp), %rdi
movq %r12, %rsi
callq 0x43b0
movq -0x228(%rbp), %rdi
leaq -0x218(%rbp), %rax
cmpq %rax, %rdi
je 0x136e5
callq 0x42f0
jmp 0x136e5
movq %r15, %rdi
callq 0x4090
movq %r15, %rdi
callq 0x40b0
jmp 0x1365e
movq -0x48(%rbp), %rdx
testq %rdx, %rdx
je 0x13b30
movq -0x30(%rbp), %rax
movq (%rax), %rbx
leaq -0x1a8(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x50(%rbp), %rsi
addq %rsi, %rdx
leaq -0x1b8(%rbp), %rdi
callq 0x68f6
leaq -0x188(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x198(%rbp), %rdi
callq 0x68f6
leaq -0x5b8(%rbp), %rdi
leaq -0x1b8(%rbp), %rdx
leaq -0x198(%rbp), %rcx
movq %rbx, %rsi
callq 0x58ee
leaq -0x5b8(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x149b8
leaq -0x5b8(%rbp), %rdi
callq 0x59be
movq -0x198(%rbp), %rdi
cmpq %r15, %rdi
je 0x13b1f
callq 0x42f0
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
je 0x13b30
callq 0x42f0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x13b42
callq 0x42f0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x13b5a
callq 0x42f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x13b6c
callq 0x42f0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x13b84
callq 0x42f0
movq 0x93fd(%rip), %rsi      # 0x1cf88
leaq -0x3b0(%rbp), %rdi
callq 0x4250
leaq -0x330(%rbp), %rdi
callq 0x4100
addq $0x598, %rsp            # imm = 0x598
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x5b8(%rbp), %rdi
callq 0x59be
jmp 0x13bc9
movq %rax, %rbx
movq -0x198(%rbp), %rdi
cmpq %r15, %rdi
je 0x13bdf
callq 0x42f0
jmp 0x13bdf
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
jne 0x13c39
jmp 0x13d20
jmp 0x13cb9
movq %rax, %rbx
jmp 0x13d32
movq %rax, %rbx
jmp 0x13d4a
movq %rax, %rbx
jmp 0x13d5c
movq %rax, %rbx
jmp 0x13d74
jmp 0x13d11
jmp 0x13cb9
movq %rax, %rbx
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x13d20
callq 0x42f0
jmp 0x13d20
movq %rax, %rbx
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
jmp 0x13d01
jmp 0x13d11
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x59be
jmp 0x13c7c
movq %rax, %rbx
jmp 0x13c94
jmp 0x13d11
movq %rax, %rbx
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x13c94
callq 0x42f0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
jmp 0x13d01
movq %rax, %rbx
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
jmp 0x13d01
jmp 0x13d11
movq %rax, %rbx
jmp 0x13d20
movq %rax, %rbx
jmp 0x13cdb
movq %rax, %rbx
jmp 0x13cf3
jmp 0x13d11
jmp 0x13d11
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x59be
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x13cf3
callq 0x42f0
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x13d14
callq 0x42f0
jmp 0x13d14
jmp 0x13d11
jmp 0x13d11
movq %rax, %rbx
leaq -0x5b8(%rbp), %rdi
callq 0x40b0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x13d32
callq 0x42f0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x13d4a
callq 0x42f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x13d5c
callq 0x42f0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x13d74
callq 0x42f0
movq 0x920d(%rip), %rsi      # 0x1cf88
leaq -0x3b0(%rbp), %rdi
callq 0x4250
leaq -0x330(%rbp), %rdi
callq 0x4100
movq %rbx, %rdi
callq 0x4590
nop