// File: /workspace/github_cpp_makefile_star2_O1/BenLangmead[P]bowtie/./ebwt.h
// Function: EbwtParams::init(unsigned long, int, int, int, int, int, bool, bool)
void init(TIndexOffU len, int32_t lineRate, int32_t linesPerSide,
	          int32_t offRate, int32_t isaRate, int32_t ftabChars,
	          bool entireReverse, bool isBt2Index)
	{
		_isBt2Index = isBt2Index;
		_entireReverse = entireReverse;
		_len = len;
		_bwtLen = _len + 1;
		_sz = (len+3)/4;
		_bwtSz = (len/4 + 1);
		_lineRate = lineRate;
		_linesPerSide = _isBt2Index ? 1 : linesPerSide;
		_origOffRate = offRate;
		_offRate = offRate;
		_offMask = OFF_MASK << _offRate;
		_isaRate = isaRate;
		_isaMask = OFF_MASK << ((_isaRate >= 0) ? _isaRate : 0);
		_ftabChars = ftabChars;
		_eftabLen = _ftabChars*2;
		_eftabSz = _eftabLen*OFF_SIZE;
		_ftabLen = (1 << (_ftabChars*2))+1;
		_ftabSz = _ftabLen*OFF_SIZE;
		_offsLen = (_bwtLen + (1 << _offRate) - 1) >> _offRate;
		_offsSz = (uint64_t)_offsLen*OFF_SIZE;
		_isaLen = (_isaRate == -1)? 0 : ((_bwtLen + (1 << _isaRate) - 1) >> _isaRate);
		_isaSz = _isaLen*OFF_SIZE;
		_lineSz = 1 << _lineRate;
		_sideSz = _lineSz * _linesPerSide;
		_sideBwtSz = _sideSz - 2*OFF_SIZE;
		_sideBwtLen = _sideBwtSz*4;
		_numSidePairs = (_bwtSz+(2*_sideBwtSz)-1)/(2*_sideBwtSz);
		_numSides = _numSidePairs*2;
		_numLines = _numSides * _linesPerSide;
		_ebwtTotLen = _numSidePairs * (2*_sideSz);

		if (_isBt2Index) {
			_sideBwtSz = _sideSz - 4*OFF_SIZE;
			_sideBwtLen = _sideBwtSz*4;
			_numSides = (_bwtSz+(_sideBwtSz)-1)/(_sideBwtSz);
			_numSidePairs = _numSides / 2;
			_numLines = _numSides * _linesPerSide;
			_ebwtTotLen = _numSides * _sideSz;
		}

		_ebwtTotSz = _ebwtTotLen;
		assert(repOk());
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r10d
leaq 0x3(%rsi), %rax
shrq $0x2, %rax
movq %rax, 0x20(%rsp)
movq %rsi, %r11
shrq $0x2, %r11
cmpb $0x0, 0x70(%rsp)
movl $0x1, %eax
cmovnel %eax, %r10d
movl $0x1, %r14d
movq $-0x1, %rax
movq $-0x1, %rbx
movl %r8d, %ecx
shlq %cl, %rbx
movq %rbx, 0x18(%rsp)
movl %r9d, %ecx
shlq %cl, %rax
testl %r9d, %r9d
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmovnsl %eax, %ecx
movl %ecx, 0x14(%rsp)
movl 0x60(%rsp), %eax
leal (%rax,%rax), %ecx
movl %ecx, 0x10(%rsp)
movq %rax, %rbx
movl $0x1, %r12d
shll %cl, %r12d
movl $0x1, %eax
movl %r8d, %ecx
shll %cl, %eax
movslq %eax, %r13
addq %rsi, %r13
shrq %cl, %r13
movl %edx, %ebp
movl $0x1, %eax
movl %r9d, %ecx
shll %cl, %eax
movl %ebx, %r15d
shll $0x4, %r15d
movslq %eax, %rbx
addq %rsi, %rbx
shrq %cl, %rbx
xorl %eax, %eax
cmpl $-0x1, %r9d
cmoveq %rax, %rbx
movl %ebp, %ecx
shll %cl, %r14d
movl %r14d, 0xc(%rsp)
movl %r10d, %r14d
shll %cl, %r14d
leal -0x20(,%r14,2), %ecx
leaq (%r11,%rcx), %rax
xorl %edx, %edx
divq %rcx
movb 0x70(%rsp), %cl
movb %cl, 0xb9(%rdi)
movb 0x68(%rsp), %cl
movb %cl, 0xb8(%rdi)
movq %rsi, (%rdi)
leaq 0x1(%rsi), %rcx
movq %rcx, 0x8(%rdi)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rdi)
leaq 0x1(%r11), %rcx
movq %rcx, 0x18(%rdi)
movl %ebp, 0x20(%rdi)
movslq %r10d, %rcx
movl %ecx, 0x24(%rdi)
movl %r8d, 0x28(%rdi)
movl %r8d, 0x2c(%rdi)
movq 0x18(%rsp), %rdx
movq %rdx, 0x30(%rdi)
movl %r9d, 0x38(%rdi)
movl 0x14(%rsp), %edx
movl %edx, 0x3c(%rdi)
movl 0x60(%rsp), %edx
movl %edx, 0x40(%rdi)
movl 0x10(%rsp), %edx
movl %edx, 0x44(%rdi)
movl %r15d, 0x48(%rdi)
leaq 0x1(%r12), %rdx
movq %rdx, 0x50(%rdi)
leaq 0x8(,%r12,8), %rdx
movq %rdx, 0x58(%rdi)
movq %r13, 0x60(%rdi)
leaq (,%r13,8), %rdx
movq %rdx, 0x68(%rdi)
movq %rbx, 0x70(%rdi)
leaq (,%rbx,8), %rdx
movq %rdx, 0x78(%rdi)
movl 0xc(%rsp), %edx
movl %edx, 0x80(%rdi)
leal -0x10(%r14), %edx
movl %r14d, 0x84(%rdi)
movl %edx, 0x88(%rdi)
leal -0x40(,%r14,4), %edx
movl %edx, 0x8c(%rdi)
leal (%r14,%r14), %edx
imulq %rax, %rdx
movq %rax, 0x90(%rdi)
addq %rax, %rax
movq %rax, 0x98(%rdi)
imulq %rcx, %rax
movq %rax, 0xa0(%rdi)
movq %rdx, 0xa8(%rdi)
cmpb $0x0, 0x70(%rsp)
je 0x10da8
leal -0x20(%r14), %esi
movl %esi, 0x88(%rdi)
leal -0x80(,%r14,4), %eax
movl %eax, 0x8c(%rdi)
addq %rsi, %r11
movq %r11, %rax
xorl %edx, %edx
divq %rsi
movq %rax, 0x98(%rdi)
imulq %rax, %rcx
movl %r14d, %edx
imulq %rax, %rdx
shrq %rax
movq %rax, 0x90(%rdi)
movq %rcx, 0xa0(%rdi)
movq %rdx, 0xa8(%rdi)
movq 0xa8(%rdi), %rax
movq %rax, 0xb0(%rdi)
callq 0x13086
testb %al, %al
je 0x10dce
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ce89(%rip), %rdi     # 0x2dc5e
leaq 0x1c2fe(%rip), %rsi     # 0x2d0da
leaq 0x1d59e(%rip), %rcx     # 0x2e381
movl $0xb7, %edx
callq 0x41c0
nop