// File: /workspace/github_cpp_makefile_star2_O2/ncbi[P]amr/seq.cpp
// Function: Seq_sp::SubstMat::char2score(char, char) const
AlignScore SubstMat::char2score (char c1,
                                 char c2) const
{ 
  QC_ASSERT (c1 >= '\0');
  QC_ASSERT (c2 >= '\0');
  
  if (strchr (peptideWildcards, c1))
    c1 = 'X';
  if (strchr (peptideWildcards, c2))
    c2 = 'X';

  const size_t i1 = (size_t) c1;
  const size_t i2 = (size_t) c2;
  QC_ASSERT (i1 < sim_size);
  QC_ASSERT (i2 < sim_size);

  if (   c1 == '-' 
      || c2 == '-'
     )
    return 0;
    
    
  if (! goodIndex (i1))
    throw runtime_error ("Bad amino acid: " + string (1, c1) + " (" + to_string (i1) + ")");
  if (! goodIndex (i2))
    throw runtime_error ("Bad amino acid: " + string (1, c2) + " (" + to_string (i2) + ")");
    
  const AlignScore s = sim [i1] [i2]; 
  ASSERT (s == s);
  return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
callq 0xc070
andl $0x0, (%rax)
testb %bl, %bl
js 0x4de62
testb %bpl, %bpl
js 0x4df36
movzbl %bpl, %ebp
movq 0x3be64(%rip), %r12     # 0x89c20
movq %r12, %rdi
movl %ebx, %esi
callq 0xc250
testq %rax, %rax
movzbl %bl, %r15d
pushq $0x58
popq %rbx
cmovnel %ebx, %r15d
movq %r12, %rdi
movl %ebp, %esi
callq 0xc250
testq %rax, %rax
cmovel %ebp, %ebx
cmpb $0x2d, %r15b
sete %al
cmpb $0x2d, %bl
sete %cl
orb %al, %cl
xorpd %xmm0, %xmm0
jne 0x4de52
movl $0xff, %eax
andl %eax, %r15d
movl %r15d, %ecx
shll $0xa, %ecx
addq %r14, %rcx
addq $0x8, %rcx
movsd (%rcx,%r15,8), %xmm0
ucomisd %xmm0, %xmm0
jp 0x4e00a
andl %eax, %ebx
addq $0x8, %r14
movl %ebx, %eax
shll $0xa, %eax
addq %r14, %rax
movsd (%rax,%rbx,8), %xmm0
ucomisd %xmm0, %xmm0
jp 0x4e0cb
shll $0xa, %r15d
addq %r15, %r14
movsd (%r14,%rbx,8), %xmm0
ucomisd %xmm0, %xmm0
jp 0x4e186
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0xc6d0
testl %eax, %eax
jne 0x4e25a
leaq 0x1519c(%rip), %rsi     # 0x63012
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xdbbe
leaq 0x30(%rsp), %rdi
movl $0xd04, %esi            # imm = 0xD04
callq 0xe2d5
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0xe26e
leaq 0x10322(%rip), %rdx     # 0x5e1d1
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xe24f
leaq 0x15a42(%rip), %rsi     # 0x63907
leaq 0xd0(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xdbbe
leaq 0x109ee(%rip), %rdx     # 0x5e8cc
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0xe24f
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0xe26e
leaq 0x15a2d(%rip), %rdx     # 0x63941
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xe24f
leaq 0xb0(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x4e25a
leaq 0x150c8(%rip), %rsi     # 0x63012
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xdbbe
leaq 0x30(%rsp), %rdi
movl $0xd05, %esi            # imm = 0xD05
callq 0xe2d5
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0xe26e
leaq 0x1024e(%rip), %rdx     # 0x5e1d1
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xe24f
leaq 0x1596e(%rip), %rsi     # 0x63907
leaq 0xd0(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xdbbe
leaq 0x1091a(%rip), %rdx     # 0x5e8cc
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0xe24f
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0xe26e
leaq 0x15964(%rip), %rdx     # 0x6394c
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xe24f
leaq 0xb0(%rsp), %rdi
callq 0x101d0
pushq $0x10
popq %rdi
callq 0xc310
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movsbl %r15b, %edx
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0xc680
leaq 0x15921(%rip), %rsi     # 0x63957
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe819
leaq 0x12701(%rip), %rdx     # 0x6074d
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xe24f
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0xe83d
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0xe26e
leaq 0x14033(%rip), %rdx     # 0x620b9
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xe24f
movb $0x1, %bpl
leaq 0xb0(%rsp), %rsi
movq %r14, %rdi
callq 0xc990
xorl %ebp, %ebp
movq 0x3af39(%rip), %rsi     # 0x88ff0
movq 0x3aeaa(%rip), %rdx     # 0x88f68
movq %r14, %rdi
callq 0xca40
jmp 0x4e186
pushq $0x10
popq %rdi
callq 0xc310
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movsbl %bl, %edx
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0xc680
leaq 0x15861(%rip), %rsi     # 0x63957
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xe819
leaq 0x12641(%rip), %rdx     # 0x6074d
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xe24f
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xe83d
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0xe26e
leaq 0x13f73(%rip), %rdx     # 0x620b9
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xe24f
movb $0x1, %bpl
leaq 0xb0(%rsp), %rsi
movq %r14, %rdi
callq 0xc990
xorl %ebp, %ebp
movq 0x3ae79(%rip), %rsi     # 0x88ff0
movq 0x3adea(%rip), %rdx     # 0x88f68
movq %r14, %rdi
callq 0xca40
callq 0xc6d0
testl %eax, %eax
jne 0x4e25a
leaq 0x14e78(%rip), %rsi     # 0x63012
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xdbbe
leaq 0x30(%rsp), %rdi
movl $0xd1d, %esi            # imm = 0xD1D
callq 0xe2d5
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0xe26e
leaq 0xfffe(%rip), %rdx      # 0x5e1d1
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xe24f
leaq 0x1571e(%rip), %rsi     # 0x63907
leaq 0xd0(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xdbbe
leaq 0x106ca(%rip), %rdx     # 0x5e8cc
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0xe24f
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0xe26e
leaq 0x15730(%rip), %rdx     # 0x63968
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xe24f
leaq 0xb0(%rsp), %rdi
callq 0x101d0
pushq $0x1
popq %rdi
callq 0xc6f0
jmp 0x4e26c
jmp 0x4e27e
jmp 0x4e294
jmp 0x4e26c
jmp 0x4e27e
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xcbe8
jmp 0x4e281
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0xcbe8
jmp 0x4e297
jmp 0x4e2d5
jmp 0x4e294
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0xcbe8
jmp 0x4e2d8
jmp 0x4e2ff
jmp 0x4e2ac
jmp 0x4e2be
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xcbe8
jmp 0x4e2c4
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x90(%rsp), %rdi
callq 0xcbe8
jmp 0x4e2f1
jmp 0x4e2d5
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0xcbe8
jmp 0x4e302
jmp 0x4e326
jmp 0x4e2eb
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x30(%rsp), %rdi
callq 0xcbe8
jmp 0x4e318
jmp 0x4e2ff
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xcbe8
jmp 0x4e329
jmp 0x4e34d
jmp 0x4e312
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x70(%rsp), %rdi
callq 0xcbe8
jmp 0x4e33f
jmp 0x4e326
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xcbe8
jmp 0x4e350
jmp 0x4e379
jmp 0x4e339
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x50(%rsp), %rdi
callq 0xcbe8
jmp 0x4e366
jmp 0x4e34d
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xcbe8
jmp 0x4e37c
jmp 0x4e399
jmp 0x4e360
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0xcbe8
testb %bpl, %bpl
jne 0x4e38d
jmp 0x4e39c
jmp 0x4e379
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xcbe8
jmp 0x4e39c
jmp 0x4e38a
movq %rax, %rbx
movq %r14, %rdi
callq 0xc470
jmp 0x4e39c
jmp 0x4e399
movq %rax, %rbx
movq %rbx, %rdi
callq 0xcaa0