// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rsi, %r15
movl 0x4(%rsi), %eax
subl (%rsi), %eax
movq %rdx, %r11
movl 0x4(%rdx), %r14d
subl (%rdx), %r14d
movq %rdi, %r13
cmpl %eax, %r14d
cmovael %eax, %r14d
movb 0x98(%rsp), %dil
decl %r14d
movq 0x18(%r13), %rax
movq 0x28(%r13), %r9
testb %dil, %dil
movq %r9, 0x30(%rsp)
movq %rax, 0x38(%rsp)
cmovneq %rax, %r9
movb 0xa0(%rsp), %sil
movl 0x20(%r13), %ebx
movl 0x30(%r13), %eax
movl %eax, %edx
cmovnel %ebx, %edx
movq %rdx, 0x20(%rsp)
cmovnel %eax, %ebx
movq 0x90(%r13), %rax
movb 0x14(%r15), %dl
movb %dl, 0x14(%rax)
xorl %eax, %eax
testb %sil, %sil
movl %esi, %ebp
movl $0x90, %edx
cmoveq %rdx, %rax
movl $0x30, %edx
movl $0xc0, %esi
cmovneq %rdx, %rsi
movb 0x14(%r15), %dl
testb %dl, %dl
cmovneq %rax, %rsi
movl %r8d, %r12d
addq %r9, %rsi
xorb %bpl, %dl
movl %ebp, %r8d
testb %dl, %dl
leaq 0x60(%r9), %rdx
leaq 0xf0(%r9), %rax
cmovneq %rax, %rdx
shlq $0x20, %r12
movl %ecx, %eax
orq %rax, %r12
shlq $0x20, %r10
orq %rax, %r10
leaq 0x150(%r9), %rcx
movl 0x18c(%r9), %eax
movq %rax, 0x50(%rsp)
movl 0x1a4(%r9), %eax
movq %rax, (%rsp)
movzbl %dil, %edi
movl $0x2, %eax
movq %rdi, 0x28(%rsp)
subl %edi, %eax
movq 0x90(%r13), %rdi
leaq 0x18(%r15), %r9
leaq 0x38(%r15), %rbp
movq %rbp, 0x18(%rsp)
movl 0x10(%r15), %ebp
movq %rbp, 0x10(%rsp)
movq %r11, 0x48(%rsp)
movzbl 0x14(%r11), %r11d
movq %r11, 0x8(%rsp)
movl 0xc(%r15), %r11d
movzwl 0x8(%r15), %ebp
subq $0x8, %rsp
movq %rbx, 0x48(%rsp)
movzwl %bx, %ebx
movzbl %r8b, %r8d
pushq %rax
pushq 0x60(%rsp)
pushq 0x18(%rsp)
pushq %r14
pushq %rbp
pushq %r11
pushq 0x58(%rsp)
movl 0xd0(%rsp), %eax
pushq %rax
pushq (%r15)
pushq %rbx
pushq 0x60(%rsp)
movq %r10, 0x68(%rsp)
pushq %r10
movq %r12, 0x68(%rsp)
pushq %r12
pushq 0x80(%rsp)
pushq 0x90(%rsp)
callq 0x31b00
addq $0x80, %rsp
testb %al, %al
je 0x3d799
movb $0x1, %al
addq $0x58, %rsp
jmp 0x3d895
movb 0xa8(%rsp), %dl
movq 0x28(%rsp), %r11
testb %r11b, %r11b
movq 0x38(%rsp), %r8
cmovneq 0x30(%rsp), %r8
movq 0x90(%r13), %rax
movq 0x48(%rsp), %r10
movb 0x14(%r10), %cl
movb %cl, 0x14(%rax)
movq 0x90(%r13), %rdi
xorl %eax, %eax
testb %dl, %dl
movl $0x90, %ecx
cmovneq %rax, %rcx
movl $0x30, %eax
movl $0xc0, %esi
cmovneq %rax, %rsi
movb 0x14(%r10), %al
testb %al, %al
cmovneq %rcx, %rsi
addq %r8, %rsi
xorb %dl, %al
leaq 0x60(%r8), %rdx
leaq 0xf0(%r8), %rcx
testb %al, %al
cmovneq %rcx, %rdx
leaq 0x150(%r8), %rcx
leaq 0x18(%r10), %r9
leaq 0x38(%r10), %rax
movq %rax, 0x18(%rsp)
movl 0x10(%r10), %eax
movq %rax, 0x10(%rsp)
movzbl 0x14(%r15), %eax
movl 0xc(%r10), %r13d
movzwl 0x8(%r10), %r12d
movl 0x18c(%r8), %ebx
movl 0x1a4(%r8), %ebp
subq $0x8, %rsp
incl %r11d
movzwl 0x28(%rsp), %r15d
movzbl 0xb0(%rsp), %r8d
pushq %r11
pushq %rbx
pushq %rbp
pushq %r14
pushq %r12
pushq %r13
pushq 0x78(%rsp)
movl 0xd0(%rsp), %ebx
pushq %rbx
pushq (%r10)
pushq %r15
pushq %rax
pushq 0x60(%rsp)
pushq 0x70(%rsp)
pushq 0x80(%rsp)
pushq 0x90(%rsp)
callq 0x31b00
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq