// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/eis-blockcomp.c
// Function: gt_loadBlockEncIdxSeqGen
struct encIdxSeq *
gt_loadBlockEncIdxSeqGen(MRAEnc *alphabet,
                         const char *projectName, int features, GtError *err)
{
  struct blockCompositionSeq *newSeqIdx = NULL;
  Symbol blockMapAlphabetSize, GT_UNUSED totalAlphabetSize;
  MRAEnc *blockMapAlphabet = NULL, *rangeMapAlphabet = NULL;
  size_t headerLen;
  int *modesCopy = NULL;
  char *buf = NULL;
  gt_assert(projectName && err);
  newSeqIdx = gt_calloc(sizeof (struct blockCompositionSeq), 1);
  newSeqIdx->baseClass.alphabet = alphabet;
  newSeqIdx->baseClass.classInfo = &blockCompositionSeqClass;

  if (!openOnDiskData(projectName, &newSeqIdx->externalData, "rb",err)) {
    gt_error_set(err, "error reading data from disk");
    loadBlockEncIdxSeqErrRet();
  }
  {
    size_t offset = HEADER_ID_BLOCK_LEN;
    buf = gt_malloc(HEADER_ID_BLOCK_LEN);
    if (fread(buf, HEADER_ID_BLOCK_LEN, 1,
          newSeqIdx->externalData.idxFP) != 1) {
      gt_error_set(err, "error reading header id");
      loadBlockEncIdxSeqErrRet();
    }
    if (strcmp(buf, bdxHeader)!= 0) {
      gt_error_set(err, "header is not BDX found %s instead", buf);
      loadBlockEncIdxSeqErrRet();
    }
    newSeqIdx->externalData.cwDataPos = headerLen = *(uint32_t *)(buf + 4);
    buf = gt_realloc(buf, headerLen);
    if (fread(buf + HEADER_ID_BLOCK_LEN, headerLen - HEADER_ID_BLOCK_LEN,
             1, newSeqIdx->externalData.idxFP) != 1) {
      gt_error_set(err, "error reading header");
      loadBlockEncIdxSeqErrRet();
    }
    while (offset < headerLen)
    {
      uint32_t currentHeader;
      switch (currentHeader = *(uint32_t *)(buf + offset))
      {
      case SELE_HEADER_FIELD:
        newSeqIdx->baseClass.seqLen = *(uint64_t *)(buf + offset + 4);
        offset += 12;
        break;
      case BKSZ_HEADER_FIELD:
        newSeqIdx->blockSize = *(uint32_t *)(buf + offset + 4);
        offset += 8;
        break;
      case BBLK_HEADER_FIELD:
        newSeqIdx->bucketBlocks = *(uint32_t *)(buf + offset + 4);
        offset += 8;
        break;
      case VOFF_HEADER_FIELD:
        newSeqIdx->externalData.varDataPos
          = *(uint64_t *)(buf + offset + 4);
        offset += 12;
        break;
      case ROFF_HEADER_FIELD:
        newSeqIdx->externalData.rangeEncPos = *(uint64_t *)(buf + offset + 4);
        offset += 12;
        break;
      case NMRN_HEADER_FIELD:
        {
          size_t numModes = newSeqIdx->numModes
            = *(uint32_t *)(buf + (offset += 4));
          offset += 4;
          modesCopy = newSeqIdx->modes = gt_malloc(sizeof (int) * numModes);
          size_t j;
          for (j = 0; j < numModes; ++j)
          {
            modesCopy[j] = *(uint32_t *)(buf + offset);
            offset += 4;
          }
        }
        break;
      case CBMB_HEADER_FIELD:
        newSeqIdx->callBackDataOffsetBits = *(uint32_t *)(buf + offset + 4);
        offset += 8;
        break;
      case SPBT_HEADER_FIELD:
        newSeqIdx->bitsPerUlong = *(uint32_t *)(buf + offset + 4);
        offset += 8;
        break;
      case VDOB_HEADER_FIELD:
        newSeqIdx->bitsPerVarDiskOffset = *(uint32_t *)(buf + offset + 4);
        offset += 8;
        break;
      case SSBT_HEADER_FIELD:
        {
          size_t i;
          Symbol blockMapAlphabetSize = *(uint32_t *)(buf + offset + 4);
          newSeqIdx->partialSymSumBits
            = gt_malloc(sizeof (newSeqIdx->partialSymSumBits[0])
                        * blockMapAlphabetSize * 2);
          newSeqIdx->partialSymSumBitsSums
            = newSeqIdx->partialSymSumBits + blockMapAlphabetSize;
          if (blockMapAlphabetSize)
          {
            newSeqIdx->partialSymSumBits[0]= *(uint32_t *)(buf + offset + 8);
            newSeqIdx->partialSymSumBitsSums[0] = 0;
#ifdef EIS_DEBUG
            gt_log_log("partialSymSumBits[0]=%u\n",
                    newSeqIdx->partialSymSumBits[0]);
#endif
            for (i = 1; i < blockMapAlphabetSize; ++i)
            {
              newSeqIdx->partialSymSumBits[i]
                = *(uint32_t *)(buf + offset + 8 + 4*i);
#ifdef EIS_DEBUG
              gt_log_log("partialSymSumBits[%"PRIuSymbol"]=%u\n",
                      (Symbol)i, newSeqIdx->partialSymSumBits[i]);
#endif
              newSeqIdx->partialSymSumBitsSums[i] =
                newSeqIdx->partialSymSumBitsSums[i - 1]
                + newSeqIdx->partialSymSumBits[i - 1];
            }
            newSeqIdx->symSumBits
              = newSeqIdx->partialSymSumBitsSums[blockMapAlphabetSize - 1]
              + newSeqIdx->partialSymSumBits[blockMapAlphabetSize - 1];
          }
          offset += 8 + 4 * blockMapAlphabetSize;
        }
      case BEFB_HEADER_FIELD:
        newSeqIdx->blockEncFallback = *(uint32_t *)(buf + offset + 4);
        offset += 8;
        break;
      case REFB_HEADER_FIELD:
        newSeqIdx->rangeEncFallback = *(uint32_t *)(buf + offset + 4);
        offset += 8;
        break;
      case MEXB_HEADER_FIELD:
        newSeqIdx->maxVarExtBitsPerBucket = *(uint64_t *)(buf + offset + 4);
        offset += 12;
        break;
      case CEXB_HEADER_FIELD:
        newSeqIdx->cwExtBitsPerBucket = *(uint64_t *)(buf + offset + 4);
        offset += 12;
        break;
      case 0:
        /* empty header skip to next portion */
        offset = headerLen;
        break;
      default:
        if ((currentHeader & 0xffff0000L) == EH_HEADER_PREFIX)
        {
          uint32_t extHeaderLen = *(uint32_t *)(buf + offset + 4);
          offset += EXT_HEADER_PREFIX_SIZE;
          appendExtHeaderPos(&newSeqIdx->extHeaderPos,
                             newSeqIdx->numExtHeaders++,
                             offset, currentHeader);
          offset += extHeaderLen;
        }
        else
        {
          gt_error_set(err, "Unknown header field: %4s", buf + offset);
          loadBlockEncIdxSeqErrRet();
        }
      }
    }
    gt_assert(newSeqIdx->modes
           && newSeqIdx->bucketBlocks
           && newSeqIdx->numModes
           && offset == headerLen);
    /* compute values not read from header */
    if (!newSeqIdx->bitsPerUlong)
      newSeqIdx->bitsPerUlong =
        requiredUlongBits(newSeqIdx->baseClass.seqLen - 1);
    else if (newSeqIdx->bitsPerUlong !=
            requiredUlongBits(newSeqIdx->baseClass.seqLen - 1)) {
      gt_error_set(err, "bits per ulong wrong in header found %u, expected %u",
                   newSeqIdx->bitsPerUlong,
                   requiredUlongBits(newSeqIdx->baseClass.seqLen - 1));
      loadBlockEncIdxSeqErrRet();
    }
  }
  {
    AlphabetRangeID range, numAlphabetRanges = newSeqIdx->numModes =
      MRAEncGetNumRanges(alphabet);
    totalAlphabetSize = gt_MRAEncGetSize(alphabet);
    blockMapAlphabetSize = 0;
    for (range = 0; range < numAlphabetRanges; ++range)
    {
      switch (modesCopy[range])
      {
      case BLOCK_COMPOSITION_INCLUDE:
        blockMapAlphabetSize += MRAEncGetRangeSize(alphabet, range);
        break;
      case DIRECT_SYM_ENCODE:
        /*< FIXME: insert proper code to process direct encoding regions */
        break;
      case REGIONS_LIST:
        /*< FIXME: insert proper code to process ranges */
        break;
      default:
        gt_error_set(err, "Invalid encoding request.");
        loadBlockEncIdxSeqErrRet();
        break;
      }
    }
    newSeqIdx->blockMapAlphabet = blockMapAlphabet =
      gt_MRAEncSecondaryMapping(alphabet, BLOCK_COMPOSITION_INCLUDE, modesCopy,
                             newSeqIdx->blockEncFallback);
    newSeqIdx->rangeMapAlphabet = rangeMapAlphabet =
      gt_MRAEncSecondaryMapping(alphabet, REGIONS_LIST, modesCopy,
                             newSeqIdx->rangeEncFallback);
    newSeqIdx->blockMapAlphabetSize = blockMapAlphabetSize;
    gt_assert(gt_MRAEncGetSize(blockMapAlphabet) == blockMapAlphabetSize);
  }
  if (!newSeqIdx->partialSymSumBits && blockMapAlphabetSize)
  {
    newSeqIdx->partialSymSumBits
      = gt_malloc(sizeof (newSeqIdx->partialSymSumBits[0])
                  * blockMapAlphabetSize * 2);
    newSeqIdx->partialSymSumBitsSums
      = newSeqIdx->partialSymSumBits + blockMapAlphabetSize;
    symSumBitsDefaultSetup(newSeqIdx);
  }
  if (!gt_initCompositionList(&newSeqIdx->compositionTable,
                              newSeqIdx->blockSize,
                              blockMapAlphabetSize)) {
    gt_error_set(err, "error initialising composition list");
    loadBlockEncIdxSeqErrRet();
  }
  if (newSeqIdx->bitsPerVarDiskOffset == 0)
    newSeqIdx->bitsPerVarDiskOffset =
      gt_requiredUInt64Bits(
        vwBitsSimple(newSeqIdx->baseClass.seqLen, newSeqIdx->blockSize,
                     newSeqIdx->bucketBlocks,
                     newSeqIdx->compositionTable.maxPermIdxBits,
                     newSeqIdx->maxVarExtBitsPerBucket));

  if (fseeko(newSeqIdx->externalData.idxFP,
             newSeqIdx->externalData.rangeEncPos, SEEK_SET)) {
    gt_error_set(err, "error in fseeko");
    loadBlockEncIdxSeqErrRet();
  }
  {
    int regionFeatures = SRL_NO_FEATURES;
    if (features & EIS_FEATURE_REGION_SUMS)
      regionFeatures |= SRL_PARTIAL_SYMBOL_SUMS;
    if (!(newSeqIdx->rangeEncs =
          gt_SRLReadFromStream(newSeqIdx->externalData.idxFP, rangeMapAlphabet,
                            regionFeatures, err))) {
      gt_error_set(err, "error creating rangeEncs");
      loadBlockEncIdxSeqErrRet();
    }
  }
  tryMMapOfIndex(&newSeqIdx->externalData);
  gt_free(buf);
  return &newSeqIdx->baseClass;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, (%rsp)
testq %rsi, %rsi
je 0x2aa262
movq %rcx, %r15
testq %rcx, %rcx
je 0x2aa262
movl %edx, %ebp
movq %rsi, %r14
leaq 0xd7972(%rip), %rdx     # 0x380d80
pushq $0x1
popq %rsi
movl $0xe8, %edi
movl $0x84d, %ecx            # imm = 0x84D
callq 0x9334a
movq %rax, %r13
movq %rax, %rbx
movq (%rsp), %rax
movq %rax, 0x8(%r13)
leaq 0x18e74b(%rip), %rax    # 0x437b80
movq %rax, (%r13)
leaq 0x18(%r13), %r12
leaq 0x9c659(%rip), %rdx     # 0x345a9d
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x2a8c91
testl %eax, %eax
je 0x2a957e
movl %ebp, 0x34(%rsp)
movq %r15, 0x28(%rsp)
leaq 0xd7916(%rip), %rsi     # 0x380d80
pushq $0x8
popq %rbp
movq %rbp, %rdi
movl $0x857, %edx            # imm = 0x857
callq 0x93160
movq %rax, %r15
movq (%r12), %rcx
pushq $0x1
popq %rdx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x17ad0
cmpq $0x1, %rax
jne 0x2a9646
leaq 0xd883b(%rip), %rsi     # 0x381cdb
movq %r15, %rdi
callq 0x179e0
testl %eax, %eax
je 0x2a9725
leaq 0xd7b48(%rip), %rsi     # 0x380fff
movq 0x28(%rsp), %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x89dbb
movq %r12, %rdi
callq 0x2a8b56
cmpl $0x0, 0x60(%rbx)
je 0x2a94e0
addq $0x48, %r13
movq %r13, %rdi
callq 0x2ad242
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x2a94ee
callq 0x2ad6ff
movq 0x78(%rbx), %rdi
leaq 0xd7887(%rip), %r14     # 0x380d80
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x936f9
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x936f9
movq %r15, %rdi
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x936f9
cmpq $0x0, (%rsp)
je 0x2a953a
movq (%rsp), %rdi
callq 0x149458
leaq 0xd783f(%rip), %r14     # 0x380d80
xorl %edi, %edi
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
jmp 0x2a970c
leaq 0xd7a45(%rip), %rsi     # 0x380fca
movq %r15, %rdi
xorl %eax, %eax
callq 0x89dbb
movq %r12, %rdi
callq 0x2a8b56
cmpl $0x0, 0x60(%rbx)
je 0x2a95a9
addq $0x48, %r13
movq %r13, %rdi
callq 0x2ad242
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x2a95b7
callq 0x2ad6ff
movq 0x78(%rbx), %rdi
leaq 0xd77be(%rip), %r14     # 0x380d80
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x936f9
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x936f9
cmpq $0x0, (%rsp)
je 0x2a9602
movq (%rsp), %rdi
callq 0x149458
leaq 0xd7777(%rip), %r14     # 0x380d80
xorl %edi, %edi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
jmp 0x2a970c
leaq 0xd799a(%rip), %rsi     # 0x380fe7
movq 0x28(%rsp), %rdi
xorl %eax, %eax
callq 0x89dbb
movq %r12, %rdi
callq 0x2a8b56
cmpl $0x0, 0x60(%rbx)
je 0x2a9673
addq $0x48, %r13
movq %r13, %rdi
callq 0x2ad242
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x2a9681
callq 0x2ad6ff
movq 0x78(%rbx), %rdi
leaq 0xd76f4(%rip), %r14     # 0x380d80
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x936f9
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x936f9
movq %r15, %rdi
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x936f9
cmpq $0x0, (%rsp)
je 0x2a96cd
movq (%rsp), %rdi
callq 0x149458
leaq 0xd76ac(%rip), %r14     # 0x380d80
xorl %edi, %edi
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x936f9
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, 0x20(%rsp)
movl 0x4(%r15), %r14d
movq %r14, 0x30(%rbx)
leaq 0xd7647(%rip), %rdx     # 0x380d80
movq %r15, %rdi
movq %r14, %rsi
movl $0x862, %ecx            # imm = 0x862
callq 0x93472
movq %rax, %r12
leaq 0x8(%rax), %rdi
leaq -0x8(%r14), %rsi
movq 0x18(%rbx), %rcx
pushq $0x1
popq %rdx
callq 0x17ad0
cmpq $0x1, %rax
jne 0x2a9a6c
leaq 0x78(%r13), %rax
movq %rax, 0x40(%rsp)
leaq 0xc(%r12), %rax
movq %rax, 0x38(%rsp)
xorl %edx, %edx
movq %rbx, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq %rbp, %r15
cmpq %r14, %rbp
jae 0x2a9b39
movl (%r12,%r15), %ecx
movq %r14, %rbp
testl %ecx, %ecx
je 0x2a9789
leaq (%r12,%r15), %rbp
cmpl $0x42424c4b, %ecx       # imm = 0x42424C4B
je 0x2a984d
cmpl $0x42454642, %ecx       # imm = 0x42454642
je 0x2a9a55
cmpl $0x424b535a, %ecx       # imm = 0x424B535A
je 0x2a9877
cmpl $0x43424d42, %ecx       # imm = 0x43424D42
je 0x2a985b
cmpl $0x43455842, %ecx       # imm = 0x43455842
je 0x2a99b9
cmpl $0x4d455842, %ecx       # imm = 0x4D455842
je 0x2a9885
cmpl $0x4e4d524e, %ecx       # imm = 0x4E4D524E
je 0x2a99d0
cmpl $0x52454642, %ecx       # imm = 0x52454642
je 0x2a993b
cmpl $0x524f4646, %ecx       # imm = 0x524F4646
je 0x2a99af
cmpl $0x564f4646, %ecx       # imm = 0x564F4646
je 0x2a99a5
cmpl $0x53504254, %ecx       # imm = 0x53504254
je 0x2a9869
cmpl $0x53534254, %ecx       # imm = 0x53534254
je 0x2a98a3
cmpl $0x56444f42, %ecx       # imm = 0x56444F42
je 0x2a9895
cmpl $0x53454c45, %ecx       # imm = 0x53454C45
jne 0x2a9949
movq 0x4(%rbp), %rax
movq %rax, 0x10(%rbx)
jmp 0x2a99c4
movl 0x4(%rbp), %eax
movl %eax, 0xb0(%rbx)
jmp 0x2a9a60
movl 0x4(%rbp), %eax
movl %eax, 0xb8(%rbx)
jmp 0x2a9a60
movl 0x4(%rbp), %eax
movl %eax, 0xbc(%rbx)
jmp 0x2a9a60
movl 0x4(%rbp), %eax
movl %eax, 0xb4(%rbx)
jmp 0x2a9a60
movq 0x4(%rbp), %rax
movq %rax, 0x88(%rbx)
jmp 0x2a99c4
movl 0x4(%rbp), %eax
movl %eax, 0xc0(%rbx)
jmp 0x2a9a60
movq %rdx, 0x18(%rsp)
movq %rbx, %r12
movzbl 0x4(%rbp), %ebx
leal (,%rbx,8), %edi
leaq 0xd74c3(%rip), %rsi     # 0x380d80
movl $0x8a2, %edx            # imm = 0x8A2
callq 0x93160
movq %rax, 0xd0(%r12)
leaq (%rax,%rbx,4), %rdx
movq %rdx, 0xd8(%r12)
movq 0x10(%rsp), %r12
movl %ebx, %ecx
testq %rbx, %rbx
je 0x2a9a43
movl 0x8(%rbp), %esi
movl %esi, (%rax)
leal (,%rbx,4), %esi
andl $0x0, (%rax,%rsi)
decq %rbx
addq %rax, %rsi
addq $0x4, %rsi
movq %rax, %rdi
addq $0x4, %rdi
movq 0x38(%rsp), %r8
addq %r15, %r8
xorl %r9d, %r9d
cmpq %r9, %rbx
je 0x2a9a30
movl (%r8,%r9,4), %r10d
movl %r10d, (%rdi,%r9,4)
movl -0x4(%rdi,%r9,4), %r10d
addl -0x4(%rsi,%r9,4), %r10d
movl %r10d, (%rsi,%r9,4)
incq %r9
jmp 0x2a9917
movb 0x4(%rbp), %al
movb %al, 0xc7(%rbx)
jmp 0x2a9a60
movq %rdx, %r12
movl %ecx, %eax
andl $0xffff0000, %eax       # imm = 0xFFFF0000
cmpl $0x45480000, %eax       # imm = 0x45480000
jne 0x2aa0bf
movl 0x4(%rbp), %ebx
leaq 0x8(%r15), %rdx
movq 0x8(%rsp), %rax
movq 0x80(%rax), %rsi
leaq 0x1(%rsi), %rax
movq 0x8(%rsp), %rdi
movq %rax, 0x80(%rdi)
movq 0x40(%rsp), %rdi
callq 0x2aa2f6
leaq (%r15,%rbx), %rbp
addq $0x8, %rbp
movq 0x8(%rsp), %rbx
movq %r12, %rdx
movq 0x10(%rsp), %r12
jmp 0x2a9789
movq 0x4(%rbp), %rax
movq %rax, 0x38(%rbx)
jmp 0x2a99c4
movq 0x4(%rbp), %rax
movq %rax, 0x40(%rbx)
jmp 0x2a99c4
movq 0x4(%rbp), %rax
movq %rax, 0x90(%rbx)
addq $0xc, %r15
movq %r15, %rbp
jmp 0x2a9789
movq %rbx, %r12
movslq 0x4(%rbp), %rbx
movl %ebx, 0xc8(%r12)
addq $0x8, %r15
leaq (,%rbx,4), %rdi
leaq 0xd738e(%rip), %rsi     # 0x380d80
movl $0x887, %edx            # imm = 0x887
callq 0x93160
movq %rax, %rdx
movq %rax, 0xa8(%r12)
movq 0x10(%rsp), %r12
movq %r15, %rbp
xorl %eax, %eax
cmpq %rax, %rbx
je 0x2a9a26
movl (%r12,%rbp), %ecx
movl %ecx, (%rdx,%rax,4)
addq $0x4, %rbp
incq %rax
jmp 0x2a9a11
movq 0x8(%rsp), %rbx
jmp 0x2a9789
movl -0x4(%rax,%rcx,4), %eax
addl -0x4(%rdx,%rcx,4), %eax
movq 0x8(%rsp), %rdx
movl %eax, 0xe0(%rdx)
leaq (%r15,%rcx,4), %r15
addq $0x8, %r15
movq 0x8(%rsp), %rbx
movq 0x18(%rsp), %rdx
movb 0x4(%r12,%r15), %al
movb %al, 0xc6(%rbx)
addq $0x8, %r15
movq %r15, %rbp
jmp 0x2a9789
leaq 0xd75af(%rip), %rsi     # 0x381022
movq 0x28(%rsp), %rdi
xorl %eax, %eax
callq 0x89dbb
movq 0x20(%rsp), %rdi
callq 0x2a8b56
cmpl $0x0, 0x60(%rbx)
je 0x2a9a9b
addq $0x48, %r13
movq %r13, %rdi
callq 0x2ad242
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x2a9aa9
callq 0x2ad6ff
movq 0x78(%rbx), %rdi
leaq 0xd72cc(%rip), %r14     # 0x380d80
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x936f9
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x936f9
movq %r12, %rdi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x936f9
cmpq $0x0, (%rsp)
je 0x2a9af5
movq (%rsp), %rdi
callq 0x149458
leaq 0xd7284(%rip), %r14     # 0x380d80
xorl %edi, %edi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
jmp 0x2a970c
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0xa8(%rbx)
je 0x2aa29a
cmpl $0x0, 0xb0(%rbx)
je 0x2aa29a
cmpq %r14, %r15
jne 0x2aa29a
cmpl $0x0, 0xc8(%rbx)
je 0x2aa29a
movq %rbx, %r14
movl 0xbc(%rbx), %ebx
movq 0x10(%r14), %rdi
decq %rdi
callq 0x28a939
testl %ebx, %ebx
je 0x2a9c7d
cmpl %eax, %ebx
movq %r14, %rbx
je 0x2a9c87
movl 0xbc(%rbx), %ebp
movq 0x10(%rbx), %rdi
decq %rdi
callq 0x28a939
leaq 0xd74fb(%rip), %rsi     # 0x3810ab
movq 0x28(%rsp), %rdi
movl %ebp, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x89dbb
movq 0x20(%rsp), %rdi
callq 0x2a8b56
cmpl $0x0, 0x60(%rbx)
je 0x2a9bdc
addq $0x48, %r13
movq %r13, %rdi
callq 0x2ad242
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x2a9bea
callq 0x2ad6ff
movq 0x78(%rbx), %rdi
leaq 0xd718b(%rip), %r14     # 0x380d80
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x936f9
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x936f9
movq %r12, %rdi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x936f9
cmpq $0x0, (%rsp)
je 0x2a9c36
movq (%rsp), %rdi
callq 0x149458
leaq 0xd7143(%rip), %r14     # 0x380d80
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
jmp 0x2a970c
movl %eax, 0xbc(%r14)
movq %r14, %rbx
movq (%rsp), %rdi
movl 0x4(%rdi), %ebp
movl %ebp, 0xc8(%rbx)
callq 0x14906a
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rsp), %r12
cmpq %r14, %rbp
je 0x2a9cd8
movl (%r12,%r14,4), %eax
testl %eax, %eax
je 0x2a9cd3
cmpl $0x2, %eax
je 0x2a9cd3
cmpl $0x1, %eax
jne 0x2a9fa4
movq (%rsp), %rdi
movl %r14d, %esi
callq 0x2a8adf
addb %al, %r15b
movq 0x18(%rsp), %r12
incq %r14
jmp 0x2a9ca4
movzbl 0xc6(%rbx), %ecx
pushq $0x1
popq %rsi
movq (%rsp), %r14
movq %r14, %rdi
movq %r12, %rdx
callq 0x149084
movq %rax, %rbp
movq %rax, 0x98(%rbx)
movzbl 0xc7(%rbx), %ecx
pushq $0x2
popq %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x149084
movq %rax, %r12
movq %rax, 0xa0(%rbx)
movzbl %r15b, %r14d
movw %r14w, 0xc4(%rbx)
movq %rbp, 0x8(%rsp)
movq %rbp, %rdi
callq 0x14906a
cmpw %r14w, %ax
jne 0x2aa2c8
cmpq $0x0, 0xd0(%rbx)
movl 0x34(%rsp), %ebp
jne 0x2a9d83
testb %r15b, %r15b
je 0x2a9d83
leal (,%r14,8), %edi
leaq 0xd7021(%rip), %rsi     # 0x380d80
movl $0x919, %edx            # imm = 0x919
callq 0x93160
movq %rax, 0xd0(%rbx)
leaq (%rax,%r14,4), %rax
movq %rax, 0xd8(%rbx)
movq %rbx, %rdi
callq 0x2a8bac
addq $0x48, %r13
movl 0xb4(%rbx), %esi
movq %r13, %rdi
movl %r14d, %edx
callq 0x2aca90
testl %eax, %eax
je 0x2a9ed2
cmpl $0x0, 0xc0(%rbx)
movq 0x28(%rsp), %r14
jne 0x2a9deb
movq 0x10(%rbx), %rax
movl 0xb0(%rbx), %edi
movl 0xb4(%rbx), %ecx
imull %edi, %ecx
incq %rax
xorl %edx, %edx
divq %rcx
cmpq $0x1, %rdx
sbbq $-0x1, %rax
imull 0x6c(%rbx), %edi
addq 0x88(%rbx), %rdi
imulq %rax, %rdi
callq 0x28a939
movl %eax, 0xc0(%rbx)
movq 0x18(%rbx), %rdi
movq 0x40(%rbx), %rsi
xorl %edx, %edx
callq 0x17c70
testl %eax, %eax
je 0x2aa079
leaq 0xd7315(%rip), %rsi     # 0x38111e
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
movq 0x20(%rsp), %rdi
callq 0x2a8b56
cmpl $0x0, 0x60(%rbx)
je 0x2a9e2b
movq %r13, %rdi
callq 0x2ad242
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x2a9e39
callq 0x2ad6ff
movq 0x78(%rbx), %rdi
leaq 0xd6f3c(%rip), %r14     # 0x380d80
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x936f9
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x936f9
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x936f9
cmpq $0x0, (%rsp)
je 0x2a9e87
movq (%rsp), %rdi
callq 0x149458
leaq 0xd6ef2(%rip), %r14     # 0x380d80
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x936f9
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x936f9
movq %r12, %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
jmp 0x2a970c
leaq 0xd7221(%rip), %rsi     # 0x3810fa
movq 0x28(%rsp), %rdi
xorl %eax, %eax
callq 0x89dbb
movq 0x20(%rsp), %rdi
callq 0x2a8b56
cmpl $0x0, 0x60(%rbx)
je 0x2a9efd
movq %r13, %rdi
callq 0x2ad242
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x2a9f0b
callq 0x2ad6ff
movq 0x78(%rbx), %rdi
leaq 0xd6e6a(%rip), %r14     # 0x380d80
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x936f9
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x936f9
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x936f9
cmpq $0x0, (%rsp)
je 0x2a9f59
movq (%rsp), %rdi
callq 0x149458
leaq 0xd6e20(%rip), %r14     # 0x380d80
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x936f9
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x936f9
movq %r12, %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
jmp 0x2a970c
leaq 0xd7135(%rip), %rsi     # 0x3810e0
movq 0x28(%rsp), %rdi
xorl %eax, %eax
callq 0x89dbb
movq 0x20(%rsp), %rdi
callq 0x2a8b56
cmpl $0x0, 0x60(%rbx)
je 0x2a9fd3
addq $0x48, %r13
movq %r13, %rdi
callq 0x2ad242
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
movq 0x10(%rsp), %r15
je 0x2a9fe6
callq 0x2ad6ff
movq 0x78(%rbx), %rdi
leaq 0xd6d8f(%rip), %r14     # 0x380d80
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x936f9
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x936f9
movq %r15, %rdi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x936f9
cmpq $0x0, (%rsp)
je 0x2aa032
movq (%rsp), %rdi
callq 0x149458
leaq 0xd6d47(%rip), %r14     # 0x380d80
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
jmp 0x2a970c
andl $0x1, %ebp
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0x2ae315
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x2aa192
movq 0x20(%rsp), %rdi
callq 0x2a9334
leaq 0xd6cd5(%rip), %rsi     # 0x380d80
movq 0x10(%rsp), %rdi
movl $0x93d, %edx            # imm = 0x93D
callq 0x936f9
jmp 0x2a9713
leaq 0xd6f71(%rip), %rsi     # 0x381037
movq 0x28(%rsp), %rdi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x89dbb
movq 0x20(%rsp), %rdi
callq 0x2a8b56
cmpl $0x0, 0x60(%rbx)
je 0x2aa0f1
addq $0x48, %r13
movq %r13, %rdi
callq 0x2ad242
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x2aa0ff
callq 0x2ad6ff
movq 0x78(%rbx), %rdi
leaq 0xd6c76(%rip), %r14     # 0x380d80
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x936f9
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x936f9
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x936f9
cmpq $0x0, (%rsp)
je 0x2aa14d
movq (%rsp), %rdi
callq 0x149458
leaq 0xd6c2c(%rip), %r14     # 0x380d80
movq %r12, %rdi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x936f9
xorl %edi, %edi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
jmp 0x2a970c
leaq 0xd6f95(%rip), %rsi     # 0x38112e
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
movq 0x20(%rsp), %rdi
callq 0x2a8b56
cmpl $0x0, 0x60(%rbx)
je 0x2aa1bb
movq %r13, %rdi
callq 0x2ad242
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x2aa1c9
callq 0x2ad6ff
movq 0x78(%rbx), %rdi
leaq 0xd6bac(%rip), %r14     # 0x380d80
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x936f9
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x936f9
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x936f9
cmpq $0x0, (%rsp)
je 0x2aa217
movq (%rsp), %rdi
callq 0x149458
leaq 0xd6b62(%rip), %r14     # 0x380d80
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x936f9
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x936f9
movq %r12, %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
jmp 0x2a970c
movq 0x18dcff(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x3ada0(%rip), %rsi     # 0x2e5013
leaq 0x994af(%rip), %rdx     # 0x343729
leaq 0xd6d30(%rip), %rcx     # 0x380fb1
leaq 0xd6af8(%rip), %r8      # 0x380d80
movl $0x84c, %r9d            # imm = 0x84C
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x18dcc7(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x3ad68(%rip), %rsi     # 0x2e5013
leaq 0xd6d9f(%rip), %rdx     # 0x381051
leaq 0xd6cf8(%rip), %rcx     # 0x380fb1
leaq 0xd6ac0(%rip), %r8      # 0x380d80
movl $0x8e7, %r9d            # imm = 0x8E7
jmp 0x2aa28e
movq 0x18dc99(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x3ad3a(%rip), %rsi     # 0x2e5013
leaq 0xd6b46(%rip), %rdx     # 0x380e26
leaq 0xd6cca(%rip), %rcx     # 0x380fb1
leaq 0xd6a92(%rip), %r8      # 0x380d80
movl $0x913, %r9d            # imm = 0x913
jmp 0x2aa28e