// File: /workspace/github_c_makefile_star2_O3/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 0x19b5a7
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x19b5ac
movq %rsi, %r14
movq (%r15), %rax
xorl %r13d, %r13d
movq %r15, %rdi
movl $0x457, %esi            # imm = 0x457
xorl %edx, %edx
callq *0x58(%rax)
testq %rax, %rax
je 0x19b551
leaq 0x18(%rsp), %r12
movl $0x10, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rax, %rcx
callq 0x17b40
cmpq $0x1, %rax
sete %cl
movl 0x8(%r12), %eax
testl %eax, %eax
setne %dl
testb %dl, %cl
je 0x19b551
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 0x19b5b1
movq 0x48(%rbx), %r13
testq %r13, %r13
je 0x19b5b1
movq (%r15), %rax
movq %r15, %rdi
movl $0x458, %esi            # imm = 0x458
xorl %edx, %edx
callq *0x58(%rax)
testq %rax, %rax
je 0x19b57b
movq %rax, %r15
leaq 0x44(%rbx), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x17b40
cmpq $0x1, %rax
jne 0x19b57b
movl 0x4(%r12), %ebp
testq %rbp, %rbp
je 0x19b567
movq %r14, 0x10(%rsp)
leaq 0xe(%rsp), %rdi
movl $0x1, %r14d
movl $0x2, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x17b40
cmpq $0x1, %rax
jne 0x19b576
movq %r14, %r12
movzwl 0xe(%rsp), %eax
movl %eax, -0x4(%r13,%r14,4)
cmpq %r14, %rbp
je 0x19b545
movl $0x2, %esi
movl $0x1, %edx
leaq 0xe(%rsp), %rdi
movq %r15, %rcx
callq 0x17b40
leaq 0x1(%r12), %r14
cmpq $0x1, %rax
je 0x19b511
cmpq %rbp, %r12
movq 0x10(%rsp), %r14
jae 0x19b567
jmp 0x19b57b
leaq 0x2072e1(%rip), %rdi    # 0x3a2839
xorl %eax, %eax
callq 0x103d72
movl %r13d, 0x20(%rbx)
movl %r13d, 0x40(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %r14
movq 0x8(%rbx), %rax
movq 0x48(%rbx), %rdi
movl 0x4(%rax), %edx
movl $0x0, 0x44(%rbx)
shlq $0x2, %rdx
movq %r14, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17660
callq 0x5f458
callq 0x5f421
callq 0x5f3e8
nop