// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/gtlua/feature_index_lua.c
// Function: feature_index_lua_add_feature_node
static int feature_index_lua_add_feature_node(lua_State *L)
{
  GtFeatureIndex **fi;
  GtGenomeNode **gn;
  GtFeatureNode *fn;
  GtStr *seqid;
  GtError *err;
  bool has_seqid;
  gt_assert(L);
  fi = check_feature_index(L, 1);
  gn = check_genome_node(L, 2);
  fn = gt_feature_node_cast(*gn);
  luaL_argcheck(L, fn, 2, "not a feature node");
  seqid = gt_genome_node_get_seqid(*gn);
  luaL_argcheck(L, seqid, 2, "feature does not have a sequence id");
  err = gt_error_new();
  if (gt_feature_index_has_seqid(*fi, &has_seqid, gt_str_get(seqid), err))
    return gt_lua_error(L, err);
  gt_error_delete(err);
  luaL_argcheck(L, has_seqid, 2,
                "feature index does not contain corresponding sequence region");
  err = gt_error_new();
  if (gt_feature_index_add_feature_node(*fi, fn, err))
    return gt_lua_error(L, err);
  gt_error_delete(err);
  return 0;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0xf8959
movq 0xbb6b0(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x65734(%rip), %rsi     # 0x15e066
leaq 0x724c5(%rip), %rdx     # 0x16adfe
leaq 0x83a8a(%rip), %rcx     # 0x17c3ca
leaq 0x83a17(%rip), %r8      # 0x17c35e
movl $0x51, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xf895b
movq 0x48(%rsp), %rdi
movl $0x1, %esi
leaq 0x83111(%rip), %rdx     # 0x17ba7d
callq 0x559c0
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movl $0x2, %esi
leaq 0x7acb0(%rip), %rdx     # 0x173637
callq 0x559c0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rdi
callq 0x20750
movq %rax, 0x30(%rsp)
movb $0x1, %al
cmpq $0x0, 0x30(%rsp)
movb %al, 0x1e(%rsp)
jne 0xf89d1
movq 0x48(%rsp), %rdi
movl $0x2, %esi
leaq 0x7ad81(%rip), %rdx     # 0x173743
callq 0x55420
cmpl $0x0, %eax
setne %al
movb %al, 0x1e(%rsp)
movb 0x1e(%rsp), %al
movq 0x38(%rsp), %rax
movq (%rax), %rdi
callq 0x258a0
movq %rax, 0x28(%rsp)
movb $0x1, %al
cmpq $0x0, 0x28(%rsp)
movb %al, 0x1d(%rsp)
jne 0xf8a15
movq 0x48(%rsp), %rdi
movl $0x2, %esi
leaq 0x839e7(%rip), %rdx     # 0x17c3ed
callq 0x55420
cmpl $0x0, %eax
setne %al
movb %al, 0x1d(%rsp)
movb 0x1d(%rsp), %al
callq 0xc0b0
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x19940
movq 0x10(%rsp), %rdi
movq %rax, %rdx
movq 0x20(%rsp), %rcx
leaq 0x1f(%rsp), %rsi
callq 0x1ddb0
cmpl $0x0, %eax
je 0xf8a6e
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xe84e0
movl %eax, 0x54(%rsp)
jmp 0xf8af6
movq 0x20(%rsp), %rdi
callq 0xc490
movb $0x1, %al
testb $0x1, 0x1f(%rsp)
movb %al, 0xf(%rsp)
jne 0xf8aa5
movq 0x48(%rsp), %rdi
movl $0x2, %esi
leaq 0x8397b(%rip), %rdx     # 0x17c411
callq 0x55420
cmpl $0x0, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
callq 0xc0b0
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rdi
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x1d3d0
cmpl $0x0, %eax
je 0xf8ae4
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xe84e0
movl %eax, 0x54(%rsp)
jmp 0xf8af6
movq 0x20(%rsp), %rdi
callq 0xc490
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nop