// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/eis-seqranges.c
// Function: gt_SRLReadFromStream
struct seqRangeList *
gt_SRLReadFromStream(FILE *fp, const MRAEnc *alphabet,
                  enum SRLFeatures features, GT_UNUSED GtError *err)
{
  struct seqRangeList *newRangeList;
  size_t numRanges;
  gt_assert(fp && err);
  newRangeList = gt_malloc(sizeof (struct seqRangeList));
  newRangeList->alphabet = alphabet;
  newRangeList->symBits = requiredSymbolBits(gt_MRAEncGetSize(alphabet) - 1);
  if (newRangeList->symBits)
    newRangeList->maxRangeLen =
      (((GtUword)1) << (symLenStrBits - newRangeList->symBits)) - 1;
  else
    newRangeList->maxRangeLen = ~(GtUword)0;
  gt_xfread(&(newRangeList->numRanges), sizeof (newRangeList->numRanges), 1,
            fp);
  numRanges = newRangeList->numRanges;
  newRangeList->partialSymSums = NULL;
  newRangeList->ranges = gt_malloc(sizeof (struct seqRange) *
                                   (newRangeList->numRangesStorable
                                   = numRanges));
  gt_xfread(newRangeList->ranges, sizeof (struct seqRange), numRanges, fp);
  if (features & SRL_PARTIAL_SYMBOL_SUMS)
  {
    GtUword *partialSymSums;
    size_t numSyms = gt_MRAEncGetSize(alphabet), i;
    newRangeList->partialSymSums = partialSymSums =
     gt_malloc(sizeof (GtUword) * gt_MRAEncGetSize(alphabet) * numRanges);
    memset(partialSymSums, 0, sizeof (GtUword) * numSyms);
    for (i = 1; i < numRanges; ++i)
    {
      struct seqRange *lastRange = newRangeList->ranges + i - 1;
      Symbol lastSym = seqRangeSym(lastRange, newRangeList->symBits);
      memcpy(partialSymSums + i * numSyms, partialSymSums + (i - 1) * numSyms,
             sizeof (GtUword) * numSyms);
      partialSymSums[i * numSyms + lastSym] +=
        seqRangeLen(lastRange, newRangeList->symBits);
    }
  }
  return newRangeList;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movq %rcx, 0x38(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x4b1707
cmpq $0x0, 0x38(%rsp)
jne 0x4b173f
movq 0x18a892(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x648fb(%rip), %rsi     # 0x516013
leaq 0x105bd5(%rip), %rdx    # 0x5b72f4
leaq 0x105bd8(%rip), %rcx    # 0x5b72fe
leaq 0x105a7f(%rip), %r8     # 0x5b71ac
movl $0x1dd, %r9d            # imm = 0x1DD
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4b1741
movl $0x38, %edi
leaq 0x105a5f(%rip), %rsi    # 0x5b71ac
movl $0x1de, %edx            # imm = 0x1DE
callq 0xe80f0
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x48(%rsp), %rdi
callq 0x22aeb0
movzwl %ax, %eax
subl $0x1, %eax
movzbl %al, %edi
callq 0x4afd80
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x28(%rax)
movq 0x30(%rsp), %rax
cmpl $0x0, 0x28(%rax)
je 0x4b17c2
movq 0x30(%rsp), %rcx
movl $0x40, %eax
subl 0x28(%rcx), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
subq $0x1, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x30(%rax)
jmp 0x4b17cf
movq 0x30(%rsp), %rax
movq $-0x1, 0x30(%rax)
movq 0x30(%rsp), %rdi
addq $0x8, %rdi
movq 0x50(%rsp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x126c30
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rdi, (%rax)
shlq $0x4, %rdi
leaq 0x10598d(%rip), %rsi    # 0x5b71ac
movl $0x1ec, %edx            # imm = 0x1EC
callq 0xe80f0
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x28(%rsp), %rdx
movq 0x50(%rsp), %rcx
movl $0x10, %esi
callq 0x126c30
movl 0x44(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4b199b
movq 0x48(%rsp), %rdi
callq 0x22aeb0
movzwl %ax, %eax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
callq 0x22aeb0
movzwl %ax, %eax
movl %eax, %edi
shlq $0x3, %rdi
imulq 0x28(%rsp), %rdi
leaq 0x105918(%rip), %rsi    # 0x5b71ac
movl $0x1f3, %edx            # imm = 0x1F3
callq 0xe80f0
movq %rax, %rcx
movq %rcx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x19360
movq $0x1, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0x4b1999
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $-0x10, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x30(%rsp), %rax
movl 0x28(%rax), %esi
callq 0x4b06d0
movb %al, 0x7(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
imulq 0x18(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rax
subq $0x1, %rax
imulq 0x18(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x18(%rsp), %rdx
shlq $0x3, %rdx
callq 0x19610
movq 0x8(%rsp), %rdi
movq 0x30(%rsp), %rax
movl 0x28(%rax), %esi
callq 0x4b06a0
movq %rax, %rdx
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
imulq 0x18(%rsp), %rcx
movzbl 0x7(%rsp), %esi
addq %rsi, %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x4b18cd
jmp 0x4b199b
movq 0x30(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)