// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0xaa889
movq 0x109780(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xb3804(%rip), %rsi     # 0x15e066
leaq 0xc0595(%rip), %rdx     # 0x16adfe
leaq 0xc8d93(%rip), %rcx     # 0x173603
leaq 0xc8da4(%rip), %r8      # 0x17361b
movl $0x385, %r9d            # imm = 0x385
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xaa88b
movq 0x10(%rsp), %rdi
callq 0x4f0e0
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
leaq 0xc8d92(%rip), %rsi     # 0x173637
callq 0x55930
movq 0x10(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f790
movq 0x10(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0xc0dbd(%rip), %rdx     # 0x16b687
callq 0x51fc0
movq 0x10(%rsp), %rdi
leaq 0xc0704(%rip), %rsi     # 0x16afdf
callq 0x50970
movq 0x10(%rsp), %rdi
leaq 0x1b4(%rip), %rsi       # 0xaaaa0
xorl %edx, %edx
callq 0x51120
movq 0x10(%rsp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x51d10
movq 0x10(%rsp), %rdi
leaq 0xc110a(%rip), %rsi     # 0x16ba18
callq 0x50970
movq 0x10(%rsp), %rdi
leaq 0x1c1(%rip), %rsi       # 0xaaae0
xorl %edx, %edx
callq 0x51120
movq 0x10(%rsp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x51d10
movq 0x10(%rsp), %rdi
leaq 0xc0d60(%rip), %rsi     # 0x16b6a1
callq 0x50970
movq 0x10(%rsp), %rdi
leaq 0x31e(%rip), %rsi       # 0xaac70
xorl %edx, %edx
callq 0x51120
movq 0x10(%rsp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x51d10
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x108338(%rip), %rdx    # 0x1b2cb0
callq 0x55e30
movq 0x10(%rsp), %rdi
leaq 0xc8cae(%rip), %rsi     # 0x173637
callq 0xe81d0
movq 0x10(%rsp), %rdi
leaq 0xd92dd(%rip), %rsi     # 0x183c77
leaq 0x1085bf(%rip), %rdx    # 0x1b2f60
callq 0x55e30
movq 0x10(%rsp), %rdi
leaq 0xc8c9d(%rip), %rsi     # 0x17364f
callq 0x55930
movq 0x10(%rsp), %rdi
leaq 0xc061c(%rip), %rsi     # 0x16afdf
callq 0x50970
movq 0x10(%rsp), %rdi
leaq 0x35c(%rip), %rsi       # 0xaad30
xorl %edx, %edx
callq 0x51120
movq 0x10(%rsp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x51d10
movq 0x10(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4f100
movq 0x10(%rsp), %rdi
leaq 0xc8c63(%rip), %rsi     # 0x173668
callq 0x55930
movq 0x10(%rsp), %rdi
leaq 0xc05c9(%rip), %rsi     # 0x16afdf
callq 0x50970
movq 0x10(%rsp), %rdi
leaq 0x349(%rip), %rsi       # 0xaad70
xorl %edx, %edx
callq 0x51120
movq 0x10(%rsp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x51d10
movq 0x10(%rsp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x4f100
movq 0x10(%rsp), %rdi
callq 0x4f0e0
cmpl 0xc(%rsp), %eax
je 0xaaa94
movq 0x109575(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xb35f9(%rip), %rsi     # 0x15e066
leaq 0xc81be(%rip), %rdx     # 0x172c32
leaq 0xc8b88(%rip), %rcx     # 0x173603
leaq 0xc8b99(%rip), %r8      # 0x17361b
movl $0x3a8, %r9d            # imm = 0x3A8
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xaaa96
movl $0x1, %eax
addq $0x18, %rsp
retq