// File: /workspace/github_c_makefile_star2_O3/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 0x873c3
movq %rdi, %rbx
callq 0x56afc
movl %eax, %ebp
leaq 0x6e1f2(%rip), %r15     # 0xf5427
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5a609
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f7b
leaq 0x67082(%rip), %rdx     # 0xee2d6
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x584c8
leaq 0x669c2(%rip), %r14     # 0xedc2a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5790a
leaq 0x153(%rip), %rsi       # 0x873cd
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582b2
leaq 0x673cf(%rip), %rsi     # 0xee667
movq %rbx, %rdi
callq 0x5790a
leaq 0x144(%rip), %rsi       # 0x873eb
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582b2
leaq 0x6702b(%rip), %rsi     # 0xee2f0
movq %rbx, %rdi
callq 0x5790a
leaq 0x220(%rip), %rsi       # 0x874f4
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582b2
leaq 0xc857e(%rip), %rdx     # 0x14f870
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a9b5
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa7bb1
leaq 0x79ced(%rip), %rsi     # 0x100ffb
leaq 0xc880b(%rip), %rdx     # 0x14fb20
movq %rbx, %rdi
callq 0x5a9b5
leaq 0x6e11b(%rip), %rsi     # 0xf543f
movq %rbx, %rdi
callq 0x5a609
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5790a
leaq 0x20e(%rip), %rsi       # 0x8754c
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582b2
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x56b09
leaq 0x6e0ef(%rip), %rsi     # 0xf5458
movq %rbx, %rdi
callq 0x5a609
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5790a
leaq 0x1e5(%rip), %rsi       # 0x87568
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582b2
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x56b09
movq %rbx, %rdi
callq 0x56afc
cmpl %ebp, %eax
jne 0x873c8
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x20101
callq 0x200c8