// File: /workspace/github_cpp_makefile_star2_O1/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 0x7b0cb
movl $0x0, (%rax)
movq 0x30(%r15), %rax
cmpq %r12, %rax
jb 0x7b16a
movq %r12, %rcx
orq %rbx, %rcx
cmovneq %r12, %rax
xorpd %xmm0, %xmm0
cmpq %rbx, %rax
jbe 0x7b0b9
movq 0x28(%r15), %rcx
addq $0x8, %r14
movsbq (%rcx,%rbx), %rdx
cmpq $0x2d, %rdx
je 0x7b0b1
movq %rdx, %rsi
shlq $0xa, %rsi
addq %r14, %rsi
addsd (%rsi,%rdx,8), %xmm0
incq %rbx
cmpq %rbx, %rax
jne 0x7b097
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xb6b0
testl %eax, %eax
jne 0x7b209
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1cf77(%rip), %rsi     # 0x98062
leaq 0x1cf80(%rip), %rdx     # 0x98072
leaq 0x88(%rsp), %rdi
callq 0xdc76
leaq 0xa8(%rsp), %rdi
movl $0xe16, %esi            # imm = 0xE16
callq 0xe1a8
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0xe100
leaq 0x1809c(%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 0x7b213
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x7b220
callq 0xb6b0
testl %eax, %eax
jne 0x7b209
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1ced8(%rip), %rsi     # 0x98062
leaq 0x1cee1(%rip), %rdx     # 0x98072
leaq 0x88(%rsp), %rdi
callq 0xdc76
leaq 0xa8(%rsp), %rdi
movl $0xe17, %esi            # imm = 0xE17
callq 0xe1a8
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0xe100
leaq 0x17ffd(%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 0x7b294
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x7b2a1
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 0x1da8c(%rip), %rsi     # 0x98cd5
leaq 0x1dad6(%rip), %rdx     # 0x98d26
leaq 0x68(%rsp), %rdi
callq 0xdc76
leaq 0x18650(%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 0x7b30e
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x7b31b
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 0x1da0b(%rip), %rsi     # 0x98cd5
leaq 0x1da55(%rip), %rdx     # 0x98d26
leaq 0x68(%rsp), %rdi
callq 0xdc76
leaq 0x185cf(%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 0x7b37e
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x7b38b
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 0xe100
leaq 0x1d753(%rip), %rsi     # 0x98aa3
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 0x7b3ee
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x7b3fb
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 0xe100
leaq 0x1d967(%rip), %rsi     # 0x98d27
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 0x7b41c
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x7b429
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 0x1151b
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 0x1151b
jmp 0x7b44e
jmp 0x7b46a
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7b46d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b46d
movq %rax, %rbx
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b495
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b495
jmp 0x7b492
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x7b4b3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b4b3
jmp 0x7b4b0
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x7b4d1
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b4d1
jmp 0x7b4ce
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7b4ef
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b4ef
jmp 0x7b4ec
movq %rax, %rbx
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b517
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b517
jmp 0x7b514
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b53f
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b53f
jmp 0x7b53c
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x7b563
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x7b563
jmp 0x7b560
movq %rax, %rbx
movq %rbx, %rdi
callq 0xba60
nop