// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/csa_visitor.c
// Function: gt_csa_visitor_process_cluster
void gt_csa_visitor_process_cluster(GtNodeVisitor *nv, bool final_cluster)
{
  CSAVisitor *csa_visitor = csa_visitor_cast(nv);
  GT_UNUSED GtFeatureNode *first_feature;
  GtArray *csa_genes;
  GtUword i;

  if (final_cluster) {
    gt_assert(!gt_array_size(csa_visitor->cluster) ||
              !csa_visitor->buffered_feature);
    if (csa_visitor->buffered_feature) {
      gt_array_add(csa_visitor->cluster, csa_visitor->buffered_feature);
      csa_visitor->buffered_feature = NULL;
    }
  }

  if (!gt_array_size(csa_visitor->cluster)) {
    gt_assert(final_cluster);
    return;
  }

  /* compute the consensus spliced alignments */
  first_feature = *(GtFeatureNode**)
                  gt_array_get_first(csa_visitor->cluster);
  csa_genes = gt_csa_variable_strands(gt_array_get_space(csa_visitor->cluster),
                                      gt_array_size(csa_visitor->cluster),
                                      sizeof (GtFeatureNode*),
                                      get_genomic_range,
                                      get_strand, get_exons);

  process_csa_genes(csa_visitor->gt_genome_node_buffer, csa_genes,
                    csa_visitor->gt_csa_source_str);

  for (i = 0; i < gt_array_size(csa_genes); i++)
    gt_csa_gene_delete(*(GtCSAGene**) gt_array_get(csa_genes, i));
  gt_array_delete(csa_genes);

  /* remove the cluster genome nodes */
  for (i = 0; i < gt_array_size(csa_visitor->cluster); i++) {
    gt_genome_node_delete(*(GtGenomeNode**)
                              gt_array_get(csa_visitor->cluster, i));
  }
  gt_array_reset(csa_visitor->cluster);
}

// Assembly:
subq $0x48, %rsp
movb %sil, %al
movq %rdi, 0x40(%rsp)
andb $0x1, %al
movb %al, 0x3f(%rsp)
callq 0x14ec00
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0x34d50
movq %rax, 0x30(%rsp)
testb $0x1, 0x3f(%rsp)
je 0x14f367
jmp 0x14f2d6
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x76490
cmpq $0x0, %rax
je 0x14f32e
movq 0x30(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x14f32e
movq 0x64cdb(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0xed5f(%rip), %rsi      # 0x15e066
leaq 0x3ee77(%rip), %rdx     # 0x18e185
leaq 0x3eeb7(%rip), %rcx     # 0x18e1cc
leaq 0x3eecf(%rip), %r8      # 0x18e1eb
movl $0x1e1, %r9d            # imm = 0x1E1
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x14f330
movq 0x30(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x14f365
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x30(%rsp), %rsi
addq $0x28, %rsi
movl $0x8, %edx
callq 0x76220
movq 0x30(%rsp), %rax
movq $0x0, 0x28(%rax)
jmp 0x14f367
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x76490
cmpq $0x0, %rax
jne 0x14f3c3
jmp 0x14f37d
testb $0x1, 0x3f(%rsp)
jne 0x14f3bc
movq 0x64c4d(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0xecd1(%rip), %rsi      # 0x15e066
leaq 0x3ee6a(%rip), %rdx     # 0x18e206
leaq 0x3ee29(%rip), %rcx     # 0x18e1cc
leaq 0x3ee41(%rip), %r8      # 0x18e1eb
movl $0x1e9, %r9d            # imm = 0x1E9
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x14f3be
jmp 0x14f502
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x75d00
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x761a0
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x76490
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
leaq 0x102(%rip), %rcx       # 0x14f510
leaq 0x18b(%rip), %r8        # 0x14f5a0
leaq 0x204(%rip), %r9        # 0x14f620
callq 0x15aa60
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rax
movq 0x60(%rax), %rdx
callq 0x14f7a0
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x76490
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x14f493
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x75c80
movq (%rax), %rdi
callq 0x15a0b0
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x14f44b
movq 0x20(%rsp), %rdi
callq 0x770a0
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x76490
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0x14f4f4
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x75c80
movq (%rax), %rdi
callq 0x26eb0
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x14f4a6
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x765c0
addq $0x48, %rsp
retq
nopw (%rax,%rax)