// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/stream_evaluator.c
// Function: gt_stream_evaluator_evaluate
int gt_stream_evaluator_evaluate(GtStreamEvaluator *se, bool verbose,
                                 bool exondiff, bool exondiffcollapsed,
                                 GtNodeVisitor *nv, GtError *err)
{
  GtGenomeNode *gn;
  GtFeatureNode *fn;
  Slot *slot;
  ProcessRealFeatureInfo real_info;
  ProcessPredictedFeatureInfo predicted_info;
  int had_err;

  gt_error_check(err);
  gt_assert(se);

  /* init */
  real_info.nuceval = se->nuceval;
  real_info.verbose = verbose;
  predicted_info.nuceval = se->nuceval;
  predicted_info.verbose = verbose;
  predicted_info.exondiff = exondiff;
  predicted_info.exondiffcollapsed = exondiffcollapsed;
  predicted_info.LTRdelta = se->LTRdelta;
  predicted_info.mRNA_gene_evaluator = se->mRNA_gene_evaluator;
  predicted_info.CDS_gene_evaluator = se->CDS_gene_evaluator;
  predicted_info.mRNA_mRNA_evaluator = se->mRNA_mRNA_evaluator;
  predicted_info.CDS_mRNA_evaluator = se->CDS_mRNA_evaluator;
  predicted_info.LTR_evaluator  = se->LTR_evaluator;
  predicted_info.mRNA_exon_evaluators = se->mRNA_exon_evaluators;
  predicted_info.mRNA_exon_evaluators_collapsed =
    se->mRNA_exon_evaluators_collapsed;
  predicted_info.CDS_exon_evaluators = se->CDS_exon_evaluators;
  predicted_info.CDS_exon_evaluators_collapsed =
    se->CDS_exon_evaluators_collapsed;
  predicted_info.wrong_genes = &se->wrong_genes;
  predicted_info.wrong_mRNAs = &se->wrong_mRNAs;
  predicted_info.wrong_LTRs  = &se->wrong_LTRs;

  /* process the reference stream completely */
  while (!(had_err = gt_node_stream_next(se->reference, &gn, err)) && gn) {
    if (gt_region_node_try_cast(gn)) {
      /* each sequence region gets its own ``slot'' */
      if (!(slot = gt_hashmap_get(se->slots,
                                  gt_str_get(gt_genome_node_get_seqid(gn))))) {
        slot = slot_new(se->nuceval, gt_genome_node_get_range(gn));
        gt_hashmap_add(se->slots,
                       gt_cstr_dup(gt_str_get(gt_genome_node_get_seqid(gn))),
                       slot);
      }
      gt_assert(slot);
    }
    /* we consider only genome features */
    if ((fn = gt_feature_node_try_cast(gn))) {
      /* each sequence must have its own ``slot'' at this point */
      slot = gt_hashmap_get(se->slots,
                            gt_str_get(gt_genome_node_get_seqid(gn)));
      gt_assert(slot);
      /* store the exons */
      real_info.slot = slot;
      gt_feature_node_determine_transcripttypes(fn);
      had_err = gt_feature_node_traverse_children(fn, &real_info,
                                                  process_real_feature, false,
                                                  NULL);
      gt_assert(!had_err); /* cannot happen, process_real_feature() is sane */
    }
    if (nv)
      gt_genome_node_accept(gn, nv, err);
    gt_genome_node_delete(gn);
  }

  /* set the actuals and sort them */
  if (!had_err) {
    had_err = gt_hashmap_foreach(se->slots, set_actuals_and_sort_them, se,
                                 NULL);
    gt_assert(!had_err); /* set_actuals_and_sort_them() is sane */
  }

  /* process the prediction stream */
  if (!had_err) {
    while (!had_err &&
             !(had_err = gt_node_stream_next(se->prediction, &gn, err)) &&
                gn) {
      /* we consider only genome features */
      if ((fn = gt_feature_node_try_cast(gn))) {
        /* get (real) slot */
        slot = gt_hashmap_get(se->slots,
                              gt_str_get(gt_genome_node_get_seqid(gn)));
        if (slot) {
          predicted_info.slot = slot;
          gt_feature_node_determine_transcripttypes(fn);
          had_err = gt_feature_node_traverse_children(fn, &predicted_info,
                                                      process_predicted_feature,
                                                      false, NULL);
          gt_assert(!had_err); /* cannot happen, process_predicted_feature() is
                               sane */
        }
        else {
          /* we got no (real) slot */
          gt_warning("sequence id \"%s\" (with predictions) not given in "
                     "reference", gt_str_get(gt_genome_node_get_seqid(gn)));
        }
      }
      if (nv)
        had_err = gt_genome_node_accept(gn, nv, err);
      gt_genome_node_delete(gn);
    }
  }

  /* determine the missing mRNAs */
  if (!had_err) {
    had_err = gt_hashmap_foreach(se->slots, determine_missing_features, se,
                                 NULL);
    gt_assert(!had_err); /* determine_missing_features() is sane */
  }

  /* compute the nucleotides values */
  if (!had_err && se->nuceval) {
    had_err = gt_hashmap_foreach(se->slots, compute_nucleotides_values, se,
                                 NULL);
    gt_assert(!had_err); /* compute_nucleotides_values() is sane */
  }

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, %r14
movq %r8, %r15
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
testq %r9, %r9
je 0x8b3f4
movq %r14, %rdi
callq 0xc103
testb %al, %al
jne 0x8b93e
testq %rbx, %rbx
je 0x8b910
movb 0x10(%rbx), %al
leaq 0x20(%rsp), %rcx
movb %al, 0x8(%rcx)
movb %r13b, 0x9(%rcx)
movb %al, 0x38(%rsp)
movb %r13b, 0x39(%rsp)
movb %r12b, 0x3a(%rsp)
movb %bpl, 0x3b(%rsp)
movq %rcx, %rbp
movq 0x18(%rbx), %rax
movq %rax, 0x40(%rsp)
movups 0x28(%rbx), %xmm0
movups %xmm0, 0x48(%rsp)
movups 0x38(%rbx), %xmm0
movups %xmm0, 0x58(%rsp)
movups 0x48(%rbx), %xmm0
movups %xmm0, 0x68(%rsp)
movups 0x58(%rbx), %xmm0
movups %xmm0, 0x78(%rsp)
movq 0x68(%rbx), %rax
movq %rax, 0x88(%rsp)
leaq 0x78(%rbx), %rax
movq %rax, 0x90(%rsp)
leaq 0x88(%rbx), %rax
movq %rax, 0x98(%rsp)
leaq 0x98(%rbx), %rax
movq %rax, 0xa0(%rsp)
movq %r15, 0x8(%rsp)
movq (%rbx), %rdi
movq %rsp, %rsi
movq %r14, %rdx
callq 0x25c62
movl %eax, %r13d
testl %eax, %eax
jne 0x8b719
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x8b719
callq 0x26c21
testq %rax, %rax
je 0x8b691
movq 0x20(%rbx), %r12
movq (%rsp), %rdi
callq 0x1c31a
movq %rax, %rdi
callq 0x143d2
movq %r12, %rdi
movq %rax, %rsi
callq 0x55ef6
testq %rax, %rax
jne 0x8b691
movb 0x10(%rbx), %bpl
movq (%rsp), %rdi
callq 0x1c3c4
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl $0x188, %esi            # imm = 0x188
pushq $0x1
popq %rdi
leaq 0x59f03(%rip), %rdx     # 0xe5410
movl $0x91, %ecx
callq 0xce9a
movq %rax, %r12
leaq 0x10(%rsp), %rdi
callq 0x5d05e
movq %rax, %r13
pushq $0x8
popq %r15
movq %r15, %rdi
callq 0x4b380
movq %rax, (%r12)
movq %r15, %rdi
callq 0x4b380
movq %rax, 0x8(%r12)
movq %r15, %rdi
callq 0x4b380
movq %rax, 0x10(%r12)
movq %r15, %rdi
callq 0x4b380
movq %rax, 0x18(%r12)
movq %r15, %rdi
callq 0x4b380
movq %rax, 0x20(%r12)
callq 0x8f060
movq %rax, 0x28(%r12)
callq 0x8f060
movq %rax, 0x30(%r12)
callq 0x8f060
movq %rax, 0x38(%r12)
callq 0x8f060
movq %rax, 0x40(%r12)
cmpb $0x1, %bpl
jne 0x8b628
movups 0x10(%rsp), %xmm0
movups %xmm0, 0x68(%r12)
movq %r13, %rdi
callq 0x4d6a4
movq %rax, 0x98(%r12)
movq %r13, %rdi
callq 0x4d6a4
movq %rax, 0xa0(%r12)
movq %r13, %rdi
callq 0x4d6a4
movq %rax, 0xa8(%r12)
movq %r13, %rdi
callq 0x4d6a4
movq %rax, 0xb0(%r12)
movq %r13, %rdi
callq 0x4d6a4
movq %rax, 0xb8(%r12)
movq %r13, %rdi
callq 0x4d6a4
movq %rax, 0xc0(%r12)
movq %r13, %rdi
callq 0x4d6a4
movq %rax, 0xc8(%r12)
movq %r13, %rdi
callq 0x4d6a4
movq %rax, 0xd0(%r12)
callq 0x8f494
movq %rax, 0x168(%r12)
callq 0x8f494
movq %rax, 0x170(%r12)
callq 0x8f494
movq %rax, 0x178(%r12)
callq 0x8f494
movq %rax, 0x180(%r12)
movq 0x20(%rbx), %r13
movq (%rsp), %rdi
callq 0x1c31a
movq %rax, %rdi
callq 0x143d2
movq %rax, %rdi
callq 0x4f8ae
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x55f31
leaq 0x20(%rsp), %rbp
movq 0x8(%rsp), %r15
movq (%rsp), %rdi
callq 0x1b4e0
testq %rax, %rax
je 0x8b6f7
movq %rax, %r12
movq 0x20(%rbx), %r13
movq (%rsp), %rdi
callq 0x1c31a
movq %rax, %rdi
callq 0x143d2
movq %r13, %rdi
movq %rax, %rsi
callq 0x55ef6
testq %rax, %rax
je 0x8b87c
movq %rax, 0x20(%rsp)
movq %r12, %rdi
callq 0x1a217
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x31d(%rip), %rdx       # 0x8ba02
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x19e82
testl %eax, %eax
jne 0x8b8aa
testq %r15, %r15
je 0x8b70b
movq (%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1c56c
movq (%rsp), %rdi
callq 0x1d1e3
jmp 0x8b48a
testl %r13d, %r13d
jne 0x8b867
movq 0x20(%rbx), %rdi
leaq 0x64e(%rip), %rsi       # 0x8bd7b
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x55fe2
testl %eax, %eax
jne 0x8b96f
movq %rsp, %r12
movq 0x8(%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x25c62
movl %eax, %r13d
testl %eax, %eax
jne 0x8b81c
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x8b81c
callq 0x1b4e0
testq %rax, %rax
je 0x8b7ec
movq %rax, %r13
movq 0x20(%rbx), %rbp
movq (%rsp), %rdi
callq 0x1c31a
movq %rax, %rdi
callq 0x143d2
movq %rbp, %rdi
movq %rax, %rsi
callq 0x55ef6
testq %rax, %rax
je 0x8b7ca
movq %rax, 0x30(%rsp)
movq %r13, %rdi
callq 0x1a217
movq %r13, %rdi
leaq 0x30(%rsp), %rsi
leaq 0xd06(%rip), %rdx       # 0x8c4bd
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x19e82
testl %eax, %eax
je 0x8b7ec
jmp 0x8b8e2
movq (%rsp), %rdi
callq 0x1c31a
movq %rax, %rdi
callq 0x143d2
leaq 0x59c70(%rip), %rdi     # 0xe5452
movq %rax, %rsi
xorl %eax, %eax
callq 0x161b0
testq %r15, %r15
je 0x8b805
movq (%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1c56c
movl %eax, %r13d
jmp 0x8b808
xorl %r13d, %r13d
movq (%rsp), %rdi
callq 0x1d1e3
testl %r13d, %r13d
je 0x8b742
jmp 0x8b867
testl %r13d, %r13d
jne 0x8b867
movq 0x20(%rbx), %rdi
leaq 0x1387(%rip), %rsi      # 0x8cbb3
xorl %r13d, %r13d
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x55fe2
testl %eax, %eax
jne 0x8b9a0
cmpb $0x1, 0x10(%rbx)
jne 0x8b867
movq 0x20(%rbx), %rdi
leaq 0x14d9(%rip), %rsi      # 0x8cd2b
xorl %r13d, %r13d
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x55fe2
testl %eax, %eax
jne 0x8b9d1
movl %r13d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa2735(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3e7d9(%rip), %rsi     # 0xca066
leaq 0x59bb9(%rip), %rdx     # 0xe544d
leaq 0x59b95(%rip), %rcx     # 0xe5430
leaq 0x59b6e(%rip), %r8      # 0xe5410
movl $0x578, %r9d            # imm = 0x578
jmp 0x8b8d6
movq 0xa2707(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3e7ab(%rip), %rsi     # 0xca066
leaq 0x3ed51(%rip), %rdx     # 0xca613
leaq 0x59b67(%rip), %rcx     # 0xe5430
leaq 0x59b40(%rip), %r8      # 0xe5410
movl $0x57f, %r9d            # imm = 0x57F
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
movq 0xa26cf(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3e773(%rip), %rsi     # 0xca066
leaq 0x3ed19(%rip), %rdx     # 0xca613
leaq 0x59b2f(%rip), %rcx     # 0xe5430
leaq 0x59b08(%rip), %r8      # 0xe5410
movl $0x59d, %r9d            # imm = 0x59D
jmp 0x8b8d6
movq 0xa26a1(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3e745(%rip), %rsi     # 0xca066
leaq 0x47a57(%rip), %rdx     # 0xd337f
leaq 0x59b01(%rip), %rcx     # 0xe5430
leaq 0x59ada(%rip), %r8      # 0xe5410
movl $0x54d, %r9d            # imm = 0x54D
jmp 0x8b8d6
movq 0xa2673(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3e717(%rip), %rsi     # 0xca066
leaq 0x3ed03(%rip), %rdx     # 0xca659
leaq 0x59ad3(%rip), %rcx     # 0xe5430
leaq 0x59aac(%rip), %r8      # 0xe5410
movl $0x54c, %r9d            # imm = 0x54C
jmp 0x8b8d6
movq 0xa2642(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3e6e6(%rip), %rsi     # 0xca066
leaq 0x3ec8c(%rip), %rdx     # 0xca613
leaq 0x59aa2(%rip), %rcx     # 0xe5430
leaq 0x59a7b(%rip), %r8      # 0xe5410
movl $0x58a, %r9d            # imm = 0x58A
jmp 0x8b8d6
movq 0xa2611(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3e6b5(%rip), %rsi     # 0xca066
leaq 0x3ec5b(%rip), %rdx     # 0xca613
leaq 0x59a71(%rip), %rcx     # 0xe5430
leaq 0x59a4a(%rip), %r8      # 0xe5410
movl $0x5b0, %r9d            # imm = 0x5B0
jmp 0x8b8d6
movq 0xa25e0(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3e684(%rip), %rsi     # 0xca066
leaq 0x3ec2a(%rip), %rdx     # 0xca613
leaq 0x59a40(%rip), %rcx     # 0xe5430
leaq 0x59a19(%rip), %r8      # 0xe5410
movl $0x5b7, %r9d            # imm = 0x5B7
jmp 0x8b8d6