LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/phluid61[P]hsf/src/item.c
// Function: _SH_Item__to_s_param
void
__SH_Item__to_s_param(SH_Key* key, SH_Item* obj, void* ptr, int* err) {
	__sh_item__string* str;

	sh_char_t* k; /* key string */
	sh_char_t* o; /* obj string */

	int local_err = SH_E_NO_ERROR;

	__cascade(err,);

	str = (__sh_item__string*)ptr;

	k = SH_Key__to_s(key, &local_err);
	if (local_err) {
		__raise(err, local_err);
		return;
	}

	if (SH_BOOLEAN == SH_BareItem__type(obj->item, &local_err) && SH_Boolean__true(SH_BareItem__get_boolean(obj->item, &local_err), &local_err)) {
		str->a[str->n ++] = k; str->length += strlen((const char*)k);
		str->a[str->n ++] = (sh_char_t*)0;
	} else {
		local_err = SH_E_NO_ERROR; /* ignore any errors above */
		o = SH_Item__to_s(obj, &local_err);
		if (local_err) {
			free(k);
			__raise(err, local_err);
			return;
		}

		str->a[str->n ++] = k; str->length += strlen((const char*)k);
		str->a[str->n ++] = o; str->length += strlen((const char*)o);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
andl $0x0, 0xc(%rsp)
testq %rcx, %rcx
je 0x13b3
cmpl $0x0, (%r14)
jne 0x1468
leaq 0xc(%rsp), %r13
movq %r13, %rsi
callq 0x10a0
movq %rax, %r15
movl (%r13), %eax
testl %eax, %eax
je 0x13d9
testq %r14, %r14
jne 0x1465
jmp 0x1468
movq (%r12), %rdi
leaq 0xc(%rsp), %rsi
callq 0x1090
cmpl $0x6, %eax
jne 0x1438
movq (%r12), %rdi
leaq 0xc(%rsp), %r13
movq %r13, %rsi
callq 0x1030
movq %rax, %rdi
movq %r13, %rsi
callq 0x1110
testb %al, %al
je 0x1438
movq 0x8(%rbx), %r14
leaq 0x1(%r14), %rax
movq %rax, 0x8(%rbx)
movq %r15, 0x10(%rbx,%r14,8)
movq %r15, %rdi
callq 0x1070
addq %rax, (%rbx)
leaq 0x2(%r14), %rax
movq %rax, 0x8(%rbx)
andq $0x0, 0x18(%rbx,%r14,8)
jmp 0x1468
leaq 0xc(%rsp), %r13
andl $0x0, (%r13)
movq %r12, %rdi
movq %r13, %rsi
callq 0x1120
cmpl $0x0, (%r13)
je 0x1476
movq %r15, %rdi
callq 0x1040
testq %r14, %r14
je 0x1468
movl 0xc(%rsp), %eax
movl %eax, (%r14)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r12
movq 0x8(%rbx), %r13
leaq 0x1(%r13), %rax
movq %rax, 0x8(%rbx)
movq %r15, 0x10(%rbx,%r13,8)
movq %r15, %rdi
callq 0x1070
movq %rax, %r14
addq (%rbx), %r14
leaq 0x2(%r13), %rax
movq %rax, 0x8(%rbx)
movq %r12, 0x18(%rbx,%r13,8)
movq %r12, %rdi
callq 0x1070
addq %r14, %rax
movq %rax, (%rbx)
jmp 0x1468
// File: /workspace/github_c_makefile_star2_O2/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 $0x2028, %rsp           # imm = 0x2028
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq (%rdi), %rdi
callq 0x10f0
movq %rax, %r14
testq %r15, %r15
je 0x1530
cmpl $0x0, (%r15)
jne 0x1618
movq 0x8(%rbx), %rdi
movq 0x2ae7(%rip), %rsi      # 0x3fe0
leaq 0x10(%rsp), %rdx
movq %r15, %rcx
callq 0x1080
cmpl $0x0, (%r15)
je 0x1547
movq %r14, %rdi
callq 0x1040
xorl %ebx, %ebx
cmpq 0x18(%rsp), %rbx
jae 0x160e
movq 0x20(%rsp,%rbx,8), %rdi
callq 0x1040
incq %rbx
jmp 0x1516
movq 0x8(%rbx), %rdi
movq 0x2aa5(%rip), %rsi      # 0x3fe0
leaq 0x10(%rsp), %rdx
xorl %ecx, %ecx
callq 0x1080
movq %r14, %rdi
callq 0x1070
movq %rax, %r12
movq 0x18(%rsp), %rbp
movq 0x10(%rsp), %rax
addq %r12, %rax
leaq (%rax,%rbp), %rdi
incq %rdi
callq 0x10d0
testq %rax, %rax
je 0x1600
movq %rax, %rbx
movq %rax, %r13
testq %r12, %r12
je 0x159b
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x10c0
movq %r14, %rdi
callq 0x1040
movq %rbx, %r13
addq %r12, %r13
movq %rbx, 0x8(%rsp)
xorl %ebx, %ebx
cmpq %rbp, %rbx
jae 0x15f4
movq 0x20(%rsp,%rbx,8), %r14
testq %r14, %r14
je 0x15ef
movl %ebx, %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 0x20(%rsp,%rbx,8), %rdi
callq 0x1040
addq %r12, %r13
incq %r13
movq 0x18(%rsp), %rbp
incq %rbx
jmp 0x15a2
movb $0x0, (%r13)
movq 0x8(%rsp), %rax
jmp 0x161a
testq %r15, %r15
je 0x1618
movl $0x80000001, (%r15)     # imm = 0x80000001
jmp 0x1618
cmpl $0x0, (%r15)
je 0x1547
xorl %eax, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x942f(%rip), %rdi      # 0x10033
movq %rdx, %rsi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0x420(%r14)
je 0x6c70
movl 0x418(%r14), %eax
testl %eax, %eax
je 0x6c70
xorl %r12d, %r12d
pushq $-0x2
popq %rbp
movl %eax, %eax
cmpq %rax, %r12
jae 0x6c5f
movq 0x420(%r14), %rax
movq (%rax,%r12,8), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6100
movq %r15, %rdi
movl %ebp, %esi
callq 0x60c0
incq %r12
movl 0x418(%r14), %eax
jmp 0x6c29
leaq 0x93e4(%rip), %rdi      # 0x1004a
movl %r12d, %esi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0x430(%r14)
je 0x6cd2
movl 0x428(%r14), %eax
testl %eax, %eax
je 0x6cd2
xorl %r12d, %r12d
pushq $-0x2
popq %rbp
movl %eax, %eax
cmpq %rax, %r12
jae 0x6cc1
movq 0x430(%r14), %rax
movq (%rax,%r12,8), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6490
movq %r15, %rdi
movl %ebp, %esi
callq 0x60c0
incq %r12
movl 0x428(%r14), %eax
jmp 0x6c8b
leaq 0x9397(%rip), %rdi      # 0x1005f
movl %r12d, %esi
xorl %eax, %eax
callq 0x6710
leaq 0x939b(%rip), %rdx      # 0x10074
movq %r15, %rdi
movq %r14, %rsi
callq 0x68c0
movq %rbx, 0x10(%rax)
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6d4c
movl 0x418(%rbx), %eax
testl %eax, %eax
je 0x6d4c
xorl %r15d, %r15d
movl %eax, %eax
cmpq %rax, %r15
jae 0x6d3b
movq 0x420(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x6840
incq %r15
movl 0x418(%rbx), %eax
jmp 0x6d16
leaq 0x9347(%rip), %rdi      # 0x10089
movl %r15d, %esi
xorl %eax, %eax
callq 0x6710
cmpq $0x0, 0x430(%rbx)
je 0x6d99
movl 0x428(%rbx), %eax
testl %eax, %eax
je 0x6d99
xorl %r15d, %r15d
movl %eax, %eax
cmpq %rax, %r15
jae 0x6d88
movq 0x430(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x6970
incq %r15
movl 0x428(%rbx), %eax
jmp 0x6d63
leaq 0x930f(%rip), %rdi      # 0x1009e
movl %r15d, %esi
xorl %eax, %eax
callq 0x6710
leaq 0x9313(%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_O2/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, %r14
leaq 0x91aa(%rip), %rdx      # 0x10074
pushq $0x1
popq %rsi
callq 0x66f0
movq %rax, %r13
xorl %r15d, %r15d
pushq $0x2
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x6370
movq 0x420(%r13), %rbp
testq %rbp, %rbp
je 0x6f3a
movl 0x418(%r13), %ebx
testq %rbx, %rbx
je 0x6f3a
movq %rax, %r12
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x6f37
movq (%rbp,%r15,8), %r13
leaq 0x4(%r13), %rsi
movl (%r13), %edx
movq %r12, %rdi
callq 0x6120
incq %r15
testl %eax, %eax
jne 0x6f03
movq %r14, %rdi
movq %r13, %rsi
callq 0x6380
pushq $0x1
popq %rax
movl %eax, %r15d
jmp 0x6f3a
xorl %r15d, %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_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9117(%rip), %rdx      # 0x10074
pushq $0x1
popq %rsi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0x420(%r14)
je 0x6fc2
movl 0x418(%r14), %eax
testl %eax, %eax
je 0x6fc2
xorl %r15d, %r15d
pushq $-0x2
popq %rbp
movl %eax, %eax
cmpq %rax, %r15
jae 0x6fc2
movq 0x420(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x6380
incq %r15
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x6470
movl 0x418(%r14), %eax
jmp 0x6f8f
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9061(%rip), %rdx      # 0x10074
pushq $0x1
popq %rsi
callq 0x66f0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
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 0x70a9
movl 0x428(%r14), %eax
testl %eax, %eax
je 0x70a9
xorl %r12d, %r12d
movl %eax, %ebp
cmpq %rbp, %r12
jae 0x70a9
movq 0x430(%r14), %rax
movq (%rax,%r12,8), %r13
testq %r15, %r15
je 0x7084
leaq 0x4(%r13), %rsi
movl (%r13), %edx
movq %r15, %rdi
callq 0x6120
testl %eax, %eax
je 0x7084
incq %r12
jmp 0x7056
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6380
incq %r12
movq %rbx, %rdi
pushq $-0x2
popq %rsi
movq %r12, %rdx
callq 0x6470
movl 0x428(%r14), %eax
jmp 0x7054
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x9063(%rip), %rdx      # 0x10130
movq %rcx, %rsi
callq 0x68c0
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9003(%rip), %rdx      # 0x10130
pushq $0x1
popq %rsi
callq 0x66f0
movq %rax, %rdi
callq 0x6770
movq 0x18(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x6380
// File: /workspace/github_c_makefile_star2_O2/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 0x8f36(%rip), %rdx      # 0x10130
pushq $0x1
popq %rsi
callq 0x66f0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6310
xorl %esi, %esi
cmpl $0x7, %eax
ja 0x7228
movl %eax, %eax
xorl %esi, %esi
cmpq $0x0, 0x428(%r14,%rax,8)
setne %sil
movq %rbx, %rdi
callq 0x6540
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8ee7(%rip), %rdx      # 0x10130
pushq $0x1
popq %rsi
callq 0x66f0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6310
xorl %esi, %esi
cmpl $0x7, %eax
ja 0x7277
movl %eax, %eax
xorl %esi, %esi
cmpq $0x0, 0x468(%r14,%rax,8)
setne %sil
movq %rbx, %rdi
callq 0x6540
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8ce8(%rip), %rdx      # 0x10130
pushq $0x1
popq %rsi
callq 0x66f0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6310
movl %eax, %ebp
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x6310
cmpl $0x7, %ebp
ja 0x749f
movl %ebp, %ecx
movq 0x428(%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0x749f
cmpl 0x4a8(%r14), %eax
jae 0x74b5
movl %eax, %eax
shlq $0x4, %rax
addq %rax, %rsi
movq %rbx, %rdi
xorl %edx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x62d0
leaq 0x8d03(%rip), %rdx      # 0x101a9
pushq $0x2
popq %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x61c0
leaq 0x8ced(%rip), %rdx      # 0x101a9
pushq $0x3
jmp 0x74a8
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8c5a(%rip), %rdx      # 0x10130
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x66f0
movq %rax, %r14
movq %rax, %rdi
callq 0x6770
movq 0x18(%rax), %r12
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6310
movl %eax, %r15d
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x6310
cmpl $0x7, %r15d
ja 0x755d
movl %r15d, %ecx
movq 0x468(%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0x755d
cmpl 0x4a8(%r14), %eax
jae 0x757b
movl 0xb0(%r12,%rcx,4), %ecx
movl %eax, %eax
imulq $0xc, %rax, %rax
addq %rax, %rsi
cmpl $0x1, %ecx
je 0x75a1
cmpl $0x2, %ecx
je 0x7586
cmpl $0x3, %ecx
jne 0x75bc
movq %rbx, %rdi
xorl %edx, %edx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6600
leaq 0x8c45(%rip), %rdx      # 0x101a9
pushq $0x2
popq %rsi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x61c0
leaq 0x8c27(%rip), %rdx      # 0x101a9
pushq $0x3
jmp 0x7566
movsd (%rsi), %xmm0
leaq 0x8(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6170
movl %eax, %ebp
jmp 0x75ad
cvtss2sd (%rsi), %xmm0
movq %rbx, %rdi
callq 0x6500
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8bf3(%rip), %rsi      # 0x101b6
leaq 0x8c06(%rip), %rdx      # 0x101d0
movq %rbx, %rdi
movl $0xa5, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x67a0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x7621
movq %r14, %rdi
movl %ebx, %esi
callq 0x6440
movq %rax, %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
leaq 0x8bd5(%rip), %r12      # 0x10200
pushq $0x1
popq %r13
movq %r14, %rdi
movl %ebx, %esi
callq 0x69b0
testl %eax, %eax
je 0x760f
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x61e0
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0x6420
movl %r13d, %ecx
testl %eax, %eax
je 0x768a
movq %rbp, %rdi
leaq 0x8b9f(%rip), %rsi      # 0x10207
callq 0x6420
pushq $0x2
popq %rcx
testl %eax, %eax
je 0x768a
movq %rbp, %rdi
leaq 0x8b93(%rip), %rsi      # 0x10211
callq 0x6420
pushq $0x4
popq %rcx
testl %eax, %eax
jne 0x7691
orl %ecx, %r15d
incl %ebx
jmp 0x762f
leaq 0x8b86(%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_O2/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, %ebp
movq %rdi, %r14
testl %edx, %edx
je 0x76dc
movl %ebp, %esi
movq %r14, %rdi
callq 0x6300
pushq $0x1
popq %rbx
jmp 0x7731
xorl %ebx, %ebx
testb $0x1, %bpl
je 0x76f6
leaq 0x8b15(%rip), %rsi      # 0x10200
movq %r14, %rdi
callq 0x6920
pushq $0x1
popq %rbx
testb $0x2, %bpl
je 0x770d
leaq 0x8b04(%rip), %rsi      # 0x10207
movq %r14, %rdi
callq 0x6920
incl %ebx
testb $0x4, %bpl
jne 0x7720
testl %ebp, %ebp
jne 0x7731
leaq 0x8b13(%rip), %rsi      # 0x10231
jmp 0x7727
leaq 0x8aea(%rip), %rsi      # 0x10211
movq %r14, %rdi
callq 0x6920
incl %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7771
movq %r14, %rdi
movl %ebx, %esi
callq 0x6440
movq %rax, %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
leaq 0x8abb(%rip), %r12      # 0x10236
pushq $0x1
popq %r13
movq %r14, %rdi
movl %ebx, %esi
callq 0x69b0
testl %eax, %eax
je 0x775f
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x61e0
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0x6420
movl %r13d, %ecx
testl %eax, %eax
je 0x77f0
movq %rbp, %rdi
leaq 0x8a84(%rip), %rsi      # 0x1023c
callq 0x6420
pushq $0x2
popq %rcx
testl %eax, %eax
je 0x77f0
movq %rbp, %rdi
leaq 0x8a73(%rip), %rsi      # 0x10241
callq 0x6420
pushq $0x4
popq %rcx
testl %eax, %eax
je 0x77f0
movq %rbp, %rdi
leaq 0x8a66(%rip), %rsi      # 0x1024a
callq 0x6420
pushq $0x8
popq %rcx
testl %eax, %eax
jne 0x77f7
orl %ecx, %r15d
incl %ebx
jmp 0x777f
leaq 0x8a20(%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_O2/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, %ebp
movq %rdi, %r14
testl %edx, %edx
je 0x7842
movl %ebp, %esi
movq %r14, %rdi
callq 0x6300
pushq $0x1
popq %rbx
jmp 0x78ae
xorl %ebx, %ebx
testb $0x1, %bpl
je 0x785c
leaq 0x89e5(%rip), %rsi      # 0x10236
movq %r14, %rdi
callq 0x6920
pushq $0x1
popq %rbx
testb $0x2, %bpl
je 0x7873
leaq 0x89d3(%rip), %rsi      # 0x1023c
movq %r14, %rdi
callq 0x6920
incl %ebx
testb $0x4, %bpl
je 0x788a
leaq 0x89c1(%rip), %rsi      # 0x10241
movq %r14, %rdi
callq 0x6920
incl %ebx
testb $0x8, %bpl
jne 0x789d
testl %ebp, %ebp
jne 0x78ae
leaq 0x8996(%rip), %rsi      # 0x10231
jmp 0x78a4
leaq 0x89a6(%rip), %rsi      # 0x1024a
movq %r14, %rdi
callq 0x6920
incl %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %r12d
movq %rdi, %rbx
callq 0x68d0
cmpl $0x3, %eax
jne 0x78f0
movq %rbx, %rdi
movl %r12d, %esi
callq 0x6440
movq %rax, %r14
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
leaq 0x8937(%rip), %r15      # 0x10231
movq %rbx, %rdi
movl %r12d, %esi
callq 0x69b0
testl %eax, %eax
je 0x78de
leal 0x1(%r12), %ebp
movq %rbx, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x61e0
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
callq 0x6420
movl %ebp, %r12d
testl %eax, %eax
je 0x78fa
movq %r13, %rdi
leaq 0x8918(%rip), %rsi      # 0x10252
callq 0x6420
testl %eax, %eax
je 0x799b
movq %r13, %rdi
leaq 0x8910(%rip), %rsi      # 0x1025d
callq 0x6420
testl %eax, %eax
je 0x79a7
movq %r13, %rdi
leaq 0x8907(%rip), %rsi      # 0x10267
callq 0x6420
testl %eax, %eax
je 0x79b3
movq %r13, %rdi
leaq 0x8907(%rip), %rsi      # 0x1027a
callq 0x6420
testl %eax, %eax
je 0x79bf
movq %r13, %rdi
leaq 0x8907(%rip), %rsi      # 0x1028d
callq 0x6420
testl %eax, %eax
jne 0x79cb
orl $0x10, %r14d
movl %ebp, %r12d
jmp 0x78fa
orl $0x1, %r14d
movl %ebp, %r12d
jmp 0x78fa
orl $0x2, %r14d
movl %ebp, %r12d
jmp 0x78fa
orl $0x4, %r14d
movl %ebp, %r12d
jmp 0x78fa
orl $0x8, %r14d
movl %ebp, %r12d
jmp 0x78fa
leaq 0x884c(%rip), %rsi      # 0x1021e
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x63d0
decl %ebp
movq %rbx, %rdi
movl %ebp, %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_O2/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, %ebp
movq %rdi, %r14
testl %edx, %edx
je 0x7a1b
movl %ebp, %esi
movq %r14, %rdi
callq 0x6300
pushq $0x1
popq %rbx
jmp 0x7a9e
xorl %ebx, %ebx
testb $0x1, %bpl
je 0x7a35
leaq 0x8828(%rip), %rsi      # 0x10252
movq %r14, %rdi
callq 0x6920
pushq $0x1
popq %rbx
testb $0x2, %bpl
je 0x7a4c
leaq 0x881b(%rip), %rsi      # 0x1025d
movq %r14, %rdi
callq 0x6920
incl %ebx
testb $0x4, %bpl
je 0x7a63
leaq 0x880e(%rip), %rsi      # 0x10267
movq %r14, %rdi
callq 0x6920
incl %ebx
testb $0x8, %bpl
je 0x7a7a
leaq 0x880a(%rip), %rsi      # 0x1027a
movq %r14, %rdi
callq 0x6920
incl %ebx
testb $0x10, %bpl
jne 0x7a8d
testl %ebp, %ebp
jne 0x7a9e
leaq 0x87a6(%rip), %rsi      # 0x10231
jmp 0x7a94
leaq 0x87f9(%rip), %rsi      # 0x1028d
movq %r14, %rdi
callq 0x6920
incl %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x830d(%rip), %rdi      # 0x10470
movq %rcx, %rsi
xorl %eax, %eax
callq 0x6710
leaq 0x830e(%rip), %rdx      # 0x10482
movq %r12, %rdi
movq %rbx, %rsi
callq 0x68c0
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x8210(%rip), %rdx      # 0x10482
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x66f0
movq %rax, %r14
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0x418(%r14)
je 0x82ee
movl 0x404(%r14), %eax
testl %eax, %eax
je 0x82ee
xorl %r12d, %r12d
pushq $-0x2
popq %r15
movl %eax, %eax
cmpq %rax, %r12
jae 0x82eb
movq 0x418(%r14), %rax
cvtss2sd 0x4(%rax,%r12,8), %xmm0
movq %rbx, %rdi
callq 0x6500
movq 0x418(%r14), %rax
movl (%rax,%r12,8), %edx
incl %edx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x6470
incq %r12
movl 0x404(%r14), %eax
jmp 0x82aa
movl %ebp, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8173(%rip), %rdx      # 0x10482
pushq $0x1
popq %rsi
callq 0x66f0
movq %rax, %r14
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0x418(%r14)
je 0x83d1
movl 0x404(%r14), %eax
testl %eax, %eax
je 0x83d1
xorl %r15d, %r15d
leaq 0x817f(%rip), %r12      # 0x104ce
pushq $-0x2
popq %r13
leaq 0x817b(%rip), %rbp      # 0x104d5
movl %eax, %eax
cmpq %rax, %r15
jae 0x83ce
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 %r13d, %esi
movq %r12, %rdx
callq 0x62e0
movq 0x418(%r14), %rax
cvtss2sd 0x4(%rax,%r15,8), %xmm0
movq %rbx, %rdi
callq 0x6500
movq %rbx, %rdi
movl %r13d, %esi
movq %rbp, %rdx
callq 0x62e0
incq %r15
movq %rbx, %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x6470
movl 0x404(%r14), %eax
jmp 0x835a
pushq $0x1
popq %rbp
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_O2/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 0x80e3(%rip), %rdi      # 0x10500
movq %rdx, %rsi
xorl %eax, %eax
callq 0x6710
leaq 0x80e6(%rip), %rdx      # 0x10514
movq %r15, %rdi
movq %rbx, %rsi
callq 0x68c0
movq %r14, 0x10(%rax)
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x805b(%rip), %rsi      # 0x10688
movq %rax, %rdi
callq 0x6420
testl %eax, %eax
je 0x86aa
leaq 0x8356(%rip), %rsi      # 0x10996
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x869e
leaq 0x8358(%rip), %rsi      # 0x109ab
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x86a2
leaq 0x802a(%rip), %rsi      # 0x10690
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x86a6
leaq 0x7ba5(%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
pushq $0x1
jmp 0x86a8
pushq $0x2
jmp 0x86a8
pushq $0x3
popq %r12
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x86fd
pushq %rax
movl %esi, %eax
leaq 0x7ed8(%rip), %rcx      # 0x105a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x7fb0(%rip), %rsi      # 0x10688
jmp 0x86f3
leaq 0x82ca(%rip), %rsi      # 0x109ab
jmp 0x86f3
leaq 0x7fa6(%rip), %rsi      # 0x10690
jmp 0x86f3
leaq 0x82a3(%rip), %rsi      # 0x10996
callq 0x6920
pushq $0x1
popq %rax
popq %rcx
retq
leaq 0x7ab2(%rip), %rsi      # 0x101b6
leaq 0x7f8c(%rip), %rdx      # 0x10697
pushq $0x38
popq %rcx
xorl %eax, %eax
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O2/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 0x7f69(%rip), %rsi      # 0x1069f
movq %rax, %rdi
callq 0x6420
testl %eax, %eax
je 0x87b3
leaq 0x8997(%rip), %rsi      # 0x110e0
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x87a7
leaq 0x7f48(%rip), %rsi      # 0x106a4
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x87ab
leaq 0x7f3c(%rip), %rsi      # 0x106ab
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x87af
leaq 0x7a9c(%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
pushq $0x1
jmp 0x87b1
pushq $0x2
jmp 0x87b1
pushq $0x4
popq %r12
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8806
movl %esi, %eax
leaq 0x7ddf(%rip), %rcx      # 0x105b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x7ebe(%rip), %rsi      # 0x1069f
jmp 0x87fc
leaq 0x7eba(%rip), %rsi      # 0x106a4
jmp 0x87fc
leaq 0x88ed(%rip), %rsi      # 0x110e0
jmp 0x87fc
leaq 0x7eaf(%rip), %rsi      # 0x106ab
callq 0x6920
pushq $0x1
popq %rax
popq %rcx
retq
leaq 0x79a9(%rip), %rsi      # 0x101b6
leaq 0x7e83(%rip), %rdx      # 0x10697
pushq $0x5b
popq %rcx
xorl %eax, %eax
popq %r8
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O2/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 0x7e47(%rip), %rsi      # 0x10688
movq %rax, %rdi
callq 0x6420
testl %eax, %eax
je 0x8890
leaq 0x7e5e(%rip), %rsi      # 0x106b2
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x888c
leaq 0x79b7(%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
pushq $0x1
popq %r12
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x88b2
testl %esi, %esi
jne 0x88c3
leaq 0x7dd8(%rip), %rsi      # 0x10688
jmp 0x88b9
leaq 0x7df9(%rip), %rsi      # 0x106b2
callq 0x6920
pushq $0x1
popq %rax
popq %rcx
retq
leaq 0x78ec(%rip), %rsi      # 0x101b6
leaq 0x7dc6(%rip), %rdx      # 0x10697
pushq $0x77
popq %rcx
xorl %eax, %eax
popq %r8
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O2/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 0x7dc3(%rip), %rsi      # 0x106bb
movq %rax, %rdi
callq 0x6420
testl %eax, %eax
je 0x89ed
leaq 0x7db1(%rip), %rsi      # 0x106c0
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x89f1
leaq 0x7da2(%rip), %rsi      # 0x106c8
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x89f5
leaq 0x7d91(%rip), %rsi      # 0x106ce
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x89f9
leaq 0x7d80(%rip), %rsi      # 0x106d4
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x89fd
leaq 0x7d6e(%rip), %rsi      # 0x106d9
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x8a01
leaq 0x7d62(%rip), %rsi      # 0x106e4
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x8a05
leaq 0x7d58(%rip), %rsi      # 0x106ed
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x8a09
leaq 0x7d53(%rip), %rsi      # 0x106fb
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x8a0d
leaq 0x7d4b(%rip), %rsi      # 0x10706
movq %r15, %rdi
callq 0x6420
testl %eax, %eax
je 0x8a11
leaq 0x7850(%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
pushq $0x1
jmp 0x8a13
pushq $0x2
jmp 0x8a13
pushq $0x3
jmp 0x8a13
pushq $0x4
jmp 0x8a13
pushq $0x5
jmp 0x8a13
pushq $0x6
jmp 0x8a13
pushq $0x7
jmp 0x8a13
pushq $0x8
jmp 0x8a13
pushq $0x9
jmp 0x8a13
pushq $0xa
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8a83
pushq %rax
leaq 0x7b9b(%rip), %rax      # 0x105c4
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x7c82(%rip), %rsi      # 0x106bb
jmp 0x8aa4
leaq 0x7c92(%rip), %rsi      # 0x106d4
jmp 0x8aa4
leaq 0x7cbb(%rip), %rsi      # 0x10706
jmp 0x8aa4
leaq 0x7c74(%rip), %rsi      # 0x106c8
jmp 0x8aa4
leaq 0x7c71(%rip), %rsi      # 0x106ce
jmp 0x8aa4
leaq 0x7c87(%rip), %rsi      # 0x106ed
jmp 0x8aa4
leaq 0x7c51(%rip), %rsi      # 0x106c0
jmp 0x8aa4
leaq 0x7c61(%rip), %rsi      # 0x106d9
jmp 0x8aa4
leaq 0x7c63(%rip), %rsi      # 0x106e4
jmp 0x8aa4
leaq 0x772c(%rip), %rsi      # 0x101b6
leaq 0x7c06(%rip), %rdx      # 0x10697
movl $0xa4, %ecx
xorl %eax, %eax
jmp 0x67a0
leaq 0x7c57(%rip), %rsi      # 0x106fb
callq 0x6920
pushq $0x1
popq %rax
popq %rcx
retq