// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/block.c
// Function: elemcmp
static int elemcmp(const void *a, const void *b, void *data)
{
  const char *type_a, *type_b;
  double zindex_a = GT_UNDEF_DOUBLE, zindex_b= GT_UNDEF_DOUBLE;
  GtStyle *sty = (GtStyle*) data;
  GtElement *elem_a = *(GtElement**) a;
  GtElement *elem_b = *(GtElement**) b;

  type_a = gt_element_get_type(elem_a);
  type_b = gt_element_get_type(elem_b);

  /* same types are equal, no further action needed */
  if (type_a == type_b)
    return 0;
  /* if not, then get z-index from style */
  if (sty)
  {
    (void) gt_style_get_num(sty, type_a, "z_index", &zindex_a, NULL, NULL);
    (void) gt_style_get_num(sty, type_b, "z_index", &zindex_b, NULL, NULL);
  }
  /* only one is set -> put types with set z-indices always on top of others*/
  if (zindex_a == GT_UNDEF_DOUBLE && zindex_b != GT_UNDEF_DOUBLE)
    return -1;
  if (zindex_b == GT_UNDEF_DOUBLE && zindex_a != GT_UNDEF_DOUBLE)
    return 1;
  /* none is set, fall back to default alphabetic ordering */
  if (zindex_a == GT_UNDEF_DOUBLE && zindex_b == GT_UNDEF_DOUBLE)
  {
    if (strcmp(type_a, type_b) < 0)
      return 1;
    return -1;
  }
  /* both z-indices are set */
  if (gt_double_equals_double(zindex_a, zindex_b))
    return 0;
  if (gt_double_smaller_double(zindex_a, zindex_b))
    return -1;
  return 1;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movsd 0xad2e5(%rip), %xmm0    # 0x15e800
movsd %xmm0, 0x20(%rsp)
movsd 0xad2d7(%rip), %xmm0    # 0x15e800
movsd %xmm0, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
callq 0xb6d90
movq %rax, 0x30(%rsp)
movq (%rsp), %rdi
callq 0xb6d90
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0xb1588
movl $0x0, 0x54(%rsp)
jmp 0xb16ea
cmpq $0x0, 0x10(%rsp)
je 0xb15d6
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0xc2ea9(%rip), %rdx     # 0x17444a
leaq 0x20(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x49af0
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
leaq 0xc2e86(%rip), %rdx     # 0x17444a
leaq 0x18(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x49af0
movsd 0x20(%rsp), %xmm0
movsd 0xad21c(%rip), %xmm1    # 0x15e800
ucomisd %xmm1, %xmm0
jne 0xb1611
jp 0xb1611
movsd 0x18(%rsp), %xmm0
movsd 0xad206(%rip), %xmm1    # 0x15e800
ucomisd %xmm1, %xmm0
jne 0xb1604
jp 0xb1604
jmp 0xb1611
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0xb16ea
movsd 0x18(%rsp), %xmm0
movsd 0xad1e1(%rip), %xmm1    # 0x15e800
ucomisd %xmm1, %xmm0
jne 0xb164c
jp 0xb164c
movsd 0x20(%rsp), %xmm0
movsd 0xad1cb(%rip), %xmm1    # 0x15e800
ucomisd %xmm1, %xmm0
jne 0xb163f
jp 0xb163f
jmp 0xb164c
movl $0x1, 0x54(%rsp)
jmp 0xb16ea
movsd 0x20(%rsp), %xmm0
movsd 0xad1a6(%rip), %xmm1    # 0x15e800
ucomisd %xmm1, %xmm0
jne 0xb16a0
jp 0xb16a0
movsd 0x18(%rsp), %xmm0
movsd 0xad190(%rip), %xmm1    # 0x15e800
ucomisd %xmm1, %xmm0
jne 0xb16a0
jp 0xb16a0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xb850
cmpl $0x0, %eax
jge 0xb1696
movl $0x1, 0x54(%rsp)
jmp 0xb16ea
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0xb16ea
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x8c2d0
testb $0x1, %al
jne 0xb16b7
jmp 0xb16c1
movl $0x0, 0x54(%rsp)
jmp 0xb16ea
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x8c360
testb $0x1, %al
jne 0xb16d8
jmp 0xb16e2
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0xb16ea
movl $0x1, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)