// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
callq 0x25853
movq %rax, %r12
movq %rbx, %rdi
callq 0x25853
movq %rax, %r14
testq %r12, %r12
sete %al
testq %r14, %r14
setne %cl
orb %al, %cl
pushq $-0x1
popq %r13
cmpb $0x1, %cl
jne 0x1d385
testq %r14, %r14
setne %al
testq %r12, %r12
sete %cl
pushq $0x1
popq %rbp
testb %al, %cl
je 0x1d2f2
movl %ebp, %eax
jmp 0x1d388
testq %r14, %r14
setne %al
testq %r12, %r12
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1d397
movq %r12, %rdi
callq 0x257cc
leaq 0xb2679(%rip), %rsi     # 0xcf991
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x1d385
movq %r14, %rdi
callq 0x257cc
leaq 0xb265e(%rip), %rsi     # 0xcf991
movq %rax, %rdi
callq 0xb880
movl %eax, %ecx
movl %ebp, %eax
testl %ecx, %ecx
je 0x1d388
movq %r12, %rdi
callq 0x257cc
leaq 0xb264d(%rip), %rsi     # 0xcf99f
movq %rax, %rdi
callq 0xb880
movl %eax, %ecx
movl %r13d, %eax
testl %ecx, %ecx
je 0x1d388
movq %r14, %rdi
callq 0x257cc
leaq 0xb262d(%rip), %rsi     # 0xcf99f
movq %rax, %rdi
callq 0xb880
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
jmp 0x1d388
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x26c21
movq %rax, %r14
movq %rbx, %rdi
callq 0x26c21
movq %rax, %rcx
testq %r14, %r14
sete %al
testq %rcx, %rcx
setne %dl
orb %al, %dl
movl %r13d, %eax
cmpb $0x1, %dl
jne 0x1d388
testq %rcx, %rcx
setne %al
testq %r14, %r14
sete %cl
testb %al, %cl
jne 0x1d2eb
movq %r15, %rdi
callq 0x26f12
movq %rax, %r12
movq %rbx, %rdi
callq 0x26f12
movq %rax, %r13
movq %r15, %rdi
callq 0x64597
movq %rax, %r14
movq %rbx, %rdi
callq 0x64597
movq %rax, %rcx
testq %r12, %r12
sete %al
testq %r13, %r13
setne %dl
orb %al, %dl
je 0x1d42e
testq %r13, %r13
setne %al
testq %r12, %r12
sete %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x1d43d
xorl %eax, %eax
cmpq $0x1, %r14
jmp 0x1d433
xorl %eax, %eax
negq %rcx
sbbl %eax, %eax
orl $0x1, %eax
jmp 0x1d388
testq %r14, %r14
sete %al
testq %rcx, %rcx
setne %dl
orb %al, %dl
movl %ebp, %eax
cmpb $0x1, %dl
jne 0x1d388
testq %rcx, %rcx
setne %al
testq %r14, %r14
sete %cl
andb %al, %cl
movzbl %cl, %eax
negl %eax
jmp 0x1d388
nop