// File: /workspace/github_c_makefile_star2_O3/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 0x303090
movq %rsi, %rbx
testq %rsi, %rsi
je 0x303090
movq %rdi, %r14
cmpb $0x1, 0x30(%rdi)
je 0x303090
leaq 0xdc40b(%rip), %rsi     # 0x3df235
movq %rbx, %rdi
callq 0x340798
cmpq $0x1, %rax
jne 0x303095
leaq 0x7f91c(%rip), %rsi     # 0x38275f
movq %rbx, %rdi
callq 0x340798
cmpq $0x1, %rax
jne 0x30309a
leaq 0xdc3d9(%rip), %rsi     # 0x3df235
movq %rbx, %rdi
xorl %edx, %edx
callq 0x34076c
movq %rax, %rdi
callq 0x11c5ff
movq %rax, %r15
leaq 0x7f8e7(%rip), %rsi     # 0x38275f
movq %rbx, %rdi
xorl %edx, %edx
callq 0x34076c
movq %rax, %rdi
callq 0x11c5ff
testq %r15, %r15
je 0x30309f
movq %rax, %r12
testq %rax, %rax
je 0x3030a4
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x100add
testq %rax, %rax
jne 0x3030a9
movq 0x18(%r14), %rdi
callq 0xd24e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x303364
movq %rax, %r13
movq %rsp, %rbp
movq %rax, (%rbp)
movq (%r14), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x100b18
movq 0x8(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x100b18
movq 0x10(%r14), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x100b18
movq 0x18(%r14), %rdi
movl $0x8, %edx
movq %rbp, %rsi
callq 0xd2410
callq 0x11ac6c
movq %rax, %r14
leaq 0x94415(%rip), %rsi     # 0x397333
movq %rbx, %rdi
callq 0x340798
testq %rax, %rax
je 0x302f95
movq %rax, %r15
xorl %r12d, %r12d
leaq 0xbf36d(%rip), %rbp     # 0x3c22a5
movq %rbx, %rdi
leaq 0x943f1(%rip), %rsi     # 0x397333
movq %r12, %rdx
callq 0x34076c
movq %rax, %r13
movq %r14, %rdi
callq 0x11b132
movq %r13, %rdi
movq %rbp, %rsi
callq 0x170a0
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x11ae1b
movq (%rsp), %r13
movq %r14, %rdi
callq 0x11b0a1
movq %rax, %rdi
callq 0x11c5ff
movq %r13, %rdi
movq %rax, %rsi
callq 0x3033ea
incq %r12
cmpq %r12, %r15
jne 0x302f38
leaq 0xdc1a5(%rip), %rsi     # 0x3df141
movq %rbx, %rdi
callq 0x340798
testq %rax, %rax
je 0x303079
movq %rax, %r15
xorl %r12d, %r12d
leaq 0x90c9b(%rip), %rbp     # 0x393c55
movq %rbx, %rdi
leaq 0xdc17d(%rip), %rsi     # 0x3df141
movq %r12, %rdx
callq 0x34076c
movq %rax, %r13
movq %r14, %rdi
callq 0x11b132
movl $0x7, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x17330
testl %eax, %eax
je 0x303022
movl $0x9, %edx
movq %r13, %rdi
leaq 0xdc154(%rip), %rsi     # 0x3df14e
callq 0x17330
testl %eax, %eax
je 0x303029
movl $0x10, %edx
movq %r13, %rdi
leaq 0xdc146(%rip), %rsi     # 0x3df158
callq 0x17330
testl %eax, %eax
jne 0x30306d
movl $0x11, %eax
jmp 0x30302e
movl $0x8, %eax
jmp 0x30302e
movl $0xa, %eax
addq %rax, %r13
movq %r13, %rdi
leaq 0xbf26a(%rip), %rsi     # 0x3c22a5
callq 0x170a0
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x11ae1b
movq (%rsp), %r13
movq %r14, %rdi
callq 0x11b0a1
movq %rax, %rdi
callq 0x11c5ff
movq %r13, %rdi
movq %rax, %rsi
callq 0x30348e
incq %r12
cmpq %r12, %r15
jne 0x302fba
movq %r14, %rdi
callq 0x11bdbf
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x8d023
callq 0x8cf10
callq 0x8cf47
callq 0x8cfec
callq 0x8cfb5
callq 0x8cf7e