// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/anno_db_gfflike.c
// Function: gt_feature_index_gfflike_save
static int gt_feature_index_gfflike_save(GtFeatureIndex *fi,
                                         GT_UNUSED GtError *err)
{
  GtFeatureIndexGFFlike *fig;
  ObserverCallbackInfo *oci;
  int had_err = 0;
  GtRDBStmt *stmt_b, *stmt_e;
  gt_assert(fi);
  fig = feature_index_gfflike_cast(fi);
  oci = (ObserverCallbackInfo*) fig->obs->data;

  gt_mutex_lock(fig->dblock);
  stmt_b = gt_rdb_prepare(fig->db, "BEGIN TRANSACTION;", 0, err);
  stmt_e = gt_rdb_prepare(fig->db, "END TRANSACTION;", 0, err);
  gt_rdb_stmt_exec(stmt_b, err);
  if (oci && fig->deleted) {
    had_err = gt_hashmap_foreach(fig->deleted,
                                 gt_feature_index_gfflike_save_del,
                                 oci, err);
  }
  gt_hashmap_reset(fig->deleted);
  gt_rdb_stmt_exec(stmt_e, err);

  gt_rdb_stmt_reset(stmt_b, err);
  gt_rdb_stmt_exec(stmt_b, err);
  if (oci && fig->added) {
    had_err = gt_hashmap_foreach(fig->added,
                                 gt_feature_index_gfflike_save_add,
                                 oci, err);
  }
  gt_hashmap_reset(fig->added);
  gt_rdb_stmt_reset(stmt_e, err);
  gt_rdb_stmt_exec(stmt_e, err);

  gt_rdb_stmt_reset(stmt_b, err);
  gt_rdb_stmt_exec(stmt_b, err);
  if (oci && fig->changed) {
    had_err = gt_hashmap_foreach(fig->changed,
                                 gt_feature_index_gfflike_save_chg,
                                 oci, err);
  }
  gt_hashmap_reset(fig->changed);
  gt_rdb_stmt_reset(stmt_e, err);
  gt_rdb_stmt_exec(stmt_e, err);

  gt_rdb_stmt_delete(stmt_e);
  gt_rdb_stmt_delete(stmt_b);
  gt_mutex_lock(fig->dblock);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x12afaf
movq %rsi, %rbx
movq %rdi, %r14
callq 0x128b66
movq %rax, %rdi
movq %r14, %rsi
callq 0x147fb4
movq %rax, %r14
movq 0x160(%rax), %rax
movq 0x170(%r14), %rdi
movq 0x60(%rax), %rbp
callq 0x122657
movq 0x168(%r14), %rdi
leaq 0x25488a(%rip), %rsi    # 0x37f6ee
xorl %r12d, %r12d
xorl %edx, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, %r15
movq 0x168(%r14), %rdi
leaq 0x25487f(%rip), %rsi    # 0x37f701
xorl %edx, %edx
movq %rbx, %rcx
callq 0x174108
movq %rax, %r13
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1741ce
testq %rbp, %rbp
je 0x12aebd
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x12aebd
leaq 0x105(%rip), %rsi       # 0x12afb4
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x105afd
movl %eax, %r12d
movq 0x40(%r14), %rdi
callq 0x105b51
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1741ce
movq %r15, %rdi
movq %rbx, %rsi
callq 0x174129
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1741ce
testq %rbp, %rbp
je 0x12af0a
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x12af0a
leaq 0x2cd(%rip), %rsi       # 0x12b1c9
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x105afd
movl %eax, %r12d
movq 0x38(%r14), %rdi
callq 0x105b51
movq %r13, %rdi
movq %rbx, %rsi
callq 0x174129
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1741ce
movq %r15, %rdi
movq %rbx, %rsi
callq 0x174129
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1741ce
testq %rbp, %rbp
je 0x12af62
movq 0x48(%r14), %rdi
testq %rdi, %rdi
je 0x12af62
leaq 0x284(%rip), %rsi       # 0x12b1d8
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x105afd
movl %eax, %r12d
movq 0x48(%r14), %rdi
callq 0x105b51
movq %r13, %rdi
movq %rbx, %rsi
callq 0x174129
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1741ce
movq %r13, %rdi
callq 0x1741ef
movq %r15, %rdi
callq 0x1741ef
movq 0x170(%r14), %rdi
callq 0x122657
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3b7ee