// File: /workspace/github_c_makefile_star2_O3/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, 0x12001(%rip)     # 0x1f728
callq 0x8b90
leaq 0x258(%rip), %rdi       # 0xd98b
callq 0x16e70
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x82f0
leaq 0x9e20(%rip), %rsi      # 0x1756b
movq %rbx, %rdi
callq 0x8d00
leaq 0x9e1a(%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 0x9c99(%rip), %rsi      # 0x17484
movq %rbx, %rdi
callq 0x8660
leaq 0x9c95(%rip), %rsi      # 0x1748f
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd821
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 0xd829
movq %rbx, %rdi
callq 0x89c0
leaq 0x9c7e(%rip), %rsi      # 0x174ae
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd857
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 0xd85f
movq %rbx, %rdi
callq 0x89c0
leaq 0x9c67(%rip), %rsi      # 0x174cd
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd88d
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 0xd895
movq %rbx, %rdi
callq 0x89c0
leaq 0x9c51(%rip), %rsi      # 0x174ed
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd8c3
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 0xd8cb
movq %rbx, %rdi
callq 0x89c0
leaq 0x9c3a(%rip), %rsi      # 0x1750c
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd8f9
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 0xd901
movq %rbx, %rdi
callq 0x89c0
leaq 0x9c24(%rip), %rsi      # 0x1752c
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd92f
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 0xd937
movq %rbx, %rdi
callq 0x89c0
leaq 0x9c11(%rip), %rsi      # 0x1754f
movq %rbx, %rdi
callq 0x8b00
testl %eax, %eax
jne 0xd965
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 0xd96d
movq %rbx, %rdi
callq 0x89c0
movq %rbx, %rdi
callq 0x8ae0
leaq 0x9b08(%rip), %rsi      # 0x17484
movq %rbx, %rdi
callq 0x8660
movl $0x1, %eax
popq %rbx
retq