// File: /workspace/github_c_makefile_star2_O3/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 0xae31c
movq %rdi, %rbx
callq 0x56afc
movl %eax, %ebp
leaq 0x4f61c(%rip), %r12     # 0xfd64a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5a609
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f7b
leaq 0x40289(%rip), %r14     # 0xee2d6
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x584c8
leaq 0x3fbc6(%rip), %r15     # 0xedc2a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5790a
leaq 0x2b0(%rip), %rsi       # 0xae326
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582b2
leaq 0xa219c(%rip), %rdx     # 0x150230
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a9b5
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa7bb1
leaq 0x4f5ad(%rip), %rsi     # 0xfd65d
movq %rbx, %rdi
callq 0x5a609
leaq 0x285(%rip), %rsi       # 0xae344
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x584c8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5790a
leaq 0x2dd(%rip), %rsi       # 0xae3c8
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 0x4f561(%rip), %r12     # 0xfd677
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5a609
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f7b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x584c8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5790a
leaq 0x2c4(%rip), %rsi       # 0xae414
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582b2
leaq 0xa2232(%rip), %rdx     # 0x1503a0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a9b5
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa7bb1
leaq 0x4f507(%rip), %r12     # 0xfd691
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5a609
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f7b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x584c8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5790a
leaq 0x26e(%rip), %rsi       # 0xae432
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582b2
leaq 0xa21fe(%rip), %rdx     # 0x1503e0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a9b5
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa7bb1
leaq 0x4f4ae(%rip), %r12     # 0xfd6ac
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5a609
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f7b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x584c8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5790a
leaq 0x218(%rip), %rsi       # 0xae450
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582b2
leaq 0xa228a(%rip), %rdx     # 0x1504e0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a9b5
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa7bb1
leaq 0x4f454(%rip), %r12     # 0xfd6c6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5a609
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f7b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x584c8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5790a
leaq 0x1c2(%rip), %rsi       # 0xae46e
movq %rbx, %rdi
xorl %edx, %edx
callq 0x57d08
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582b2
leaq 0xa22d6(%rip), %rdx     # 0x1505a0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a9b5
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa7bb1
leaq 0x52d15(%rip), %rsi     # 0x100ffb
leaq 0xa2343(%rip), %rdx     # 0x150630
movq %rbx, %rdi
callq 0x5a9b5
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x56b09
movq %rbx, %rdi
callq 0x56afc
cmpl %ebp, %eax
jne 0xae321
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2625b
callq 0x26222