// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/main.c
// Function: luaopen_moonglmath
int luaopen_moonglmath(lua_State *L)
/* Lua calls this function to load the module */
    {
    moonglmath_L = L;
    moonglmath_utils_init(L);
    atexit(AtExit);

    lua_newtable(L); /* the gl table */
    AddVersions(L);

    /* add glmath functions: */
    moonglmath_open_enums(L);
    moonglmath_open_datahandling(L);
    moonglmath_open_tracing(L);
    moonglmath_open_vec(L);
    moonglmath_open_box(L);
    moonglmath_open_rect(L);
    moonglmath_open_mat(L);
    moonglmath_open_quat(L);
    moonglmath_open_complex(L);
    moonglmath_open_funcs(L);
    moonglmath_open_transform(L);
    moonglmath_open_viewing(L);
    moonglmath_open_hostmem(L);

    /* Add functions implemented in Lua */
    lua_pushvalue(L, -1); lua_setglobal(L, "moonglmath");
    if(luaL_dostring(L, "require('moonglmath.vecsugar')") != 0) lua_error(L);
    if(luaL_dostring(L, "require('moonglmath.boxsugar')") != 0) lua_error(L);
    if(luaL_dostring(L, "require('moonglmath.rectsugar')") != 0) lua_error(L);
    if(luaL_dostring(L, "require('moonglmath.matsugar')") != 0) lua_error(L);
    if(luaL_dostring(L, "require('moonglmath.quatsugar')") != 0) lua_error(L);
    if(luaL_dostring(L, "require('moonglmath.complexsugar')") != 0) lua_error(L);
    if(luaL_dostring(L, "require('moonglmath.utils')") != 0) lua_error(L);
    lua_pushnil(L);  lua_setglobal(L, "moonglmath");

    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rdi, 0x12085(%rip)     # 0x1f728
callq 0x8b90
leaq 0x258(%rip), %rdi       # 0xd907
callq 0x16de0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x82f0
leaq 0x9ea4(%rip), %rsi      # 0x1756b
movq %rbx, %rdi
callq 0x8d00
leaq 0x9e9e(%rip), %rsi      # 0x17574
movq %rbx, %rdi
callq 0x8d00
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x8800
movq %rbx, %rdi
callq 0x8970
movq %rbx, %rdi
callq 0x8aa0
movq %rbx, %rdi
callq 0x88c0
movq %rbx, %rdi
callq 0x87f0
movq %rbx, %rdi
callq 0x8880
movq %rbx, %rdi
callq 0x8be0
movq %rbx, %rdi
callq 0x8440
movq %rbx, %rdi
callq 0x8dd0
movq %rbx, %rdi
callq 0x88d0
movq %rbx, %rdi
callq 0x87a0
movq %rbx, %rdi
callq 0x8460
movq %rbx, %rdi
callq 0x8980
movq %rbx, %rdi
callq 0x8570
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8600
leaq 0x9d1d(%rip), %rsi      # 0x17484
movq %rbx, %rdi
callq 0x8660
leaq 0x9d19(%rip), %rsi      # 0x1748f
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd79d
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8de0
testl %eax, %eax
je 0xd7a5
movq %rbx, %rdi
callq 0x89c0
leaq 0x9d02(%rip), %rsi      # 0x174ae
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd7d3
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8de0
testl %eax, %eax
je 0xd7db
movq %rbx, %rdi
callq 0x89c0
leaq 0x9ceb(%rip), %rsi      # 0x174cd
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd809
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8de0
testl %eax, %eax
je 0xd811
movq %rbx, %rdi
callq 0x89c0
leaq 0x9cd5(%rip), %rsi      # 0x174ed
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd83f
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8de0
testl %eax, %eax
je 0xd847
movq %rbx, %rdi
callq 0x89c0
leaq 0x9cbe(%rip), %rsi      # 0x1750c
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd875
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8de0
testl %eax, %eax
je 0xd87d
movq %rbx, %rdi
callq 0x89c0
leaq 0x9ca8(%rip), %rsi      # 0x1752c
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd8ab
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8de0
testl %eax, %eax
je 0xd8b3
movq %rbx, %rdi
callq 0x89c0
leaq 0x9c95(%rip), %rsi      # 0x1754f
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd8e1
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8de0
testl %eax, %eax
je 0xd8e9
movq %rbx, %rdi
callq 0x89c0
movq %rbx, %rdi
callq 0x8ae0
leaq 0x9b8c(%rip), %rsi      # 0x17484
movq %rbx, %rdi
callq 0x8660
movl $0x1, %eax
popq %rbx
retq