// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x676cb
movq %rdi, %rbx
callq 0x377ed
movl %eax, %ebp
leaq 0x77242(%rip), %r13     # 0xde787
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3ae16
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x37b39
leaq 0x6fd1c(%rip), %rdx     # 0xd727e
pushq $-0x2
popq %r12
movq %rbx, %rdi
movl %r12d, %esi
callq 0x38f41
leaq 0x6f65a(%rip), %r15     # 0xd6bd2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38431
leaq 0x1a7(%rip), %rsi       # 0x67731
movq %rbx, %rdi
xorl %edx, %edx
callq 0x38814
pushq $-0x3
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x38d5e
leaq 0x70065(%rip), %rsi     # 0xd760f
movq %rbx, %rdi
callq 0x38431
leaq 0x194(%rip), %rsi       # 0x6774d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x38814
movq %rbx, %rdi
movl %r14d, %esi
callq 0x38d5e
leaq 0x6fcc3(%rip), %rsi     # 0xd7298
movq %rbx, %rdi
callq 0x38431
leaq 0x26e(%rip), %rsi       # 0x67852
movq %rbx, %rdi
xorl %edx, %edx
callq 0x38814
movq %rbx, %rdi
movl %r14d, %esi
callq 0x38d5e
leaq 0xc5250(%rip), %rdx     # 0x12c850
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3b11b
movq %rbx, %rdi
movq %r13, %rsi
callq 0x88975
leaq 0x82c5b(%rip), %rsi     # 0xea277
leaq 0xc54dd(%rip), %rdx     # 0x12cb00
movq %rbx, %rdi
callq 0x3b11b
leaq 0x7716d(%rip), %rsi     # 0xde79f
movq %rbx, %rdi
callq 0x3ae16
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38431
leaq 0x293(%rip), %rsi       # 0x678df
movq %rbx, %rdi
xorl %edx, %edx
callq 0x38814
movq %rbx, %rdi
movl %r14d, %esi
callq 0x38d5e
movq %rbx, %rdi
movl %r12d, %esi
callq 0x377fa
leaq 0x77145(%rip), %rsi     # 0xde7b8
movq %rbx, %rdi
callq 0x3ae16
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38431
leaq 0x26c(%rip), %rsi       # 0x678f9
movq %rbx, %rdi
xorl %edx, %edx
callq 0x38814
movq %rbx, %rdi
movl %r14d, %esi
callq 0x38d5e
movq %rbx, %rdi
movl %r14d, %esi
callq 0x377fa
movq %rbx, %rdi
callq 0x377ed
cmpl %ebp, %eax
jne 0x676f9
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xc68e6(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x6298a(%rip), %rsi     # 0xca066
leaq 0x6f313(%rip), %rdx     # 0xd69f6
leaq 0x77069(%rip), %rcx     # 0xde753
leaq 0x7707a(%rip), %r8      # 0xde76b
movl $0x385, %r9d            # imm = 0x385
jmp 0x67725
movq 0xc68b8(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x6295c(%rip), %rsi     # 0xca066
leaq 0x766ca(%rip), %rdx     # 0xddddb
leaq 0x7703b(%rip), %rcx     # 0xde753
leaq 0x7704c(%rip), %r8      # 0xde76b
movl $0x3a8, %r9d            # imm = 0x3A8
xorl %eax, %eax
callq 0xb8c0
callq 0xb300