// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/type_node.c
// Function: gt_type_node_has_parent
bool gt_type_node_has_parent(GtTypeNode *node, GtTypeNode *pnode,
                             GtBoolMatrix *part_of_out_edges,
                             GtBoolMatrix *part_of_in_edges,
                             GtArray *node_list, GtHashmap *id2name,
                             unsigned int indentlevel)
{
  GtTypeNode *parent;
  GtUword i;
  bool *result;
  gt_assert(node && pnode);
  gt_log_log("%*scheck if node %s has parent %s", indentlevel * 2, "",
             (const char*) gt_hashmap_get(id2name, node->id),
             (const char*) gt_hashmap_get(id2name, pnode->id));

  /* try cache */
  if (node->cache) {
    if ((result = gt_hashmap_get(node->cache, pnode->id))) {
      gt_log_log("%*sreturn %s (cache hit)", indentlevel * 2, "",
                 *result ?  "true" : "false");
      return *result;
    }
  }
  else
    node->cache = gt_hashmap_new(GT_HASH_DIRECT, NULL, gt_free_func);
  result = gt_malloc(sizeof (bool));

  /* no cache hit found */
  if (node->id == pnode->id) {
    *result = true;
    gt_hashmap_add(node->cache, (char*) pnode->id, result);
    gt_log_log("%*sreturn true", indentlevel * 2, "");
    return true;
  }
  /* create transitive part_of edges for the parent, if they have not been
     created already */
  if (!pnode->transitive_edges_created) {
    GtArray *node_stack;
    node_stack = gt_array_new(sizeof (GtTypeNode*));
    create_transitive_part_of_edges(pnode, part_of_out_edges, part_of_in_edges,
                                    node_stack);
    gt_assert(!gt_array_size(node_stack));
    gt_array_delete(node_stack);
    pnode->transitive_edges_created = true;
  }
  /* traversal of part_of out edges */
  for (i  = gt_bool_matrix_get_first_column(part_of_out_edges, node->num);
       i != gt_bool_matrix_get_last_column(part_of_out_edges, node->num);
       i  = gt_bool_matrix_get_next_column(part_of_out_edges, node->num, i)) {
    parent = *(GtTypeNode**) gt_array_get(node_list, i);
    if (gt_type_node_has_parent(parent, pnode, part_of_out_edges,
                                part_of_in_edges, node_list, id2name,
                                indentlevel + 1)) {
      *result = true;
      gt_hashmap_add(node->cache, (char*) pnode->id, result);
      gt_log_log("%*sreturn true", indentlevel * 2, "");
      return true;
    }
  }
  /* traversal of is_a out edges */
  for (i = 0; i < gt_array_size(node->is_a_out_edges); i++) {
    parent = *(GtTypeNode**) gt_array_get(node->is_a_out_edges, i);
    if (gt_type_node_has_parent(parent, pnode, part_of_out_edges,
                                part_of_in_edges, node_list, id2name,
                                indentlevel + 1)) {
      *result = true;
      gt_hashmap_add(node->cache, (char*) pnode->id, result);
      gt_log_log("%*sreturn true", indentlevel * 2, "");
      return true;
    }
  }
  /* no result found */
  *result = false;
  gt_hashmap_add(node->cache, (char*) pnode->id, result);
  gt_log_log("%*sreturn false", indentlevel * 2, "");
  return false;
}

