// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/fmi-sufbwtstream.c
// Function: gt_sufbwt2fmindex
int gt_sufbwt2fmindex(Fmindex *fmindex,
                   GtSpecialcharinfo *specialcharinfo,
                   unsigned int log2bsize,
                   unsigned int log2markdist,
                   const char *outfmindex,
                   const GtStrArray *indexnametab,
                   bool storeindexpos,
                   GtLogger *logger,
                   GtError *err)
{
  Suffixarray suffixarray;
  Emissionmergedesa emmesa;
  GtUchar cc;
  GtUword bwtpos,
         totallength = 0,
         suftabvalue = 0,
         *sequenceoffsettable = NULL,
         firstignorespecial = 0,
         nextmark,
         *markptr,
         nextprogress,
         tmpsuftabvalue,
         stepprogress;
  unsigned int numofchars = 0,
               suffixlength = 0,
               numofindexes;
  int retval;
  Definedunsignedlong longest = { false, 0 };
  GtPairBwtidx *pairptr;
  FILE *outbwt = NULL;
  GtStr *tmpfilename = NULL;
  bool haserr = false;

  gt_error_check(err);
  longest.defined = false;
  longest.valueunsignedlong = 0;
  numofindexes = (unsigned int) gt_str_array_size(indexnametab);
  if (numofindexes == 1U)
  {
    const char *indexname = gt_str_array_get(indexnametab,0);

    if (streamsuffixarray(&suffixarray,
                          SARR_BWTTAB | (storeindexpos ? SARR_SUFTAB : 0),
                          indexname,
                          logger,
                          err) != 0)
    {
      haserr = true;
    } else
    {
      totallength = gt_encseq_total_length(suffixarray.encseq);
    }
    if (!haserr && gt_specialcharinfo_read(specialcharinfo,indexname,err) != 0)
    {
      haserr = true;
    }
    if (!haserr)
    {
      numofchars = gt_alphabet_num_of_chars(
                               gt_encseq_alphabet(suffixarray.encseq));
      firstignorespecial = totallength - specialcharinfo->specialcharacters;
      if (gt_alphabet_to_file(gt_encseq_alphabet(suffixarray.encseq),
                              outfmindex, err) != 0)
      {
        haserr = true;
      }
    }
    if (!haserr)
    {
      if (copytheindexfile(outfmindex,
                            indexname,
                            GT_BWTTABSUFFIX,
                            (uint64_t) firstignorespecial,
                            err) != 0)
      {
        haserr = true;
      }
    }
  } else
  {
    GtEncseqMetadata *emd = NULL;
    if (gt_emissionmergedesa_init(&emmesa,
                               indexnametab,
                               SARR_ESQTAB | SARR_SUFTAB | SARR_LCPTAB,
                               logger,
                               err) != 0)
    {
      haserr = true;
    }
    if (!haserr)
    {
      const char *indexname = NULL;
      indexname = gt_str_array_get(indexnametab,0);
      emd = gt_encseq_metadata_new(indexname, err);
      if (emd == NULL) {
        haserr = true;
      }
    }
    if (!haserr) {
      suffixlength = 0;
      if (gt_alphabet_to_file(gt_encseq_metadata_alphabet(emd),
                              outfmindex, err) != 0)
      {
        haserr = true;
      }
    }
    gt_encseq_metadata_delete(emd);
    if (!haserr)
    {
      sequenceoffsettable = gt_encseqtable2sequenceoffsets(&totallength,
                                                        specialcharinfo,
                                                        emmesa.suffixarraytable,
                                                        numofindexes);
      if (sequenceoffsettable == NULL)
      {
        haserr = true;
      }
    }
    if (!haserr)
    {
      longest.defined = false;
      longest.valueunsignedlong = 0;
      outbwt = gt_fa_fopen_with_suffix(outfmindex,GT_BWTTABSUFFIX,"wb",err);
      if (outbwt == NULL)
      {
        haserr = true;
      }
    }
    if (!haserr)
    {
      numofchars = emmesa.numofchars;
      firstignorespecial = totallength - specialcharinfo->specialcharacters;
    }
  }
  if (!haserr)
  {
    printf("# firstignorespecial="GT_WU"\n",
              firstignorespecial);
    gt_computefmkeyvalues (fmindex,
                        specialcharinfo,
                        totallength+1,
                        log2bsize,
                        log2markdist,
                        numofchars,
                        suffixlength,
                        storeindexpos);
    showconstructionmessage(outfmindex,
                            totallength,
                            fmindex->sizeofindex,
                            log2bsize,
                            log2markdist,
                            numofchars);
    allocatefmtables(fmindex,specialcharinfo,storeindexpos);
    set0frequencies(fmindex);
    if (storeindexpos)
    {
      markptr = fmindex->markpostable;
    } else
    {
      markptr = NULL;
    }
    nextprogress = stepprogress = totallength/78;
    for (bwtpos = 0, nextmark = 0; ; bwtpos++)
    {
      if (numofindexes == 1U)
      {
        if (storeindexpos)
        {
          retval = gt_readnextfromstream_GtUword(&tmpsuftabvalue,
                                            &suffixarray.suftabstream_GtUword);
          if (retval == 0)
          {
            break;
          }
          suftabvalue = (GtUword) tmpsuftabvalue;
        }
        retval = gt_readnextfromstream_GtUchar(&cc,&suffixarray.bwttabstream);
        if (retval == 0)
        {
          break;
        }
      } else
      {
        retval = nextesamergedsufbwttabvalues(&longest,
                                              &cc,
                                              &suftabvalue,
                                              &emmesa,
                                              sequenceoffsettable,
                                              bwtpos,
                                              err);
        if (retval < 0)
        {
          haserr = true;
          break;
        }
        if (retval == 0)
        {
          break;
        }
        gt_xfwrite(&cc, sizeof (GtUchar), (size_t) 1, outbwt);
      }
      if (bwtpos == nextprogress)
      {
        if (bwtpos == stepprogress)
        {
          (void) putchar('#');
        }
        (void) putchar('.');
        (void) fflush(stdout);
        nextprogress += stepprogress;
      }
      if (storeindexpos && bwtpos == nextmark)
      {
        *markptr++ = suftabvalue;
        nextmark += fmindex->markdist;
      }
      if (GT_ISBWTSPECIAL(cc))
      {
        if (storeindexpos && bwtpos < firstignorespecial)
        {
          pairptr = fmindex->specpos.spaceGtPairBwtidx +
                    fmindex->specpos.nextfreeGtPairBwtidx++;
          if (pairptr >= fmindex->specpos.spaceGtPairBwtidx +
                         fmindex->specpos.allocatedGtPairBwtidx)
          {
            gt_error_set(err,"program error: not enough space for specpos");
            haserr = true;
            break;
          }
          pairptr->bwtpos = bwtpos;
          pairptr->suftabvalue = suftabvalue;
        }
      } else
      {
        fmindex->tfreq[cc+1]++;
        fmindex->bfreq[(cc * fmindex->nofblocks) +
                       (bwtpos >> fmindex->log2bsize)]++;
        fmindex->superbfreq[(cc * fmindex->nofsuperblocks) +
                       (bwtpos >> fmindex->log2superbsize) + 1]++;
      }
    }
  }
  if (!haserr)
  {
    if (storeindexpos &&
        fmindex->specpos.allocatedGtPairBwtidx !=
        fmindex->specpos.nextfreeGtPairBwtidx)
    {
      gt_error_set(err,"program error: too much space for specpos: "
                    "allocated = "GT_WU" != "GT_WU" = used",
                    fmindex->specpos.allocatedGtPairBwtidx,
                    fmindex->specpos.nextfreeGtPairBwtidx);
      haserr = true;
    }
  }
  if (!haserr)
  {
    (void) putchar('\n');
    finalizefmfrequencies(fmindex);
    if (fmindex->suffixlength > 0)
    {
      fmindex->boundarray = gt_malloc(sizeof *fmindex->boundarray
                                      * fmindex->numofcodes);
    }
    if (numofindexes == 1U)
    {
      fmindex->longestsuffixpos = suffixarray.longest.valueunsignedlong;
      gt_freesuffixarray(&suffixarray);
    } else
    {
      if (!longest.defined)
      {
        gt_error_set(err,"longest is not defined after merging");
        haserr = true;
      }
      if (!haserr)
      {
        fmindex->longestsuffixpos = longest.valueunsignedlong;
      }
      gt_fa_xfclose(outbwt);
      gt_emissionmergedesa_wrap(&emmesa);
    }
  }
  gt_free(sequenceoffsettable);
  gt_free(tmpfilename);
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x301c8, %rsp          # imm = 0x301C8
movq %r9, %r14
movq %r8, 0x10(%rsp)
movl %ecx, %r12d
movl %edx, 0x48(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movq 0x30210(%rsp), %rbp
movq $0x0, 0x20(%rsp)
testq %rbp, %rbp
je 0x1b76b8
movq %rbp, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1b82f4
movl %r12d, 0x28(%rsp)
movq %r15, 0x8(%rsp)
movq 0x30208(%rsp), %r13
movb 0x30200(%rsp), %r15b
movq %r14, %rdi
callq 0x121e78
movq %rax, 0x50(%rsp)
cmpl $0x1, %eax
jne 0x1b7763
movq %r14, %rdi
xorl %esi, %esi
callq 0x121cfa
movq %rax, %r12
movzbl %r15b, %eax
leal 0x8(,%rax,2), %esi
leaq 0x60(%rsp), %rdi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x1a9f52
movb $0x1, %r13b
testl %eax, %eax
jne 0x1b7728
movq 0x60(%rsp), %rdi
callq 0xec1d8
movq %rax, 0x20(%rsp)
xorl %r13d, %r13d
testb %r13b, %r13b
jne 0x1b774d
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0xf0261
testl %eax, %eax
movzbl %r13b, %eax
movl $0x1, %r13d
cmovel %eax, %r13d
testb %r13b, %r13b
je 0x1b779a
movq $0x0, 0x18(%rsp)
xorl %r14d, %r14d
jmp 0x1b77e8
movl %r15d, %r12d
leaq 0x160(%rsp), %rdi
movq %r14, %rsi
movl $0x7, %edx
movq %r13, %rcx
movq %rbp, %r8
callq 0x31bc69
movq %rbp, %r15
xorl %ebp, %ebp
testl %eax, %eax
setne %r13b
je 0x1b7895
xorl %r14d, %r14d
jmp 0x1b78bd
movq 0x60(%rsp), %rdi
callq 0xf02da
movq %rax, %rdi
callq 0xd3713
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %r14
movq 0x8(%rsp), %rax
subq (%rax), %r14
movq 0x60(%rsp), %rdi
callq 0xf02da
movq %rax, %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0xd44c7
testl %eax, %eax
movzbl %r13b, %eax
movl $0x1, %r13d
cmovel %eax, %r13d
testb %r13b, %r13b
je 0x1b7809
movq $0x0, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x8(%rsp), %r12
jmp 0x1b7a7a
movl %r13d, 0x4(%rsp)
testq %rbp, %rbp
je 0x1b7823
movq %rbp, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1b82f9
movq %r14, 0x40(%rsp)
leaq 0x1f6027(%rip), %rsi    # 0x3ad856
leaq 0x1a72d7(%rip), %rdx    # 0x35eb0d
leaq 0x1f87a6(%rip), %rcx    # 0x3affe3
movq 0x10(%rsp), %rdi
movl $0x33, %r8d
movq %rbp, %r9
callq 0x101dff
movq %rax, %r13
testq %rax, %rax
movq %rbp, %r9
sete %bpl
je 0x1b79ca
leaq 0x1f5fec(%rip), %rsi    # 0x3ad856
leaq 0x1f744e(%rip), %rdx    # 0x3aecbf
leaq 0x1f876b(%rip), %rcx    # 0x3affe3
movq %r12, %rdi
movl $0x3a, %r8d
callq 0x101dff
movq %rax, %r14
testq %rax, %rax
sete %bpl
jmp 0x1b79cd
movq %r14, %rdi
xorl %esi, %esi
callq 0x121cfa
movq %rax, %rdi
movq %r15, %rsi
callq 0x1000e4
movq %rax, %r14
testq %rax, %rax
movb %r13b, %bpl
movl $0x1, %r13d
cmovnel %ebp, %r13d
testb %r13b, %r13b
movl %r12d, %r15d
je 0x1b78cf
movq 0x30210(%rsp), %rbp
jmp 0x1b78ff
movq %r14, %rdi
callq 0x100d2c
movq %rax, %rdi
movq 0x10(%rsp), %rsi
movq 0x30210(%rsp), %rbp
movq %rbp, %rdx
callq 0xd44c7
testl %eax, %eax
movzbl %r13b, %eax
movl $0x1, %r13d
cmovel %eax, %r13d
movq 0x8(%rsp), %r12
movq %r14, %rdi
callq 0x100e07
testb %r13b, %r13b
je 0x1b791c
movq $0x0, 0x30(%rsp)
jmp 0x1b794c
movq 0x301b8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movq 0x50(%rsp), %rcx
callq 0x319d08
movq %rax, 0x30(%rsp)
testq %rax, %rax
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
testb %r13b, %r13b
je 0x1b795c
movq $0x0, 0x38(%rsp)
jmp 0x1b799a
leaq 0x1f5ef3(%rip), %rsi    # 0x3ad856
leaq 0x1a71a3(%rip), %rdx    # 0x35eb0d
leaq 0x1f8672(%rip), %rcx    # 0x3affe3
movq 0x10(%rsp), %rdi
movl $0x16e, %r8d            # imm = 0x16E
movq %rbp, %r9
callq 0x101dff
movq %rax, 0x38(%rsp)
testq %rax, %rax
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
testb %r13b, %r13b
je 0x1b79b0
movq $0x0, 0x18(%rsp)
xorl %r14d, %r14d
jmp 0x1b7a7a
movl 0x301c0(%rsp), %eax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %r14
subq (%r12), %r14
jmp 0x1b7a7a
xorl %r14d, %r14d
leaq 0x1f86f1(%rip), %rdi    # 0x3b00c5
leaq 0x1f5e7b(%rip), %rdx    # 0x3ad856
movq %r12, %rsi
movq 0x10(%rsp), %rcx
movq %rdx, %r8
xorl %eax, %eax
callq 0x17070
movb $0x1, %r15b
testb %bpl, %bpl
movq 0x30210(%rsp), %rbp
movq 0x8(%rsp), %r12
jne 0x1b7a48
movq 0x40(%rsp), %r15
testq %r15, %r15
je 0x1b7a34
movq %r14, %rdi
callq 0x17c20
cmpl $-0x1, %eax
je 0x1b7a41
movl %eax, %edi
movq %r13, %rsi
callq 0x17f80
decq %r15
jne 0x1b7a0c
jmp 0x1b7a41
movl %eax, %edi
movq %r13, %rsi
callq 0x17f80
movq %r14, %rdi
callq 0x17c20
cmpl $-0x1, %eax
jne 0x1b7a2a
movl 0x4(%rsp), %eax
movl %eax, %r15d
movq %r13, %rdi
callq 0x101f02
movq %r14, %rdi
callq 0x101f02
movq $0x0, 0x38(%rsp)
movl %r15d, %r13d
movq $0x0, 0x30(%rsp)
movb 0x30200(%rsp), %r15b
movq 0x40(%rsp), %r14
testb %r13b, %r13b
je 0x1b7a96
movq $0x0, 0x28(%rsp)
movq $0x0, 0x18(%rsp)
jmp 0x1b816f
movl %r13d, 0x4(%rsp)
leaq 0x1f855e(%rip), %rdi    # 0x3b0000
movq %r14, 0x40(%rsp)
movq %r14, %rsi
xorl %eax, %eax
callq 0x17070
movq 0x20(%rsp), %rdx
incq %rdx
movzbl %r15b, %eax
movq %rbx, %rdi
movq %r12, %rsi
movl 0x48(%rsp), %r13d
movl %r13d, %ecx
movl 0x28(%rsp), %r15d
movl %r15d, %r8d
movq 0x18(%rsp), %r14
movl %r14d, %r9d
pushq %rax
pushq $0x0
callq 0x321f5b
addq $0x10, %rsp
movq 0x20(%rsp), %r12
movq 0xa0(%rbx), %rax
movq %rax, 0x58(%rsp)
movl $0x1, %eax
movl $0x1, %edx
movl %r13d, %ecx
shll %cl, %edx
movl %r15d, %ecx
movb 0x30200(%rsp), %r15b
shll %cl, %eax
leaq 0x1f85ba(%rip), %rdi    # 0x3b00d5
movq 0x10(%rsp), %rsi
movq %rax, %rcx
xorl %eax, %eax
callq 0x17070
leaq 0x1f85dc(%rip), %rdi    # 0x3b010d
movq %r12, %rsi
movl %r14d, %edx
xorl %eax, %eax
callq 0x17070
movq 0x58(%rsp), %rsi
movq %rsi, %xmm1
movq 0x198d90(%rip), %xmm2   # 0x3508e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x198d94(%rip), %xmm3   # 0x3508f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
incq %r12
movq %r12, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x1f8598(%rip), %rdi    # 0x3b012b
movb $0x1, %al
callq 0x17070
movl 0x78(%rbx), %edi
incl %edi
shlq $0x3, %rdi
leaq 0x1f8439(%rip), %r14    # 0x3affe3
movq %r14, %rsi
movl $0x60, %edx
callq 0x1092b2
movq %rax, 0x18(%rbx)
movl 0x78(%rbx), %edi
imulq 0xb0(%rbx), %rdi
shlq $0x3, %rdi
movq %r14, %rsi
movl $0x62, %edx
callq 0x1092b2
movq %rax, 0x20(%rbx)
testb %r15b, %r15b
je 0x1b7ca6
movq 0x10(%rbx), %rax
decq %rax
xorl %edx, %edx
divq 0xb8(%rbx)
leaq 0x8(,%rax,8), %rdi
leaq 0x1f83e0(%rip), %r14    # 0x3affe3
movq %r14, %rsi
movl $0x67, %edx
callq 0x1092b2
movq %rax, 0x28(%rbx)
movq $0x0, 0x60(%rbx)
movq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x321f34
movq %rax, 0x58(%rbx)
movq (%r12), %rdx
movq %rdx, %rsi
subq %rax, %rsi
movq %rsi, %xmm1
movq 0x198c9c(%rip), %xmm2   # 0x3508e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x198ca0(%rip), %xmm3   # 0x3508f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %rdx, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x1f84c7(%rip), %rdi    # 0x3b014b
movb $0x1, %al
callq 0x17070
movq 0x58(%rbx), %rdi
shlq $0x4, %rdi
movq %r14, %rsi
movl $0x74, %edx
callq 0x1092b2
movq %rax, 0x50(%rbx)
jmp 0x1b7cb9
xorl %eax, %eax
movq %rax, 0x28(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x50(%rbx)
movq %rax, 0x60(%rbx)
movl 0x78(%rbx), %edi
imulq 0xa8(%rbx), %rdi
leaq 0x1f8318(%rip), %rsi    # 0x3affe3
movl $0x7b, %edx
callq 0x1092b2
movq %rax, 0x8(%rbx)
movl 0x78(%rbx), %r14d
movl %r14d, %eax
incl %eax
je 0x1b7cf5
movl %eax, %edx
movq 0x18(%rbx), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x173a0
movq 0xa8(%rbx), %rax
imulq %r14, %rax
testq %rax, %rax
je 0x1b7d26
xorl %eax, %eax
movq 0x8(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
movl 0x78(%rbx), %r14d
movq 0xa8(%rbx), %rcx
imulq %r14, %rcx
cmpq %rcx, %rax
jb 0x1b7d07
movq 0xb0(%rbx), %rax
imulq %r14, %rax
testq %rax, %rax
je 0x1b7d57
movq 0x20(%rbx), %rax
xorl %ecx, %ecx
movq $0x0, (%rax,%rcx,8)
incq %rcx
movq 0xb0(%rbx), %rdx
imulq %r14, %rdx
cmpq %rdx, %rcx
jb 0x1b7d3c
testb %r15b, %r15b
je 0x1b7d67
movq 0x28(%rbx), %rax
movq %rax, 0x10(%rsp)
jmp 0x1b7d70
movq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %rax
shrq %rax
movabsq $0x6906906906906907, %rcx # imm = 0x6906906906906907
mulq %rcx
movq %rdx, %r12
shrq $0x4, %r12
xorl %r14d, %r14d
movq $0x0, 0x28(%rsp)
movq $0x0, 0x18(%rsp)
movq %r12, 0x8(%rsp)
xorl %esi, %esi
xorl %r13d, %r13d
cmpl $0x1, 0x50(%rsp)
movq %rsi, %r15
jne 0x1b7ef5
cmpb $0x0, 0x30200(%rsp)
je 0x1b7e64
movl 0x104(%rsp), %eax
cmpl 0x100(%rsp), %eax
movq 0x48(%rsp), %r14
jb 0x1b7e38
movq 0x108(%rsp), %rdi
movq 0x110(%rsp), %rcx
movl $0x8, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %rbp
movl %ebp, 0x100(%rsp)
movq 0x110(%rsp), %rdi
callq 0x17f00
testl %eax, %eax
jne 0x1b82ef
movl $0x0, 0x104(%rsp)
testl %ebp, %ebp
movq 0x30210(%rsp), %rbp
movq %r15, %rsi
je 0x1b7fba
movq 0x108(%rsp), %rax
movl 0x104(%rsp), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x104(%rsp)
movq (%rax,%rcx,8), %r14
xorl %eax, %eax
movq %r14, 0x48(%rsp)
testb %al, %al
jne 0x1b814c
movl 0x11c(%rsp), %eax
cmpl 0x118(%rsp), %eax
jb 0x1b7ed0
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %rcx
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %rbp
movl %ebp, 0x118(%rsp)
movq 0x128(%rsp), %rdi
callq 0x17f00
testl %eax, %eax
jne 0x1b82ea
movl $0x0, 0x11c(%rsp)
testl %ebp, %ebp
movq 0x30210(%rsp), %rbp
movq %r15, %rsi
je 0x1b814c
movq 0x120(%rsp), %rax
movl 0x11c(%rsp), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x11c(%rsp)
movb (%rax,%rcx), %al
movb %al, 0x3(%rsp)
jmp 0x1b803a
testq %rbp, %rbp
je 0x1b7f0a
movq %rbp, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1b82e5
movl 0x178(%rsp), %eax
cmpl 0x17c(%rsp), %eax
jae 0x1b7f6b
movl 0x178(%rsp), %ecx
shlq $0x4, %rcx
leaq 0x10180(%rsp), %rdx
movl (%rdx,%rcx), %eax
movq 0x8(%rdx,%rcx), %rsi
movq 0x30(%rsp), %rcx
movq (%rcx,%rax,8), %r14
addq %rsi, %r14
testq %rsi, %rsi
je 0x1b7f8d
movq 0x301b8(%rsp), %rcx
shlq $0x8, %rax
movq (%rcx,%rax), %rdi
decq %rsi
movl 0x48(%rcx,%rax), %edx
callq 0xec1f8
movb %al, 0x3(%rsp)
jmp 0x1b7ffa
cmpl $0x0, 0x168(%rsp)
je 0x1b7fb3
leaq 0x160(%rsp), %rdi
movq %rbp, %rsi
callq 0x31b880
testl %eax, %eax
je 0x1b7f99
movb $0x1, %al
jmp 0x1b8003
testq %rax, %rax
je 0x1b7fc1
movb $-0x1, 0x3(%rsp)
jmp 0x1b7ffa
cmpl $0x0, 0x17c(%rsp)
je 0x1b7fb3
movl $0x0, 0x178(%rsp)
jmp 0x1b7f1a
movb $0x1, %bpl
xorl %eax, %eax
jmp 0x1b8005
movb $0x1, %al
jmp 0x1b7e57
testb $0x1, 0x28(%rsp)
je 0x1b7fe9
xorl %ebp, %ebp
movq 0x30210(%rsp), %rdi
leaq 0x1f81c2(%rip), %rsi    # 0x3b019b
movq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %al
jmp 0x1b8005
movb $-0x2, 0x3(%rsp)
movb $0x1, %al
movq %rax, 0x28(%rsp)
movq %r13, 0x18(%rsp)
incl 0x178(%rsp)
xorl %eax, %eax
xorl %ebp, %ebp
testb %al, %al
jne 0x1b8131
testb %bpl, %bpl
jne 0x1b8131
movl $0x1, %esi
movl $0x1, %edx
leaq 0x3(%rsp), %rdi
movq 0x38(%rsp), %rcx
callq 0x125658
movq %r15, %rsi
movq 0x30210(%rsp), %rbp
cmpq %r12, %r13
jne 0x1b8071
cmpq %r13, 0x8(%rsp)
jne 0x1b8050
movl $0x23, %edi
callq 0x17a20
movl $0x2e, %edi
callq 0x17a20
movq 0x30be87(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdi
callq 0x178f0
addq 0x8(%rsp), %r12
movq %r15, %rsi
cmpb $0x0, 0x30200(%rsp)
je 0x1b8098
cmpq %rsi, %r13
jne 0x1b8098
movq 0x10(%rsp), %rax
movq %r14, (%rax)
addq $0x8, %rax
movq %rax, 0x10(%rsp)
addq 0xb8(%rbx), %rsi
movzbl 0x3(%rsp), %eax
cmpq $0xfe, %rax
jb 0x1b80df
cmpb $0x0, 0x30200(%rsp)
je 0x1b8129
cmpq 0x40(%rsp), %r13
jae 0x1b8129
movq 0x50(%rbx), %rax
movq 0x60(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x60(%rbx)
cmpq 0x58(%rbx), %rcx
jge 0x1b8153
shlq $0x4, %rcx
movq %r13, (%rax,%rcx)
movq %r14, 0x8(%rax,%rcx)
jmp 0x1b8129
movq 0x18(%rbx), %rcx
incq 0x8(%rcx,%rax,8)
movb 0x88(%rbx), %cl
movq %r13, %rdx
shrq %cl, %rdx
imulq 0xa8(%rbx), %rax
addq 0x8(%rbx), %rax
incb (%rdx,%rax)
movzbl 0x3(%rsp), %eax
imulq 0xb0(%rbx), %rax
movb 0x8c(%rbx), %cl
movq %r13, %rdx
shrq %cl, %rdx
shlq $0x3, %rax
addq 0x20(%rbx), %rax
incq 0x8(%rax,%rdx,8)
incq %r13
jmp 0x1b7dab
movzbl 0x4(%rsp), %ecx
testb %al, %al
movl $0x1, %r13d
cmovel %ecx, %r13d
movq 0x30210(%rsp), %rbp
jmp 0x1b8167
movl 0x4(%rsp), %r13d
jmp 0x1b8167
leaq 0x1f7ec0(%rip), %rsi    # 0x3b001a
movq %rbp, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r13b
movb 0x30200(%rsp), %r15b
testb %r15b, %r15b
je 0x1b819a
testb %r13b, %r13b
jne 0x1b819a
movq 0x58(%rbx), %rdx
movq 0x60(%rbx), %rcx
cmpq %rcx, %rdx
je 0x1b819a
leaq 0x1f7eb9(%rip), %rsi    # 0x3b0046
movq %rbp, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r13b
testb %r13b, %r13b
jne 0x1b82a5
movl $0xa, %edi
callq 0x17a20
movl 0x78(%rbx), %eax
cmpl $0x2, %eax
jb 0x1b81e0
movq 0x18(%rbx), %rcx
leal 0x1(%rax), %esi
cmpl $0x4, %esi
movl $0x3, %edx
cmovael %esi, %edx
movq 0x8(%rcx), %rsi
movl $0x2, %edi
addq (%rcx,%rdi,8), %rsi
movq %rsi, (%rcx,%rdi,8)
incq %rdi
cmpq %rdi, %rdx
jne 0x1b81d0
testl %eax, %eax
je 0x1b821e
movq 0x20(%rbx), %rcx
xorl %edx, %edx
movq 0xb0(%rbx), %rdi
cmpq $0x3, %rdi
jb 0x1b8214
movl $0x2, %esi
movq -0x8(%rcx,%rsi,8), %rdi
addq %rdi, (%rcx,%rsi,8)
incq %rsi
movq 0xb0(%rbx), %rdi
cmpq %rdi, %rsi
jb 0x1b81fc
leaq (%rcx,%rdi,8), %rcx
incl %edx
cmpl %eax, %edx
jne 0x1b81ea
cmpl $0x0, 0x98(%rbx)
je 0x1b824a
movq 0xc0(%rbx), %rdi
shlq $0x4, %rdi
leaq 0x1f7daa(%rip), %rsi    # 0x3affe3
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x1092b2
movq %rax, 0xc8(%rbx)
cmpl $0x1, 0x50(%rsp)
jne 0x1b8265
leaq 0x60(%rsp), %rdi
movq 0x40(%rdi), %rax
movq %rax, 0x30(%rbx)
callq 0x1a9e1c
jmp 0x1b82a5
testb $0x1, 0x28(%rsp)
jne 0x1b8280
leaq 0x1f7e1c(%rip), %rsi    # 0x3b008f
movq %rbp, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r13b
testb %r13b, %r13b
jne 0x1b828e
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rbx)
movq 0x38(%rsp), %rdi
callq 0x101f02
leaq 0x160(%rsp), %rdi
callq 0x31bf3f
leaq 0x1f7d37(%rip), %rbx    # 0x3affe3
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movl $0x20f, %edx            # imm = 0x20F
callq 0x109670
xorl %edi, %edi
movq %rbx, %rsi
movl $0x210, %edx            # imm = 0x210
callq 0x109670
movzbl %r13b, %eax
negl %eax
addq $0x301c8, %rsp          # imm = 0x301C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x660f5
callq 0x66156
callq 0x6612e
callq 0x66085
callq 0x660be
nop