// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rdi, %r12
callq 0x48aa3
movq %rax, %r13
movq %r14, %rdi
callq 0x48aa3
movq %rax, %r15
testq %r13, %r13
sete %al
testq %r15, %r15
setne %cl
orb %al, %cl
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpb $0x1, %cl
jne 0x421de
testq %r15, %r15
setne %al
testq %r13, %r13
sete %cl
testb %al, %cl
je 0x421ea
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testq %r15, %r15
setne %al
testq %r13, %r13
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x4227b
movq %r13, %rdi
callq 0x48a7e
leaq 0xa4795(%rip), %rsi     # 0xe69a1
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x421de
movq %r15, %rdi
callq 0x48a7e
leaq 0xa477a(%rip), %rsi     # 0xe69a1
movq %rax, %rdi
callq 0xb890
movl $0x1, %ebx
testl %eax, %eax
je 0x421de
movq %r13, %rdi
callq 0x48a7e
leaq 0xa4768(%rip), %rsi     # 0xe69af
movq %rax, %rdi
callq 0xb890
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x421de
movq %r15, %rdi
callq 0x48a7e
leaq 0xa4748(%rip), %rsi     # 0xe69af
movq %rax, %rdi
callq 0xb890
xorl %ebx, %ebx
testl %eax, %eax
sete %bl
jmp 0x421de
movq %r12, %rdi
callq 0x49700
movq %rax, %r15
movq %r14, %rdi
callq 0x49700
testq %r15, %r15
sete %cl
testq %rax, %rax
setne %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x421de
testq %rax, %rax
setne %al
testq %r15, %r15
sete %cl
testb %al, %cl
jne 0x421d9
movq %r12, %rdi
callq 0x4990a
movq %rax, %rbx
movq %r14, %rdi
callq 0x4990a
movq %rax, %r13
movq %r12, %rdi
callq 0x84ba9
movq %rax, %r15
movq %r14, %rdi
callq 0x84ba9
testq %rbx, %rbx
sete %cl
testq %r13, %r13
setne %dl
orb %cl, %dl
je 0x4230d
testq %r13, %r13
setne %cl
testq %rbx, %rbx
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x4231c
xorl %ebx, %ebx
cmpq $0x1, %r15
jmp 0x42312
xorl %ebx, %ebx
negq %rax
sbbl %ebx, %ebx
orl $0x1, %ebx
jmp 0x421de
testq %r15, %r15
sete %cl
testq %rax, %rax
setne %dl
orb %cl, %dl
movl $0x1, %ebx
cmpb $0x1, %dl
jne 0x421de
testq %rax, %rax
setne %al
testq %r15, %r15
sete %cl
andb %al, %cl
movzbl %cl, %ebx
negl %ebx
jmp 0x421de