// Assembly:
subq $0x88, %rsp
movl 0x90(%rsp), %eax
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movq %r8, 0x58(%rsp)
movq %r9, 0x50(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x49a67c
cmpq $0x0, 0x70(%rsp)
jne 0x49a6b4
movq 0x1a191d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x7b986(%rip), %rsi     # 0x516013
leaq 0x11a1aa(%rip), %rdx    # 0x5b483e
leaq 0x11a1b1(%rip), %rcx    # 0x5b484c
leaq 0x11a034(%rip), %r8     # 0x5b46d6
movl $0xaa, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x49a6b6
movl 0x90(%rsp), %eax
shll %eax
movl %eax, 0x24(%rsp)
movq 0x50(%rsp), %rdi
movq 0x78(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0xe0f20
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0xe0f20
movl 0x24(%rsp), %esi
movq 0x28(%rsp), %rcx
movq %rax, %r8
leaq 0x11a163(%rip), %rdi    # 0x5b4864
leaq 0x102f20(%rip), %rdx    # 0x59d628
movb $0x0, %al
callq 0xe7740
movq 0x78(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x49a78e
movq 0x78(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0xe0f20
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x49a78c
movl 0x90(%rsp), %esi
shll %esi
movq 0x38(%rsp), %rax
movb (%rax), %dl
leaq 0xbe60f(%rip), %rcx     # 0x558d63
leaq 0x11a14e(%rip), %rax    # 0x5b48a9
testb $0x1, %dl
cmovneq %rax, %rcx
leaq 0x11a11d(%rip), %rdi    # 0x5b4886
leaq 0x102eb8(%rip), %rdx    # 0x59d628
movb $0x0, %al
callq 0xe7740
movq 0x38(%rsp), %rax
movb (%rax), %al
andb $0x1, %al
movb %al, 0x87(%rsp)
jmp 0x49aaef
jmp 0x49a7ac
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
leaq -0x3b1d6b(%rip), %rdx   # 0xe8a30
callq 0xe0c40
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x28(%rax)
movl $0x1, %edi
leaq 0x119f1e(%rip), %rsi    # 0x5b46d6
movl $0xb9, %edx
callq 0xe80f0
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x70(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x49a82a
movq 0x38(%rsp), %rax
movb $0x1, (%rax)
movq 0x78(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x38(%rsp), %rdx
callq 0xe0fc0
movl 0x90(%rsp), %esi
shll %esi
leaq 0x11a090(%rip), %rdi    # 0x5b489f
leaq 0x102e12(%rip), %rdx    # 0x59d628
movb $0x0, %al
callq 0xe7740
movb $0x1, 0x87(%rsp)
jmp 0x49aaef
movq 0x70(%rsp), %rax
testb $0x1, 0x30(%rax)
jne 0x49a8be
movl $0x8, %edi
callq 0x80990
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0x49ab00
movq 0x30(%rsp), %rdi
callq 0x81370
cmpq $0x0, %rax
je 0x49a8a9
movq 0x1a1728(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x7b791(%rip), %rsi     # 0x516013
leaq 0x11a025(%rip), %rdx    # 0x5b48ae
leaq 0x119fbc(%rip), %rcx    # 0x5b484c
leaq 0x119e3f(%rip), %r8     # 0x5b46d6
movl $0xc9, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x49a8ab
movq 0x30(%rsp), %rdi
callq 0x81f80
movq 0x70(%rsp), %rax
movb $0x1, 0x30(%rax)
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rax
movq (%rax), %rsi
callq 0x50ade0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rax
movq (%rax), %rsi
callq 0x50aea0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
je 0x49a9c1
movq 0x58(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x80b60
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x50(%rsp), %r9
movl 0x90(%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
callq 0x49a640
testb $0x1, %al
jne 0x49a94f
jmp 0x49a99e
movq 0x38(%rsp), %rax
movb $0x1, (%rax)
movq 0x78(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x38(%rsp), %rdx
callq 0xe0fc0
movl 0x90(%rsp), %esi
shll %esi
leaq 0x119f1c(%rip), %rdi    # 0x5b489f
leaq 0x102c9e(%rip), %rdx    # 0x59d628
movb $0x0, %al
callq 0xe7740
movb $0x1, 0x87(%rsp)
jmp 0x49aaef
jmp 0x49a9a0
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rax
movq (%rax), %rsi
movq 0x40(%rsp), %rdx
callq 0x50af60
movq %rax, 0x40(%rsp)
jmp 0x49a8d5
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x81370
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x49aaa5
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x80b60
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x50(%rsp), %r9
movl 0x90(%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
callq 0x49a640
testb $0x1, %al
jne 0x49aa44
jmp 0x49aa90
movq 0x38(%rsp), %rax
movb $0x1, (%rax)
movq 0x78(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x38(%rsp), %rdx
callq 0xe0fc0
movl 0x90(%rsp), %esi
shll %esi
leaq 0x119e27(%rip), %rdi    # 0x5b489f
leaq 0x102ba9(%rip), %rdx    # 0x59d628
movb $0x0, %al
callq 0xe7740
movb $0x1, 0x87(%rsp)
jmp 0x49aaef
jmp 0x49aa92
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x49a9ca
movq 0x38(%rsp), %rax
movb $0x0, (%rax)
movq 0x78(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x38(%rsp), %rdx
callq 0xe0fc0
movl 0x90(%rsp), %esi
shll %esi
leaq 0x119df0(%rip), %rdi    # 0x5b48c9
leaq 0x102b48(%rip), %rdx    # 0x59d628
movb $0x0, %al
callq 0xe7740
movb $0x0, 0x87(%rsp)
movb 0x87(%rsp), %al
andb $0x1, %al
addq $0x88, %rsp
retq