// File: /workspace/github_cpp_makefile_star2_O1/afinit[P]afin/fusion.cpp
// Function: Fusion::get_mismatch_scores(bool)
vector<Mismatch> Fusion::get_mismatch_scores( bool first_run ){
  vector<Mismatch> match_list;
  int overlap_len = extend_len * 4;

  // loop through each contig to get the end of the contig
  for( int i=0; i<contigs->get_list_size(); i++ ){
    for( int j=i+1; j<contigs->get_list_size(); j++ ){
      string contig_i( contigs->get_contig(i).get_sequence() );
      string contig_j( contigs->get_contig(j).get_sequence() );
      string contig_j_rev( revcomp( contig_j ) );
      int overlap = overlap_len;
      Mismatch mim;

      if( first_run ){
        overlap = (contig_i.length() < contig_j.length()) ? contig_i.length() : contig_j.length();
      }
      else{
        if( overlap > contig_i.length() ){
          overlap = contig_i.length();
        }
        if( overlap > contig_j.length() ){
          overlap = contig_j.length();
        }
      }

      //// Processing of rear end of the contig
      // orientation: i to j
      mim = overlap_check( contig_i, contig_j, overlap, 1, 0 );

      if( mim.get_score() <= mismatch_threshold ){
        mim.set_indices( i, j );
        match_list.push_back( mim );
      }

      // orientation: i to j_rev
      mim = overlap_check( contig_i, contig_j_rev, overlap, 1, 1 );

      if( mim.get_score() <= mismatch_threshold ){
        mim.set_indices( i, j );
        match_list.push_back( mim );
      }

      //// Processing of front end of the contig
      // orientation: j to i
      mim = overlap_check( contig_j, contig_i, overlap, 0, 1);

      if( mim.get_score() <= mismatch_threshold ){
        mim.set_indices( i, j );
        match_list.push_back( mim );
      }

      // orientation: j_rev to i
      mim = overlap_check( contig_j_rev, contig_i, overlap, 0, 0 );

      if( mim.get_score() <= mismatch_threshold ){
        mim.set_indices( i, j );
        match_list.push_back( mim );
      }
    }
  }

  return match_list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl %edx, -0x60(%rbp)
movq %rsi, %r15
xorpd %xmm0, %xmm0
movupd %xmm0, (%rdi)
movq %rdi, -0x58(%rbp)
movq $0x0, 0x10(%rdi)
leaq 0x11c25(%rip), %rax     # 0x1d610
movslq (%rax), %rax
shlq $0x2, %rax
movq %rax, -0xc8(%rbp)
xorl %r14d, %r14d
movq (%r15), %rdi
callq 0x13c88
cmpl %eax, %r14d
jge 0xbfe5
leal 0x1(%r14), %r12d
movl %r12d, -0x5c(%rbp)
movq (%r15), %rdi
callq 0x13c88
cmpl %eax, %r12d
jge 0xbfda
movq (%r15), %rsi
leaq -0x238(%rbp), %r13
movq %r13, %rdi
movl %r14d, %edx
callq 0x13c48
leaq -0x80(%rbp), %rdi
movq %r13, %rsi
callq 0x5c7a
movq %r13, %rdi
callq 0x59a6
movq (%r15), %rsi
movq %r13, %rdi
movl %r12d, %edx
callq 0x13c48
leaq -0xa0(%rbp), %rdi
movq %r13, %rsi
callq 0x5c7a
movq %r13, %rdi
callq 0x59a6
leaq -0x1d8(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x6876
movq %r13, %rdi
movq %rbx, %rsi
callq 0x946c
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0xbac5
callq 0x42f0
leaq -0x50(%rbp), %rdi
callq 0x9558
cmpb $0x0, -0x60(%rbp)
je 0xbae8
movq -0x78(%rbp), %rax
movq -0x98(%rbp), %r13
cmpq %r13, %rax
cmovbq %rax, %r13
jmp 0xbb0a
movq -0x78(%rbp), %rax
movq -0xc8(%rbp), %rcx
cmpq %rcx, %rax
cmovael %ecx, %eax
movslq %eax, %r13
movq -0x98(%rbp), %rax
cmpq %r13, %rax
cmovbl %eax, %r13d
leaq -0x138(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
addq %rsi, %rdx
leaq -0x148(%rbp), %rdi
callq 0x6876
leaq -0x1b8(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1c8(%rbp), %rbx
movq %rbx, %rdi
callq 0x6876
movl $0x0, (%rsp)
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
leaq -0x148(%rbp), %rdx
movq %rbx, %rcx
movl %r13d, %r8d
movl $0x1, %r9d
callq 0xacc6
movupd -0xc0(%rbp), %xmm0
movupd -0xb4(%rbp), %xmm1
movupd %xmm1, -0x44(%rbp)
movapd %xmm0, -0x50(%rbp)
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0xbbb8
callq 0x42f0
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0xbbd0
callq 0x42f0
leaq -0x50(%rbp), %rdi
callq 0x95de
leaq 0x11a70(%rip), %rax     # 0x1d650
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jb 0xbc2d
leaq -0x50(%rbp), %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x95be
movq -0x58(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xbc24
movapd -0x50(%rbp), %xmm0
movapd -0x40(%rbp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x20, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xbc2d
leaq -0x50(%rbp), %rdx
callq 0xd792
leaq -0x118(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
addq %rsi, %rdx
leaq -0x128(%rbp), %rdi
callq 0x6876
leaq -0x198(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x238(%rbp), %rsi
movq -0x230(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1a8(%rbp), %rbx
movq %rbx, %rdi
callq 0x6876
movl $0x1, (%rsp)
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
leaq -0x128(%rbp), %rdx
movq %rbx, %rcx
movl %r13d, %r8d
movl $0x1, %r9d
callq 0xacc6
movupd -0xc0(%rbp), %xmm0
movupd -0xb4(%rbp), %xmm1
movupd %xmm1, -0x44(%rbp)
movapd %xmm0, -0x50(%rbp)
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0xbcdb
callq 0x42f0
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0xbcf3
callq 0x42f0
leaq -0x50(%rbp), %rdi
callq 0x95de
leaq 0x1194d(%rip), %rax     # 0x1d650
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jb 0xbd50
leaq -0x50(%rbp), %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x95be
movq -0x58(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xbd47
movapd -0x50(%rbp), %xmm0
movapd -0x40(%rbp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x20, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xbd50
leaq -0x50(%rbp), %rdx
callq 0xd792
leaq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
addq %rsi, %rdx
leaq -0x108(%rbp), %rdi
callq 0x6876
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
addq %rsi, %rdx
leaq -0x188(%rbp), %rbx
movq %rbx, %rdi
callq 0x6876
movl $0x1, (%rsp)
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
leaq -0x108(%rbp), %rdx
movq %rbx, %rcx
movl %r13d, %r8d
xorl %r9d, %r9d
callq 0xacc6
movupd -0xc0(%rbp), %xmm0
movupd -0xb4(%rbp), %xmm1
movupd %xmm1, -0x44(%rbp)
movapd %xmm0, -0x50(%rbp)
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0xbdfb
callq 0x42f0
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0xbe13
callq 0x42f0
leaq -0x50(%rbp), %rdi
callq 0x95de
leaq 0x1182d(%rip), %rax     # 0x1d650
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jb 0xbe70
leaq -0x50(%rbp), %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x95be
movq -0x58(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xbe67
movapd -0x50(%rbp), %xmm0
movapd -0x40(%rbp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x20, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xbe70
leaq -0x50(%rbp), %rdx
callq 0xd792
leaq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x238(%rbp), %rsi
movq -0x230(%rbp), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x6876
leaq -0x158(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rbx
movq %rbx, %rdi
callq 0x6876
movl $0x0, (%rsp)
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
leaq -0xe8(%rbp), %rdx
movq %rbx, %rcx
movl %r13d, %r8d
xorl %r9d, %r9d
callq 0xacc6
movupd -0xc0(%rbp), %xmm0
movupd -0xb4(%rbp), %xmm1
movupd %xmm1, -0x44(%rbp)
movapd %xmm0, -0x50(%rbp)
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0xbf1b
callq 0x42f0
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0xbf33
callq 0x42f0
leaq -0x50(%rbp), %rdi
callq 0x95de
leaq 0x1170d(%rip), %rax     # 0x1d650
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jb 0xbf90
leaq -0x50(%rbp), %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x95be
movq -0x58(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xbf87
movapd -0x50(%rbp), %xmm0
movapd -0x40(%rbp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x20, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xbf90
leaq -0x50(%rbp), %rdx
callq 0xd792
movq -0x238(%rbp), %rdi
leaq -0x228(%rbp), %rax
cmpq %rax, %rdi
je 0xbfa8
callq 0x42f0
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0xbfc0
callq 0x42f0
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0xbfd2
callq 0x42f0
incl %r12d
jmp 0xba15
movl -0x5c(%rbp), %eax
movl %eax, %r14d
jmp 0xb9fc
movq -0x58(%rbp), %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc125
jmp 0xc12a
movq %rax, %r14
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0xc05d
callq 0x42f0
jmp 0xc05d
jmp 0xc12a
movq %rax, %r14
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0xc047
callq 0x42f0
jmp 0xc047
movq %rax, %r14
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
jmp 0xc101
movq %rax, %r14
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
jmp 0xc101
movq %rax, %r14
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0xc0a4
callq 0x42f0
jmp 0xc0a4
movq %rax, %r14
leaq -0x238(%rbp), %rdi
callq 0x59a6
jmp 0xc15d
movq %rax, %r14
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
jmp 0xc101
jmp 0xc12a
movq %rax, %r14
jmp 0xc0f3
movq %rax, %r14
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
jmp 0xc13b
jmp 0xc12a
movq %rax, %r14
jmp 0xc15d
movq %rax, %r14
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0xc0f3
callq 0x42f0
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0xc12d
callq 0x42f0
jmp 0xc12d
movq %rax, %r14
leaq -0x238(%rbp), %rdi
callq 0x59a6
jmp 0xc16f
movq %rax, %r14
jmp 0xc145
jmp 0xc125
movq %rax, %r14
jmp 0xc16f
movq %rax, %r14
movq -0x238(%rbp), %rdi
leaq -0x228(%rbp), %rax
cmpq %rax, %rdi
je 0xc145
callq 0x42f0
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0xc15d
callq 0x42f0
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0xc16f
callq 0x42f0
movq -0x58(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xc180
callq 0x42f0
movq %r14, %rdi
callq 0x4590