// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/contig.cpp
// Function: Contig::extend(bool)
void Contig::extend( bool back ){
  string exten_seq("");
  string contig_sub("");
  string contig_end("");
 
  // get extension sequence through get_extension
  if( back ){
    contig_sub = contig.substr( contig.length() - ( contig_sub_len ) );
    contig_end = " rear ";
  }
  else{
    contig_sub = contig.substr( 0, contig_sub_len );
    contig_end = " front ";
  }

  exten_seq = extension->get_extension( contig_sub, back );
  
  if( verbose ){
    lock_guard<mutex> lk_g(log_mut);
    Log::Inst()->log_it( contig_id + contig_end + "extension: " + exten_seq );
  }

  if( exten_seq.length() == 0 ){
    return;
  }

  if( back ){
    contig.append( exten_seq );
  }
  else{
    contig.insert( 0, exten_seq );
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %esi, %ebx
movq %rdi, %r15
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x10236(%rip), %r14     # 0x15f4c
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x6be0
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x6be0
leaq -0xa0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x101fb(%rip), %rdx     # 0x15f4c
leaq -0xb0(%rbp), %rdi
movq %rdx, %rsi
callq 0x6be0
leaq 0x10(%r15), %rsi
testb %bl, %bl
movq %rsi, -0x50(%rbp)
je 0x5dc1
movq 0x18(%r15), %rdx
leaq 0x17895(%rip), %rax     # 0x1d60c
movslq (%rax), %rax
subq %rax, %rdx
leaq -0x48(%rbp), %rdi
movq $-0x1, %rcx
callq 0x4330
leaq -0x90(%rbp), %rdi
leaq -0x48(%rbp), %r12
movq %r12, %rsi
callq 0x43b0
movq (%r12), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x5db2
callq 0x42f0
movl $0x6, %r8d
leaq 0xfe2f(%rip), %rcx      # 0x15bee
jmp 0x5e08
leaq 0x17844(%rip), %rax     # 0x1d60c
movslq (%rax), %rcx
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq 0x4330
leaq -0x90(%rbp), %rdi
leaq -0x48(%rbp), %r12
movq %r12, %rsi
callq 0x43b0
movq (%r12), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x5dfb
callq 0x42f0
movl $0x7, %r8d
leaq 0xfded(%rip), %rcx      # 0x15bf5
leaq -0xb0(%rbp), %rdi
movq 0x8(%rdi), %rdx
xorl %esi, %esi
callq 0x44f0
movq 0x8(%r15), %r12
leaq -0xe0(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x68f6
movzbl %bl, %ecx
leaq -0x48(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
movq %r12, %rsi
callq 0x12d28
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %r12
movq %r12, %rsi
callq 0x43b0
movq (%r12), %rdi
leaq -0x38(%rbp), %r13
cmpq %r13, %rdi
je 0x5e7e
callq 0x42f0
movq -0xf0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5e8f
callq 0x42f0
leaq 0x177b2(%rip), %rax     # 0x1d648
cmpl $0x0, (%rax)
je 0x5fd2
leaq 0x177b2(%rip), %rdi     # 0x1d658
callq 0x4490
testl %eax, %eax
jne 0x6052
callq 0x9692
movq %rax, %r12
addq $0x30, %r15
leaq -0x110(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
movq %r15, %rsi
callq 0x63b4
leaq 0xfd21(%rip), %rsi      # 0x15bfd
leaq -0x110(%rbp), %rdi
callq 0x45f0
movq %r13, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5f08
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x5f10
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x40f0
leaq -0xc0(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5f65
movq %rdx, -0xd0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xc0(%rbp)
jmp 0x5f6c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0xd0(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r12, %rdi
callq 0x98ba
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5fa3
callq 0x42f0
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x5fb1
callq 0x42f0
leaq -0x100(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5fc6
callq 0x42f0
leaq 0x1768b(%rip), %rdi     # 0x1d658
callq 0x4260
movq -0x68(%rbp), %r8
testq %r8, %r8
je 0x6001
movq -0x70(%rbp), %rcx
testb %bl, %bl
je 0x5ff4
movq -0x50(%rbp), %rdi
movq %rcx, %rsi
movq %r8, %rdx
callq 0x40f0
jmp 0x6001
movq -0x50(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4350
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x6019
callq 0x42f0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x602e
callq 0x42f0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x6040
callq 0x42f0
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x41f0
jmp 0x60d7
jmp 0x60d7
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0x6076
callq 0x42f0
jmp 0x6076
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x6089
callq 0x42f0
jmp 0x6089
movq %rax, %rbx
leaq -0x100(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x60a5
callq 0x42f0
jmp 0x60a5
jmp 0x60a2
movq %rax, %rbx
leaq 0x175ac(%rip), %rdi     # 0x1d658
callq 0x4260
jmp 0x60da
jmp 0x60d7
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
cmpq %r14, %rdi
je 0x60da
callq 0x42f0
jmp 0x60da
jmp 0x60d7
movq %rax, %rbx
jmp 0x60f2
movq %rax, %rbx
jmp 0x6107
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x60f2
callq 0x42f0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x6107
callq 0x42f0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x6119
callq 0x42f0
movq %rbx, %rdi
callq 0x4590
nop