// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/gtlua/encseq_lua.c
// Function: gt_lua_open_encseq
int gt_lua_open_encseq(lua_State *L)
{
#ifndef NDEBUG
  int stack_size;
#endif
  gt_assert(L);
#ifndef NDEBUG
  stack_size = lua_gettop(L);
#endif
  luaL_newmetatable(L, ENCSEQ_METATABLE);
  lua_pushvalue(L, -1); /* duplicate the metatable */
  lua_setfield(L, -2, "__index");
  lua_pushstring(L, "__gc");
  lua_pushcfunction(L, encseq_lua_delete);
  lua_settable(L, -3);
  luaL_register(L, NULL, encseq_lib_m);
  gt_lua_export_metatable(L, ENCSEQ_METATABLE);

  luaL_newmetatable(L, ENCSEQ_BUFFER_METATABLE);
  lua_pushcfunction(L, encseq_lua_index_buffer);
  lua_setfield(L, -2, "__index");
  lua_pushstring(L, "__gc");
  lua_pushcfunction(L, encseq_lua_delete_buffer);
  lua_settable(L, -3);
  lua_pop(L, 1);

  luaL_newmetatable(L, ENCSEQ_READER_METATABLE);
  lua_pushvalue(L, -1); /* duplicate the metatable */
  lua_setfield(L, -2, "__index");
  lua_pushstring(L, "__gc");
  lua_pushcfunction(L, encseq_reader_lua_delete);
  lua_settable(L, -3);
  luaL_register(L, NULL, encseq_reader_lib_m);
  gt_lua_export_metatable(L, ENCSEQ_READER_METATABLE);

  luaL_newmetatable(L, ENCSEQ_ENCODER_METATABLE);
  lua_pushvalue(L, -1); /* duplicate the metatable */
  lua_setfield(L, -2, "__index");
  lua_pushstring(L, "__gc");
  lua_pushcfunction(L, encseq_encoder_lua_delete);
  lua_settable(L, -3);
  luaL_register(L, NULL, encseq_encoder_lib_m);
  gt_lua_export_metatable(L, ENCSEQ_ENCODER_METATABLE);

  luaL_newmetatable(L, ENCSEQ_LOADER_METATABLE);
  lua_pushvalue(L, -1); /* duplicate the metatable */
  lua_setfield(L, -2, "__index");
  lua_pushstring(L, "__gc");
  lua_pushcfunction(L, encseq_loader_lua_delete);
  lua_settable(L, -3);
  luaL_register(L, NULL, encseq_loader_lib_m);
  gt_lua_export_metatable(L, ENCSEQ_LOADER_METATABLE);

  luaL_newmetatable(L, ENCSEQ_BUILDER_METATABLE);
  lua_pushvalue(L, -1); /* duplicate the metatable */
  lua_setfield(L, -2, "__index");
  lua_pushstring(L, "__gc");
  lua_pushcfunction(L, encseq_builder_lua_delete);
  lua_settable(L, -3);
  luaL_register(L, NULL, encseq_builder_lib_m);
  gt_lua_export_metatable(L, ENCSEQ_BUILDER_METATABLE);

  luaL_register(L, "gt", encseq_lib_f);
  lua_pop(L, 1);
  gt_assert(lua_gettop(L) == stack_size);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xaee60
movq %rdi, %rbx
callq 0x578c5
movl %eax, %ebp
leaq 0x4eb38(%rip), %r12     # 0xfd6aa
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5b1df
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c3c
leaq 0x3f78d(%rip), %r14     # 0xee31e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x59137
leaq 0x3f0ca(%rip), %r15     # 0xedc72
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58568
leaq 0x2b0(%rip), %rsi       # 0xaee6a
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x58f22
leaq 0xa1658(%rip), %rdx     # 0x150230
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5b590
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa856d
leaq 0x4eac9(%rip), %rsi     # 0xfd6bd
movq %rbx, %rdi
callq 0x5b1df
leaq 0x285(%rip), %rsi       # 0xaee88
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x59137
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58568
leaq 0x2dd(%rip), %rsi       # 0xaef0c
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 0x4ea7d(%rip), %r12     # 0xfd6d7
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5b1df
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c3c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x59137
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58568
leaq 0x2c4(%rip), %rsi       # 0xaef58
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x58f22
leaq 0xa16ee(%rip), %rdx     # 0x1503a0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5b590
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa856d
leaq 0x4ea23(%rip), %r12     # 0xfd6f1
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5b1df
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c3c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x59137
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58568
leaq 0x26e(%rip), %rsi       # 0xaef76
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x58f22
leaq 0xa16ba(%rip), %rdx     # 0x1503e0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5b590
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa856d
leaq 0x4e9ca(%rip), %r12     # 0xfd70c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5b1df
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c3c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x59137
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58568
leaq 0x218(%rip), %rsi       # 0xaef94
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x58f22
leaq 0xa1746(%rip), %rdx     # 0x1504e0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5b590
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa856d
leaq 0x4e970(%rip), %r12     # 0xfd726
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5b1df
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c3c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x59137
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58568
leaq 0x1c2(%rip), %rsi       # 0xaefb2
movq %rbx, %rdi
xorl %edx, %edx
callq 0x58930
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x58f22
leaq 0xa1792(%rip), %rdx     # 0x1505a0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5b590
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa856d
leaq 0x5225d(%rip), %rsi     # 0x101087
leaq 0xa17ff(%rip), %rdx     # 0x150630
movq %rbx, %rdi
callq 0x5b590
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x578d2
movq %rbx, %rdi
callq 0x578c5
cmpl %ebp, %eax
jne 0xaee65
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x263ab
callq 0x26372