// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/gtlua/genome_node_lua.c
// Function: gt_lua_open_genome_node
int gt_lua_open_genome_node(lua_State *L)
{
#ifndef NDEBUG
  int stack_size;
#endif
  gt_assert(L);
#ifndef NDEBUG
  stack_size = lua_gettop(L);
#endif
  luaL_newmetatable(L, GENOME_NODE_METATABLE);
  /* metatable.__index = metatable */
  lua_pushvalue(L, -1); /* duplicate the metatable */
  lua_setfield(L, -2, "__index");
  /* set its _gc field */
  lua_pushstring(L, "__gc");
  lua_pushcfunction(L, genome_node_lua_delete);
  lua_settable(L, -3);
  /* set its _tostring field */
  lua_pushstring(L, "__tostring");
  lua_pushcfunction(L, genome_node_lua_tostring);
  lua_settable(L, -3);
  /* set its _eq field */
  lua_pushstring(L, "__eq");
  lua_pushcfunction(L, genome_node_lua_eq);
  lua_settable(L, -3);
  /* register functions */
  luaL_register(L, NULL, genome_node_lib_m);
  gt_lua_export_metatable(L, GENOME_NODE_METATABLE);
  luaL_register(L, "gt", genome_node_lib_f);
  /* child node iterator upvalue needs custom gc callback */
  luaL_newmetatable(L, "GenomeTools.get_children");
  lua_pushstring(L, "__gc");
  lua_pushcfunction(L, feature_node_lua_get_children_gc);
  lua_settable(L, -3);
  lua_pop(L, 1);
  luaL_newmetatable(L, "GenomeTools.each_attrib");
  lua_pushstring(L, "__gc");
  lua_pushcfunction(L, feature_node_lua_each_attribute_gc);
  lua_settable(L, -3);
  lua_pop(L, 2);
  gt_assert(lua_gettop(L) == stack_size);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x878eb
movq %rdi, %rbx
callq 0x578c5
movl %eax, %ebp
leaq 0x6dd2a(%rip), %r15     # 0xf5487
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b1df
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c3c
leaq 0x66ba2(%rip), %rdx     # 0xee31e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x59137
leaq 0x664e2(%rip), %r14     # 0xedc72
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58568
leaq 0x153(%rip), %rsi       # 0x878f5
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x58f22
leaq 0x66eef(%rip), %rsi     # 0xee6af
movq %rbx, %rdi
callq 0x58568
leaq 0x144(%rip), %rsi       # 0x87913
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x58f22
leaq 0x66b4b(%rip), %rsi     # 0xee338
movq %rbx, %rdi
callq 0x58568
leaq 0x220(%rip), %rsi       # 0x87a1c
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x58f22
leaq 0xc8056(%rip), %rdx     # 0x14f870
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5b590
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa856d
leaq 0x79851(%rip), %rsi     # 0x101087
leaq 0xc82e3(%rip), %rdx     # 0x14fb20
movq %rbx, %rdi
callq 0x5b590
leaq 0x6dc53(%rip), %rsi     # 0xf549f
movq %rbx, %rdi
callq 0x5b1df
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58568
leaq 0x20e(%rip), %rsi       # 0x87a74
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x58f22
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x578d2
leaq 0x6dc27(%rip), %rsi     # 0xf54b8
movq %rbx, %rdi
callq 0x5b1df
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58568
leaq 0x1e5(%rip), %rsi       # 0x87a90
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x58f22
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x578d2
movq %rbx, %rdi
callq 0x578c5
cmpl %ebp, %eax
jne 0x878f0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x201a0
callq 0x20167