// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x14c64
movq 0x18(%rsp), %rdi
movl $0x9, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x6560
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0xc(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x10(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x18(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x1c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x20(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movl $0x9, 0x24(%rsp)
jmp 0x14e97
cmpl $0x2, 0xc(%rsp)
jne 0x14c79
movq 0x18(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6250
movq 0x18(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6250
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x1, %edx
callq 0x63f0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x2, %edx
callq 0x63f0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x3, %edx
callq 0x63f0
cmpl $0x2, 0xc(%rsp)
jne 0x14d25
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x1, %edx
callq 0x63f0
movq 0x18(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6250
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0xc(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x1, %edx
callq 0x63f0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x10(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x2, %edx
callq 0x63f0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x3, %edx
callq 0x63f0
cmpl $0x2, 0xc(%rsp)
jne 0x14dd2
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x2, %edx
callq 0x63f0
movq 0x18(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6250
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x18(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x1, %edx
callq 0x63f0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x1c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x2, %edx
callq 0x63f0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x20(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6500
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x3, %edx
callq 0x63f0
cmpl $0x2, 0xc(%rsp)
jne 0x14e7f
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x3, %edx
callq 0x63f0
movl 0xc(%rsp), %edx
movl $0x3, %eax
movl $0x1, %ecx
cmpl $0x2, %edx
cmovel %ecx, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq