// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/eis-bwtseq-extinfo.c
// Function: gt_BWTSeqInitLocateHandling
void
gt_BWTSeqInitLocateHandling(BWTSeq *bwtSeq,
                         const enum rangeSortMode *defaultRangeSort)
{
  struct encIdxSeq *seqIdx;
  struct locateHeader locHeader;
  gt_assert(bwtSeq);
  seqIdx = bwtSeq->seqIdx;
  if (!readLocateInfoHeader(seqIdx, &locHeader)
      || !locHeader.locateInterval)
  {
    gt_log_log("Index does not contain locate information.\n"
            "Localization of matches will not be supported!");
    bwtSeq->locateSampleInterval = 0;
    bwtSeq->featureToggles = BWTBaseFeatures;
  }
  else
  {
    bwtSeq->locateSampleInterval = locHeader.locateInterval;
    bwtSeq->rot0Pos = locHeader.rot0Pos;
    /* FIXME: this really deserves its own header */
    bwtSeq->featureToggles = locHeader.featureToggles;

    if (readRankSortHeader(seqIdx, &bwtSeq->bitsPerOrigRank,
                           bwtSeq->alphabet, bwtSeq->rangeSort))
      ;
    else
    {
      AlphabetRangeID numRanges = MRAEncGetNumRanges(bwtSeq->alphabet);
      bwtSeq->bitsPerOrigRank = 0;
      memcpy(bwtSeq->rangeSort, defaultRangeSort,
             numRanges * sizeof (defaultRangeSort[0]));
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x1a3b25
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x1a3b2a
movq %rsi, %rbp
movq (%r15), %rax
xorl %r14d, %r14d
movq %r15, %rdi
movl $0x457, %esi            # imm = 0x457
xorl %edx, %edx
callq *0x58(%rax)
testq %rax, %rax
je 0x1a39e3
leaq 0x18(%rsp), %rdi
movl $0x10, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x17b40
cmpq $0x1, %rax
sete %r14b
movl 0x20(%rsp), %eax
testl %eax, %eax
setne %cl
testb %cl, %r14b
je 0x1a3b00
movl %eax, 0x20(%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rbx)
movl 0x24(%rsp), %eax
movl %eax, 0x40(%rbx)
movq 0x8(%rbx), %r12
testq %r12, %r12
je 0x1a3b2f
movq 0x48(%rbx), %r13
testq %r13, %r13
je 0x1a3b2f
movq (%r15), %rax
movq %r15, %rdi
movl $0x458, %esi            # imm = 0x458
xorl %edx, %edx
callq *0x58(%rax)
testq %rax, %rax
je 0x1a3ad4
movq %rax, %r15
leaq 0x44(%rbx), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x17b40
cmpq $0x1, %rax
jne 0x1a3ad4
movq %rbp, 0x10(%rsp)
movl 0x4(%r12), %ebp
testq %rbp, %rbp
sete %r14b
je 0x1a3aca
leaq 0xe(%rsp), %rdi
movl $0x1, %r12d
movl $0x2, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x17b40
cmpq $0x1, %rax
jne 0x1a3aca
movq %r12, %r14
movzwl 0xe(%rsp), %eax
movl %eax, -0x4(%r13,%r12,4)
cmpq %r12, %rbp
je 0x1a3ac3
movl $0x2, %esi
movl $0x1, %edx
leaq 0xe(%rsp), %rdi
movq %r15, %rcx
callq 0x17b40
leaq 0x1(%r14), %r12
cmpq $0x1, %rax
je 0x1a3a90
cmpq %rbp, %r14
setae %r14b
testb %r14b, %r14b
movq 0x10(%rsp), %rbp
jne 0x1a3b16
movq 0x8(%rbx), %rax
movq 0x48(%rbx), %rdi
movl 0x4(%rax), %edx
movl $0x0, 0x44(%rbx)
shlq $0x2, %rdx
movq %rbp, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17660
leaq 0x208292(%rip), %rdi    # 0x3abd99
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x108e02
movl %ebp, 0x20(%rbx)
movl %ebp, 0x40(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x608cc
callq 0x60895
callq 0x6085c