// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movl %ecx, -0x40(%rbp)
movl %edx, %eax
movl -0x40(%rbp), %edx
movl %eax, -0x3c(%rbp)
movq %rsi, %rax
movl -0x3c(%rbp), %esi
movq %rax, -0x38(%rbp)
movq %rdi, %r10
movq -0x38(%rbp), %rdi
movb 0x20(%rbp), %al
movb 0x18(%rbp), %cl
movl 0x10(%rbp), %r11d
movq %r10, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
andb $0x1, %cl
movb %cl, -0x21(%rbp)
andb $0x1, %al
movb %al, -0x22(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movb -0x22(%rbp), %cl
andb $0x1, %cl
movb %cl, 0xb9(%rax)
movb -0x21(%rbp), %cl
andb $0x1, %cl
movb %cl, 0xb8(%rax)
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
addq $0x3, %rcx
shrq $0x2, %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
shrq $0x2, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movl -0x14(%rbp), %ecx
movl %ecx, 0x20(%rax)
testb $0x1, 0xb9(%rax)
je 0x1982a
movl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x19830
movl -0x18(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x30(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, 0x24(%rax)
movl -0x1c(%rbp), %ecx
movl %ecx, 0x28(%rax)
movl -0x1c(%rbp), %ecx
movl %ecx, 0x2c(%rax)
movl 0x2c(%rax), %ecx
movq $-0x1, %rdx
shlq %cl, %rdx
movq %rdx, %rcx
movq %rcx, 0x30(%rax)
movl -0x20(%rbp), %ecx
movl %ecx, 0x38(%rax)
cmpl $0x0, 0x38(%rax)
jl 0x19872
movq -0x30(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x48(%rbp)
jmp 0x19879
xorl %eax, %eax
movl %eax, -0x48(%rbp)
jmp 0x19879
movq -0x30(%rbp), %rax
movl -0x48(%rbp), %ecx
movl %ecx, %ecx
movq $-0x1, %rdx
shlq %cl, %rdx
movq %rdx, %rcx
movl %ecx, 0x3c(%rax)
movl 0x10(%rbp), %ecx
movl %ecx, 0x40(%rax)
movl 0x40(%rax), %ecx
shll %ecx
movl %ecx, 0x44(%rax)
movl 0x44(%rax), %ecx
shll $0x3, %ecx
movl %ecx, 0x48(%rax)
movl 0x40(%rax), %ecx
shll %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq %rcx, 0x50(%rax)
movq 0x50(%rax), %rcx
shlq $0x3, %rcx
movq %rcx, 0x58(%rax)
movq 0x8(%rax), %rdx
movl 0x2c(%rax), %ecx
movl $0x1, %esi
shll %cl, %esi
movl %esi, %ecx
movslq %ecx, %rcx
addq %rcx, %rdx
subq $0x1, %rdx
movl 0x2c(%rax), %ecx
shrq %cl, %rdx
movq %rdx, %rcx
movq %rcx, 0x60(%rax)
movq 0x60(%rax), %rcx
shlq $0x3, %rcx
movq %rcx, 0x68(%rax)
cmpl $-0x1, 0x38(%rax)
jne 0x1990e
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0x19938
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
movl 0x38(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movq -0x30(%rbp), %rcx
movslq %edx, %rdx
addq %rdx, %rax
subq $0x1, %rax
movl 0x38(%rcx), %ecx
shrq %cl, %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, 0x70(%rax)
movq 0x70(%rax), %rcx
shlq $0x3, %rcx
movq %rcx, 0x78(%rax)
movl 0x20(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movq -0x30(%rbp), %rcx
movl %eax, 0x80(%rcx)
movl 0x80(%rcx), %eax
imull 0x24(%rcx), %eax
movl %eax, 0x84(%rcx)
movl 0x84(%rcx), %eax
subl $0x10, %eax
movl %eax, 0x88(%rcx)
movl 0x88(%rcx), %eax
shll $0x2, %eax
movl %eax, 0x8c(%rcx)
movq 0x18(%rcx), %rax
movl 0x88(%rcx), %edx
shll %edx
movl %edx, %edx
addq %rdx, %rax
subq $0x1, %rax
movl 0x88(%rcx), %ecx
shll %ecx
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x90(%rax)
movq 0x90(%rax), %rcx
shlq %rcx
movq %rcx, 0x98(%rax)
movq 0x98(%rax), %rcx
movslq 0x24(%rax), %rdx
imulq %rdx, %rcx
movq %rcx, 0xa0(%rax)
movq 0x90(%rax), %rcx
movl 0x84(%rax), %edx
shll %edx
movl %edx, %edx
imulq %rdx, %rcx
movq %rcx, 0xa8(%rax)
testb $0x1, 0xb9(%rax)
je 0x19a9f
movq -0x30(%rbp), %rcx
movl 0x84(%rcx), %eax
subl $0x20, %eax
movl %eax, 0x88(%rcx)
movl 0x88(%rcx), %eax
shll $0x2, %eax
movl %eax, 0x8c(%rcx)
movq 0x18(%rcx), %rax
movl 0x88(%rcx), %edx
addq %rdx, %rax
subq $0x1, %rax
movl 0x88(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x98(%rax)
movq 0x98(%rax), %rcx
shrq %rcx
movq %rcx, 0x90(%rax)
movq 0x98(%rax), %rcx
movslq 0x24(%rax), %rdx
imulq %rdx, %rcx
movq %rcx, 0xa0(%rax)
movq 0x98(%rax), %rcx
movl 0x84(%rax), %edx
imulq %rdx, %rcx
movq %rcx, 0xa8(%rax)
movq -0x30(%rbp), %rdi
movq 0xa8(%rdi), %rax
movq %rax, 0xb0(%rdi)
callq 0x1bfc0
testb $0x1, %al
jne 0x19abc
jmp 0x19abe
jmp 0x19add
leaq 0x2617c(%rip), %rdi     # 0x3fc41
leaq 0x255f1(%rip), %rsi     # 0x3f0bd
movl $0xb7, %edx
leaq 0x268e3(%rip), %rcx     # 0x403bb
callq 0x51e0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)