// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_pushmatrix4
int pushmatrix4(lua_State *L, matrix4_t *mat, int how)
    {
    if(how==0)
        {
        luaL_checkstack(L, 16, NULL);
        lua_pushnumber(L, mat->a1); 
        lua_pushnumber(L, mat->a2); 
        lua_pushnumber(L, mat->a3); 
        lua_pushnumber(L, mat->a4); 
        lua_pushnumber(L, mat->b1); 
        lua_pushnumber(L, mat->b2); 
        lua_pushnumber(L, mat->b3); 
        lua_pushnumber(L, mat->b4); 
        lua_pushnumber(L, mat->c1); 
        lua_pushnumber(L, mat->c2); 
        lua_pushnumber(L, mat->c3); 
        lua_pushnumber(L, mat->c4); 
        lua_pushnumber(L, mat->d1); 
        lua_pushnumber(L, mat->d2); 
        lua_pushnumber(L, mat->d3); 
        lua_pushnumber(L, mat->d4); 
        return 16;
        }
    if(how==2) lua_newtable(L);

    lua_newtable(L);
    lua_pushnumber(L, mat->a1); lua_seti(L, -2, 1);
    lua_pushnumber(L, mat->a2); lua_seti(L, -2, 2);
    lua_pushnumber(L, mat->a3); lua_seti(L, -2, 3);
    lua_pushnumber(L, mat->a4); lua_seti(L, -2, 4);
    if(how==2) lua_seti(L, -2, 1);
    lua_newtable(L);
    lua_pushnumber(L, mat->b1); lua_seti(L, -2, 1);
    lua_pushnumber(L, mat->b2); lua_seti(L, -2, 2);
    lua_pushnumber(L, mat->b3); lua_seti(L, -2, 3);
    lua_pushnumber(L, mat->b4); lua_seti(L, -2, 4);
    if(how==2) lua_seti(L, -2, 2);
    lua_newtable(L);
    lua_pushnumber(L, mat->c1); lua_seti(L, -2, 1);
    lua_pushnumber(L, mat->c2); lua_seti(L, -2, 2);
    lua_pushnumber(L, mat->c3); lua_seti(L, -2, 3);
    lua_pushnumber(L, mat->c4); lua_seti(L, -2, 4);
    if(how==2) lua_seti(L, -2, 3);
    lua_newtable(L);
    lua_pushnumber(L, mat->d1); lua_seti(L, -2, 1);
    lua_pushnumber(L, mat->d2); lua_seti(L, -2, 2);
    lua_pushnumber(L, mat->d3); lua_seti(L, -2, 3);
    lua_pushnumber(L, mat->d4); lua_seti(L, -2, 4);
    if(how==2) lua_seti(L, -2, 4);

    return (how==2) ? 1 : 4;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0xf57a
movl %edx, %ebp
cmpl $0x2, %edx
jne 0xf324
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $-0x2
popq %r15
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x4
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cmpl $0x2, %ebp
jne 0xf3b6
pushq $-0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x63e0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cvtss2sd 0x10(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $-0x2
popq %r15
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x14(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x18(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x1c(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x4
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cmpl $0x2, %ebp
jne 0xf449
pushq $-0x2
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x63e0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cvtss2sd 0x20(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $-0x2
popq %r15
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x24(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x28(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x2c(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x4
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cmpl $0x2, %ebp
jne 0xf4dc
pushq $-0x2
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x63e0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cvtss2sd 0x30(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $-0x2
popq %r15
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x34(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x38(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x3c(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x4
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cmpl $0x2, %ebp
jne 0xf66a
pushq $-0x2
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x63e0
pushq $0x1
jmp 0xf66c
pushq $0x10
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x6560
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x10(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x14(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x18(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x1c(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x20(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x24(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x28(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x2c(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x30(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x34(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x38(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
cvtss2sd 0x3c(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
jmp 0xf66d
pushq $0x4
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq