// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/anno_db_gfflike.c
// Function: gt_feature_index_gfflike_get_first_seqid
char* gt_feature_index_gfflike_get_first_seqid(const GtFeatureIndex *gfi,
                                               GtError *err)
{
  GtFeatureIndexGFFlike *fi;
  char *firstseqid = NULL;
  int rval, had_err = 0;
  GtStr *result;
  GtRDBStmt *stmt;
  gt_assert(gfi);
  gt_error_check(err);
  fi = feature_index_gfflike_cast((GtFeatureIndex*) gfi);
  stmt = fi->stmts[GT_PSTMT_GET_FIRST_SEQID_SELECT];
  gt_mutex_lock(fi->dblock);
  gt_rdb_stmt_reset(stmt, err);
  rval = gt_rdb_stmt_exec(stmt, err);
  result = gt_str_new();
  switch (rval) {
    case 0:
      gt_rdb_stmt_get_string(stmt, 0, result, err);
      firstseqid = gt_cstr_dup(gt_str_get(result));
      gt_assert(gt_rdb_stmt_exec(stmt, err) == 1);
      break;
    case 1:
      gt_error_set(err, "no sequence regions in index");
      had_err = -1;
      break;
    default:
      /* error is set */
      had_err = -1;
      break;
  }
  gt_str_delete(result);
  gt_mutex_unlock(fi->dblock);
  return (had_err ? NULL : firstseqid);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq $0x0, 0x28(%rsp)
movl $0x0, 0x20(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x12eeef
movq 0x50d0e2(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3e714b(%rip), %rsi    # 0x516013
leaq 0x41874f(%rip), %rdx    # 0x54761e
leaq 0x41874c(%rip), %rcx    # 0x547622
leaq 0x418571(%rip), %r8     # 0x54744e
movl $0x5e9, %r9d            # imm = 0x5E9
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x12eef1
jmp 0x12eef3
cmpq $0x0, 0x38(%rsp)
je 0x12ef43
movq 0x38(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x12ef0b
jmp 0x12ef43
movq 0x50d08e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3e70f7(%rip), %rsi    # 0x516013
leaq 0x3e729c(%rip), %rdx    # 0x5161bf
leaq 0x4186f8(%rip), %rcx    # 0x547622
leaq 0x41851d(%rip), %r8     # 0x54744e
movl $0x5ea, %r9d            # imm = 0x5EA
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x12ef45
callq 0x12dc70
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0x16a0d0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x100(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq 0x170(%rax), %rdi
callq 0x1211d0
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x1c42f0
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x1c4650
movl %eax, 0x24(%rsp)
callq 0x11d4a0
movq %rax, 0x18(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
je 0x12efca
jmp 0x12efb8
movl 0xc(%rsp), %eax
subl $0x1, %eax
je 0x12f049
jmp 0x12f066
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0x38(%rsp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x1c4900
movq 0x18(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0xa2db0
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x1c4650
cmpl $0x1, %eax
je 0x12f045
movq 0x50cf8c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3e6ff5(%rip), %rsi    # 0x516013
leaq 0x418626(%rip), %rdx    # 0x54764b
leaq 0x4185f6(%rip), %rcx    # 0x547622
leaq 0x41841b(%rip), %r8     # 0x54744e
movl $0x5f5, %r9d            # imm = 0x5F5
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x12f047
jmp 0x12f06e
movq 0x38(%rsp), %rdi
leaq 0x418617(%rip), %rsi    # 0x54766c
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
jmp 0x12f06e
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
movq 0x18(%rsp), %rdi
callq 0x11f560
movq 0x30(%rsp), %rax
movq 0x170(%rax), %rdi
callq 0x121270
cmpl $0x0, 0x20(%rsp)
je 0x12f098
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x12f0a1
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
addq $0x48, %rsp
retq
nopw (%rax,%rax)