// File: afinit[P]afin/contiglist.cpp
// Function: Contiglist::output_contigs(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Contiglist::output_contigs( int list_num, string file, string id_suffix ){
  vector<Contig> clist = contigs;  

  cout << "output_contigs" << endl;
  if( list_num )
    clist = contigs_fused;
  
  // open outfile
  ofstream outfile_fp( file+".fa");

  // print out each line to the
  for( int i=0; i<clist.size(); i++ ){
    string seq = clist[i].get_sequence();
    outfile_fp << ">" << "contig" << i << "_len_" << seq.length() << "_" << id_suffix << endl;
    outfile_fp << seq << endl;
  }

  outfile_fp.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdx, -0x2b0(%rbp)
movq %rcx, -0x2a8(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x2a0(%rbp)
addq $0x8, %rsi
leaq -0x38(%rbp), %rdi
callq 0x28b30
movq 0x15bd9(%rip), %rdi     # 0x3dfc0
leaq 0x4597(%rip), %rsi      # 0x2c985
callq 0x43c0
movq %rax, -0x298(%rbp)
jmp 0x283fc
movq -0x298(%rbp), %rdi
movq 0x15b86(%rip), %rsi     # 0x3df90
callq 0x43f0
jmp 0x28411
cmpl $0x0, -0xc(%rbp)
je 0x28440
movq -0x2a0(%rbp), %rsi
addq $0x20, %rsi
leaq -0x38(%rbp), %rdi
callq 0x28c20
jmp 0x2842d
jmp 0x28440
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x28682
movq -0x2b0(%rbp), %rsi
leaq 0x4546(%rip), %rdx      # 0x2c994
leaq -0x268(%rbp), %rdi
callq 0xb230
jmp 0x2845c
leaq -0x248(%rbp), %rdi
leaq -0x268(%rbp), %rsi
movl $0x10, %edx
callq 0x4740
jmp 0x28476
leaq -0x268(%rbp), %rdi
callq 0x4270
movl $0x0, -0x26c(%rbp)
movslq -0x26c(%rbp), %rax
movq %rax, -0x2b8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x28940
movq %rax, %rcx
movq -0x2b8(%rbp), %rax
cmpq %rcx, %rax
jae 0x2864a
movslq -0x26c(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x28920
movq %rax, %rsi
leaq -0x290(%rbp), %rdi
callq 0x5e50
jmp 0x284d7
leaq 0x44ba(%rip), %rsi      # 0x2c998
leaq -0x248(%rbp), %rdi
callq 0x43c0
movq %rax, -0x2c0(%rbp)
jmp 0x284f3
movq -0x2c0(%rbp), %rdi
leaq 0x4499(%rip), %rsi      # 0x2c99a
callq 0x43c0
movq %rax, -0x2c8(%rbp)
jmp 0x2850f
movq -0x2c8(%rbp), %rdi
movl -0x26c(%rbp), %esi
callq 0x46a0
movq %rax, -0x2d0(%rbp)
jmp 0x2852a
movq -0x2d0(%rbp), %rdi
leaq 0x4469(%rip), %rsi      # 0x2c9a1
callq 0x43c0
movq %rax, -0x2d8(%rbp)
jmp 0x28546
leaq -0x290(%rbp), %rdi
callq 0x45e0
movq -0x2d8(%rbp), %rdi
movq %rax, %rsi
callq 0x4100
movq %rax, -0x2e0(%rbp)
jmp 0x2856a
movq -0x2e0(%rbp), %rdi
leaq 0x3e0b(%rip), %rsi      # 0x2c383
callq 0x43c0
movq %rax, -0x2e8(%rbp)
jmp 0x28586
movq -0x2a8(%rbp), %rsi
movq -0x2e8(%rbp), %rdi
callq 0x4370
movq %rax, -0x2f0(%rbp)
jmp 0x285a2
movq -0x2f0(%rbp), %rdi
movq 0x159e0(%rip), %rsi     # 0x3df90
callq 0x43f0
jmp 0x285b7
leaq -0x248(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x4370
movq %rax, -0x2f8(%rbp)
jmp 0x285d3
movq -0x2f8(%rbp), %rdi
movq 0x159af(%rip), %rsi     # 0x3df90
callq 0x43f0
jmp 0x285e8
leaq -0x290(%rbp), %rdi
callq 0x4270
movl -0x26c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x26c(%rbp)
jmp 0x2848c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x4270
jmp 0x28682
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x28676
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x4270
jmp 0x28676
leaq -0x248(%rbp), %rdi
callq 0x4570
jmp 0x28658
leaq -0x248(%rbp), %rdi
callq 0x45c0
leaq -0x38(%rbp), %rdi
callq 0xc210
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
leaq -0x248(%rbp), %rdi
callq 0x45c0
leaq -0x38(%rbp), %rdi
callq 0xc210
movq -0x40(%rbp), %rdi
callq 0x46c0
nopw %cs:(%rax,%rax)