LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: moonassimp_newmesh
int newmesh(lua_State *L, scene_t *scene, mesh_t *mesh)
    {
    unsigned int i;
    ud_t *ud;
    TRACE_CREATE(mesh, "mesh");
    if(mesh->mFaces != NULL && mesh->mNumFaces > 0)
        {
        for(i = 0; i < mesh->mNumFaces; i++)
            { newface(L, scene, mesh, &(mesh->mFaces[i])); lua_pop(L, 1); }
        TRACE_CREATE_N(i, "faces");
        }
    if(mesh->mBones != NULL && mesh->mNumBones > 0)
        {
        for(i = 0; i < mesh->mNumBones; i++)
            { newbone(L, scene, mesh, mesh->mBones[i]); lua_pop(L, 1); }
        TRACE_CREATE_N(i, "bones");
        }
    if(mesh->mAnimMeshes != NULL && mesh->mNumAnimMeshes > 0)
        {
        for(i = 0; i < mesh->mNumAnimMeshes; i++)
            { newanimmesh(L, scene, mesh, mesh->mAnimMeshes[i]); lua_pop(L, 1); }
        TRACE_CREATE_N(i, "animmeshes");
        }
    ud = newuserdata(L, (void*)mesh, MESH_MT);
    ud->scene = scene;
    return 1;   
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x5a83(%rip), %rdi      # 0x11190
movq %rdx, %rsi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0xd0(%r14)
je 0xb774
cmpl $0x0, 0x8(%r14)
je 0xb774
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0xd0(%r14), %rcx
addq %r13, %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6080
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r12
movl 0x8(%r14), %eax
addq $0x10, %r13
cmpq %rax, %r12
jb 0xb72e
leaq 0x5a38(%rip), %rdi      # 0x111a2
movl %r12d, %esi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0xe0(%r14)
je 0xb7d1
cmpl $0x0, 0xd8(%r14)
je 0xb7d1
xorl %r12d, %r12d
movq 0xe0(%r14), %rax
movq (%rax,%r12,8), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6230
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r12
movl 0xd8(%r14), %eax
cmpq %rax, %r12
jb 0xb78b
leaq 0x59ec(%rip), %rdi      # 0x111b3
movl %r12d, %esi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0x4f8(%r14)
je 0xb82e
cmpl $0x0, 0x4f0(%r14)
je 0xb82e
xorl %r12d, %r12d
movq 0x4f8(%r14), %rax
movq (%rax,%r12,8), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6160
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r12
movl 0x4f0(%r14), %eax
cmpq %rax, %r12
jb 0xb7e8
leaq 0x59a0(%rip), %rdi      # 0x111c4
movl %r12d, %esi
xorl %eax, %eax
callq 0x6710
leaq 0x59a5(%rip), %rdx      # 0x111da
movq %r15, %rdi
movq %r14, %rsi
callq 0x68c0
movq %rbx, 0x10(%rax)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: moonassimp_freemesh
int freemesh(lua_State *L, mesh_t *mesh)
    {
    unsigned int i;
    if(mesh->mFaces != NULL && mesh->mNumFaces > 0)
        {
        for(i = 0; i < mesh->mNumFaces; i++)
            freeface(L, &(mesh->mFaces[i]));
        TRACE_DELETE_N(i, "faces");
        }
    if(mesh->mBones != NULL && mesh->mNumBones > 0)
        {
        for(i = 0; i < mesh->mNumBones; i++)
            freebone(L, mesh->mBones[i]);
        TRACE_DELETE_N(i, "bones");
        }
    if(mesh->mAnimMeshes != NULL && mesh->mNumAnimMeshes > 0)
        {
        for(i = 0; i < mesh->mNumAnimMeshes; i++)
            freeanimmesh(L, mesh->mAnimMeshes[i]);
        TRACE_DELETE_N(i, "animmeshes");
        }
    TRACE_DELETE(mesh, "mesh");
    freeuserdata(L, mesh);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0xd0(%rsi)
je 0xb8a9
cmpl $0x0, 0x8(%rbx)
je 0xb8a9
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0xd0(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdi
callq 0x69a0
incq %r15
movl 0x8(%rbx), %eax
addq $0x10, %r12
cmpq %rax, %r15
jb 0xb877
leaq 0x594b(%rip), %rdi      # 0x111ea
movl %r15d, %esi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0xe0(%rbx)
je 0xb8f1
cmpl $0x0, 0xd8(%rbx)
je 0xb8f1
xorl %r15d, %r15d
movq 0xe0(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x67d0
incq %r15
movl 0xd8(%rbx), %eax
cmpq %rax, %r15
jb 0xb8bf
leaq 0x5914(%rip), %rdi      # 0x111fb
movl %r15d, %esi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0x4f8(%rbx)
je 0xb939
cmpl $0x0, 0x4f0(%rbx)
je 0xb939
xorl %r15d, %r15d
movq 0x4f8(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x6530
incq %r15
movl 0x4f0(%rbx), %eax
cmpq %rax, %r15
jb 0xb907
leaq 0x58dd(%rip), %rdi      # 0x1120c
movl %r15d, %esi
xorl %eax, %eax
callq 0x6710
leaq 0x58e2(%rip), %rdi      # 0x11222
movq %rbx, %rsi
xorl %eax, %eax
callq 0x6710
movq %r14, %rdi
movq %rbx, %rsi
callq 0x63f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: HasTangents
static int HasTangents(lua_State *L) /* and bitangents */
    {
    mesh_t *mesh = checkmesh(L, 1);
    lua_pushboolean(L, mesh->mTangents != NULL && mesh->mBitangents != NULL &&
                        mesh->mNumVertices > 0);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x5739(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
xorl %esi, %esi
cmpq $0x0, 0x20(%rax)
je 0xbac5
cmpq $0x0, 0x28(%rax)
je 0xbac5
xorl %esi, %esi
cmpl $0x0, 0x4(%rax)
setne %sil
movq %rbx, %rdi
callq 0x6540
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: HasColors
static int HasColors(lua_State *L)
    {
    mesh_t *mesh = checkmesh(L, 1);
    unsigned int i = checkindex(L, 2);
    if( i >= AI_MAX_NUMBER_OF_COLOR_SETS)
        lua_pushboolean(L, 0);
    else
        lua_pushboolean(L, mesh->mColors[i] != NULL && mesh->mNumVertices > 0);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x56f8(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
xorl %esi, %esi
cmpl $0x7, %eax
ja 0xbb18
movl %eax, %eax
cmpq $0x0, 0x30(%r14,%rax,8)
je 0xbb18
xorl %esi, %esi
cmpl $0x0, 0x4(%r14)
setne %sil
movq %rbx, %rdi
callq 0x6540
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: HasTextureCoords
static int HasTextureCoords(lua_State *L)
    {
    mesh_t *mesh = checkmesh(L, 1);
    unsigned int i = checkindex(L, 2);
    if( i >= AI_MAX_NUMBER_OF_TEXTURECOORDS)
        lua_pushboolean(L, 0);
    else
        lua_pushboolean(L, mesh->mTextureCoords[i] != NULL && mesh->mNumVertices > 0);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x569f(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
xorl %esi, %esi
cmpl $0x7, %eax
ja 0xbb71
movl %eax, %eax
cmpq $0x0, 0x70(%r14,%rax,8)
je 0xbb71
xorl %esi, %esi
cmpl $0x0, 0x4(%r14)
setne %sil
movq %rbx, %rdi
callq 0x6540
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: NumTextureCoordsChannels
static int NumTextureCoordsChannels(lua_State *L)
    {
    unsigned int n = 0;
    mesh_t *mesh = checkmesh(L, 1);
    while (n < AI_MAX_NUMBER_OF_TEXTURECOORDS && mesh->mTextureCoords[n]) ++n;
    lua_pushinteger(L, n);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x5514(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
xorl %ecx, %ecx
cmpq $0x0, 0x70(%rax,%rcx,8)
je 0xbce8
incq %rcx
cmpq $0x8, %rcx
jne 0xbcd2
movl $0x8, %ecx
movl %ecx, %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: NumTextureCoordsComponents
static int NumTextureCoordsComponents(lua_State *L)
    {
    mesh_t *mesh = checkmesh(L, 1);
    unsigned int chan = checkindex(L, 2);
    if( chan >= AI_MAX_NUMBER_OF_TEXTURECOORDS || mesh->mTextureCoords[chan] == NULL)
        return luaL_argerror(L, 2, "out of range");
    lua_pushinteger(L, mesh->mNumUVComponents[chan]);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x54d3(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
cmpl $0x7, %eax
ja 0xbd4d
movl %eax, %eax
cmpq $0x0, 0x70(%r14,%rax,8)
je 0xbd4d
movl 0xb0(%r14,%rax,4), %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4455(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: NumColorChannels
static int NumColorChannels(lua_State *L)
    {
    unsigned int n = 0;
    mesh_t *mesh = checkmesh(L, 1);
    while (n < AI_MAX_NUMBER_OF_COLOR_SETS && mesh->mColors[n]) ++n;
    lua_pushinteger(L, n);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x5467(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
xorl %ecx, %ecx
cmpq $0x0, 0x30(%rax,%rcx,8)
je 0xbd95
incq %rcx
cmpq $0x8, %rcx
jne 0xbd7f
movl $0x8, %ecx
movl %ecx, %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: Color
static int Color(lua_State *L)
    {
    mesh_t *mesh = checkmesh(L, 1);
    unsigned int chan = checkindex(L, 2);
    unsigned int i = checkindex(L, 3);
    if( chan >= AI_MAX_NUMBER_OF_COLOR_SETS || mesh->mColors[chan] == NULL)
        return luaL_argerror(L, 2, "out of range");
    if( i >= mesh->mNumVertices)
        return luaL_argerror(L, 3, "out of range");
    return pushcolor4(L, &(mesh->mColors[chan][i]), 0);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x5042(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x6310
cmpl $0x7, %ebp
ja 0xc1ef
movl %ebp, %ecx
movq 0x30(%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0xc1ef
cmpl 0x4(%r14), %eax
jae 0xc207
movl %eax, %eax
shlq $0x4, %rax
addq %rax, %rsi
movq %rbx, %rdi
xorl %edx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x62d0
leaq 0x3fb3(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x61c0
leaq 0x3f9b(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x3, %esi
jmp 0xc1fe
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: AllColors
static int AllColors(lua_State *L)
    {
    mesh_t *mesh = checkmesh(L, 1);
    unsigned int chan;
    unsigned int i;
    lua_newtable(L);
    for(chan = 0; chan < AI_MAX_NUMBER_OF_COLOR_SETS; chan++)
        {
        if(mesh->mColors[chan] == NULL) break;
        lua_newtable(L);
        for(i=0; i < mesh->mNumVertices; i++)
            {
            pushcolor4(L, &(mesh->mColors[chan][i]), 1);
            lua_rawseti(L, -2, i+1);
            }
        lua_rawseti(L, -2, chan+1);
        }
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x4faf(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0x30(%r14,%r15,8)
je 0xc2b6
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpl $0x0, 0x4(%r14)
je 0xc29d
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x30(%r14,%r15,8), %rsi
addq %r13, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x62d0
incq %r12
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x6470
movl 0x4(%r14), %eax
addq $0x10, %r13
cmpq %rax, %r12
jb 0xc268
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
cmpq $0x8, %r15
jne 0xc247
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: TextureCoords
static int TextureCoords(lua_State *L)
    {
    vector3_t *coords;
    vector2_t vec2;
    unsigned int ncomp;
    mesh_t *mesh = checkmesh(L, 1);
    unsigned int chan = checkindex(L, 2);
    unsigned int i = checkindex(L, 3);
    if( chan >= AI_MAX_NUMBER_OF_TEXTURECOORDS || mesh->mTextureCoords[chan] == NULL)
        return luaL_argerror(L, 2, "out of range");
    if( i >= mesh->mNumVertices)
        return luaL_argerror(L, 3, "out of range");
    ncomp = mesh->mNumUVComponents[chan]; /* no. of components */
    coords =  &(mesh->mTextureCoords[chan][i]);
    if(ncomp == 3)
        return pushvector3(L, coords, 0);
    if(ncomp == 2)
        {
        vec2.x = coords->x;
        vec2.y = coords->y;
        return pushvector2(L, &vec2, 0);
        }
    if(ncomp == 1)
        {
        lua_pushnumber(L, coords->x);
        return 1;
        }
    return unexpected(L); /* 4 components are currently not supported */
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x4f03(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x6310
cmpl $0x7, %ebp
ja 0xc34a
movl %ebp, %edx
movq 0x70(%r14,%rdx,8), %rcx
testq %rcx, %rcx
je 0xc34a
cmpl 0x4(%r14), %eax
jae 0xc366
movl 0xb0(%r14,%rdx,4), %edx
movl %eax, %eax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,4), %rsi
cmpl $0x1, %edx
je 0xc390
cmpl $0x2, %edx
je 0xc377
cmpl $0x3, %edx
jne 0xc3aa
movq %rbx, %rdi
xorl %edx, %edx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x6600
leaq 0x3e58(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x61c0
leaq 0x3e3c(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x3, %esi
jmp 0xc359
movsd (%rsi), %xmm0
leaq 0x8(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6170
jmp 0xc3a1
cvtss2sd (%rsi), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3e05(%rip), %rsi      # 0x101b6
leaq 0x3e1c(%rip), %rdx      # 0x101d4
movq %rbx, %rdi
movl $0x12c, %ecx            # imm = 0x12C
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: AllTextureCoords
static int AllTextureCoords(lua_State *L)
    {
    vector3_t *coords;
    vector2_t vec2;
    unsigned int ncomp;
    mesh_t *mesh = checkmesh(L, 1);
    unsigned int chan;
    unsigned int i;

    lua_newtable(L);
    for(chan = 0; chan < AI_MAX_NUMBER_OF_TEXTURECOORDS; chan++)
        {
        if(mesh->mTextureCoords[chan] == NULL) break;
        ncomp = mesh->mNumUVComponents[chan]; /* no. of components */
        lua_newtable(L);
        for(i=0; i<mesh->mNumVertices; i++)
            {
            coords =  &(mesh->mTextureCoords[chan][i]);
            switch(ncomp)
                {
                case 3: pushvector3(L, coords, 1); break;
                case 2: {
                        vec2.x = coords->x;
                        vec2.y = coords->y;
                        pushvector2(L, &vec2, 1);
                        break;
                        }
                case 1: {
                        lua_newtable(L);
                        lua_pushnumber(L, coords->x);
                        lua_rawseti(L, -2, 1);
                        break;
                        }
                default:
                    return unexpected(L); /* 4 components are currently not supported */
                }
            lua_rawseti(L, -2, i+1);
            }
        lua_rawseti(L, -2, chan+1);
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x4df3(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movq 0x8(%rsp), %rax
cmpq $0x0, 0x70(%rax,%rbx,8)
je 0xc503
movl 0xb0(%rax,%rbx,4), %r13d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movq 0x8(%rsp), %rcx
cmpl $0x0, 0x4(%rcx)
je 0xc4e6
leal -0x1(%r13), %eax
cmpl $0x2, %eax
ja 0xc50a
xorl %r12d, %r12d
xorl %ebp, %ebp
movq %rbx, %r15
movq 0x70(%rcx,%rbx,8), %rbx
addq %r12, %rbx
cmpl $0x2, %r13d
je 0xc473
movq %r14, %rdi
cmpl $0x3, %r13d
jne 0xc491
movq %rbx, %rsi
movl $0x1, %edx
callq 0x6600
jmp 0xc4bb
movsd (%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x6170
jmp 0xc4bb
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
xorps %xmm0, %xmm0
cvtss2sd (%rbx), %xmm0
movq %r14, %rdi
callq 0x6500
movl $0x1, %edx
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x6470
incq %rbp
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %rbp, %rdx
callq 0x6470
movq 0x8(%rsp), %rcx
movl 0x4(%rcx), %eax
addq $0xc, %r12
cmpq %rax, %rbp
movq %r15, %rbx
jb 0xc44a
incq %rbx
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %rbx, %rdx
callq 0x6470
cmpq $0x8, %rbx
jne 0xc404
movl $0x1, %eax
jmp 0xc527
leaq 0x3ca5(%rip), %rsi      # 0x101b6
leaq 0x3cbc(%rip), %rdx      # 0x101d4
movq %r14, %rdi
movl $0x152, %ecx            # imm = 0x152
xorl %eax, %eax
callq 0x67a0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: Material
static int Material(lua_State *L)
    {
#define scene ud->scene
    mesh_t *mesh = checkmesh(L, 1);
    ud_t *ud = userdata(mesh);
    if(mesh->mMaterialIndex >= scene->mNumMaterials)
        return unexpected(L);   
    pushmaterial(L, scene->mMaterials[mesh->mMaterialIndex]);
    return 1;
#undef scene
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4c96(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rax, %rdi
callq 0x6770
movl 0xe8(%r14), %ecx
movq 0x10(%rax), %rax
cmpl 0x20(%rax), %ecx
jae 0xc586
movq 0x28(%rax), %rax
movq (%rax,%rcx,8), %rsi
movq %rbx, %rdi
callq 0x6380
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3c29(%rip), %rsi      # 0x101b6
leaq 0x3c40(%rip), %rdx      # 0x101d4
movq %rbx, %rdi
movl $0x8c, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: Face
static int Face(lua_State *L)
    {
    mesh_t *mesh = checkmesh(L, 1);
    unsigned int i = checkindex(L, 2);
    if(mesh->mFaces == NULL || mesh->mNumFaces == 0 || i >= mesh->mNumFaces)
        return luaL_argerror(L, 2, "out of range");
    return pushface(L, &(mesh->mFaces[i]));
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4c22(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
movq 0xd0(%r14), %rsi
testq %rsi, %rsi
je 0xc608
movl 0x8(%r14), %ecx
testl %ecx, %ecx
setne %dl
cmpl %ecx, %eax
setb %cl
testb %cl, %dl
je 0xc608
movl %eax, %eax
shlq $0x4, %rax
addq %rax, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6380
leaq 0x3b9a(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: AllIndices
static int AllIndices(lua_State *L)
    {
    mesh_t *mesh = checkmesh(L, 1);
    int zero_based = optboolean(L, 2, 0);
    unsigned int i;

    lua_newtable(L);
    if(mesh->mFaces == NULL || mesh->mNumFaces == 0)
        return 1;
    for(i = 0; i < mesh->mNumFaces; i++)
        {
        pushfaceindices(L, &(mesh->mFaces[i]), zero_based);
        lua_rawseti(L, -2, i+1);
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x4ba5(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x60b0
movl %eax, %ebp
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0xd0(%r14)
je 0xc6aa
cmpl $0x0, 0x8(%r14)
je 0xc6aa
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0xd0(%r14), %rsi
addq %r12, %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x62a0
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
movl 0x8(%r14), %eax
addq $0x10, %r12
cmpq %rax, %r15
jb 0xc676
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: Bone
static int Bone(lua_State *L)
    {
    mesh_t *mesh = checkmesh(L, 1);
    unsigned int i = checkindex(L, 2);
    if(mesh->mBones == NULL || mesh->mNumBones == 0 || i >= mesh->mNumBones)
        return luaL_argerror(L, 2, "out of range");
    return pushbone(L, mesh->mBones[i]);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4b14(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
movq 0xe0(%r14), %rcx
testq %rcx, %rcx
je 0xc718
movl 0xd8(%r14), %edx
testl %edx, %edx
setne %sil
cmpl %edx, %eax
setb %dl
testb %dl, %sil
je 0xc718
movl %eax, %eax
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6380
leaq 0x3a8a(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: AnimMesh
static int AnimMesh(lua_State *L)
    {
    mesh_t *mesh = checkmesh(L, 1);
    unsigned int i = checkindex(L, 2);
    if(mesh->mAnimMeshes == NULL || mesh->mNumAnimMeshes == 0 || i >= mesh->mNumAnimMeshes)
        return luaL_argerror(L, 2, "out of range");
    return pushanimmesh(L, mesh->mAnimMeshes[i]);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4a99(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
movq 0x4f8(%r14), %rcx
testq %rcx, %rcx
je 0xc793
movl 0x4f0(%r14), %edx
testl %edx, %edx
setne %sil
cmpl %edx, %eax
setb %dl
testb %dl, %sil
je 0xc793
movl %eax, %eax
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6380
leaq 0x3a0f(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: Faces
static int Faces(lua_State *L)
    {
    unsigned int i;
    mesh_t *mesh = checkmesh(L, 1);
    lua_newtable(L);
    if(mesh->mFaces == NULL || mesh->mNumFaces == 0) return 1;
    for(i = 0; i < mesh->mNumFaces; i++)
        {
        pushface(L, &(mesh->mFaces[i]));
        lua_rawseti(L, -2, i+1);
        }
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4a1a(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0xd0(%r14)
je 0xc822
cmpl $0x0, 0x8(%r14)
je 0xc822
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0xd0(%r14), %rsi
addq %r12, %rsi
movq %rbx, %rdi
callq 0x6380
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
movl 0x8(%r14), %eax
addq $0x10, %r12
cmpq %rax, %r15
jb 0xc7f0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: Bones
static int Bones(lua_State *L)
    {
    unsigned int i;
    mesh_t *mesh = checkmesh(L, 1);
    lua_newtable(L);
    if(mesh->mBones == NULL || mesh->mNumBones == 0) return 1;
    for(i = 0; i < mesh->mNumBones; i++)
        {
        pushbone(L, mesh->mBones[i]);
        lua_rawseti(L, -2, i+1);
        }
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x4998(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0xe0(%r14)
je 0xc8a4
cmpl $0x0, 0xd8(%r14)
je 0xc8a4
xorl %r15d, %r15d
movq 0xe0(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x6380
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
movl 0xd8(%r14), %eax
cmpq %rax, %r15
jb 0xc872
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/mesh.c
// Function: AnimMeshes
static int AnimMeshes(lua_State *L)
    {
    unsigned int i;
    mesh_t *mesh = checkmesh(L, 1);
    lua_newtable(L);
    if(mesh->mAnimMeshes == NULL || mesh->mNumAnimMeshes == 0) return 1;
    for(i = 0; i < mesh->mNumAnimMeshes; i++)
        {
        pushanimmesh(L, mesh->mAnimMeshes[i]);
        lua_rawseti(L, -2, i+1);
        }
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x491c(%rip), %rdx      # 0x111da
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0x4f8(%r14)
je 0xc920
cmpl $0x0, 0x4f0(%r14)
je 0xc920
xorl %r15d, %r15d
movq 0x4f8(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x6380
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
movl 0x4f0(%r14), %eax
cmpq %rax, %r15
jb 0xc8ee
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/meshanim.c
// Function: moonassimp_newmeshanim
int newmeshanim(lua_State *L, scene_t *scene, animation_t *animation, meshanim_t *meshanim)
    {
    ud_t *ud;
//  TRACE_CREATE(meshanim, "meshanim");
    ud = newuserdata(L, (void*)meshanim, MESHANIM_MT);
    ud->scene = scene;
    ud->animation = animation;
    return 1;   
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x4a33(%rip), %rdx      # 0x11370
movq %rcx, %rsi
callq 0x68c0
movq %r14, 0x10(%rax)
movq %rbx, 0x28(%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/meshanim.c
// Function: Keys
static int Keys(lua_State *L)
/* { key1, key2, ... }
 *
 * key1 = { time = 123.456, value = index }
 */
    {
    unsigned int i;
    meshanim_t *meshanim = checkmeshanim(L, 1);
    lua_newtable(L);
    for(i = 0; i < meshanim->mNumKeys; i++)
        {
#define key meshanim->mKeys[i]
        lua_newtable(L);
        lua_pushnumber(L, key.mTime);
        lua_setfield(L, -2, "time");
        pushindex(L, key.mValue);
        lua_setfield(L, -2, "value");
        lua_rawseti(L, -2, i+1);
#undef key
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x495e(%rip), %rdx      # 0x11370
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpl $0x0, 0x404(%r14)
je 0xcac2
xorl %ebp, %ebp
leaq 0x4955(%rip), %r15      # 0x11397
leaq 0x4953(%rip), %r12      # 0x1139c
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movq 0x408(%r14), %rax
movsd (%rax,%rbp), %xmm0
movq %rbx, %rdi
callq 0x6500
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x62e0
movq 0x408(%r14), %rax
movl 0x8(%rax,%rbp), %esi
movq %rbx, %rdi
callq 0x64e0
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x62e0
incq %r13
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r13, %rdx
callq 0x6470
movl 0x404(%r14), %eax
addq $0x10, %rbp
cmpq %rax, %r13
jb 0xca4c
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/node.c
// Function: moonassimp_newnode
int newnode(lua_State *L, scene_t *scene, node_t *node)
/* recursively creates the userdata for the node and its children */
    {
    ud_t *ud;
    unsigned int i;
    TRACE_CREATE(node, "node");
    for(i = 0; i < node->mNumChildren; i++)
        {
        newnode(L, scene, node->mChildren[i]);
        lua_pop(L, 1);
        }
    ud = newuserdata(L, (void*)node, NODE_MT);
    ud->scene = scene;
    return 1;   
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x48e0(%rip), %rdi      # 0x113d0
movq %rdx, %rsi
xorl %eax, %eax
callq 0x6710
cmpl $0x0, 0x450(%r14)
je 0xcb39
xorl %r12d, %r12d
movq 0x458(%r14), %rax
movq (%rax,%r12,8), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6480
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r12
movl 0x450(%r14), %eax
cmpq %rax, %r12
jb 0xcb07
leaq 0x48a2(%rip), %rdx      # 0x113e2
movq %r15, %rdi
movq %r14, %rsi
callq 0x68c0
movq %rbx, 0x10(%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/node.c
// Function: moonassimp_freenode
int freenode(lua_State *L, node_t *node)
/* recursively deletes the userdata for the node and its children */
    {
    unsigned int i;
    for(i = 0; i < node->mNumChildren; i++)
        freenode(L, node->mChildren[i]);
    TRACE_DELETE(node, "node");
    freeuserdata(L, node);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0x450(%rsi)
je 0xcb98
xorl %r15d, %r15d
movq 0x458(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x63b0
incq %r15
movl 0x450(%rbx), %eax
cmpq %rax, %r15
jb 0xcb77
leaq 0x4853(%rip), %rdi      # 0x113f2
movq %rbx, %rsi
xorl %eax, %eax
callq 0x6710
movq %r14, %rdi
movq %rbx, %rsi
callq 0x63f0
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/node.c
// Function: Child
static int Child(lua_State *L)
    { 
    node_t *node = checknode(L, 1);
    unsigned int i = checkindex(L, 2);
    if(i >= node->mNumChildren)
        return luaL_argerror(L, 2, "out of range");
    return pushnode(L, node->mChildren[i]);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4716(%rip), %rdx      # 0x113e2
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
cmpl 0x450(%r14), %eax
jae 0xcd0b
movq 0x458(%r14), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6380
leaq 0x3497(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/node.c
// Function: Children
static int Children(lua_State *L)
    {
    unsigned int i;
    node_t *node = checknode(L, 1);
    lua_newtable(L);
    for(i = 0; i < node->mNumChildren; i++)
        {
        pushnode(L, node->mChildren[i]);
        lua_rawseti(L, -2, i+1);
        }
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x46ad(%rip), %rdx      # 0x113e2
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpl $0x0, 0x450(%r14)
je 0xcd8d
xorl %r15d, %r15d
movq 0x458(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x6380
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
movl 0x450(%r14), %eax
cmpq %rax, %r15
jb 0xcd5b
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/node.c
// Function: Mesh
static int Mesh(lua_State *L)
    {
#define scene ud->scene
    unsigned int index;
    node_t *node = checknode(L, 1);
    unsigned int i = checkindex(L, 2);
    ud_t *ud = userdata(node);
    if(i >= node->mNumMeshes)
        return luaL_argerror(L, 2, "out of range");
    index = node->mMeshes[i];
    if(index >= scene->mNumMeshes)
        return unexpected(L);   
    return pushmesh(L, scene->mMeshes[index]);
#undef scene
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x463c(%rip), %rdx      # 0x113e2
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
movl %eax, %ebp
movq %r14, %rdi
callq 0x6770
cmpl 0x460(%r14), %ebp
jae 0xcdfc
movq 0x468(%r14), %rcx
movl %ebp, %edx
movl (%rcx,%rdx,4), %ecx
movq 0x10(%rax), %rax
cmpl 0x10(%rax), %ecx
jae 0xce14
movq 0x18(%rax), %rax
movq (%rax,%rcx,8), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x6380
leaq 0x33a6(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x61c0
leaq 0x339b(%rip), %rsi      # 0x101b6
leaq 0x460f(%rip), %rdx      # 0x11431
movq %rbx, %rdi
movl $0x8d, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/node.c
// Function: Meshes
static int Meshes(lua_State *L)
    {
#define scene ud->scene
    unsigned int i, index;
    node_t *node = checknode(L, 1);
    ud_t *ud = userdata(node);
    lua_newtable(L);
    for(i = 0; i < node->mNumMeshes; i++)
        {
        index = node->mMeshes[i];
        if(index >= scene->mNumMeshes)
            return unexpected(L);   
        pushmesh(L, scene->mMeshes[index]);
        lua_rawseti(L, -2, i+1);
        }
    return 1;
#undef scene
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x459b(%rip), %rdx      # 0x113e2
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rax, %rdi
callq 0x6770
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpl $0x0, 0x460(%r14)
je 0xcebb
xorl %r12d, %r12d
movq 0x468(%r14), %rax
movl (%rax,%r12,4), %eax
movq 0x10(%r15), %rcx
cmpl 0x10(%rcx), %eax
jae 0xcecc
movq 0x18(%rcx), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x6380
incq %r12
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x6470
movl 0x460(%r14), %eax
cmpq %rax, %r12
jb 0xce78
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x32e3(%rip), %rsi      # 0x101b6
leaq 0x4557(%rip), %rdx      # 0x11431
movq %rbx, %rdi
movl $0x7a, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/nodeanim.c
// Function: moonassimp_newnodeanim
int newnodeanim(lua_State *L, scene_t *scene, animation_t *animation, nodeanim_t *nodeanim)
    {
    ud_t *ud;
//  TRACE_CREATE(nodeanim, "nodeanim");
    ud = newuserdata(L, (void*)nodeanim, NODEANIM_MT);
    ud->scene = scene;
    ud->animation = animation;
    return 1;   
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x4533(%rip), %rdx      # 0x11460
movq %rcx, %rsi
callq 0x68c0
movq %r14, 0x10(%rax)
movq %rbx, 0x28(%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/nodeanim.c
// Function: PositionKeys
static int PositionKeys(lua_State *L)
/* { key1, key2, ... }
 *
 * key1 = { time = 123.456, value = { x, y, z } }
 */
    {
    unsigned int i;
    nodeanim_t *nodeanim = checknodeanim(L, 1);
    lua_newtable(L);
    for(i = 0; i < nodeanim->mNumPositionKeys; i++)
        {
#define key nodeanim->mPositionKeys[i]
        lua_newtable(L);
        lua_pushnumber(L, key.mTime);
        lua_setfield(L, -2, "time");
        pushvector3(L, &(key.mValue), 1);
        lua_setfield(L, -2, "value");
        lua_rawseti(L, -2, i+1);
#undef key
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x440a(%rip), %rdx      # 0x11460
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpl $0x0, 0x404(%r14)
je 0xd10e
movl $0x8, %ebp
xorl %r15d, %r15d
leaq 0x430b(%rip), %r12      # 0x11397
leaq 0x4309(%rip), %r13      # 0x1139c
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movq 0x408(%r14), %rax
movsd -0x8(%rax,%rbp), %xmm0
movq %rbx, %rdi
callq 0x6500
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x62e0
movq 0x408(%r14), %rsi
addq %rbp, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x6600
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r13, %rdx
callq 0x62e0
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
movl 0x404(%r14), %eax
addq $0x18, %rbp
cmpq %rax, %r15
jb 0xd093
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/nodeanim.c
// Function: RotationKeys
static int RotationKeys(lua_State *L)
/* { key1, key2, ... }
 *
 * key1 = { time = 123.456, value = { w, x, y, z } }
 */
    {
    unsigned int i;
    nodeanim_t *nodeanim = checknodeanim(L, 1);
    lua_newtable(L);
    for(i = 0; i < nodeanim->mNumRotationKeys; i++)
        {
#define key nodeanim->mRotationKeys[i]
        lua_newtable(L);
        lua_pushnumber(L, key.mTime);
        lua_setfield(L, -2, "time");
        pushquaternion(L, &(key.mValue), 1);
        lua_setfield(L, -2, "value");
        lua_rawseti(L, -2, i+1);
#undef key
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4329(%rip), %rdx      # 0x11460
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpl $0x0, 0x410(%r14)
je 0xd1ef
movl $0x8, %ebp
xorl %r15d, %r15d
leaq 0x422a(%rip), %r12      # 0x11397
leaq 0x4228(%rip), %r13      # 0x1139c
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movq 0x418(%r14), %rax
movsd -0x8(%rax,%rbp), %xmm0
movq %rbx, %rdi
callq 0x6500
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x62e0
movq 0x418(%r14), %rsi
addq %rbp, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x6090
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r13, %rdx
callq 0x62e0
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
movl 0x410(%r14), %eax
addq $0x18, %rbp
cmpq %rax, %r15
jb 0xd174
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/nodeanim.c
// Function: ScalingKeys
static int ScalingKeys(lua_State *L)
/* { key1, key2, ... }
 *
 * key1 = { time = 123.456, value = { x, y, z } }
 */
    {
    unsigned int i;
    nodeanim_t *nodeanim = checknodeanim(L, 1);
    lua_newtable(L);
    for(i = 0; i < nodeanim->mNumScalingKeys; i++)
        {
#define key nodeanim->mScalingKeys[i]
        lua_newtable(L);
        lua_pushnumber(L, key.mTime);
        lua_setfield(L, -2, "time");
        pushvector3(L, &(key.mValue), 1);
        lua_setfield(L, -2, "value");
        lua_rawseti(L, -2, i+1);
#undef key
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4248(%rip), %rdx      # 0x11460
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpl $0x0, 0x420(%r14)
je 0xd2d0
movl $0x8, %ebp
xorl %r15d, %r15d
leaq 0x4149(%rip), %r12      # 0x11397
leaq 0x4147(%rip), %r13      # 0x1139c
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movq 0x428(%r14), %rax
movsd -0x8(%rax,%rbp), %xmm0
movq %rbx, %rdi
callq 0x6500
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x62e0
movq 0x428(%r14), %rsi
addq %rbp, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x6600
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r13, %rdx
callq 0x62e0
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
movl 0x420(%r14), %eax
addq $0x18, %rbp
cmpq %rax, %r15
jb 0xd255
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/scene.c
// Function: moonassimp_newscene
int newscene(lua_State *L, scene_t *scene)
/* recursively creates the userdata for the scene,
 * the root node and its children, and all other nested objects */
    {
    unsigned int i;
    TRACE_CREATE(scene, "scene");
    if(scene->mRootNode)
        {
        newnode(L, scene, scene->mRootNode);
        lua_pop(L, 1);
        }
#define New(what, newfunc) do {                     \
    for(i=0; i< scene->mNum##what; i++)             \
        { newfunc(L, scene, scene->m##what[i]); lua_pop(L, 1);  } } while(0)
    New(Meshes, newmesh);
    New(Materials, newmaterial);
    New(Lights, newlight);
    New(Textures, newtexture);
    New(Cameras, newcamera);
    New(Animations, newanimation);
#undef New
    newuserdata(L, (void*)scene, SCENE_MT);
    return 1;   
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x41b2(%rip), %rdi      # 0x114f0
xorl %eax, %eax
callq 0x6710
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
je 0xd366
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6480
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
cmpl $0x0, 0x10(%rbx)
je 0xd39a
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6140
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r15
movl 0x10(%rbx), %eax
cmpq %rax, %r15
jb 0xd36f
cmpl $0x0, 0x20(%rbx)
je 0xd3ce
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6700
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r15
movl 0x20(%rbx), %eax
cmpq %rax, %r15
jb 0xd3a3
cmpl $0x0, 0x50(%rbx)
je 0xd402
xorl %r15d, %r15d
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6220
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r15
movl 0x50(%rbx), %eax
cmpq %rax, %r15
jb 0xd3d7
cmpl $0x0, 0x40(%rbx)
je 0xd436
xorl %r15d, %r15d
movq 0x48(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6150
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r15
movl 0x40(%rbx), %eax
cmpq %rax, %r15
jb 0xd40b
cmpl $0x0, 0x60(%rbx)
je 0xd46a
xorl %r15d, %r15d
movq 0x68(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x68e0
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r15
movl 0x60(%rbx), %eax
cmpq %rax, %r15
jb 0xd43f
cmpl $0x0, 0x30(%rbx)
je 0xd49e
xorl %r15d, %r15d
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6890
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r15
movl 0x30(%rbx), %eax
cmpq %rax, %r15
jb 0xd473
leaq 0x3449(%rip), %rdx      # 0x108ee
movq %r14, %rdi
movq %rbx, %rsi
callq 0x68c0
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/scene.c
// Function: Mesh
static int Mesh(lua_State *L)
    {
    scene_t *scene = checkscene(L, 1);
    unsigned int i = checkindex(L, 2); /* 1-based */
    if(i > scene->mNumMeshes)
        return luaL_argerror(L, 2, "out of range");
    pushmesh(L, scene->mMeshes[i]);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2f1d(%rip), %rdx      # 0x108ee
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
cmpl 0x10(%r14), %eax
jbe 0xda0c
leaq 0x27b1(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x61c0
movq 0x18(%r14), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x6380
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/scene.c
// Function: Meshes
static int Meshes(lua_State *L)
    {
    unsigned int i;
    scene_t *scene = checkscene(L, 1);
    lua_newtable(L);
    for(i = 0; i < scene->mNumMeshes; i++)
        {
        pushmesh(L, scene->mMeshes[i]);
        lua_rawseti(L, -2, i+1);
        }
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2eb4(%rip), %rdx      # 0x108ee
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpl $0x0, 0x10(%r14)
je 0xda89
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x6380
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
movl 0x10(%r14), %eax
cmpq %rax, %r15
jb 0xda5d
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/scene.c
// Function: Delete
static int Delete(lua_State *L)
    {
    unsigned int i;
    scene_t *scene = testscene(L, 1);
    if(!scene) return 0; /* already deleted */
    /* first, release all userdata */
#define Free(what, freefunc) do {                   \
    if(scene->mNum##what > 0)                       \
        {                                           \
        for(i=0; i < scene->mNum##what; i++)        \
            freefunc(L, scene->m##what[i]);         \
        }                                           \
} while(0)
    Free(Meshes, freemesh);
    Free(Materials, freematerial);
    Free(Lights, freelight);
    Free(Textures, freetexture);
    Free(Cameras, freecamera);
    Free(Animations, freeanimation);
#undef Free
    if(scene->mRootNode)
        freenode(L, scene->mRootNode);
    TRACE_DELETE(scene, "scene");
    freeuserdata(L, scene);
    /* finally, release the scene */
    aiReleaseImport(scene);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2c6d(%rip), %rdx      # 0x108ee
movl $0x1, %esi
callq 0x65b0
testq %rax, %rax
je 0xddaf
movq %rax, %r14
cmpl $0x0, 0x10(%rax)
je 0xdcbc
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x6510
incq %r15
movl 0x10(%r14), %eax
cmpq %rax, %r15
jb 0xdca0
cmpl $0x0, 0x20(%r14)
je 0xdce2
xorl %r15d, %r15d
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x6690
incq %r15
movl 0x20(%r14), %eax
cmpq %rax, %r15
jb 0xdcc6
cmpl $0x0, 0x50(%r14)
je 0xdd08
xorl %r15d, %r15d
movq 0x58(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x6880
incq %r15
movl 0x50(%r14), %eax
cmpq %rax, %r15
jb 0xdcec
cmpl $0x0, 0x40(%r14)
je 0xdd2e
xorl %r15d, %r15d
movq 0x48(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x67f0
incq %r15
movl 0x40(%r14), %eax
cmpq %rax, %r15
jb 0xdd12
cmpl $0x0, 0x60(%r14)
je 0xdd54
xorl %r15d, %r15d
movq 0x68(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x66d0
incq %r15
movl 0x60(%r14), %eax
cmpq %rax, %r15
jb 0xdd38
cmpl $0x0, 0x30(%r14)
je 0xdd7a
xorl %r15d, %r15d
movq 0x38(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x60d0
incq %r15
movl 0x30(%r14), %eax
cmpq %rax, %r15
jb 0xdd5e
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0xdd8b
movq %rbx, %rdi
callq 0x63b0
leaq 0x380d(%rip), %rdi      # 0x1159f
movq %r14, %rsi
xorl %eax, %eax
callq 0x6710
movq %rbx, %rdi
movq %r14, %rsi
callq 0x63f0
movq %r14, %rdi
callq 0x6060
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/texture.c
// Function: moonassimp_newtexture
int newtexture(lua_State *L, scene_t *scene, texture_t *texture)
    {
    ud_t *ud;
    TRACE_CREATE(texture, "texture");
    ud = newuserdata(L, (void*)texture, TEXTURE_MT);
    ud->scene = scene;
    return 1;   
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x37f4(%rip), %rdi      # 0x115c1
movq %rdx, %rsi
xorl %eax, %eax
callq 0x6710
leaq 0x37f8(%rip), %rdx      # 0x115d6
movq %r15, %rdi
movq %rbx, %rsi
callq 0x68c0
movq %r14, 0x10(%rax)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq