// File: /workspace/github_cpp_makefile_star2_O1/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 0x2aaf(%rip), %rdx      # 0x15f4c
leaq -0x50(%rbp), %rdi
movq %rdx, %rsi
callq 0x6b5c
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2a91(%rip), %rdx      # 0x15f4c
leaq -0x98(%rbp), %rdi
movq %rdx, %rsi
callq 0x6b5c
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2a73(%rip), %rdx      # 0x15f4c
leaq -0x78(%rbp), %rdi
movq %rdx, %rsi
callq 0x6b5c
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 0x1392e
callq 0x9626
movq %rax, %rbx
leaq -0x178(%rbp), %rdi
leaq 0x315b(%rip), %rsi      # 0x166a1
leaq -0xf8(%rbp), %rdx
callq 0xd67f
movq %rbx, %rdi
leaq -0x178(%rbp), %rsi
callq 0x9846
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x13579
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 0x13919
movq -0x98(%rbp), %rsi
movb (%rsi), %al
cmpb $0x3e, %al
jne 0x1375d
movq -0x48(%rbp), %rcx
testq %rcx, %rcx
je 0x1373d
leaq 0xa03a(%rip), %rax      # 0x1d624
movslq (%rax), %rdx
leaq 0xa018(%rip), %rax      # 0x1d60c
movslq (%rax), %rsi
leaq (%rsi,%rdx,2), %rax
cmpq %rax, %rcx
jbe 0x13772
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 0x1363f
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 0x6876
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 0x6876
movq %r12, %rdi
movq %rbx, %rsi
leaq -0xd8(%rbp), %rdx
movq %r14, %rcx
callq 0x58d6
movq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x14850
movq %r12, %rdi
callq 0x59a6
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x136d4
callq 0x42f0
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x136ec
callq 0x42f0
leaq 0x9f55(%rip), %rax      # 0x1d648
cmpl $0x0, (%rax)
je 0x138bc
callq 0x9626
movq %rax, %rbx
leaq -0x158(%rbp), %rdi
leaq 0x2f9d(%rip), %rsi      # 0x166af
leaq -0x78(%rbp), %rdx
callq 0xd67f
movq %rbx, %rdi
leaq -0x158(%rbp), %rsi
callq 0x9846
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
jmp 0x138b2
cmpb $0x3e, %al
jne 0x1375d
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
movq $-0x1, %rcx
callq 0x4330
jmp 0x138ec
movq -0x90(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x40f0
jmp 0x1358d
movq %rcx, %rax
subq %rsi, %rax
jbe 0x138bc
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 0x137be
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 0x6876
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 0x6876
movq %r12, %rdi
movq %rbx, %rsi
leaq -0xb8(%rbp), %rdx
movq %r14, %rcx
callq 0x58d6
movq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x14850
movq %r12, %rdi
callq 0x59a6
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x13853
callq 0x42f0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x1386b
callq 0x42f0
leaq 0x9dd6(%rip), %rax      # 0x1d648
cmpl $0x0, (%rax)
je 0x138bc
callq 0x9626
leaq -0x1d8(%rbp), %r14
movq %rax, %rbx
movq %r14, %rdi
leaq 0x2e1f(%rip), %rsi      # 0x166af
leaq -0x78(%rbp), %rdx
callq 0xd67f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9846
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x138bc
callq 0x42f0
movq -0x48(%rbp), %rdx
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
leaq 0x267f(%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 0x1358d
callq 0x42f0
jmp 0x1358d
movq %r15, %rdi
callq 0x4090
movq %r15, %rdi
callq 0x40b0
jmp 0x13506
movq -0x48(%rbp), %rdx
testq %rdx, %rdx
je 0x139dd
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 0x6876
leaq -0x188(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0x198(%rbp), %rdi
callq 0x6876
leaq -0x5b8(%rbp), %rdi
leaq -0x1b8(%rbp), %rdx
leaq -0x198(%rbp), %rcx
movq %rbx, %rsi
callq 0x58d6
leaq -0x5b8(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x14850
leaq -0x5b8(%rbp), %rdi
callq 0x59a6
movq -0x198(%rbp), %rdi
cmpq %r15, %rdi
je 0x139cc
callq 0x42f0
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
je 0x139dd
callq 0x42f0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x139ef
callq 0x42f0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x13a07
callq 0x42f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x13a19
callq 0x42f0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x13a31
callq 0x42f0
movq 0x9550(%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 0x59a6
jmp 0x13a76
movq %rax, %rbx
movq -0x198(%rbp), %rdi
cmpq %r15, %rdi
je 0x13a8c
callq 0x42f0
jmp 0x13a8c
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
jne 0x13ae6
jmp 0x13bcd
jmp 0x13b68
movq %rax, %rbx
jmp 0x13bdf
movq %rax, %rbx
jmp 0x13bf7
movq %rax, %rbx
jmp 0x13c09
movq %rax, %rbx
jmp 0x13c21
jmp 0x13bbe
jmp 0x13b68
movq %rax, %rbx
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x13bcd
callq 0x42f0
jmp 0x13bcd
movq %rax, %rbx
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
jmp 0x13bac
jmp 0x13bbe
movq %rax, %rbx
jmp 0x13b29
movq %rax, %rbx
jmp 0x13b41
jmp 0x13bbe
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x59a6
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x13b41
callq 0x42f0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
jmp 0x13bac
jmp 0x13bbe
movq %rax, %rbx
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
jmp 0x13bac
jmp 0x13bbe
movq %rax, %rbx
jmp 0x13bcd
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x59a6
jmp 0x13b86
movq %rax, %rbx
jmp 0x13b9e
movq %rax, %rbx
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x13b9e
callq 0x42f0
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x13bc1
callq 0x42f0
jmp 0x13bc1
jmp 0x13bbe
jmp 0x13bbe
jmp 0x13bbe
movq %rax, %rbx
leaq -0x5b8(%rbp), %rdi
callq 0x40b0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x13bdf
callq 0x42f0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x13bf7
callq 0x42f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x13c09
callq 0x42f0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x13c21
callq 0x42f0
movq 0x9360(%rip), %rsi      # 0x1cf88
leaq -0x3b0(%rbp), %rdi
callq 0x4250
leaq -0x330(%rbp), %rdi
callq 0x4100
movq %rbx, %rdi
callq 0x4590