// File: afinit[P]afin/fusion.cpp
// Function: Fusion::commit_fusion(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
void Fusion::commit_fusion( string fused, string fused_id, int index_i, int index_j ){ 
  contigs->append_contig( 1, contigs->get_contig(index_i) );
  Log::Inst()->log_it( "Contig moved to fused file: " + contigs->get_contig(index_i).get_contig_id() );

  contigs->append_contig( 1, contigs->get_contig(index_j) );
  Log::Inst()->log_it( "Contig moved to fused file: " + contigs->get_contig(index_j).get_contig_id() );

  Log::Inst()->log_it( "Committing: " + fused_id );
  Log::Inst()->log_it( "\t" + fused );
  contigs->append_contig( 0, Contig( reads, fused, fused_id ));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movq %rsi, -0x2e8(%rbp)
movq %rdx, -0x2e0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movq (%rax), %rsi
movq %rsi, -0x2d0(%rbp)
movl -0x1c(%rbp), %edx
leaq -0x70(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x28150
movq -0x2d0(%rbp), %rdi
movq -0x2c8(%rbp), %rdx
movl $0x1, %esi
callq 0x28250
jmp 0x11a9e
leaq -0x70(%rbp), %rdi
callq 0x5b00
callq 0x100d0
movq %rax, %rcx
movq -0x2d8(%rbp), %rax
movq %rcx, -0x2f8(%rbp)
movq (%rax), %rsi
movl -0x1c(%rbp), %edx
leaq -0x110(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x28150
movq -0x2f0(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x5e80
jmp 0x11aeb
leaq 0x1a8e2(%rip), %rsi     # 0x2c3d4
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0xb2b0
jmp 0x11b07
movq -0x2f8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x10460
jmp 0x11b1c
leaq -0xa0(%rbp), %rdi
callq 0x4270
leaq -0xc0(%rbp), %rdi
callq 0x4270
leaq -0x110(%rbp), %rdi
callq 0x5b00
movq -0x2d8(%rbp), %rax
movq (%rax), %rsi
movq %rsi, -0x308(%rbp)
movl -0x20(%rbp), %edx
leaq -0x160(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x28150
movq -0x308(%rbp), %rdi
movq -0x300(%rbp), %rdx
movl $0x1, %esi
callq 0x28250
jmp 0x11b81
leaq -0x160(%rbp), %rdi
callq 0x5b00
callq 0x100d0
movq %rax, %rcx
movq -0x2d8(%rbp), %rax
movq %rcx, -0x318(%rbp)
movq (%rax), %rsi
movl -0x20(%rbp), %edx
leaq -0x1f0(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x28150
movq -0x310(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
callq 0x5e80
jmp 0x11bd1
leaq 0x1a7fc(%rip), %rsi     # 0x2c3d4
leaq -0x180(%rbp), %rdi
leaq -0x1a0(%rbp), %rdx
callq 0xb2b0
jmp 0x11bed
movq -0x318(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x10460
jmp 0x11c02
leaq -0x180(%rbp), %rdi
callq 0x4270
leaq -0x1a0(%rbp), %rdi
callq 0x4270
leaq -0x1f0(%rbp), %rdi
callq 0x5b00
callq 0x100d0
movq -0x2e0(%rbp), %rdx
movq %rax, -0x328(%rbp)
leaq 0x1a7b1(%rip), %rsi     # 0x2c3f1
leaq -0x210(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x152c0
movq -0x328(%rbp), %rdi
movq -0x320(%rbp), %rsi
callq 0x10460
jmp 0x11c68
leaq -0x210(%rbp), %rdi
callq 0x4270
callq 0x100d0
movq -0x2e8(%rbp), %rdx
movq %rax, -0x338(%rbp)
leaq 0x1a529(%rip), %rsi     # 0x2c1b7
leaq -0x230(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x152c0
movq -0x338(%rbp), %rdi
movq -0x330(%rbp), %rsi
callq 0x10460
jmp 0x11cb6
leaq -0x230(%rbp), %rdi
callq 0x4270
movq -0x2d8(%rbp), %rax
movq -0x2e8(%rbp), %rsi
movq (%rax), %rcx
movq %rcx, -0x348(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x340(%rbp)
leaq -0x2a0(%rbp), %rdi
callq 0x41b0
movq -0x2e0(%rbp), %rsi
leaq -0x2c0(%rbp), %rdi
callq 0x41b0
jmp 0x11d06
movq -0x340(%rbp), %rsi
leaq -0x280(%rbp), %rdi
leaq -0x2a0(%rbp), %rdx
leaq -0x2c0(%rbp), %rcx
callq 0x5a20
jmp 0x11d29
movq -0x348(%rbp), %rdi
xorl %esi, %esi
leaq -0x280(%rbp), %rdx
callq 0x28250
jmp 0x11d40
leaq -0x280(%rbp), %rdi
callq 0x5b00
leaq -0x2c0(%rbp), %rdi
callq 0x4270
leaq -0x2a0(%rbp), %rdi
callq 0x4270
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5b00
jmp 0x11ec6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x11dc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x11dbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x4270
leaq -0xc0(%rbp), %rdi
callq 0x4270
leaq -0x110(%rbp), %rdi
callq 0x5b00
jmp 0x11ec6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x5b00
jmp 0x11ec6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x11e35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x11e29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x4270
leaq -0x1a0(%rbp), %rdi
callq 0x4270
leaq -0x1f0(%rbp), %rdi
callq 0x5b00
jmp 0x11ec6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x4270
jmp 0x11ec6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x4270
jmp 0x11ec6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x11eba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x11eae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x5b00
leaq -0x2c0(%rbp), %rdi
callq 0x4270
leaq -0x2a0(%rbp), %rdi
callq 0x4270
movq -0x78(%rbp), %rdi
callq 0x46c0
nop