// File: afinit[P]afin/contiglist.cpp
// Function: Contiglist::create_final_fasta()
void Contiglist::create_final_fasta(){
  // remove directories from outfile to form id_suffix if necessary
  size_t id_suffix_pos = outfile.find_last_of( "/" );
  string id_suffix = outfile;
  if( id_suffix_pos != string::npos ){
    id_suffix = id_suffix.substr( id_suffix_pos + 1 );
  }

  cout << "create_final_fasta" << endl;
  // print completed contigs to file
  output_contigs( 0, outfile, id_suffix );

  if( print_fused ){
    output_contigs( 1, outfile+"_fused", id_suffix );
  }

  if( log_output || screen_output ){
    Log::Inst()->close_log();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
addq $0x38, %rdi
leaq 0x42e2(%rip), %rsi      # 0x2c9a7
movq $-0x1, %rdx
callq 0x43b0
movq -0xe8(%rbp), %rsi
movq %rax, -0x10(%rbp)
addq $0x38, %rsi
leaq -0x30(%rbp), %rdi
callq 0x41b0
cmpq $-0x1, -0x10(%rbp)
je 0x28736
movq -0x10(%rbp), %rdx
incq %rdx
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movq $-0x1, %rcx
callq 0x43e0
jmp 0x2870d
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4480
leaq -0x50(%rbp), %rdi
callq 0x4270
jmp 0x28736
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x288e9
movq 0x15883(%rip), %rdi     # 0x3dfc0
leaq 0x4265(%rip), %rsi      # 0x2c9a9
callq 0x43c0
movq %rax, -0xf0(%rbp)
jmp 0x28752
movq -0xf0(%rbp), %rdi
movq 0x15830(%rip), %rsi     # 0x3df90
callq 0x43f0
jmp 0x28767
movq -0xe8(%rbp), %rsi
addq $0x38, %rsi
leaq -0x80(%rbp), %rdi
callq 0x41b0
jmp 0x2877d
leaq -0xa0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x41b0
jmp 0x2878f
movq -0xe8(%rbp), %rdi
xorl %esi, %esi
leaq -0x80(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
callq 0x283a0
jmp 0x287aa
leaq -0xa0(%rbp), %rdi
callq 0x4270
leaq -0x80(%rbp), %rdi
callq 0x4270
leaq 0x15f26(%rip), %rax     # 0x3e6ec
cmpl $0x0, (%rax)
je 0x288a1
movq -0xe8(%rbp), %rsi
addq $0x38, %rsi
leaq 0x3368(%rip), %rdx      # 0x2bb49
leaq -0xc0(%rbp), %rdi
callq 0xb230
jmp 0x287ef
leaq -0xe0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x41b0
jmp 0x28801
movq -0xe8(%rbp), %rdi
movl $0x1, %esi
leaq -0xc0(%rbp), %rdx
leaq -0xe0(%rbp), %rcx
callq 0x283a0
jmp 0x28822
leaq -0xe0(%rbp), %rdi
callq 0x4270
leaq -0xc0(%rbp), %rdi
callq 0x4270
jmp 0x288a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x28862
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x4270
leaq -0x80(%rbp), %rdi
callq 0x4270
jmp 0x288e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x28893
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x4270
leaq -0xc0(%rbp), %rdi
callq 0x4270
jmp 0x288e9
leaq 0x15e4c(%rip), %rax     # 0x3e6f4
cmpl $0x0, (%rax)
jne 0x288b9
leaq 0x15e3c(%rip), %rax     # 0x3e6f0
cmpl $0x0, (%rax)
je 0x288d7
callq 0x100d0
movq %rax, -0xf8(%rbp)
jmp 0x288c7
movq -0xf8(%rbp), %rdi
callq 0x101e0
jmp 0x288d5
jmp 0x288d7
leaq -0x30(%rbp), %rdi
callq 0x4270
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x4270
movq -0x58(%rbp), %rdi
callq 0x46c0
nopl (%rax,%rax)