// File: /workspace/github_c_makefile_star2_O2/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 0x145fad
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x145fdb
movq %rsi, %r13
movq (%r15), %rax
movq %r15, %rdi
movl $0x457, %esi            # imm = 0x457
xorl %edx, %edx
callq *0x58(%rax)
testq %rax, %rax
je 0x145f55
leaq 0x18(%rsp), %r12
pushq $0x10
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rdi
movq %rax, %rcx
callq 0x17ad0
cmpq $0x1, %rax
sete %cl
movl 0x8(%r12), %eax
testl %eax, %eax
setne %dl
testb %dl, %cl
je 0x145f55
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 0x146007
movq 0x48(%rbx), %r14
testq %r14, %r14
je 0x146007
movq (%r15), %rax
movq %r15, %rdi
movl $0x458, %esi            # imm = 0x458
xorl %edx, %edx
callq *0x58(%rax)
testq %rax, %rax
je 0x145f84
movq %rax, %r15
leaq 0x44(%rbx), %rdi
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %rax, %rcx
callq 0x17ad0
cmpq $0x1, %rax
jne 0x145f84
movq %r13, 0x10(%rsp)
movl 0x4(%r12), %r12d
xorl %r13d, %r13d
pushq $0x1
popq %rbp
cmpq %r13, %r12
je 0x145f6b
leaq 0xe(%rsp), %rdi
pushq $0x2
popq %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x17ad0
cmpq $0x1, %rax
jne 0x145f7a
movzwl 0xe(%rsp), %eax
movl %eax, (%r14,%r13,4)
incq %r13
jmp 0x145f29
leaq 0x1fcbad(%rip), %rdi    # 0x342b09
xorl %eax, %eax
callq 0x92a82
andl $0x0, 0x20(%rbx)
andl $0x0, 0x40(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq %r12, %r13
movq 0x10(%rsp), %r13
jae 0x145f6b
movq 0x8(%rbx), %rax
movq 0x48(%rbx), %rdi
movl 0x4(%rax), %edx
andl $0x0, 0x44(%rbx)
shlq $0x2, %rdx
movq %r13, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17630
movq 0x2f1fb4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x19f055(%rip), %rsi    # 0x2e5013
leaq 0x1fd2b2(%rip), %rdx    # 0x343277
leaq 0x1fcb21(%rip), %rcx    # 0x342aed
leaq 0x1fc90d(%rip), %r8     # 0x3428e0
movl $0x340, %r9d            # imm = 0x340
jmp 0x146033
movq 0x2f1f86(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x19f027(%rip), %rsi    # 0x2e5013
leaq 0x1fcd01(%rip), %rdx    # 0x342cf4
leaq 0x1fcd0f(%rip), %rcx    # 0x342d09
leaq 0x1fc8df(%rip), %r8     # 0x3428e0
pushq $0x55
popq %r9
jmp 0x146033
movq 0x2f1f5a(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x19effb(%rip), %rsi    # 0x2e5013
leaq 0x1fccff(%rip), %rdx    # 0x342d1e
leaq 0x1fcd2b(%rip), %rcx    # 0x342d51
leaq 0x1fc8b3(%rip), %r8     # 0x3428e0
movl $0x82, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390