LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/quat.c
// Function: Pow
static int Pow(lua_State *L)
    {
    quat_t q, dst; 
    lua_Integer n, i;
    checkquat(L, 1, q);
    n = luaL_checkinteger(L, 2);
    if(n == 0)
        {
        quat_clear(dst); dst[0]=1;  
        }
    else
        {
        if(n > 0)
            quat_copy(dst, q);
        else
            {
            quat_inv(dst, q);
            quat_copy(q, dst);
            n = -n;
            }
        for(i = 0; i < (n-1); i++)
            quat_mulby(dst, q);
        }
    return pushquat(L, dst);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x20(%rsp), %rdx
callq 0x8260
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x8740
testq %rax, %rax
je 0x118f8
movq %rax, %r14
jle 0x11915
movaps 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
jmp 0x1193f
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movapd %xmm0, (%rsp)
movsd 0x47b0(%rip), %xmm11    # 0x160c0
jmp 0x11a56
movq %rsp, %r15
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x8e00
movaps (%r15), %xmm0
movaps 0x10(%r15), %xmm1
movaps %xmm1, 0x10(%r12)
movaps %xmm0, (%r12)
negq %r14
movapd 0x20(%rsp), %xmm0
movapd 0x30(%rsp), %xmm1
movupd 0x8(%rsp), %xmm2
decq %r14
movsd 0x18(%rsp), %xmm10
movhpd (%rsp), %xmm10          # xmm10 = xmm10[0],mem[0]
movapd %xmm0, %xmm3
unpcklpd %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
movapd %xmm1, %xmm4
unpckhpd %xmm0, %xmm4            # xmm4 = xmm4[1],xmm0[1]
movapd %xmm1, %xmm5
unpcklpd %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0]
movapd %xmm0, %xmm6
unpckhpd %xmm1, %xmm6            # xmm6 = xmm6[1],xmm1[1]
movapd %xmm1, %xmm7
shufpd $0x1, %xmm0, %xmm7      # xmm7 = xmm7[1],xmm0[0]
movapd %xmm0, %xmm8
shufpd $0x1, %xmm1, %xmm8      # xmm8 = xmm8[1],xmm1[0]
movapd 0x4732(%rip), %xmm9     # 0x160d0
movapd %xmm10, %xmm11
unpckhpd %xmm10, %xmm11          # xmm11 = xmm11[1],xmm10[1]
subq $0x1, %r14
jb 0x11a49
movapd %xmm10, %xmm13
unpcklpd %xmm2, %xmm13           # xmm13 = xmm13[0],xmm2[0]
movapd %xmm2, %xmm12
mulpd %xmm3, %xmm12
movapd %xmm11, %xmm14
mulpd %xmm8, %xmm14
addpd %xmm12, %xmm14
movapd %xmm2, %xmm12
shufpd $0x1, %xmm10, %xmm12    # xmm12 = xmm12[1],xmm10[0]
mulpd %xmm4, %xmm12
addpd %xmm14, %xmm12
movapd %xmm13, %xmm14
mulpd %xmm1, %xmm13
subpd %xmm13, %xmm12
xorpd %xmm9, %xmm14
shufpd $0x2, %xmm14, %xmm10    # xmm10 = xmm10[0],xmm14[1]
mulpd %xmm0, %xmm10
mulpd %xmm7, %xmm11
addpd %xmm10, %xmm11
movapd %xmm2, %xmm10
unpckhpd %xmm2, %xmm10           # xmm10 = xmm10[1],xmm2[1]
xorpd %xmm9, %xmm10
unpcklpd %xmm10, %xmm2           # xmm2 = xmm2[0],xmm10[0]
mulpd %xmm5, %xmm2
addpd %xmm11, %xmm2
unpcklpd %xmm14, %xmm10          # xmm10 = xmm10[0],xmm14[0]
mulpd %xmm6, %xmm10
addpd %xmm2, %xmm10
movapd %xmm12, %xmm2
jmp 0x1199e
movupd %xmm2, 0x8(%rsp)
movlpd %xmm10, 0x18(%rsp)
movq %rsp, %rsi
movsd %xmm11, (%rsi)
movq %rbx, %rdi
callq 0x8300
pushq $0x1
popq %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/quat.c
// Function: Qxs
static int Qxs(lua_State *L, int sarg, int qarg)
    {
    quat_t q; 
    size_t i; 
    double s = luaL_checknumber(L, sarg);
    checkquat(L, qarg, q);
    for(i=0; i < 4; i++)    
        q[i] *= s;
    return pushquat(L, q);
    }

