// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_pushmatrix3
int pushmatrix3(lua_State *L, matrix3_t *mat, int how)
    {
    if(how==0)
        {
        luaL_checkstack(L, 9, NULL);
        lua_pushnumber(L, mat->a1); 
        lua_pushnumber(L, mat->a2); 
        lua_pushnumber(L, mat->a3); 
        lua_pushnumber(L, mat->b1); 
        lua_pushnumber(L, mat->b2); 
        lua_pushnumber(L, mat->b3); 
        lua_pushnumber(L, mat->c1); 
        lua_pushnumber(L, mat->c2); 
        lua_pushnumber(L, mat->c3); 
        return 9;
        }
    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);
    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);
    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);
    if(how==2) lua_seti(L, -2, 3);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0xf25e
movl %edx, %ebp
cmpl $0x2, %edx
jne 0xf0ef
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
cmpl $0x2, %ebp
jne 0xf165
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 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $-0x2
popq %r15
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x10(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x14(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cmpl $0x2, %ebp
jne 0xf1dc
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 0x18(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $-0x2
popq %r15
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x1c(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cvtss2sd 0x20(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63e0
cmpl $0x2, %ebp
jne 0xf2ec
pushq $-0x2
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x63e0
pushq $0x1
jmp 0xf2ee
pushq $0x9
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
jmp 0xf2ef
pushq $0x3
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq