// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/eis-blockcomp.c
// Function: gt_newGenBlockEncIdxSeq
EISeq *
gt_newGenBlockEncIdxSeq(GtUword totalLen, const char *projectName,
                        MRAEnc *alphabet, const struct seqStats *stats,
                        SeqDataReader BWTGenerator,
                        const struct seqBaseParam *params,
                        size_t numExtHeaders, const uint16_t *headerIDs,
                        const uint32_t *extHeaderSizes,
                        headerWriteFunc *extHeaderCallbacks,
                        void **headerCBData,
                        bitInsertFunc biFunc, BitOffset cwExtBitsPerPos,
                        varExtBitsEstimator biVarBits, void *cbState,
                        GtError *err)
{
  struct blockCompositionSeq *newSeqIdx = NULL;
  AlphabetRangeSize blockMapAlphabetSize, totalAlphabetSize;
  size_t regionsEstimate=totalLen / 100;
  MRAEnc *blockMapAlphabet = NULL, *rangeMapAlphabet = NULL;
  BitOffset bitsPerComposition, bitsPerPermutation;
  unsigned compositionIdxBits, callBackDataOffsetBits,
    blockSize = params->encParams.blockEnc.blockSize,
    bucketBlocks = params->encParams.blockEnc.bucketBlocks;
  size_t bucketLen = (size_t)bucketBlocks * blockSize;
  int *modesCopy = NULL;
  struct varBitsEstimate biMaxExtSize;
  enum rangeStoreMode modes[] = { BLOCK_COMPOSITION_INCLUDE,
                                  REGIONS_LIST };
  gt_assert(projectName);
  gt_assert(params->encType == BWT_ON_BLOCK_ENC);
  gt_assert(blockSize > 0);
  gt_assert((biFunc && biVarBits) || (biFunc == NULL && biVarBits == NULL));
  gt_error_check(err);

  newSeqIdx = gt_calloc(sizeof (struct blockCompositionSeq), 1);
  newSeqIdx->bucketBlocks = bucketBlocks;
  newSeqIdx->bitsPerUlong = requiredUlongBits((newSeqIdx->baseClass.seqLen
                                                 = totalLen) - 1);
  newSeqIdx->baseClass.alphabet = alphabet;
  {
    size_t range, numAlphabetRanges = newSeqIdx->numModes =
      MRAEncGetNumRanges(alphabet);
    totalAlphabetSize = gt_MRAEncGetSize(alphabet);
    blockMapAlphabetSize = 0;
    newSeqIdx->modes = modesCopy = gt_malloc(sizeof (int) * numAlphabetRanges);
    for (range = 0; range < numAlphabetRanges; ++range)
    {
      modesCopy[range] = modes[range];
      switch (modes[range])
      {
      case BLOCK_COMPOSITION_INCLUDE:
        blockMapAlphabetSize += MRAEncGetRangeSize(alphabet, range);
        break;
      case DIRECT_SYM_ENCODE:
        /*< OUTLOOK: insert proper code to process ranges
         * to improve orthogonality */
        break;
      case REGIONS_LIST:
        /*< OUTLOOK: insert proper code to process ranges
         * to improve orthogonality */
        break;
      default:
        gt_log_log("Invalid encoding request.\n");
        newBlockEncIdxSeqErrRet();
        break;
      }
    }
    newSeqIdx->blockMapAlphabetSize = blockMapAlphabetSize;
    newSeqIdx->blockMapAlphabet = blockMapAlphabet =
      gt_MRAEncSecondaryMapping(alphabet, BLOCK_COMPOSITION_INCLUDE, modesCopy,
                             newSeqIdx->blockEncFallback = 0);
    newSeqIdx->rangeMapAlphabet = rangeMapAlphabet =
      gt_MRAEncSecondaryMapping(alphabet, REGIONS_LIST, modesCopy,
                             newSeqIdx->rangeEncFallback = 0);
    gt_assert(gt_MRAEncGetSize(blockMapAlphabet) == blockMapAlphabetSize);
    gt_assert(gt_MRAEncGetSize(rangeMapAlphabet)
           == totalAlphabetSize - blockMapAlphabetSize);
  }
  newSeqIdx->partialSymSumBits
    = gt_malloc(sizeof (newSeqIdx->partialSymSumBits[0])
                * blockMapAlphabetSize * 2);
  newSeqIdx->partialSymSumBitsSums
    = newSeqIdx->partialSymSumBits + blockMapAlphabetSize;
  if (stats)
  {
    GtUword *symCounts;
    symCounts = gt_malloc(sizeof (symCounts[0]) * blockMapAlphabetSize);
    switch (stats->sourceAlphaType)
    {
    case sourceUInt8:
      memset(symCounts, 0,
             sizeof (symCounts[0]) * blockMapAlphabetSize);
      {
        Symbol eSym, bSym;
        unsigned i;
        for (i = 0; i <= UINT8_MAX; ++i)
          if (gt_MRAEncSymbolIsInSelectedRanges(
                alphabet, eSym = MRAEncMapSymbol(alphabet, i),
                BLOCK_COMPOSITION_INCLUDE, modesCopy)
              && ((bSym = MRAEncMapSymbol(blockMapAlphabet, eSym))
                  < blockMapAlphabetSize))
            symCounts[bSym]
              += stats->symbolDistributionTable[i];
#ifdef EIS_DEBUG
        for (i = 0; i < blockMapAlphabetSize; ++i)
        {
          gt_log_log("symCount[%"PRIuSymbol"]="GT_WU"\n", (Symbol) i,
                  stats->symbolDistributionTable[i]);
        }
#endif /* EIS_DEBUG */
        if (blockMapAlphabetSize)
        {
          newSeqIdx->partialSymSumBitsSums[0] = 0;
          newSeqIdx->partialSymSumBits[0] = requiredUlongBits(symCounts[0]);
          for (i = 1; i < blockMapAlphabetSize; ++i)
          {
            newSeqIdx->partialSymSumBitsSums[i]
              = newSeqIdx->partialSymSumBitsSums[i - 1]
              + newSeqIdx->partialSymSumBits[i - 1];
            newSeqIdx->partialSymSumBits[i]
              = requiredUlongBits(symCounts[i]);
          }
#ifdef EIS_DEBUG
          for (i = 0; i < blockMapAlphabetSize; ++i)
          {
            gt_log_log("bitsPerSymSum[%"PRIuSymbol"]=%u\n", (Symbol)i,
                    newSeqIdx->partialSymSumBits[i]);
          }
#endif  /* EIS_DEBUG */
          newSeqIdx->symSumBits
            = newSeqIdx->partialSymSumBitsSums[blockMapAlphabetSize - 1]
            + newSeqIdx->partialSymSumBits[blockMapAlphabetSize - 1];
#ifdef EIS_DEBUG
          gt_log_log("symSumBits total: %u\n", newSeqIdx->symSumBits);
#endif  /* EIS_DEBUG */
        }
      }
      /* count special characters to estimate number of regions required */
      {
        Symbol eSym, rSym;
        GtUword regionSymCount = 0;
        AlphabetRangeSize rangeMapAlphabetSize
          = gt_MRAEncGetSize(rangeMapAlphabet);
        unsigned i;
        for (i = 0; i <= UINT8_MAX; ++i)
          if (gt_MRAEncSymbolIsInSelectedRanges(
               alphabet, eSym = MRAEncMapSymbol(alphabet, i),
               REGIONS_LIST, modesCopy)
             && ((rSym = MRAEncMapSymbol(rangeMapAlphabet, eSym))
                 < rangeMapAlphabetSize))
            regionSymCount += stats->symbolDistributionTable[i];
        regionsEstimate = regionSymCount/20;
#ifdef EIS_DEBUG
        gt_log_log("Expected "GT_WU" symbols to encode in regions.\n",
                    regionSymCount);
#endif
      }
      break;
    default:
      symSumBitsDefaultSetup(newSeqIdx);
    }
    gt_free(symCounts);
  }
  else
  {
    symSumBitsDefaultSetup(newSeqIdx);
  }
  {
    int regionFeatures = SRL_NO_FEATURES;
    if (params->EISFeatureSet & EIS_FEATURE_REGION_SUMS)
      regionFeatures |= SRL_PARTIAL_SYMBOL_SUMS;
    newSeqIdx->rangeEncs = gt_newSeqRangeList(regionsEstimate, rangeMapAlphabet,
                                           regionFeatures);
  }
  newSeqIdx->baseClass.classInfo = &blockCompositionSeqClass;
  if (!gt_initCompositionList(&newSeqIdx->compositionTable, blockSize,
                           blockMapAlphabetSize))
  {
    gt_error_set(err, "Insufficient memory for selected block size %u and "
              "alphabet size %u, try smaller block size?\n", blockSize,
              blockMapAlphabetSize);
    newBlockEncIdxSeqErrRet();
  }
  bitsPerComposition = newSeqIdx->compositionTable.bitsPerCount
    * blockMapAlphabetSize;
  compositionIdxBits = newSeqIdx->compositionTable.compositionIdxBits;
  bitsPerPermutation = newSeqIdx->compositionTable.bitsPerSymbol * blockSize;
  newSeqIdx->blockSize = blockSize;
  newSeqIdx->cwExtBitsPerBucket = cwExtBitsPerPos * bucketLen;
  newSeqIdx->callBackDataOffsetBits = callBackDataOffsetBits
    = biFunc ? gt_requiredUInt64Bits(newSeqIdx->compositionTable.maxPermIdxBits
                                  * bucketBlocks) : 0;
  {
    BitOffset maxVarBitsTotal =
      vwBits(totalLen, blockSize, bucketBlocks,
             newSeqIdx->compositionTable.maxPermIdxBits,
             biVarBits, cbState, &biMaxExtSize);
    newSeqIdx->bitsPerVarDiskOffset = gt_requiredUInt64Bits(maxVarBitsTotal);
  }
  newSeqIdx->maxVarExtBitsPerBucket = biMaxExtSize.maxBitsPerBucket;
  {
    size_t headerLen = blockEncIdxSeqHeaderLength(newSeqIdx, numExtHeaders,
                                                  extHeaderSizes);
    if (!openOnDiskData(projectName, &newSeqIdx->externalData, "wb+",err))
      newBlockEncIdxSeqErrRet();
    initOnDiskBlockCompIdx(&newSeqIdx->externalData,
                           headerLen, cwSize(newSeqIdx));
  }
  /* At this point everything should be ready to receive the actual sequence
   * information, steps: */
  {
    int hadGtError = 0;
    do
    {
      {
        Symbol *block;
        unsigned *compositionPreAlloc;
        BitString permCompBSPreAlloc;
        partialSymSum *buck, *buckLast;
        block = gt_malloc(sizeof (Symbol) * blockSize);
        compositionPreAlloc = gt_malloc(sizeof (compositionPreAlloc[0])
                                        * blockMapAlphabetSize);
        permCompBSPreAlloc =
          gt_malloc(bitElemsAllocSize(bitsPerComposition + bitsPerPermutation)
                    * sizeof (BitElem));
        buck = newPartialSymSums(totalAlphabetSize);
        buckLast = newPartialSymSums(totalAlphabetSize);
        /* 2. read block sized chunks from bwttab and suffix array */
        {
          GtUword numFullBlocks = totalLen / blockSize, blockNum,
            lastUpdatePos = 0;
          /* pos == totalLen - symbolsLeft */
          struct appendState aState;
          initAppendState(&aState, newSeqIdx);
          blockNum = 0;
          while (blockNum < numFullBlocks)
          {
            size_t readResult;
            /* 3. for each chunk: */
            readResult = SDRRead(BWTGenerator, block, blockSize);
            if (readResult != blockSize)
            {
              hadGtError = 1;
              perror("error condition while reading index data");
              break;
            }
            gt_MRAEncSymbolsTransform(alphabet, block, blockSize);
            addBlock2OutputBuffer(newSeqIdx, buck, blockNum,
                                  block, blockSize,
                                  alphabet, modesCopy,
                                  blockMapAlphabet, blockMapAlphabetSize,
                                  permCompBSPreAlloc, compositionPreAlloc,
                                  compositionIdxBits, &aState);
            /* update on-disk structure */
            if (!((++blockNum) % bucketBlocks))
            {
              GtUword pos = blockNum * blockSize;
              if (writeOutputBuffer(newSeqIdx, &aState, biFunc, lastUpdatePos,
                                    bucketLen, callBackDataOffsetBits, cbState,
                                    buckLast) < 0)
              {
                hadGtError = 1;
                break;
              }
              /* update retained data */
              copyPartialSymSums(totalAlphabetSize, buckLast, buck);
              lastUpdatePos = pos;
            }
          }
          /* handle last chunk */
          if (!hadGtError)
          {
            GtUword symbolsLeft = totalLen % blockSize;
            if (symbolsLeft)
            {
              size_t readResult;
              readResult = SDRRead(BWTGenerator, block, symbolsLeft);
              if (readResult < symbolsLeft)
              {
                hadGtError = 1;
                perror("error condition while reading index data");
                newBlockEncIdxSeqLoopErr();
              }
              else
              {
                gt_MRAEncSymbolsTransform(alphabet, block, symbolsLeft);
                memset(block + symbolsLeft, 0,
                       sizeof (Symbol) * (blockSize - symbolsLeft));
                addBlock2OutputBuffer(newSeqIdx, buck, blockNum,
                                      block, blockSize,
                                      alphabet, modesCopy,
                                      blockMapAlphabet, blockMapAlphabetSize,
                                      permCompBSPreAlloc, compositionPreAlloc,
                                      compositionIdxBits, &aState);
              }
            }
            if (lastUpdatePos <= totalLen)
            {
              /* one bucket still unfinished */
              if (writeOutputBuffer(newSeqIdx, &aState, biFunc, lastUpdatePos,
                                    totalLen - lastUpdatePos,
                                    callBackDataOffsetBits, cbState,
                                    buckLast) < 0)
              {
                hadGtError = 1;
                break;
              }
            }
            if (!finalizeIdxOutput(newSeqIdx, &aState))
            {
              hadGtError = 1;
              perror("error condition while writing block-compressed"
                     " index data");
              newBlockEncIdxSeqLoopErr();
            }
            if (!writeIdxHeader(newSeqIdx, numExtHeaders, headerIDs,
                                extHeaderSizes, extHeaderCallbacks,
                                headerCBData, err))
            {
              hadGtError = 1;
              perror("error condition while writing block-compressed"
                     " index header");
              newBlockEncIdxSeqLoopErr();
            }
            if (fflush(newSeqIdx->externalData.idxFP))
            {
              hadGtError = 1;
              perror("error condition while writing block-compressed"
                     " index header");
              newBlockEncIdxSeqLoopErr();
            }
            tryMMapOfIndex(&newSeqIdx->externalData);
          }
          if (hadGtError)
          {
            newBlockEncIdxSeqLoopErr();
          }
          /* 4. dealloc resources no longer required */
          destructAppendState(&aState);
          deletePartialSymSums(buck);
          deletePartialSymSums(buckLast);
        }
        /* 4. dealloc resources no longer required */
        gt_free(compositionPreAlloc);
        gt_free(permCompBSPreAlloc);
        gt_free(block);
      }
    } while (0);
    /* close bwttab and suffix array */
    if (hadGtError)
      newBlockEncIdxSeqErrRet();
  }
  return &(newSeqIdx->baseClass);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %r9, 0x30(%rsp)
movq %r8, 0x40(%rsp)
movq %rdx, %rbp
movq %rdi, %rax
shrq $0x2, %rax
movabsq $0x28f5c28f5c28f5c3, %rdx # imm = 0x28F5C28F5C28F5C3
mulq %rdx
movq %rdx, 0x18(%rsp)
testq %rsi, %rsi
je 0x3141f2
movq 0x170(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x3141f7
movq %rdi, %r15
movl 0x8(%rax), %edi
testl %edi, %edi
je 0x3141fc
movq 0x1b0(%rsp), %r8
movq 0x1a0(%rsp), %rdx
movl 0xc(%rax), %r12d
testq %rdx, %rdx
setne %al
testq %r8, %r8
setne %r9b
testb %r9b, %al
jne 0x3127b9
movq %rdx, %rax
orq %r8, %rax
jne 0x314210
movq %rcx, 0x28(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x1c0(%rsp), %rdi
testq %rdi, %rdi
je 0x3127e2
callq 0x101a9a
testb %al, %al
jne 0x31420b
leaq 0xd78d7(%rip), %r14     # 0x3ea0c0
movl $0xe8, %edi
movl $0x1, %esi
movq %r14, %rdx
movl $0x150, %ecx            # imm = 0x150
callq 0x1093ef
movq %rax, %rbx
movq %r12, 0x50(%rsp)
movl %r12d, 0xb0(%rax)
movq %r15, 0x10(%rax)
movq %r15, 0x70(%rsp)
leaq -0x1(%r15), %rdi
callq 0x2f9d41
movl %eax, 0xbc(%rbx)
movq %rbp, 0x8(%rbx)
movslq 0x4(%rbp), %r12
movl %r12d, 0xc8(%rbx)
movq %rbp, %rdi
callq 0x1a67a7
movl %eax, %r15d
leaq (,%r12,4), %rdi
movq %r14, %rsi
movl $0x15a, %edx            # imm = 0x15A
callq 0x1092b2
movq %rax, %r13
movq %rbx, 0x8(%rsp)
movq %rax, 0xa8(%rbx)
movzwl %r15w, %eax
movq %rax, 0x90(%rsp)
testq %r12, %r12
setne %r15b
je 0x3128d1
leaq 0xd781f(%rip), %rax     # 0x3ea0a0
xorl %r14d, %r14d
xorl %ecx, %ecx
movl (%rax), %edx
movl %edx, (%r13,%rcx,4)
testl %edx, %edx
je 0x3128bc
cmpl $0x2, %edx
je 0x3128bc
cmpl $0x1, %edx
jne 0x312c1e
testq %rbp, %rbp
je 0x3141ed
cmpl %ecx, 0x4(%rbp)
jbe 0x3141e8
movq 0x10(%rbp), %rdx
movl %ecx, %esi
addw (%rdx,%rsi,2), %r14w
incq %rcx
cmpq %r12, %rcx
setb %r15b
addq $0x4, %rax
cmpq %rcx, %r12
jne 0x312886
jmp 0x3128d4
xorl %r14d, %r14d
movq 0x8(%rsp), %rbx
movw %r14w, 0xc4(%rbx)
xorl %eax, %eax
movb %al, 0xc6(%rbx)
movq %rbp, %rdi
movl $0x1, %esi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x1a67c6
movq %rax, %r12
movq %rax, 0x98(%rbx)
xorl %eax, %eax
movb %al, 0xc7(%rbx)
movq %rbp, %rdi
movl $0x2, %esi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x1a67c6
movq %rbx, %rcx
movq %rax, %rbx
movq %rax, 0xa0(%rcx)
movq %r12, 0x60(%rsp)
movq %r12, %rdi
callq 0x1a67a7
cmpw %r14w, %ax
jne 0x314201
movzwl %r14w, %r12d
movq %rbx, 0x58(%rsp)
movq %rbx, %rdi
callq 0x1a67a7
movzwl %ax, %eax
movq 0x90(%rsp), %rcx
subl %r12d, %ecx
cmpl %eax, %ecx
movq 0x60(%rsp), %rax
jne 0x314206
testb $0x1, %r15b
jne 0x3141b9
movq %rax, 0x60(%rsp)
shrq $0x2, 0x18(%rsp)
movzwl %r14w, %r12d
leal (,%r12,4), %ebx
leal (,%r12,8), %r15d
leaq 0xd7721(%rip), %rsi     # 0x3ea0c0
movq %r15, %rdi
movl $0x17e, %edx            # imm = 0x17E
callq 0x1092b2
movq 0x8(%rsp), %rdx
movq %rax, 0xd0(%rdx)
movq %rbx, 0x38(%rsp)
leaq (%rax,%rbx), %rcx
movq %rcx, 0xd8(%rdx)
movq 0x28(%rsp), %rbx
testq %rbx, %rbx
movq %r13, 0x48(%rsp)
movq %r12, 0x68(%rsp)
je 0x312bb5
leaq 0xd76d9(%rip), %rsi     # 0x3ea0c0
movq %r15, %rdi
movl $0x184, %edx            # imm = 0x184
callq 0x1092b2
cmpl $0x1, 0x8(%rbx)
movq %rax, 0x20(%rsp)
jne 0x312d19
xorl %r12d, %r12d
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x173a0
cmpl $0x1, (%rbp)
jne 0x3141e3
movzbl 0x18(%rbp,%r12), %r15d
movq %rbp, %rdi
movl %r15d, %esi
movl $0x1, %edx
movq %r13, %rcx
callq 0x1a6a6a
testl %eax, %eax
je 0x312a67
movq 0x60(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3141e3
movzbl 0x18(%rax,%r15), %eax
cmpw %ax, %r14w
jbe 0x312a67
movzwl %ax, %eax
movq (%rbx), %rcx
movq (%rcx,%r12,8), %rcx
movq 0x20(%rsp), %rdx
addq %rcx, (%rdx,%rax,8)
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x312a13
testw %r14w, %r14w
je 0x312b21
movq 0x8(%rsp), %rbx
movq 0xd8(%rbx), %rax
movl $0x0, (%rax)
movq 0x20(%rsp), %r13
movq (%r13), %rdi
callq 0x2f9d41
movq 0xd0(%rbx), %rcx
movl %eax, (%rcx)
cmpw $0x1, %r14w
movq 0x68(%rsp), %r12
je 0x312af8
leaq -0x1(%r12), %r14
xorl %r15d, %r15d
movq 0x8(%rsp), %rbx
movq 0xd0(%rbx), %rax
movq 0xd8(%rbx), %rcx
movl (%rax,%r15,4), %eax
addl (%rcx,%r15,4), %eax
movl %eax, 0x4(%rcx,%r15,4)
movq 0x8(%r13,%r15,8), %rdi
callq 0x2f9d41
movq 0xd0(%rbx), %rcx
movl %eax, 0x4(%rcx,%r15,4)
incq %r15
cmpq %r15, %r14
jne 0x312abf
movq 0x8(%rsp), %rsi
movq 0xd0(%rsi), %rax
movq 0xd8(%rsi), %rcx
movl %r12d, %edx
movl -0x4(%rax,%rdx,4), %eax
addl -0x4(%rcx,%rdx,4), %eax
movl %eax, 0xe0(%rsi)
movq 0x28(%rsp), %rbx
movq 0x58(%rsp), %rdi
callq 0x1a67a7
movl %eax, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpl $0x1, (%rbp)
jne 0x3141e3
movzbl 0x18(%rbp,%r12), %r14d
movq %rbp, %rdi
movl %r14d, %esi
movl $0x2, %edx
movq 0x48(%rsp), %rcx
callq 0x1a6a6a
testl %eax, %eax
je 0x312b7e
movq 0x58(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3141e3
movzbl 0x18(%rax,%r14), %eax
cmpw %ax, %r15w
jbe 0x312b7e
movq (%rbx), %rax
addq (%rax,%r12,8), %r13
movq 0x10(%rsp), %r14
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x312b34
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
movq %r13, %rax
mulq %rcx
movq %rdx, %rbx
shrq $0x4, %rbx
movq 0x48(%rsp), %r13
movq 0x68(%rsp), %r12
jmp 0x312dcf
movq 0x8(%rsp), %rsi
movzwl 0xc4(%rsi), %edx
movl $0x0, (%rcx)
movl 0xbc(%rsi), %esi
movl %esi, (%rax)
cmpl $0x2, %edx
jb 0x312d7d
movl %edx, %edi
decq %rdi
leaq (%rax,%r12,4), %r8
addq $0x4, %r8
addq $0x4, %rax
xorl %esi, %esi
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %r9
movl 0xbc(%r9), %r9d
movl -0x4(%r8,%rsi,4), %r10d
addl %r9d, %r10d
movl %r9d, (%rax,%rsi,4)
movl %r10d, (%r8,%rsi,4)
incq %rsi
cmpq %rsi, %rdi
jne 0x312bf5
jmp 0x312d89
leaq 0xd7526(%rip), %rdi     # 0x3ea14b
xorl %eax, %eax
callq 0x108e02
movq 0x8(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x312c46
movq 0x8(%rsp), %rax
leaq 0x18(%rax), %rdi
callq 0x314242
movq 0x8(%rsp), %rax
cmpl $0x0, 0x60(%rax)
je 0x312c5f
movq 0x8(%rsp), %rax
leaq 0x48(%rax), %rdi
callq 0x3183a2
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
testq %rdi, %rdi
je 0x312c72
callq 0x318854
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
testq %rdi, %rdi
je 0x312c91
leaq 0xd7439(%rip), %rsi     # 0x3ea0c0
movl $0x16d, %edx            # imm = 0x16D
callq 0x109670
movq 0x8(%rsp), %rax
movq 0xd0(%rax), %rdi
testq %rdi, %rdi
je 0x312cb3
leaq 0xd7417(%rip), %rsi     # 0x3ea0c0
movl $0x16d, %edx            # imm = 0x16D
callq 0x109670
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
testq %rdi, %rdi
je 0x312cd2
leaq 0xd73f8(%rip), %rsi     # 0x3ea0c0
movl $0x16d, %edx            # imm = 0x16D
callq 0x109670
cmpq $0x0, 0x8(%rsp)
je 0x312cf0
leaq 0xd73df(%rip), %rsi     # 0x3ea0c0
movq 0x8(%rsp), %rdi
movl $0x16d, %edx            # imm = 0x16D
callq 0x109670
testq %r13, %r13
je 0x312d09
leaq 0xd73c4(%rip), %rsi     # 0x3ea0c0
movq %r13, %rdi
movl $0x16d, %edx            # imm = 0x16D
callq 0x109670
movq $0x0, 0x58(%rsp)
xorl %eax, %eax
jmp 0x31296f
movq 0x8(%rsp), %rsi
movzwl 0xc4(%rsi), %eax
movq 0xd8(%rsi), %rcx
movl $0x0, (%rcx)
movl 0xbc(%rsi), %edx
movq 0xd0(%rsi), %rsi
movl %edx, (%rsi)
cmpl $0x2, %eax
movq 0x10(%rsp), %r14
jb 0x312da9
movl %eax, %edi
movl (%rcx), %r8d
decq %rdi
xorl %edx, %edx
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %r9
movl 0xbc(%r9), %r9d
movl %r9d, 0x4(%rsi,%rdx,4)
addl %r9d, %r8d
movl %r8d, 0x4(%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rdi
jne 0x312d5a
jmp 0x312db0
xorl %esi, %esi
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %rdi
movl 0xbc(%rdi), %eax
imull %eax, %edx
movl %edx, 0xe0(%rdi)
addl (%rcx,%rsi,4), %eax
cmpl %edx, %eax
je 0x312de5
callq 0x911ea
xorl %edx, %edx
movq 0x18(%rsp), %rbx
movq 0x8(%rsp), %rdi
movl 0xbc(%rdi), %esi
imull %esi, %eax
movl %eax, 0xe0(%rdi)
addl (%rcx,%rdx,4), %esi
cmpl %eax, %esi
jne 0x314215
leaq 0xd72ea(%rip), %rsi     # 0x3ea0c0
movq 0x20(%rsp), %rdi
movl $0x1cf, %edx            # imm = 0x1CF
callq 0x109670
movq 0x170(%rsp), %rax
movl 0x4(%rax), %edx
andl $0x1, %edx
movq %rbx, %rdi
movq 0x58(%rsp), %rsi
callq 0x318714
movq 0x8(%rsp), %rcx
movq %rax, 0x70(%rcx)
leaq 0x1b0db0(%rip), %rax    # 0x4c3bc0
movq %rax, (%rcx)
leaq 0x48(%rcx), %rbx
movq %rbx, %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x317c14
testl %eax, %eax
je 0x312ea6
movq 0x50(%rsp), %r15
movq %r15, %r13
imulq %r14, %r13
movq 0x8(%rsp), %rcx
movl 0x60(%rcx), %eax
imull %r12d, %eax
movq %rax, 0x18(%rsp)
movl 0x64(%rcx), %eax
imull %r14d, %eax
movq %rax, 0x20(%rsp)
movq 0x1a8(%rsp), %rax
imulq %r13, %rax
movl 0x68(%rcx), %edx
movq %rdx, 0xb8(%rsp)
movl %r14d, 0xb4(%rcx)
movq %rax, 0x90(%rcx)
cmpq $0x0, 0x1a0(%rsp)
movq %rbx, 0x88(%rsp)
je 0x312f95
movq 0x8(%rsp), %rax
movl 0x6c(%rax), %edi
imull %r15d, %edi
callq 0x2f9d41
movl %eax, %ecx
jmp 0x312f97
leaq 0xd7343(%rip), %rsi     # 0x3ea1f0
movq 0x1c0(%rsp), %rdi
movl %r14d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x1019cf
movq 0x8(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x312edc
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
callq 0x314242
movq 0x8(%rsp), %rax
cmpl $0x0, 0x60(%rax)
je 0x312eef
movq %rbx, %rdi
callq 0x3183a2
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
testq %rdi, %rdi
je 0x312f02
callq 0x318854
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
testq %rdi, %rdi
je 0x312f21
leaq 0xd71a9(%rip), %rsi     # 0x3ea0c0
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x109670
movq 0x8(%rsp), %rax
movq 0xd0(%rax), %rdi
testq %rdi, %rdi
je 0x312f43
leaq 0xd7187(%rip), %rsi     # 0x3ea0c0
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x109670
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
testq %rdi, %rdi
je 0x312f62
leaq 0xd7168(%rip), %rsi     # 0x3ea0c0
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x109670
leaq 0xd7157(%rip), %rsi     # 0x3ea0c0
movq 0x8(%rsp), %rdi
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x109670
testq %r13, %r13
je 0x31419b
leaq 0xd7138(%rip), %rsi     # 0x3ea0c0
movq %r13, %rdi
movl $0x1e3, %edx            # imm = 0x1E3
jmp 0x314196
xorl %ecx, %ecx
movq 0x70(%rsp), %r9
movq 0x8(%rsp), %rsi
movl %ecx, 0x84(%rsp)
movl %ecx, 0xb8(%rsi)
leaq 0x1(%r9), %rax
xorl %edx, %edx
divq %r13
movq 0x1b8(%rsp), %rdi
movq 0x178(%rsp), %rbx
xorl %ecx, %ecx
testq %rdx, %rdx
setne %cl
leaq (%rax,%rcx), %r12
imull 0x6c(%rsi), %r15d
imulq %r12, %r15
movq 0x1b0(%rsp), %r8
testq %r8, %r8
je 0x313026
leaq 0xc0(%rsp), %rsi
movq %rax, (%rsi)
movq %r13, 0x8(%rsi)
movq %rcx, 0x10(%rsi)
movq %r9, %rax
xorl %edx, %edx
divq %r13
movq %rdx, 0x18(%rsi)
leaq 0x110(%rsp), %rcx
movl $0x2, %edx
callq *%r8
testb %al, %al
je 0x31303f
movq 0x120(%rsp), %r12
jmp 0x313048
xorps %xmm0, %xmm0
movaps %xmm0, 0x110(%rsp)
movq $0x0, 0x120(%rsp)
jmp 0x31304b
imulq 0x118(%rsp), %r12
addq %r12, %r15
movq 0x188(%rsp), %r14
movq %r15, %rdi
callq 0x2f9d41
movq 0x8(%rsp), %rcx
movl %eax, 0xc0(%rcx)
movq 0x118(%rsp), %rax
movq %rax, 0x88(%rcx)
testq %rbx, %rbx
movq %r13, 0x130(%rsp)
je 0x31309b
xorl %eax, %eax
xorl %r12d, %r12d
movl (%r14,%rax,4), %ecx
addl $0x8, %ecx
addq %rcx, %r12
incq %rax
cmpq %rax, %rbx
jne 0x313087
jmp 0x31309e
xorl %r12d, %r12d
movq 0x8(%rsp), %rax
movzwl 0xc4(%rax), %r14d
movl 0xb8(%rax), %r15d
movl 0xc8(%rax), %r13d
leaq 0x18(%rax), %rbx
leaq 0xd718a(%rip), %rdx     # 0x3ea24e
movq 0x78(%rsp), %rdi
movq %rbx, %rsi
movq 0x1c0(%rsp), %rcx
callq 0x314272
movl %eax, %r9d
testl %eax, %eax
movq %rbx, 0xa0(%rsp)
je 0x3131a5
addl %r14d, %r13d
leal 0x6c(,%r13,4), %eax
cltq
leaq 0x20(%rax), %rcx
testl %r15d, %r15d
cmoveq %rax, %rcx
movq 0x8(%rsp), %r8
movl 0xc0(%r8), %eax
addl 0xe0(%r8), %eax
addl 0xb8(%r8), %eax
movl 0xb0(%r8), %esi
movl 0x68(%r8), %edi
imull %esi, %edi
addl %eax, %edi
addq 0x90(%r8), %rdi
imull 0xb4(%r8), %esi
movq 0x10(%r8), %rax
incq %rax
xorl %edx, %edx
divq %rsi
addq %rcx, %r12
cmpq $0x1, %rdx
sbbq $-0x1, %rax
imulq %rdi, %rax
movq %rax, %rcx
shrq $0x3, %rcx
andl $0x7, %eax
xorl %edx, %edx
testl $0x1fff, %r12d          # imm = 0x1FFF
setne %dl
andq $-0x2000, %r12          # imm = 0xE000
shll $0xd, %edx
addq %r12, %rdx
movq %rdx, 0x30(%r8)
addq %rcx, %rdx
cmpq $0x1, %rax
sbbq $-0x1, %rdx
movq %rdx, 0x38(%r8)
movq $0x0, 0x40(%r8)
movq 0x70(%rsp), %rbx
movq 0x10(%rsp), %r14
jmp 0x3132a3
movl %r9d, %r15d
cmpq $0x0, (%rbx)
je 0x3131b6
movq %rbx, %rdi
callq 0x314242
movq 0x8(%rsp), %rax
cmpl $0x0, 0x60(%rax)
movq 0x48(%rsp), %r14
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rbx
je 0x3131d8
callq 0x3183a2
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
testq %rdi, %rdi
je 0x3131eb
callq 0x318854
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
testq %rdi, %rdi
je 0x31320a
leaq 0xd6ec0(%rip), %rsi     # 0x3ea0c0
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x109670
movq 0x8(%rsp), %rax
movq 0xd0(%rax), %rdi
testq %rdi, %rdi
je 0x31322c
leaq 0xd6e9e(%rip), %rsi     # 0x3ea0c0
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x109670
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
testq %rdi, %rdi
je 0x31324b
leaq 0xd6e7f(%rip), %rsi     # 0x3ea0c0
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x109670
leaq 0xd6e6e(%rip), %rsi     # 0x3ea0c0
movq 0x8(%rsp), %rdi
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x109670
testq %r14, %r14
je 0x31327a
leaq 0xd6e53(%rip), %rsi     # 0x3ea0c0
movq %r14, %rdi
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x109670
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x313289
callq 0x1a6aec
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
movq 0x10(%rsp), %r14
movl %r15d, %r9d
je 0x3132a3
callq 0x1a6aec
movl %r15d, %r9d
testl %r9d, %r9d
je 0x3141b9
movq $0x0, 0xa8(%rsp)
movq 0x20(%rsp), %r15
addq 0x18(%rsp), %r15
leaq 0xd6df7(%rip), %r12     # 0x3ea0c0
movq %r14, %rdi
movq %r12, %rsi
movl $0x209, %edx            # imm = 0x209
callq 0x1092b2
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rdi
movq %r12, %rsi
movl $0x20b, %edx            # imm = 0x20B
callq 0x1092b2
movq %rax, 0x18(%rsp)
movq %r15, %rdi
shrq $0x3, %rdi
andl $0x7, %r15d
cmpq $0x1, %r15
sbbq $-0x1, %rdi
movq %r12, %r15
movq %r12, %rsi
movl $0x20e, %edx            # imm = 0x20E
callq 0x1092b2
movq %rax, 0x28(%rsp)
movl $0x8, %esi
movq 0x90(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
movl $0x62a, %ecx            # imm = 0x62A
callq 0x1093ef
movq %rax, 0x10(%rsp)
movl $0x8, %esi
movq %r12, %rdi
movq %r15, %rdx
movl $0x62a, %ecx            # imm = 0x62A
callq 0x1093ef
movq %rax, 0x38(%rsp)
movq %rbx, %rax
xorl %edx, %edx
divq %r14
movq %rax, %r15
movq %rdx, 0x98(%rsp)
movq 0x8(%rsp), %rbx
movl 0xc0(%rbx), %eax
addl 0xe0(%rbx), %eax
addl 0xb8(%rbx), %eax
movl 0xb0(%rbx), %ecx
movl 0x68(%rbx), %edx
imull %ecx, %edx
addl %eax, %edx
movq 0x88(%rbx), %rax
movq 0x90(%rbx), %rsi
addq %rsi, %rdx
addq $0x7, %rdx
imull 0x6c(%rbx), %ecx
leaq (%rax,%rcx), %r13
addq $0x7, %r13
leaq 0xc0(%rsp), %rax
movq %rdx, 0x10(%rax)
movq %r13, 0x18(%rax)
movq %rdx, %rsi
shrq $0x3, %rsi
andl $0x7, %edx
cmpq $0x1, %rdx
sbbq $-0x1, %rsi
movl $0x1, %edi
leaq 0xd6ce0(%rip), %rdx     # 0x3ea0c0
movl $0x6d0, %ecx            # imm = 0x6D0
callq 0x1093ef
leaq 0xc0(%rsp), %rcx
movq %rax, (%rcx)
movq %r13, %rsi
shrq $0x3, %rsi
andl $0x7, %r13d
cmpq $0x1, %r13
movq 0x48(%rsp), %r13
sbbq $-0x1, %rsi
movl $0x1, %edi
leaq 0xd6ca7(%rip), %rdx     # 0x3ea0c0
movl $0x6d2, %ecx            # imm = 0x6D2
callq 0x1093ef
leaq 0xc0(%rsp), %rsi
movq %rax, 0x8(%rsi)
movl 0xe0(%rbx), %eax
movl 0xb8(%rbx), %ecx
movl 0xc0(%rbx), %edx
addq %rax, %rdx
addq %rdx, %rcx
movq %rcx, 0x20(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rsi)
movups %xmm0, 0x28(%rsi)
shll $0x3, %r12d
movq %r12, 0x90(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x78(%rsp)
cmpq %r15, %r12
jae 0x3135a5
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rbx
movq %rbx, %rsi
movq %r14, %rdx
callq *0x30(%rsp)
cmpq %r14, %rax
jne 0x31357b
movq %rbp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1a6a1b
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %r14d, %r8d
movq %rbp, %r9
leaq 0xc8(%rsp), %rbx
pushq %rbx
pushq 0xc8(%rsp)
pushq 0x30(%rsp)
pushq 0x48(%rsp)
pushq 0x90(%rsp)
pushq 0x90(%rsp)
pushq %r13
callq 0x3142e8
addq $0x40, %rsp
incq %r12
movq %r12, %rax
xorl %edx, %edx
divq 0x50(%rsp)
movb $0x1, %r13b
testq %rdx, %rdx
jne 0x313597
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq 0x1a0(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq 0x130(%rsp), %r8
movl 0x84(%rsp), %r9d
movq 0x38(%rsp), %rbx
pushq %rbx
pushq 0x1c0(%rsp)
callq 0x314460
addq $0x10, %rsp
testl %eax, %eax
setns %r13b
js 0x31356c
movq %r12, %rax
imulq %r14, %rax
movq %rax, 0x78(%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x17660
jmp 0x313597
movl $0x1, %eax
movq %rax, 0xa8(%rsp)
jmp 0x313597
leaq 0xd6cd0(%rip), %rdi     # 0x3ea252
callq 0x17690
movl $0x1, %eax
movq %rax, 0xa8(%rsp)
xorl %r13d, %r13d
testb %r13b, %r13b
movq 0x48(%rsp), %r13
jne 0x31346e
movl $0x1, %r15d
cmpl $0x0, 0xa8(%rsp)
movq 0x38(%rsp), %rbx
je 0x31366f
movq 0xc8(%rsp), %rdi
leaq 0xd6af3(%rip), %r14     # 0x3ea0c0
movq %r14, %rsi
movl $0x6db, %edx            # imm = 0x6DB
callq 0x109670
movq 0xc0(%rsp), %rdi
movq %r14, %rsi
movl $0x6dc, %edx            # imm = 0x6DC
callq 0x109670
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x109670
movq %rbx, %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x109670
testl %r15d, %r15d
je 0x313738
leaq 0xd6a9f(%rip), %r14     # 0x3ea0c0
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x27d, %edx            # imm = 0x27D
callq 0x109670
movq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x27d, %edx            # imm = 0x27D
callq 0x109670
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movl $0x27d, %edx            # imm = 0x27D
callq 0x109670
movl $0x1, %r15d
xorl %eax, %eax
movq 0x88(%rsp), %rbx
jmp 0x31408b
cmpq $0x0, 0x98(%rsp)
je 0x31374f
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %r15
movq %r15, %rsi
movq 0x98(%rsp), %rdx
callq *0x30(%rsp)
movq 0x98(%rsp), %rbx
movq %rax, 0x50(%rsp)
cmpq %rbx, %rax
jb 0x313eb1
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1a6a1b
movq %r15, %rdi
addq %rbx, %rdi
movq %r14, %rdx
subq %rbx, %rdx
movl $0x0, 0x30(%rsp)
xorl %esi, %esi
callq 0x173a0
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
movl %r14d, %r8d
movq %rbp, %r9
leaq 0xc8(%rsp), %rax
pushq %rax
pushq 0xc8(%rsp)
pushq 0x30(%rsp)
pushq 0x48(%rsp)
pushq 0x90(%rsp)
pushq 0x90(%rsp)
pushq %r13
callq 0x3142e8
addq $0x40, %rsp
xorl %r12d, %r12d
movq %r15, %rbp
cmpq %rbx, 0x50(%rsp)
movq 0x38(%rsp), %rbx
jae 0x31375c
jmp 0x314073
xorl %r15d, %r15d
movb $0x1, %al
movq 0x88(%rsp), %rbx
movq 0x20(%rsp), %rbp
jmp 0x31408b
movl $0x0, 0x30(%rsp)
movq 0x20(%rsp), %rbp
movq 0x70(%rsp), %r8
movq 0x78(%rsp), %rcx
subq %rcx, %r8
jb 0x3137a1
leaq 0xc0(%rsp), %rsi
movq 0x8(%rsp), %rdi
movq 0x1a0(%rsp), %rdx
movl 0x84(%rsp), %r9d
pushq %rbx
pushq 0x1c0(%rsp)
callq 0x314460
addq $0x10, %rsp
testl %eax, %eax
js 0x314065
cmpq $0x0, 0x8(%rsp)
je 0x314224
movl 0x104(%rsp), %eax
cmpq $0x7, %rax
movq 0xa0(%rsp), %r14
movq 0x180(%rsp), %r12
ja 0x31421a
movq 0x8(%rsp), %rsi
movl 0xe0(%rsi), %ecx
movl 0xb8(%rsi), %edx
movl 0xc0(%rsi), %esi
addq %rsi, %rdx
addq %rax, %rcx
addq %rdx, %rcx
cmpq 0xe0(%rsp), %rcx
jne 0x31421a
movl 0x100(%rsp), %ecx
cmpq $0x7, %rcx
ja 0x314229
cmpq %rcx, 0xe8(%rsp)
jne 0x314229
testq %rax, %rax
je 0x313866
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0xf8(%rsp), %rsi
addq 0x30(%rax), %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x313e36
movq 0xc0(%rsp), %rdi
movq (%r14), %rcx
movl $0x1, %esi
movl $0x1, %edx
callq 0x125658
incq 0xf8(%rsp)
cmpl $0x0, 0x100(%rsp)
je 0x3138b2
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0xf0(%rsp), %rsi
shrq $0x3, %rsi
addq 0x38(%rax), %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x313e36
movq 0xc8(%rsp), %rdi
movq (%r14), %rcx
movl $0x1, %esi
movl $0x1, %edx
callq 0x125658
movq 0xf0(%rsp), %rax
movq %rax, %r15
shrq $0x3, %r15
movq 0x8(%rsp), %rbx
addq 0x38(%rbx), %r15
andl $0x7, %eax
cmpq $0x1, %rax
sbbq $-0x1, %r15
movq %r15, 0x40(%rbx)
movq 0x70(%rbx), %rdi
movl 0xb4(%rbx), %esi
addq 0x10(%rbx), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x3188ab
movq 0x70(%rbx), %rdi
callq 0x3187dd
movq 0x18(%rbx), %rdi
movq 0x1c0(%rsp), %rbx
movq %r15, %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x313e36
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x70(%rax), %rdi
callq 0x3192bd
testl %eax, %eax
je 0x313e36
testq %rbx, %rbx
je 0x31422e
movq 0x8(%rsp), %rbx
movzwl 0xc4(%rbx), %eax
addl 0xc8(%rbx), %eax
movq 0x18(%rbx), %r15
leal 0x6c(,%rax,4), %eax
cltq
leaq 0x20(%rax), %rbp
cmpl $0x0, 0xb8(%rbx)
cmoveq %rax, %rbp
leaq 0xd674e(%rip), %rsi     # 0x3ea0c0
movq %rbp, %rdi
movl $0x7cf, %edx            # imm = 0x7CF
callq 0x1092b2
xorl %edx, %edx
testl $0x1ffc, %ebp           # imm = 0x1FFC
setne %dl
movq %rbp, %rcx
andq $-0x2000, %rcx          # imm = 0xE000
shll $0xd, %edx
addq %rcx, %rdx
movl $0x584442, (%rax)       # imm = 0x584442
movq %rdx, 0x68(%rsp)
movl %edx, 0x4(%rax)
movl $0x424b535a, 0x8(%rax)  # imm = 0x424B535A
movl 0xb4(%rbx), %ecx
movl %ecx, 0xc(%rax)
movl $0x42424c4b, 0x10(%rax) # imm = 0x42424C4B
movl 0xb0(%rbx), %ecx
movl %ecx, 0x14(%rax)
movl $0x564f4646, 0x18(%rax) # imm = 0x564F4646
movq 0x38(%rbx), %rcx
movq %rcx, 0x1c(%rax)
movl $0x524f4646, 0x24(%rax) # imm = 0x524F4646
movq 0x40(%rbx), %rcx
movq %rcx, 0x28(%rax)
movl $0x53454c45, 0x30(%rax) # imm = 0x53454C45
movq 0x10(%rbx), %rcx
movq %rcx, 0x34(%rax)
movl $0x53504254, 0x3c(%rax) # imm = 0x53504254
movl 0xbc(%rbx), %ecx
movl %ecx, 0x40(%rax)
movl $0x56444f42, 0x44(%rax) # imm = 0x56444F42
movl 0xc0(%rbx), %ecx
movl %ecx, 0x48(%rax)
movl $0x53534254, 0x4c(%rax) # imm = 0x53534254
movzwl 0xc4(%rbx), %edi
movl %edi, 0x50(%rax)
testq %rdi, %rdi
je 0x313a48
movq 0x8(%rsp), %rcx
movq 0xd0(%rcx), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
movl %esi, 0x54(%rax,%rdx,4)
incq %rdx
cmpq %rdx, %rdi
jne 0x313a39
shll $0x2, %edi
movl $0x42454642, 0x54(%rax,%rdi) # imm = 0x42454642
movq 0x8(%rsp), %rdx
movzbl 0xc6(%rdx), %ecx
movl %ecx, 0x58(%rax,%rdi)
movl $0x52454642, 0x5c(%rax,%rdi) # imm = 0x52454642
movzbl 0xc7(%rdx), %ecx
movl %ecx, 0x60(%rax,%rdi)
movl $0x4e4d524e, 0x64(%rax,%rdi) # imm = 0x4E4D524E
movl 0xc8(%rdx), %ecx
movl %ecx, 0x68(%rax,%rdi)
addq $0x6c, %rdi
cmpl $0x0, 0xc8(%rdx)
movq 0x178(%rsp), %rbx
je 0x313ac9
movq 0x8(%rsp), %rcx
movq 0xa8(%rcx), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
movl %esi, (%rax,%rdi)
addq $0x4, %rdi
incq %rdx
movq 0x8(%rsp), %rsi
movslq 0xc8(%rsi), %rsi
cmpq %rsi, %rdx
jb 0x313aab
movq 0x8(%rsp), %rcx
cmpl $0x0, 0xb8(%rcx)
je 0x313b19
movl $0x43424d42, (%rax,%rdi) # imm = 0x43424D42
movq 0x8(%rsp), %rdx
movl 0xb8(%rdx), %ecx
movl %ecx, 0x4(%rax,%rdi)
movl $0x43455842, 0x8(%rax,%rdi) # imm = 0x43455842
movq 0x90(%rdx), %rcx
movq %rcx, 0xc(%rax,%rdi)
movl $0x4d455842, 0x14(%rax,%rdi) # imm = 0x4D455842
movq 0x88(%rdx), %rcx
movq %rcx, 0x18(%rax,%rdi)
addq $0x20, %rdi
movq %rax, 0x40(%rsp)
cmpq %rbp, %rdi
jne 0x314233
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x313f3c
movl $0x1, %edx
movq 0x40(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rcx
callq 0x125658
testq %rbx, %rbx
je 0x313d69
movzwl (%r12), %eax
movq 0x188(%rsp), %rcx
movl (%rcx), %ecx
movq 0x190(%rsp), %rdx
movq (%rdx), %r13
movq 0x198(%rsp), %rdx
movq (%rdx), %r14
orl $0x45480000, %eax       # imm = 0x45480000
leaq 0xb0(%rsp), %rdi
movl %eax, (%rdi)
movl %ecx, 0x4(%rdi)
movl $0x4, %esi
movl $0x2, %edx
movq %r15, %rcx
callq 0x125658
movq %r15, %rdi
movq %r14, %rsi
callq *%r13
testl %eax, %eax
je 0x313fbc
movq 0x8(%rsp), %rbx
movq 0x78(%rbx), %rdi
movq 0x80(%rbx), %r14
leaq 0x1(%r14), %rax
movq %rax, 0x80(%rbx)
leaq 0x8(%rbp), %rax
movq %rax, 0x50(%rsp)
movzwl (%r12), %r13d
orl $0x45480000, %r13d      # imm = 0x45480000
shlq $0x4, %r14
leaq 0x10(%r14), %rsi
leaq 0xd64ce(%rip), %rdx     # 0x3ea0c0
movl $0x7a7, %ecx            # imm = 0x7A7
callq 0x1094e6
movq %rax, 0x78(%rbx)
movq 0x178(%rsp), %rcx
movq 0x50(%rsp), %rdx
movq %rdx, (%rax,%r14)
movl %r13d, 0x8(%rax,%r14)
cmpq $0x1, %rcx
jne 0x313c29
movq 0x188(%rsp), %rbx
jmp 0x313d3f
movl $0x1, %r13d
movq 0x188(%rsp), %rbx
movq %rbp, %rax
movl -0x4(%rbx,%r13,4), %ebp
addl $0x8, %ebp
addq %rax, %rbp
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x313fc3
movzwl (%r12,%r13,2), %eax
movl (%rbx,%r13,4), %ecx
movq 0x190(%rsp), %rdx
movq (%rdx,%r13,8), %r12
movq 0x198(%rsp), %rdx
movq (%rdx,%r13,8), %r14
orl $0x45480000, %eax       # imm = 0x45480000
movl %eax, 0xb0(%rsp)
movl %ecx, 0xb4(%rsp)
movl $0x4, %esi
movl $0x2, %edx
leaq 0xb0(%rsp), %rdi
movq %r15, %rcx
callq 0x125658
movq %r15, %rdi
movq %r14, %rsi
callq *%r12
testl %eax, %eax
je 0x313fca
movq 0x8(%rsp), %rbx
movq 0x78(%rbx), %rdi
movq 0x80(%rbx), %r14
leaq 0x1(%r14), %rax
movq %rax, 0x80(%rbx)
leaq 0x8(%rbp), %rax
movq %rax, 0x50(%rsp)
movq 0x180(%rsp), %rax
movzwl (%rax), %r12d
orl $0x45480000, %r12d      # imm = 0x45480000
shlq $0x4, %r14
leaq 0x10(%r14), %rsi
leaq 0xd63c1(%rip), %rdx     # 0x3ea0c0
movl $0x7a7, %ecx            # imm = 0x7A7
callq 0x1094e6
movq %rax, 0x78(%rbx)
movq 0x178(%rsp), %rcx
movq 0x50(%rsp), %rdx
movq %rdx, (%rax,%r14)
movl %r12d, 0x8(%rax,%r14)
movq 0x180(%rsp), %r12
incq %r13
cmpq %r13, %rcx
movq 0x188(%rsp), %rbx
jne 0x313c37
movl -0x4(%rbx,%rcx,4), %eax
leaq (%rax,%rbp), %r14
addq $0x8, %r14
movq %r15, %rdi
callq 0x17bc0
cmpq %rax, %r14
movq 0x48(%rsp), %r13
movq 0xa0(%rsp), %r14
jl 0x31423d
movq 0x8(%rsp), %rax
movq 0x68(%rsp), %rbx
cmpq %rbx, 0x30(%rax)
jne 0x314238
leaq 0xd633c(%rip), %r15     # 0x3ea0c0
movq 0x40(%rsp), %rdi
movq %r15, %rsi
movl $0x82c, %edx            # imm = 0x82C
callq 0x109670
testq %rbx, %rbx
movq 0x20(%rsp), %rbp
movq 0x38(%rsp), %rbx
je 0x313fef
movq (%r14), %rdi
callq 0x178f0
testl %eax, %eax
jne 0x313f46
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x31421f
movq 0x8(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x31421f
movq 0x8(%rsp), %rbx
movq 0x40(%rbx), %r14
subq 0x30(%rbx), %r14
callq 0x17850
movl %eax, %ebp
movq 0x20(%rbx), %rdi
callq 0x120d23
movq 0x30(%rbx), %rcx
subq $0x8, %rsp
xorl %r12d, %r12d
movl %ebp, %edi
movq %rax, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x949                  # imm = 0x949
pushq %r15
callq 0x102407
addq $0x20, %rsp
movq %rax, 0x28(%rbx)
movq 0x20(%rsp), %rbp
movq 0x38(%rsp), %rbx
jmp 0x314073
leaq 0xd643e(%rip), %rdi     # 0x3ea27b
callq 0x17690
leaq 0xc0(%rsp), %rdi
callq 0x31473e
leaq 0xd626a(%rip), %r14     # 0x3ea0c0
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x109670
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x109670
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x267, %edx            # imm = 0x267
callq 0x109670
movq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x267, %edx            # imm = 0x267
callq 0x109670
movq %rbp, %rdi
movq %r14, %rsi
movl $0x267, %edx            # imm = 0x267
jmp 0x314060
leaq 0xd639a(%rip), %rdi     # 0x3ea252
callq 0x17690
leaq 0xc0(%rsp), %rdi
callq 0x31473e
leaq 0xd61ef(%rip), %r14     # 0x3ea0c0
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x109670
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x109670
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x247, %edx            # imm = 0x247
callq 0x109670
movq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x247, %edx            # imm = 0x247
callq 0x109670
movq %r15, %rdi
movq %r14, %rsi
movl $0x247, %edx            # imm = 0x247
callq 0x109670
movl $0x24, %r12d
movl $0x1, 0x30(%rsp)
jmp 0x313724
movl $0x80e, %edx            # imm = 0x80E
jmp 0x313fd4
leaq 0xd6368(%rip), %rdi     # 0x3ea2b5
callq 0x17690
leaq 0xc0(%rsp), %rdi
callq 0x31473e
leaq 0xd615a(%rip), %r14     # 0x3ea0c0
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x109670
movq %rbx, %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x109670
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x277, %edx            # imm = 0x277
callq 0x109670
movq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x277, %edx            # imm = 0x277
callq 0x109670
movq %rbp, %rdi
movq %r14, %rsi
movl $0x277, %edx            # imm = 0x277
jmp 0x314060
movl $0x815, %edx            # imm = 0x815
jmp 0x313fcf
movl $0x81e, %edx            # imm = 0x81E
jmp 0x313fcf
movl $0x821, %edx            # imm = 0x821
movq 0x48(%rsp), %r13
movq 0x40(%rsp), %rdi
leaq 0xd60e0(%rip), %rsi     # 0x3ea0c0
callq 0x109670
movq 0x20(%rsp), %rbp
movq 0x38(%rsp), %rbx
leaq 0xd62bf(%rip), %rdi     # 0x3ea2b5
callq 0x17690
leaq 0xc0(%rsp), %rdi
callq 0x31473e
leaq 0xd60b1(%rip), %r14     # 0x3ea0c0
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x109670
movq %rbx, %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x109670
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x270, %edx            # imm = 0x270
callq 0x109670
movq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x270, %edx            # imm = 0x270
callq 0x109670
movq %rbp, %rdi
movq %r14, %rsi
movl $0x270, %edx            # imm = 0x270
callq 0x109670
movl $0x24, %r12d
movl $0x1, 0x30(%rsp)
testl %r12d, %r12d
je 0x3141d9
xorl %eax, %eax
movq 0x88(%rsp), %rbx
movl 0x30(%rsp), %r15d
testb %al, %al
je 0x3140ca
leaq 0xd602a(%rip), %r14     # 0x3ea0c0
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x285, %edx            # imm = 0x285
callq 0x109670
movq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x286, %edx            # imm = 0x286
callq 0x109670
movq %rbp, %rdi
movq %r14, %rsi
movl $0x287, %edx            # imm = 0x287
callq 0x109670
testl %r15d, %r15d
movq 0xa0(%rsp), %rdi
je 0x3141c2
cmpq $0x0, (%rdi)
je 0x3140e6
callq 0x314242
movq 0x8(%rsp), %rax
cmpl $0x0, 0x60(%rax)
je 0x3140f9
movq %rbx, %rdi
callq 0x3183a2
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
testq %rdi, %rdi
je 0x31410c
callq 0x318854
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
testq %rdi, %rdi
je 0x31412b
leaq 0xd5f9f(%rip), %rsi     # 0x3ea0c0
movl $0x28c, %edx            # imm = 0x28C
callq 0x109670
movq 0x8(%rsp), %rax
movq 0xd0(%rax), %rdi
testq %rdi, %rdi
je 0x31414d
leaq 0xd5f7d(%rip), %rsi     # 0x3ea0c0
movl $0x28c, %edx            # imm = 0x28C
callq 0x109670
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
testq %rdi, %rdi
je 0x31416c
leaq 0xd5f5e(%rip), %rsi     # 0x3ea0c0
movl $0x28c, %edx            # imm = 0x28C
callq 0x109670
leaq 0xd5f4d(%rip), %rsi     # 0x3ea0c0
movq 0x8(%rsp), %rdi
movl $0x28c, %edx            # imm = 0x28C
callq 0x109670
testq %r13, %r13
je 0x31419b
leaq 0xd5f32(%rip), %rsi     # 0x3ea0c0
movq %r13, %rdi
movl $0x28c, %edx            # imm = 0x28C
callq 0x109670
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x3141aa
callq 0x1a6aec
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x3141b9
callq 0x1a6aec
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x30(%rsp), %r15d
jmp 0x3135be
callq 0x173b0
callq 0x910d1
callq 0x9117a
callq 0x91424
callq 0x91026
callq 0x913eb
callq 0x91108
callq 0x91141
callq 0x91098
callq 0x9105f
callq 0x911b1
callq 0x91223
callq 0x91340
callq 0x913b2
callq 0x9125c
callq 0x91379
callq 0x91295
callq 0x91307
callq 0x912ce