// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/ft-eoplist.c
// Function: gt_eoplist_format_generic
void gt_eoplist_format_generic(FILE *fp,
                               const GtEoplist *eoplist,
                               GtEoplistReader *eoplist_reader,
                               const GtUchar *characters,
                               GtUword top_seqlength,
                               GtUword low_reference,
                               GtUword one_off,
                               bool distinguish_mismatch_match,
                               bool subject_first,
                               bool alignment_show_forward,
                               bool show_complement_characters,
                               GtUchar wildcardshow)
{
  GtCigarOp co;
  unsigned int pos = 0;
  GtUword idx_u = 0, idx_v = 0, alignmentlength = 0,
          firstseedcolumn = GT_UWORD_MAX;
  GtUchar *topbuf = eoplist_reader->outbuffer, *midbuf = NULL, *lowbuf = NULL;
  const int numwidth = gt_eoplist_numwidth(eoplist);
  const GtUword low_start_base
                  = low_reference == 0 ? eoplist->vstart
                                       : low_reference - eoplist->vstart;
  GtUword top_start_pos = eoplist->ustart,
          low_start_pos = low_start_base;

  gt_assert(alignment_show_forward || top_seqlength > 0);
  uint64_t suffix_bits = 0, set_mask = 0;
  GtUword suffix_bits_used = 0, prefix_positive = 0, pol_size = 0,
          lastseedcolumn = GT_UWORD_MAX;
  const GtUword max_history = 64;
  GtWord prefix_positive_sum = 0;

  if (eoplist->pol_info != NULL)
  {
    pol_size = GT_MULT2(eoplist->pol_info->cut_depth);
    set_mask = ((uint64_t) 1) << (max_history - 1);
  }
  gt_assert(eoplist_reader != NULL);
  midbuf = topbuf + eoplist_reader->width;
  lowbuf = midbuf + eoplist_reader->width;
  gt_eoplist_reader_reset(eoplist_reader,eoplist,alignment_show_forward);
  while (gt_eoplist_reader_next_cigar(&co,eoplist_reader,
                                      distinguish_mismatch_match))
  {
    switch (co.eoptype)
    {
      GtUword j;
      GtUchar cc_a, cc_b;

      case GtMatchOp:
      case GtMismatchOp:
        for (j = 0; j < co.iteration && idx_u < eoplist->ulen &&
                                        idx_v < eoplist->vlen; j++)
        {
          bool is_match = true;

          if (alignment_show_forward)
          {
            cc_a = eoplist->useq[idx_u];
            cc_b = eoplist->vseq[idx_v];
          } else
          {
            cc_a = eoplist->useq[eoplist->ulen - 1 - idx_u];
            cc_b = eoplist->vseq[eoplist->vlen - 1 - idx_v];
          }
          if (characters != NULL)
          {
            if (GT_ISSPECIAL(cc_a))
            {
              cc_a = wildcardshow;
              is_match = false;
            } else
            {
              if (show_complement_characters)
              {
                gt_assert(cc_a < 4);
                cc_a = GT_COMPLEMENTBASE(cc_a);
              }
              cc_a = characters[cc_a];
            }
            if (GT_ISSPECIAL(cc_b))
            {
              cc_b = wildcardshow;
              is_match = false;
            } else
            {
              if (show_complement_characters)
              {
                gt_assert(cc_b < 4);
                cc_b = GT_COMPLEMENTBASE(cc_b);
              }
              cc_b = characters[cc_b];
            }
          }
          topbuf[pos] = cc_a;
          if (is_match)
          {
            is_match = cc_a == cc_b ? true : false;
          }
          lowbuf[pos] = cc_b;
          if (is_match)
          {
            if (eoplist->useedoffset <= idx_u &&
                idx_u < eoplist->useedoffset + eoplist->seedlen)
            {
              if (eoplist->display_seed_in_alignment)
              {
                midbuf[pos] = (GtUchar) '+';
              } else
              {
                midbuf[pos] = (GtUchar) EOPLIST_MATCHSYMBOL;
              }
              if (firstseedcolumn == GT_UWORD_MAX)
              {
                firstseedcolumn = alignmentlength;
              }
              lastseedcolumn = alignmentlength;
            } else
            {
              midbuf[pos] = (GtUchar) EOPLIST_MATCHSYMBOL;
            }
          } else
          {
            midbuf[pos] = (GtUchar) EOPLIST_MISMATCHSYMBOL;
          }
          pos = gt_eoplist_show_advance(one_off,
                                        subject_first,
                                        numwidth,
                                        pos,
                                        eoplist_reader->width,
                                        topbuf,
                                        top_seqlength,
                                        top_start_pos,
                                        eoplist->ustart + idx_u,
                                        midbuf,
                                        lowbuf,
                                        low_start_pos,
                                        low_start_base + idx_v,
                                        fp);
          if (pos == 0)
          {
            top_start_pos = eoplist->ustart + idx_u + 1;
            low_start_pos = low_start_base + idx_v + 1;
          }
          GT_UPDATE_POSITIVE_INFO(is_match);
          alignmentlength++;
          idx_u++;
          idx_v++;
        }
        break;
      case GtDeletionOp:
        for (j = 0; j < co.iteration && idx_u < eoplist->ulen; j++)
        {
          cc_a = eoplist->useq[alignment_show_forward ? idx_u
                                                      : eoplist->ulen-1-idx_u];
          if (characters != NULL)
          {
            if (GT_ISSPECIAL(cc_a))
            {
              topbuf[pos] = wildcardshow;
            } else
            {
              if (show_complement_characters)
              {
                gt_assert(cc_a < 4);
                cc_a = GT_COMPLEMENTBASE(cc_a);
              }
              topbuf[pos] = characters[cc_a];
            }
          } else
          {
            topbuf[pos] = cc_a;
          }
          midbuf[pos] = EOPLIST_MISMATCHSYMBOL;
          lowbuf[pos] = EOPLIST_GAPSYMBOL;
          pos = gt_eoplist_show_advance(one_off,
                                        subject_first,
                                        numwidth,
                                        pos,
                                        eoplist_reader->width,
                                        topbuf,
                                        top_seqlength,
                                        top_start_pos,
                                        eoplist->ustart + idx_u,
                                        midbuf,
                                        lowbuf,
                                        low_start_pos,
                                        low_start_base + idx_v,
                                        fp);
          if (pos == 0)
          {
            top_start_pos = eoplist->ustart + idx_u + 1;
            low_start_pos = low_start_base + idx_v + 1;
          }
          GT_UPDATE_POSITIVE_INFO(false);
          alignmentlength++;
          idx_u++;
        }
        break;
      case GtInsertionOp:
        for (j = 0; j < co.iteration && idx_v < eoplist->vlen; j++)
        {
          cc_b = eoplist->vseq[alignment_show_forward ? idx_v
                                                      : eoplist->vlen-1-idx_v];
          topbuf[pos] = EOPLIST_GAPSYMBOL;
          midbuf[pos] = EOPLIST_MISMATCHSYMBOL;
          if (characters != NULL)
          {
            if (GT_ISSPECIAL(cc_b))
            {
              lowbuf[pos] = wildcardshow;
            } else
            {
              if (show_complement_characters)
              {
                gt_assert(cc_b < 4);
                cc_b = GT_COMPLEMENTBASE(cc_b);
              }
              lowbuf[pos] = characters[cc_b];
            }
          } else
          {
            lowbuf[pos] = cc_b;
          }
          pos = gt_eoplist_show_advance(one_off,
                                        subject_first,
                                        numwidth,
                                        pos,
                                        eoplist_reader->width,
                                        topbuf,
                                        top_seqlength,
                                        top_start_pos,
                                        eoplist->ustart + idx_u,
                                        midbuf,
                                        lowbuf,
                                        low_start_pos,
                                        low_start_base + idx_v,
                                        fp);
          if (pos == 0)
          {
            top_start_pos = eoplist->ustart + idx_u + 1;
            low_start_pos = low_start_base + idx_v + 1;
          }
          GT_UPDATE_POSITIVE_INFO(false);
          alignmentlength++;
          idx_v++;
        }
        break;
      default:
        fprintf(stderr,"file %s, line %d: illegal eoptype %d\n",
                       __FILE__,__LINE__,co.eoptype);
        exit(GT_EXIT_PROGRAMMING_ERROR);
    }
  }
  if (pos > 0)
  {
    gt_eoplist_write_lines(one_off,
                           subject_first,
                           numwidth,
                           pos,
                           topbuf,
                           top_seqlength,
                           top_start_pos,
                           eoplist->ustart + GT_MIN(idx_u,eoplist->ulen - 1),
                           midbuf,
                           lowbuf,
                           low_start_pos,
                           low_start_base + GT_MIN(idx_v,eoplist->vlen - 1),
                           fp);
  }
  if (eoplist->pol_info != NULL && eoplist->pol_info_out)
  {
    GtUword suffix_positive;
    GtWord suffix_positive_sum = 0;
    bool startpolished = false, endpolished = false;

    for (suffix_positive = 0; suffix_positive < suffix_bits_used;
         suffix_positive++)
    {
      suffix_positive_sum += ((suffix_bits & set_mask)
                                ? eoplist->pol_info->match_score
                                : -eoplist->pol_info->difference_score);
      if (suffix_positive_sum < 0)
      {
        break;
      }
      set_mask >>= 1;
    }
    gt_assert(prefix_positive <= alignmentlength);
    if (prefix_positive >= pol_size || prefix_positive == alignmentlength ||
        firstseedcolumn < pol_size)
    {
      startpolished = true;
    }
    if (suffix_positive >= pol_size || suffix_positive == alignmentlength ||
        (lastseedcolumn != GT_UWORD_MAX &&
         lastseedcolumn + pol_size > alignmentlength))
    {
      endpolished = true;
    }
    fprintf(fp, "# polishing(m=" GT_WD ",d=" GT_WD ",p=" GT_WU
            "): " GT_WU "/" GT_WU,
            eoplist->pol_info->match_score,
            -eoplist->pol_info->difference_score,
            pol_size,
            prefix_positive,
            suffix_positive);
    if (firstseedcolumn < pol_size)
    {
      fprintf(fp, ", seed_on_start");
    }
    if (lastseedcolumn + pol_size > alignmentlength)
    {
      fprintf(fp, ", seed_on_end");
    }
    if (eoplist->withpolcheck)
    {
      fprintf(fp, "\n");
      gt_assert(startpolished);
      gt_assert(endpolished);
    } else
    {
      if (!startpolished)
      {
        fprintf(fp, ", start not polished");
      }
      if (!endpolished)
      {
        fprintf(fp, ", end not polished");
      }
      fprintf(fp, "\n");
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %r9, %rbx
movq %r8, %r15
movq %rcx, 0x68(%rsp)
movq %rsi, %r14
movq %rdi, 0x18(%rsp)
movb 0x178(%rsp), %al
movb %al, 0xd(%rsp)
movb 0x170(%rsp), %al
movb %al, 0xc(%rsp)
movb 0x168(%rsp), %r12b
movb 0x160(%rsp), %al
movb %al, 0xf(%rsp)
movb 0x158(%rsp), %bpl
movq 0x150(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0x18(%rdx), %rax
movq %rax, 0x28(%rsp)
movq %rsi, %rdi
callq 0x31999e
movq 0x48(%r14), %rcx
movq %rbx, %rdx
subq %rcx, %rdx
testq %rbx, %rbx
cmoveq %rcx, %rdx
movq %rdx, 0x90(%rsp)
movl %eax, 0x30(%rsp)
movq %r15, 0xb8(%rsp)
testq %r15, %r15
setne %al
movb %r12b, 0xe(%rsp)
orb %r12b, %al
je 0x31998a
movq 0x88(%r14), %rax
testq %rax, %rax
je 0x318e99
movq 0x8(%rax), %rax
addq %rax, %rax
movq %rax, 0x80(%rsp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0xc8(%rsp)
jmp 0x318eb1
movq $0x0, 0xc8(%rsp)
movq $0x0, 0x80(%rsp)
movq 0x38(%r14), %rax
movq %rax, 0x60(%rsp)
movq 0xa0(%rsp), %rbx
movl 0x20(%rbx), %r12d
movzbl 0xe(%rsp), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x317fcb
movzbl %bpl, %edx
leaq 0xe8(%rsp), %rdi
movq %rbx, %rsi
movl %edx, 0xd4(%rsp)
callq 0x318032
xorl %r8d, %r8d
testb %al, %al
movq %r14, 0xe0(%rsp)
je 0x319749
movq 0x28(%rsp), %rax
addq %r12, %rax
movq %rax, 0x50(%rsp)
addq %rax, %r12
movq 0x90(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x108(%rsp)
movq $-0x1, 0xc0(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x78(%rsp)
movq %rax, 0x58(%rsp)
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r13d, %r13d
movq $-0x1, 0x88(%rsp)
movq %r12, %rsi
movq %r12, 0x70(%rsp)
movl 0xe8(%rsp), %edi
leal -0x2(%rdi), %eax
movzbl 0xf(%rsp), %ecx
movl %ecx, 0x34(%rsp)
cmpl $0x2, %eax
movq %r11, 0x48(%rsp)
movq %r10, 0x10(%rsp)
jb 0x31916b
testl %edi, %edi
je 0x31949f
cmpl $0x1, %edi
jne 0x319985
movq 0xf0(%rsp), %rbx
testq %rbx, %rbx
je 0x31964e
leaq 0x1(%r10), %rbp
movq %r13, %r12
leaq (%rbx,%r13), %rax
movq %rax, 0x98(%rsp)
leaq (%r11,%rbx), %rax
movq %rax, 0x48(%rsp)
movq %r11, %r15
notq %r15
movq 0x50(%r14), %rax
cmpq %rax, %r11
jae 0x319689
addq %r15, %rax
cmpb $0x0, 0xe(%rsp)
cmovneq %r11, %rax
movq 0x30(%r14), %rcx
movb (%rcx,%rax), %cl
movl %r8d, %eax
movq 0x28(%rsp), %rdx
movb $0x2d, (%rdx,%rax)
movq 0x50(%rsp), %rdx
movb $0x20, (%rdx,%rax)
cmpq $0x0, 0x68(%rsp)
je 0x319050
movq %r8, %r9
movb 0xd(%rsp), %dl
cmpb $-0x3, %cl
ja 0x319055
cmpb $0x0, 0xc(%rsp)
je 0x319043
cmpb $0x4, %cl
jae 0x31997b
movb $0x3, %dl
subb %cl, %dl
movl %edx, %ecx
movzbl %cl, %ecx
movq 0x68(%rsp), %rdx
movb (%rdx,%rcx), %dl
jmp 0x319055
movq %r8, %r9
movl %ecx, %edx
movb %dl, (%rsi,%rax)
movq 0xa0(%rsp), %rax
movl 0x20(%rax), %r8d
movq 0x38(%r14), %rax
addq %r10, %rax
movq 0x90(%rsp), %rcx
movq %r11, %r13
leaq (%rcx,%r11), %r10
movq 0xb0(%rsp), %rdi
movq %rsi, %r11
movl 0x34(%rsp), %esi
movl 0x30(%rsp), %edx
movl %r9d, %ecx
movq 0x28(%rsp), %r9
pushq 0x18(%rsp)
pushq %r10
pushq 0x68(%rsp)
pushq %r11
pushq 0x70(%rsp)
pushq %rax
pushq 0x90(%rsp)
pushq 0xf0(%rsp)
callq 0x319a00
addq $0x40, %rsp
movl %eax, %r8d
testl %eax, %eax
jne 0x3190e0
movq 0x38(%r14), %rax
addq %rbp, %rax
movq %rax, 0x60(%rsp)
movq 0x108(%rsp), %rax
addq %r13, %rax
movq %rax, 0x58(%rsp)
movq 0x88(%r14), %rax
testq %rax, %rax
je 0x31913c
cmpq $0x3f, 0x20(%rsp)
movq 0x70(%rsp), %rsi
movq %r13, %r11
movq 0x10(%rsp), %r10
ja 0x319123
movq 0x38(%rsp), %rcx
testq %rcx, %rcx
js 0x319123
subq 0x20(%rax), %rcx
movq %rcx, %rax
movq %rcx, 0x38(%rsp)
notq %rax
shrq $0x3f, %rax
addq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
cmpq $0x40, %rax
adcq $0x0, %rax
movq %rax, 0x40(%rsp)
shrq 0x78(%rsp)
jmp 0x319149
movq 0x70(%rsp), %rsi
movq %r13, %r11
movq 0x10(%rsp), %r10
incq %r12
incq %r11
decq %r15
decq %rbx
jne 0x318fe4
movq %r8, %r15
movq 0x98(%rsp), %r13
jmp 0x319694
movq 0xf0(%rsp), %rcx
testq %rcx, %rcx
je 0x31964e
leaq (%rcx,%r13), %rax
movq %rax, 0xf8(%rsp)
leaq (%r10,%rcx), %rax
movq %rax, 0x100(%rsp)
movq 0x90(%rsp), %rax
addq %r11, %rax
movq %rax, 0xa8(%rsp)
xorl %ebx, %ebx
movq %r13, %r15
movq %r10, %r13
movq %r11, %rbp
movq %r15, 0xd8(%rsp)
movq %r15, %r9
movq 0x50(%rsp), %r15
movq %rcx, 0x110(%rsp)
leaq (%r10,%rbx), %rax
movq 0x40(%r14), %rsi
cmpq %rsi, %rax
jae 0x319653
leaq (%r11,%rbx), %rdx
movq 0x50(%r14), %rcx
cmpq %rcx, %rdx
jae 0x319665
movq 0x28(%r14), %rdx
cmpb $0x0, 0xe(%rsp)
je 0x319209
addq %r10, %rdx
addq %rbx, %rdx
movq 0x30(%r14), %rcx
addq %r11, %rcx
addq %rbx, %rcx
jmp 0x319222
movq %r13, %rdi
notq %rdi
addq %rsi, %rdx
addq %rdi, %rdx
movq %rbp, %rsi
notq %rsi
addq 0x30(%r14), %rcx
addq %rsi, %rcx
movb (%rcx), %cl
movb (%rdx), %dl
cmpq $0x0, 0x68(%rsp)
movq %r9, 0x98(%rsp)
je 0x319243
cmpb $-0x3, %dl
jbe 0x319248
xorl %esi, %esi
movb 0xd(%rsp), %dl
jmp 0x31926e
movb $0x1, %sil
jmp 0x31929e
cmpb $0x0, 0xc(%rsp)
je 0x319260
cmpb $0x4, %dl
jae 0x319971
movb $0x3, %sil
subb %dl, %sil
movl %esi, %edx
movzbl %dl, %edx
movq 0x68(%rsp), %rsi
movb (%rsi,%rdx), %dl
movb $0x1, %sil
cmpb $-0x3, %cl
jbe 0x31927b
xorl %esi, %esi
movb 0xd(%rsp), %cl
jmp 0x31929e
cmpb $0x0, 0xc(%rsp)
je 0x319293
cmpb $0x4, %cl
jae 0x319976
movb $0x3, %dil
subb %cl, %dil
movl %edi, %ecx
movzbl %cl, %ecx
movq 0x68(%rsp), %rdi
movb (%rdi,%rcx), %cl
movq %r8, %r9
movl %r8d, %edi
movq 0x28(%rsp), %r8
movb %dl, (%r8,%rdi)
xorl %r12d, %r12d
cmpb %cl, %dl
sete %r12b
movzbl %sil, %edx
testb %dl, %dl
cmovel %edx, %r12d
movq 0x70(%rsp), %rdx
movb %cl, (%rdx,%rdi)
cmpb $0x1, %r12b
jne 0x319322
movq 0x60(%r14), %rcx
cmpq %rax, %rcx
ja 0x319329
addq 0x68(%r14), %rcx
cmpq %rcx, %rax
jae 0x319329
cmpb $0x0, 0x5a(%r14)
movl $0x2b, %eax
jne 0x3192f1
movl $0x7c, %eax
movq 0xd8(%rsp), %rcx
addq %rbx, %rcx
movb %al, (%r15,%rdi)
movq 0x88(%rsp), %rax
cmpq $-0x1, %rax
movq %rcx, 0xc0(%rsp)
cmoveq %rcx, %rax
movq %rax, 0x88(%rsp)
jmp 0x31932e
movb $0x20, (%r15,%rdi)
jmp 0x31932e
movb $0x7c, (%r15,%rdi)
movq %r15, %r11
movq 0xa0(%rsp), %rax
movl 0x20(%rax), %r8d
leaq (%r10,%rbx), %r15
movq 0xe0(%rsp), %r14
movq 0x38(%r14), %rax
addq %r15, %rax
movq 0xa8(%rsp), %rcx
leaq (%rcx,%rbx), %r10
movq 0xb0(%rsp), %rdi
movl 0x34(%rsp), %esi
movl 0x30(%rsp), %edx
movl %r9d, %ecx
movq 0x28(%rsp), %r9
pushq 0x18(%rsp)
pushq %r10
pushq 0x68(%rsp)
pushq 0x88(%rsp)
pushq %r11
pushq %rax
pushq 0x90(%rsp)
pushq 0xf0(%rsp)
callq 0x319a00
addq $0x40, %rsp
movl %eax, %r8d
testl %eax, %eax
jne 0x3193c8
movq 0x38(%r14), %rax
addq %r15, %rax
incq %rax
movq %rax, 0x60(%rsp)
movq 0xa8(%rsp), %rax
addq %rbx, %rax
incq %rax
movq %rax, 0x58(%rsp)
movq 0x88(%r14), %rax
testq %rax, %rax
movq 0x48(%rsp), %r11
movq 0x110(%rsp), %rsi
movq 0x98(%rsp), %r9
je 0x319413
cmpq $0x3f, 0x20(%rsp)
movq 0x50(%rsp), %r15
movq 0x10(%rsp), %r10
ja 0x31943c
cmpq $0x0, 0x38(%rsp)
js 0x31943c
testb %r12b, %r12b
je 0x31941f
movq 0x38(%rsp), %rcx
addq 0x28(%rax), %rcx
jmp 0x319428
movq 0x50(%rsp), %r15
movq 0x10(%rsp), %r10
jmp 0x31946d
movq 0x38(%rsp), %rcx
subq 0x20(%rax), %rcx
movq %rcx, %rax
movq %rax, 0x38(%rsp)
notq %rax
shrq $0x3f, %rax
addq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
cmpq $0x40, %rax
adcq $0x0, %rax
movq %rax, 0x40(%rsp)
movq 0xc8(%rsp), %rax
testb %r12b, %r12b
jne 0x31945d
xorl %eax, %eax
movq 0x78(%rsp), %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, 0x78(%rsp)
incq %r9
incq %r13
incq %rbp
incq %rbx
cmpq %rbx, %rsi
jne 0x3191ca
movq %r8, %r15
movq 0xf8(%rsp), %r13
movq %rbp, 0x48(%rsp)
movq 0x100(%rsp), %rax
jmp 0x319678
movq 0xf0(%rsp), %rbx
testq %rbx, %rbx
je 0x31964e
movq 0x90(%rsp), %rax
leaq (%r11,%rax), %rbp
addq %r11, %rax
incq %rax
movq %rax, 0x10(%rsp)
leaq (%r13,%rbx), %rax
movq %rax, 0xa8(%rsp)
leaq (%r10,%rbx), %rax
movq %rax, 0x98(%rsp)
movq %r10, %r12
notq %r12
movq 0x40(%r14), %rax
cmpq %rax, %r10
jae 0x31967f
addq %r12, %rax
cmpb $0x0, 0xe(%rsp)
cmovneq %r10, %rax
movq 0x28(%r14), %rcx
movb (%rcx,%rax), %al
cmpq $0x0, 0x68(%rsp)
je 0x31953b
movq %r10, %r15
movb 0xd(%rsp), %cl
cmpb $-0x3, %al
ja 0x319540
cmpb $0x0, 0xc(%rsp)
je 0x31952e
cmpb $0x4, %al
jae 0x319980
movb $0x3, %cl
subb %al, %cl
movl %ecx, %eax
movzbl %al, %eax
movq 0x68(%rsp), %rcx
movb (%rcx,%rax), %cl
jmp 0x319540
movq %r10, %r15
movl %eax, %ecx
movl %r8d, %eax
movq 0x28(%rsp), %r9
movb %cl, (%r9,%rax)
movq 0x50(%rsp), %r10
movb $0x20, (%r10,%rax)
movb $0x2d, (%rsi,%rax)
movq 0xa0(%rsp), %rax
movq %r8, %rcx
movl 0x20(%rax), %r8d
movq 0x38(%r14), %rax
addq %r15, %rax
movq 0xb0(%rsp), %rdi
movq %rsi, %r11
movl 0x34(%rsp), %esi
movl 0x30(%rsp), %edx
pushq 0x18(%rsp)
pushq %rbp
pushq 0x68(%rsp)
pushq %r11
pushq %r10
pushq %rax
pushq 0x90(%rsp)
pushq 0xf0(%rsp)
callq 0x319a00
addq $0x40, %rsp
movl %eax, %r8d
testl %eax, %eax
jne 0x3195c8
movq 0x38(%r14), %rax
addq %r15, %rax
incq %rax
movq %rax, 0x60(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x88(%r14), %rax
testq %rax, %rax
je 0x31961f
cmpq $0x3f, 0x20(%rsp)
movq 0x70(%rsp), %rsi
movq %r15, %r10
ja 0x319606
movq 0x38(%rsp), %rcx
testq %rcx, %rcx
js 0x319606
subq 0x20(%rax), %rcx
movq %rcx, %rax
movq %rcx, 0x38(%rsp)
notq %rax
shrq $0x3f, %rax
addq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
cmpq $0x40, %rax
adcq $0x0, %rax
movq %rax, 0x40(%rsp)
shrq 0x78(%rsp)
jmp 0x319627
movq 0x70(%rsp), %rsi
movq %r15, %r10
incq %r13
incq %r10
decq %r12
decq %rbx
jne 0x3194e6
movq %r8, %r15
movq 0xa8(%rsp), %r13
movq 0x98(%rsp), %rax
jmp 0x319678
movq %r8, %r15
jmp 0x319694
movq %r8, %r15
movq %rbp, 0x48(%rsp)
movq %r13, 0x10(%rsp)
movq %r9, %r13
jmp 0x319694
movq %r8, %r15
movq 0xd8(%rsp), %r13
addq %rbx, %r13
movq %rdx, 0x48(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x319694
movq %r8, %r15
movq %r10, 0x10(%rsp)
jmp 0x319694
movq %r8, %r15
movq %r11, 0x48(%rsp)
movq %r12, %r13
leaq 0xe8(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movl 0xd4(%rsp), %edx
callq 0x318032
testb %al, %al
movq 0x70(%rsp), %rsi
movq 0x48(%rsp), %r11
movq 0x10(%rsp), %r10
movq %r15, %r8
jne 0x318f7a
testl %r8d, %r8d
je 0x31973f
movq 0x40(%r14), %rax
decq %rax
cmpq %rax, %r10
cmovbq %r10, %rax
movq 0x50(%r14), %r10
addq 0x38(%r14), %rax
decq %r10
cmpq %r10, %r11
cmovbq %r11, %r10
addq 0x90(%rsp), %r10
subq $0x8, %rsp
movq 0xb8(%rsp), %rdi
movq %rsi, %r11
movl 0x3c(%rsp), %esi
movl 0x38(%rsp), %edx
movl %r8d, %ecx
movq 0x30(%rsp), %r8
movq 0xc0(%rsp), %r9
pushq 0x20(%rsp)
pushq %r10
pushq 0x70(%rsp)
pushq %r11
pushq 0x78(%rsp)
pushq %rax
pushq 0x98(%rsp)
callq 0x319a5f
addq $0x40, %rsp
movq 0xc0(%rsp), %rdi
jmp 0x31977a
movq $-0x1, %rdi
movq $0x0, 0x20(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x78(%rsp)
xorl %r13d, %r13d
movq $-0x1, 0x88(%rsp)
movq 0x88(%r14), %rax
testq %rax, %rax
je 0x3198fd
cmpb $0x1, 0x59(%r14)
jne 0x3198fd
movq 0x40(%rsp), %r11
testq %r11, %r11
je 0x3197df
xorl %ecx, %ecx
xorl %r10d, %r10d
movq 0x20(%rsp), %r8
movq 0xc8(%rsp), %r9
movq 0x78(%rsp), %rbx
testq %rbx, %r9
je 0x3197c1
movq 0x28(%rax), %rdx
jmp 0x3197ca
movq 0x20(%rax), %rsi
xorl %edx, %edx
subq %rsi, %rdx
addq %rdx, %rcx
js 0x3197e7
shrq %r9
incq %r10
cmpq %r10, %r11
jne 0x3197b6
movq %r11, %r10
jmp 0x3197e7
xorl %r10d, %r10d
movq 0x20(%rsp), %r8
cmpq %r13, %r8
ja 0x31998f
movq 0x80(%rsp), %rcx
cmpq %rcx, %r8
setae %bpl
cmpq %r13, %r8
sete %bl
cmpq %rcx, 0x88(%rsp)
setb %r14b
cmpq %rcx, %r10
jae 0x319833
cmpq %r13, %r10
je 0x319833
xorl %edx, %edx
cmpq $-0x1, %rdi
je 0x319835
movq 0x80(%rsp), %rcx
addq %rdi, %rcx
cmpq %r13, %rcx
jbe 0x319835
movb $0x1, %dl
movl %edx, 0x28(%rsp)
movq %r13, %r15
movq %rdi, %r13
movq 0x28(%rax), %rdx
movq 0x20(%rax), %rax
xorl %ecx, %ecx
subq %rax, %rcx
subq $0x8, %rsp
leaq 0xc97cc(%rip), %rsi     # 0x3e3023
movq 0x20(%rsp), %rdi
movq 0x88(%rsp), %r12
movq %r12, %r8
movq 0x28(%rsp), %r9
xorl %eax, %eax
pushq %r10
callq 0x17ab0
addq $0x10, %rsp
cmpq %r12, 0x88(%rsp)
jae 0x31989e
leaq 0xc97c1(%rip), %rdi     # 0x3e304b
movl $0xf, %esi
movl $0x1, %edx
movq 0x18(%rsp), %rcx
callq 0x17fa0
orb %bl, %bpl
addq 0x80(%rsp), %r13
cmpq %r15, %r13
jbe 0x3198c9
leaq 0xc97a6(%rip), %rdi     # 0x3e305b
movl $0xd, %esi
movl $0x1, %edx
movq 0x18(%rsp), %rcx
callq 0x17fa0
orb %r14b, %bpl
movq 0xe0(%rsp), %rax
cmpb $0x1, 0x58(%rax)
jne 0x31990f
movl $0xa, %edi
movq 0x18(%rsp), %rsi
callq 0x17980
testb %bpl, %bpl
je 0x319994
cmpb $0x0, 0x28(%rsp)
je 0x319999
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %bpl, %bpl
jne 0x31992f
leaq 0xc9768(%rip), %rdi     # 0x3e3083
movl $0x14, %esi
movl $0x1, %edx
movq 0x18(%rsp), %rcx
callq 0x17fa0
cmpb $0x0, 0x28(%rsp)
jne 0x319951
leaq 0xc975b(%rip), %rdi     # 0x3e3098
movl $0x12, %esi
movl $0x1, %edx
movq 0x18(%rsp), %rcx
callq 0x17fa0
movl $0xa, %edi
movq 0x18(%rsp), %rsi
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17980
callq 0x92181
callq 0x921ba
callq 0x9210f
callq 0x92148
callq 0x9229e
callq 0x920d6
callq 0x92265
callq 0x921f3
callq 0x9222c