// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/anno_db_gfflike.c
// Function: gt_feature_index_gfflike_save_chg
static int gt_feature_index_gfflike_save_chg(void *key, GT_UNUSED void *val,
                                             void *data, GtError *err)
{
  GtFeatureNode *fn = (GtFeatureNode*) key, *child;
  GtUword *id;
  ObserverCallbackInfo *oci = (ObserverCallbackInfo*) data;
  GFFlikeAttributeInfo ai;
  GtFeatureNodeIterator *fni;
  int had_err = 0, rval;

  id = node_ul_gt_hashmap_get(oci->fis->cache_node2id, fn);
  gt_assert(id);

  /* update main feature table */
  gt_rdb_stmt_reset(oci->fis->stmts[GT_PSTMT_FEATURE_UPDATE], err);
  gt_rdb_stmt_bind_double(oci->fis->stmts[GT_PSTMT_FEATURE_UPDATE], 0,
                          gt_feature_node_score_is_defined(fn) ?
                         gt_feature_node_get_score(fn) :
                         GT_UNDEF_DOUBLE, err);
  gt_rdb_stmt_bind_int(oci->fis->stmts[GT_PSTMT_FEATURE_UPDATE], 1,
                       gt_feature_node_get_strand(fn), err);
  gt_rdb_stmt_bind_int(oci->fis->stmts[GT_PSTMT_FEATURE_UPDATE], 2,
                       gt_feature_node_get_phase(fn), err);
  gt_rdb_stmt_bind_int(oci->fis->stmts[GT_PSTMT_FEATURE_UPDATE], 3, *id,
                       err);
  rval = gt_rdb_stmt_exec(oci->fis->stmts[GT_PSTMT_FEATURE_UPDATE], err);
  if (rval < 0)
    had_err = -1;

  if (!had_err) {
    /* resave attributes: remove first... */
    gt_rdb_stmt_reset(oci->fis->stmts[GT_PSTMT_NODE_DELETE_ATTRIB_FOR_NODE],
                      err);
    gt_rdb_stmt_bind_int(oci->fis->stmts[GT_PSTMT_NODE_DELETE_ATTRIB_FOR_NODE],
                         0, *id, err);
    rval = gt_rdb_stmt_exec(
                          oci->fis->stmts[GT_PSTMT_NODE_DELETE_ATTRIB_FOR_NODE],
                          err);
    if (rval < 0)
      had_err = -1;
  }

  if (!had_err) {
    /* then insert all attributes again */
    ai.fis = oci->fis;
    ai.id = *id;
    ai.err = err;
    gt_feature_node_foreach_attribute(fn, resave_each_attribute, &ai);
  }

  if (!had_err) {
    gt_rdb_stmt_reset(oci->fis->stmts[GT_PSTMT_NODE_DELETE_AS_PARENT], err);
    gt_rdb_stmt_bind_int(oci->fis->stmts[GT_PSTMT_NODE_DELETE_AS_PARENT],
                         0, *id, err);
    (void) gt_rdb_stmt_exec(oci->fis->stmts[GT_PSTMT_NODE_DELETE_AS_PARENT],
                            err);
    fni = gt_feature_node_iterator_new_direct(fn);
    while ((child = gt_feature_node_iterator_next(fni))) {
      GtUword *child_id;
      if ((child_id = node_ul_gt_hashmap_get(oci->fis->cache_node2id, child))) {
        gt_rdb_stmt_reset(oci->fis->stmts[GT_PSTMT_PARENT_INSERT], err);
        gt_rdb_stmt_bind_int(oci->fis->stmts[GT_PSTMT_PARENT_INSERT],
                             0, *child_id, err);
        gt_rdb_stmt_bind_int(oci->fis->stmts[GT_PSTMT_PARENT_INSERT],
                             1, *id, err);
        (void) gt_rdb_stmt_exec(oci->fis->stmts[GT_PSTMT_PARENT_INSERT],
                                err);
      }
    }
  }

  return (had_err >= 0) ? 0  : -1;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x50(%rax), %rdi
movq 0x70(%rsp), %rsi
callq 0x131830
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x1320f2
movq 0x509edf(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3e3f48(%rip), %rsi    # 0x516013
leaq 0x482645(%rip), %rdx    # 0x5b4717
leaq 0x41664c(%rip), %rcx    # 0x548725
leaq 0x41536e(%rip), %r8     # 0x54744e
movl $0x49e, %r9d            # imm = 0x49E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1320f4
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0xa8(%rax), %rdi
movq 0x78(%rsp), %rsi
callq 0x1c42f0
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x70(%rsp), %rdi
callq 0x16d510
testb $0x1, %al
jne 0x132133
jmp 0x132149
movq 0x70(%rsp), %rdi
callq 0x16df90
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0x132159
movsd 0x3e6bff(%rip), %xmm0   # 0x518d50
movsd %xmm0, 0x18(%rsp)
jmp 0x132159
movq 0x20(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
movq 0x78(%rsp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x1c45a0
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
callq 0x16cc70
movq 0x8(%rsp), %rdi
movl %eax, %edx
movq 0x78(%rsp), %rcx
movl $0x1, %esi
callq 0x1c4390
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x70(%rsp), %rdi
callq 0x16e1c0
movq 0x10(%rsp), %rdi
movl %eax, %edx
movq 0x78(%rsp), %rcx
movl $0x2, %esi
callq 0x1c4390
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0xa8(%rax), %rdi
movq 0x60(%rsp), %rax
movq (%rax), %rax
movl %eax, %edx
movq 0x78(%rsp), %rcx
movl $0x3, %esi
callq 0x1c4390
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0xa8(%rax), %rdi
movq 0x78(%rsp), %rsi
callq 0x1c4650
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x30(%rsp)
jge 0x132232
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x34(%rsp)
jne 0x1322aa
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x150(%rax), %rdi
movq 0x78(%rsp), %rsi
callq 0x1c42f0
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x150(%rax), %rdi
movq 0x60(%rsp), %rax
movq (%rax), %rax
movl %eax, %edx
movq 0x78(%rsp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x1c4390
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x150(%rax), %rdi
movq 0x78(%rsp), %rsi
callq 0x1c4650
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x30(%rsp)
jge 0x1322a8
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x1322aa
cmpl $0x0, 0x34(%rsp)
jne 0x1322ec
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x70(%rsp), %rdi
leaq 0x44e(%rip), %rsi       # 0x132730
leaq 0x40(%rsp), %rdx
callq 0x16f0e0
cmpl $0x0, 0x34(%rsp)
jne 0x13242d
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x120(%rax), %rdi
movq 0x78(%rsp), %rsi
callq 0x1c42f0
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x120(%rax), %rdi
movq 0x60(%rsp), %rax
movq (%rax), %rax
movl %eax, %edx
movq 0x78(%rsp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x1c4390
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x120(%rax), %rdi
movq 0x78(%rsp), %rsi
callq 0x1c4650
movq 0x70(%rsp), %rdi
callq 0x170ce0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x170e30
movq %rax, 0x68(%rsp)
cmpq $0x0, %rax
je 0x13242b
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x50(%rax), %rdi
movq 0x68(%rsp), %rsi
callq 0x131830
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x132426
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x80(%rax), %rdi
movq 0x78(%rsp), %rsi
callq 0x1c42f0
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x80(%rax), %rdi
movq 0x28(%rsp), %rax
movq (%rax), %rax
movl %eax, %edx
movq 0x78(%rsp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x1c4390
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x80(%rax), %rdi
movq 0x60(%rsp), %rax
movq (%rax), %rax
movl %eax, %edx
movq 0x78(%rsp), %rcx
movl $0x1, %esi
callq 0x1c4390
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x80(%rax), %rdi
movq 0x78(%rsp), %rsi
callq 0x1c4650
jmp 0x132362
jmp 0x13242d
movl 0x34(%rsp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovgel %ecx, %eax
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)