// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./range_source.h
// Function: Branch::init(AllocOnlyPool<RangeState>&, AllocOnlyPool<Edit>&, unsigned int, unsigned int, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned int, unsigned int, EbwtParams const&, unsigned char const*, EditList const*)
bool init(AllocOnlyPool<RangeState>& rsPool,
	          AllocOnlyPool<Edit>& epool,
	          uint32_t id,
	          uint32_t qlen,
	          uint16_t depth0,
	          uint16_t depth1,
	          uint16_t depth2,
	          uint16_t depth3,
	          uint16_t rdepth,
	          uint16_t len,
	          uint16_t cost,
	          uint16_t ham,
	          TIndexOffU itop,
	          TIndexOffU ibot,
	          const EbwtParams& ep,
	          const uint8_t* ebwt,
	          const EditList* edits = NULL)
	{
		id_ = id;
		delayedCost_ = 0;
		depth0_ = depth0;
		depth1_ = depth1;
		depth2_ = depth2;
		depth3_ = depth3;
		assert_gt(depth3_, 0);
		rdepth_ = rdepth;
		len_ = len;
		cost_ = cost;
		ham_ = ham;
		top_ = itop;
		bot_ = ibot;

		if(ibot > itop+1) {
			// Care about both top and bot
			SideLocus::initFromTopBot(itop, ibot, ep, ebwt, ltop_, lbot_);
		} else if(ibot > itop) {
			// Only care about top
			ltop_.initFromRow(itop, ep, ebwt);
			lbot_.invalidate();
		}
		if(qlen - rdepth_ > 0) {
			ranges_ = rsPool.allocC(qlen - rdepth_); // allocated from the RangeStatePool
			if(ranges_ == NULL) {
				return false; // RangeStatePool exhausted
			}
			rangesSz_ = qlen - rdepth_;
		} else {
			ranges_ = NULL;
			rangesSz_ = 0;
		}
#ifndef NDEBUG
		for(size_t i = 0; i < (qlen - rdepth_); i++) {
			for(int j = 0; j < 4; j++) {
				assert_eq(0, ranges_[i].tops[j]);
				assert_eq(0, ranges_[i].bots[j]);
			}
		}
#endif
		curtailed_ = false;
		exhausted_ = false;
		prepped_ = true;
		delayedIncrease_ = false;
		edits_.clear();
		if(edits != NULL) {
			const size_t numEdits = edits->size();
			for(size_t i = 0; i < numEdits; i++) {
				edits_.add(edits->get(i), epool, qlen);
			}
		}
		// If we're starting with a non-zero length, that means we're
		// jumping over a bunch of unrevisitable positions.
		for(size_t i = 0; i < len_; i++) {
			ranges_[i].eliminated_ = true;
			assert(eliminated((int)i));
		}
		assert(repOk(qlen));
		return true;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r12d
movl %ecx, %eax
movq %rdx, (%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movq 0x90(%rsp), %rcx
movq 0x88(%rsp), %rdx
movl 0x80(%rsp), %esi
movl %eax, (%rdi)
andw $0x0, 0x80(%rdi)
movl 0x78(%rsp), %eax
movw %r9w, 0x4(%rdi)
movzwl 0x40(%rsp), %edi
movw %di, 0x6(%rbx)
movzwl 0x48(%rsp), %edi
movw %di, 0x8(%rbx)
movzwl 0x50(%rsp), %edi
movw %di, 0xa(%rbx)
movzwl 0x58(%rsp), %edi
movw %di, 0xc(%rbx)
movzwl 0x60(%rsp), %edi
movw %di, 0xe(%rbx)
movzwl 0x68(%rsp), %edi
movw %di, 0x10(%rbx)
movzwl 0x70(%rsp), %edi
movw %di, 0x12(%rbx)
movl %eax, 0x24(%rbx)
movl %esi, 0x28(%rbx)
leal 0x1(%rax), %edi
cmpl %esi, %edi
jae 0x232a9
leaq 0x2c(%rbx), %r8
leaq 0x3c(%rbx), %r9
movl %eax, %edi
callq 0x238ee
jmp 0x232bc
cmpl %eax, %esi
jbe 0x232bc
leaq 0x2c(%rbx), %rdi
movl %eax, %esi
callq 0x15ee4
movb $-0x1, 0x4a(%rbx)
movzwl 0xc(%rbx), %eax
movl %r12d, %esi
subl %eax, %esi
jne 0x232d0
andq $0x0, 0x18(%rbx)
xorl %eax, %eax
jmp 0x232ef
movq %r15, %rdi
callq 0x239b4
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x233ab
movzwl 0xc(%rbx), %ecx
movl %r12d, %eax
subw %cx, %ax
movw %ax, 0x20(%rbx)
movl $0x10000, 0x82(%rbx)    # imm = 0x10000
andq $0x0, 0x50(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rbx)
cmpq $0x0, 0x98(%rsp)
je 0x2337b
leaq 0x50(%rbx), %r15
movq 0x98(%rsp), %rax
movq (%rax), %rbp
leaq 0x8(%rax), %r13
movl %r12d, %r12d
xorl %r14d, %r14d
cmpq %r14, %rbp
je 0x2337b
movq %r13, %rsi
cmpq $0x6, %r14
jb 0x23363
movq 0x98(%rsp), %rax
cmpq $0x15, %r14
ja 0x23357
movq 0x20(%rax), %rax
leaq (%rax,%r14,4), %rsi
addq $-0x18, %rsi
jmp 0x23363
movq 0x28(%rax), %rax
leaq (%rax,%r14,4), %rsi
addq $-0x58, %rsi
movq %r15, %rdi
movq (%rsp), %rdx
movq %r12, %rcx
callq 0x239d4
incq %r14
addq $0x4, %r13
jmp 0x2332d
pushq $0x28
popq %rax
xorl %ecx, %ecx
movzwl 0xe(%rbx), %edx
cmpq %rdx, %rcx
jae 0x2339a
movq 0x18(%rbx), %rdx
movb $0x1, (%rdx,%rax)
incq %rcx
addq $0x30, %rax
jmp 0x23380
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x2339c
nop