// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/type_graph.c
// Function: gt_type_graph_add_stanza
void gt_type_graph_add_stanza(GtTypeGraph *type_graph,
                              const GtOBOStanza *stanza)
{
  const char *id_value, *name_value;
  GtUword i, size;
  GtTypeNode *node;
  GtStr *buf;
  gt_assert(type_graph && stanza && !type_graph->ready);
  gt_assert(gt_obo_stanza_size(stanza, "id") == 1);
  gt_assert(gt_obo_stanza_size(stanza, "name") == 1);
  id_value = gt_symbol(gt_obo_stanza_get_value(stanza, "id", 0));
  name_value = gt_symbol(gt_obo_stanza_get_value(stanza, "name", 0));
  gt_assert(id_value);
  gt_assert(name_value);
  gt_assert(!gt_hashmap_get(type_graph->nodemap, id_value));
  node = gt_type_node_new(gt_array_size(type_graph->nodes), id_value);
  gt_hashmap_add(type_graph->name2id, (char*) name_value, (char*) id_value);
  gt_hashmap_add(type_graph->id2name, (char*) id_value, (char*) name_value);
  gt_hashmap_add(type_graph->nodemap, (char*) id_value, node);
  gt_array_add(type_graph->nodes, node);
  buf = gt_str_new();
  /* store is_a entries in node, if necessary */
  if ((size = gt_obo_stanza_size(stanza, "is_a"))) {
    for (i = 0; i < size; i++) {
      const char *id = gt_obo_stanza_get_value(stanza, "is_a", i);
      gt_str_reset(buf);
      gt_str_append_cstr_nt(buf, id, strcspn(id, " \n"));
      gt_type_node_is_a_add(node, gt_symbol(gt_str_get(buf)));
    }
  }
  /* store part_of entries in node, if necessary */
  if ((size = gt_obo_stanza_size(stanza, "relationship"))) {
    for (i = 0; i < size; i++) {
      const char *rel = gt_obo_stanza_get_value(stanza, "relationship", i);
      gt_str_reset(buf);
      /* match part_of */
      if (!strncmp(rel, PART_OF, strlen(PART_OF))) {
        const char *part_of = rel + strlen(PART_OF) + 1;
        gt_str_append_cstr_nt(buf, part_of, strcspn(part_of, " \n"));
        gt_type_node_part_of_add(node, gt_symbol(gt_str_get(buf)));
        continue;
      }
      /* match member_of */
      if (!strncmp(rel, MEMBER_OF, strlen(MEMBER_OF))) {
        const char *member_of = rel + strlen(MEMBER_OF) + 1;
        gt_str_append_cstr_nt(buf, member_of, strcspn(member_of, " \n"));
        gt_type_node_part_of_add(node, gt_symbol(gt_str_get(buf)));
        continue;
      }
      /* match integral_part_of */
      if (!strncmp(rel, INTEGRAL_PART_OF, strlen(INTEGRAL_PART_OF))) {
        const char *integral_part_of = rel + strlen(INTEGRAL_PART_OF) + 1;
        gt_str_append_cstr_nt(buf, integral_part_of,
                              strcspn(integral_part_of, " \n"));
        gt_type_node_part_of_add(node, gt_symbol(gt_str_get(buf)));
      }
    }
  }
  gt_str_delete(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2a02bd
movq %rsi, %rbx
testq %rsi, %rsi
je 0x2a02bd
movq %rdi, %r14
cmpb $0x1, 0x30(%rdi)
je 0x2a02bd
leaq 0xdf5a3(%rip), %rsi     # 0x37f605
movq %rbx, %rdi
callq 0x2dfa81
cmpq $0x1, %rax
jne 0x2a02ea
leaq 0x82af0(%rip), %rsi     # 0x322b6b
movq %rbx, %rdi
callq 0x2dfa81
cmpq $0x1, %rax
jne 0x2a0317
leaq 0xdf571(%rip), %rsi     # 0x37f605
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2dfa24
movq %rax, %rdi
callq 0xaed4b
movq %rax, %r15
leaq 0x82abb(%rip), %rsi     # 0x322b6b
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2dfa24
movq %rax, %rdi
callq 0xaed4b
testq %r15, %r15
je 0x2a0341
movq %rax, %r12
testq %rax, %rax
je 0x2a036b
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x8f482
testq %rax, %rax
jne 0x2a0395
movq 0x18(%r14), %rdi
callq 0x586a4
movq %rax, %rdi
movq %r15, %rsi
callq 0x2a07bc
movq %rax, %r13
movq %rsp, %rbp
movq %rax, (%rbp)
movq (%r14), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x8f4bd
movq 0x8(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x8f4bd
movq 0x10(%r14), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x8f4bd
movq 0x18(%r14), %rdi
pushq $0x8
popq %rdx
movq %rbp, %rsi
callq 0x5851d
callq 0xacb84
movq %rax, %r15
leaq 0x97538(%rip), %rsi     # 0x33768c
movq %rbx, %rdi
callq 0x2dfa81
testq %rax, %rax
je 0x2a01cd
movq %rax, %r14
xorl %r12d, %r12d
leaq 0xc2547(%rip), %rbp     # 0x3626b5
cmpq %r12, %r14
je 0x2a01cd
movq %rbx, %rdi
leaq 0x9750f(%rip), %rsi     # 0x33768c
movq %r12, %rdx
callq 0x2dfa24
movq %rax, %r13
movq %r15, %rdi
callq 0xad357
movq %r13, %rdi
movq %rbp, %rsi
callq 0x17090
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xacd9e
movq (%rsp), %r13
movq %r15, %rdi
callq 0xad1fa
movq %rax, %rdi
callq 0xaed4b
movq %r13, %rdi
movq %rax, %rsi
callq 0x2a086b
incq %r12
jmp 0x2a016e
leaq 0xdf33d(%rip), %rsi     # 0x37f511
movq %rbx, %rdi
callq 0x2dfa81
testq %rax, %rax
je 0x2a02a6
movq %rax, %r12
xorl %r13d, %r13d
pushq $0x7
popq %rbp
cmpq %r13, %r12
je 0x2a02a6
movq %rbx, %rdi
leaq 0xdf310(%rip), %rsi     # 0x37f511
movq %r13, %rdx
callq 0x2dfa24
movq %rax, %r14
movq %r15, %rdi
callq 0xad357
movq %r14, %rdi
leaq 0x93da6(%rip), %rsi     # 0x333fc4
movq %rbp, %rdx
callq 0x17310
pushq $0x8
popq %rcx
testl %eax, %eax
je 0x2a025f
movq %r14, %rdi
leaq 0xdf2e7(%rip), %rsi     # 0x37f51e
pushq $0x9
popq %rdx
callq 0x17310
pushq $0xa
popq %rcx
testl %eax, %eax
je 0x2a025f
movq %r14, %rdi
leaq 0xdf2d8(%rip), %rsi     # 0x37f528
pushq $0x10
popq %rdx
callq 0x17310
pushq $0x11
popq %rcx
testl %eax, %eax
jne 0x2a029e
addq %rcx, %r14
movq %r14, %rdi
leaq 0xc2449(%rip), %rsi     # 0x3626b5
callq 0x17090
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xacd9e
movq (%rsp), %r14
movq %r15, %rdi
callq 0xad1fa
movq %rax, %rdi
callq 0xaed4b
movq %r14, %rdi
movq %rax, %rsi
callq 0x2a0995
incq %r13
jmp 0x2a01ee
movq %r15, %rdi
callq 0xae103
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x197ca4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x44d45(%rip), %rsi     # 0x2e5013
leaq 0xdf172(%rip), %rdx     # 0x37f447
leaq 0xdf196(%rip), %rcx     # 0x37f472
leaq 0xdf14a(%rip), %r8      # 0x37f42d
pushq $0x4c
jmp 0x2a03bd
movq 0x197c77(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x44d18(%rip), %rsi     # 0x2e5013
leaq 0xdf189(%rip), %rdx     # 0x37f48b
leaq 0xdf169(%rip), %rcx     # 0x37f472
leaq 0xdf11d(%rip), %r8      # 0x37f42d
pushq $0x4d
jmp 0x2a03bd
movq 0x197c4a(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x44ceb(%rip), %rsi     # 0x2e5013
leaq 0xdf182(%rip), %rdx     # 0x37f4b1
leaq 0xdf13c(%rip), %rcx     # 0x37f472
leaq 0xdf0f0(%rip), %r8      # 0x37f42d
pushq $0x4e
jmp 0x2a03bd
movq 0x197c20(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x44cc1(%rip), %rsi     # 0x2e5013
leaq 0xdf180(%rip), %rdx     # 0x37f4d9
leaq 0xdf112(%rip), %rcx     # 0x37f472
leaq 0xdf0c6(%rip), %r8      # 0x37f42d
pushq $0x51
jmp 0x2a03bd
movq 0x197bf6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x44c97(%rip), %rsi     # 0x2e5013
leaq 0x69135(%rip), %rdx     # 0x3094b8
leaq 0xdf0e8(%rip), %rcx     # 0x37f472
leaq 0xdf09c(%rip), %r8      # 0x37f42d
pushq $0x52
jmp 0x2a03bd
movq 0x197bcc(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x44c6d(%rip), %rsi     # 0x2e5013
leaq 0xdf135(%rip), %rdx     # 0x37f4e2
leaq 0xdf0be(%rip), %rcx     # 0x37f472
leaq 0xdf072(%rip), %r8      # 0x37f42d
pushq $0x53
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390