// File: /workspace/github_cpp_makefile_star2_O2/ncbi[P]amr/amr_report.cpp
// Function: (anonymous namespace)::BlastAlignment::matchesCds((anonymous namespace)::BlastAlignment const&) const
bool matchesCds (const BlastAlignment &other) const
    { ASSERT (targetProt);
    	ASSERT (! other. targetProt);
    	ASSERT (! cdss. empty ());
    	for (const Locus& cds : cdss)
    		if (   cds. contig == other. targetName
    			  && cds. strand == other. targetStrand
    			  && ! cds. crossOrigin
    			 )
    		{ size_t protStart = cds. start;
    			size_t protStop  = cds. stop;
    			if (cds. strand)
    			{
    				ASSERT (protStop > 3);
    				protStop -= 3;
    			}
    			else
    			  protStart += 3;
    			ASSERT (protStart < protStop);
    			const size_t dnaStart  = other. targetStart;
    			const size_t dnaStop   = other. targetEnd;
    			ASSERT (dnaStart < dnaStop);
    		#if 0
    		  // PD-2271: partial 
    		  // use truncated(cds) ??
    			if (cds. strand)  // Checking frames
    			{ if (difference (protStart, dnaStart) > 3 && protStart % 3 != dnaStart % 3)
    			    continue;
    			}
    			else
    			  if (difference (protStop, dnaStop) > 3 && protStop % 3 != dnaStop % 3)
    			    continue;
    		#endif
    		#if 0  // PD-2099
    			if (cds. strand)  // PD-1902
    			{ if (protStop != dnaStop)
    				  continue;
    			}
    		  else
    				if (protStart != dnaStart)
    				  continue;
    		#endif
    			const size_t intersectionStart = max (protStart, dnaStart);
    			const size_t intersectionStop  = min (protStop,  dnaStop);
    			const size_t unionStart        = min (protStart, dnaStart);
    			const size_t unionStop         = max (protStop,  dnaStop);
    			if (   (   intersectionStart < intersectionStop
    				      && double (intersectionStop - intersectionStart) / double (protStop - protStart) > 0.75  // PAR, PD-2320
    				     )
    				  || (intersectionStart - unionStart) + (unionStop - intersectionStop) <= 60 * 3  // PAR, PD-4169
    				  || (   protStart <= dnaStart + mismatchTail_aa * 3 
    				      && dnaStop   <= protStop + mismatchTail_aa * 3 
    				      && other. partial ()
    				     )
    				  || (   dnaStart <= protStart + mismatchTail_aa * 3 
    				      && protStop <= dnaStop   + mismatchTail_aa * 3 
    				      && partial ()
    				     )
    				 )
    				return true;
    		}
    	return false;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rsi, %rbx
movq %rdi, %r14
callq 0xb060
movq %rax, 0x120(%rsp)
andl $0x0, (%rax)
movq %r14, 0x118(%rsp)
cmpb $0x0, 0x8(%r14)
je 0x23599
cmpb $0x1, 0x8(%rbx)
je 0x2366d
movq 0x118(%rsp), %rax
movq 0x3b8(%rax), %r14
movq 0x3c0(%rax), %rax
movq %rax, 0x128(%rsp)
cmpq %rax, %r14
je 0x23741
movq %rbx, 0x110(%rsp)
leaq 0x10(%rbx), %rax
movq %rax, 0x130(%rsp)
cmpq 0x128(%rsp), %r14
je 0x23300
leaq 0x8(%r14), %r13
movq %r13, %rdi
movq 0x130(%rsp), %rsi
callq 0x27a6c
testb %al, %al
je 0x232f1
movb 0x38(%r14), %al
movq 0x110(%rsp), %rcx
cmpb 0x68(%rcx), %al
jne 0x232f1
cmpb $0x0, 0x48(%r14)
jne 0x232f1
movq 0x28(%r14), %rbx
movq 0x30(%r14), %r15
testb %al, %al
je 0x231e0
movq 0x120(%rsp), %rax
andl $0x0, (%rax)
cmpq $0x3, %r15
jbe 0x234c5
addq $-0x3, %r15
jmp 0x231e4
addq $0x3, %rbx
movq 0x120(%rsp), %rax
andl $0x0, (%rax)
movq %r15, %rdx
subq %rbx, %rdx
jbe 0x2331d
movq 0x110(%rsp), %rax
movq 0x50(%rax), %rbp
movq 0x58(%rax), %r12
cmpq %r12, %rbp
jae 0x233f1
cmpq %rbp, %rbx
movq %rbp, %rax
cmovaq %rbx, %rax
cmpq %r15, %r12
movq %r15, %rcx
cmovbq %r12, %rcx
cmpq %rbx, %rbp
movq %rbx, %rsi
cmovbq %rbp, %rsi
cmpq %r12, %r15
movq %r12, %rdi
cmovaq %r15, %rdi
movq %rcx, %r8
subq %rax, %r8
jbe 0x23294
movq %r8, %xmm0
movq 0x45e1f(%rip), %xmm2    # 0x69070
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x45e23(%rip), %xmm3    # 0x69080
subpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movq %rdx, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
divsd %xmm2, %xmm1
ucomisd 0x45db6(%rip), %xmm1    # 0x69048
ja 0x23300
addq %rcx, %rsi
subq %rsi, %rax
addq %rdi, %rax
cmpq $0xb5, %rax
jb 0x23300
leaq 0x1e(%rbp), %rax
cmpq %rax, %rbx
ja 0x232c8
leaq 0x1e(%r15), %rax
cmpq %rax, %r12
ja 0x232c8
movq 0x110(%rsp), %rdi
callq 0x2056c
testb %al, %al
jne 0x23300
addq $0x1e, %rbx
cmpq %rbx, %rbp
seta %al
addq $0x1e, %r12
cmpq %r12, %r15
seta %cl
orb %al, %cl
jne 0x232f1
movq 0x118(%rsp), %rdi
callq 0x2056c
testb %al, %al
jne 0x23300
addq $0x88, %r13
movq %r13, %r14
jmp 0x2316f
cmpq 0x128(%rsp), %r14
setne %al
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xb680
testl %eax, %eax
jne 0x23815
leaq 0x465f6(%rip), %rsi     # 0x69927
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x27230
leaq 0x50(%rsp), %rdi
movl $0x435, %esi            # imm = 0x435
callq 0x279bd
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x27956
leaq 0x465d2(%rip), %rdx     # 0x6993f
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x273ec
leaq 0x47a31(%rip), %rsi     # 0x6adba
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x27230
leaq 0x46a71(%rip), %rdx     # 0x69e10
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x273ec
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x27956
leaq 0x47a72(%rip), %rdx     # 0x6ae41
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x273ec
leaq 0xf0(%rsp), %rdi
callq 0x2f08c
callq 0xb680
testl %eax, %eax
jne 0x23815
leaq 0x46522(%rip), %rsi     # 0x69927
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x27230
leaq 0x50(%rsp), %rdi
movl $0x438, %esi            # imm = 0x438
callq 0x279bd
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x27956
leaq 0x464fe(%rip), %rdx     # 0x6993f
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x273ec
leaq 0x4795d(%rip), %rsi     # 0x6adba
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x27230
leaq 0x4699d(%rip), %rdx     # 0x69e10
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x273ec
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x27956
leaq 0x479b3(%rip), %rdx     # 0x6ae56
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x273ec
leaq 0xf0(%rsp), %rdi
callq 0x2f08c
callq 0xb680
testl %eax, %eax
jne 0x23815
leaq 0x4644e(%rip), %rsi     # 0x69927
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x27230
leaq 0x50(%rsp), %rdi
movl $0x430, %esi            # imm = 0x430
callq 0x279bd
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x27956
leaq 0x4642a(%rip), %rdx     # 0x6993f
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x273ec
leaq 0x47889(%rip), %rsi     # 0x6adba
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x27230
leaq 0x468c9(%rip), %rdx     # 0x69e10
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x273ec
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x27956
leaq 0x478bd(%rip), %rdx     # 0x6ae34
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x273ec
leaq 0xf0(%rsp), %rdi
callq 0x2f08c
callq 0xb680
testl %eax, %eax
jne 0x23815
leaq 0x4637a(%rip), %rsi     # 0x69927
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x27230
leaq 0x50(%rsp), %rdi
movl $0x424, %esi            # imm = 0x424
callq 0x279bd
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x27956
leaq 0x46356(%rip), %rdx     # 0x6993f
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x273ec
leaq 0x477b5(%rip), %rsi     # 0x6adba
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x27230
leaq 0x467f5(%rip), %rdx     # 0x69e10
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x273ec
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x27956
leaq 0x4cfb1(%rip), %rdx     # 0x705fc
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x273ec
leaq 0xf0(%rsp), %rdi
callq 0x2f08c
callq 0xb680
testl %eax, %eax
jne 0x23815
leaq 0x462a6(%rip), %rsi     # 0x69927
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x27230
leaq 0x50(%rsp), %rdi
movl $0x425, %esi            # imm = 0x425
callq 0x279bd
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x27956
leaq 0x46282(%rip), %rdx     # 0x6993f
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x273ec
leaq 0x476e1(%rip), %rsi     # 0x6adba
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x27230
leaq 0x46721(%rip), %rdx     # 0x69e10
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x273ec
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x27956
leaq 0x476f0(%rip), %rdx     # 0x6ae0f
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x273ec
leaq 0xf0(%rsp), %rdi
callq 0x2f08c
callq 0xb680
testl %eax, %eax
jne 0x23815
leaq 0x461d2(%rip), %rsi     # 0x69927
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x27230
leaq 0x50(%rsp), %rdi
movl $0x426, %esi            # imm = 0x426
callq 0x279bd
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x27956
leaq 0x461ae(%rip), %rdx     # 0x6993f
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x273ec
leaq 0x4760d(%rip), %rsi     # 0x6adba
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x27230
leaq 0x4664d(%rip), %rdx     # 0x69e10
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x273ec
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x27956
leaq 0x47630(%rip), %rdx     # 0x6ae23
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x273ec
leaq 0xf0(%rsp), %rdi
callq 0x2f08c
pushq $0x1
popq %rdi
callq 0xb690
jmp 0x23837
jmp 0x23849
jmp 0x23837
jmp 0x23849
jmp 0x23837
jmp 0x23849
jmp 0x23837
jmp 0x23849
jmp 0x23865
jmp 0x23865
jmp 0x23865
jmp 0x23837
jmp 0x23849
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0xbb38
jmp 0x2384c
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0xbb38
jmp 0x23868
jmp 0x23865
jmp 0x2387e
jmp 0x2387e
jmp 0x2387e
jmp 0x23865
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xbb38
jmp 0x23881
jmp 0x2387e
jmp 0x23897
jmp 0x23897
jmp 0x23897
jmp 0x2387e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xbb38
jmp 0x2389a
jmp 0x23897
jmp 0x238b3
jmp 0x238b3
jmp 0x238b3
jmp 0x23897
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xbb38
jmp 0x238b6
jmp 0x238b3
jmp 0x238cf
jmp 0x238cf
jmp 0x238cf
jmp 0x238b3
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0xbb38
jmp 0x238d2
jmp 0x238cf
jmp 0x238e8
jmp 0x238e8
jmp 0x238e8
jmp 0x238cf
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xbb38
jmp 0x238eb
jmp 0x238e8
jmp 0x238fb
jmp 0x238fb
jmp 0x238fb
jmp 0x238e8
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xbb38
jmp 0x238fe
jmp 0x238fb
jmp 0x238fb
movq %rax, %rbx
movq %rbx, %rdi
callq 0xb9f0