// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: process_node
static int process_node(GtDiagram *d, GtFeatureNode *node,
                        GtFeatureNode *parent, GtError *err)
{
  GtRange elem_range;
  bool *collapse;
  GtShouldGroupByParent *group;
  const char *feature_type = NULL,
             *parent_gft = NULL;
  double tmp;
  GtStyleQueryStatus rval;
  GtUword max_show_width = GT_UNDEF_UWORD,
                par_max_show_width = GT_UNDEF_UWORD;

  gt_assert(d && node);

  gt_log_log(">> getting '%s'", gt_feature_node_get_type(node));

  /* skip pseudonodes */
  if (gt_feature_node_is_pseudo(node))
    return 0;

  feature_type = gt_feature_node_get_type(node);
  gt_assert(feature_type);

  /* discard elements that do not overlap with visible range */
  elem_range = gt_genome_node_get_range((GtGenomeNode*) node);
  if (!gt_range_overlap(&d->range, &elem_range))
    return 0;

  /* get maximal view widths in nucleotides to show this type */
  rval = gt_style_get_num(d->style, feature_type, "max_show_width", &tmp, NULL,
                          err);
  switch (rval) {
    case GT_STYLE_QUERY_OK:
      max_show_width = tmp;
      break;
    case GT_STYLE_QUERY_ERROR:
      return -1;
      break; /* should never be reached */
    default:
      /* do not change default value */
      break;
  }

  /* for non-root nodes, get maximal view with to show parent */
  if (parent)
  {
    if (!gt_feature_node_is_pseudo(parent))
    {
      parent_gft = gt_feature_node_get_type(parent);
      rval = gt_style_get_num(d->style,
                              parent_gft, "max_show_width",
                              &tmp, NULL, err);
      switch (rval) {
        case GT_STYLE_QUERY_OK:
          par_max_show_width = tmp;
          break;
        case GT_STYLE_QUERY_ERROR:
          return -1;
          break; /* should never be reached */
        default:
          /* do not change default value */
          break;
      }
    } else
      par_max_show_width = GT_UNDEF_UWORD;
  }

  /* check if this type is to be displayed at all */
  if (max_show_width != GT_UNDEF_UWORD &&
      gt_range_length(&d->range) > max_show_width)
  {
    return 0;
  }

  /* disregard parent node if it is configured not to be shown */
  if (parent
        && par_max_show_width != GT_UNDEF_UWORD
        && gt_range_length(&d->range) > par_max_show_width)
  {
    parent = NULL;
  }

  /* check if this is a collapsing type, cache result */
  if ((collapse = (bool*) gt_hashmap_get(d->collapsingtypes,
                                         feature_type)) == NULL)
  {
    collapse = gt_malloc(sizeof (bool));
    *collapse = false;
    if (gt_style_get_bool(d->style, feature_type, "collapse_to_parent",
                           collapse, NULL, err) == GT_STYLE_QUERY_ERROR) {
      gt_free(collapse);
      return -1;
    }
    gt_hashmap_add(d->collapsingtypes, (void*) feature_type, collapse);
  }

  /* check if type should be grouped by parent, cache result */
  if ((group = (GtShouldGroupByParent*) gt_hashmap_get(d->groupedtypes,
                                                       feature_type)) == NULL)
  {
    bool tmp;
    group = gt_malloc(sizeof (GtShouldGroupByParent));
    rval = gt_style_get_bool(d->style, feature_type, "group_by_parent",
                             &tmp, NULL, err);
    switch (rval) {
      case GT_STYLE_QUERY_OK:
        if (tmp)
          *group = GT_GROUP_BY_PARENT;
        else
          *group = GT_DO_NOT_GROUP_BY_PARENT;
        break;
      case GT_STYLE_QUERY_NOT_SET:
        *group = GT_UNDEFINED_GROUPING;
        break;
      case GT_STYLE_QUERY_ERROR:
        gt_free(group);
        return -1;
        break; /* should never be reached */
    }
    gt_hashmap_add(d->groupedtypes, (void*) feature_type, group);
  }

  /* decide where to place this feature: */
  if (*collapse)
  {
    /* user has specified collapsing to parent for this type */
    if (parent && !gt_feature_node_is_pseudo(parent)) {
      /* collapsing child nodes are added to upwards blocks,
         but never collapse into pseudo nodes */
      add_recursive(d, node, parent, node);
    } else {
      /* if no parent or only pseudo-parent, do not collapse */
      if (add_to_current(d, node, parent, err) < 0) {
        return -1;
      }
    }
  }
  else  /* (!*collapse) */
  {
    if (parent) {
      bool do_not_overlap = false;
      do_not_overlap = gt_feature_node_direct_children_do_not_overlap_st(parent,
                                                                         node);
      if (*group == GT_GROUP_BY_PARENT
          || (do_not_overlap && *group == GT_UNDEFINED_GROUPING))
      {
        if (gt_feature_node_is_pseudo(parent)
              && gt_feature_node_is_multi(node))
        {
          if (add_to_rep(d, node, parent, err) < 0) {
            return -1;
          }
        } else if
            (gt_feature_node_number_of_children(parent) > 1)
        {
          if (add_to_parent(d, node, parent, err) < 0) {
            return -1;
          }
        } else {
          if (add_to_current(d, node, parent, err) < 0) {
            return -1;
          }
        }
      } else {
        if (gt_feature_node_is_pseudo(parent)
              && gt_feature_node_is_multi(node))
        {
          if (add_to_rep(d, node, parent, err) < 0) {
            return -1;
          }
        } else {
          if (add_to_current(d, node, parent, err) < 0) {
            return -1;
          }
        }
      }
    } else {
      /* root nodes always get their own block */
      if (add_to_current(d, node, parent, err) < 0) {
        return -1;
      }
    }
  }

  /* we can now assume that this node has been processed into the reverse
     lookup structure */
#ifndef NDEBUG
  if (!gt_feature_node_is_multi(node))
    gt_assert(gt_hashmap_get(d->nodeinfo, node));
#endif

  return 0;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq $-0x1, 0x28(%rsp)
movq $-0x1, 0x20(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0x3c74b
cmpq $0x0, 0x80(%rsp)
jne 0x3c783
movq 0x177886(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x12190a(%rip), %rsi    # 0x15e066
leaq 0x12b3aa(%rip), %rdx    # 0x167b0d
leaq 0x12b3ad(%rip), %rcx    # 0x167b17
leaq 0x12b1e6(%rip), %r8     # 0x167957
movl $0x1ba, %r9d            # imm = 0x1BA
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x3c785
movq 0x80(%rsp), %rdi
callq 0x211d0
movq %rax, %rsi
leaq 0x12b388(%rip), %rdi    # 0x167b24
movb $0x0, %al
callq 0xc930
movq 0x80(%rsp), %rdi
callq 0x21880
testb $0x1, %al
jne 0x3c7b6
jmp 0x3c7c6
movl $0x0, 0x94(%rsp)
jmp 0x3cec8
movq 0x80(%rsp), %rdi
callq 0x211d0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x3c818
movq 0x1777f1(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x121875(%rip), %rsi    # 0x15e066
leaq 0x13e55a(%rip), %rdx    # 0x17ad52
leaq 0x12b318(%rip), %rcx    # 0x167b17
leaq 0x12b151(%rip), %r8     # 0x167957
movl $0x1c3, %r9d            # imm = 0x1C3
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x3c81a
movq 0x80(%rsp), %rdi
callq 0x259f0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x88(%rsp), %rdi
addq $0x40, %rdi
leaq 0x60(%rsp), %rsi
callq 0x93c40
testb $0x1, %al
jne 0x3c86f
movl $0x0, 0x94(%rsp)
jmp 0x3cec8
movq 0x88(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x70(%rsp), %r9
leaq 0x12b2a8(%rip), %rdx    # 0x167b34
xorl %eax, %eax
movl %eax, %r8d
leaq 0x38(%rsp), %rcx
callq 0x49af0
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x8(%rsp)
testl %eax, %eax
je 0x3c8b8
jmp 0x3c8ad
movl 0x8(%rsp), %eax
subl $0x2, %eax
je 0x3c8eb
jmp 0x3c8fb
movsd 0x38(%rsp), %xmm0
movsd 0x12b062(%rip), %xmm2   # 0x167928
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x28(%rsp)
jmp 0x3c8fd
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
jmp 0x3c8fd
cmpq $0x0, 0x78(%rsp)
je 0x3c9c5
movq 0x78(%rsp), %rdi
callq 0x21880
testb $0x1, %al
jne 0x3c9ba
movq 0x78(%rsp), %rdi
callq 0x211d0
movq %rax, 0x40(%rsp)
movq 0x88(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x40(%rsp), %rsi
movq 0x70(%rsp), %r9
leaq 0x12b1ed(%rip), %rdx    # 0x167b34
xorl %eax, %eax
movl %eax, %r8d
leaq 0x38(%rsp), %rcx
callq 0x49af0
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x3c973
jmp 0x3c968
movl 0x4(%rsp), %eax
subl $0x2, %eax
je 0x3c9a6
jmp 0x3c9b6
movsd 0x38(%rsp), %xmm0
movsd 0x12afa7(%rip), %xmm2   # 0x167928
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x3c9b8
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
jmp 0x3c9b8
jmp 0x3c9c3
movq $-0x1, 0x20(%rsp)
jmp 0x3c9c5
cmpq $-0x1, 0x28(%rsp)
je 0x3c9f5
movq 0x88(%rsp), %rdi
addq $0x40, %rdi
callq 0x93bd0
cmpq 0x28(%rsp), %rax
jbe 0x3c9f5
movl $0x0, 0x94(%rsp)
jmp 0x3cec8
cmpq $0x0, 0x78(%rsp)
je 0x3ca26
cmpq $-0x1, 0x20(%rsp)
je 0x3ca26
movq 0x88(%rsp), %rdi
addq $0x40, %rdi
callq 0x93bd0
cmpq 0x20(%rsp), %rax
jbe 0x3ca26
movq $0x0, 0x78(%rsp)
movq 0x88(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x48(%rsp), %rsi
callq 0x86470
movq %rax, 0x58(%rsp)
cmpq $0x0, %rax
jne 0x3cae0
movl $0x1, %edi
leaq 0x12af00(%rip), %rsi    # 0x167957
movl $0x204, %edx            # imm = 0x204
callq 0xd2e0
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movb $0x0, (%rax)
movq 0x88(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x58(%rsp), %rcx
movq 0x70(%rsp), %r9
leaq 0x12b0b3(%rip), %rdx    # 0x167b43
xorl %eax, %eax
movl %eax, %r8d
callq 0x4a140
cmpl $0x2, %eax
jne 0x3cac5
movq 0x58(%rsp), %rdi
leaq 0x12aeac(%rip), %rsi    # 0x167957
movl $0x208, %edx            # imm = 0x208
callq 0xdab0
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
movq 0x88(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x86510
movq 0x88(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x48(%rsp), %rsi
callq 0x86470
movq %rax, 0x50(%rsp)
cmpq $0x0, %rax
jne 0x3cbe0
leaq 0x12ae4b(%rip), %rsi    # 0x167957
movl $0x4, %edi
movl $0x213, %edx            # imm = 0x213
callq 0xd2e0
movq %rax, 0x50(%rsp)
movq 0x88(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x70(%rsp), %r9
leaq 0x12b019(%rip), %rdx    # 0x167b56
xorl %eax, %eax
movl %eax, %r8d
leaq 0xf(%rsp), %rcx
callq 0x4a140
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, (%rsp)
testl %eax, %eax
je 0x3cb71
jmp 0x3cb5d
movl (%rsp), %eax
subl $0x1, %eax
je 0x3cb92
jmp 0x3cb67
movl (%rsp), %eax
subl $0x2, %eax
je 0x3cb9f
jmp 0x3cbc5
testb $0x1, 0xf(%rsp)
je 0x3cb85
movq 0x50(%rsp), %rax
movl $0x1, (%rax)
jmp 0x3cb90
movq 0x50(%rsp), %rax
movl $0x0, (%rax)
jmp 0x3cbc5
movq 0x50(%rsp), %rax
movl $0x2, (%rax)
jmp 0x3cbc5
movq 0x50(%rsp), %rdi
leaq 0x12adac(%rip), %rsi    # 0x167957
movl $0x221, %edx            # imm = 0x221
callq 0xdab0
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
movq 0x88(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x86510
movq 0x58(%rsp), %rax
testb $0x1, (%rax)
je 0x3cc5f
cmpq $0x0, 0x78(%rsp)
je 0x3cc24
movq 0x78(%rsp), %rdi
callq 0x21880
testb $0x1, %al
jne 0x3cc24
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
callq 0x3d010
jmp 0x3cc5a
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x3d210
cmpl $0x0, %eax
jge 0x3cc58
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
jmp 0x3cc5a
jmp 0x3ce4f
cmpq $0x0, 0x78(%rsp)
je 0x3ce1a
movb $0x0, 0xe(%rsp)
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x24230
andb $0x1, %al
movb %al, 0xe(%rsp)
movq 0x50(%rsp), %rax
cmpl $0x1, (%rax)
je 0x3ccab
testb $0x1, 0xe(%rsp)
je 0x3cd87
movq 0x50(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x3cd87
movq 0x78(%rsp), %rdi
callq 0x21880
testb $0x1, %al
jne 0x3ccbb
jmp 0x3cd04
movq 0x80(%rsp), %rdi
callq 0x217b0
testb $0x1, %al
jne 0x3ccce
jmp 0x3cd04
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x3d490
cmpl $0x0, %eax
jge 0x3cd02
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
jmp 0x3cd82
movq 0x78(%rsp), %rdi
callq 0x238a0
cmpq $0x1, %rax
jbe 0x3cd4a
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x3d6e0
cmpl $0x0, %eax
jge 0x3cd48
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
jmp 0x3cd80
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x3d210
cmpl $0x0, %eax
jge 0x3cd7e
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
jmp 0x3cd80
jmp 0x3cd82
jmp 0x3ce18
movq 0x78(%rsp), %rdi
callq 0x21880
testb $0x1, %al
jne 0x3cd97
jmp 0x3cde0
movq 0x80(%rsp), %rdi
callq 0x217b0
testb $0x1, %al
jne 0x3cdaa
jmp 0x3cde0
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x3d490
cmpl $0x0, %eax
jge 0x3cdde
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
jmp 0x3ce16
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x3d210
cmpl $0x0, %eax
jge 0x3ce14
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
jmp 0x3ce16
jmp 0x3ce18
jmp 0x3ce4d
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x3d210
cmpl $0x0, %eax
jge 0x3ce4b
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x3cec8
jmp 0x3ce4d
jmp 0x3ce4f
movq 0x80(%rsp), %rdi
callq 0x217b0
testb $0x1, %al
jne 0x3cebd
jmp 0x3ce62
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x80(%rsp), %rsi
callq 0x86470
cmpq $0x0, %rax
jne 0x3ceb9
movq 0x177150(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1211d4(%rip), %rsi    # 0x15e066
leaq 0x12accd(%rip), %rdx    # 0x167b66
leaq 0x12ac77(%rip), %rcx    # 0x167b17
leaq 0x12aab0(%rip), %r8     # 0x167957
movl $0x26a, %r9d            # imm = 0x26A
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x3cebb
jmp 0x3cebd
movl $0x0, 0x94(%rsp)
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq
nopw (%rax,%rax)