// File: /workspace/github_c_makefile_star2_O3/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 $0x68, %rsp
movl %edx, 0x44(%rsp)
testq %rsi, %rsi
je 0x30b5ca
movq %rcx, %rbp
testq %rcx, %rcx
je 0x30b5ca
movq %rsi, %r14
movq %rdi, %r15
leaq 0xd640b(%rip), %rdx     # 0x3e09d0
movl $0xe8, %edi
movl $0x1, %esi
movl $0x84d, %ecx            # imm = 0x84D
callq 0x10436a
movq %rax, %r13
movq %rax, %rbx
movq %r15, 0x8(%rax)
leaq 0x1ae5c6(%rip), %rax    # 0x4b8bb0
movq %rax, (%r13)
leaq 0x18(%r13), %r12
leaq 0x9b124(%rip), %rdx     # 0x3a571d
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rcx
callq 0x30a088
testl %eax, %eax
je 0x30a72b
leaq 0xd63ba(%rip), %rsi     # 0x3e09d0
movl $0x8, %edi
movl $0x857, %edx            # imm = 0x857
callq 0x104226
movq %rax, %r14
movq (%r12), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %rax, %rdi
callq 0x17b40
cmpq $0x1, %rax
jne 0x30a7f0
leaq 0xd72ad(%rip), %rsi     # 0x3e18fc
movq %r14, %rdi
callq 0x17a40
testl %eax, %eax
je 0x30a8cd
leaq 0xd65e9(%rip), %rsi     # 0x3e0c4f
movq %rbp, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xfcb67
movq %r12, %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
je 0x30a68d
addq $0x48, %r13
movq %r13, %rdi
callq 0x30e1e8
movq %r15, %r12
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x30a69e
callq 0x30e6b8
movq 0x78(%rbx), %rdi
leaq 0xd6327(%rip), %r15     # 0x3e09d0
movq %r15, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x1045eb
movq 0xd0(%rbx), %rdi
movq %r15, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x1045eb
movq %r14, %rdi
movq %r15, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x1045eb
testq %r12, %r12
je 0x30a6e7
movq %r12, %rdi
callq 0x19e389
leaq 0xd62e2(%rip), %r14     # 0x3e09d0
xorl %edi, %edi
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x85f, %edx            # imm = 0x85F
jmp 0x30a8b4
leaq 0xd64e8(%rip), %rsi     # 0x3e0c1a
movq %rbp, %rdi
xorl %eax, %eax
callq 0xfcb67
movq %r12, %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
je 0x30a756
addq $0x48, %r13
movq %r13, %rdi
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x30a764
callq 0x30e6b8
movq 0x78(%rbx), %rdi
leaq 0xd6261(%rip), %r14     # 0x3e09d0
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x1045eb
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x1045eb
testq %r15, %r15
je 0x30a7ac
movq %r15, %rdi
callq 0x19e389
leaq 0xd621d(%rip), %r14     # 0x3e09d0
xorl %edi, %edi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x853, %edx            # imm = 0x853
jmp 0x30a8b4
leaq 0xd6440(%rip), %rsi     # 0x3e0c37
movq %rbp, %rdi
xorl %eax, %eax
callq 0xfcb67
movq %r12, %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
je 0x30a81b
addq $0x48, %r13
movq %r13, %rdi
callq 0x30e1e8
movq %r15, %r12
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x30a82c
callq 0x30e6b8
movq 0x78(%rbx), %rdi
leaq 0xd6199(%rip), %r15     # 0x3e09d0
movq %r15, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x1045eb
movq 0xd0(%rbx), %rdi
movq %r15, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x1045eb
movq %r14, %rdi
movq %r15, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x1045eb
testq %r12, %r12
je 0x30a875
movq %r12, %rdi
callq 0x19e389
leaq 0xd6154(%rip), %r14     # 0x3e09d0
xorl %edi, %edi
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x1045eb
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, 0x28(%rsp)
movq %rbx, %r13
movl 0x4(%r14), %ebx
movq %rbx, 0x30(%r13)
leaq 0xd60ec(%rip), %rdx     # 0x3e09d0
movq %r14, %rdi
movq %rbx, %rsi
movl $0x862, %ecx            # imm = 0x862
callq 0x104461
movq %rax, 0x10(%rsp)
leaq 0x8(%rax), %rdi
leaq -0x8(%rbx), %rsi
movq 0x18(%r13), %rcx
movl $0x1, %edx
movq %rdi, 0x60(%rsp)
callq 0x17b40
cmpq $0x1, %rax
jne 0x30ad05
movq %r13, 0x8(%rsp)
movq %r15, 0x20(%rsp)
cmpl $0x9, %ebx
movq %rbx, %rcx
movq %rbp, 0x30(%rsp)
jb 0x30add0
movq 0x10(%rsp), %rsi
leaq 0xc(%rsi), %rax
movq %rax, 0x48(%rsp)
movl $0x8, %r15d
xorl %edi, %edi
movq %rcx, %rbx
movq 0x28(%rsp), %r13
leaq (%rsi,%r15), %r14
movl (%rsi,%r15), %ebp
cmpl $0x52454641, %ebp       # imm = 0x52454641
jg 0x30a9ac
cmpl $0x43424d41, %ebp       # imm = 0x43424D41
jle 0x30aa9a
cmpl $0x4d455841, %ebp       # imm = 0x4D455841
jg 0x30ab32
cmpl $0x43424d42, %ebp       # imm = 0x43424D42
je 0x30ac01
cmpl $0x43455842, %ebp       # imm = 0x43455842
jne 0x30ac73
movq 0x4(%r14), %rax
movq 0x8(%rsp), %rdx
movq %rax, 0x90(%rdx)
jmp 0x30ac46
cmpl $0x53504253, %ebp       # imm = 0x53504253
jle 0x30aad2
cmpl $0x56444f41, %ebp       # imm = 0x56444F41
jg 0x30ab08
cmpl $0x53504254, %ebp       # imm = 0x53504254
je 0x30abdf
cmpl $0x53534254, %ebp       # imm = 0x53534254
jne 0x30ac73
movq %rdi, 0x18(%rsp)
movzbl 0x4(%r14), %ebp
leal (,%rbp,8), %edi
leaq 0xd5fdc(%rip), %rsi     # 0x3e09d0
movl $0x8a2, %edx            # imm = 0x8A2
callq 0x104226
movq 0x8(%rsp), %rcx
movq %rax, 0xd0(%rcx)
leaq (%rax,%rbp,4), %rdx
movq %rdx, 0xd8(%rcx)
movl %ebp, %ecx
testq %rbp, %rbp
je 0x30aa80
movl 0x8(%r14), %esi
movl %esi, (%rax)
movl $0x0, (%rdx)
cmpl $0x1, %ebp
je 0x30aa6d
movl (%rax), %esi
leal (,%rbp,4), %r8d
movl (%rax,%r8), %edi
decq %rbp
addq %rax, %r8
addq $0x4, %r8
movq %rax, %r9
addq $0x4, %r9
movq 0x48(%rsp), %r10
addq %r15, %r10
xorl %r11d, %r11d
addl %esi, %edi
movl (%r10,%r11,4), %esi
movl %esi, (%r9,%r11,4)
movl %edi, (%r8,%r11,4)
incq %r11
cmpq %r11, %rbp
jne 0x30aa57
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 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdi
movq %rbx, %rcx
jmp 0x30abb0
cmpl $0x42454641, %ebp       # imm = 0x42454641
jle 0x30abc2
cmpl $0x42454642, %ebp       # imm = 0x42454642
je 0x30abb0
cmpl $0x424b535a, %ebp       # imm = 0x424B535A
jne 0x30ac73
movl 0x4(%r14), %eax
movq 0x8(%rsp), %rdx
movl %eax, 0xb4(%rdx)
jmp 0x30ac33
cmpl $0x52454642, %ebp       # imm = 0x52454642
je 0x30ac24
cmpl $0x524f4646, %ebp       # imm = 0x524F4646
je 0x30ac39
cmpl $0x53454c45, %ebp       # imm = 0x53454C45
jne 0x30ac73
movq 0x4(%r14), %rax
movq 0x8(%rsp), %rdx
movq %rax, 0x10(%rdx)
jmp 0x30ac46
cmpl $0x56444f42, %ebp       # imm = 0x56444F42
je 0x30abf0
cmpl $0x564f4646, %ebp       # imm = 0x564F4646
jne 0x30ac73
movq 0x4(%r14), %rax
movq 0x8(%rsp), %rdx
movq %rax, 0x38(%rdx)
jmp 0x30ac46
cmpl $0x4d455842, %ebp       # imm = 0x4D455842
je 0x30ac12
cmpl $0x4e4d524e, %ebp       # imm = 0x4E4D524E
jne 0x30ac73
movslq 0x4(%r14), %r14
movq 0x8(%rsp), %r13
movl %r14d, 0xc8(%r13)
leaq (,%r14,4), %rdi
leaq 0xd5e67(%rip), %rsi     # 0x3e09d0
movl $0x887, %edx            # imm = 0x887
callq 0x104226
movq %rax, %rdi
movq %rax, 0xa8(%r13)
testq %r14, %r14
je 0x30ac58
movq 0x60(%rsp), %rax
addq %r15, %rax
leaq (%r15,%r14,4), %r15
addq $0x8, %r15
xorl %ecx, %ecx
movq 0x10(%rsp), %rsi
movl (%rax,%rcx,4), %edx
movl %edx, (%rdi,%rcx,4)
incq %rcx
cmpq %rcx, %r14
jne 0x30ab9d
jmp 0x30ac61
movb 0x4(%rsi,%r15), %al
movq 0x8(%rsp), %rdx
movb %al, 0xc6(%rdx)
jmp 0x30ac33
cmpl $0x42424c4b, %ebp       # imm = 0x42424C4B
jne 0x30ac6b
movl 0x4(%r14), %eax
movq 0x8(%rsp), %rdx
movl %eax, 0xb0(%rdx)
jmp 0x30ac33
movl 0x4(%r14), %eax
movq 0x8(%rsp), %rdx
movl %eax, 0xbc(%rdx)
jmp 0x30ac33
movl 0x4(%r14), %eax
movq 0x8(%rsp), %rdx
movl %eax, 0xc0(%rdx)
jmp 0x30ac33
movl 0x4(%r14), %eax
movq 0x8(%rsp), %rdx
movl %eax, 0xb8(%rdx)
jmp 0x30ac33
movq 0x4(%r14), %rax
movq 0x8(%rsp), %rdx
movq %rax, 0x88(%rdx)
jmp 0x30ac46
movb 0x4(%r14), %al
movq 0x8(%rsp), %rdx
movb %al, 0xc7(%rdx)
addq $0x8, %r15
jmp 0x30ac4a
movq 0x4(%r14), %rax
movq 0x8(%rsp), %rdx
movq %rax, 0x40(%rdx)
addq $0xc, %r15
cmpq %rcx, %r15
jb 0x30a957
jmp 0x30addd
addq $0x8, %r15
movq 0x10(%rsp), %rsi
movq %rbx, %rcx
movq 0x28(%rsp), %r13
jmp 0x30ac4a
testl %ebp, %ebp
je 0x30b4e8
movq %rdi, 0x18(%rsp)
movl %ebp, %eax
andl $0xffff0000, %eax       # imm = 0xFFFF0000
cmpl $0x45480000, %eax       # imm = 0x45480000
jne 0x30b4f0
movl 0x4(%r14), %eax
movq %rax, 0x58(%rsp)
leaq 0x8(%r15), %rax
movq %rax, 0x50(%rsp)
movq 0x8(%rsp), %r13
movq 0x78(%r13), %rdi
movq 0x80(%r13), %r14
leaq 0x1(%r14), %rax
movq %rax, 0x80(%r13)
shlq $0x4, %r14
leaq 0x10(%r14), %rsi
leaq 0xd5d0a(%rip), %rdx     # 0x3e09d0
movl $0x7a7, %ecx            # imm = 0x7A7
callq 0x104461
movq %rbx, %rcx
movq %rax, 0x78(%r13)
movq 0x28(%rsp), %r13
movq 0x50(%rsp), %rdx
movq %rdx, (%rax,%r14)
movl %ebp, 0x8(%rax,%r14)
movq 0x58(%rsp), %rax
addq %rax, %r15
addq $0x8, %r15
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdi
jmp 0x30ac4a
leaq 0xd5f66(%rip), %rsi     # 0x3e0c72
movq %rbp, %rdi
xorl %eax, %eax
callq 0xfcb67
movq %r12, %rdi
callq 0x30a058
cmpl $0x0, 0x60(%r13)
je 0x30ad33
movq 0x28(%rsp), %rdi
addq $0x48, %rdi
callq 0x30e1e8
movq 0x70(%r13), %rdi
testq %rdi, %rdi
je 0x30ad41
callq 0x30e6b8
movq 0x78(%r13), %rdi
leaq 0xd5c84(%rip), %r14     # 0x3e09d0
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x1045eb
movq 0xd0(%r13), %rdi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x1045eb
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x1045eb
testq %r15, %r15
je 0x30ad8c
movq %r15, %rdi
callq 0x19e389
leaq 0xd5c3d(%rip), %r14     # 0x3e09d0
xorl %edi, %edi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
callq 0x1045eb
movq %r13, %rdi
movq %r14, %rsi
movl $0x866, %edx            # imm = 0x866
jmp 0x30a8b4
movl $0x8, %r15d
xorl %edi, %edi
movq 0x28(%rsp), %r13
movq %r12, 0x38(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x8(%rsp), %rbx
cmpq $0x0, 0xa8(%rbx)
je 0x30b5d4
cmpl $0x0, 0xb0(%rbx)
je 0x30b5d4
cmpq %rcx, %r15
jne 0x30b5d4
cmpl $0x0, 0xc8(%rbx)
je 0x30b5d4
movl 0xbc(%rbx), %ebp
movq 0x10(%rbx), %rdi
decq %rdi
callq 0x2f09dd
testl %ebp, %ebp
je 0x30af2b
cmpl %eax, %ebp
movq 0x20(%rsp), %r15
je 0x30af36
movl 0xbc(%rbx), %r14d
movq 0x10(%rbx), %rdi
decq %rdi
callq 0x2f09dd
leaq 0xd5e9d(%rip), %rsi     # 0x3e0cfb
movq 0x30(%rsp), %rdi
movl %r14d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xfcb67
movq 0x38(%rsp), %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
je 0x30ae8b
addq $0x48, %r13
movq %r13, %rdi
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x30ae99
callq 0x30e6b8
movq 0x78(%rbx), %rdi
leaq 0xd5b2c(%rip), %r14     # 0x3e09d0
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x1045eb
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x1045eb
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x1045eb
testq %r15, %r15
je 0x30aee4
movq %r15, %rdi
callq 0x19e389
leaq 0xd5ae5(%rip), %r14     # 0x3e09d0
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8f1, %edx            # imm = 0x8F1
jmp 0x30a8b4
movl %eax, 0xbc(%rbx)
movq 0x20(%rsp), %r15
movl 0x4(%r15), %r14d
movl %r14d, 0xc8(%rbx)
movq %r15, %rdi
callq 0x19e077
testq %r14, %r14
je 0x30af8b
xorl %eax, %eax
xorl %ebp, %ebp
movq 0x18(%rsp), %rdx
movl (%rdx,%rax,4), %ecx
testl %ecx, %ecx
je 0x30af81
cmpl $0x2, %ecx
je 0x30af81
cmpl $0x1, %ecx
jne 0x30b35a
movl 0x4(%r15), %ecx
cmpq %rcx, %rax
jae 0x30b5cf
movq 0x10(%r15), %rcx
addb (%rcx,%rax,2), %bpl
incq %rax
cmpq %rax, %r14
jne 0x30af57
jmp 0x30af92
xorl %ebp, %ebp
movq 0x18(%rsp), %rdx
movzbl 0xc6(%rbx), %ecx
movq %r15, %rdi
movl $0x1, %esi
movq %rdx, %r14
callq 0x19e097
movq %r15, %rdi
movq %rax, %r15
movq %rax, 0x98(%rbx)
movzbl 0xc7(%rbx), %ecx
movl $0x2, %esi
movq %r14, %rdx
callq 0x19e097
movq %rax, %r12
movq %rax, 0xa0(%rbx)
movzbl %bpl, %r14d
movw %r14w, 0xc4(%rbx)
movq %r15, %rdi
callq 0x19e077
cmpw %r14w, %ax
jne 0x30b5d9
cmpq $0x0, 0xd0(%rbx)
jne 0x30b09f
testb %bpl, %bpl
je 0x30b09f
leal (,%r14,8), %edi
leaq 0xd59b8(%rip), %rsi     # 0x3e09d0
movl $0x919, %edx            # imm = 0x919
callq 0x104226
movq %rax, 0xd0(%rbx)
leaq (%rax,%r14,4), %rcx
movq %rcx, 0xd8(%rbx)
movzwl 0xc4(%rbx), %edx
xorl %esi, %esi
movl $0x0, (%rcx)
movl 0xbc(%rbx), %r8d
movl %r8d, (%rax)
cmpl $0x2, %edx
jb 0x30b086
movl %edx, %r8d
decq %r8
leaq (%rax,%r14,4), %r9
addq $0x4, %r9
xorl %edi, %edi
movl 0xbc(%rbx), %r10d
movl %r10d, 0x4(%rax,%rdi,4)
addl %r10d, %esi
movl %esi, (%r9,%rdi,4)
incq %rdi
cmpq %rdi, %r8
jne 0x30b062
movl 0xbc(%rbx), %r8d
jmp 0x30b088
xorl %edi, %edi
imull %r8d, %edx
movl %edx, 0xe0(%rbx)
addl (%rcx,%rdi,4), %r8d
cmpl %edx, %r8d
jne 0x30b5de
addq $0x48, %r13
movl 0xb4(%rbx), %esi
movq %r13, %rdi
movl %r14d, %edx
callq 0x30da60
testl %eax, %eax
je 0x30b1ee
cmpl $0x0, 0xc0(%rbx)
movq 0x38(%rsp), %rbp
movq 0x30(%rsp), %r14
jne 0x30b10c
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 0x2f09dd
movl %eax, 0xc0(%rbx)
movq 0x18(%rbx), %rdi
movq 0x40(%rbx), %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
je 0x30b2bd
leaq 0xd5c44(%rip), %rsi     # 0x3e0d6e
movq %r14, %rdi
xorl %eax, %eax
callq 0xfcb67
movq %rbp, %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
je 0x30b14a
movq %r13, %rdi
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x30b158
callq 0x30e6b8
movq 0x78(%rbx), %rdi
leaq 0xd586d(%rip), %r14     # 0x3e09d0
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x1045eb
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x1045eb
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x1045eb
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x30b1a5
callq 0x19e389
leaq 0xd5824(%rip), %r14     # 0x3e09d0
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x1045eb
movq %r15, %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x1045eb
movq %r12, %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x92f, %edx            # imm = 0x92F
jmp 0x30a8b4
leaq 0xd5b55(%rip), %rsi     # 0x3e0d4a
movq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0xfcb67
movq 0x38(%rsp), %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
je 0x30b219
movq %r13, %rdi
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x30b227
callq 0x30e6b8
movq 0x78(%rbx), %rdi
leaq 0xd579e(%rip), %r14     # 0x3e09d0
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x1045eb
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x1045eb
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x1045eb
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x30b274
callq 0x19e389
leaq 0xd5755(%rip), %r14     # 0x3e09d0
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x1045eb
movq %r15, %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x1045eb
movq %r12, %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x922, %edx            # imm = 0x922
jmp 0x30a8b4
movl 0x44(%rsp), %edx
andl $0x1, %edx
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x30f18b
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x30b41d
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x30b5e3
cmpq $0x0, 0x28(%rbx)
jne 0x30b5e3
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
leaq 0xd569c(%rip), %r14     # 0x3e09d0
pushq %r14
callq 0xfd565
addq $0x20, %rsp
movq %rax, 0x28(%rbx)
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x93d, %edx            # imm = 0x93D
callq 0x1045eb
jmp 0x30a8bb
leaq 0xd59cf(%rip), %rsi     # 0x3e0d30
movq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0xfcb67
movq 0x38(%rsp), %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
je 0x30b389
addq $0x48, %r13
movq %r13, %rdi
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x30b397
callq 0x30e6b8
movq 0x78(%rbx), %rdi
leaq 0xd562e(%rip), %r14     # 0x3e09d0
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x1045eb
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x1045eb
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x1045eb
movq %r15, %rdi
callq 0x19e389
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x908, %edx            # imm = 0x908
jmp 0x30a8b4
leaq 0xd595a(%rip), %rsi     # 0x3e0d7e
movq %r14, %rdi
xorl %eax, %eax
callq 0xfcb67
movq %rbp, %rdi
callq 0x30a058
cmpl $0x0, 0x60(%rbx)
je 0x30b444
movq %r13, %rdi
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x30b452
callq 0x30e6b8
movq 0x78(%rbx), %rdi
leaq 0xd5573(%rip), %r14     # 0x3e09d0
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x1045eb
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x1045eb
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x1045eb
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x30b49f
callq 0x19e389
leaq 0xd552a(%rip), %r14     # 0x3e09d0
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x1045eb
movq %r15, %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x1045eb
movq %r12, %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x939, %edx            # imm = 0x939
jmp 0x30a8b4
movq %rcx, %r15
jmp 0x30addd
leaq 0xd5790(%rip), %rsi     # 0x3e0c87
movq 0x30(%rsp), %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xfcb67
movq %r12, %rdi
callq 0x30a058
movq 0x8(%rsp), %rbx
cmpl $0x0, 0x60(%rbx)
je 0x30b525
addq $0x48, %r13
movq %r13, %rdi
callq 0x30e1e8
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
movq 0x20(%rsp), %r15
je 0x30b538
callq 0x30e6b8
movq 0x78(%rbx), %rdi
leaq 0xd548d(%rip), %r14     # 0x3e09d0
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x1045eb
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x1045eb
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x1045eb
testq %r15, %r15
je 0x30b583
movq %r15, %rdi
callq 0x19e389
leaq 0xd5446(%rip), %r14     # 0x3e09d0
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x1045eb
xorl %edi, %edi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8e0, %edx            # imm = 0x8E0
jmp 0x30a8b4
callq 0x8f94e
callq 0x8f987
callq 0x8fa69
callq 0x8f9be
callq 0x8f9f7
callq 0x8fa30