// File: /workspace/github_c_makefile_star2_O1/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 0xf93d
movl %edx, %ebp
cmpl $0x2, %edx
jne 0xf788
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 0x64f0
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
movl $0x3, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
cmpl $0x2, %ebp
jne 0xf810
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x10(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x14(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
movl $0x3, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
cmpl $0x2, %ebp
jne 0xf89c
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
xorps %xmm0, %xmm0
cvtss2sd 0x18(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x1c(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x20(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
movl $0x3, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movl $0x3, %r15d
cmpl $0x2, %ebp
jne 0xf9e7
movl $0x3, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movl $0x1, %r15d
jmp 0xf9e7
movl $0x9, %r15d
movq %rbx, %rdi
movl $0x9, %esi
xorl %edx, %edx
callq 0x6550
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
xorps %xmm0, %xmm0
cvtss2sd 0x10(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
xorps %xmm0, %xmm0
cvtss2sd 0x14(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
xorps %xmm0, %xmm0
cvtss2sd 0x18(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
xorps %xmm0, %xmm0
cvtss2sd 0x1c(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
xorps %xmm0, %xmm0
cvtss2sd 0x20(%r14), %xmm0
movq %rbx, %rdi
callq 0x64f0
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq