// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/stream_evaluator.c
// Function: set_actuals_and_sort_them
static int set_actuals_and_sort_them(GT_UNUSED void *key, void *value,
                                     void *data, GT_UNUSED GtError *err)
{
  GtStreamEvaluator *se = (GtStreamEvaluator*) data;
  Slot *s = (Slot*) value;

  gt_error_check(err);
  gt_assert(key && value && data);

  /* set actual genes */
  gt_evaluator_add_actual(se->mRNA_gene_evaluator,
                          gt_array_size(s->genes_forward));
  gt_evaluator_add_actual(se->mRNA_gene_evaluator,
                          gt_array_size(s->genes_reverse));
  gt_evaluator_add_actual(se->CDS_gene_evaluator,
                          gt_array_size(s->genes_forward));
  gt_evaluator_add_actual(se->CDS_gene_evaluator,
                          gt_array_size(s->genes_reverse));

  /* set actual mRNAs */
  gt_evaluator_add_actual(se->mRNA_mRNA_evaluator,
                          gt_array_size(s->mRNAs_forward));
  gt_evaluator_add_actual(se->mRNA_mRNA_evaluator,
                          gt_array_size(s->mRNAs_reverse));
  gt_evaluator_add_actual(se->CDS_mRNA_evaluator,
                          gt_array_size(s->mRNAs_forward));
  gt_evaluator_add_actual(se->CDS_mRNA_evaluator,
                          gt_array_size(s->mRNAs_reverse));

  /* set actual LTRs */
  gt_evaluator_add_actual(se->LTR_evaluator, gt_array_size(s->LTRs));

  /* set actual exons (before uniq!) */
  gt_transcript_evaluators_add_actuals(se->mRNA_exon_evaluators,
                                       s->mRNA_exons_forward);
  gt_transcript_evaluators_add_actuals(se->mRNA_exon_evaluators,
                                       s->mRNA_exons_reverse);
  gt_transcript_evaluators_add_actuals(se->CDS_exon_evaluators,
                                       s->CDS_exons_forward);
  gt_transcript_evaluators_add_actuals(se->CDS_exon_evaluators,
                                       s->CDS_exons_reverse);

  /* sort genes */
  gt_genome_nodes_sort(s->genes_forward);
  gt_genome_nodes_sort(s->genes_reverse);

  /* sort mRNAs */
  gt_genome_nodes_sort(s->mRNAs_forward);
  gt_genome_nodes_sort(s->mRNAs_reverse);

  /* sort LTRs */
  gt_genome_nodes_sort(s->LTRs);

  /* sort exons */
  gt_transcript_exons_sort(s->mRNA_exons_forward);
  gt_transcript_exons_sort(s->mRNA_exons_reverse);
  gt_transcript_exons_sort(s->CDS_exons_forward);
  gt_transcript_exons_sort(s->CDS_exons_reverse);

  /* determine true exons */
  s->mRNA_counts_forward =
    gt_transcript_exons_uniq_in_place_count(s->mRNA_exons_forward);
  s->mRNA_counts_reverse =
    gt_transcript_exons_uniq_in_place_count(s->mRNA_exons_reverse);
  s->CDS_counts_forward =
    gt_transcript_exons_uniq_in_place_count(s->CDS_exons_forward);
  s->CDS_counts_reverse =
    gt_transcript_exons_uniq_in_place_count(s->CDS_exons_reverse);

  /* set actual exons for the collapsed case (after uniq!) */
  gt_transcript_evaluators_add_actuals(se->mRNA_exon_evaluators_collapsed,
                                       s->mRNA_exons_forward);
  gt_transcript_evaluators_add_actuals(se->mRNA_exon_evaluators_collapsed,
                                       s->mRNA_exons_reverse);
  gt_transcript_evaluators_add_actuals(se->CDS_exon_evaluators_collapsed,
                                       s->CDS_exons_forward);
  gt_transcript_evaluators_add_actuals(se->CDS_exon_evaluators_collapsed,
                                       s->CDS_exons_reverse);

  /* make sure that the genes are sorted */
  gt_assert(gt_genome_nodes_are_sorted(s->genes_forward));
  gt_assert(gt_genome_nodes_are_sorted(s->genes_reverse));

  /* make sure that the mRNAs are sorted */
  gt_assert(gt_genome_nodes_are_sorted(s->mRNAs_forward));
  gt_assert(gt_genome_nodes_are_sorted(s->mRNAs_reverse));

  /* make sure that the LTRs are sorted */
  gt_assert(gt_genome_nodes_are_sorted(s->LTRs));

  /* make sure that the exons are sorted */
  gt_assert(gt_transcript_exons_are_sorted(s->mRNA_exons_forward));
  gt_assert(gt_transcript_exons_are_sorted(s->mRNA_exons_reverse));
  gt_assert(gt_transcript_exons_are_sorted(s->CDS_exons_forward));
  gt_assert(gt_transcript_exons_are_sorted(s->CDS_exons_reverse));

  /* init true bittabs */
  s->true_mRNA_genes_forward = gt_array_size(s->genes_forward)
                               ? gt_bittab_new(gt_array_size(s->genes_forward))
                               : NULL;
  s->true_mRNA_genes_reverse = gt_array_size(s->genes_reverse)
                               ? gt_bittab_new(gt_array_size(s->genes_reverse))
                               : NULL;
  s->true_CDS_genes_forward = gt_array_size(s->genes_forward)
                              ? gt_bittab_new(gt_array_size(s->genes_forward))
                              : NULL;
  s->true_CDS_genes_reverse = gt_array_size(s->genes_reverse)
                              ? gt_bittab_new(gt_array_size(s->genes_reverse))
                              : NULL;
  s->true_mRNA_mRNAs_forward = gt_array_size(s->mRNAs_forward)
                               ? gt_bittab_new(gt_array_size(s->mRNAs_forward))
                               : NULL;
  s->true_mRNA_mRNAs_reverse = gt_array_size(s->mRNAs_reverse)
                               ? gt_bittab_new(gt_array_size(s->mRNAs_reverse))
                               : NULL;
  s->true_CDS_mRNAs_forward = gt_array_size(s->mRNAs_forward)
                              ? gt_bittab_new(gt_array_size(s->mRNAs_forward))
                              : NULL;
  s->true_CDS_mRNAs_reverse = gt_array_size(s->mRNAs_reverse)
                              ? gt_bittab_new(gt_array_size(s->mRNAs_reverse))
                              : NULL;
  s->true_LTRs          = gt_array_size(s->LTRs)
                          ? gt_bittab_new(gt_array_size(s->LTRs))
                          : NULL;

  /* init overlap bittabs */
  s->overlapped_genes_forward = gt_array_size(s->genes_forward)
                                ? gt_bittab_new(gt_array_size(s->genes_forward))
                                : NULL;
  s->overlapped_genes_reverse = gt_array_size(s->genes_reverse)
                                ? gt_bittab_new(gt_array_size(s->genes_reverse))
                                : NULL;
  s->overlapped_mRNAs_forward = gt_array_size(s->mRNAs_forward)
                                ? gt_bittab_new(gt_array_size(s->mRNAs_forward))
                                : NULL;
  s->overlapped_mRNAs_reverse = gt_array_size(s->mRNAs_reverse)
                                ? gt_bittab_new(gt_array_size(s->mRNAs_reverse))
                                : NULL;
  s->overlapped_LTRs          = gt_array_size(s->LTRs)
                                ? gt_bittab_new(gt_array_size(s->LTRs))
                                : NULL;

  /* init bittabs (for collapsed exons) */
  s->mRNA_exon_bittabs_forward =
    gt_transcript_exons_create_bittabs(s->mRNA_exons_forward);
  s->mRNA_exon_bittabs_reverse =
    gt_transcript_exons_create_bittabs(s->mRNA_exons_reverse);
  s->CDS_exon_bittabs_forward =
    gt_transcript_exons_create_bittabs(s->CDS_exons_forward);
  s->CDS_exon_bittabs_reverse =
    gt_transcript_exons_create_bittabs(s->CDS_exons_reverse);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
testq %rcx, %rcx
je 0xaa2c7
movq %rcx, %rdi
callq 0x34fea
testb %al, %al
jne 0xaa7fc
testq %r15, %r15
je 0xaa7ca
testq %rbx, %rbx
je 0xaa7ca
testq %r14, %r14
je 0xaa7ca
movq 0x28(%r14), %r15
movq (%rbx), %rdi
callq 0x6f310
movq %r15, %rdi
movq %rax, %rsi
callq 0xdb15a
movq 0x28(%r14), %r15
movq 0x8(%rbx), %rdi
callq 0x6f310
movq %r15, %rdi
movq %rax, %rsi
callq 0xdb15a
movq 0x30(%r14), %r15
movq (%rbx), %rdi
callq 0x6f310
movq %r15, %rdi
movq %rax, %rsi
callq 0xdb15a
movq 0x30(%r14), %r15
movq 0x8(%rbx), %rdi
callq 0x6f310
movq %r15, %rdi
movq %rax, %rsi
callq 0xdb15a
movq 0x38(%r14), %r15
movq 0x10(%rbx), %rdi
callq 0x6f310
movq %r15, %rdi
movq %rax, %rsi
callq 0xdb15a
movq 0x38(%r14), %r15
movq 0x18(%rbx), %rdi
callq 0x6f310
movq %r15, %rdi
movq %rax, %rsi
callq 0xdb15a
movq 0x40(%r14), %r15
movq 0x10(%rbx), %rdi
callq 0x6f310
movq %r15, %rdi
movq %rax, %rsi
callq 0xdb15a
movq 0x40(%r14), %r15
movq 0x18(%rbx), %rdi
callq 0x6f310
movq %r15, %rdi
movq %rax, %rsi
callq 0xdb15a
movq 0x48(%r14), %r15
movq 0x20(%rbx), %rdi
callq 0x6f310
movq %r15, %rdi
movq %rax, %rsi
callq 0xdb15a
movq 0x50(%r14), %rdi
movq 0x28(%rbx), %rsi
callq 0xac9ae
movq 0x50(%r14), %rdi
movq 0x30(%rbx), %rsi
callq 0xac9ae
movq 0x60(%r14), %rdi
movq 0x38(%rbx), %rsi
callq 0xac9ae
movq 0x60(%r14), %rdi
movq 0x40(%rbx), %rsi
callq 0xac9ae
movq (%rbx), %rdi
callq 0x417cf
movq 0x8(%rbx), %rdi
callq 0x417cf
movq 0x10(%rbx), %rdi
callq 0x417cf
movq 0x18(%rbx), %rdi
callq 0x417cf
movq 0x20(%rbx), %rdi
callq 0x417cf
movq 0x28(%rbx), %rdi
callq 0xacb6f
movq 0x30(%rbx), %rdi
callq 0xacb6f
movq 0x38(%rbx), %rdi
callq 0xacb6f
movq 0x40(%rbx), %rdi
callq 0xacb6f
movq 0x28(%rbx), %rdi
callq 0xacbaa
movq %rax, 0x48(%rbx)
movq 0x30(%rbx), %rdi
callq 0xacbaa
movq %rax, 0x50(%rbx)
movq 0x38(%rbx), %rdi
callq 0xacbaa
movq %rax, 0x58(%rbx)
movq 0x40(%rbx), %rdi
callq 0xacbaa
movq %rax, 0x60(%rbx)
movq 0x58(%r14), %rdi
movq 0x28(%rbx), %rsi
callq 0xac9ae
movq 0x58(%r14), %rdi
movq 0x30(%rbx), %rsi
callq 0xac9ae
movq 0x68(%r14), %rdi
movq 0x38(%rbx), %rsi
callq 0xac9ae
movq 0x68(%r14), %rdi
movq 0x40(%rbx), %rsi
callq 0xac9ae
movq (%rbx), %rdi
callq 0x41975
testb %al, %al
je 0xaa7cf
movq 0x8(%rbx), %rdi
callq 0x41975
testb %al, %al
je 0xaa7d4
movq 0x10(%rbx), %rdi
callq 0x41975
testb %al, %al
je 0xaa7d9
movq 0x18(%rbx), %rdi
callq 0x41975
testb %al, %al
je 0xaa7de
movq 0x20(%rbx), %rdi
callq 0x41975
testb %al, %al
je 0xaa7e3
movq 0x28(%rbx), %rdi
callq 0xacc31
testb %al, %al
je 0xaa7e8
movq 0x30(%rbx), %rdi
callq 0xacc31
testb %al, %al
je 0xaa7ed
movq 0x38(%rbx), %rdi
callq 0xacc31
testb %al, %al
je 0xaa7f2
movq 0x40(%rbx), %rdi
callq 0xacc31
testb %al, %al
je 0xaa7f7
movq (%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa55b
movq (%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa55d
xorl %eax, %eax
movq %rax, 0xd8(%rbx)
movq 0x8(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa585
movq 0x8(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa587
xorl %eax, %eax
movq %rax, 0xe0(%rbx)
movq (%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa5ad
movq (%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa5af
xorl %eax, %eax
movq %rax, 0xe8(%rbx)
movq 0x8(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa5d7
movq 0x8(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa5d9
xorl %eax, %eax
movq %rax, 0xf0(%rbx)
movq 0x10(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa601
movq 0x10(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa603
xorl %eax, %eax
movq %rax, 0xf8(%rbx)
movq 0x18(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa62b
movq 0x18(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa62d
xorl %eax, %eax
movq %rax, 0x100(%rbx)
movq 0x10(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa655
movq 0x10(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa657
xorl %eax, %eax
movq %rax, 0x108(%rbx)
movq 0x18(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa67f
movq 0x18(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa681
xorl %eax, %eax
movq %rax, 0x110(%rbx)
movq 0x20(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa6a9
movq 0x20(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa6ab
xorl %eax, %eax
movq %rax, 0x118(%rbx)
movq (%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa6d1
movq (%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa6d3
xorl %eax, %eax
movq %rax, 0x120(%rbx)
movq 0x8(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa6fb
movq 0x8(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa6fd
xorl %eax, %eax
movq %rax, 0x128(%rbx)
movq 0x10(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa725
movq 0x10(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa727
xorl %eax, %eax
movq %rax, 0x130(%rbx)
movq 0x18(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa74f
movq 0x18(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa751
xorl %eax, %eax
movq %rax, 0x138(%rbx)
movq 0x20(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0xaa779
movq 0x20(%rbx), %rdi
callq 0x6f310
movq %rax, %rdi
callq 0x70cd4
jmp 0xaa77b
xorl %eax, %eax
movq %rax, 0x140(%rbx)
movq 0x28(%rbx), %rdi
callq 0xacc80
movq %rax, 0x148(%rbx)
movq 0x30(%rbx), %rdi
callq 0xacc80
movq %rax, 0x150(%rbx)
movq 0x38(%rbx), %rdi
callq 0xacc80
movq %rax, 0x158(%rbx)
movq 0x40(%rbx), %rdi
callq 0xacc80
movq %rax, 0x160(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x24ad4
callq 0x24b0d
callq 0x24b46
callq 0x24b7f
callq 0x24bb8
callq 0x24bf1
callq 0x24c2a
callq 0x24c63
callq 0x24c9c
callq 0x24cd5
callq 0x24a9b