// File: /workspace/github_c_makefile_star2_O3/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 0x12514b
movq %rsi, %rbx
movq %rdi, %r14
callq 0x122d18
movq %rax, %rdi
movq %r14, %rsi
callq 0x140d70
movq %rax, %r14
movq 0x160(%rax), %rax
movq 0x170(%r14), %rdi
movq 0x60(%rax), %rbp
callq 0x11c907
movq 0x168(%r14), %rdi
leaq 0x25146e(%rip), %rsi    # 0x37646e
xorl %r12d, %r12d
xorl %edx, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, %r15
movq 0x168(%r14), %rdi
leaq 0x251463(%rip), %rsi    # 0x376481
xorl %edx, %edx
movq %rbx, %rcx
callq 0x16bef8
movq %rax, %r13
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16bfbe
testq %rbp, %rbp
je 0x125059
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x125059
leaq 0x105(%rip), %rsi       # 0x125150
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x100bc9
movl %eax, %r12d
movq 0x40(%r14), %rdi
callq 0x100c1d
movq %r13, %rdi
movq %rbx, %rsi
callq 0x16bfbe
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16bf19
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16bfbe
testq %rbp, %rbp
je 0x1250a6
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x1250a6
leaq 0x315(%rip), %rsi       # 0x1253ad
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x100bc9
movl %eax, %r12d
movq 0x38(%r14), %rdi
callq 0x100c1d
movq %r13, %rdi
movq %rbx, %rsi
callq 0x16bf19
movq %r13, %rdi
movq %rbx, %rsi
callq 0x16bfbe
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16bf19
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16bfbe
testq %rbp, %rbp
je 0x1250fe
movq 0x48(%r14), %rdi
testq %rdi, %rdi
je 0x1250fe
leaq 0x2cc(%rip), %rsi       # 0x1253bc
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x100bc9
movl %eax, %r12d
movq 0x48(%r14), %rdi
callq 0x100c1d
movq %r13, %rdi
movq %rbx, %rsi
callq 0x16bf19
movq %r13, %rdi
movq %rbx, %rsi
callq 0x16bfbe
movq %r13, %rdi
callq 0x16bfdf
movq %r15, %rdi
callq 0x16bfdf
movq 0x170(%r14), %rdi
callq 0x11c907
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3ade0