// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/stream_evaluator.c
// Function: genes_are_equal
static bool genes_are_equal(GtGenomeNode *gn_1, GtGenomeNode *gn_2,
                            const char *feature_type)
{
  GtArray *exons_1, *exons_2, *mRNAs_1, *mRNAs_2;
  StoreGeneFeatureInfo info;
  GtUword i;
  bool equal;
  GT_UNUSED int had_err;

  gt_assert(gn_1 && gn_2 && feature_type);

  /* init */
  exons_1 = gt_array_new(sizeof (GtRange));
  exons_2 = gt_array_new(sizeof (GtRange));
  mRNAs_1 = gt_array_new(sizeof (GtGenomeNode*));
  mRNAs_2 = gt_array_new(sizeof (GtGenomeNode*));

  /* get (direct) gene features */
  info.exons = exons_1;
  info.mRNAs = mRNAs_1;
  info.feature_type = feature_type;
  had_err = gt_feature_node_traverse_direct_children(gt_feature_node_cast(gn_1),
                                                     &info, store_gene_feature,
                                                     NULL);
  gt_assert(!had_err); /* cannot happen, store_gene_feature() is sane */
  info.exons = exons_2;
  info.mRNAs = mRNAs_2;
  had_err = gt_feature_node_traverse_direct_children(gt_feature_node_cast(gn_2),
                                                     &info, store_gene_feature,
                                                     NULL);
  gt_assert(!had_err); /* cannot happen, store_gene_feature() is sane */

  /* sort exon ranges */
  gt_ranges_sort(exons_1);
  gt_ranges_sort(exons_2);

  /* compare exon ranges */
  equal = gt_ranges_are_equal(exons_1, exons_2);

  /* compare mRNAs, if necessary */
  if (equal && gt_array_size(mRNAs_1) == gt_array_size(mRNAs_2)) {
    /* sort mRNAs */
    gt_genome_nodes_sort(mRNAs_1);
    gt_genome_nodes_sort(mRNAs_2);
    for (i = 0; i < gt_array_size(mRNAs_1); i++) {
      gt_assert(equal);
      equal = mRNAs_are_equal(*(GtGenomeNode**) gt_array_get(mRNAs_1, i),
                              *(GtGenomeNode**) gt_array_get(mRNAs_2, i),
                              feature_type);
      if (!equal)
        break;
    }
  }

  /* free */
  gt_array_delete(exons_1);
  gt_array_delete(exons_2);
  gt_array_delete(mRNAs_1);
  gt_array_delete(mRNAs_2);

  return equal;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
cmpq $0x0, 0x70(%rsp)
je 0xf072b
cmpq $0x0, 0x68(%rsp)
je 0xf072b
cmpq $0x0, 0x60(%rsp)
jne 0xf0763
movq 0xc38a6(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x6d92a(%rip), %rsi     # 0x15e066
leaq 0x8a5ff(%rip), %rdx     # 0x17ad42
leaq 0x8a615(%rip), %rcx     # 0x17ad5f
leaq 0x89e57(%rip), %r8      # 0x17a5a8
movl $0x28f, %r9d            # imm = 0x28F
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xf0765
movl $0x10, %edi
callq 0x75ab0
movq %rax, 0x58(%rsp)
movl $0x10, %edi
callq 0x75ab0
movq %rax, 0x50(%rsp)
movl $0x8, %edi
callq 0x75ab0
movq %rax, 0x48(%rsp)
movl $0x8, %edi
callq 0x75ab0
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
callq 0x20750
movq %rax, %rdi
leaq 0x28(%rsp), %rsi
leaq 0xe08(%rip), %rdx       # 0xf15e0
xorl %eax, %eax
movl %eax, %ecx
callq 0x23790
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
je 0xf0824
movq 0xc37e5(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x6d869(%rip), %rsi     # 0x15e066
leaq 0x767ba(%rip), %rdx     # 0x166fbe
leaq 0x8a554(%rip), %rcx     # 0x17ad5f
leaq 0x89d96(%rip), %r8      # 0x17a5a8
movl $0x29e, %r9d            # imm = 0x29E
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xf0826
movq 0x50(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rsp), %rdi
callq 0x20750
movq %rax, %rdi
leaq 0x28(%rsp), %rsi
leaq 0xd8d(%rip), %rdx       # 0xf15e0
xorl %eax, %eax
movl %eax, %ecx
callq 0x23790
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
je 0xf089f
movq 0xc376a(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x6d7ee(%rip), %rsi     # 0x15e066
leaq 0x7673f(%rip), %rdx     # 0x166fbe
leaq 0x8a4d9(%rip), %rcx     # 0x17ad5f
leaq 0x89d1b(%rip), %r8      # 0x17a5a8
movl $0x2a4, %r9d            # imm = 0x2A4
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xf08a1
movq 0x58(%rsp), %rdi
callq 0x954f0
movq 0x50(%rsp), %rdi
callq 0x954f0
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x95820
andb $0x1, %al
movb %al, 0x1f(%rsp)
testb $0x1, 0x1f(%rsp)
je 0xf09e0
movq 0x48(%rsp), %rdi
callq 0x76490
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rdi
callq 0x76490
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jne 0xf09e0
movq 0x48(%rsp), %rdi
callq 0x26020
movq 0x40(%rsp), %rdi
callq 0x26020
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0x76490
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0xf09de
jmp 0xf0943
testb $0x1, 0x1f(%rsp)
jne 0xf0982
movq 0xc3687(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x6d70b(%rip), %rsi     # 0x15e066
leaq 0x7c365(%rip), %rdx     # 0x16ccc7
leaq 0x8a3f6(%rip), %rcx     # 0x17ad5f
leaq 0x89c38(%rip), %r8      # 0x17a5a8
movl $0x2b3, %r9d            # imm = 0x2B3
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xf0984
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x75c80
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x75c80
movq (%rsp), %rdi
movq (%rax), %rsi
movq 0x60(%rsp), %rdx
callq 0xf0a20
andb $0x1, %al
movb %al, 0x1f(%rsp)
testb $0x1, 0x1f(%rsp)
jne 0xf09c9
jmp 0xf09de
jmp 0xf09cb
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xf091c
jmp 0xf09e0
movq 0x58(%rsp), %rdi
callq 0x770a0
movq 0x50(%rsp), %rdi
callq 0x770a0
movq 0x48(%rsp), %rdi
callq 0x770a0
movq 0x40(%rsp), %rdi
callq 0x770a0
movb 0x1f(%rsp), %al
andb $0x1, %al
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)