LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/phluid61[P]hsf/src/item.c
// Function: SH_Item__to_s
sh_char_t*
SH_Item__to_s(SH_Item* obj, int* err) {
	sh_char_t* obj_s;
	sh_char_t* tmp_s;
	sh_char_t* s;
	sh_char_t* ptr;

	size_t i;
	size_t n;
	size_t total;

	__sh_item__string str;
	str.length = (size_t)0;
	str.n = (size_t)0;

	obj_s = SH_BareItem__to_s(obj->item, err);
	__cascade(err, (sh_char_t*)0);

	SH_dict__each(obj->params, &__SH_Item__to_s_param, (void*)(&str), err);
	if (__catch(err)) {
		free(obj_s);
		for (i = 0; i < str.n; i++) {
			free(str.a[i]);
		}
		__cascade(err, (sh_char_t*)0);
	}

	n = strlen((const char*)obj_s);

	total = n;
	total += str.length;
	total += str.n; /* ';' and '=' for every pair */
	total += 1; /* NULL */

	s = (sh_char_t*)malloc(sizeof(sh_char_t) * total);
	if ((sh_char_t*)0 == s) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (sh_char_t*)0;
	}

	ptr = s;

	if (n > 0) {
		memcpy((void*)ptr, (const void*)obj_s, n);
		free(obj_s);
		ptr += n;
	}

	for (i = 0; i < str.n; i++) {
		tmp_s = str.a[i];

		/* if the string is NULL, it was (probably) a SH_TRUE value, so don't emit anything */
		if ((sh_char_t*)0 != tmp_s) {
			*ptr = (i % 2 ? SH_CHAR_C('=') : SH_CHAR_C(';'));
			ptr ++;

			n = strlen((const char*)tmp_s);
			memcpy((void*)ptr, (const void*)tmp_s, n);
			free(str.a[i]);
			ptr += n;
		}
	}

	*ptr = SH_CHAR_C(0);

	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq (%rdi), %rdi
