// File: /workspace/github_c_makefile_star2_O3/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, 0xf8(%rsp)
movq %r8, 0xf0(%rsp)
movq %rcx, 0x8(%rsp)
movq %rdx, %r13
movq %rdi, %rax
shrq $0x2, %rax
movabsq $0x28f5c28f5c28f5c3, %rcx # imm = 0x28F5C28F5C28F5C3
mulq %rcx
testq %rsi, %rsi
je 0x30a008
movq 0x170(%rsp), %rcx
cmpl $0x2, (%rcx)
jne 0x30a00d
movl 0x8(%rcx), %eax
testl %eax, %eax
je 0x30a012
movq %rdi, %r12
movq %rax, 0x10(%rsp)
movq 0x1b0(%rsp), %rdi
movl 0xc(%rcx), %r15d
cmpq $0x0, 0x1a0(%rsp)
setne %al
testq %rdi, %rdi
setne %cl
testb %cl, %al
jne 0x308979
movq 0x1a0(%rsp), %rax
orq %rdi, %rax
jne 0x30a026
movq %rdx, (%rsp)
movq %rsi, 0x48(%rsp)
movq 0x1c0(%rsp), %rdi
testq %rdi, %rdi
je 0x30899c
callq 0xfcc32
testb %al, %al
jne 0x30a021
leaq 0xd802d(%rip), %r14     # 0x3e09d0
movl $0xe8, %edi
movl $0x1, %esi
movq %r14, %rdx
movl $0x150, %ecx            # imm = 0x150
callq 0x10436a
movq %rax, %rbx
movq %r15, 0x28(%rsp)
movl %r15d, 0xb0(%rax)
movq %r12, 0x10(%rax)
leaq -0x1(%r12), %rdi
callq 0x2f09dd
movl %eax, 0xbc(%rbx)
movq %r13, 0x8(%rbx)
movslq 0x4(%r13), %rbp
movl %ebp, 0xc8(%rbx)
movq %r13, %rdi
callq 0x19e077
movw %ax, 0x20(%rsp)
leaq (,%rbp,4), %rdi
movq %r14, %rsi
movl $0x15a, %edx            # imm = 0x15A
callq 0x104226
movq %rax, %r14
movq %rax, 0xa8(%rbx)
testq %rbp, %rbp
movq %rax, 0x18(%rsp)
je 0x308a68
leaq 0xd7f88(%rip), %rax     # 0x3e09b0
xorl %r15d, %r15d
xorl %ecx, %ecx
movl (%rax), %edx
movl %edx, (%r14,%rcx,4)
testl %edx, %edx
je 0x308a5a
cmpl $0x2, %edx
je 0x308a5a
cmpl $0x1, %edx
jne 0x308dd0
cmpl %ecx, 0x4(%r13)
jbe 0x30a003
movq 0x10(%r13), %rdx
movl %ecx, %esi
addw (%rdx,%rsi,2), %r15w
incq %rcx
addq $0x4, %rax
cmpq %rcx, %rbp
jne 0x308a2d
jmp 0x308a6b
xorl %r15d, %r15d
movq %r12, 0x80(%rsp)
movw %r15w, 0xc4(%rbx)
xorl %ebp, %ebp
movb %bpl, 0xc6(%rbx)
movq %r13, %rdi
movl $0x1, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x19e097
movq %rax, %r12
movq %rax, 0x98(%rbx)
movb %bpl, 0xc7(%rbx)
movq %r13, %rdi
movl $0x2, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x19e097
movq %rax, %r14
movq %rax, 0xa0(%rbx)
movq %r12, 0x50(%rsp)
movq %r12, %rdi
callq 0x19e077
cmpw %r15w, %ax
jne 0x30a017
movzwl %r15w, %r12d
movq %r14, 0x30(%rsp)
movq %r14, %rdi
callq 0x19e077
movzwl %ax, %eax
movzwl 0x20(%rsp), %ecx
movq %rcx, 0x70(%rsp)
subl %r12d, %ecx
cmpl %eax, %ecx
movq (%rsp), %rax
jne 0x30a01c
shrq $0x2, %rax
movq %rax, (%rsp)
leal (,%r12,4), %ebp
leal (,%r12,8), %r14d
leaq 0xd7eaa(%rip), %rsi     # 0x3e09d0
movq %r14, %rdi
movl $0x17e, %edx            # imm = 0x17E
callq 0x104226
movq %rax, 0xd0(%rbx)
movq %rbp, 0x40(%rsp)
leaq (%rax,%rbp), %rcx
movq %rcx, 0xd8(%rbx)
movq 0x8(%rsp), %rbp
testq %rbp, %rbp
movq %r12, 0x20(%rsp)
je 0x308d07
leaq 0xd7e6c(%rip), %rsi     # 0x3e09d0
movq %r14, %rdi
movl $0x184, %edx            # imm = 0x184
callq 0x104226
cmpl $0x1, 0x8(%rbp)
jne 0x308d67
movq %rax, %rdi
xorl %r12d, %r12d
movq %rax, (%rsp)
xorl %esi, %esi
movq %r14, %rdx
callq 0x173a0
cmpl $0x1, (%r13)
jne 0x309ffe
movzbl 0x18(%r13,%r12), %r14d
movq %r13, %rdi
movl %r14d, %esi
movl $0x1, %edx
movq 0x18(%rsp), %rcx
callq 0x19e32c
testl %eax, %eax
je 0x308bea
movq 0x50(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x309ffe
movzbl 0x18(%rax,%r14), %eax
cmpw %ax, %r15w
jbe 0x308bea
movzwl %ax, %eax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq (%rcx,%r12,8), %rcx
movq (%rsp), %rdx
addq %rcx, (%rdx,%rax,8)
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x308b8f
testw %r15w, %r15w
je 0x308c75
movq 0xd8(%rbx), %rax
movl $0x0, (%rax)
movq (%rsp), %r12
movq (%r12), %rdi
callq 0x2f09dd
movq 0xd0(%rbx), %rcx
movl %eax, (%rcx)
cmpw $0x1, %r15w
movq 0x20(%rsp), %r15
je 0x308c5d
movl $0x1, %r14d
movq 0xd8(%rbx), %rcx
addl -0x4(%rcx,%r14,4), %eax
movl %eax, (%rcx,%r14,4)
movq (%r12,%r14,8), %rdi
callq 0x2f09dd
movq 0xd0(%rbx), %rcx
movl %eax, (%rcx,%r14,4)
incq %r14
cmpq %r14, %r15
jne 0x308c31
movq 0xd8(%rbx), %rax
movl %r15d, %edx
movl -0x4(%rcx,%rdx,4), %ecx
addl -0x4(%rax,%rdx,4), %ecx
movl %ecx, 0xe0(%rbx)
movq 0x30(%rsp), %rdi
callq 0x19e077
movl %eax, %r14d
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpl $0x1, (%r13)
jne 0x309ffe
movzbl 0x18(%r13,%r12), %ebp
movq %r13, %rdi
movl %ebp, %esi
movl $0x2, %edx
movq 0x18(%rsp), %rcx
callq 0x19e32c
testl %eax, %eax
je 0x308cd6
movq 0x30(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x309ffe
movzbl 0x18(%rax,%rbp), %eax
cmpw %ax, %r14w
jbe 0x308cd6
movq 0x8(%rsp), %rax
movq (%rax), %rax
addq (%rax,%r12,8), %r15
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x308c88
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
movq %r15, %rax
mulq %rcx
movq %rdx, %r15
shrq $0x4, %r15
movq 0x18(%rsp), %r14
movq (%rsp), %rax
jmp 0x308ed4
movzwl 0xc4(%rbx), %edx
movl $0x0, (%rcx)
movl 0xbc(%rbx), %edi
movl %edi, (%rax)
cmpl $0x2, %edx
jb 0x308e8d
movl %edx, %edi
movl (%rax,%r12,4), %r8d
decq %rdi
leaq (%rax,%r12,4), %r9
addq $0x4, %r9
xorl %esi, %esi
movq 0x18(%rsp), %r14
movq (%rsp), %r15
movl 0xbc(%rbx), %r10d
movl %r10d, 0x4(%rax,%rsi,4)
addl %r10d, %r8d
movl %r8d, (%r9,%rsi,4)
incq %rsi
cmpq %rsi, %rdi
jne 0x308d41
movl 0xbc(%rbx), %edi
jmp 0x308e98
movzwl 0xc4(%rbx), %r10d
movq 0xd8(%rbx), %rcx
movl $0x0, (%rcx)
movl 0xbc(%rbx), %edi
movq 0xd0(%rbx), %rsi
movl %edi, (%rsi)
cmpl $0x2, %r10d
jb 0x308eb2
movl %r10d, %edi
movl (%rcx), %r8d
decq %rdi
xorl %edx, %edx
movq 0x18(%rsp), %r14
movq (%rsp), %r15
movl 0xbc(%rbx), %r9d
movl %r9d, 0x4(%rsi,%rdx,4)
addl %r9d, %r8d
movl %r8d, 0x4(%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rdi
jne 0x308da9
movl 0xbc(%rbx), %edi
jmp 0x308ebd
leaq 0xd7c84(%rip), %rdi     # 0x3e0a5b
xorl %eax, %eax
callq 0x103d72
cmpq $0x0, 0x18(%rbx)
je 0x308dee
leaq 0x18(%rbx), %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
je 0x308e00
movq %rbx, %rdi
addq $0x48, %rdi
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x308e0e
callq 0x30e6b8
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x308e28
leaq 0xd7bb2(%rip), %rsi     # 0x3e09d0
movl $0x16d, %edx            # imm = 0x16D
callq 0x1045eb
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
je 0x308e45
leaq 0xd7b95(%rip), %rsi     # 0x3e09d0
movl $0x16d, %edx            # imm = 0x16D
callq 0x1045eb
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x308e5f
leaq 0xd7b7b(%rip), %rsi     # 0x3e09d0
movl $0x16d, %edx            # imm = 0x16D
callq 0x1045eb
leaq 0xd7b6a(%rip), %r14     # 0x3e09d0
movq %rbx, %rdi
movq %r14, %rsi
movl $0x16d, %edx            # imm = 0x16D
callq 0x1045eb
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x16d, %edx            # imm = 0x16D
callq 0x1045eb
jmp 0x309fe7
xorl %esi, %esi
movq 0x18(%rsp), %r14
movq (%rsp), %r15
imull %edi, %edx
movl %edx, 0xe0(%rbx)
addl (%rcx,%rsi,4), %edi
cmpl %edx, %edi
movq 0x30(%rsp), %rsi
je 0x308eed
callq 0x8f499
xorl %edx, %edx
movq 0x18(%rsp), %r14
movq (%rsp), %r15
imull %edi, %r10d
movl %r10d, 0xe0(%rbx)
addl (%rcx,%rdx,4), %edi
cmpl %r10d, %edi
jne 0x30a035
leaq 0xd7af5(%rip), %rsi     # 0x3e09d0
movq %rax, %rdi
movl $0x1cf, %edx            # imm = 0x1CF
callq 0x1045eb
movq 0x30(%rsp), %rsi
movq 0x170(%rsp), %rax
movl 0x4(%rax), %edx
andl $0x1, %edx
movq %r15, %rdi
callq 0x30e578
movq %rax, 0x70(%rbx)
leaq 0x1afca2(%rip), %rax    # 0x4b8bb0
movq %rax, (%rbx)
leaq 0x48(%rbx), %r12
movq %r12, %rdi
movq 0x10(%rsp), %r15
movl %r15d, %esi
movq 0x20(%rsp), %rbp
movl %ebp, %edx
callq 0x30da60
testl %eax, %eax
je 0x308fa9
movq 0x28(%rsp), %r14
movq %r14, %r10
imulq %r15, %r10
movl 0x60(%rbx), %eax
imull %ebp, %eax
movq %rax, 0x38(%rsp)
movl 0x64(%rbx), %eax
imull %r15d, %eax
movq %rax, (%rsp)
movq 0x1a8(%rsp), %rax
imulq %r10, %rax
movl 0x68(%rbx), %ecx
movq %rcx, 0xe8(%rsp)
movl %r15d, 0xb4(%rbx)
movq %rax, 0x90(%rbx)
cmpq $0x0, 0x1a0(%rsp)
movq %r10, 0xe0(%rsp)
je 0x309075
movl 0x6c(%rbx), %edi
imull %r14d, %edi
callq 0x2f09dd
movq 0xe0(%rsp), %r10
movl %eax, %esi
jmp 0x309077
leaq 0xd7b50(%rip), %rsi     # 0x3e0b00
movq 0x1c0(%rsp), %rdi
movl %r15d, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0xfcb67
cmpq $0x0, 0x18(%rbx)
je 0x308fd7
movq %rbx, %rdi
addq $0x18, %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
je 0x308fe5
movq %r12, %rdi
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x308ff3
callq 0x30e6b8
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x30900d
leaq 0xd79cd(%rip), %rsi     # 0x3e09d0
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x1045eb
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
je 0x30902a
leaq 0xd79b0(%rip), %rsi     # 0x3e09d0
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x1045eb
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x309044
leaq 0xd7996(%rip), %rsi     # 0x3e09d0
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x1045eb
leaq 0xd7985(%rip), %rsi     # 0x3e09d0
movq %rbx, %rdi
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x1045eb
testq %r14, %r14
je 0x309fc9
leaq 0xd7968(%rip), %rsi     # 0x3e09d0
movq %r14, %rdi
movl $0x1e3, %edx            # imm = 0x1E3
jmp 0x309fc4
xorl %esi, %esi
movl %esi, 0xb8(%rbx)
movq 0x80(%rsp), %r9
leaq 0x1(%r9), %rax
xorl %edx, %edx
divq %r10
movq 0x1b8(%rsp), %rdi
movq 0x178(%rsp), %rbp
xorl %ecx, %ecx
testq %rdx, %rdx
setne %cl
leaq (%rax,%rcx), %r15
imull 0x6c(%rbx), %r14d
imulq %r15, %r14
movq 0x1b0(%rsp), %r8
testq %r8, %r8
movl %esi, 0x64(%rsp)
je 0x309101
leaq 0x90(%rsp), %rsi
movq %rax, (%rsi)
movq %r10, 0x8(%rsi)
movq %rcx, 0x10(%rsi)
movq %r9, %rax
xorl %edx, %edx
divq %r10
movq %rdx, 0x18(%rsi)
leaq 0x100(%rsp), %rcx
movl $0x2, %edx
callq *%r8
testb %al, %al
je 0x30911a
movq 0x110(%rsp), %r15
jmp 0x309123
xorps %xmm0, %xmm0
movaps %xmm0, 0x100(%rsp)
movq $0x0, 0x110(%rsp)
jmp 0x309126
imulq 0x108(%rsp), %r15
addq %r15, %r14
movq 0x188(%rsp), %r15
movq %r14, %rdi
callq 0x2f09dd
movl %eax, 0xc0(%rbx)
movq 0x108(%rsp), %rax
movq %rax, 0x88(%rbx)
testq %rbp, %rbp
movq %r12, 0xd8(%rsp)
je 0x309171
xorl %eax, %eax
xorl %r14d, %r14d
movl (%r15,%rax,4), %ecx
addl $0x8, %ecx
addq %rcx, %r14
incq %rax
cmpq %rax, %rbp
jne 0x30915d
jmp 0x309174
xorl %r14d, %r14d
movzwl 0xc4(%rbx), %r12d
movl 0xb8(%rbx), %eax
movl %eax, 0x8(%rsp)
movl 0xc8(%rbx), %ebp
leaq 0x18(%rbx), %r15
leaq 0xd79c7(%rip), %rdx     # 0x3e0b5e
movq 0x48(%rsp), %rdi
movq %r15, %rsi
movq 0x1c0(%rsp), %rcx
callq 0x30a088
testl %eax, %eax
je 0x309cf9
movq %r15, 0x58(%rsp)
addl %r12d, %ebp
leal 0x6c(,%rbp,4), %eax
cltq
leaq 0x20(%rax), %rcx
cmpl $0x0, 0x8(%rsp)
cmoveq %rax, %rcx
movl 0xc0(%rbx), %eax
addl 0xe0(%rbx), %eax
addl 0xb8(%rbx), %eax
movl 0xb0(%rbx), %esi
movl 0x68(%rbx), %edi
imull %esi, %edi
addl %eax, %edi
addq 0x90(%rbx), %rdi
movq 0x10(%rbx), %rax
imull 0xb4(%rbx), %esi
incq %rax
xorl %edx, %edx
divq %rsi
addq %rcx, %r14
movq $0x0, 0x8(%rsp)
cmpq $0x1, %rdx
sbbq $-0x1, %rax
imulq %rdi, %rax
movq %rax, %rcx
shrq $0x3, %rcx
andl $0x7, %eax
xorl %edx, %edx
testl $0x1fff, %r14d          # imm = 0x1FFF
setne %dl
andq $-0x2000, %r14          # imm = 0xE000
shll $0xd, %edx
addq %r14, %rdx
movq %rdx, 0x30(%rbx)
addq %rcx, %rdx
cmpq $0x1, %rax
sbbq $-0x1, %rdx
movq %rdx, 0x38(%rbx)
movq $0x0, 0x40(%rbx)
leaq 0xd7767(%rip), %r12     # 0x3e09d0
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movl $0x209, %edx            # imm = 0x209
callq 0x104226
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rdi
movq %r12, %rsi
movl $0x20b, %edx            # imm = 0x20B
callq 0x104226
movq %rax, 0x40(%rsp)
movq (%rsp), %rax
addq 0x38(%rsp), %rax
movq %rax, %rdi
shrq $0x3, %rdi
andl $0x7, %eax
cmpq $0x1, %rax
sbbq $-0x1, %rdi
movq %r12, %rsi
movl $0x20e, %edx            # imm = 0x20E
callq 0x104226
movq %rax, 0x38(%rsp)
movl $0x8, %esi
movq 0x70(%rsp), %r14
movq %r14, %rdi
movq %r12, %rdx
movl $0x62a, %ecx            # imm = 0x62A
callq 0x10436a
movq %rax, (%rsp)
movl $0x8, %esi
movq %r14, %rdi
movq %r12, %rdx
movl $0x62a, %ecx            # imm = 0x62A
callq 0x10436a
movq %rax, 0x68(%rsp)
movq 0x80(%rsp), %r15
movq %r15, %rax
xorl %edx, %edx
divq %rbp
movq %rax, 0x130(%rsp)
movq %rdx, 0x120(%rsp)
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
imull 0x6c(%rbx), %ecx
addq %rsi, %rdx
addq $0x7, %rdx
leaq 0x7(%rax,%rcx), %r14
movq %rdx, 0xa0(%rsp)
movq %r14, 0xa8(%rsp)
movq %rdx, %rsi
shrq $0x3, %rsi
andl $0x7, %edx
cmpq $0x1, %rdx
sbbq $-0x1, %rsi
movl $0x1, %edi
movq %r12, %rdx
movl $0x6d0, %ecx            # imm = 0x6D0
callq 0x10436a
movq %rax, 0x90(%rsp)
movq %r14, %rsi
shrq $0x3, %rsi
andl $0x7, %r14d
cmpq $0x1, %r14
sbbq $-0x1, %rsi
movl $0x1, %edi
movq %r12, %rdx
movl $0x6d2, %ecx            # imm = 0x6D2
callq 0x10436a
movq %rax, 0x98(%rsp)
movl 0xb8(%rbx), %eax
movl 0xc0(%rbx), %ecx
movl 0xe0(%rbx), %edx
addq %rcx, %rdx
addq %rdx, %rax
movq %rax, 0xb0(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0xc8(%rsp)
movups %xmm0, 0xb8(%rsp)
movl $0x0, %eax
movq %rax, 0x78(%rsp)
cmpq %r15, %rbp
ja 0x309555
movq 0x70(%rsp), %rax
shll $0x3, %eax
movq %rax, 0x70(%rsp)
movq $0x0, 0x78(%rsp)
leaq 0x90(%rsp), %r12
movq $0x0, 0x8(%rsp)
movq %r13, 0x128(%rsp)
movq %rbx, %r15
movq %r12, %rbx
movq 0xf0(%rsp), %rdi
movq 0x48(%rsp), %r14
movq %r14, %rsi
movq 0x10(%rsp), %rdx
callq *0xf8(%rsp)
movq 0x10(%rsp), %r12
cmpq %r12, %rax
jne 0x309e1f
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x19e2dd
subq $0x8, %rsp
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %r9
movq 0x10(%rsp), %r13
movq %r13, %rdx
movq %r14, %rcx
movl %r12d, %r8d
movq %rbx, %r12
pushq %rbx
pushq 0xf8(%rsp)
pushq 0x58(%rsp)
pushq 0x58(%rsp)
pushq 0x48(%rsp)
pushq 0x80(%rsp)
pushq 0x50(%rsp)
callq 0x30a0fe
addq $0x40, %rsp
incq %r13
movq %r13, %rax
movq %r13, 0x8(%rsp)
xorl %edx, %edx
divq 0x28(%rsp)
testq %rdx, %rdx
je 0x3094dd
movq %r15, %rbx
jmp 0x309535
movq %r15, %rdi
movq %r12, %rsi
movq 0x1a0(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq 0xe0(%rsp), %r8
movl 0x64(%rsp), %r9d
movq 0x68(%rsp), %r14
pushq %r14
pushq 0x1c0(%rsp)
callq 0x30a275
addq $0x10, %rsp
testl %eax, %eax
movq %r15, %rbx
js 0x309e2e
movq %r14, %rdi
movq (%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x17660
movq %rbp, 0x78(%rsp)
addq 0x10(%rsp), %rbp
movq 0x8(%rsp), %rax
cmpq 0x130(%rsp), %rax
movq 0x128(%rsp), %r13
jb 0x30943b
movq 0x120(%rsp), %r12
testq %r12, %r12
movq 0x18(%rsp), %r14
movq 0x48(%rsp), %rbp
je 0x3095ff
movq 0xf0(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq *0xf8(%rsp)
cmpq %r12, %rax
jb 0x309ddc
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x19e2dd
movq %rbp, %rdi
addq %r12, %rdi
movq %r12, %rax
movq 0x10(%rsp), %r12
movq %r12, %rdx
subq %rax, %rdx
xorl %esi, %esi
callq 0x173a0
subq $0x8, %rsp
leaq 0x98(%rsp), %rax
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbp, %rcx
movl %r12d, %r8d
movq %r13, %r9
pushq %rax
pushq 0xf8(%rsp)
pushq 0x58(%rsp)
pushq 0x58(%rsp)
pushq 0x48(%rsp)
pushq 0x80(%rsp)
pushq %r14
callq 0x30a0fe
addq $0x40, %rsp
movq 0x80(%rsp), %r8
movq 0x78(%rsp), %rcx
subq %rcx, %r8
movq 0x58(%rsp), %r12
jb 0x30964a
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
movq 0x1a0(%rsp), %rdx
movl 0x64(%rsp), %r9d
pushq 0x68(%rsp)
pushq 0x1c0(%rsp)
callq 0x30a275
addq $0x10, %rsp
testl %eax, %eax
js 0x309f1b
testq %rbx, %rbx
je 0x30a03a
movl 0xd4(%rsp), %eax
cmpq $0x7, %rax
movq 0x1c0(%rsp), %r15
movq 0x178(%rsp), %rbp
ja 0x30a02b
movl 0xb8(%rbx), %ecx
movl 0xc0(%rbx), %edx
movl 0xe0(%rbx), %esi
addq %rsi, %rcx
addq %rax, %rdx
addq %rcx, %rdx
cmpq 0xb0(%rsp), %rdx
jne 0x30a02b
movl 0xd0(%rsp), %ecx
cmpq $0x7, %rcx
ja 0x30a03f
cmpq %rcx, 0xb8(%rsp)
jne 0x30a03f
testq %rax, %rax
je 0x30970a
movq 0x18(%rbx), %rdi
movq 0xc8(%rsp), %rsi
addq 0x30(%rbx), %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x309daf
movq 0x90(%rsp), %rdi
movq (%r12), %rcx
movl $0x1, %esi
movl $0x1, %edx
callq 0x11f89c
incq 0xc8(%rsp)
movl 0xd0(%rsp), %ecx
testl %ecx, %ecx
je 0x30974c
movq 0x18(%rbx), %rdi
movq 0xc0(%rsp), %rsi
shrq $0x3, %rsi
addq 0x38(%rbx), %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x309daf
movq 0x98(%rsp), %rdi
movq (%r12), %rcx
movl $0x1, %esi
movl $0x1, %edx
callq 0x11f89c
movq 0xc0(%rsp), %rax
movq %rax, %r14
shrq $0x3, %r14
addq 0x38(%rbx), %r14
andl $0x7, %eax
cmpq $0x1, %rax
sbbq $-0x1, %r14
movq %r14, 0x40(%rbx)
movq 0x70(%rbx), %rdi
movl 0xb4(%rbx), %esi
addq 0x10(%rbx), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x30e70f
movq 0x70(%rbx), %rdi
callq 0x30e641
movq 0x18(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x309daf
movq 0x18(%rbx), %rsi
movq 0x70(%rbx), %rdi
callq 0x30f138
testl %eax, %eax
je 0x309daf
testq %r15, %r15
je 0x30a044
movzwl 0xc4(%rbx), %eax
addl 0xc8(%rbx), %eax
movq 0x18(%rbx), %rcx
movq %rcx, 0x10(%rsp)
leal 0x6c(,%rax,4), %eax
cltq
leaq 0x20(%rax), %r13
cmpl $0x0, 0xb8(%rbx)
cmoveq %rax, %r13
leaq 0xd71d6(%rip), %rsi     # 0x3e09d0
movq %r13, %rdi
movl $0x7cf, %edx            # imm = 0x7CF
callq 0x104226
movq %rax, %r14
xorl %ecx, %ecx
testl $0x1ffc, %r13d          # imm = 0x1FFC
setne %cl
movq %r13, %rax
andq $-0x2000, %rax          # imm = 0xE000
shll $0xd, %ecx
addq %rax, %rcx
movl $0x584442, (%r14)       # imm = 0x584442
movq %rcx, 0x20(%rsp)
movl %ecx, 0x4(%r14)
movl $0x424b535a, 0x8(%r14)  # imm = 0x424B535A
movl 0xb4(%rbx), %eax
movl %eax, 0xc(%r14)
movl $0x42424c4b, 0x10(%r14) # imm = 0x42424C4B
movl 0xb0(%rbx), %eax
movl %eax, 0x14(%r14)
movl $0x564f4646, 0x18(%r14) # imm = 0x564F4646
movq 0x38(%rbx), %rax
movq %rax, 0x1c(%r14)
movl $0x524f4646, 0x24(%r14) # imm = 0x524F4646
movq 0x40(%rbx), %rax
movq %rax, 0x28(%r14)
movl $0x53454c45, 0x30(%r14) # imm = 0x53454C45
movq 0x10(%rbx), %rax
movq %rax, 0x34(%r14)
movl $0x53504254, 0x3c(%r14) # imm = 0x53504254
movl 0xbc(%rbx), %eax
movl %eax, 0x40(%r14)
movl $0x56444f42, 0x44(%r14) # imm = 0x56444F42
movl 0xc0(%rbx), %eax
movl %eax, 0x48(%r14)
movl $0x53534254, 0x4c(%r14) # imm = 0x53534254
movzwl 0xc4(%rbx), %eax
movl %eax, 0x50(%r14)
testq %rax, %rax
movq 0x188(%rsp), %r15
je 0x3098e6
movq 0xd0(%rbx), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
movl %esi, 0x54(%r14,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x3098d6
shll $0x2, %eax
movl $0x42454642, 0x54(%r14,%rax) # imm = 0x42454642
movzbl 0xc6(%rbx), %ecx
movl %ecx, 0x58(%r14,%rax)
movl $0x52454642, 0x5c(%r14,%rax) # imm = 0x52454642
movzbl 0xc7(%rbx), %ecx
movl %ecx, 0x60(%r14,%rax)
movl $0x4e4d524e, 0x64(%r14,%rax) # imm = 0x4E4D524E
movl 0xc8(%rbx), %ecx
movl %ecx, 0x68(%r14,%rax)
addq $0x6c, %rax
testl %ecx, %ecx
je 0x309952
movq 0xa8(%rbx), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
movl %esi, (%r14,%rax)
addq $0x4, %rax
incq %rdx
movslq 0xc8(%rbx), %rsi
cmpq %rsi, %rdx
jb 0x309938
cmpl $0x0, 0xb8(%rbx)
je 0x30999c
movl $0x43424d42, (%r14,%rax) # imm = 0x43424D42
movl 0xb8(%rbx), %ecx
movl %ecx, 0x4(%r14,%rax)
movl $0x43455842, 0x8(%r14,%rax) # imm = 0x43455842
movq 0x90(%rbx), %rcx
movq %rcx, 0xc(%r14,%rax)
movl $0x4d455842, 0x14(%r14,%rax) # imm = 0x4D455842
movq 0x88(%rbx), %rcx
movq %rcx, 0x18(%r14,%rax)
addq $0x20, %rax
cmpq %r13, %rax
jne 0x30a049
movq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x309dd2
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
movq 0x10(%rsp), %rcx
callq 0x11f89c
testq %rbp, %rbp
je 0x309bd0
movq %r14, 0x28(%rsp)
movq 0x198(%rsp), %rdx
movq 0x190(%rsp), %rsi
movq 0x180(%rsp), %rax
movzwl (%rax), %eax
movl (%r15), %ecx
movq (%rsi), %rbp
movq (%rdx), %r14
orl $0x45480000, %eax       # imm = 0x45480000
leaq 0x88(%rsp), %rdi
movl %eax, (%rdi)
movl %ecx, 0x4(%rdi)
movl $0x4, %esi
movl $0x2, %edx
movq 0x10(%rsp), %r12
movq %r12, %rcx
callq 0x11f89c
movq %r12, %rdi
movq %r14, %rsi
callq *%rbp
testl %eax, %eax
je 0x309e6b
movq 0x78(%rbx), %rdi
movq 0x80(%rbx), %rbp
leaq 0x1(%rbp), %rax
movq %rax, 0x80(%rbx)
leaq 0x8(%r13), %r14
movq 0x180(%rsp), %rax
movzwl (%rax), %r12d
orl $0x45480000, %r12d      # imm = 0x45480000
shlq $0x4, %rbp
leaq 0x10(%rbp), %rsi
leaq 0xd6f59(%rip), %rdx     # 0x3e09d0
movl $0x7a7, %ecx            # imm = 0x7A7
callq 0x104461
movq %rbx, 0x8(%rsp)
movq %rax, 0x78(%rbx)
movq %r14, (%rax,%rbp)
movl %r12d, 0x8(%rax,%rbp)
cmpq $0x1, 0x178(%rsp)
je 0x309ba3
movl $0x1, %ebp
movq %r13, %rax
movl -0x4(%r15,%rbp,4), %r13d
addl $0x8, %r13d
addq %rax, %r13
movq 0x10(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x309e72
movq 0x180(%rsp), %r12
movzwl (%r12,%rbp,2), %eax
movl (%r15,%rbp,4), %ecx
movq 0x190(%rsp), %rdx
movq (%rdx,%rbp,8), %r15
movq 0x198(%rsp), %rdx
movq (%rdx,%rbp,8), %r14
orl $0x45480000, %eax       # imm = 0x45480000
movl %eax, 0x88(%rsp)
movl %ecx, 0x8c(%rsp)
movl $0x4, %esi
movl $0x2, %edx
leaq 0x88(%rsp), %rdi
movq 0x10(%rsp), %rbx
movq %rbx, %rcx
callq 0x11f89c
movq %rbx, %rdi
movq %r14, %rsi
callq *%r15
testl %eax, %eax
movq 0x8(%rsp), %rbx
je 0x309e83
movq 0x78(%rbx), %rdi
movq 0x80(%rbx), %r15
leaq 0x1(%r15), %rax
movq %rax, 0x80(%rbx)
leaq 0x8(%r13), %r14
movzwl (%r12), %r12d
orl $0x45480000, %r12d      # imm = 0x45480000
shlq $0x4, %r15
leaq 0x10(%r15), %rsi
leaq 0xd6e5d(%rip), %rdx     # 0x3e09d0
movl $0x7a7, %ecx            # imm = 0x7A7
callq 0x104461
movq %rax, 0x78(%rbx)
movq %r14, (%rax,%r15)
movl %r12d, 0x8(%rax,%r15)
incq %rbp
cmpq %rbp, 0x178(%rsp)
movq 0x188(%rsp), %r15
jne 0x309aa7
movq 0x178(%rsp), %rax
movl -0x4(%r15,%rax,4), %r15d
addq %r14, %r15
movq 0x10(%rsp), %rdi
callq 0x17bc0
cmpq %rax, %r15
movq 0x28(%rsp), %r14
movq 0x8(%rsp), %rbx
jl 0x30a053
movq 0x20(%rsp), %r12
cmpq %r12, 0x30(%rbx)
jne 0x30a04e
leaq 0xd6dea(%rip), %r15     # 0x3e09d0
movq %r14, %rdi
movq %r15, %rsi
movl $0x82c, %edx            # imm = 0x82C
callq 0x1045eb
testq %r12, %r12
movq 0x58(%rsp), %r12
je 0x309ea1
movq (%r12), %rdi
callq 0x178f0
testl %eax, %eax
jne 0x309dfc
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x30a030
cmpq $0x0, 0x28(%rbx)
jne 0x30a030
movq 0x40(%rbx), %r14
subq 0x30(%rbx), %r14
callq 0x17850
movl %eax, %ebp
movq 0x20(%rbx), %rdi
callq 0x11b0a1
movq 0x30(%rbx), %rcx
subq $0x8, %rsp
movl %ebp, %edi
movq %rax, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x949                  # imm = 0x949
pushq %r15
callq 0xfd565
addq $0x20, %rsp
movq %rax, 0x28(%rbx)
movq 0x98(%rsp), %rdi
movq %r15, %rsi
movl $0x6db, %edx            # imm = 0x6DB
callq 0x1045eb
movq 0x90(%rsp), %rdi
movq %r15, %rsi
movl $0x6dc, %edx            # imm = 0x6DC
callq 0x1045eb
movq (%rsp), %rdi
movq %r15, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x1045eb
movq 0x68(%rsp), %rdi
movq %r15, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x1045eb
movq 0x40(%rsp), %rdi
movq %r15, %rsi
movl $0x285, %edx            # imm = 0x285
callq 0x1045eb
movq 0x38(%rsp), %rdi
movq %r15, %rsi
movl $0x286, %edx            # imm = 0x286
callq 0x1045eb
movq 0x48(%rsp), %rdi
movq %r15, %rsi
movl $0x287, %edx            # imm = 0x287
callq 0x1045eb
jmp 0x309fe9
cmpq $0x0, (%r15)
je 0x309d07
movq %r15, %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
movq 0x18(%rsp), %r14
movq 0xd8(%rsp), %rdi
je 0x309d1f
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x309d2d
callq 0x30e6b8
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x309d47
leaq 0xd6c93(%rip), %rsi     # 0x3e09d0
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x1045eb
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
je 0x309d64
leaq 0xd6c76(%rip), %rsi     # 0x3e09d0
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x1045eb
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x309d7e
leaq 0xd6c5c(%rip), %rsi     # 0x3e09d0
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x1045eb
leaq 0xd6c4b(%rip), %rsi     # 0x3e09d0
movq %rbx, %rdi
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x1045eb
testq %r14, %r14
je 0x309fc9
leaq 0xd6c2e(%rip), %rsi     # 0x3e09d0
movq %r14, %rdi
movl $0x1fa, %edx            # imm = 0x1FA
jmp 0x309fc4
leaq 0xd6dd5(%rip), %rdi     # 0x3e0b8b
callq 0x17690
leaq 0x90(%rsp), %rdi
callq 0x30a55b
movl $0x267, %ebp            # imm = 0x267
jmp 0x309ebf
movl $0x80e, %edx            # imm = 0x80E
jmp 0x309e8d
leaq 0xd6d7f(%rip), %rdi     # 0x3e0b62
callq 0x17690
leaq 0x90(%rsp), %rdi
callq 0x30a55b
movl $0x247, %ebp            # imm = 0x247
jmp 0x309e64
leaq 0xd6dc2(%rip), %rdi     # 0x3e0bc5
callq 0x17690
leaq 0x90(%rsp), %rdi
callq 0x30a55b
movl $0x277, %ebp            # imm = 0x277
jmp 0x309ebf
leaq 0xd6d3c(%rip), %rdi     # 0x3e0b62
callq 0x17690
movq %r15, %rbx
movq 0x98(%rsp), %rdi
leaq 0xd6b93(%rip), %r14     # 0x3e09d0
movq %r14, %rsi
movl $0x6db, %edx            # imm = 0x6DB
callq 0x1045eb
movq 0x90(%rsp), %rdi
movq %r14, %rsi
movl $0x6dc, %edx            # imm = 0x6DC
callq 0x1045eb
movl $0x27d, %ebp            # imm = 0x27D
movq 0x58(%rsp), %r12
jmp 0x309ebf
movl $0x815, %edx            # imm = 0x815
jmp 0x309e88
movl $0x81e, %edx            # imm = 0x81E
movq 0x28(%rsp), %r14
movq 0x8(%rsp), %rbx
jmp 0x309e8d
movl $0x821, %edx            # imm = 0x821
movq 0x28(%rsp), %r14
leaq 0xd6b3c(%rip), %rsi     # 0x3e09d0
movq %r14, %rdi
callq 0x1045eb
movq 0x58(%rsp), %r12
leaq 0xd6d1d(%rip), %rdi     # 0x3e0bc5
callq 0x17690
leaq 0x90(%rsp), %rdi
callq 0x30a55b
movl $0x270, %ebp            # imm = 0x270
leaq 0xd6b0a(%rip), %r14     # 0x3e09d0
movq (%rsp), %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x1045eb
movq 0x68(%rsp), %rdi
movq %r14, %rsi
movl $0x630, %edx            # imm = 0x630
callq 0x1045eb
movq 0x40(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x1045eb
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x1045eb
movq 0x48(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x1045eb
movq 0x18(%rsp), %r14
cmpq $0x0, (%r12)
je 0x309f2a
movq %r12, %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
movq 0xd8(%rsp), %rdi
je 0x309f3d
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x309f4b
callq 0x30e6b8
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x309f65
leaq 0xd6a75(%rip), %rsi     # 0x3e09d0
movl $0x28c, %edx            # imm = 0x28C
callq 0x1045eb
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
je 0x309f82
leaq 0xd6a58(%rip), %rsi     # 0x3e09d0
movl $0x28c, %edx            # imm = 0x28C
callq 0x1045eb
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x309f9c
leaq 0xd6a3e(%rip), %rsi     # 0x3e09d0
movl $0x28c, %edx            # imm = 0x28C
callq 0x1045eb
leaq 0xd6a2d(%rip), %rsi     # 0x3e09d0
movq %rbx, %rdi
movl $0x28c, %edx            # imm = 0x28C
callq 0x1045eb
testq %r14, %r14
je 0x309fc9
leaq 0xd6a14(%rip), %rsi     # 0x3e09d0
movq %r14, %rdi
movl $0x28c, %edx            # imm = 0x28C
callq 0x1045eb
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x309fd8
callq 0x19e389
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x309fe7
callq 0x19e389
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x173b0
callq 0x8f3b7
callq 0x8f6d3
callq 0x8f30c
callq 0x8f69a
callq 0x8f3ee
callq 0x8f427
callq 0x8f37e
callq 0x8f345
callq 0x8f4d2
callq 0x8f5ef
callq 0x8f460
callq 0x8f661
callq 0x8f50b
callq 0x8f628
callq 0x8f544
callq 0x8f5b6
callq 0x8f57d