// File: /workspace/github_c_makefile_star2_O3/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 0x1243b0
movq %rsi, %r12
testq %rsi, %rsi
je 0x1243b0
movq %rdx, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x123cca
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x1243b5
callq 0x122c11
movq %rax, %rdi
movq %r14, %rsi
callq 0x12580b
movq 0x18(%rax), %rsi
movq %r12, %rdi
movq %rbx, %rdx
callq 0x16be25
testl %eax, %eax
jne 0x12439b
callq 0x122d18
movq %rax, %rdi
callq 0x140675
movq %rax, %r14
callq 0x122d18
movq %rax, %rdi
movq %r14, %rsi
callq 0x140d70
movq %rax, %r15
callq 0x1441ac
movq %rax, 0x160(%r15)
leaq 0x2514df(%rip), %rdx    # 0x375206
movl $0x1, %edi
movl $0x18, %esi
movl $0x79e, %ecx            # imm = 0x79E
callq 0x10436a
movq %rax, %r13
movq 0x160(%r15), %rax
movq %r13, 0x60(%rax)
leaq -0x51418(%rip), %rdx    # 0xd2938
xorl %edi, %edi
xorl %esi, %esi
callq 0x1008fc
movq %rax, 0x10(%r15)
movups 0x396384(%rip), %xmm0   # 0x4ba0e8
movups %xmm0, 0x20(%rsp)
movups 0x396368(%rip), %xmm0   # 0x4ba0d8
movups %xmm0, 0x10(%rsp)
movups 0x39634c(%rip), %xmm0   # 0x4ba0c8
movups %xmm0, (%rsp)
callq 0x101194
movq %rax, 0x50(%r15)
movups 0x396388(%rip), %xmm0   # 0x4ba118
movups %xmm0, 0x20(%rsp)
movups 0x39636c(%rip), %xmm0   # 0x4ba108
movups %xmm0, 0x10(%rsp)
movups 0x396350(%rip), %xmm0   # 0x4ba0f8
movups %xmm0, (%rsp)
callq 0x101194
movq %rax, 0x58(%r15)
leaq -0x22d21(%rip), %rdx    # 0x10109b
xorl %edi, %edi
xorl %esi, %esi
callq 0x1008fc
movq %rax, 0x28(%r15)
leaq -0x8011(%rip), %rbp     # 0x11bdbf
movl $0x1, %edi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x1008fc
movq %rax, 0x18(%r15)
leaq 0x5d0(%rip), %rsi       # 0x1243ba
xorl %edi, %edi
xorl %edx, %edx
callq 0x1008fc
movq %rax, 0x30(%r15)
movl $0x1, %edi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x1008fc
movq %rax, 0x20(%r15)
callq 0x11c8ba
movq %rax, 0x170(%r15)
movq %r15, 0x8(%r13)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1008fc
movq %rax, 0x48(%r15)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1008fc
movq %rax, 0x40(%r15)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1008fc
movq %rax, 0x38(%r15)
movl $0x0, 0x10(%r13)
movq %rbx, (%r13)
movq 0x160(%r15), %rax
movq $0x0, 0x58(%rax)
leaq 0x55b(%rip), %rcx       # 0x1243c4
movq %rcx, (%rax)
leaq 0x59a(%rip), %rcx       # 0x12440d
movq %rcx, 0x10(%rax)
leaq 0x5ce(%rip), %rcx       # 0x12444c
movq %rcx, 0x8(%rax)
leaq 0x602(%rip), %rcx       # 0x12448b
movq %rcx, 0x28(%rax)
leaq 0x640(%rip), %rcx       # 0x1244d4
movq %rcx, 0x30(%rax)
leaq 0x67e(%rip), %rcx       # 0x12451d
movq %rcx, 0x50(%rax)
movq %r12, %rdi
callq 0x16bd8b
movq %rax, 0x168(%r15)
leaq 0x25267d(%rip), %rsi    # 0x376536
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x70(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252686(%rip), %rsi    # 0x37656a
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x78(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x25268b(%rip), %rsi    # 0x376597
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x88(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x2526ac(%rip), %rsi    # 0x3765e3
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x90(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x2526c7(%rip), %rsi    # 0x376629
movl $0x3, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x98(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x2526ec(%rip), %rsi    # 0x376679
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x60(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x2526f2(%rip), %rsi    # 0x3766a7
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x68(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x2526f3(%rip), %rsi    # 0x3766d0
movl $0x2, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x80(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x2526ea(%rip), %rsi    # 0x3766f2
movl $0xc, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xa0(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x25276e(%rip), %rsi    # 0x3767a1
movl $0x4, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xa8(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252786(%rip), %rsi    # 0x3767e4
movl $0x3, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xb8(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x25279f(%rip), %rsi    # 0x376828
movl $0x3, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xc8(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252903(%rip), %rsi    # 0x3769b7
xorl %edx, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xc0(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252a29(%rip), %rsi    # 0x376b05
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xd0(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252a38(%rip), %rsi    # 0x376b3f
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xd8(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252a3d(%rip), %rsi    # 0x376b6f
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xe0(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252a49(%rip), %rsi    # 0x376ba6
xorl %edx, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xe8(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252a5a(%rip), %rsi    # 0x376bdf
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xf0(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252b9c(%rip), %rsi    # 0x376d4c
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0xf8(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252bc6(%rip), %rsi    # 0x376da1
xorl %edx, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x100(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252bd6(%rip), %rsi    # 0x376dd9
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x108(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252bce(%rip), %rsi    # 0x376dfc
movl $0x2, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x118(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252bda(%rip), %rsi    # 0x376e33
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x120(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252bd4(%rip), %rsi    # 0x376e58
movl $0x2, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x128(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252bd5(%rip), %rsi    # 0x376e84
movl $0x2, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x130(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252bd7(%rip), %rsi    # 0x376eb1
movl $0x2, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x138(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252bd8(%rip), %rsi    # 0x376edd
movl $0x3, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x140(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252bf5(%rip), %rsi    # 0x376f21
movl $0x2, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x148(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252c09(%rip), %rsi    # 0x376f5c
movl $0x1, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x150(%r15)
testq %rax, %rax
je 0x124393
movq 0x168(%r15), %rdi
leaq 0x252c0f(%rip), %rsi    # 0x376f89
movl $0x2, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, 0x158(%r15)
testq %rax, %rax
jne 0x12439e
movq %r14, %rdi
callq 0x14070e
xorl %r14d, %r14d
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3aa17
callq 0x3aa50