callq 0x10f0
movq %rax, %r14
testq %r15, %r15
je 0x1552
cmpl $0x0, (%r15)
jne 0x1625
movq 0x8(%rbx), %rdi
movq 0x2ad1(%rip), %rsi      # 0x3fe0
movq %rsp, %rdx
movq %r15, %rcx
callq 0x1080
cmpl $0x0, (%r15)
je 0x1568
movq %r14, %rdi
callq 0x1040
cmpq $0x0, 0x8(%rsp)
je 0x1546
xorl %ebx, %ebx
movq 0x10(%rsp,%rbx,8), %rdi
callq 0x1040
incq %rbx
cmpq 0x8(%rsp), %rbx
jb 0x1532
cmpl $0x0, (%r15)
jne 0x1625
jmp 0x1568
movq 0x8(%rbx), %rdi
movq 0x2a83(%rip), %rsi      # 0x3fe0
movq %rsp, %rdx
movq %r15, %rcx
callq 0x1080
movq %r14, %rdi
callq 0x1070
movq %rax, %r12
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
addq %r12, %rcx
leaq (%rax,%rcx), %rdi
incq %rdi
callq 0x10d0
testq %rax, %rax
je 0x1619
movq %rax, %rbx
movq %rax, %r13
testq %r12, %r12
je 0x15bb
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x10c0
movq %r14, %rdi
callq 0x1040
movq %rbx, %r13
addq %r12, %r13
cmpq $0x0, 0x8(%rsp)
je 0x1612
xorl %ebp, %ebp
movq 0x10(%rsp,%rbp,8), %r14
testq %r14, %r14
je 0x1608
movl %ebp, %eax
andb $0x1, %al
addb %al, %al
addb $0x3b, %al
movb %al, (%r13)
leaq 0x1(%r13), %r15
movq %r14, %rdi
callq 0x1070
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x10c0
movq 0x10(%rsp,%rbp,8), %rdi
callq 0x1040
addq %r12, %r13
incq %r13
incq %rbp
cmpq 0x8(%rsp), %rbp
jb 0x15c5
movb $0x0, (%r13)
jmp 0x1627
testq %r15, %r15
je 0x1625
movl $0x80000001, (%r15)     # imm = 0x80000001
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/additional.c
// Function: Textureflags
static int Textureflags(lua_State *L)
    {
    if(lua_type(L, 1) == LUA_TNUMBER)
        return pushtextureflags(L, luaL_checkinteger(L, 1), 0);
    lua_pushinteger(L, checktextureflags(L, 1));
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x68d0
movq %rbx, %rdi
movl $0x1, %esi
cmpl $0x3, %eax
jne 0x6ad7
callq 0x6430
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
popq %rbx
jmp 0x6200
callq 0x60f0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/additional.c
// Function: Primtypes
static int Primtypes(lua_State *L)
    {
    if(lua_type(L, 1) == LUA_TNUMBER)
        return pushprimitivetype(L, luaL_checkinteger(L, 1), 0);
    lua_pushinteger(L, checkprimitivetype(L, 1));
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x68d0
movq %rbx, %rdi
movl $0x1, %esi
cmpl $0x3, %eax
jne 0x6b1a
callq 0x6430
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
popq %rbx
jmp 0x66a0
callq 0x6400
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/additional.c
// Function: Postprocessflags
static int Postprocessflags(lua_State *L)
    {
    if(lua_type(L, 1) == LUA_TNUMBER)
        return pushpostprocessflags(L, luaL_checkinteger(L, 1), 0);
    lua_pushinteger(L, checkpostprocessflags(L, 1));
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x68d0
movq %rbx, %rdi
movl $0x1, %esi
cmpl $0x3, %eax
jne 0x6b5d
callq 0x6430
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
popq %rbx
jmp 0x6210
callq 0x6260
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/additional.c
// Function: Sceneflags
static int Sceneflags(lua_State *L)
    {
    if(lua_type(L, 1) == LUA_TNUMBER)
        return pushsceneflags(L, luaL_checkinteger(L, 1), 0);
    lua_pushinteger(L, checksceneflags(L, 1));
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x68d0
movq %rbx, %rdi
movl $0x1, %esi
cmpl $0x3, %eax
jne 0x6ba0
callq 0x6430
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
popq %rbx
jmp 0x65a0
callq 0x6660
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/animation.c
// Function: moonassimp_newanimation
int newanimation(lua_State *L, scene_t *scene, animation_t *animation)
    {
    unsigned int i;
    ud_t *ud;
    TRACE_CREATE(animation, "animation");
    if(animation->mChannels != NULL && animation->mNumChannels > 0)
        {
        for(i = 0; i < animation->mNumChannels; i++)
            { newnodeanim(L, scene, animation, animation->mChannels[i]); lua_pop(L, 1); }
        TRACE_CREATE_N(i, "nodeanims");
        }
    if(animation->mMeshChannels != NULL && animation->mNumMeshChannels > 0)
        {
        for(i = 0; i < animation->mNumMeshChannels; i++)
            { newmeshanim(L, scene, animation, animation->mMeshChannels[i]); lua_pop(L, 1); }
        TRACE_CREATE_N(i, "meshanims");
        }
    ud = newuserdata(L, (void*)animation, ANIMATION_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 0x9463(%rip), %rdi      # 0x10033
movq %rdx, %rsi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0x420(%r14)
je 0x6c46
cmpl $0x0, 0x418(%r14)
je 0x6c46
cmpl $0x0, 0x418(%r14)
je 0x6c32
xorl %r12d, %r12d
movq 0x420(%r14), %rax
movq (%rax,%r12,8), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6100
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r12
movl 0x418(%r14), %eax
cmpq %rax, %r12
jb 0x6bfb
jmp 0x6c35
xorl %r12d, %r12d
leaq 0x940e(%rip), %rdi      # 0x1004a
movl %r12d, %esi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0x430(%r14)
je 0x6cb2
cmpl $0x0, 0x428(%r14)
je 0x6cb2
cmpl $0x0, 0x428(%r14)
je 0x6c9e
xorl %r12d, %r12d
movq 0x430(%r14), %rax
movq (%rax,%r12,8), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6480
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60c0
incq %r12
movl 0x428(%r14), %eax
cmpq %rax, %r12
jb 0x6c67
jmp 0x6ca1
xorl %r12d, %r12d
leaq 0x93b7(%rip), %rdi      # 0x1005f
movl %r12d, %esi
xorl %eax, %eax
callq 0x6710
leaq 0x93bb(%rip), %rdx      # 0x10074
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_O1/stetre[P]moonassimp/src/animation.c
// Function: moonassimp_freeanimation
int freeanimation(lua_State *L, animation_t *animation)
    {
    unsigned int i;
    if(animation->mChannels != NULL && animation->mNumChannels > 0)
        {
        for(i = 0; i < animation->mNumChannels; i++)
            freenodeanim(L, animation->mChannels[i]);
        TRACE_DELETE_N(i, "nodeanims");
        }
    if(animation->mMeshChannels != NULL && animation->mNumMeshChannels > 0)
        {
        for(i = 0; i < animation->mNumMeshChannels; i++)
            freemeshanim(L, animation->mMeshChannels[i]);
        TRACE_DELETE_N(i, "meshanims");
        }
    TRACE_DELETE(animation, "animation");

    freeuserdata(L, animation);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x420(%rsi)
je 0x6d3a
cmpl $0x0, 0x418(%rbx)
je 0x6d3a
cmpl $0x0, 0x418(%rbx)
je 0x6d26
xorl %r15d, %r15d
movq 0x420(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x6840
incq %r15
movl 0x418(%rbx), %eax
cmpq %rax, %r15
jb 0x6d03
jmp 0x6d29
xorl %r15d, %r15d
leaq 0x9359(%rip), %rdi      # 0x10089
movl %r15d, %esi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0x430(%rbx)
je 0x6d90
cmpl $0x0, 0x428(%rbx)
je 0x6d90
cmpl $0x0, 0x428(%rbx)
je 0x6d7c
xorl %r15d, %r15d
movq 0x430(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x6970
incq %r15
movl 0x428(%rbx), %eax
cmpq %rax, %r15
jb 0x6d59
jmp 0x6d7f
xorl %r15d, %r15d
leaq 0x9318(%rip), %rdi      # 0x1009e
movl %r15d, %esi
xorl %eax, %eax
callq 0x6710
leaq 0x931c(%rip), %rdi      # 0x100b3
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_O1/stetre[P]moonassimp/src/animation.c
// Function: Channel
static int Channel(lua_State *L)
/* nodeanim = animation:node_anim(node_name) */
    {
    unsigned int i;
    animation_t *animation = checkanimation(L, 1);
    const char *name = luaL_checkstring(L, 2);
    if(animation->mChannels == NULL || animation->mNumChannels == 0) return 0;
    for(i = 0; i < animation->mNumChannels; i++)
        {
#define nodename animation->mChannels[i]->mNodeName
        if(strncmp(name, nodename.data, nodename.length) == 0) /* found */
            {
            pushnodeanim(L, animation->mChannels[i]);
            return 1;
            }
#undef nodename
        }
    return 0; /* not found */
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x91ba(%rip), %rdx      # 0x10074
movl $0x1, %esi
callq 0x66f0
movq %rax, %r12
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x6370
movq 0x420(%r12), %r13
testq %r13, %r13
je 0x6f2e
movl 0x418(%r12), %r12d
testq %r12, %r12
je 0x6f2e
movq %rax, %r14
xorl %ebp, %ebp
movq (%r13,%rbp,8), %r15
leaq 0x4(%r15), %rsi
movl (%r15), %edx
movq %r14, %rdi
callq 0x6120
testl %eax, %eax
je 0x6f1d
incq %rbp
cmpq %rbp, %r12
jne 0x6ef8
xorl %r15d, %r15d
jmp 0x6f2e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6380
movl $0x1, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/animation.c
// Function: Channels
static int Channels(lua_State *L)
    {
    unsigned int i;
    animation_t *animation = checkanimation(L, 1);
    lua_newtable(L);
    if(animation->mChannels == NULL || animation->mNumChannels == 0) return 1;
    for(i = 0; i < animation->mNumChannels; i++)
        {
        pushnodeanim(L, animation->mChannels[i]);
        lua_rawseti(L, -2, i+1);
        }
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x9125(%rip), %rdx      # 0x10074
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0x420(%r14)
je 0x6fbb
cmpl $0x0, 0x418(%r14)
je 0x6fbb
cmpl $0x0, 0x418(%r14)
je 0x6fbb
xorl %r15d, %r15d
movq 0x420(%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 0x6460
movl 0x418(%r14), %eax
cmpq %rax, %r15
jb 0x6f89
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/animation.c
// Function: MeshChannels
static int MeshChannels(lua_State *L)
    {
    unsigned int i;
    animation_t *animation = checkanimation(L, 1);
    const char *name = luaL_optstring(L, 2, NULL);
    lua_newtable(L);
    if(animation->mMeshChannels == NULL || animation->mNumMeshChannels == 0) return 1;
    for(i = 0; i < animation->mNumMeshChannels; i++)
        {
#define maname animation->mMeshChannels[i]->mName
        if(!name || (strncmp(name, maname.data, maname.length) == 0))
            {
            pushmeshanim(L, animation->mMeshChannels[i]);
            lua_rawseti(L, -2, i+1);
            }
#undef maname
        }
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9072(%rip), %rdx      # 0x10074
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x6270
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0x430(%r14)
je 0x70a6
cmpl $0x0, 0x428(%r14)
je 0x70a6
cmpl $0x0, 0x428(%r14)
je 0x70a6
xorl %r12d, %r12d
testq %r15, %r15
je 0x7072
movq 0x430(%r14), %rax
movq (%rax,%r12,8), %rsi
movl (%rsi), %edx
addq $0x4, %rsi
movq %r15, %rdi
callq 0x6120
testl %eax, %eax
jne 0x7097
movq 0x430(%r14), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
callq 0x6380
leaq 0x1(%r12), %rdx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x6460
incq %r12
movl 0x428(%r14), %eax
cmpq %rax, %r12
jb 0x7050
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/animmesh.c
// Function: moonassimp_newanimmesh
int newanimmesh(lua_State *L, scene_t *scene, mesh_t *mesh, animmesh_t *animmesh)
    {
    ud_t *ud;
//  TRACE_CREATE(animmesh, "animmesh");
    ud = newuserdata(L, (void*)animmesh, ANIMMESH_MT);
    ud->scene = scene;
    ud->mesh = mesh;
    return 1;   
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x9067(%rip), %rdx      # 0x10130
movq %rcx, %rsi
callq 0x68c0
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/animmesh.c
// Function: Mesh
static int Mesh(lua_State *L)
    {
    animmesh_t *animmesh = checkanimmesh(L, 1);
    ud_t *ud = userdata(animmesh);
    mesh_t *mesh = ud->mesh;
    return pushmesh(L, mesh);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x9005(%rip), %rdx      # 0x10130
movl $0x1, %esi
callq 0x66f0
movq %rax, %rdi
callq 0x6770
movq 0x18(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x6380
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/animmesh.c
// Function: HasColors
static int HasColors(lua_State *L)
    {
    animmesh_t *animmesh = checkanimmesh(L, 1);
    unsigned int i = checkindex(L, 2);
    if( i >= AI_MAX_NUMBER_OF_COLOR_SETS )
        lua_pushboolean(L, 0);
    else
        lua_pushboolean(L, animmesh->mColors[i] != NULL);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8f42(%rip), %rdx      # 0x10130
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
xorl %esi, %esi
cmpl $0x7, %eax
ja 0x7220
movl %eax, %eax
xorl %esi, %esi
cmpq $0x0, 0x428(%r14,%rax,8)
setne %sil
movq %rbx, %rdi
callq 0x6530
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/animmesh.c
// Function: HasTextureCoords
static int HasTextureCoords(lua_State *L)
    {
    animmesh_t *animmesh = checkanimmesh(L, 1);
    unsigned int i = checkindex(L, 2);
    if( i >= AI_MAX_NUMBER_OF_TEXTURECOORDS )
        lua_pushboolean(L, 0);
    else
        lua_pushboolean(L, animmesh->mTextureCoords[i] != NULL);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8eed(%rip), %rdx      # 0x10130
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
xorl %esi, %esi
cmpl $0x7, %eax
ja 0x7275
movl %eax, %eax
xorl %esi, %esi
cmpq $0x0, 0x468(%r14,%rax,8)
setne %sil
movq %rbx, %rdi
callq 0x6530
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/animmesh.c
// Function: Color
static int Color(lua_State *L)
    {
    animmesh_t *animmesh = checkanimmesh(L, 1);
    unsigned int chan = checkindex(L, 2);
    unsigned int i = checkindex(L, 3);
    if( chan >= AI_MAX_NUMBER_OF_COLOR_SETS || animmesh->mColors[chan] == NULL)
        return luaL_argerror(L, 2, "out of range");
    if( i >= animmesh->mNumVertices)
        return luaL_argerror(L, 3, "out of range");
    return pushcolor4(L, &(animmesh->mColors[chan][i]), 0);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8ccc(%rip), %rdx      # 0x10130
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 0x74c1
movl %ebp, %ecx
movq 0x428(%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0x74c1
cmpl 0x4a8(%r14), %eax
jae 0x74d9
movl %eax, %eax
shlq $0x4, %rax
addq %rax, %rsi
movq %rbx, %rdi
xorl %edx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x62d0
leaq 0x8ce1(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x61c0
leaq 0x8cc9(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x3, %esi
jmp 0x74d0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/animmesh.c
// Function: TextureCoords
static int TextureCoords(lua_State *L)
    {
    vector3_t *coords;
    vector2_t vec2;
    unsigned int ncomp;
    animmesh_t *animmesh = checkanimmesh(L, 1);
    ud_t *ud = userdata(animmesh);
    mesh_t *mesh = ud->mesh;
    unsigned int chan = checkindex(L, 2);
    unsigned int i = checkindex(L, 3);
    if( chan >= AI_MAX_NUMBER_OF_TEXTURECOORDS || animmesh->mTextureCoords[chan] == NULL)
        return luaL_argerror(L, 2, "out of range");
    if( i >= animmesh->mNumVertices)
        return luaL_argerror(L, 3, "out of range");
    ncomp = mesh->mNumUVComponents[chan]; /* no. of components */
    coords =  &(animmesh->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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8c35(%rip), %rdx      # 0x10130
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rax, %rdi
callq 0x6770
movq 0x18(%rax), %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x6310
cmpl $0x7, %ebp
ja 0x7582
movl %ebp, %edx
movq 0x468(%r14,%rdx,8), %rcx
testq %rcx, %rcx
je 0x7582
cmpl 0x4a8(%r14), %eax
jae 0x75a0
movl 0xb0(%r15,%rdx,4), %edx
movl %eax, %eax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,4), %rsi
cmpl $0x1, %edx
je 0x75c8
cmpl $0x2, %edx
je 0x75b1
cmpl $0x3, %edx
jne 0x75e4
movq %rbx, %rdi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6600
leaq 0x8c20(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x61c0
leaq 0x8c02(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x3, %esi
jmp 0x7591
movsd (%rsi), %xmm0
movq %rsp, %rsi
movsd %xmm0, (%rsi)
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6170
jmp 0x75d9
cvtss2sd (%rsi), %xmm0
movq %rbx, %rdi
callq 0x64f0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8bcb(%rip), %rsi      # 0x101b6
leaq 0x8bde(%rip), %rdx      # 0x101d0
movq %rbx, %rdi
movl $0xa5, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x67a0
nop
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/bitfields.c
// Function: moonassimp_checktextureflags
unsigned int checktextureflags(lua_State *L, int arg)
/* Accepts an integer or a list of strings starting from index=arg */
    {
    unsigned int flags = 0;
    const char *s;
    
    if(lua_type(L, arg) == LUA_TNUMBER)
        return (unsigned int)luaL_checkinteger(L, arg);

    while(lua_isstring(L, arg))
        {
        s = lua_tostring(L, arg++);
#define CASE(CODE,str) if((strcmp(s, str)==0)) do { flags |= CODE; goto done; } while(0)
    CASE(aiTextureFlags_Invert, "invert");
    CASE(aiTextureFlags_UseAlpha, "use alpha");
    CASE(aiTextureFlags_IgnoreAlpha, "ignore alpha");
#undef CASE
        return (unsigned int)luaL_argerror(L, --arg, badvalue(L,s));
        done: ;
        }
    return flags;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x68d0
cmpl $0x3, %eax
jne 0x7638
movq %r14, %rdi
movl %ebx, %esi
callq 0x6430
movq %rax, %r15
jmp 0x76bd
movq %r14, %rdi
movl %ebx, %esi
callq 0x69b0
xorl %r15d, %r15d
testl %eax, %eax
je 0x76bd
leaq 0x8bb0(%rip), %r12      # 0x10200
leaq 0x8bb0(%rip), %r13      # 0x10207
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x61e0
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0x6410
testl %eax, %eax
je 0x769e
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6410
testl %eax, %eax
je 0x76a5
movq %rbp, %rdi
leaq 0x8b83(%rip), %rsi      # 0x10211
callq 0x6410
movl $0x4, %ecx
testl %eax, %eax
je 0x76aa
jmp 0x76cf
movl $0x1, %ecx
jmp 0x76aa
movl $0x2, %ecx
orl %ecx, %r15d
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x69b0
testl %eax, %eax
jne 0x7657
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8b48(%rip), %rsi      # 0x1021e
movq %r14, %rdi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x63d0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/bitfields.c
// Function: moonassimp_pushtextureflags
int pushtextureflags(lua_State *L, unsigned int flags, int pushcode)
/* Pushes an integer followed by a list of strings */
    {
    int n = 0;
    if(pushcode)
        { lua_pushinteger(L, flags); return 1; }

#define CASE(CODE,str) do { if( flags & CODE) { lua_pushstring(L, str); n++; } } while(0)
    CASE(aiTextureFlags_Invert, "invert");
    CASE(aiTextureFlags_UseAlpha, "use alpha");
    CASE(aiTextureFlags_IgnoreAlpha, "ignore alpha");
#undef CASE
    if(flags==0) { lua_pushstring(L, "none"); n++; }
    return n;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
testl %edx, %edx
je 0x771e
movl %r14d, %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %ebp
jmp 0x777e
xorl %ebp, %ebp
testb $0x1, %r14b
je 0x773a
leaq 0x8ad3(%rip), %rsi      # 0x10200
movq %rbx, %rdi
callq 0x6920
movl $0x1, %ebp
testb $0x2, %r14b
je 0x7751
leaq 0x8ac0(%rip), %rsi      # 0x10207
movq %rbx, %rdi
callq 0x6920
incl %ebp
testb $0x4, %r14b
je 0x7768
leaq 0x8ab3(%rip), %rsi      # 0x10211
movq %rbx, %rdi
callq 0x6920
incl %ebp
testl %r14d, %r14d
jne 0x777e
leaq 0x8abd(%rip), %rsi      # 0x10231
movq %rbx, %rdi
callq 0x6920
incl %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/bitfields.c
// Function: moonassimp_checkprimitivetype
unsigned int checkprimitivetype(lua_State *L, int arg)
/* Accepts an integer or a list of strings starting from index=arg */
    {
    unsigned int flags = 0;
    const char *s;
    
    if(lua_type(L, arg) == LUA_TNUMBER)
        return (unsigned int)luaL_checkinteger(L, arg);

    while(lua_isstring(L, arg))
        {
        s = lua_tostring(L, arg++);
#define CASE(CODE,str) if((strcmp(s, str)==0)) do { flags |= CODE; goto done; } while(0)
    CASE(aiPrimitiveType_POINT, "point");
    CASE(aiPrimitiveType_LINE, "line");
    CASE(aiPrimitiveType_TRIANGLE, "triangle");
    CASE(aiPrimitiveType_POLYGON, "polygon");
#undef CASE
        return (unsigned int)luaL_argerror(L, --arg, badvalue(L,s));
        done: ;
        }
    return flags;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x68d0
cmpl $0x3, %eax
jne 0x77b1
movq %r14, %rdi
movl %ebx, %esi
callq 0x6430
movq %rax, %r15
jmp 0x7854
movq %r14, %rdi
movl %ebx, %esi
callq 0x69b0
xorl %r15d, %r15d
testl %eax, %eax
je 0x7854
leaq 0x8a69(%rip), %r12      # 0x10236
leaq 0x8a68(%rip), %r13      # 0x1023c
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x61e0
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0x6410
testl %eax, %eax
je 0x782e
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6410
testl %eax, %eax
je 0x7835
movq %rbp, %rdi
leaq 0x8a36(%rip), %rsi      # 0x10241
callq 0x6410
testl %eax, %eax
je 0x783c
movq %rbp, %rdi
leaq 0x8a2c(%rip), %rsi      # 0x1024a
callq 0x6410
movl $0x8, %ecx
testl %eax, %eax
je 0x7841
jmp 0x7866
movl $0x1, %ecx
jmp 0x7841
movl $0x2, %ecx
jmp 0x7841
movl $0x4, %ecx
orl %ecx, %r15d
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x69b0
testl %eax, %eax
jne 0x77d4
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x89b1(%rip), %rsi      # 0x1021e
movq %r14, %rdi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x63d0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/bitfields.c
// Function: moonassimp_pushprimitivetype
int pushprimitivetype(lua_State *L, unsigned int flags, int pushcode)
/* Pushes an integer followed by a list of strings */
    {
    int n = 0;
    if(pushcode)
        { lua_pushinteger(L, flags); return 1; }

#define CASE(CODE,str) do { if( flags & CODE) { lua_pushstring(L, str); n++; } } while(0)
    CASE(aiPrimitiveType_POINT, "point");
    CASE(aiPrimitiveType_LINE, "line");
    CASE(aiPrimitiveType_TRIANGLE, "triangle");
    CASE(aiPrimitiveType_POLYGON, "polygon");
#undef CASE
    if(flags==0) { lua_pushstring(L, "none"); n++; }
    return n;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
testl %edx, %edx
je 0x78b5
movl %r14d, %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %ebp
jmp 0x792c
xorl %ebp, %ebp
testb $0x1, %r14b
je 0x78d1
leaq 0x8972(%rip), %rsi      # 0x10236
movq %rbx, %rdi
callq 0x6920
movl $0x1, %ebp
testb $0x2, %r14b
je 0x78e8
leaq 0x895e(%rip), %rsi      # 0x1023c
movq %rbx, %rdi
callq 0x6920
incl %ebp
testb $0x4, %r14b
je 0x78ff
leaq 0x894c(%rip), %rsi      # 0x10241
movq %rbx, %rdi
callq 0x6920
incl %ebp
testb $0x8, %r14b
je 0x7916
leaq 0x893e(%rip), %rsi      # 0x1024a
movq %rbx, %rdi
callq 0x6920
incl %ebp
testl %r14d, %r14d
jne 0x792c
leaq 0x890f(%rip), %rsi      # 0x10231
movq %rbx, %rdi
callq 0x6920
incl %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/bitfields.c
// Function: moonassimp_checksceneflags
unsigned int checksceneflags(lua_State *L, int arg)
/* Accepts an integer or a list of strings starting from index=arg */
    {
    unsigned int flags = 0;
    const char *s;
    
    if(lua_type(L, arg) == LUA_TNUMBER)
        return (unsigned int)luaL_checkinteger(L, arg);

    while(lua_isstring(L, arg))
        {
        s = lua_tostring(L, arg++);
#define CASE(CODE,str) if((strcmp(s, str)==0)) do { flags |= CODE; goto done; } while(0)
        CASE(0, "none");
        CASE(AI_SCENE_FLAGS_INCOMPLETE, "incomplete");
        CASE(AI_SCENE_FLAGS_VALIDATED, "validated");
        CASE(AI_SCENE_FLAGS_VALIDATION_WARNING, "validation warning");
        CASE(AI_SCENE_FLAGS_NON_VERBOSE_FORMAT, "non verbose format");
        CASE(AI_SCENE_FLAGS_TERRAIN, "terrain");
#undef CASE
        return (unsigned int)luaL_argerror(L, --arg, badvalue(L,s));
        done: ;
        }
    return flags;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x68d0
cmpl $0x3, %eax
jne 0x795f
movq %r14, %rdi
movl %ebx, %esi
callq 0x6430
movq %rax, %r15
jmp 0x7a2b
movq %r14, %rdi
movl %ebx, %esi
callq 0x69b0
xorl %r15d, %r15d
testl %eax, %eax
je 0x7a2b
leaq 0x88b6(%rip), %r12      # 0x10231
leaq 0x88d0(%rip), %r13      # 0x10252
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x61e0
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0x6410
testl %eax, %eax
je 0x7a17
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6410
testl %eax, %eax
je 0x7a01
movq %rbp, %rdi
leaq 0x88a4(%rip), %rsi      # 0x1025d
callq 0x6410
testl %eax, %eax
je 0x7a07
movq %rbp, %rdi
leaq 0x889b(%rip), %rsi      # 0x10267
callq 0x6410
testl %eax, %eax
je 0x7a0d
movq %rbp, %rdi
leaq 0x889b(%rip), %rsi      # 0x1027a
callq 0x6410
testl %eax, %eax
je 0x7a13
movq %rbp, %rdi
leaq 0x889b(%rip), %rsi      # 0x1028d
callq 0x6410
testl %eax, %eax
jne 0x7a3d
orl $0x10, %r15d
jmp 0x7a17
orl $0x1, %r15d
jmp 0x7a17
orl $0x2, %r15d
jmp 0x7a17
orl $0x4, %r15d
jmp 0x7a17
orl $0x8, %r15d
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x69b0
testl %eax, %eax
jne 0x7982
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x87da(%rip), %rsi      # 0x1021e
movq %r14, %rdi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x63d0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/bitfields.c
// Function: moonassimp_pushsceneflags
int pushsceneflags(lua_State *L, unsigned int flags, int pushcode)
/* Pushes an integer followed by a list of strings */
    {
    int n = 0;
    if(pushcode)
        { lua_pushinteger(L, flags); return 1; }

#define CASE(CODE,str) do { if( flags & CODE) { lua_pushstring(L, str); n++; } } while(0)
        CASE(AI_SCENE_FLAGS_INCOMPLETE, "incomplete");
        CASE(AI_SCENE_FLAGS_VALIDATED, "validated");
        CASE(AI_SCENE_FLAGS_VALIDATION_WARNING, "validation warning");
        CASE(AI_SCENE_FLAGS_NON_VERBOSE_FORMAT, "non verbose format");
        CASE(AI_SCENE_FLAGS_TERRAIN, "terrain");
#undef CASE
    if(flags==0) { lua_pushstring(L, "none"); n++; }
    return n;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
testl %edx, %edx
je 0x7a8f
movl %r14d, %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %ebp
jmp 0x7b1d
xorl %ebp, %ebp
testb $0x1, %r14b
je 0x7aab
leaq 0x87b4(%rip), %rsi      # 0x10252
movq %rbx, %rdi
callq 0x6920
movl $0x1, %ebp
testb $0x2, %r14b
je 0x7ac2
leaq 0x87a5(%rip), %rsi      # 0x1025d
movq %rbx, %rdi
callq 0x6920
incl %ebp
testb $0x4, %r14b
je 0x7ad9
leaq 0x8798(%rip), %rsi      # 0x10267
movq %rbx, %rdi
callq 0x6920
incl %ebp
testb $0x8, %r14b
je 0x7af0
leaq 0x8794(%rip), %rsi      # 0x1027a
movq %rbx, %rdi
callq 0x6920
incl %ebp
testb $0x10, %r14b
je 0x7b07
leaq 0x8790(%rip), %rsi      # 0x1028d
movq %rbx, %rdi
callq 0x6920
incl %ebp
testl %r14d, %r14d
jne 0x7b1d
leaq 0x871e(%rip), %rsi      # 0x10231
movq %rbx, %rdi
callq 0x6920
incl %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/bone.c
// Function: moonassimp_newbone
int newbone(lua_State *L, scene_t *scene, mesh_t *mesh, bone_t *bone)
    {
    ud_t *ud;
    TRACE_CREATE(bone, "bone");
    ud = newuserdata(L, (void*)bone, BONE_MT);
    ud->scene = scene;
    ud->mesh = mesh;
    return 1;   
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x8259(%rip), %rdi      # 0x10470
movq %rcx, %rsi
xorl %eax, %eax
callq 0x6710
leaq 0x825a(%rip), %rdx      # 0x10482
movq %r12, %rdi
movq %rbx, %rsi
callq 0x68c0
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/bone.c
// Function: Weights
static int Weights(lua_State *L)
/* returns a (possibly sparse) table t 
 * where t[i] is the weight for the vertex i 
 * (i= 1-based index in the mesh's vertices list)
 */
    {
    unsigned int i;
    bone_t *bone = checkbone(L, 1);
    lua_newtable(L);
    if(bone->mWeights == NULL || bone->mNumWeights == 0) return 0;
    for(i = 0; i < bone->mNumWeights; i++)
        {
#define w bone->mWeights[i]
        lua_pushnumber(L, w.mWeight);
        lua_rawseti(L, -2, w.mVertexId+1);
#undef w
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x815a(%rip), %rdx      # 0x10482
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0x418(%r14)
je 0x83ab
cmpl $0x0, 0x404(%r14)
je 0x83ab
movl $0x1, %ebp
cmpl $0x0, 0x404(%r14)
je 0x83ab
xorl %r15d, %r15d
movq 0x418(%r14), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rax,%r15,8), %xmm0
movq %rbx, %rdi
callq 0x64f0
movq 0x418(%r14), %rax
movl (%rax,%r15,8), %edx
incl %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x6460
incq %r15
movl 0x404(%r14), %eax
cmpq %rax, %r15
jb 0x8369
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/bone.c
// Function: OrderedWeights
static int OrderedWeights(lua_State *L)
/* returns a table t of elements { vertex=i, weight=val }
 */
    {
    unsigned int i;
    bone_t *bone = checkbone(L, 1);
    lua_newtable(L);
    if(bone->mWeights == NULL || bone->mNumWeights == 0) return 0;
    for(i = 0; i < bone->mNumWeights; i++)
        {
#define w bone->mWeights[i]
        lua_newtable(L);
        lua_pushinteger(L, w.mVertexId+1);
        lua_setfield(L, -2, "vertex");
        lua_pushnumber(L, w.mWeight);
        lua_setfield(L, -2, "weight");
        lua_rawseti(L, -2, i+1);
#undef w
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x80b5(%rip), %rdx      # 0x10482
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0x418(%r14)
je 0x84a1
cmpl $0x0, 0x404(%r14)
je 0x84a1
movl $0x1, %ebp
cmpl $0x0, 0x404(%r14)
je 0x84a1
xorl %r15d, %r15d
leaq 0x80ad(%rip), %r12      # 0x104ce
leaq 0x80ad(%rip), %r13      # 0x104d5
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movq 0x418(%r14), %rax
movl (%rax,%r15,8), %esi
incl %esi
movq %rbx, %rdi
callq 0x6300
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x62e0
movq 0x418(%r14), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rax,%r15,8), %xmm0
movq %rbx, %rdi
callq 0x64f0
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 0x6460
movl 0x404(%r14), %eax
cmpq %rax, %r15
jb 0x8428
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/camera.c
// Function: moonassimp_newcamera
int newcamera(lua_State *L, scene_t *scene, camera_t *camera)
    {
    ud_t *ud;
    TRACE_CREATE(camera, "camera");
    ud = newuserdata(L, (void*)camera, CAMERA_MT);
    ud->scene = scene;
    return 1;   
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x800f(%rip), %rdi      # 0x10500
movq %rdx, %rsi
xorl %eax, %eax
callq 0x6710
leaq 0x8012(%rip), %rdx      # 0x10514
movq %r15, %rdi
movq %rbx, %rsi
callq 0x68c0
movq %r14, 0x10(%rax)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/enums.c
// Function: moonassimp_checkanimbehaviour
unsigned int checkanimbehaviour(lua_State *L, int arg)
    {
    const char *s = luaL_checkstring(L, arg);
#define CASE(CODE,str) if((strcmp(s, str)==0)) return CODE
    CASE(aiAnimBehaviour_DEFAULT, "default");
    CASE(aiAnimBehaviour_CONSTANT, "constant");
    CASE(aiAnimBehaviour_LINEAR, "linear");
    CASE(aiAnimBehaviour_REPEAT, "repeat");
#undef CASE
    return (unsigned int)luaL_argerror(L, arg, badvalue(L,s));
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r12d, %r12d
xorl %edx, %edx
callq 0x6370
movq %rax, %r15
leaq 0x7f87(%rip), %rsi      # 0x10688
movq %rax, %rdi
callq 0x6410
testl %eax, %eax
je 0x8788
leaq 0x8282(%rip), %rsi      # 0x10996
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8772
leaq 0x8284(%rip), %rsi      # 0x109ab
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x877a
leaq 0x7f56(%rip), %rsi      # 0x10690
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8782
leaq 0x7ad1(%rip), %rsi      # 0x1021e
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x63d0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x61c0
movl $0x1, %r12d
jmp 0x8788
movl $0x2, %r12d
jmp 0x8788
movl $0x3, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/enums.c
// Function: moonassimp_pushanimbehaviour
int pushanimbehaviour(lua_State *L, unsigned int value)
    {
    switch(value)
        {
#define CASE(CODE,str) case CODE: lua_pushstring(L, str); break
    CASE(aiAnimBehaviour_DEFAULT, "default");
    CASE(aiAnimBehaviour_CONSTANT, "constant");
    CASE(aiAnimBehaviour_LINEAR, "linear");
    CASE(aiAnimBehaviour_REPEAT, "repeat");
#undef CASE
        default:
            return unexpected(L);
        }
    return 1;
    }

// Assembly:
cmpl $0x3, %esi
ja 0x87dd
pushq %rax
movl %esi, %eax
leaq 0x7dfa(%rip), %rcx      # 0x105a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x7ed2(%rip), %rsi      # 0x10688
jmp 0x87d1
leaq 0x81ec(%rip), %rsi      # 0x109ab
jmp 0x87d1
leaq 0x7ec8(%rip), %rsi      # 0x10690
jmp 0x87d1
leaq 0x81c5(%rip), %rsi      # 0x10996
callq 0x6920
movl $0x1, %eax
popq %rcx
retq
leaq 0x79d2(%rip), %rsi      # 0x101b6
leaq 0x7eac(%rip), %rdx      # 0x10697
movl $0x38, %ecx
xorl %eax, %eax
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/enums.c
// Function: moonassimp_checklogstream
unsigned int checklogstream(lua_State *L, int arg)
    {
    const char *s = luaL_checkstring(L, arg);
#define CASE(CODE,str) if((strcmp(s, str)==0)) return CODE
    CASE(0, "user"); // user Lua callback
    CASE(aiDefaultLogStream_FILE, "file");
    CASE(aiDefaultLogStream_STDOUT, "stdout");
    CASE(aiDefaultLogStream_STDERR, "stderr");
    //CASE(aiDefaultLogStream_DEBUGGER, "debugger");
#undef CASE
    return (unsigned int)luaL_argerror(L, arg, badvalue(L,s));
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r12d, %r12d
xorl %edx, %edx
callq 0x6370
movq %rax, %r15
leaq 0x7e87(%rip), %rsi      # 0x1069f
movq %rax, %rdi
callq 0x6410
testl %eax, %eax
je 0x889f
leaq 0x88b5(%rip), %rsi      # 0x110e0
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8889
leaq 0x7e66(%rip), %rsi      # 0x106a4
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8891
leaq 0x7e5a(%rip), %rsi      # 0x106ab
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8899
leaq 0x79ba(%rip), %rsi      # 0x1021e
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x63d0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x61c0
movl $0x1, %r12d
jmp 0x889f
movl $0x2, %r12d
jmp 0x889f
movl $0x4, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/enums.c
// Function: moonassimp_pushlogstream
int pushlogstream(lua_State *L, unsigned int value)
    {
    switch(value)
        {
#define CASE(CODE,str) case CODE: lua_pushstring(L, str); break
    CASE(0, "user"); // user Lua callback
    CASE(aiDefaultLogStream_FILE, "file");
    CASE(aiDefaultLogStream_STDOUT, "stdout");
    CASE(aiDefaultLogStream_STDERR, "stderr");
    //CASE(aiDefaultLogStream_DEBUGGER, "debugger");
#undef CASE
        default:
            return unexpected(L);
        }
    return 1;
    }

// Assembly:
pushq %rax
cmpl $0x4, %esi
ja 0x88f4
movl %esi, %eax
leaq 0x7cf3(%rip), %rcx      # 0x105b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x7dd2(%rip), %rsi      # 0x1069f
jmp 0x88e8
leaq 0x7dce(%rip), %rsi      # 0x106a4
jmp 0x88e8
leaq 0x8801(%rip), %rsi      # 0x110e0
jmp 0x88e8
leaq 0x7dc3(%rip), %rsi      # 0x106ab
callq 0x6920
movl $0x1, %eax
popq %rcx
retq
leaq 0x78bb(%rip), %rsi      # 0x101b6
leaq 0x7d95(%rip), %rdx      # 0x10697
movl $0x5b, %ecx
xorl %eax, %eax
popq %r8
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/enums.c
// Function: moonassimp_checkblendmode
unsigned int checkblendmode(lua_State *L, int arg)
    {
    const char *s = luaL_checkstring(L, arg);
#define CASE(CODE,str) if((strcmp(s, str)==0)) return CODE
    CASE(aiBlendMode_Default, "default");
    CASE(aiBlendMode_Additive, "additive");
#undef CASE
    return (unsigned int)luaL_argerror(L, arg, badvalue(L,s));
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r12d, %r12d
xorl %edx, %edx
callq 0x6370
movq %rax, %r15
leaq 0x7d57(%rip), %rsi      # 0x10688
movq %rax, %rdi
callq 0x6410
testl %eax, %eax
je 0x8982
leaq 0x7d6e(%rip), %rsi      # 0x106b2
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x897c
leaq 0x78c7(%rip), %rsi      # 0x1021e
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x63d0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x61c0
movl $0x1, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/enums.c
// Function: moonassimp_pushblendmode
int pushblendmode(lua_State *L, unsigned int value)
    {
    switch(value)
        {
#define CASE(CODE,str) case CODE: lua_pushstring(L, str); break
    CASE(aiBlendMode_Default, "default");
    CASE(aiBlendMode_Additive, "additive");
#undef CASE
        default:
            return unexpected(L);
        }
    return 1;
    }

// Assembly:
pushq %rax
cmpl $0x1, %esi
je 0x89a4
testl %esi, %esi
jne 0x89b7
leaq 0x7ce6(%rip), %rsi      # 0x10688
jmp 0x89ab
leaq 0x7d07(%rip), %rsi      # 0x106b2
callq 0x6920
movl $0x1, %eax
popq %rcx
retq
leaq 0x77f8(%rip), %rsi      # 0x101b6
leaq 0x7cd2(%rip), %rdx      # 0x10697
movl $0x77, %ecx
xorl %eax, %eax
popq %r8
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/enums.c
// Function: moonassimp_checkshadingmode
unsigned int checkshadingmode(lua_State *L, int arg)
    {
    const char *s = luaL_checkstring(L, arg);
#define CASE(CODE,str) if((strcmp(s, str)==0)) return CODE
    CASE(aiShadingMode_Flat, "flat");
    CASE(aiShadingMode_Gouraud, "gouraud");
    CASE(aiShadingMode_Phong, "phong");
    CASE(aiShadingMode_Blinn, "blinn");
    CASE(aiShadingMode_Toon, "toon");
    CASE(aiShadingMode_OrenNayar, "oren nayar");
    CASE(aiShadingMode_Minnaert, "minnaert");
    CASE(aiShadingMode_CookTorrance, "cook torrance");
    CASE(aiShadingMode_NoShading, "no shading");
    CASE(aiShadingMode_Fresnel, "fresnel");
#undef CASE
    return (unsigned int)luaL_argerror(L, arg, badvalue(L,s));
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %edx, %edx
callq 0x6370
movq %rax, %r15
leaq 0x7ccd(%rip), %rsi      # 0x106bb
movq %rax, %rdi
callq 0x6410
testl %eax, %eax
je 0x8ae7
leaq 0x7cbb(%rip), %rsi      # 0x106c0
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8aee
leaq 0x7cac(%rip), %rsi      # 0x106c8
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8af5
leaq 0x7c9b(%rip), %rsi      # 0x106ce
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8afc
leaq 0x7c8a(%rip), %rsi      # 0x106d4
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8b03
leaq 0x7c78(%rip), %rsi      # 0x106d9
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8b0a
leaq 0x7c6c(%rip), %rsi      # 0x106e4
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8b11
leaq 0x7c5e(%rip), %rsi      # 0x106ed
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8b18
leaq 0x7c59(%rip), %rsi      # 0x106fb
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8b1f
leaq 0x7c51(%rip), %rsi      # 0x10706
movq %r15, %rdi
callq 0x6410
testl %eax, %eax
je 0x8b26
leaq 0x7756(%rip), %rsi      # 0x1021e
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x63d0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x61c0
movl $0x1, %eax
jmp 0x8b2b
movl $0x2, %eax
jmp 0x8b2b
movl $0x3, %eax
jmp 0x8b2b
movl $0x4, %eax
jmp 0x8b2b
movl $0x5, %eax
jmp 0x8b2b
movl $0x6, %eax
jmp 0x8b2b
movl $0x7, %eax
jmp 0x8b2b
movl $0x8, %eax
jmp 0x8b2b
movl $0x9, %eax
jmp 0x8b2b
movl $0xa, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonassimp/src/enums.c
// Function: moonassimp_pushshadingmode
int pushshadingmode(lua_State *L, unsigned int value)
    {
    switch(value)
        {
#define CASE(CODE,str) case CODE: lua_pushstring(L, str); break
    CASE(aiShadingMode_Flat, "flat");
    CASE(aiShadingMode_Gouraud, "gouraud");
    CASE(aiShadingMode_Phong, "phong");
    CASE(aiShadingMode_Blinn, "blinn");
    CASE(aiShadingMode_Toon, "toon");
    CASE(aiShadingMode_OrenNayar, "oren nayar");
    CASE(aiShadingMode_Minnaert, "minnaert");
    CASE(aiShadingMode_CookTorrance, "cook torrance");
    CASE(aiShadingMode_NoShading, "no shading");
    CASE(aiShadingMode_Fresnel, "fresnel");
#undef CASE
        default:
            return unexpected(L);
        }
    return 1;
    }

// Assembly:
decl %esi
cmpl $0x9, %esi
ja 0x8b9a
pushq %rax
leaq 0x7a84(%rip), %rax      # 0x105c4
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x7b6b(%rip), %rsi      # 0x106bb
jmp 0x8bbb
leaq 0x7b7b(%rip), %rsi      # 0x106d4
jmp 0x8bbb
leaq 0x7ba4(%rip), %rsi      # 0x10706
jmp 0x8bbb
leaq 0x7b5d(%rip), %rsi      # 0x106c8
jmp 0x8bbb
leaq 0x7b5a(%rip), %rsi      # 0x106ce
jmp 0x8bbb
leaq 0x7b70(%rip), %rsi      # 0x106ed
jmp 0x8bbb
leaq 0x7b3a(%rip), %rsi      # 0x106c0
jmp 0x8bbb
leaq 0x7b4a(%rip), %rsi      # 0x106d9
jmp 0x8bbb
leaq 0x7b4c(%rip), %rsi      # 0x106e4
jmp 0x8bbb
leaq 0x7615(%rip), %rsi      # 0x101b6
leaq 0x7aef(%rip), %rdx      # 0x10697
movl $0xa4, %ecx
xorl %eax, %eax
jmp 0x67a0
leaq 0x7b40(%rip), %rsi      # 0x106fb
callq 0x6920
movl $0x1, %eax
popq %rcx
retq