// Assembly:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rdi, %rbx
callq 0x8350
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8260
movsd 0x8(%rsp), %xmm1
xorl %eax, %eax
cmpq $0x4, %rax
je 0x11b0f
movsd 0x10(%rsp,%rax,8), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp,%rax,8)
incq %rax
jmp 0x11af4
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x8300
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/quat.c
// Function: quat_Mat
static int quat_Mat(lua_State *L, size_t n)
/* returns the rotation matrix corresponding to the quaternion */
    {
#define w q[0]
#define x q[1]
#define y q[2]
#define z q[3]
    quat_t q; 
    mat_t m;
    double s, wx, wy, wz, xx, yy, zz, xy, xz, yz;
    checkquat(L, 1, q);
    mat_clear(m);
    s = w*w + x*x + y*y +z*z;
    if(s == 0)
        {
        m[0][0] = m[1][1] = m[2][2] = m[3][3] = 1;
        return pushmat(L, m, 4, 4, n, n);
        }
    s = 2 / s;  
    wx = s*w*x;
    wy = s*w*y;
    wz = s*w*z;
    xx = s*x*x;
    yy = s*y*y;
    zz = s*z*z;
    xy = s*x*y;
    xz = s*x*z;
    yz = s*y*z;
    
    m[0][0] = 1 - yy - zz;
    m[1][1] = 1 - xx - zz;
    m[2][2] = 1 - xx - yy;
    m[3][3] = 1;
    m[0][1] = xy - wz;
    m[1][0] = xy + wz;
    m[0][2] = xz + wy;
    m[2][0] = xz - wy;
    m[1][2] = yz - wx;
    m[2][1] = yz + wx;
    return pushmat(L, m, 4, 4, n, n);
#undef w
#undef x
#undef y
#undef z
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rsi
leaq 0x80(%rsp), %r15
movq %r15, %rdx
callq 0x8260
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm2
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm1
movapd %xmm0, %xmm3
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
movsd 0x10(%r15), %xmm1
movapd %xmm1, %xmm4
mulsd %xmm1, %xmm4
addsd %xmm3, %xmm4
movsd 0x18(%r15), %xmm7
movapd %xmm7, %xmm3
mulsd %xmm7, %xmm3
addsd %xmm4, %xmm3
xorpd %xmm4, %xmm4
ucomisd %xmm4, %xmm3
jne 0x11bed
jp 0x11bed
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rsp)
movq %rax, 0x50(%rsp)
movq %rax, 0x28(%rsp)
movq %rax, (%rsp)
jmp 0x11cdc
movsd 0x4b6a(%rip), %xmm8     # 0x16760
divsd %xmm3, %xmm8
mulsd %xmm8, %xmm0
movapd %xmm2, %xmm3
mulsd %xmm0, %xmm3
movapd %xmm1, %xmm4
mulsd %xmm0, %xmm4
mulsd %xmm7, %xmm0
movapd %xmm2, %xmm6
mulsd %xmm8, %xmm6
mulsd %xmm6, %xmm2
movapd %xmm1, %xmm5
mulsd %xmm8, %xmm5
movapd %xmm1, %xmm9
mulsd %xmm5, %xmm9
mulsd %xmm7, %xmm8
mulsd %xmm7, %xmm8
mulsd %xmm6, %xmm1
mulsd %xmm7, %xmm6
mulsd %xmm7, %xmm5
movsd 0x446e(%rip), %xmm7     # 0x160c0
movapd %xmm7, %xmm10
subsd %xmm9, %xmm10
subsd %xmm8, %xmm10
movsd %xmm10, (%rsp)
subsd %xmm2, %xmm7
movapd %xmm7, %xmm2
subsd %xmm8, %xmm2
movsd %xmm2, 0x28(%rsp)
subsd %xmm9, %xmm7
movsd %xmm7, 0x50(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rsp)
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsp)
addsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
movapd %xmm6, %xmm0
addsd %xmm4, %xmm0
movsd %xmm0, 0x10(%rsp)
subsd %xmm4, %xmm6
movsd %xmm6, 0x40(%rsp)
movapd %xmm5, %xmm0
subsd %xmm3, %xmm0
movsd %xmm0, 0x30(%rsp)
addsd %xmm3, %xmm5
movsd %xmm5, 0x48(%rsp)
movq %rsp, %rsi
pushq $0x4
popq %rcx
movq %r14, %rdi
movq %rcx, %rdx
movq %rbx, %r8
movq %rbx, %r9
callq 0x8500
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/quat.c
// Function: Quat
static int Quat(lua_State *L)
/* creates a quaternion from another quaternion, a scalar and a vec3, a matrix,
 * or a list of scalars.
 * the size is adapted by discarding exceeding values or adding zeros in lieu 
 * of missing values.
 * quat(q)
 * quat([w [, x [, y [, z]]])
 * quat(s, v)
 * quat(mat)
 * quat(axis, theta)
 */
    {
    quat_t q;
    vec_t v;
    double halftheta, s;
    size_t vsize, i, arg;

    if(testquat(L, 1, q))
        return pushquat(L, q);

    if(testvec(L, 2, v, &vsize, NULL))
        {
#if 0
        if(vsize != 3)
            return luaL_argerror(L, 2, "size 3 vector expected");
#endif
        q[0] = luaL_checknumber(L, 1);
        q[1] = v[0];
        q[2] = v[1];
        q[3] = v[2];
        return pushquat(L, q);
        }

    if(testvec(L, 1, v, &vsize, NULL)) // rotation quaternion
        {
        halftheta = luaL_checknumber(L, 2)/2;
        s = sin(halftheta);
        q[0] = cos(halftheta);
        q[1] = v[0] * s;
        q[2] = v[1] * s;
        q[3] = v[2] * s;
        quat_normalize(q);
        return pushquat(L, q);
        }

    if(testmat(L, 1, NULL, NULL, NULL))
        return quat_FromMat(L);

    arg = 1;
    for(i = 0; i < 4; i++)
        q[i] = luaL_optnumber(L, arg++, 0);
    return pushquat(L, q);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rbp
leaq 0x30(%rsp), %rdx
movl %ebp, %esi
callq 0x8170
testl %eax, %eax
je 0x11d27
leaq 0x30(%rsp), %rsi
jmp 0x11d6d
pushq $0x2
popq %rsi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0x8ad0
pushq $0x1
popq %rbp
testl %eax, %eax
je 0x11d82
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8350
leaq 0x30(%rsp), %rsi
movsd %xmm0, (%rsi)
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x8(%rsi)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x18(%rsi)
movq %rbx, %rdi
callq 0x8300
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x8ad0
testl %eax, %eax
je 0x11e0d
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x8350
mulsd 0x49a8(%rip), %xmm0     # 0x16758
movsd %xmm0, (%rsp)
callq 0x8c30
movapd %xmm0, 0x50(%rsp)
movsd (%rsp), %xmm0
callq 0x8610
leaq 0x30(%rsp), %r14
movsd %xmm0, (%r14)
movapd 0x50(%rsp), %xmm1
movapd %xmm1, %xmm0
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
mulpd 0x10(%rsp), %xmm0
movupd %xmm0, 0x8(%r14)
mulsd 0x20(%rsp), %xmm1
movsd %xmm1, 0x18(%r14)
movq %r14, %rdi
callq 0x8640
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x11d70
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8a00
testl %eax, %eax
je 0x11e34
movq %rbx, %rdi
callq 0x8c10
movl %eax, %ebp
jmp 0x11d75
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x11d20
leaq 0x1(%r15), %r14
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x8370
movsd %xmm0, 0x30(%rsp,%r15,8)
movq %r14, %r15
jmp 0x11e37
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/rect.c
// Function: moonglmath_testrect
int testrect(lua_State *L, int arg, rect_t r)
/* Tests if the element at arg is a rect and sets r accordingly */
    {
    size_t i;
    if(!testmetatable(L, arg, RECT_MT)) return 0;

    if(r != NULL)
        {
        rect_clear(r);
        for(i=0; i < 4; i++)
            {
            lua_geti(L, arg, i+1);
            r[i] = luaL_checknumber(L, -1);
            lua_pop(L, 1);
            }
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x4902(%rip), %rdx      # 0x167a4
callq 0x8180
testl %eax, %eax
je 0x11f03
pushq $0x1
popq %rax
testq %rbx, %rbx
je 0x11f05
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
pushq $0x1
popq %r12
pushq $-0x1
popq %r13
pushq $-0x2
popq %r15
cmpq $0x5, %r12
je 0x11efe
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x8de0
movq %r14, %rdi
movl %r13d, %esi
callq 0x8350
movsd %xmm0, -0x8(%rbx,%r12,8)
movq %r14, %rdi
movl %r15d, %esi
callq 0x80c0
incq %r12
jmp 0x11ec9
pushq $0x1
popq %rax
jmp 0x11f05
xorl %eax, %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]moonglmath/src/rect.c
// Function: moonglmath_pushrect
int pushrect(lua_State *L, rect_t r)
    {
    size_t i;
    lua_newtable(L);
    setmetatable(L, RECT_MT);
    for(i=0; i<4; i++)
        {
        lua_pushnumber(L, r[i]);
        lua_seti(L, -2, i+1);
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x8320
leaq 0x482a(%rip), %rsi      # 0x167a4
movq %r14, %rdi
callq 0x89c0
pushq $0x1
popq %r15
pushq $-0x2
popq %rbp
cmpq $0x5, %r15
je 0x11fb0
movsd -0x8(%rbx,%r15,8), %xmm0
movq %r14, %rdi
callq 0x8840
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x86a0
incq %r15
jmp 0x11f89
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]moonglmath/src/rect.c
// Function: Concat
static int Concat(lua_State *L)
    {
    rect_t r;
    if(testrect(L, 1, r))
        {
        ToString_(L, r);
        lua_pushvalue(L, 2);
        }
    else if(testrect(L, 2, r))
        {
        lua_pushvalue(L, 1);
        ToString_(L, r);
        }
    else 
        return unexpected(L);
    lua_concat(L, 2);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
movq %rsp, %rdx
movl %ebx, %esi
callq 0x8920
testl %eax, %eax
je 0x12069
movq %rsp, %rsi
movq %r14, %rdi
callq 0x120c7
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x8650
jmp 0x12091
pushq $0x2
popq %rsi
movq %rsp, %rdx
movq %r14, %rdi
callq 0x8920
testl %eax, %eax
je 0x120a6
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x8650
movq %rsp, %rsi
movq %r14, %rdi
callq 0x120c7
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x8c70
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x3fc7(%rip), %rsi      # 0x16074
leaq 0x4700(%rip), %rdx      # 0x167b4
movq %r14, %rdi
movl $0x93, %ecx
xorl %eax, %eax
callq 0x8b00
movl %eax, %ebx
jmp 0x1209c
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/rect.c
// Function: ToString_
static int ToString_(lua_State *L, rect_t r)
/* With snprintf because lua_pushfstring does not support the %g conversion specifier */
    {
#define SZ 512
#define space (SZ-p)
    char str[SZ];
    int p=0;
    p = snprintf(str, space, "[ "FMT", "FMT", "FMT", "FMT" ]", r[0], r[1], r[2], r[3]);
    if(space<0)
        { 
        /* truncate */
        p = SZ - 5; 
        p+=snprintf(str+p, space, " ...");
        lua_pushlstring(L, str, p);
        return 1;
        }
    lua_pushlstring(L, str, p);
    return 1;
#undef space
#undef SZ
    }

// Assembly:
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
movsd 0x18(%rsi), %xmm3
leaq 0x3f5a(%rip), %rdx      # 0x16046
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x4, %al
callq 0x8420
cmpl $0x201, %eax            # imm = 0x201
jl 0x1211c
movb $0x0, 0x1ff(%rsp)
movl $0x2e2e2e20, 0x1fb(%rsp) # imm = 0x2E2E2E20
movl $0x1ff, %edx            # imm = 0x1FF
jmp 0x1211f
movslq %eax, %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x89d0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/rect.c
// Function: Rect
static int Rect(lua_State *L)
/* creates a rect from another rect or a list of values 
 * the size is adapted by discarding exceeding values or adding zeros
 * in lieu of missing values.
 */
    {
    rect_t r;
    size_t i, arg;
    arg = 1;
    if(testrect(L, arg, r))
        return pushrect(L, r);
    for(i = 0; i < 4; i++)
        r[i] = luaL_optnumber(L, arg++, 0);
    return pushrect(L, r);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
movq %rsp, %rdx
callq 0x8920
testl %eax, %eax
je 0x12166
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8ab0
pushq $0x1
popq %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x1214e
leaq 0x1(%r15), %r14
xorps %xmm0, %xmm0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x8370
movsd %xmm0, (%rsp,%r15,8)
movq %r14, %r15
jmp 0x12169
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: moonglmath_translate
void translate(mat_t m, double x, double y, double z)
/* 1 0 0 x
 * 0 1 0 y
 * 0 0 1 z
 * 0 0 0 1
 *
 * T^-1(x,y,z) = T(-x, -y, -z)
 */
    {
    mat_clear(m);
    m[0][3] = x;
    m[1][3] = y;
    m[2][3] = z;
    m[0][0] = m[1][1] = m[2][2] = m[3][3] = 1.0;
    }

// Assembly:
xorps %xmm3, %xmm3
movups %xmm3, 0x18(%rdi)
movups %xmm3, 0x38(%rdi)
movups %xmm3, 0x58(%rdi)
movups %xmm3, 0x48(%rdi)
movups %xmm3, 0x28(%rdi)
movups %xmm3, 0x68(%rdi)
movups %xmm3, 0x8(%rdi)
movsd %xmm0, 0x18(%rdi)
movsd %xmm1, 0x38(%rdi)
movsd %xmm2, 0x58(%rdi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rdi)
movq %rax, 0x50(%rdi)
movq %rax, 0x28(%rdi)
movq %rax, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: moonglmath_scale
void scale(mat_t m, double x, double y, double z)
/* x 0 0 0
 * 0 y 0 0
 * 0 0 z 0
 * 0 0 0 1
 */
    {
    mat_clear(m);
    m[0][0] = x;
    m[1][1] = y;
    m[2][2] = z;
    m[3][3] = 1.0;
    }

// Assembly:
xorps %xmm3, %xmm3
movups %xmm3, 0x28(%rdi)
movups %xmm3, 0x48(%rdi)
movups %xmm3, 0x68(%rdi)
movups %xmm3, 0x58(%rdi)
movups %xmm3, 0x38(%rdi)
movups %xmm3, 0x18(%rdi)
movups %xmm3, 0x8(%rdi)
movsd %xmm0, (%rdi)
movsd %xmm1, 0x28(%rdi)
movsd %xmm2, 0x50(%rdi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: moonglmath_rotate_x
void rotate_x(mat_t m, double rad)
/*  1  0  0  0
 *  0  c -s  0
 *  0  s  c  0
 *  0  0  0  1
 */
    {
    double c = cos(rad);
    double s = sin(rad);
    mat_clear(m);
    m[0][0] = m[3][3] = 1;
    m[1][1] = m[2][2] = c;
    m[1][2] = -s;
    m[2][1] = s;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, (%rsp)
movq %rdi, %rbx
callq 0x8610
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8c30
xorps %xmm1, %xmm1
movups %xmm1, 0x48(%rbx)
movups %xmm1, 0x28(%rbx)
movups %xmm1, 0x8(%rbx)
movups %xmm1, 0x18(%rbx)
movups %xmm1, 0x38(%rbx)
movups %xmm1, 0x58(%rbx)
movups %xmm1, 0x68(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rbx)
movq %rax, (%rbx)
movsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x50(%rbx)
movsd %xmm1, 0x28(%rbx)
movaps 0x3d87(%rip), %xmm1     # 0x160d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x30(%rbx)
movsd %xmm0, 0x48(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: moonglmath_rotate_y
void rotate_y(mat_t m, double rad)
/*  c  0  s  0
 *  0  1  0  0
 * -s  0  c  0
 *  0  0  0  1
 */
    {
    double c = cos(rad);
    double s = sin(rad);
    mat_clear(m);
    m[1][1] = m[3][3] = 1;
    m[0][0] = m[2][2] = c;
    m[2][0] = -s;
    m[0][2] = s;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, (%rsp)
movq %rdi, %rbx
callq 0x8610
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8c30
xorps %xmm1, %xmm1
movups %xmm1, 0x28(%rbx)
movups %xmm1, 0x48(%rbx)
movups %xmm1, 0x38(%rbx)
movups %xmm1, 0x8(%rbx)
movups %xmm1, 0x18(%rbx)
movups %xmm1, 0x58(%rbx)
movups %xmm1, 0x68(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rbx)
movq %rax, 0x28(%rbx)
movsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x50(%rbx)
movsd %xmm1, (%rbx)
movaps 0x3d0c(%rip), %xmm1     # 0x160d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x40(%rbx)
movsd %xmm0, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: moonglmath_rotate_z
void rotate_z(mat_t m, double rad)
/*  c -s  0  0
 *  s  c  0  0
 *  0  0  1  0
 *  0  0  0  1
 */
    {
    double c = cos(rad);
    double s = sin(rad);
    mat_clear(m);
    m[0][0] = m[1][1] = c;
    m[2][2] = m[3][3] = 1;
    m[0][1] = -s;
    m[1][0] = s;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, (%rsp)
movq %rdi, %rbx
callq 0x8610
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8c30
xorps %xmm1, %xmm1
movups %xmm1, 0x20(%rbx)
movups %xmm1, 0x50(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm1, 0x30(%rbx)
movups %xmm1, 0x40(%rbx)
movups %xmm1, 0x60(%rbx)
andq $0x0, 0x70(%rbx)
movsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x28(%rbx)
movsd %xmm1, (%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rbx)
movq %rax, 0x50(%rbx)
movaps 0x3c90(%rip), %xmm1     # 0x160d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%rbx)
movsd %xmm0, 0x20(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: Translate
static int Translate(lua_State *L)
    {
    vec_t v;
    mat_t m;
    if(!testvec(L, 1, v, NULL, NULL)) 
        {
        v[0] = luaL_checknumber(L, 1);
        v[1] = luaL_checknumber(L, 2);
        v[2] = luaL_checknumber(L, 3);
        }
    translate(m, v[0], v[1], v[2]);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
movq %rsp, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8ad0
testl %eax, %eax
je 0x12487
movsd 0x10(%rsp), %xmm0
jmp 0x124b9
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8350
movsd %xmm0, (%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x8350
movsd %xmm0, 0x8(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x8350
movsd %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
xorps %xmm3, %xmm3
leaq 0x20(%rsp), %rsi
movups %xmm3, 0x18(%rsi)
movups %xmm3, 0x38(%rsi)
movups %xmm3, 0x58(%rsi)
movups %xmm3, 0x48(%rsi)
movups %xmm3, 0x28(%rsi)
movups %xmm3, 0x8(%rsi)
movups %xmm3, 0x68(%rsi)
movsd %xmm1, 0x18(%rsi)
movsd %xmm2, 0x38(%rsi)
movsd %xmm0, 0x58(%rsi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rsi)
movq %rax, 0x50(%rsi)
movq %rax, 0x28(%rsi)
movq %rax, (%rsi)
pushq $0x4
popq %rcx
movq %rbx, %rdi
movq %rcx, %rdx
movq %rcx, %r8
movq %rcx, %r9
callq 0x8500
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: Scale
static int Scale(lua_State *L)
    {
    vec_t v;
    mat_t m;
    if(!testvec(L, 1, v, NULL, NULL)) 
        {
        v[0] = luaL_checknumber(L, 1);
        if(lua_isnoneornil(L, 2) && lua_isnoneornil(L, 3))
            v[1] = v[2] = v[0];
        else
            {
            v[1] = luaL_checknumber(L, 2);
            v[2] = luaL_checknumber(L, 3);
            }
        }
    scale(m, v[0], v[1], v[2]);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
movq %rsp, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8ad0
testl %eax, %eax
je 0x12554
movsd 0x10(%rsp), %xmm0
jmp 0x125a8
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8350
movsd %xmm0, (%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x8cf0
testl %eax, %eax
jg 0x12586
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x8cf0
testl %eax, %eax
jle 0x12610
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x8350
movsd %xmm0, 0x8(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x8350
movsd %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
xorps %xmm3, %xmm3
leaq 0x20(%rsp), %rsi
movups %xmm3, 0x28(%rsi)
movups %xmm3, 0x48(%rsi)
movups %xmm3, 0x8(%rsi)
movups %xmm3, 0x18(%rsi)
movups %xmm3, 0x38(%rsi)
movups %xmm3, 0x58(%rsi)
movups %xmm3, 0x68(%rsi)
movsd %xmm1, (%rsi)
movsd %xmm2, 0x28(%rsi)
movsd %xmm0, 0x50(%rsi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rsi)
pushq $0x4
popq %rcx
movq %rbx, %rdi
movq %rcx, %rdx
movq %rcx, %r8
movq %rcx, %r9
callq 0x8500
addq $0xa0, %rsp
popq %rbx
retq
movsd (%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
jmp 0x125a8
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: Rotate
static int Rotate(lua_State *L)
    {
    vec_t v;
    mat_t m;
    double rad = luaL_checknumber(L, 1);
    if(!testvec(L, 2, v, NULL, NULL)) 
        {
        v[0] = luaL_checknumber(L, 2);
        v[1] = luaL_checknumber(L, 3);
        v[2] = luaL_checknumber(L, 4);
        }
    rotate(m, v[0], v[1], v[2], rad);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x8350
movsd %xmm0, 0x10(%rsp)
pushq $0x2
popq %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8ad0
testl %eax, %eax
je 0x12663
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x1269c
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x8350
movsd %xmm0, 0x30(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x8350
movsd %xmm0, 0x38(%rsp)
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x8350
movsd %xmm0, 0x8(%rsp)
movsd %xmm0, 0x40(%rsp)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x8610
movsd %xmm0, 0x18(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x8c30
movsd 0x39e8(%rip), %xmm3     # 0x160c0
movsd 0x18(%rsp), %xmm6
subsd %xmm6, %xmm3
xorps %xmm1, %xmm1
leaq 0x50(%rsp), %rsi
movups %xmm1, 0x28(%rsi)
movups %xmm1, 0x48(%rsi)
movups %xmm1, 0x18(%rsi)
movups %xmm1, 0x38(%rsi)
movups %xmm1, 0x58(%rsi)
movups %xmm1, 0x68(%rsi)
movsd 0x20(%rsp), %xmm7
movapd %xmm7, %xmm2
mulsd %xmm3, %xmm2
movapd %xmm2, %xmm1
mulsd %xmm7, %xmm1
addsd %xmm6, %xmm1
movsd %xmm1, (%rsi)
movsd 0x28(%rsp), %xmm5
movapd %xmm5, %xmm1
mulsd %xmm3, %xmm1
movapd %xmm1, %xmm4
mulsd %xmm5, %xmm4
movapd %xmm5, %xmm8
addsd %xmm6, %xmm4
movapd %xmm6, %xmm5
movsd %xmm4, 0x28(%rsi)
movsd 0x8(%rsp), %xmm6
mulsd %xmm6, %xmm3
mulsd %xmm6, %xmm3
addsd %xmm5, %xmm3
movsd %xmm3, 0x50(%rsi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rsi)
movapd %xmm8, %xmm3
mulsd %xmm2, %xmm3
movapd %xmm6, %xmm4
mulsd %xmm0, %xmm4
movapd %xmm3, %xmm5
subsd %xmm4, %xmm5
movsd %xmm5, 0x8(%rsi)
addsd %xmm3, %xmm4
movsd %xmm4, 0x20(%rsi)
mulsd %xmm6, %xmm2
movapd %xmm8, %xmm4
mulsd %xmm0, %xmm4
movapd %xmm4, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, 0x10(%rsi)
subsd %xmm4, %xmm2
movsd %xmm2, 0x40(%rsi)
mulsd %xmm6, %xmm1
movapd %xmm7, %xmm2
mulsd %xmm0, %xmm2
movapd %xmm1, %xmm0
subsd %xmm2, %xmm0
movsd %xmm0, 0x30(%rsi)
addsd %xmm1, %xmm2
movsd %xmm2, 0x48(%rsi)
pushq $0x4
popq %rcx
movq %rbx, %rdi
movq %rcx, %rdx
movq %rcx, %r8
movq %rcx, %r9
callq 0x8500
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: RotateX
static int RotateX(lua_State *L)
    {
    mat_t m;
    double rad = luaL_checknumber(L, 1);
    rotate_x(m, rad);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x8350
movsd %xmm0, (%rsp)
callq 0x8610
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8c30
xorps %xmm1, %xmm1
leaq 0x10(%rsp), %rsi
movups %xmm1, 0x48(%rsi)
movups %xmm1, 0x28(%rsi)
movups %xmm1, 0x8(%rsi)
movups %xmm1, 0x18(%rsi)
movups %xmm1, 0x38(%rsi)
movups %xmm1, 0x58(%rsi)
movups %xmm1, 0x68(%rsi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rsi)
movq %rax, (%rsi)
movsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x50(%rsi)
movsd %xmm1, 0x28(%rsi)
movaps 0x3861(%rip), %xmm1     # 0x160d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x30(%rsi)
movsd %xmm0, 0x48(%rsi)
pushq $0x4
popq %rcx
movq %rbx, %rdi
movq %rcx, %rdx
movq %rcx, %r8
movq %rcx, %r9
callq 0x8500
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: RotateY
static int RotateY(lua_State *L)
    {
    mat_t m;
    double rad = luaL_checknumber(L, 1);
    rotate_y(m, rad);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x8350
movsd %xmm0, (%rsp)
callq 0x8610
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8c30
xorps %xmm1, %xmm1
leaq 0x10(%rsp), %rsi
movups %xmm1, 0x28(%rsi)
movups %xmm1, 0x48(%rsi)
movups %xmm1, 0x38(%rsi)
movups %xmm1, 0x8(%rsi)
movups %xmm1, 0x18(%rsi)
movups %xmm1, 0x58(%rsi)
movups %xmm1, 0x68(%rsi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rsi)
movq %rax, 0x28(%rsi)
movsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x50(%rsi)
movsd %xmm1, (%rsi)
movaps 0x37bf(%rip), %xmm1     # 0x160d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x40(%rsi)
movsd %xmm0, 0x10(%rsi)
pushq $0x4
popq %rcx
movq %rbx, %rdi
movq %rcx, %rdx
movq %rcx, %r8
movq %rcx, %r9
callq 0x8500
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/transform.c
// Function: RotateZ
static int RotateZ(lua_State *L)
    {
    mat_t m;
    double rad = luaL_checknumber(L, 1);
    rotate_z(m, rad);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x8350
movsd %xmm0, (%rsp)
callq 0x8610
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8c30
xorps %xmm1, %xmm1
leaq 0x10(%rsp), %rsi
movaps %xmm1, 0x20(%rsi)
movaps %xmm1, 0x50(%rsi)
movaps %xmm1, 0x10(%rsi)
movaps %xmm1, 0x30(%rsi)
movaps %xmm1, 0x40(%rsi)
movaps %xmm1, 0x60(%rsi)
andq $0x0, 0x70(%rsi)
movsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x28(%rsi)
movsd %xmm1, (%rsi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rsi)
movq %rax, 0x50(%rsi)
movaps 0x371c(%rip), %xmm1     # 0x160d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%rsi)
movsd %xmm0, 0x20(%rsi)
pushq $0x4
popq %rcx
movq %rbx, %rdi
movq %rcx, %rdx
movq %rcx, %r8
movq %rcx, %r9
callq 0x8500
addq $0x90, %rsp
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/udata.c
// Function: moonglmath_udata_unref
int udata_unref(lua_State *L, uint64_t id)
/* unreference udata so that it will be garbage collected */
    {
//  printf("unref object %lu\n", id);
    udata_t *udata = udata_search(id);
    if(!udata) 
        return luaL_error(L, "invalid object identifier %I", id);
    if(udata->ref != LUA_NOREF)
        {
        luaL_unref(L, LUA_REGISTRYINDEX, udata->ref);
        udata->ref = LUA_NOREF;
        }
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x12d06
testq %rax, %rax
je 0x12d79
movq %rax, %r14
movl 0x28(%rax), %edx
cmpl $-0x2, %edx
je 0x12d71
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x8d90
movl $0xfffffffe, 0x28(%r14) # imm = 0xFFFFFFFE
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3aec(%rip), %rsi      # 0x1686c
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x8b00
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/udata.c
// Function: moonglmath_udata_free
int udata_free(lua_State *L, uint64_t id)
/* this should be called in the __gc metamethod
 */
    {
    udata_t *udata = udata_search(id);
//  printf("free object %lu\n", id);
    if(!udata) 
        return luaL_error(L, "invalid object identifier %I", id);
    /* release all references */
    if(udata->ref != LUA_NOREF)
        luaL_unref(L, LUA_REGISTRYINDEX, udata->ref);
    udata_remove(udata);
    Free(L, udata);
    /* mem is released by Lua at garbage collection */
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x12d06
testq %rax, %rax
je 0x12ddd
movq %rax, %r14
movl 0x28(%rax), %edx
cmpl $-0x2, %edx
je 0x12dc2
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x8d90
movq %r14, %rdi
callq 0x12df6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8630
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3a88(%rip), %rsi      # 0x1686c
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x8b00
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/udata.c
// Function: moonglmath_udata_push
int udata_push(lua_State *L, uint64_t id)
    {
    udata_t *udata = udata_search(id);
    if(!udata) 
        return luaL_error(L, "invalid object identifier %I", id);
    if(udata->ref == LUA_NOREF)
        return luaL_error(L, "unreferenced object");
    if(lua_rawgeti(L, LUA_REGISTRYINDEX, udata->ref) != LUA_TUSERDATA)
        return luaL_error(L, UNEXPECTED_ERROR);
    return 1; /* one value pushed */
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x12d06
testq %rax, %rax
je 0x131f4
movslq 0x28(%rax), %rdx
cmpq $-0x2, %rdx
jne 0x1320f
leaq 0x36a6(%rip), %rsi      # 0x16889
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8b00
leaq 0x3671(%rip), %rsi      # 0x1686c
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8b00
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x83b0
cmpl $0x7, %eax
jne 0x1322c
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2e41(%rip), %rsi      # 0x16074
leaq 0x3663(%rip), %rdx      # 0x1689d
movq %rbx, %rdi
movl $0xa4, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8b00
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/utils.c
// Function: moonglmath_now
double now(void)
    {
#if _POSIX_C_SOURCE >= 199309L
    struct timespec ts;
    if(clock_gettime(CLOCK_MONOTONIC,&ts)!=0)
        { printf("clock_gettime error\n"); return -1; }
    return ts.tv_sec + ts.tv_nsec*1.0e-9;
#else
    struct timeval tv;
    if(gettimeofday(&tv, NULL) != 0)
        { printf("gettimeofday error\n"); return -1; }
    return tv.tv_sec + tv.tv_usec*1.0e-6;
#endif
    }

// Assembly:
subq $0x18, %rsp
pushq $0x1
popq %rdi
leaq 0x8(%rsp), %rsi
callq 0x8250
testl %eax, %eax
je 0x1371b
leaq 0x3356(%rip), %rdi      # 0x16a62
callq 0x8190
movsd 0x31cf(%rip), %xmm0     # 0x168e8
jmp 0x13735
cvtsi2sdq 0x8(%rsp), %xmm1
cvtsi2sdq 0x10(%rsp), %xmm0
mulsd 0x31bf(%rip), %xmm0     # 0x168f0
addsd %xmm1, %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/utils.c
// Function: moonglmath_newmetatable
int newmetatable(lua_State *L, const char *metatable)
    {
    luaL_newmetatable(L, metatable);
    lua_pushvalue(L, -1);
    lua_setfield(L, -2, "__index"); /* metatable.__index = metatable */
    lua_pop(L, 1);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8d40
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x8650
leaq 0x3133(%rip), %rdx      # 0x168dd
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x84e0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x80c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/utils.c
// Function: moonglmath_testmetatable
int testmetatable(lua_State *L, int arg, const char *metatable)
/* Tests the metatable of the table at index arg */
    {
    int ok = 0;
    if(lua_getmetatable(L, arg) == 0) return 0;
    luaL_getmetatable(L, metatable);
    ok = lua_compare(L, -1, -2, LUA_OPEQ);
    lua_pop(L, 2);
    return ok;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
callq 0x8dc0
testl %eax, %eax
je 0x1382e
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
movq %r14, %rdx
callq 0x8e50
pushq $-0x1
popq %rsi
pushq $-0x2
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x8da0
movl %eax, %ebp
pushq $-0x3
popq %rsi
movq %rbx, %rdi
callq 0x80c0
movl %ebp, %eax
jmp 0x13830
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/utils.c
// Function: moonglmath_metatable_setfuncs
int metatable_setfuncs(lua_State *L, const char *metatable, const luaL_Reg *metamethods, 
            const luaL_Reg *methods)
    {
    luaL_getmetatable(L, metatable);
    if(metamethods)
        luaL_setfuncs(L, metamethods, 0);
    if(methods)
        {
        luaL_getsubtable(L, -1, "__index");
        luaL_setfuncs(L, methods, 0);   
        lua_pop(L, 1);
        }
    lua_pop(L, 1);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %rbx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x8e50
testq %r15, %r15
je 0x138a7
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x81b0
testq %r14, %r14
je 0x138d6
leaq 0x302a(%rip), %rdx      # 0x168dd
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x85d0
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x81b0
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x80c0
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x80c0
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/utils.c
// Function: moonglmath_checkoption_hint
int checkoption_hint(lua_State *L, int arg, const char *def, const char *const lst[])
/* Variant of luaL_checkoption(), with an added hint in the error message */
    {
    const char *hint = NULL;
    const char *name = (def) ? luaL_optstring(L, arg, def) : luaL_checkstring(L, arg);
    int i;
    for (i=0; lst[i]; i++)
        if (strcmp(lst[i], name) == 0)  return i;

    if(lua_checkstack(L, i*2))
        {
        for(i=0; lst[i]; i++)
            {
            lua_pushfstring(L, "'%s'", lst[i]);
            lua_pushstring(L, "|");
            }
        i = i*2;
        if(i>0)
            {
            lua_pop(L, 1); /* the last separator */
            lua_concat(L, i-1);
            hint = lua_tostring(L, -1); 
            }
        }
    if(hint)
        return luaL_argerror(L, arg, lua_pushfstring(L, 
                    "invalid option '%s', valid options are: %s", name, hint));
    return luaL_argerror(L, arg, lua_pushfstring(L, "invalid option '%s'", name));
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdi, %r14
testq %rdx, %rdx
movl %esi, 0x4(%rsp)
je 0x13952
xorl %ecx, %ecx
callq 0x8360
jmp 0x13959
xorl %edx, %edx
callq 0x8600
movq %rax, %r15
xorl %r13d, %r13d
xorl %ebx, %ebx
movq (%r12,%r13,4), %rdi
testq %rdi, %rdi
je 0x1397e
movq %r15, %rsi
callq 0x8700
testl %eax, %eax
je 0x139cc
incl %ebx
addq $0x2, %r13
jmp 0x13961
movq %r14, %rdi
movl %r13d, %esi
callq 0x8030
testl %eax, %eax
je 0x13a22
pushq $-0x1
popq %rbp
leaq 0x2f8d(%rip), %rbx      # 0x16928
xorl %r13d, %r13d
movq (%r12,%r13), %rdx
testq %rdx, %rdx
je 0x139dd
movq %r14, %rdi
leaq 0x2f0a(%rip), %rsi      # 0x168bb
xorl %eax, %eax
callq 0x8660
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8db0
addq $0x8, %r13
addl $0x2, %ebp
jmp 0x1399e
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r13, %r13
je 0x13a22
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x80c0
movq %r14, %rdi
movl %ebp, %esi
callq 0x8c70
pushq $-0x1
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x82c0
testq %rax, %rax
je 0x13a22
leaq 0x2f1a(%rip), %rsi      # 0x1692a
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x8660
jmp 0x13a36
leaq 0x2f2c(%rip), %rsi      # 0x16955
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8660
movq %r14, %rdi
movl 0x4(%rsp), %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x81c0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/utils.c
// Function: moonglmath_isoption
int isoption(lua_State *L, int arg, const char *const lst[])
/* Variant of luaL_checkoption(), checks only and returns a boolean */
    {
    int i;
    const char *name;

    if(!lua_isstring(L, arg)) return 0;
    name = lua_tostring(L, arg);
    for (i=0; lst[i]; i++)
        if (strcmp(lst[i], name) == 0)  return 1;
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
callq 0x8ec0
xorl %r14d, %r14d
testl %eax, %eax
je 0x13a9b
movq %r15, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x82c0
movq %rax, %r15
pushq $0x1
popq %rbp
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x13a9b
movq %r15, %rsi
callq 0x8700
addq $0x8, %rbx
testl %eax, %eax
jne 0x13a80
movl %ebp, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_testvec
int testvec(lua_State *L, int arg, vec_t v, size_t *size, unsigned int *isrow)
/* Tests if the element at arg is a vector and sets v, *size and *isrow accordingly
 * (unless they are passed as 0).
 */
    {
    size_t i;
    size_t size_;
    unsigned int isrow_;
    if(!testmetatable(L, arg, VEC_MT)) return 0;

    lua_getfield(L, arg, "type");   
    isrow_ = checkisrow(L, -1);
    lua_pop(L, 1);

    lua_getfield(L, arg, "size");
    size_ = luaL_checkinteger(L, -1);
    lua_pop(L, 1);
    checkvecsize(L, size_);

    if(isrow != NULL) *isrow = isrow_;
    if(size != NULL) *size = size_;
    if(v != NULL)
        {
        vec_clear(v);
        for(i=0; i < size_; i++)
            {
            lua_geti(L, arg, i+1);
            v[i] = luaL_checknumber(L, -1);
            lua_pop(L, 1);
            }
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r13
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x2803(%rip), %rdx      # 0x163ca
callq 0x8180
testl %eax, %eax
je 0x13c62
movq %r15, 0x10(%rsp)
leaq 0x2df1(%rip), %rdx      # 0x169d1
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8e50
pushq $-0x1
popq %r12
movq %rbx, %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x8050
movl %eax, 0xc(%rsp)
pushq $-0x2
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x80c0
leaq 0x2ea6(%rip), %rdx      # 0x16abb
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8e50
movq %rbx, %rdi
movl %r12d, %esi
callq 0x8740
movq %rax, %r12
movq %rbx, %rdi
movl %r15d, %esi
callq 0x80c0
leaq -0x5(%r12), %rax
cmpq $-0x5, %rax
ja 0x13c66
leaq 0x2e62(%rip), %rsi      # 0x16aac
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8b00
xorl %eax, %eax
jmp 0x13cdb
testq %r13, %r13
je 0x13c73
movl 0xc(%rsp), %eax
movl %eax, (%r13)
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x13c80
movq %r12, (%rax)
pushq $0x1
popq %rax
testq %r14, %r14
je 0x13cdb
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
negq %r12
pushq $0x1
popq %r13
pushq $-0x2
popq %r15
leaq (%r12,%r13), %rax
cmpq $0x1, %rax
je 0x13cd8
movq %rbx, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x8de0
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0x8350
movsd %xmm0, -0x8(%r14,%r13,8)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x80c0
incq %r13
jmp 0x13c9f
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_pushvec
int pushvec(lua_State *L, vec_t v, size_t vsize, size_t size, unsigned int isrow)
/* vsize = no. of valid elements in v
 * if vsize > size, the exceeding elements are discarded,
 * if vsize < size, the missing elements are set to 0.
 */
    {
    size_t i;
    checkvecsize(L, size);
    lua_newtable(L);
    setmetatable(L, VEC_MT);
    for(i=0; i<size; i++)
        {
        lua_pushnumber(L, i < vsize ? v[i] : 0);
        lua_seti(L, -2, i+1);
        }
    lua_pushinteger(L, size);
    lua_setfield(L, -2, "size");
    pushisrow(L, isrow);
    lua_setfield(L, -2, "type");
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x5(%rcx), %rax
cmpq $-0x5, %rax
ja 0x13d6a
leaq 0x2d5a(%rip), %rsi      # 0x16aac
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8b00
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl %r8d, 0x4(%rsp)
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8320
leaq 0x263c(%rip), %rsi      # 0x163ca
movq %rbx, %rdi
callq 0x89c0
pushq $-0x2
popq %rbp
cmpq %r13, %r14
je 0x13dc6
xorps %xmm0, %xmm0
cmpq %r15, %r13
jae 0x13dac
movsd (%r12,%r13,8), %xmm0
movq %rbx, %rdi
callq 0x8840
incq %r13
movq %rbx, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x86a0
jmp 0x13d99
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8540
leaq 0x2ce3(%rip), %rdx      # 0x16abb
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x84e0
movq %rbx, %rdi
xorl %esi, %esi
movl 0x4(%rsp), %edx
callq 0x85c0
leaq 0x2bd7(%rip), %rdx      # 0x169d1
movq %rbx, %rdi
movl %ebp, %esi
callq 0x84e0
pushq $0x1
popq %rax
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]moonglmath/src/vec.c
// Function: moonglmath_vec_unm
void vec_unm(vec_t dst, vec_t v, size_t n)
    {
    size_t i;
    vec_clear(dst);
    for(i=0; i < n; i++)    
        dst[i] = -v[i];
    }

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
xorl %eax, %eax
movaps 0x22a7(%rip), %xmm0     # 0x160d0
cmpq %rax, %rdx
je 0x13e3f
movsd (%rsi,%rax,8), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, (%rdi,%rax,8)
incq %rax
jmp 0x13e29
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_add
void vec_add(vec_t dst, vec_t v1, vec_t v2, size_t n)
    {
    size_t i;
    vec_clear(dst);
    for(i=0; i < n; i++)    
        dst[i] = v1[i] + v2[i];
    }

// Assembly:
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rdi)
movupd %xmm0, (%rdi)
xorl %eax, %eax
cmpq %rax, %rcx
je 0x13e68
movsd (%rsi,%rax,8), %xmm0
addsd (%rdx,%rax,8), %xmm0
movsd %xmm0, (%rdi,%rax,8)
incq %rax
jmp 0x13e4f
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_norm
double vec_norm(vec_t v, size_t n)
    {
    size_t i;
    double r = 0;
    for(i=0; i < n; i++)
        r += v[i]*v[i];
    return sqrt(r);
    }

// Assembly:
xorpd %xmm0, %xmm0
xorl %eax, %eax
cmpq %rax, %rsi
je 0x13eaf
movsd (%rdi,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x13e98
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x8d80
sqrtsd %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_norm2
double vec_norm2(vec_t v, size_t n)
    {
    size_t i;
    double r = 0;
    for(i=0; i < n; i++)
        r += v[i]*v[i];
    return r;
    }

// Assembly:
xorpd %xmm0, %xmm0
xorl %eax, %eax
cmpq %rax, %rsi
je 0x13edf
movsd (%rdi,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x13ec8
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_normalize
void vec_normalize(vec_t v, size_t n) 
/* in place */
    {
    size_t i;
    double norm = vec_norm(v, n);
    for(i=0; i < n; i++)    
        v[i] = v[i]/norm;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x82b0
xorl %eax, %eax
cmpq %rax, %rbx
je 0x13f0b
movsd (%r14,%rax,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%r14,%rax,8)
incq %rax
jmp 0x13ef1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_div
void vec_div(vec_t dst, vec_t v, double s, size_t n)
    {
    size_t i; 
    vec_clear(dst);
    for(i=0; i < n; i++)    
        dst[i] = v[i] / s;
    }

// Assembly:
xorpd %xmm1, %xmm1
movupd %xmm1, 0x10(%rdi)
movupd %xmm1, (%rdi)
xorl %eax, %eax
cmpq %rax, %rdx
je 0x13f3a
movsd (%rsi,%rax,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rdi,%rax,8)
incq %rax
jmp 0x13f22
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_dot
double vec_dot(vec_t v1, vec_t v2, size_t n)
/* dot product */
    {
    size_t i;
    double s = 0;
    for(i=0; i < n; i++)    
        s += (v1[i]*v2[i]);
    return s;
    }

// Assembly:
xorpd %xmm0, %xmm0
xorl %eax, %eax
cmpq %rax, %rdx
je 0x13f59
movsd (%rdi,%rax,8), %xmm1
mulsd (%rsi,%rax,8), %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x13f41
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_vxv
void vec_vxv(mat_t dst, vec_t v1, vec_t v2, size_t n)
/* v1 is a nx1 column vector
 * v2 is a 1xn row vector
 * m is a nxn square matrix (n x 1) * (1 x n) = (n x n)
 */
    {
    size_t i, j;
    for(i=0; i < n; i++)
        for(j=0; j < n; j++)
            dst[i][j] = v1[i] * v2[j];
    }

// Assembly:
xorl %eax, %eax
cmpq %rcx, %rax
je 0x13fa3
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x13f9a
movsd (%rsi,%rax,8), %xmm0
mulsd (%rdx,%r8,8), %xmm0
movsd %xmm0, (%rdi,%r8,8)
incq %r8
jmp 0x13f7f
incq %rax
addq $0x20, %rdi
jmp 0x13f77
retq