// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/anno_db_gfflike.c
// Function: anno_db_gfflike_build
GtFeatureIndex* anno_db_gfflike_build(GtAnnoDBSchema *schema, GtRDB *db,
                                      GtError *err)
{
  int had_err = 0;
  GtFeatureIndex *fi = NULL;
  GtFeatureIndexGFFlike *fis;
  GtAnnoDBGFFlike *adg;
  ObserverCallbackInfo *oci;
  gt_assert(schema && db);
  gt_error_check(err);

  adg = anno_db_gfflike_cast(schema);
  had_err = gt_rdb_accept(db, adg->visitor, err);

  if (!had_err) {
    fi = gt_feature_index_create(feature_index_gfflike_class());
    fis = feature_index_gfflike_cast(fi);
    fis->obs = gt_feature_node_observer_new();
    fis->obs->data = oci = gt_calloc(1, sizeof (ObserverCallbackInfo));
    fis->node_to_parent_array = gt_hashmap_new(GT_HASH_DIRECT, NULL,
                                               (GtFree) gt_array_delete);
    fis->cache_node2id = node_ul_gt_hashmap_new();
    fis->cache_id2node = ul_node_gt_hashmap_new();
    fis->string_caches = gt_hashmap_new(GT_HASH_DIRECT,
                                        NULL,
                                        (GtFree) gt_hashmap_delete);
    fis->seqid_cache = gt_hashmap_new(GT_HASH_STRING, NULL,
                                      (GtFree) gt_str_delete);
    fis->ref_nodes   = gt_hashmap_new(GT_HASH_DIRECT, (GtFree) delete_ref_node,
                                      NULL);
    fis->source_cache = gt_hashmap_new(GT_HASH_STRING, NULL,
                                       (GtFree) gt_str_delete);
    fis->dblock = gt_mutex_new();

    /* set up callbacks */
    oci->fis = fis;
    fis->changed = gt_hashmap_new(GT_HASH_DIRECT, NULL, NULL);
    fis->deleted = gt_hashmap_new(GT_HASH_DIRECT, NULL, NULL);
    fis->added = gt_hashmap_new(GT_HASH_DIRECT, NULL, NULL);
    oci->had_err = 0;
    oci->err = err;
    fis->obs->deleted = NULL;
    fis->obs->score_changed = node_score_changed_callback;
    fis->obs->strand_changed = node_strand_changed_callback;
    fis->obs->phase_changed = node_phase_changed_callback;
    fis->obs->attribute_changed = node_attribute_change_callback;
    fis->obs->attribute_deleted = node_attribute_delete_callback;
    fis->obs->child_added = node_child_add_callback;
    fis->db = gt_rdb_ref(db);

    if (prepstmt_init(fis, err)) {
      gt_feature_index_delete(fi);
      fi = NULL;
    }
  }
  return fi;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
testq %rdi, %rdi
je 0x12a207
movq %rsi, %r12
testq %rsi, %rsi
je 0x12a207
movq %rdx, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x129b18
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x12a20c
callq 0x128a5f
movq %rax, %rdi
movq %r14, %rsi
callq 0x12b62b
movq 0x18(%rax), %rsi
movq %r12, %rdi
movq %rbx, %rdx
callq 0x174035
testl %eax, %eax
jne 0x12a1f2
callq 0x128b66
movq %rax, %rdi
callq 0x1478b9
movq %rax, %r14
callq 0x128b66
movq %rax, %rdi
movq %r14, %rsi
callq 0x147fb4
movq %rax, %r15
callq 0x14b400
movq %rax, 0x160(%r15)
leaq 0x254911(%rip), %rdx    # 0x37e486
movl $0x1, %edi
movl $0x18, %esi
movl $0x79e, %ecx            # imm = 0x79E
callq 0x1093ef
movq %rax, %r13
movq 0x160(%r15), %rax
movq %r13, 0x60(%rax)
leaq -0x54caa(%rip), %rdx    # 0xd4ef4
xorl %edi, %edi
xorl %esi, %esi
callq 0x105830
movq %rax, 0x10(%r15)
movups 0x39b536(%rip), %xmm0   # 0x4c50e8
movups %xmm0, 0x20(%rsp)
movups 0x39b51a(%rip), %xmm0   # 0x4c50d8
movups %xmm0, 0x10(%rsp)
movups 0x39b4fe(%rip), %xmm0   # 0x4c50c8
movups %xmm0, (%rsp)
callq 0x1060b4
movq %rax, 0x50(%r15)
movups 0x39b53a(%rip), %xmm0   # 0x4c5118
movups %xmm0, 0x20(%rsp)
movups 0x39b51e(%rip), %xmm0   # 0x4c5108
movups %xmm0, 0x10(%rsp)
movups 0x39b502(%rip), %xmm0   # 0x4c50f8
movups %xmm0, (%rsp)
callq 0x1060b4
movq %rax, 0x58(%r15)
leaq -0x23c8d(%rip), %rdx    # 0x105f7d
xorl %edi, %edi
xorl %esi, %esi
callq 0x105830
movq %rax, 0x28(%r15)
leaq -0x811b(%rip), %rbp     # 0x121b03
movl $0x1, %edi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x105830
movq %rax, 0x18(%r15)
leaq 0x5de(%rip), %rsi       # 0x12a216
xorl %edi, %edi
xorl %edx, %edx
callq 0x105830
movq %rax, 0x30(%r15)
movl $0x1, %edi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x105830
movq %rax, 0x20(%r15)
callq 0x12260a
movq %rax, 0x170(%r15)
movq %r15, 0x8(%r13)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x105830
movq %rax, 0x48(%r15)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x105830
movq %rax, 0x40(%r15)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x105830
movq %rax, 0x38(%r15)
movl $0x0, 0x10(%r13)
movq %rbx, (%r13)
movq 0x160(%r15), %rax
movq $0x0, 0x58(%rax)
leaq 0x569(%rip), %rcx       # 0x12a220
movq %rcx, (%rax)
leaq 0x5a8(%rip), %rcx       # 0x12a269
movq %rcx, 0x10(%rax)
leaq 0x5dc(%rip), %rcx       # 0x12a2a8
movq %rcx, 0x8(%rax)
leaq 0x610(%rip), %rcx       # 0x12a2e7
movq %rcx, 0x28(%rax)
leaq 0x64e(%rip), %rcx       # 0x12a330
movq %rcx, 0x30(%rax)
leaq 0x68c(%rip), %rcx       # 0x12a379
movq %rcx, 0x50(%rax)
movq %r12, %rdi
callq 0x173f9b
movq %rax, 0x168(%r15)
testq %r15, %r15
je 0x12a211
leaq 0x255ab8(%rip), %rsi    # 0x37f7c8
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x70(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255ac1(%rip), %rsi    # 0x37f7fc
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x78(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255ac6(%rip), %rsi    # 0x37f829
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x88(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255ae7(%rip), %rsi    # 0x37f875
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x90(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255b02(%rip), %rsi    # 0x37f8bb
movl $0x3, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x98(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255b27(%rip), %rsi    # 0x37f90b
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x60(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255b2d(%rip), %rsi    # 0x37f939
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x68(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255b2e(%rip), %rsi    # 0x37f962
movl $0x2, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x80(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255b25(%rip), %rsi    # 0x37f984
movl $0xc, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xa0(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255ba9(%rip), %rsi    # 0x37fa33
movl $0x4, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xa8(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255bc1(%rip), %rsi    # 0x37fa76
movl $0x3, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xb8(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255bda(%rip), %rsi    # 0x37faba
movl $0x3, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xc8(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255d3e(%rip), %rsi    # 0x37fc49
xorl %edx, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xc0(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255e64(%rip), %rsi    # 0x37fd97
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xd0(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255e73(%rip), %rsi    # 0x37fdd1
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xd8(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255e78(%rip), %rsi    # 0x37fe01
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xe0(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255e84(%rip), %rsi    # 0x37fe38
xorl %edx, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xe8(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255e95(%rip), %rsi    # 0x37fe71
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xf0(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x255fd7(%rip), %rsi    # 0x37ffde
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0xf8(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x256001(%rip), %rsi    # 0x380033
xorl %edx, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x100(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x256011(%rip), %rsi    # 0x38006b
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x108(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x256009(%rip), %rsi    # 0x38008e
movl $0x2, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x118(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x256015(%rip), %rsi    # 0x3800c5
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x120(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x25600f(%rip), %rsi    # 0x3800ea
movl $0x2, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x128(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x256010(%rip), %rsi    # 0x380116
movl $0x2, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x130(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x256012(%rip), %rsi    # 0x380143
movl $0x2, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x138(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x256013(%rip), %rsi    # 0x38016f
movl $0x3, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x140(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x256030(%rip), %rsi    # 0x3801b3
movl $0x2, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x148(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x256044(%rip), %rsi    # 0x3801ee
movl $0x1, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x150(%r15)
testq %rax, %rax
je 0x12a1ea
movq 0x168(%r15), %rdi
leaq 0x25604a(%rip), %rsi    # 0x38021b
movl $0x2, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, 0x158(%r15)
testq %rax, %rax
jne 0x12a1f5
movq %r14, %rdi
callq 0x147952
xorl %r14d, %r14d
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3b3ec
callq 0x3b425
callq 0x3b45e