// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/eis-bwtseq.c
// Function: gt_newBWTSeq
BWTSeq *
gt_newBWTSeq(EISeq *seqIdx, MRAEnc *alphabet,
          const enum rangeSortMode *defaultRangeSort)
{
  BWTSeq *bwtSeq;
  GtUword *counts;
  size_t countsOffset, rangeSortOffset, totalSize;
  enum rangeSortMode *rangeSort;
  unsigned alphabetSize;
  gt_assert(seqIdx);
  /* alphabetSize is increased by one to handle the flattened
   * terminator symbol correctly */
  alphabetSize = gt_MRAEncGetSize(alphabet) + 1;
  countsOffset = offsetAlign(sizeof (struct BWTSeq), sizeof (GtUword));
  rangeSortOffset = offsetAlign(countsOffset
                                + sizeof (GtUword) * (alphabetSize + 1),
                                sizeof (enum rangeSortMode));
  totalSize = rangeSortOffset + sizeof (enum rangeSortMode)
    * MRAEncGetNumRanges(alphabet);
  bwtSeq = gt_malloc(totalSize);
  bwtSeq->pckbuckettable = NULL;
  counts = (GtUword *)((char  *)bwtSeq + countsOffset);
  rangeSort = (enum rangeSortMode *)((char *)bwtSeq + rangeSortOffset);
  if (!initBWTSeqFromEncSeqIdx(bwtSeq, seqIdx, alphabet, counts, rangeSort,
                               defaultRangeSort))
  {
    gt_free(bwtSeq);
    bwtSeq = NULL;
  }
  return bwtSeq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
testq %rdi, %rdi
je 0x1a42e9
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, %rdi
callq 0x1a67a7
movzwl %ax, %ebx
movl 0x4(%r12), %eax
shlq $0x2, %rax
leaq (%rax,%rbx,8), %rdi
addq $0x68, %rdi
leaq 0x208292(%rip), %rsi    # 0x3ac349
movl $0x7e, %edx
callq 0x1092b2
movq $0x0, 0x50(%rax)
testq %rax, %rax
je 0x1a42ee
movq %rax, %r14
movq %r12, 0x8(%rax)
movq %r12, %rdi
callq 0x1a67a7
testw %ax, %ax
je 0x1a42b6
movl %eax, %ebp
movq %r12, %rdi
movl $0xfc, %esi
movl $0x1, %edx
callq 0x1a68f0
movq %r12, %rdi
callq 0x1a67a7
movzwl %bp, %ecx
incl %ecx
movzwl %ax, %eax
cmpl %eax, %ecx
jne 0x1a42f3
movq %r12, %rdi
callq 0x1a67a7
cmpl $0x1, (%r12)
jne 0x1a42f8
movw %bp, 0xe(%rsp)
leaq (%r14,%rbx,8), %rcx
addq $0x68, %rcx
movq %r14, %rdx
addq $0x58, %rdx
movzwl %ax, %esi
movzbl 0x116(%r12), %ebx
movb %bl, 0x24(%r14)
movl $0x1, 0x28(%r14)
movq %rdx, 0x38(%r14)
movq %rcx, 0x48(%r14)
movq %r15, (%r14)
movq %rsi, 0x18(%rsp)
movq %rsi, 0x10(%r14)
movq (%r15), %rax
movq %r15, %rdi
callq *0x38(%rax)
movq %rax, 0x20(%rsp)
movq %rax, 0x18(%r14)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movq %r14, 0x30(%rsp)
movq 0x38(%r14), %r14
movq $0x0, (%r14)
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x1a41d8
movq (%r14,%rbp,8), %r12
movq 0x8(%r15), %rdi
callq 0x1a67a7
cmpw %bp, %ax
jbe 0x1a42df
movq (%r15), %rax
movzbl %bpl, %esi
movq %r15, %rdi
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq *0x8(%rax)
addq %r12, %rax
movq %rax, 0x8(%r14,%rbp,8)
incq %rbp
cmpq %rbp, %rbx
jne 0x1a419b
movzbl %bpl, %ebx
movq (%r14,%rbx,8), %r12
movq 0x8(%r15), %rdi
callq 0x1a67a7
cmpw %bx, %ax
jbe 0x1a42fd
movq %r13, 0x28(%rsp)
movq (%r15), %rax
movq %r15, %rdi
movl %ebx, %esi
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq *0x8(%rax)
addq %r12, %rax
decq %rax
movq %rax, 0x8(%r14,%rbx,8)
cmpq (%r14,%rbx,8), %rax
jb 0x1a4302
leal 0x2(%rbx), %eax
movzbl %al, %ebp
cmpq 0x18(%rsp), %rbp
jae 0x1a4280
addl $0x3, %ebx
leal -0x1(%rbx), %eax
movzbl %al, %eax
leal -0x1(%rax), %r13d
movq -0x8(%r14,%rax,8), %r12
movq 0x8(%r15), %rdi
callq 0x1a67a7
movzbl %r13b, %ecx
cmpw %cx, %ax
jbe 0x1a42e4
movq (%r15), %rax
movzbl %r13b, %esi
movq %r15, %rdi
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq *0x8(%rax)
addq %r12, %rax
movq %rax, (%r14,%rbp,8)
movzbl %bl, %ebp
incb %bl
cmpq 0x18(%rsp), %rbp
jb 0x1a4231
movq -0x8(%r14,%rbp,8), %rax
incq %rax
movq %rax, (%r14,%rbp,8)
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq %rcx, (%r14,%rax,8)
jne 0x1a4307
movq 0x30(%rsp), %r14
movq %r14, %rdi
movq 0x28(%rsp), %rsi
callq 0x1a3983
cmpw $0x0, 0xe(%rsp)
jne 0x1a42cd
leaq 0x20808c(%rip), %rsi    # 0x3ac349
movq %r14, %rdi
movl $0x85, %edx
callq 0x109670
xorl %r14d, %r14d
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x60c0c
callq 0x60c7a
callq 0x60d56
callq 0x60d1f
callq 0x60bd5
callq 0x173b0
callq 0x60c43
callq 0x60ce8
callq 0x60cb1