// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./aligner.h
// Function: PairedBWAlignerV1<EbwtRangeSource>::report(Range const&, Range const&, unsigned int, unsigned int, unsigned int, unsigned int, bool, bool, bool)
bool report(const Range& rL, // range for upstream mate
	            const Range& rR, // range for downstream mate
	            TIndexOffU first,  // ref idx
	            TIndexOffU upstreamOff, // offset for upstream mate
	            TIndexOffU dnstreamOff, // offset for downstream mate
	            TIndexOffU tlen, // length of ref
	            bool pairFw,   // whether the pair is being mapped to fw strand
	            bool ebwtFwL,
	            bool ebwtFwR)
	{
		assert(gAllowMateContainment || upstreamOff < dnstreamOff);
		TIndexOffU spreadL = rL.bot - rL.top;
		TIndexOffU spreadR = rR.bot - rR.top;
		TIndexOffU oms = min(spreadL, spreadR) - 1;
		Read* bufL = pairFw ? bufa_ : bufb_;
		Read* bufR = pairFw ? bufb_ : bufa_;
		TIndexOffU lenL = pairFw ? alen_ : blen_;
		TIndexOffU lenR = pairFw ? blen_ : alen_;
		bool ret;
		assert(!params_->sink().exceededOverThresh());
		params_->setFw(rL.fw);
		// Print upstream mate first
		ret = params_->reportHit(
				rL.fw ? (ebwtFwL?  bufL->patFw  :  bufL->patFwRev) :
					    (ebwtFwL?  bufL->patRc  :  bufL->patRcRev),
				rL.fw ? (ebwtFwL? &bufL->qual    : &bufL->qualRev) :
				        (ebwtFwL? &bufL->qualRev : &bufL->qual),
				&bufL->name,
				ebwtFwL,
				rL.mms,                       // mismatch positions
				rL.refcs,                     // reference characters for mms
				rL.numMms,                    // # mismatches
				make_pair(first, upstreamOff),// position
				make_pair(first, dnstreamOff),// mate position
				rR.fw,                        // mate orientation
				lenR,                         // mate length
				make_pair(rL.top, rL.bot),    // arrows
				tlen,                         // textlen
				lenL,                         // qlen
				rL.stratum,                   // alignment stratum
				rL.cost,                      // cost, including quality penalty
				oms,                          // # other hits
				bufL->patid,
				bufL->seed,
				pairFw ? 1 : 2);
		if(ret) {
			return true; // can happen when -m is set
		}
		params_->setFw(rR.fw);
		ret = params_->reportHit(
				rR.fw ? (ebwtFwR?  bufR->patFw  :  bufR->patFwRev) :
					    (ebwtFwR?  bufR->patRc  :  bufR->patRcRev),
				rR.fw ? (ebwtFwR? &bufR->qual    : &bufR->qualRev) :
				        (ebwtFwR? &bufR->qualRev : &bufR->qual),
				&bufR->name,
				ebwtFwR,
				rR.mms,                       // mismatch positions
				rR.refcs,                     // reference characters for mms
				rR.numMms,                    // # mismatches
				make_pair(first, dnstreamOff),// position
				make_pair(first, upstreamOff),// mate position
				rL.fw,                        // mate orientation
				lenL,                         // mate length
				make_pair(rR.top, rR.bot),    // arrows
				tlen,                         // textlen
				lenR,                         // qlen
				rR.stratum,                   // alignment stratum
				rR.cost,                      // cost, including quality penalty
				oms,                          // # other hits
				bufR->patid,
				bufR->seed,
				pairFw ? 2 : 1);
		return ret;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %r10d
movl %r8d, %r11d
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
movl 0x4(%rsi), %eax
subl (%rsi), %eax
movb 0x98(%rsp), %dil
movl 0x4(%rdx), %r15d
subl (%rdx), %r15d
movb 0xa0(%rsp), %sil
cmpl %eax, %r15d
cmovael %eax, %r15d
decl %r15d
movq 0x18(%r13), %rax
movq 0x28(%r13), %r8
testb %dil, %dil
movq %r8, 0x38(%rsp)
movq %rax, 0x40(%rsp)
cmovneq %rax, %r8
movl 0x20(%r13), %ebx
movl 0x30(%r13), %eax
movl %eax, %edx
cmovnel %ebx, %edx
movq %rdx, 0x28(%rsp)
cmovnel %eax, %ebx
xorl %eax, %eax
testb %sil, %sil
movl %esi, %r9d
movl $0x90, %edx
cmoveq %rdx, %rax
pushq $0x30
popq %rdx
movl $0xc0, %esi
cmovneq %rdx, %rsi
movb 0x14(%r12), %dl
testb %dl, %dl
cmovneq %rax, %rsi
movq 0x90(%r13), %rax
movb %dl, 0x14(%rax)
addq %r8, %rsi
xorb %r9b, %dl
testb %dl, %dl
leaq 0x60(%r8), %rdx
leaq 0xf0(%r8), %rax
cmovneq %rax, %rdx
shlq $0x20, %r11
movl %ecx, %eax
orq %rax, %r11
shlq $0x20, %r10
orq %rax, %r10
leaq 0x150(%r8), %rcx
movl 0x18c(%r8), %eax
movq %rax, (%rsp)
movl 0x1a4(%r8), %eax
movq %rax, 0x8(%rsp)
movzbl %dil, %edi
pushq $0x2
popq %rax
movq %rdi, 0x30(%rsp)
subl %edi, %eax
movq 0x90(%r13), %rdi
leaq 0x18(%r12), %r9
leaq 0x38(%r12), %r8
movq %r8, 0x20(%rsp)
movl 0x10(%r12), %r8d
movq %r8, 0x18(%rsp)
movq %r14, 0x50(%rsp)
movzbl 0x14(%r14), %r8d
movq %r8, 0x10(%rsp)
movl 0xc(%r12), %r14d
movzwl 0x8(%r12), %ebp
subq $0x8, %rsp
movq %rbx, 0x50(%rsp)
movzwl %bx, %ebx
movzbl 0xa8(%rsp), %r8d
pushq %rax
pushq 0x10(%rsp)
pushq 0x20(%rsp)
pushq %r15
pushq %rbp
pushq %r14
pushq 0x60(%rsp)
movl 0xd0(%rsp), %eax
pushq %rax
pushq (%r12)
pushq %rbx
pushq 0x68(%rsp)
movq %r10, 0x70(%rsp)
pushq %r10
movq %r11, 0x70(%rsp)
pushq %r11
pushq 0x88(%rsp)
pushq 0x98(%rsp)
callq 0x287a4
addq $0x80, %rsp
testb %al, %al
je 0x333a3
movb $0x1, %al
addq $0x58, %rsp
jmp 0x334a0
movb 0xa8(%rsp), %r11b
movq 0x30(%rsp), %r10
testb %r10b, %r10b
movq 0x40(%rsp), %r14
cmovneq 0x38(%rsp), %r14
movq 0x90(%r13), %rdx
movq 0x50(%rsp), %rax
movb 0x14(%rax), %cl
movb %cl, 0x14(%rdx)
xorl %edx, %edx
testb %r11b, %r11b
movl $0x90, %r8d
cmovneq %rdx, %r8
pushq $0x30
popq %rdx
movl $0xc0, %esi
cmovneq %rdx, %rsi
movq 0x90(%r13), %rdi
testb %cl, %cl
cmovneq %r8, %rsi
addq %r14, %rsi
xorb %r11b, %cl
leaq 0x60(%r14), %rdx
leaq 0xf0(%r14), %r8
testb %cl, %cl
cmovneq %r8, %rdx
leaq 0x150(%r14), %rcx
leaq 0x18(%rax), %r9
leaq 0x38(%rax), %r8
movq %r8, 0x20(%rsp)
movl 0x10(%rax), %r8d
movq %r8, 0x18(%rsp)
movzbl 0x14(%r12), %r8d
movq %r8, (%rsp)
movl 0xc(%rax), %r12d
movzwl 0x8(%rax), %ebx
movl 0x18c(%r14), %r13d
movl 0x1a4(%r14), %ebp
subq $0x8, %rsp
incl %r10d
movzwl 0x30(%rsp), %r14d
movzbl %r11b, %r8d
pushq %r10
pushq %r13
pushq %rbp
pushq %r15
pushq %rbx
pushq %r12
pushq 0x80(%rsp)
movl 0xd0(%rsp), %ebx
pushq %rbx
pushq (%rax)
pushq %r14
pushq 0x58(%rsp)
pushq 0x68(%rsp)
pushq 0x78(%rsp)
pushq 0x88(%rsp)
pushq 0x98(%rsp)
callq 0x287a4
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop