// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xb070
movl $0x0, (%rax)
cmpq %r12, %rbx
ja 0x7ad11
movq 0x30(%r15), %rax
cmpq %r12, %rax
jb 0x7adb0
movq %r12, %rcx
orq %rbx, %rcx
cmovneq %r12, %rax
xorpd %xmm0, %xmm0
cmpq %rbx, %rax
jbe 0x7acff
movq 0x28(%r15), %rcx
addq $0x8, %r14
movsbq (%rcx,%rbx), %rdx
cmpq $0x2d, %rdx
je 0x7acf7
movq %rdx, %rsi
shlq $0xa, %rsi
addq %r14, %rsi
addsd (%rsi,%rdx,8), %xmm0
incq %rbx
cmpq %rbx, %rax
jne 0x7acdd
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xb6b0
testl %eax, %eax
jne 0x7ae4f
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1d321(%rip), %rsi     # 0x98052
leaq 0x1d32a(%rip), %rdx     # 0x98062
leaq 0x88(%rsp), %rdi
callq 0xdc76
leaq 0xa8(%rsp), %rdi
movl $0xe16, %esi            # imm = 0xE16
callq 0xe1b2
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0xe10a
leaq 0x18456(%rip), %rsi     # 0x931d1
leaq 0xc8(%rsp), %rdi
callq 0xbb10
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x7ae59
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x7ae66
callq 0xb6b0
testl %eax, %eax
jne 0x7ae4f
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1d282(%rip), %rsi     # 0x98052
leaq 0x1d28b(%rip), %rdx     # 0x98062
leaq 0x88(%rsp), %rdi
callq 0xdc76
leaq 0xa8(%rsp), %rdi
movl $0xe17, %esi            # imm = 0xE17
callq 0xe1b2
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0xe10a
leaq 0x183b7(%rip), %rsi     # 0x931d1
leaq 0xc8(%rsp), %rdi
callq 0xbb10
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x7aeda
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x7aee7
movl $0x1, %edi
callq 0xb6d0
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1de36(%rip), %rsi     # 0x98cc5
leaq 0x1de80(%rip), %rdx     # 0x98d16
leaq 0x68(%rsp), %rdi
callq 0xdc76
leaq 0x18a0a(%rip), %rsi     # 0x938b1
leaq 0x68(%rsp), %rdi
callq 0xbb10
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x7af54
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x7af61
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1ddb5(%rip), %rsi     # 0x98cc5
leaq 0x1ddff(%rip), %rdx     # 0x98d16
leaq 0x68(%rsp), %rdi
callq 0xdc76
leaq 0x18989(%rip), %rsi     # 0x938b1
leaq 0x68(%rsp), %rdi
callq 0xbb10
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x7afc4
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x7afd1
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rsi
leaq 0x28(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xe8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe10a
leaq 0x1dafd(%rip), %rsi     # 0x98a93
leaq 0xe8(%rsp), %rdi
callq 0xbb10
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x7b034
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x7b041
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rsi
leaq 0x28(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xe8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe10a
leaq 0x1dd11(%rip), %rsi     # 0x98d17
leaq 0xe8(%rsp), %rdi
callq 0xbb10
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x7b062
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x7b06f
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x1155a
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x1155a
jmp 0x7b094
jmp 0x7b0b0
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7b0b3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b0b3
movq %rax, %rbx
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b0db
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b0db
jmp 0x7b0d8
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x7b0f9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b0f9
jmp 0x7b0f6
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x7b117
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b117
jmp 0x7b114
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7b135
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b135
jmp 0x7b132
movq %rax, %rbx
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b15d
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b15d
jmp 0x7b15a
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b185
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b185
jmp 0x7b182
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x7b1a9
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b1a9
jmp 0x7b1a6
movq %rax, %rbx
movq %rbx, %rdi
callq 0xba60
nop