// File: /workspace/github_cpp_makefile_star2_O2/ncbi[P]amr/seq.cpp
// Function: Seq_sp::Peptide::getSelfSimilarity(Seq_sp::SubstMat const&, unsigned long, unsigned long) const
double Peptide::getSelfSimilarity (const SubstMat &mat,
                                   size_t start,
                                   size_t stop) const
{
  ASSERT (start <= stop);
  ASSERT (stop <= seq. size ());
  
  if (! start && ! stop)
    stop = seq. size ();
  
  double s = 0.0;
  FOR_START (size_t, i, start, stop)
  {
    const char c = seq [i];
    if (c != '-')
      s += mat. sim [(size_t) c] [(size_t) c];
  }

  return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
callq 0xc070
andl $0x0, (%rax)
cmpq %r15, %rbx
ja 0x504ef
movq 0x30(%r12), %rax
cmpq %r15, %rax
jb 0x505c3
movq %r15, %rcx
orq %rbx, %rcx
cmovneq %r15, %rax
movq 0x28(%r12), %rcx
addq $0x8, %r14
xorpd %xmm0, %xmm0
cmpq %rax, %rbx
jae 0x504e0
movsbq (%rcx,%rbx), %rdx
cmpq $0x2d, %rdx
je 0x504db
movq %rdx, %rsi
shlq $0xa, %rsi
addq %r14, %rsi
addsd (%rsi,%rdx,8), %xmm0
incq %rbx
jmp 0x504bc
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0xc6d0
testl %eax, %eax
jne 0x50697
leaq 0x12b0f(%rip), %rsi     # 0x63012
leaq 0x68(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0x48(%rsp), %rdi
movl $0xe16, %esi            # imm = 0xE16
callq 0xe2d5
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xe26e
leaq 0xdc92(%rip), %rdx      # 0x5e1d1
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xe24f
leaq 0x1373b(%rip), %rsi     # 0x63c96
leaq 0x8(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0xe35b(%rip), %rdx      # 0x5e8cc
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe24f
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0xe26e
leaq 0x134c3(%rip), %rdx     # 0x63a64
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0xe24f
leaq 0xe8(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x50697
leaq 0x12a3b(%rip), %rsi     # 0x63012
leaq 0x68(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0x48(%rsp), %rdi
movl $0xe17, %esi            # imm = 0xE17
callq 0xe2d5
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xe26e
leaq 0xdbbe(%rip), %rdx      # 0x5e1d1
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xe24f
leaq 0x13667(%rip), %rsi     # 0x63c96
leaq 0x8(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0xe287(%rip), %rdx      # 0x5e8cc
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe24f
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0xe26e
leaq 0x13673(%rip), %rdx     # 0x63ce8
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0xe24f
leaq 0xe8(%rsp), %rdi
callq 0x101d0
pushq $0x1
popq %rdi
callq 0xc6f0
jmp 0x506a3
jmp 0x506b5
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0xcbe8
jmp 0x506b8
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0xcbe8
jmp 0x506cc
jmp 0x506c9
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xcbe8
jmp 0x506dd
jmp 0x506da
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xcbe8
jmp 0x506ee
jmp 0x506eb
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xcbe8
jmp 0x50702
jmp 0x506ff
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xcbe8
jmp 0x50716
jmp 0x50713
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xcbe8
jmp 0x50727
jmp 0x50724
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xcbe8
jmp 0x50738
jmp 0x50735
movq %rax, %rbx
movq %rbx, %rdi
callq 0xcaa0