// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/ltr/ltrdigest_file_out_stream.c
// Function: gt_ltrfileout_stream_next
int gt_ltrfileout_stream_next(GtNodeStream *ns, GtGenomeNode **gn, GtError *err)
{
  GtLTRdigestFileOutStream *ls;
  GtFeatureNode *fn;
  GtRange lltr_rng = {GT_UNDEF_UWORD, GT_UNDEF_UWORD},
          rltr_rng = {GT_UNDEF_UWORD, GT_UNDEF_UWORD},
          ppt_rng = {GT_UNDEF_UWORD, GT_UNDEF_UWORD},
          pbs_rng = {GT_UNDEF_UWORD, GT_UNDEF_UWORD};
  int had_err;
  GtUword i=0;

  gt_error_check(err);
  ls = gt_ltrdigest_file_out_stream_cast(ns);

  /* initialize this element */
  memset(&ls->element, 0, sizeof (GtLTRElement));

  /* get annotations from parser */
  had_err = gt_node_stream_next(ls->in_stream, gn, err);
  if (!had_err && *gn)
  {
    GtFeatureNodeIterator* gni;
    GtFeatureNode *mygn;

    /* only process feature nodes */
    if (!(fn = gt_feature_node_try_cast(*gn)))
      return 0;

    ls->element.pdomorder = gt_array_new(sizeof (const char*));

    /* fill LTRElement structure from GFF3 subgraph */
    gni = gt_feature_node_iterator_new(fn);
    for (mygn = fn; mygn != NULL; mygn = gt_feature_node_iterator_next(gni))
      (void) gt_genome_node_accept((GtGenomeNode*) mygn,
                                   (GtNodeVisitor*) ls->lv,
                                   err);
    gt_feature_node_iterator_delete(gni);
  }

  if (!had_err && ls->element.mainnode != NULL)
  {
    char desc[GT_MAXFASTAHEADER];
    GtFeatureNode *ltr3, *ltr5;
    GtStr *sdesc, *sreg, *seq;

    /* find sequence in GtEncseq */
    sreg = gt_genome_node_get_seqid((GtGenomeNode*) ls->element.mainnode);

    sdesc = gt_str_new();
    had_err = gt_region_mapping_get_description(ls->rmap, sdesc, sreg, err);

    if (!had_err) {
      GtRange rng;
      int ret = 0;

      ls->element.seqid = gt_calloc((size_t) ls->seqnamelen+1, sizeof (char));
      (void) snprintf(ls->element.seqid,
                      GT_MIN((size_t) gt_str_length(sdesc),
                          (size_t) ls->seqnamelen)+1,
                      "%s", gt_str_get(sdesc));
      gt_cstr_rep(ls->element.seqid, ' ', '_');
      if (gt_str_length(sdesc) > (GtUword) ls->seqnamelen)
        ls->element.seqid[ls->seqnamelen] = '\0';

      ret = gt_ltrelement_format_description(&ls->element,
                                             ls->seqnamelen,
                                             desc,
                                             (size_t) (GT_MAXFASTAHEADER-1));
      if (ret < 0) {
        gt_warning("FASTA header truncated: %s", desc);
      }
      gt_str_delete(sdesc);

      /* output basic retrotransposon data */
      lltr_rng = gt_genome_node_get_range((GtGenomeNode*) ls->element.leftLTR);
      rltr_rng = gt_genome_node_get_range((GtGenomeNode*) ls->element.rightLTR);
      rng = gt_genome_node_get_range((GtGenomeNode*) ls->element.mainnode);
      gt_file_xprintf(ls->tabout_file,
                      GT_WU"\t"GT_WU"\t"GT_WU"\t%s\t"GT_WU"\t"GT_WU"\t"GT_WU"\t"
                      GT_WU"\t"GT_WU"\t"GT_WU"\t",
                      rng.start, rng.end, gt_ltrelement_length(&ls->element),
                      ls->element.seqid, lltr_rng.start, lltr_rng.end,
                      gt_ltrelement_leftltrlen(&ls->element), rltr_rng.start,
                      rltr_rng.end, gt_ltrelement_rightltrlen(&ls->element));
    }
    seq = gt_str_new();

    /* output TSDs */
    if (!had_err && ls->element.leftTSD != NULL)
    {
      GtRange tsd_rng;
      tsd_rng = gt_genome_node_get_range((GtGenomeNode*) ls->element.leftTSD);
      had_err = gt_extract_feature_sequence(seq,
                                       (GtGenomeNode*) ls->element.leftTSD,
                                       gt_symbol(gt_ft_target_site_duplication),
                                       false,
                                       NULL, NULL, ls->rmap, err);
      if (!had_err) {
        gt_file_xprintf(ls->tabout_file,
                         ""GT_WU"\t"GT_WU"\t%s\t",
                         tsd_rng.start,
                         tsd_rng.end,
                         gt_str_get(seq));
      }
    gt_str_reset(seq);
    } else gt_file_xprintf(ls->tabout_file, "\t\t\t");

    if (!had_err && ls->element.rightTSD != NULL)
    {
      GtRange tsd_rng;

      tsd_rng = gt_genome_node_get_range((GtGenomeNode*) ls->element.rightTSD);
      had_err = gt_extract_feature_sequence(seq,
                                       (GtGenomeNode*) ls->element.rightTSD,
                                       gt_symbol(gt_ft_target_site_duplication),
                                       false,
                                       NULL, NULL, ls->rmap, err);
      if (!had_err) {
        gt_file_xprintf(ls->tabout_file,
                           ""GT_WU"\t"GT_WU"\t%s\t",
                           tsd_rng.start,
                           tsd_rng.end,
                           gt_str_get(seq));
      }
      gt_str_reset(seq);
    } else gt_file_xprintf(ls->tabout_file, "\t\t\t");

    /* output PPT */
    if (!had_err && ls->element.ppt != NULL)
    {
      GtStrand ppt_strand = gt_feature_node_get_strand(ls->element.ppt);

      ppt_rng = gt_genome_node_get_range((GtGenomeNode*) ls->element.ppt);
      had_err = gt_extract_feature_sequence(seq,
                                            (GtGenomeNode*) ls->element.ppt,
                                            gt_symbol(gt_ft_RR_tract), false,
                                            NULL, NULL, ls->rmap, err);
      if (!had_err) {
        gt_fasta_show_entry(desc, gt_str_get(seq), gt_range_length(&ppt_rng),
                            GT_FSWIDTH, ls->pptout_file);
        gt_file_xprintf(ls->tabout_file,
                           ""GT_WU"\t"GT_WU"\t%s\t%c\t%d\t",
                           ppt_rng.start,
                           ppt_rng.end,
                           gt_str_get(seq),
                           GT_STRAND_CHARS[ppt_strand],
                           (ppt_strand == GT_STRAND_FORWARD ?
                               abs((int) (rltr_rng.start - ppt_rng.end)) :
                               abs((int) (lltr_rng.end - ppt_rng.start))));
      }
      gt_str_reset(seq);
    } else gt_file_xprintf(ls->tabout_file, "\t\t\t\t\t");

    /* output PBS */
    if (!had_err && ls->element.pbs != NULL)
    {
      GtStrand pbs_strand;

      pbs_strand = gt_feature_node_get_strand(ls->element.pbs);
      pbs_rng = gt_genome_node_get_range((GtGenomeNode*) ls->element.pbs);
      had_err = gt_extract_feature_sequence(seq,
                                           (GtGenomeNode*) ls->element.pbs,
                                           gt_symbol(gt_ft_primer_binding_site),
                                           false, NULL, NULL, ls->rmap, err);
      if (!had_err) {
        gt_fasta_show_entry(desc, gt_str_get(seq), gt_range_length(&pbs_rng),
                            GT_FSWIDTH, ls->pbsout_file);
        gt_file_xprintf(ls->tabout_file,
                         ""GT_WU"\t"GT_WU"\t%c\t%s\t%s\t%s\t%s\t%s\t",
                         pbs_rng.start,
                         pbs_rng.end,
                         GT_STRAND_CHARS[pbs_strand],
                         gt_feature_node_get_attribute(ls->element.pbs, "trna"),
                         gt_str_get(seq),
                         gt_feature_node_get_attribute(ls->element.pbs,
                                                       "pbsoffset"),
                         gt_feature_node_get_attribute(ls->element.pbs,
                                                       "trnaoffset"),
                         gt_feature_node_get_attribute(ls->element.pbs,
                                                       "edist"));
      }
      gt_str_reset(seq);
    } else gt_file_xprintf(ls->tabout_file, "\t\t\t\t\t\t\t\t");

    /* output protein domains */
    if (!had_err && ls->element.pdoms != NULL)
    {
      GtStr *pdomorderstr = gt_str_new();
      for (i=0; !had_err && i<gt_array_size(ls->element.pdomorder); i++)
      {
        const char* key = *(const char**) gt_array_get(ls->element.pdomorder,
                                                       i);
        GtArray *entry = (GtArray*) gt_hashmap_get(ls->element.pdoms, key);
        had_err = write_pdom(ls, entry, key, ls->rmap, desc, err);
      }

      if (GT_STRAND_REVERSE == gt_feature_node_get_strand(ls->element.mainnode))
        gt_array_reverse(ls->element.pdomorder);

      for (i=0 ;!had_err && i<gt_array_size(ls->element.pdomorder); i++)
      {
        const char* name = *(const char**) gt_array_get(ls->element.pdomorder,
                                                        i);
        gt_str_append_cstr(pdomorderstr, name);
        if (i != gt_array_size(ls->element.pdomorder)-1)
          gt_str_append_cstr(pdomorderstr, "/");
      }
      gt_file_xprintf(ls->tabout_file, "%s", gt_str_get(pdomorderstr));
      gt_str_delete(pdomorderstr);
    }

    /* output LTRs (we just expect them to exist) */
    switch (gt_feature_node_get_strand(ls->element.mainnode))
    {
      case GT_STRAND_REVERSE:
        ltr5 = ls->element.rightLTR;
        ltr3 = ls->element.leftLTR;
        break;
      case GT_STRAND_FORWARD:
      default:
        ltr5 = ls->element.leftLTR;
        ltr3 = ls->element.rightLTR;
        break;
    }

    if (!had_err) {
      had_err = gt_extract_feature_sequence(seq, (GtGenomeNode*) ltr5,
                                          gt_symbol(gt_ft_long_terminal_repeat),
                                          false,
                                          NULL, NULL, ls->rmap, err);
    }
    if (!had_err) {
      gt_fasta_show_entry(desc, gt_str_get(seq), gt_str_length(seq),
                          GT_FSWIDTH, ls->ltr5out_file);
      gt_str_reset(seq);
    }
    if (!had_err) {
      had_err = gt_extract_feature_sequence(seq, (GtGenomeNode*) ltr3,
                                          gt_symbol(gt_ft_long_terminal_repeat),
                                          false,
                                          NULL, NULL, ls->rmap, err);
    }
    if (!had_err) {
      gt_fasta_show_entry(desc, gt_str_get(seq), gt_str_length(seq),
                          GT_FSWIDTH, ls->ltr3out_file);
      gt_str_reset(seq);
    }

    /* output complete oriented element */
    if (!had_err) {
      had_err = gt_extract_feature_sequence(seq,
                                           (GtGenomeNode*) ls->element.mainnode,
                                           gt_symbol(gt_ft_LTR_retrotransposon),
                                           false,
                                           NULL, NULL, ls->rmap, err);
    }
    if (!had_err) {
      gt_fasta_show_entry(desc,gt_str_get(seq), gt_str_length(seq),
                          GT_FSWIDTH, ls->elemout_file);
      gt_str_reset(seq);
    }
    gt_file_xprintf(ls->tabout_file, "\n");
    gt_str_delete(seq);
  }
  gt_hashmap_delete(ls->element.pdoms);
  gt_array_delete(ls->element.pdomorder);
  gt_free(ls->element.seqid);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x22b8, %rsp           # imm = 0x22B8
movq %rdx, %rbp
movq %rsi, %rbx
movq %rdi, %r14
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x80(%rsp)
movdqa %xmm0, 0x70(%rsp)
testq %rdx, %rdx
je 0x2096c7
movq %rbp, %rdi
callq 0xfcc32
testb %al, %al
jne 0x20a5b3
callq 0x20a5d1
movq %rax, %rdi
movq %r14, %rsi
callq 0x162ff7
movq %rax, %r13
pxor %xmm0, %xmm0
movdqu %xmm0, 0x68(%rax)
movdqu %xmm0, 0x78(%rax)
movdqu %xmm0, 0x88(%rax)
movdqu %xmm0, 0x98(%rax)
movdqu %xmm0, 0xa8(%rax)
movdqu %xmm0, 0xb8(%rax)
movdqu %xmm0, 0xc8(%rax)
movq 0x10(%rax), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x162e68
movl %eax, %r15d
testl %eax, %eax
jne 0x20a4b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x209786
callq 0x143cab
testq %rax, %rax
je 0x2097fc
movq %rax, %rbx
movl $0x8, %edi
callq 0xd214c
movq %rax, 0xc8(%r13)
movq %rbx, %rdi
callq 0x143f54
movq %rax, %r14
movq 0x58(%r13), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x14472c
movq %r14, %rdi
callq 0x1440ea
movq %rax, %rbx
testq %rax, %rax
jne 0x20975f
movq %r14, %rdi
callq 0x14417c
movq 0x88(%r13), %rdi
testq %rdi, %rdi
je 0x2097f4
callq 0x144635
movq %rax, %rbx
callq 0x11ac6c
movq %rax, %r15
movq 0x18(%r13), %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x16e0cf
movq %rax, %r12
testl %eax, %eax
movq %r13, 0x10(%rsp)
je 0x209804
movq $-0x1, 0x18(%rsp)
callq 0x11ac6c
movq %rax, %r14
movq $-0x1, 0x20(%rsp)
movq %r12, %r15
movq 0x28(%r13), %rdi
leaq 0x1b622a(%rip), %rsi    # 0x3bfa12
xorl %eax, %eax
callq 0xfee51
jmp 0x209a75
xorl %r15d, %r15d
jmp 0x20a4b0
xorl %r15d, %r15d
jmp 0x20a4e0
movl 0x64(%r13), %edi
incq %rdi
leaq 0x1b6139(%rip), %rdx    # 0x3bf94b
movl $0x1, %esi
movl $0x1a6, %ecx            # imm = 0x1A6
callq 0x10436a
movq %rax, %rbx
movq %rax, 0xc0(%r13)
movq %r15, %rdi
callq 0x11b0ca
movl 0x64(%r13), %r14d
cmpq %r14, %rax
jae 0x209847
movq %r15, %rdi
callq 0x11b0ca
movq %rax, %r14
incq %r14
movq %r15, %rdi
callq 0x11b0a1
leaq 0x1bf250(%rip), %rdx    # 0x3c8aa9
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rcx
xorl %eax, %eax
callq 0x17c60
movq 0xc0(%r13), %rdi
movl $0x20, %esi
movl $0x5f, %edx
callq 0xe431c
movq %r15, %rdi
callq 0x11b0ca
movl 0x64(%r13), %r14d
cmpq %r14, %rax
jbe 0x2098a0
movq 0xc0(%r13), %rax
movb $0x0, (%rax,%r14)
movl 0x64(%r13), %r14d
movl $0x1fff, %esi           # imm = 0x1FFF
cmpl %esi, %r14d
cmovbl %r14d, %esi
incl %esi
movq 0xc0(%r13), %rcx
leaq 0x1bf1ed(%rip), %rdx    # 0x3c8aa9
leaq 0x2b0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x17c60
incl %r14d
movb $0x0, 0x2b0(%rsp,%r14)
movq %rbx, %rdi
movl $0x20, %esi
movl $0x5f, %edx
callq 0xe431c
movq 0x70(%r13), %r8
movq 0x78(%r13), %r9
incq %r8
incq %r9
leaq 0x1b5f1d(%rip), %rdx    # 0x3bf81e
leaq 0xb0(%rsp), %rdi
movl $0xff, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x17c60
testl %eax, %eax
jns 0x209932
leaq 0x1b604c(%rip), %rdi    # 0x3bf96f
leaq 0xb0(%rsp), %rsi
xorl %eax, %eax
callq 0x11f68c
movq %r15, %rdi
callq 0x11bdbf
movq 0x90(%r13), %rdi
callq 0x144679
movq %rax, %rbx
movq %rdx, 0x18(%rsp)
movq 0x98(%r13), %rdi
callq 0x144679
movq %rax, 0x20(%rsp)
movq %rdx, %r14
movq 0x88(%r13), %rdi
callq 0x144679
movq %rdx, %rcx
movq 0x68(%r13), %r10
movq 0x70(%r13), %rdx
subq %rdx, %r10
jb 0x20a5c7
movq 0x78(%r13), %r8
movq %r8, %r11
subq 0x80(%r13), %r11
jb 0x20a5cc
movq %r12, %r15
movq 0x28(%r13), %rdi
incq %r10
movq 0xc0(%r13), %r9
subq %rdx, %r8
incq %r8
incq %r11
leaq 0x1b5fd3(%rip), %rsi    # 0x3bf98a
movq %rax, %rdx
xorl %eax, %eax
pushq %r11
pushq %r14
pushq 0x30(%rsp)
pushq %r10
pushq 0x38(%rsp)
pushq %rbx
callq 0xfee51
addq $0x30, %rsp
callq 0x11ac6c
movq %rax, %r14
movq 0xa0(%r13), %rdi
testq %rdi, %rdi
je 0x2097dd
callq 0x144679
movq %rax, %rbx
movq %rdx, %r15
movq 0x10(%rsp), %rax
movq 0xa0(%rax), %r13
leaq 0x18cf69(%rip), %rdi    # 0x396973
callq 0x11c5ff
movq %r14, %rdi
movq %r13, %rsi
movq 0x10(%rsp), %r13
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbp
pushq 0x18(%r13)
callq 0x2fda60
addq $0x10, %rsp
movq %rax, %r12
testl %eax, %eax
jne 0x209a6a
movq 0x10(%rsp), %rax
movq 0x28(%rax), %r13
movq %r14, %rdi
callq 0x11b0a1
leaq 0x1b5f60(%rip), %rsi    # 0x3bf9b2
movq %r13, %rdi
movq 0x10(%rsp), %r13
movq %rbx, %rdx
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xfee51
movq %r14, %rdi
callq 0x11b132
movq %r12, %r15
testl %r15d, %r15d
je 0x209a91
movq 0x28(%r13), %rdi
leaq 0x1b5f8d(%rip), %rsi    # 0x3bfa12
xorl %eax, %eax
callq 0xfee51
jmp 0x209b26
movq 0xa8(%r13), %rdi
testq %rdi, %rdi
je 0x209a7a
callq 0x144679
movq %rax, %rbx
movq %rdx, %r15
movq 0x10(%rsp), %rax
movq 0xa8(%rax), %r13
leaq 0x18ceb8(%rip), %rdi    # 0x396973
callq 0x11c5ff
movq %r14, %rdi
movq %r13, %rsi
movq 0x10(%rsp), %r13
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbp
pushq 0x18(%r13)
callq 0x2fda60
addq $0x10, %rsp
movq %rax, %r12
testl %eax, %eax
jne 0x209b1b
movq 0x10(%rsp), %rax
movq 0x28(%rax), %r13
movq %r14, %rdi
callq 0x11b0a1
leaq 0x1b5eaf(%rip), %rsi    # 0x3bf9b2
movq %r13, %rdi
movq 0x10(%rsp), %r13
movq %rbx, %rdx
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xfee51
movq %r14, %rdi
callq 0x11b132
movq %r12, %r15
testl %r15d, %r15d
movq %rbp, 0x30(%rsp)
je 0x209b47
movq 0x28(%r13), %rdi
leaq 0x1b5ed5(%rip), %rsi    # 0x3bfa10
xorl %eax, %eax
callq 0xfee51
jmp 0x209c7b
movq 0xb0(%r13), %rdi
testq %rdi, %rdi
je 0x209b30
callq 0x1424d6
movl %eax, %r12d
movq 0xb0(%r13), %rdi
callq 0x144679
movq %rax, 0x80(%rsp)
movq %rdx, 0x88(%rsp)
movq %r14, %rbx
movq 0xb0(%r13), %r14
leaq 0x1b5e36(%rip), %rdi    # 0x3bf9be
callq 0x11c5ff
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbp
pushq 0x18(%r13)
callq 0x2fda60
addq $0x10, %rsp
movl %eax, %r15d
testl %eax, %eax
jne 0x209c70
movq %rbx, %rdi
callq 0x11b0a1
movq %rax, %r13
leaq 0x80(%rsp), %r14
movq %r14, %rdi
callq 0x112233
movq 0x10(%rsp), %rcx
movq 0x38(%rcx), %r8
leaq 0xb0(%rsp), %rdi
movl $0x3c, %ecx
movq %r13, %rsi
movq %rax, %rdx
callq 0xfe000
movq 0x10(%rsp), %rax
movq 0x28(%rax), %r13
movq (%r14), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r14), %rbp
movq %rbx, %rdi
callq 0x11b0a1
movl %r12d, %ecx
leaq 0x163e1a(%rip), %rdx    # 0x36da34
movq 0x18(%rsp), %rsi
subl (%r14), %esi
movq 0x20(%rsp), %rdi
subl 0x8(%r14), %edi
movsbl (%rcx,%rdx), %r9d
testl %r12d, %r12d
cmovnel %esi, %edi
movl %edi, %r10d
negl %r10d
cmovsl %edi, %r10d
subq $0x8, %rsp
leaq 0x1b5d7c(%rip), %rsi    # 0x3bf9c7
movq %r13, %rdi
movq 0x18(%rsp), %r13
movq 0x30(%rsp), %rdx
movq %rbp, %rcx
movq 0x38(%rsp), %rbp
movq %rax, %r8
xorl %eax, %eax
pushq %r10
callq 0xfee51
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x11b132
movq %rbx, %r14
testl %r15d, %r15d
je 0x209c97
movq 0x28(%r13), %rdi
leaq 0x1b5d82(%rip), %rsi    # 0x3bfa0d
xorl %eax, %eax
callq 0xfee51
jmp 0x209e1a
movq 0xb8(%r13), %rdi
testq %rdi, %rdi
je 0x209c80
callq 0x1424d6
movl %eax, %ebx
movq 0xb8(%r13), %rdi
callq 0x144679
movq %rax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
movq %r14, %r12
movq 0xb8(%r13), %r14
leaq 0x1b5d08(%rip), %rdi    # 0x3bf9d9
callq 0x11c5ff
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbp
pushq 0x18(%r13)
callq 0x2fda60
addq $0x10, %rsp
movl %eax, %r15d
testl %eax, %eax
jne 0x209e0f
movq %r12, %rdi
callq 0x11b0a1
movq %rax, %r14
movq %r15, 0x18(%rsp)
leaq 0x70(%rsp), %r15
movq %r15, %rdi
callq 0x112233
movq 0x30(%r13), %r8
leaq 0xb0(%rsp), %rdi
movl $0x3c, %ecx
movq %r14, %rsi
movq %rax, %rdx
callq 0xfe000
movq (%r15), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x28(%rsp)
movl %ebx, %eax
leaq 0x163ce1(%rip), %rcx    # 0x36da34
movsbl (%rax,%rcx), %eax
movl %eax, 0x40(%rsp)
movq 0x28(%r13), %rbx
movq 0xb8(%r13), %rdi
leaq 0x1b5c9b(%rip), %rsi    # 0x3bfa08
callq 0x141f50
movq %rax, %rbp
movq %r12, %rdi
callq 0x11b0a1
movq %rax, %r13
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %rdi
leaq 0x1b4b24(%rip), %rsi    # 0x3be8b7
callq 0x141f50
movq %rax, %r14
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %rdi
leaq 0x1b4b41(%rip), %rsi    # 0x3be8ef
callq 0x141f50
movq %rax, %r15
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %rdi
leaq 0x1b611e(%rip), %rsi    # 0x3bfee7
callq 0x141f50
movq %rax, %r10
leaq 0x1b5c15(%rip), %rsi    # 0x3bf9ed
movq %rbx, %rdi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movl 0x40(%rsp), %r8d
movq %rbp, %r9
movq 0x30(%rsp), %rbp
xorl %eax, %eax
pushq %r10
pushq %r15
movq 0x28(%rsp), %r15
pushq %r14
pushq %r13
movq 0x30(%rsp), %r13
callq 0xfee51
addq $0x20, %rsp
movq %r12, %rdi
callq 0x11b132
movq %r12, %r14
testl %r15d, %r15d
jne 0x20a3bc
cmpq $0x0, 0xd0(%r13)
je 0x20a2db
callq 0x11ac6c
movq %rax, 0x48(%rsp)
movq 0xc8(%r13), %rdi
callq 0xd24e0
testq %rax, %rax
setne %al
movq %r14, 0x98(%rsp)
movb %al, 0xf(%rsp)
je 0x20a2e3
leaq 0x1b0(%rsp), %r14
leaq 0x1b6135(%rip), %r12    # 0x3bffa3
xorl %ebx, %ebx
movq 0xc8(%r13), %rdi
movq %rbx, 0x58(%rsp)
movq %rbx, %rsi
callq 0xd2207
movq (%rax), %rbx
movq 0xd0(%r13), %rdi
movq %rbx, %rsi
callq 0x100add
movq %rax, 0x40(%rsp)
movq 0x18(%r13), %rax
movq %rax, 0x28(%rsp)
testq %rbp, %rbp
je 0x209eb9
movq %rbp, %rdi
callq 0xfcc32
testb %al, %al
jne 0x20a5bd
callq 0x11ac6c
movq %rax, 0x20(%rsp)
callq 0x11ac6c
movq %rax, 0x38(%rsp)
movq 0x20(%r13), %rcx
movl $0xff, %esi
movq %r14, %rdi
leaq 0x1b60b4(%rip), %rdx    # 0x3bff94
movq %rbx, %r8
xorl %eax, %eax
callq 0x17c60
movq %r14, %rdi
movq %r12, %rsi
callq 0xfed58
movq %rax, 0x60(%rsp)
cmpb $0x1, 0xd8(%r13)
jne 0x209f31
movq 0x20(%r13), %rcx
movl $0xff, %esi
movq %r14, %rdi
leaq 0x1b608f(%rip), %rdx    # 0x3bffa6
movq %rbx, %r8
xorl %eax, %eax
callq 0x17c60
movq %r14, %rdi
movq %r12, %rsi
callq 0xfed58
movq %rax, %r15
jmp 0x209f34
xorl %r15d, %r15d
cmpb $0x1, 0xd9(%r13)
jne 0x209f68
movq 0x20(%r13), %rcx
movl $0xff, %esi
movq %r14, %rdi
leaq 0x1b6064(%rip), %rdx    # 0x3bffb5
movq %rbx, %r8
xorl %eax, %eax
callq 0x17c60
movq %r14, %rdi
movq %r12, %rsi
callq 0xfed58
jmp 0x209f6a
xorl %eax, %eax
leaq 0x1b60c2(%rip), %r12    # 0x3c0033
leaq 0x1b60ca(%rip), %rbx    # 0x3c0042
movq %rax, 0x50(%rsp)
movq 0x40(%rsp), %rbp
movq %rbp, %rdi
callq 0xd24e0
cmpq $0x2, %rax
jb 0x20a009
movq %rbp, %rdi
callq 0xd24e0
cmpq $0x2, %rax
jb 0x209fe3
movl $0x1, %ebx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xd2207
movq (%rax), %r14
decq %rbx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xd2207
movq (%rax), %rsi
movq %r14, %rdi
callq 0x144431
testl %eax, %eax
js 0x20a5a9
movq %rbp, %rdi
callq 0xd24e0
addq $0x2, %rbx
cmpq %rax, %rbx
jb 0x209fa3
movq %rbp, %rdi
xorl %esi, %esi
callq 0xd2207
movq (%rax), %rdi
callq 0x1424d6
cmpl $0x1, %eax
leaq 0x1b6043(%rip), %rbx    # 0x3c0042
jne 0x20a009
movq %rbp, %rdi
callq 0xd2349
movq %r15, 0x68(%rsp)
movq %rbp, %rdi
callq 0xd24e0
testq %rax, %rax
je 0x20a1af
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %r15, 0x18(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
callq 0xd2207
movq (%rax), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x144b70
movq %rax, %r12
movq %r15, %rdi
movq %rbx, %rsi
callq 0x144b70
movq %rax, %rbx
movq %r15, %rdi
callq 0x144679
movq %rax, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
leaq 0x176ba6(%rip), %rdi    # 0x380c19
callq 0x11c5ff
movq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq 0x30(%rsp)
pushq 0x30(%rsp)
callq 0x2fda60
addq $0x10, %rsp
testl %eax, %eax
jne 0x20a257
cmpb $0x1, 0xd8(%r13)
jne 0x20a144
testq %r12, %r12
je 0x20a144
movq 0x68(%rsp), %rbp
testq %rbp, %rbp
je 0x20a5ae
movl $0x1fff, %esi           # imm = 0x1FFF
leaq 0x2b0(%rsp), %r13
movq %r13, %rdi
leaq 0x1b5f75(%rip), %rdx    # 0x3c0055
leaq 0xb0(%rsp), %rcx
xorl %eax, %eax
callq 0x17c60
movq %r13, %rdi
callq 0x172f0
movq %rbp, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xff190
movq %r12, %rdi
callq 0x11b0a1
movq %rax, %r13
movq %r12, %rdi
callq 0x11b0ca
movq %rbp, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xff190
movl $0x5, %edx
movq %rbp, %rdi
leaq 0x1b5f66(%rip), %rsi    # 0x3c009b
callq 0xff190
movq 0x10(%rsp), %r13
movq 0x40(%rsp), %rbp
cmpb $0x1, 0xd9(%r13)
jne 0x20a160
testq %rbx, %rbx
je 0x20a160
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x11adc1
movq %r15, %rdi
leaq 0x1b5ec9(%rip), %r12    # 0x3c0033
movq %r12, %rsi
callq 0x144b9c
movq %r15, %rdi
leaq 0x1b5ec6(%rip), %rbx    # 0x3c0042
movq %rbx, %rsi
callq 0x144b9c
leaq 0xa0(%rsp), %rdi
callq 0x112233
movq 0x18(%rsp), %r15
addq %rax, %r15
incq %r14
movq %rbp, %rdi
callq 0xd24e0
cmpq %rax, %r14
jb 0x20a025
jmp 0x20a1b2
xorl %r15d, %r15d
movq 0x60(%rsp), %rbx
testq %rbx, %rbx
je 0x20a5b8
movq 0x20(%rsp), %rdi
callq 0x11b0a1
movl $0x3c, %ecx
leaq 0xb0(%rsp), %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %rbx, %r8
callq 0xfe000
movq $0x0, 0x18(%rsp)
movb $0x1, %bpl
cmpb $0x1, 0xd9(%r13)
leaq 0x1b5da3(%rip), %r12    # 0x3bffa3
movq 0x58(%rsp), %rbx
jne 0x20a252
movq 0x50(%rsp), %r14
testq %r14, %r14
je 0x20a5c2
movq %r12, %r15
movq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x11b0a1
movq %rax, %rbx
movq %r12, %rdi
callq 0x11b0ca
movl $0x3c, %ecx
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %r14, %r8
callq 0xfe000
movq 0x58(%rsp), %rbx
jmp 0x20a279
movq %r12, %r15
jmp 0x20a26f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
leaq 0x1b5d39(%rip), %r15    # 0x3bffa3
movq 0x58(%rsp), %rbx
movq 0x38(%rsp), %r12
movq 0x50(%rsp), %r14
movq 0x20(%rsp), %rdi
callq 0x11bdbf
movq %r12, %rdi
callq 0x11bdbf
movq %r14, %rdi
callq 0xff22c
movq 0x68(%rsp), %rdi
callq 0xff22c
movq 0x60(%rsp), %rdi
callq 0xff22c
testb %bpl, %bpl
je 0x20a2ee
incq %rbx
movq 0xc8(%r13), %rdi
callq 0xd24e0
cmpq %rax, %rbx
setb 0xf(%rsp)
movq 0x30(%rsp), %rbp
leaq 0x1b0(%rsp), %r14
movq %r15, %r12
jb 0x209e70
jmp 0x20a2f3
xorl %r15d, %r15d
jmp 0x20a3bc
movq $0x0, 0x18(%rsp)
jmp 0x20a2f3
movq 0x30(%rsp), %rbp
movq 0x88(%r13), %rdi
callq 0x1424d6
cmpl $0x1, %eax
jne 0x20a310
movq 0xc8(%r13), %rdi
callq 0xd2349
testb $0x1, 0xf(%rsp)
movq 0x18(%rsp), %r15
jne 0x20a387
movq 0xc8(%r13), %rdi
callq 0xd24e0
testq %rax, %rax
je 0x20a387
xorl %ebx, %ebx
leaq 0x154e6c(%rip), %r14    # 0x35f1a2
movq 0xc8(%r13), %rdi
movq %rbx, %rsi
callq 0xd2207
movq (%rax), %rsi
movq 0x48(%rsp), %rdi
callq 0x11acf3
movq 0xc8(%r13), %rdi
callq 0xd24e0
decq %rax
cmpq %rax, %rbx
je 0x20a373
movq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x11acf3
incq %rbx
movq 0xc8(%r13), %rdi
callq 0xd24e0
cmpq %rax, %rbx
jb 0x20a336
movq 0x28(%r13), %rbx
movq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x11b0a1
leaq 0x1be70a(%rip), %rsi    # 0x3c8aa9
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfee51
movq %r14, %rdi
callq 0x11bdbf
movq 0x98(%rsp), %r14
movq 0x88(%r13), %rdi
callq 0x1424d6
xorl %ecx, %ecx
cmpl $0x1, %eax
setne %dl
testl %r15d, %r15d
jne 0x20a496
movb %dl, %cl
movq 0x90(%r13,%rcx,8), %rbx
xorl %ecx, %ecx
cmpl $0x1, %eax
sete %cl
movq %r14, %r15
movq 0x90(%r13,%rcx,8), %r14
leaq 0x18d0bb(%rip), %rdi    # 0x3974b8
callq 0x11c5ff
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbp
pushq 0x18(%r13)
callq 0x2fda60
addq $0x10, %rsp
testl %eax, %eax
je 0x20a42a
movq %r15, %r14
jmp 0x20a493
movq %r15, %rdi
callq 0x11b0a1
movq %rax, %r14
movq %r15, %rdi
callq 0x11b0ca
movq 0x40(%r13), %r8
leaq 0xb0(%rsp), %rdi
movl $0x3c, %ecx
movq %r14, %rsi
movq %rax, %rdx
callq 0xfe000
movq %r15, %rdi
callq 0x11b132
leaq 0x18d050(%rip), %rdi    # 0x3974b8
callq 0x11c5ff
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbp
pushq 0x18(%r13)
callq 0x2fda60
addq $0x10, %rsp
testl %eax, %eax
movq %r15, %r14
je 0x20a4f5
movq %rax, %r15
movq 0x28(%r13), %rdi
leaq 0x1b5bfe(%rip), %rsi    # 0x3c009f
xorl %eax, %eax
callq 0xfee51
movq %r14, %rdi
callq 0x11bdbf
movq 0xd0(%r13), %rdi
callq 0x10109b
movq 0xc8(%r13), %rdi
callq 0xd2938
movq 0xc0(%r13), %rdi
leaq 0x1b5475(%rip), %rsi    # 0x3bf94b
movl $0x279, %edx            # imm = 0x279
callq 0x1045eb
movl %r15d, %eax
addq $0x22b8, %rsp           # imm = 0x22B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x11b0a1
movq %rax, %rbx
movq %r14, %rdi
callq 0x11b0ca
movq 0x48(%r13), %r8
leaq 0xb0(%rsp), %rdi
movl $0x3c, %ecx
movq %rbx, %rsi
movq %rax, %rdx
callq 0xfe000
movq %r14, %rdi
callq 0x11b132
movq 0x88(%r13), %rbx
leaq 0x18a67d(%rip), %rdi    # 0x394bb7
callq 0x11c5ff
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbp
pushq 0x18(%r13)
callq 0x2fda60
addq $0x10, %rsp
testl %eax, %eax
je 0x20a56d
movl %eax, %r15d
jmp 0x20a496
movq %r14, %rdi
callq 0x11b0a1
movq %rax, %rbx
movq %r14, %rdi
callq 0x11b0ca
movq 0x50(%r13), %r8
leaq 0xb0(%rsp), %rdi
movl $0x3c, %ecx
movq %rbx, %rsi
movq %rax, %rdx
callq 0xfe000
movq %r14, %rdi
callq 0x11b132
jmp 0x20a496
callq 0x80852
callq 0x8088b
callq 0x807e0
callq 0x808fd
callq 0x80819
callq 0x808c4
callq 0x8096d
callq 0x80936