// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/csa_variable_strands.c
// Function: process_splice_forms
static void process_splice_forms(GtArray *genes, GtArray *splice_forms)
{
  GtCSAGene *forward_gene = NULL, *reverse_gene = NULL;
  GtUword i;
  gt_assert(genes && splice_forms);
  /* put splice forms into appropirate genes */
  for (i = 0; i < gt_array_size(splice_forms); i++) {
    GtCSASpliceForm *splice_form = *(GtCSASpliceForm**)
                                 gt_array_get(splice_forms, i);
    switch (gt_csa_splice_form_strand(splice_form)) {
      case GT_STRAND_FORWARD:
        if (!forward_gene)
          forward_gene = gt_csa_gene_new(splice_form);
        else
          gt_csa_gene_add_splice_form(forward_gene, splice_form);
        break;
      case GT_STRAND_REVERSE:
        if (!reverse_gene)
          reverse_gene = gt_csa_gene_new(splice_form);
        else
          gt_csa_gene_add_splice_form(reverse_gene, splice_form);
        break;
      default: gt_assert(0);
    }
  }
  /* store genes */
  gt_assert(forward_gene || reverse_gene);
  if (forward_gene && reverse_gene) {
    GtRange forward_range, reverse_range;
    /* determine which comes first to keep sorting */
    forward_range = gt_csa_gene_genomic_range(forward_gene);
    reverse_range = gt_csa_gene_genomic_range(reverse_gene);
    if (gt_range_compare(&forward_range, &reverse_range) <= 0) {
      gt_array_add(genes, forward_gene);
      gt_array_add(genes, reverse_gene);
    }
    else {
      gt_array_add(genes, reverse_gene);
      gt_array_add(genes, forward_gene);
    }
  }
  else if (forward_gene)
    gt_array_add(genes, forward_gene);
  else
    gt_array_add(genes, reverse_gene);
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq $0x0, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x15ad89
cmpq $0x0, 0x78(%rsp)
jne 0x15adc1
movq 0x59248(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x32cc(%rip), %rsi      # 0x15e066
leaq 0x3472c(%rip), %rdx     # 0x18f4cd
leaq 0x3473b(%rip), %rcx     # 0x18f4e3
leaq 0x34673(%rip), %r8      # 0x18f422
movl $0x37, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x15adc3
movq $0x0, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rdi
callq 0x76490
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x15aecc
movq 0x78(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x75c80
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x15a780
movl %eax, %ecx
movl %ecx, 0xc(%rsp)
testl %eax, %eax
je 0x15ae29
jmp 0x15ae1e
movl 0xc(%rsp), %eax
subl $0x1, %eax
je 0x15ae53
jmp 0x15ae7d
cmpq $0x0, 0x70(%rsp)
jne 0x15ae42
movq 0x58(%rsp), %rdi
callq 0x15a010
movq %rax, 0x70(%rsp)
jmp 0x15ae51
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x15a140
jmp 0x15aeb7
cmpq $0x0, 0x68(%rsp)
jne 0x15ae6c
movq 0x58(%rsp), %rdi
callq 0x15a010
movq %rax, 0x68(%rsp)
jmp 0x15ae7b
movq 0x68(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x15a140
jmp 0x15aeb7
jmp 0x15ae7f
movq 0x59152(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x31d6(%rip), %rsi      # 0x15e066
leaq 0x15024(%rip), %rdx     # 0x16febb
leaq 0x34645(%rip), %rcx     # 0x18f4e3
leaq 0x3457d(%rip), %r8      # 0x18f422
movl $0x49, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x15aeb9
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x15adcc
jmp 0x15aece
cmpq $0x0, 0x70(%rsp)
jne 0x15af16
cmpq $0x0, 0x68(%rsp)
jne 0x15af16
movq 0x590f3(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x3177(%rip), %rsi      # 0x15e066
leaq 0x34602(%rip), %rdx     # 0x18f4f8
leaq 0x345e6(%rip), %rcx     # 0x18f4e3
leaq 0x3451e(%rip), %r8      # 0x18f422
movl $0x4d, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x15af18
cmpq $0x0, 0x70(%rsp)
je 0x15aff4
cmpq $0x0, 0x68(%rsp)
je 0x15aff4
movq 0x70(%rsp), %rdi
callq 0x15a300
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rdi
callq 0x15a300
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x93850
cmpl $0x0, %eax
jg 0x15afc4
movq 0x80(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
movq 0x80(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
jmp 0x15aff2
movq 0x80(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
movq 0x80(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
jmp 0x15b02e
cmpq $0x0, 0x70(%rsp)
je 0x15b015
movq 0x80(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
jmp 0x15b02c
movq 0x80(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
jmp 0x15b02e
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)