// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/genome_node.c
// Function: compare_genome_node_type
static int compare_genome_node_type(GtGenomeNode *gn_a, GtGenomeNode *gn_b)
{
  void *rn_a, *rn_b, *sn_a, *sn_b, *en_a, *en_b;
  GtMetaNode *mn_a, *mn_b;

  /* meta nodes first */
  mn_a = gt_meta_node_try_cast(gn_a);
  mn_b = gt_meta_node_try_cast(gn_b);

  if (mn_a && !mn_b)
    return -1;
  if (!mn_a && mn_b)
    return 1;
  if (mn_a && mn_b) {
    int ret = 0;
    if (!ret && strcmp(gt_meta_node_get_directive(mn_a),
                       GT_GFF_VERSION_DIRECTIVE) == 0)
      ret = -1;
    if (!ret && strcmp(gt_meta_node_get_directive(mn_b),
                       GT_GFF_VERSION_DIRECTIVE) == 0)
      ret = 1;
    if (!ret && strcmp(gt_meta_node_get_directive(mn_a),
                       GT_GVF_VERSION_DIRECTIVE) == 0)
      ret = -1;
    if (!ret && strcmp(gt_meta_node_get_directive(mn_b),
                       GT_GVF_VERSION_DIRECTIVE) == 0)
      ret = 1;
    return ret;
  }

  /* then region nodes */
  rn_a = gt_region_node_try_cast(gn_a);
  rn_b = gt_region_node_try_cast(gn_b);

  if (rn_a && !rn_b)
    return -1;
  if (!rn_a && rn_b)
    return 1;

  /* sequence nodes last, but before eof nodes */
  sn_a = gt_sequence_node_try_cast(gn_a);
  sn_b = gt_sequence_node_try_cast(gn_b);
  en_a = gt_eof_node_try_cast(gn_a);
  en_b = gt_eof_node_try_cast(gn_b);

  if (sn_a && !sn_b)
    return en_b ? -1 : 1;
  if (!sn_a && sn_b)
    return en_a ? 1 : -1;
  if (en_a && !en_b)
    return 1;
  if (!en_a && en_b)
    return -1;

  return 0;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rdi
callq 0x34170
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rdi
callq 0x34170
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x27009
cmpq $0x0, 0x10(%rsp)
jne 0x27009
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x2722f
cmpq $0x0, 0x18(%rsp)
jne 0x27026
cmpq $0x0, 0x10(%rsp)
je 0x27026
movl $0x1, 0x64(%rsp)
jmp 0x2722f
cmpq $0x0, 0x18(%rsp)
je 0x27107
cmpq $0x0, 0x10(%rsp)
je 0x27107
movl $0x0, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x27073
movq 0x18(%rsp), %rdi
callq 0x340c0
movq %rax, %rdi
leaq 0x13ca4b(%rip), %rsi    # 0x163aac
callq 0xb850
cmpl $0x0, %eax
jne 0x27073
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
cmpl $0x0, 0xc(%rsp)
jne 0x270a0
movq 0x10(%rsp), %rdi
callq 0x340c0
movq %rax, %rdi
leaq 0x13ca1e(%rip), %rsi    # 0x163aac
callq 0xb850
cmpl $0x0, %eax
jne 0x270a0
movl $0x1, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x270cd
movq 0x18(%rsp), %rdi
callq 0x340c0
movq %rax, %rdi
leaq 0x13c9ff(%rip), %rsi    # 0x163aba
callq 0xb850
cmpl $0x0, %eax
jne 0x270cd
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
cmpl $0x0, 0xc(%rsp)
jne 0x270fa
movq 0x10(%rsp), %rdi
callq 0x340c0
movq %rax, %rdi
leaq 0x13c9d2(%rip), %rsi    # 0x163aba
callq 0xb850
cmpl $0x0, %eax
jne 0x270fa
movl $0x1, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x64(%rsp)
jmp 0x2722f
movq 0x58(%rsp), %rdi
callq 0x35ee0
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0x35ee0
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x27142
cmpq $0x0, 0x40(%rsp)
jne 0x27142
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x2722f
cmpq $0x0, 0x48(%rsp)
jne 0x2715f
cmpq $0x0, 0x40(%rsp)
je 0x2715f
movl $0x1, 0x64(%rsp)
jmp 0x2722f
movq 0x58(%rsp), %rdi
callq 0x36320
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rdi
callq 0x36320
movq %rax, 0x30(%rsp)
movq 0x58(%rsp), %rdi
callq 0xa60d0
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
callq 0xa60d0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x271c7
cmpq $0x0, 0x30(%rsp)
jne 0x271c7
movq 0x20(%rsp), %rdx
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, 0x64(%rsp)
jmp 0x2722f
cmpq $0x0, 0x38(%rsp)
jne 0x271f3
cmpq $0x0, 0x30(%rsp)
je 0x271f3
movq 0x28(%rsp), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, 0x64(%rsp)
jmp 0x2722f
cmpq $0x0, 0x28(%rsp)
je 0x2720d
cmpq $0x0, 0x20(%rsp)
jne 0x2720d
movl $0x1, 0x64(%rsp)
jmp 0x2722f
cmpq $0x0, 0x28(%rsp)
jne 0x27227
cmpq $0x0, 0x20(%rsp)
je 0x27227
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x2722f
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax,%rax)