// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/eis-seqranges.c
// Function: gt_SRLSymbolsInSeqRegion
void
gt_SRLSymbolsInSeqRegion(struct seqRangeList *rangeList, GtUword start,
                      GtUword end, GtUword *occStore,
                      seqRangeListSearchHint *hint)
{
  struct seqRange *p;
  /* find range next to start position */
  /* first solve special case where pos precedes very first list
   * entry, because we want to be able to look at the preceding range
   * in binary search */
  /* no ranges => no symbols in ranges */
  if (rangeList->numRanges == 0)
    return;
  p = gt_SRLFindPositionNext(rangeList, start, hint);
  /* no range overlapping or between start and end of sequence? */
  if (!p)
    return;
  /* iterate over ranges left */
  {
    GtUword s = GT_MAX(start, p->startPos);
    struct seqRange *maxRange = rangeList->ranges + rangeList->numRanges - 1;
    while (s <= end)
    {
      GtUword overlap = GT_MIN(p->startPos + seqRangeLen(p,
                                                            rangeList->symBits),
                                  end + 1) - s;
      occStore[MRAEncRevMapSymbol(rangeList->alphabet,
                                  seqRangeSym(p, rangeList->symBits))]
               += overlap;
      if (p == maxRange)
        break;
      s = (++p)->startPos;
    }
  }
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movq 0x80(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4b19e7
jmp 0x4b1b91
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x4b0c80
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x4b1a10
jmp 0x4b1b91
movq 0x78(%rsp), %rax
movq 0x58(%rsp), %rcx
cmpq (%rcx), %rax
jbe 0x4b1a2b
movq 0x78(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x4b1a38
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x80(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x80(%rsp), %rcx
movq 0x8(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $-0x10, %rax
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x70(%rsp), %rax
ja 0x4b1b91
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x58(%rsp), %rdi
movq 0x80(%rsp), %rax
movl 0x28(%rax), %esi
callq 0x4b06a0
movq %rax, %rcx
movq 0x30(%rsp), %rax
addq %rcx, %rax
movq 0x70(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x4b1ae9
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rdi
movq 0x80(%rsp), %rax
movl 0x28(%rax), %esi
callq 0x4b06a0
movq %rax, %rcx
movq 0x20(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x28(%rsp)
jmp 0x4b1af7
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
subq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
movq 0x80(%rsp), %rax
movl 0x28(%rax), %esi
callq 0x4b06d0
movq 0x8(%rsp), %rdi
movzbl %al, %esi
callq 0x4b0b90
movq 0x10(%rsp), %rdx
movb %al, %cl
movq 0x18(%rsp), %rax
movzbl %cl, %ecx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x58(%rsp), %rax
cmpq 0x48(%rsp), %rax
jne 0x4b1b72
jmp 0x4b1b91
movq 0x58(%rsp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, 0x58(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x50(%rsp)
jmp 0x4b1a6a
addq $0x88, %rsp
retq
nopl (%rax)