// File: /workspace/github_c_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r13
callq 0x49707
movq %rax, %r15
movq %r12, %rdi
callq 0x49707
movq %rax, %r14
testq %r15, %r15
sete %al
testq %r14, %r14
setne %cl
orb %al, %cl
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpb $0x1, %cl
jne 0x42cfa
testq %r14, %r14
setne %al
testq %r15, %r15
sete %cl
testb %al, %cl
je 0x42bb9
movl $0x1, %ebx
jmp 0x42cfa
testq %r14, %r14
setne %al
testq %r15, %r15
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x42c11
movq %r15, %rdi
callq 0x496e2
leaq 0xa3e06(%rip), %rsi     # 0xe69e1
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x42ca3
movq %r14, %rdi
callq 0x496e2
leaq 0xa3de7(%rip), %rsi     # 0xe69e1
movq %rax, %rdi
callq 0xb890
xorl %ebx, %ebx
testl %eax, %eax
setne %al
sete %bl
jmp 0x42caa
movq %r13, %rdi
callq 0x4a358
movq %rax, %r14
movq %r12, %rdi
callq 0x4a358
testq %r14, %r14
sete %cl
testq %rax, %rax
setne %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x42cfa
testq %rax, %rax
setne %al
testq %r14, %r14
sete %cl
testb %al, %cl
jne 0x42baf
movq %r13, %rdi
callq 0x4a562
movq %rax, %rbx
movq %r12, %rdi
callq 0x4a562
movq %rax, %r15
movq %r13, %rdi
callq 0x85023
movq %rax, %r14
movq %r12, %rdi
callq 0x85023
testq %rbx, %rbx
sete %cl
testq %r15, %r15
setne %dl
orb %cl, %dl
je 0x42cf0
testq %r15, %r15
setne %cl
testq %rbx, %rbx
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x42d06
xorl %ebx, %ebx
cmpq $0x1, %r14
jmp 0x42cf5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %eax, %eax
testb %al, %al
je 0x42ccc
movq %r15, %rdi
callq 0x496e2
leaq 0xa3d32(%rip), %rsi     # 0xe69ef
movq %rax, %rdi
callq 0xb890
xorl %ebx, %ebx
cmpl $0x1, %eax
sbbl %ebx, %ebx
testl %ebx, %ebx
jne 0x42cfa
movq %r14, %rdi
callq 0x496e2
leaq 0xa3d10(%rip), %rsi     # 0xe69ef
movq %rax, %rdi
callq 0xb890
xorl %ebx, %ebx
testl %eax, %eax
sete %bl
jmp 0x42cfa
xorl %ebx, %ebx
negq %rax
sbbl %ebx, %ebx
orl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testq %r14, %r14
sete %cl
testq %rax, %rax
setne %dl
orb %cl, %dl
movl $0x1, %ebx
cmpb $0x1, %dl
jne 0x42cfa
testq %rax, %rax
setne %al
testq %r14, %r14
sete %cl
andb %al, %cl
movzbl %cl, %ebx
negl %ebx
jmp 0x42cfa
nop