// File: /workspace/github_c_makefile_star2_O2/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 0x8bd9e
movq %rcx, %rdi
callq 0xc103
testb %al, %al
jne 0x8c485
testq %r15, %r15
je 0x8c2a1
testq %rbx, %rbx
je 0x8c2a1
testq %r14, %r14
je 0x8c2a1
movq 0x28(%r14), %r15
movq (%rbx), %rdi
callq 0x4b988
movq %r15, %rdi
movq %rax, %rsi
callq 0xc3796
movq 0x28(%r14), %r15
movq 0x8(%rbx), %rdi
callq 0x4b988
movq %r15, %rdi
movq %rax, %rsi
callq 0xc3796
movq 0x30(%r14), %r15
movq (%rbx), %rdi
callq 0x4b988
movq %r15, %rdi
movq %rax, %rsi
callq 0xc3796
movq 0x30(%r14), %r15
movq 0x8(%rbx), %rdi
callq 0x4b988
movq %r15, %rdi
movq %rax, %rsi
callq 0xc3796
movq 0x38(%r14), %r15
movq 0x10(%rbx), %rdi
callq 0x4b988
movq %r15, %rdi
movq %rax, %rsi
callq 0xc3796
movq 0x38(%r14), %r15
movq 0x18(%rbx), %rdi
callq 0x4b988
movq %r15, %rdi
movq %rax, %rsi
callq 0xc3796
movq 0x40(%r14), %r15
movq 0x10(%rbx), %rdi
callq 0x4b988
movq %r15, %rdi
movq %rax, %rsi
callq 0xc3796
movq 0x40(%r14), %r15
movq 0x18(%rbx), %rdi
callq 0x4b988
movq %r15, %rdi
movq %rax, %rsi
callq 0xc3796
movq 0x48(%r14), %r15
movq 0x20(%rbx), %rdi
callq 0x4b988
movq %r15, %rdi
movq %rax, %rsi
callq 0xc3796
movq 0x50(%r14), %rdi
movq 0x28(%rbx), %rsi
callq 0x8ef23
movq 0x50(%r14), %rdi
movq 0x30(%rbx), %rsi
callq 0x8ef23
movq 0x60(%r14), %rdi
movq 0x38(%rbx), %rsi
callq 0x8ef23
movq 0x60(%r14), %rdi
movq 0x40(%rbx), %rsi
callq 0x8ef23
movq (%rbx), %rdi
callq 0x1c752
movq 0x8(%rbx), %rdi
callq 0x1c752
movq 0x10(%rbx), %rdi
callq 0x1c752
movq 0x18(%rbx), %rdi
callq 0x1c752
movq 0x20(%rbx), %rdi
callq 0x1c752
movq 0x28(%rbx), %rdi
callq 0x8f207
movq 0x30(%rbx), %rdi
callq 0x8f207
movq 0x38(%rbx), %rdi
callq 0x8f207
movq 0x40(%rbx), %rdi
callq 0x8f207
movq 0x28(%rbx), %rdi
callq 0x8f273
movq %rax, 0x48(%rbx)
movq 0x30(%rbx), %rdi
callq 0x8f273
movq %rax, 0x50(%rbx)
movq 0x38(%rbx), %rdi
callq 0x8f273
movq %rax, 0x58(%rbx)
movq 0x40(%rbx), %rdi
callq 0x8f273
movq %rax, 0x60(%rbx)
movq 0x58(%r14), %rdi
movq 0x28(%rbx), %rsi
callq 0x8ef23
movq 0x58(%r14), %rdi
movq 0x30(%rbx), %rsi
callq 0x8ef23
movq 0x68(%r14), %rdi
movq 0x38(%rbx), %rsi
callq 0x8ef23
movq 0x68(%r14), %rdi
movq 0x40(%rbx), %rsi
callq 0x8ef23
movq (%rbx), %rdi
callq 0x1c943
testb %al, %al
je 0x8c2d2
movq 0x8(%rbx), %rdi
callq 0x1c943
testb %al, %al
je 0x8c303
movq 0x10(%rbx), %rdi
callq 0x1c943
testb %al, %al
je 0x8c334
movq 0x18(%rbx), %rdi
callq 0x1c943
testb %al, %al
je 0x8c365
movq 0x20(%rbx), %rdi
callq 0x1c943
testb %al, %al
je 0x8c396
movq 0x28(%rbx), %rdi
callq 0x8f32b
testb %al, %al
je 0x8c3c7
movq 0x30(%rbx), %rdi
callq 0x8f32b
testb %al, %al
je 0x8c3f8
movq 0x38(%rbx), %rdi
callq 0x8f32b
testb %al, %al
je 0x8c429
movq 0x40(%rbx), %rdi
callq 0x8f32b
testb %al, %al
je 0x8c457
movq (%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c032
movq (%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c034
xorl %eax, %eax
movq %rax, 0xd8(%rbx)
movq 0x8(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c05c
movq 0x8(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c05e
xorl %eax, %eax
movq %rax, 0xe0(%rbx)
movq (%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c084
movq (%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c086
xorl %eax, %eax
movq %rax, 0xe8(%rbx)
movq 0x8(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c0ae
movq 0x8(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c0b0
xorl %eax, %eax
movq %rax, 0xf0(%rbx)
movq 0x10(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c0d8
movq 0x10(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c0da
xorl %eax, %eax
movq %rax, 0xf8(%rbx)
movq 0x18(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c102
movq 0x18(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c104
xorl %eax, %eax
movq %rax, 0x100(%rbx)
movq 0x10(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c12c
movq 0x10(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c12e
xorl %eax, %eax
movq %rax, 0x108(%rbx)
movq 0x18(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c156
movq 0x18(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c158
xorl %eax, %eax
movq %rax, 0x110(%rbx)
movq 0x20(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c180
movq 0x20(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c182
xorl %eax, %eax
movq %rax, 0x118(%rbx)
movq (%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c1a8
movq (%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c1aa
xorl %eax, %eax
movq %rax, 0x120(%rbx)
movq 0x8(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c1d2
movq 0x8(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c1d4
xorl %eax, %eax
movq %rax, 0x128(%rbx)
movq 0x10(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c1fc
movq 0x10(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c1fe
xorl %eax, %eax
movq %rax, 0x130(%rbx)
movq 0x18(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c226
movq 0x18(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c228
xorl %eax, %eax
movq %rax, 0x138(%rbx)
movq 0x20(%rbx), %rdi
callq 0x4b988
testq %rax, %rax
je 0x8c250
movq 0x20(%rbx), %rdi
callq 0x4b988
movq %rax, %rdi
callq 0x4d6a4
jmp 0x8c252
xorl %eax, %eax
movq %rax, 0x140(%rbx)
movq 0x28(%rbx), %rdi
callq 0x8f3ab
movq %rax, 0x148(%rbx)
movq 0x30(%rbx), %rdi
callq 0x8f3ab
movq %rax, 0x150(%rbx)
movq 0x38(%rbx), %rdi
callq 0x8f3ab
movq %rax, 0x158(%rbx)
movq 0x40(%rbx), %rdi
callq 0x8f3ab
movq %rax, 0x160(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0xa1d10(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3ddb4(%rip), %rsi     # 0xca066
leaq 0x3e47a(%rip), %rdx     # 0xca733
leaq 0x595d4(%rip), %rcx     # 0xe5894
leaq 0x59149(%rip), %r8      # 0xe5410
movl $0x10a, %r9d            # imm = 0x10A
jmp 0x8c4b1
movq 0xa1cdf(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3dd83(%rip), %rsi     # 0xca066
leaq 0x595c4(%rip), %rdx     # 0xe58ae
leaq 0x595a3(%rip), %rcx     # 0xe5894
leaq 0x59118(%rip), %r8      # 0xe5410
movl $0x153, %r9d            # imm = 0x153
jmp 0x8c4b1
movq 0xa1cae(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3dd52(%rip), %rsi     # 0xca066
leaq 0x595c0(%rip), %rdx     # 0xe58db
leaq 0x59572(%rip), %rcx     # 0xe5894
leaq 0x590e7(%rip), %r8      # 0xe5410
movl $0x154, %r9d            # imm = 0x154
jmp 0x8c4b1
movq 0xa1c7d(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3dd21(%rip), %rsi     # 0xca066
leaq 0x595bc(%rip), %rdx     # 0xe5908
leaq 0x59541(%rip), %rcx     # 0xe5894
leaq 0x590b6(%rip), %r8      # 0xe5410
movl $0x157, %r9d            # imm = 0x157
jmp 0x8c4b1
movq 0xa1c4c(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3dcf0(%rip), %rsi     # 0xca066
leaq 0x595b8(%rip), %rdx     # 0xe5935
leaq 0x59510(%rip), %rcx     # 0xe5894
leaq 0x59085(%rip), %r8      # 0xe5410
movl $0x158, %r9d            # imm = 0x158
jmp 0x8c4b1
movq 0xa1c1b(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3dcbf(%rip), %rsi     # 0xca066
leaq 0x595b4(%rip), %rdx     # 0xe5962
leaq 0x594df(%rip), %rcx     # 0xe5894
leaq 0x59054(%rip), %r8      # 0xe5410
movl $0x15b, %r9d            # imm = 0x15B
jmp 0x8c4b1
movq 0xa1bea(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3dc8e(%rip), %rsi     # 0xca066
leaq 0x595a7(%rip), %rdx     # 0xe5986
leaq 0x594ae(%rip), %rcx     # 0xe5894
leaq 0x59023(%rip), %r8      # 0xe5410
movl $0x15e, %r9d            # imm = 0x15E
jmp 0x8c4b1
movq 0xa1bb9(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3dc5d(%rip), %rsi     # 0xca066
leaq 0x595ac(%rip), %rdx     # 0xe59bc
leaq 0x5947d(%rip), %rcx     # 0xe5894
leaq 0x58ff2(%rip), %r8      # 0xe5410
movl $0x15f, %r9d            # imm = 0x15F
jmp 0x8c4b1
movq 0xa1b88(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3dc2c(%rip), %rsi     # 0xca066
leaq 0x595b1(%rip), %rdx     # 0xe59f2
leaq 0x5944c(%rip), %rcx     # 0xe5894
leaq 0x58fc1(%rip), %r8      # 0xe5410
movl $0x160, %r9d            # imm = 0x160
jmp 0x8c4b1
movq 0xa1b5a(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3dbfe(%rip), %rsi     # 0xca066
leaq 0x595b8(%rip), %rdx     # 0xe5a27
leaq 0x5941e(%rip), %rcx     # 0xe5894
leaq 0x58f93(%rip), %r8      # 0xe5410
movl $0x161, %r9d            # imm = 0x161
jmp 0x8c4b1
movq 0xa1b2c(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3dbd0(%rip), %rsi     # 0xca066
leaq 0x3e1bc(%rip), %rdx     # 0xca659
leaq 0x593f0(%rip), %rcx     # 0xe5894
leaq 0x58f65(%rip), %r8      # 0xe5410
movl $0x109, %r9d            # imm = 0x109
xorl %eax, %eax
callq 0xb8c0
callq 0xb300