// File: 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
subq $0x7d0, %rsp            # imm = 0x7D0
movq %rsi, -0x6e8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x6f8(%rbp)
leaq -0x198(%rbp), %rdi
movq %rdi, -0x6f0(%rbp)
callq 0x42c0
movq -0x6f0(%rbp), %rdi
movq -0x6e8(%rbp), %rsi
callq 0x4440
jmp 0x2772d
leaq -0x1c8(%rbp), %rdi
callq 0x4550
leaq -0x1e9(%rbp), %rdi
movq %rdi, -0x700(%rbp)
callq 0x46e0
movq -0x700(%rbp), %rdx
leaq 0x4a5e(%rip), %rsi      # 0x2c1b8
leaq -0x1e8(%rbp), %rdi
callq 0x4530
jmp 0x27768
leaq -0x1e9(%rbp), %rdi
callq 0x4420
leaq -0x211(%rbp), %rdi
movq %rdi, -0x708(%rbp)
callq 0x46e0
movq -0x708(%rbp), %rdx
leaq 0x4a23(%rip), %rsi      # 0x2c1b8
leaq -0x210(%rbp), %rdi
callq 0x4530
jmp 0x277a3
leaq -0x211(%rbp), %rdi
callq 0x4420
leaq -0x239(%rbp), %rdi
movq %rdi, -0x710(%rbp)
callq 0x46e0
movq -0x710(%rbp), %rdx
leaq 0x49e8(%rip), %rsi      # 0x2c1b8
leaq -0x238(%rbp), %rdi
callq 0x4530
jmp 0x277de
leaq -0x239(%rbp), %rdi
callq 0x4420
leaq -0x198(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
movl $0x2c, %edx
callq 0x4710
movq %rax, -0x718(%rbp)
jmp 0x2780b
movq -0x718(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x44b0
movb %al, -0x719(%rbp)
jmp 0x27829
movb -0x719(%rbp), %al
testb $0x1, %al
jne 0x27838
jmp 0x27f9a
callq 0x100d0
movq %rax, -0x728(%rbp)
jmp 0x27846
leaq 0x511b(%rip), %rsi      # 0x2c968
leaq -0x260(%rbp), %rdi
leaq -0x1c8(%rbp), %rdx
callq 0x152c0
jmp 0x27862
movq -0x728(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x10460
jmp 0x27877
leaq -0x260(%rbp), %rdi
callq 0x4270
leaq -0x468(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
movl $0x8, %edx
callq 0x4630
jmp 0x2789d
jmp 0x2789f
leaq -0x468(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x40c0
movq %rax, -0x730(%rbp)
jmp 0x278bb
movq -0x730(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x44b0
movb %al, -0x731(%rbp)
jmp 0x278d9
movb -0x731(%rbp), %al
testb $0x1, %al
jne 0x278e8
jmp 0x27f6a
xorl %eax, %eax
movl %eax, %esi
leaq -0x210(%rbp), %rdi
callq 0x4770
movq %rax, -0x740(%rbp)
jmp 0x27901
movq -0x740(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
jne 0x27ee2
leaq -0x1e8(%rbp), %rdi
callq 0x45e0
cmpq $0x0, %rax
je 0x27ee2
leaq -0x1e8(%rbp), %rdi
callq 0x45e0
leaq 0x16d97(%rip), %rcx     # 0x3e6d4
movl (%rcx), %ecx
shll %ecx
leaq 0x16d74(%rip), %rdx     # 0x3e6bc
addl (%rdx), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jbe 0x27c3e
leaq 0x16d77(%rip), %rax     # 0x3e6d4
movq %rax, -0x748(%rbp)
movslq (%rax), %rax
movq %rax, -0x750(%rbp)
leaq -0x1e8(%rbp), %rdi
movq %rdi, -0x758(%rbp)
callq 0x45e0
movq -0x758(%rbp), %rsi
movq -0x750(%rbp), %rdx
movq %rax, %rcx
movq -0x748(%rbp), %rax
movl (%rax), %eax
addl %eax, %eax
cltq
subq %rax, %rcx
leaq -0x488(%rbp), %rdi
callq 0x43e0
jmp 0x279b0
leaq -0x1e8(%rbp), %rdi
movq %rdi, -0x770(%rbp)
leaq -0x488(%rbp), %rsi
movq %rsi, -0x778(%rbp)
callq 0x4480
movq -0x778(%rbp), %rdi
callq 0x4270
movq -0x6f8(%rbp), %rax
movq -0x770(%rbp), %rsi
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x768(%rbp)
movq (%rax), %rax
movq %rax, -0x760(%rbp)
leaq -0x4f8(%rbp), %rdi
callq 0x41b0
jmp 0x27a11
leaq -0x518(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x41b0
jmp 0x27a26
movq -0x760(%rbp), %rsi
leaq -0x4d8(%rbp), %rdi
leaq -0x4f8(%rbp), %rdx
leaq -0x518(%rbp), %rcx
callq 0x5a20
jmp 0x27a49
movq -0x768(%rbp), %rdi
leaq -0x4d8(%rbp), %rsi
callq 0x28b00
jmp 0x27a5e
leaq -0x4d8(%rbp), %rdi
callq 0x5b00
leaq -0x518(%rbp), %rdi
callq 0x4270
leaq -0x4f8(%rbp), %rdi
callq 0x4270
leaq 0x16c6f(%rip), %rax     # 0x3e6f8
cmpl $0x0, (%rax)
je 0x27c39
callq 0x100d0
movq %rax, -0x780(%rbp)
jmp 0x27aa0
leaq 0x4ecf(%rip), %rsi      # 0x2c976
leaq -0x538(%rbp), %rdi
leaq -0x238(%rbp), %rdx
callq 0x152c0
jmp 0x27abc
movq -0x780(%rbp), %rdi
leaq -0x538(%rbp), %rsi
callq 0x10460
jmp 0x27ad1
leaq -0x538(%rbp), %rdi
callq 0x4270
jmp 0x27c39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x2812c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x1e9(%rbp), %rdi
callq 0x4420
jmp 0x28120
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x211(%rbp), %rdi
callq 0x4420
jmp 0x28114
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x239(%rbp), %rdi
callq 0x4420
jmp 0x28108
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x280fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x4270
jmp 0x280fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x27f89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x27c05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x27bf9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x4d8(%rbp), %rdi
callq 0x5b00
leaq -0x518(%rbp), %rdi
callq 0x4270
leaq -0x4f8(%rbp), %rdi
callq 0x4270
jmp 0x27f89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x538(%rbp), %rdi
callq 0x4270
jmp 0x27f89
jmp 0x27e88
leaq -0x1e8(%rbp), %rdi
callq 0x45e0
leaq 0x16a6b(%rip), %rcx     # 0x3e6bc
movslq (%rcx), %rcx
cmpq %rcx, %rax
jbe 0x27e86
leaq -0x1e8(%rbp), %rdi
movq %rdi, -0x790(%rbp)
callq 0x45e0
movq -0x790(%rbp), %rdi
leaq 0x16a3e(%rip), %rcx     # 0x3e6bc
movslq (%rcx), %rcx
subq %rcx, %rax
shrq %rax
movl %eax, -0x53c(%rbp)
movslq -0x53c(%rbp), %rax
movq %rax, -0x788(%rbp)
callq 0x45e0
movq -0x790(%rbp), %rsi
movq -0x788(%rbp), %rdx
movq %rax, %rcx
movl -0x53c(%rbp), %eax
addl %eax, %eax
cltq
subq %rax, %rcx
leaq -0x560(%rbp), %rdi
callq 0x43e0
jmp 0x27ccc
leaq -0x1e8(%rbp), %rdi
movq %rdi, -0x7a8(%rbp)
leaq -0x560(%rbp), %rsi
movq %rsi, -0x7b0(%rbp)
callq 0x4480
movq -0x7b0(%rbp), %rdi
callq 0x4270
movq -0x6f8(%rbp), %rax
movq -0x7a8(%rbp), %rsi
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x7a0(%rbp)
movq (%rax), %rax
movq %rax, -0x798(%rbp)
leaq -0x5d0(%rbp), %rdi
callq 0x41b0
jmp 0x27d2d
leaq -0x5f0(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x41b0
jmp 0x27d42
movq -0x798(%rbp), %rsi
leaq -0x5b0(%rbp), %rdi
leaq -0x5d0(%rbp), %rdx
leaq -0x5f0(%rbp), %rcx
callq 0x5a20
jmp 0x27d65
movq -0x7a0(%rbp), %rdi
leaq -0x5b0(%rbp), %rsi
callq 0x28b00
jmp 0x27d7a
leaq -0x5b0(%rbp), %rdi
callq 0x5b00
leaq -0x5f0(%rbp), %rdi
callq 0x4270
leaq -0x5d0(%rbp), %rdi
callq 0x4270
leaq 0x16953(%rip), %rax     # 0x3e6f8
cmpl $0x0, (%rax)
je 0x27e84
callq 0x100d0
movq %rax, -0x7b8(%rbp)
jmp 0x27dbc
leaq 0x4bb3(%rip), %rsi      # 0x2c976
leaq -0x610(%rbp), %rdi
leaq -0x238(%rbp), %rdx
callq 0x152c0
jmp 0x27dd8
movq -0x7b8(%rbp), %rdi
leaq -0x610(%rbp), %rsi
callq 0x10460
jmp 0x27ded
leaq -0x610(%rbp), %rdi
callq 0x4270
jmp 0x27e84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x27e50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x27e44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x5b0(%rbp), %rdi
callq 0x5b00
leaq -0x5f0(%rbp), %rdi
callq 0x4270
leaq -0x5d0(%rbp), %rdi
callq 0x4270
jmp 0x27f89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x610(%rbp), %rdi
callq 0x4270
jmp 0x27f89
jmp 0x27e86
jmp 0x27e88
leaq 0x4329(%rip), %rsi      # 0x2c1b8
leaq -0x1e8(%rbp), %rdi
callq 0x4520
jmp 0x27e9d
leaq -0x630(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x1, %edx
movq $-0x1, %rcx
callq 0x43e0
jmp 0x27ebe
leaq -0x238(%rbp), %rdi
leaq -0x630(%rbp), %rsi
callq 0x4480
leaq -0x630(%rbp), %rdi
callq 0x4270
jmp 0x27f65
xorl %eax, %eax
movl %eax, %esi
leaq -0x210(%rbp), %rdi
callq 0x4770
movq %rax, -0x7c0(%rbp)
jmp 0x27efb
movq -0x7c0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
jne 0x27f4c
leaq -0x650(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x1, %edx
movq $-0x1, %rcx
callq 0x43e0
jmp 0x27f2b
leaq -0x238(%rbp), %rdi
leaq -0x650(%rbp), %rsi
callq 0x4480
leaq -0x650(%rbp), %rdi
callq 0x4270
jmp 0x27f63
leaq -0x1e8(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x44c0
jmp 0x27f61
jmp 0x27f63
jmp 0x27f65
jmp 0x2789f
leaq -0x468(%rbp), %rdi
callq 0x40e0
jmp 0x27f78
leaq -0x468(%rbp), %rdi
callq 0x4120
jmp 0x277ea
leaq -0x468(%rbp), %rdi
callq 0x4120
jmp 0x280fc
leaq -0x1e8(%rbp), %rdi
callq 0x45e0
cmpq $0x0, %rax
je 0x280b7
movq -0x6f8(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x7d0(%rbp)
movq (%rax), %rax
movq %rax, -0x7c8(%rbp)
leaq -0x6c0(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x41b0
jmp 0x27fe4
leaq -0x6e0(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x41b0
jmp 0x27ff9
movq -0x7c8(%rbp), %rsi
leaq -0x6a0(%rbp), %rdi
leaq -0x6c0(%rbp), %rdx
leaq -0x6e0(%rbp), %rcx
callq 0x5a20
jmp 0x2801c
movq -0x7d0(%rbp), %rdi
leaq -0x6a0(%rbp), %rsi
callq 0x28b00
jmp 0x28031
leaq -0x6a0(%rbp), %rdi
callq 0x5b00
leaq -0x6e0(%rbp), %rdi
callq 0x4270
leaq -0x6c0(%rbp), %rdi
callq 0x4270
jmp 0x280b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x280a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x2809d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x6a0(%rbp), %rdi
callq 0x5b00
leaq -0x6e0(%rbp), %rdi
callq 0x4270
leaq -0x6c0(%rbp), %rdi
callq 0x4270
jmp 0x280fc
leaq -0x238(%rbp), %rdi
callq 0x4270
leaq -0x210(%rbp), %rdi
callq 0x4270
leaq -0x1e8(%rbp), %rdi
callq 0x4270
leaq -0x1c8(%rbp), %rdi
callq 0x4270
leaq -0x198(%rbp), %rdi
callq 0x42f0
addq $0x7d0, %rsp            # imm = 0x7D0
popq %rbp
retq
leaq -0x238(%rbp), %rdi
callq 0x4270
leaq -0x210(%rbp), %rdi
callq 0x4270
leaq -0x1e8(%rbp), %rdi
callq 0x4270
leaq -0x1c8(%rbp), %rdi
callq 0x4270
leaq -0x198(%rbp), %rdi
callq 0x42f0
movq -0x1a0(%rbp), %rdi
callq 0x46c0
nopw %cs:(%rax,%rax)