LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movl $0x1, %esi
callq 0x8260
movq 0x50(%rsp), %rdi
movl $0x2, %esi
callq 0x8740
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1aa8d
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x8530
movsd 0x863e(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x10(%rsp)
jmp 0x1ab3b
cmpq $0x0, 0x8(%rsp)
jle 0x1aabf
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x1ab02
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x8e30
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x48(%rsp)
xorl %eax, %eax
subq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jge 0x1ab39
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x1ac80
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x1ab0a
jmp 0x1ab3b
movq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x8300
addq $0x58, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglmath/src/quat.c
// Function: ToString_
static int ToString_(lua_State *L, quat_t q)
/* 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" >", q[0], q[1], q[2], q[3]);
    lua_pushlstring(L, str, p);
    return 1;
#undef space
#undef SZ
    }

// Assembly:
subq $0x228, %rsp            # imm = 0x228
movq %rdi, 0x220(%rsp)
movq %rsi, 0x218(%rsp)
movl $0x0, 0xc(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x200, %eax            # imm = 0x200
subl 0xc(%rsp), %eax
movslq %eax, %rsi
movq 0x218(%rsp), %rax
movsd (%rax), %xmm0
movq 0x218(%rsp), %rax
movsd 0x8(%rax), %xmm1
movq 0x218(%rsp), %rax
movsd 0x10(%rax), %xmm2
movq 0x218(%rsp), %rax
movsd 0x18(%rax), %xmm3
leaq 0x8b69(%rip), %rdx      # 0x23723
movb $0x4, %al
callq 0x8420
movl %eax, 0xc(%rsp)
movq 0x220(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
callq 0x8a00
movl $0x1, %eax
addq $0x228, %rsp            # imm = 0x228
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movl %edx, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x8350
movsd %xmm0, (%rsp)
movq 0x40(%rsp), %rdi
movl 0x38(%rsp), %esi
leaq 0x10(%rsp), %rdx
callq 0x8260
movq $0x0, 0x8(%rsp)
cmpq $0x4, 0x8(%rsp)
jae 0x1ac5e
movsd (%rsp), %xmm0
movq 0x8(%rsp), %rax
mulsd 0x10(%rsp,%rax,8), %xmm0
movsd %xmm0, 0x10(%rsp,%rax,8)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x1ac30
movq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x8300
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglmath/src/quat.c
// Function: quat_mulby
static void quat_mulby(quat_t dst, quat_t p) /* in place, dst = dst * q */
    {
    quat_t q;
    quat_copy(q, dst);  
    dst[0] = q[0]*p[0] - q[1]*p[1] - q[2]*p[2] - q[3]*p[3];
    dst[1] = q[0]*p[1] + q[1]*p[0] + q[2]*p[3] - q[3]*p[2];
    dst[2] = q[0]*p[2] + q[2]*p[0] + q[3]*p[1] - q[1]*p[3];
    dst[3] = q[0]*p[3] + q[3]*p[0] + q[1]*p[2] - q[2]*p[1];
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq (%rax), %rcx
movq %rcx, -0x38(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, -0x30(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, -0x28(%rsp)
movq 0x18(%rax), %rax
movq %rax, -0x20(%rsp)
movsd -0x38(%rsp), %xmm0
movq -0x10(%rsp), %rax
movsd (%rax), %xmm2
movsd -0x30(%rsp), %xmm1
movq -0x10(%rsp), %rax
mulsd 0x8(%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x28(%rsp), %xmm1
movq -0x10(%rsp), %rax
movsd 0x10(%rax), %xmm2
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x20(%rsp), %xmm0
movq -0x10(%rsp), %rax
movsd 0x18(%rax), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x8(%rsp), %rax
movsd %xmm0, (%rax)
movsd -0x38(%rsp), %xmm0
movq -0x10(%rsp), %rax
movsd 0x8(%rax), %xmm2
movsd -0x30(%rsp), %xmm1
movq -0x10(%rsp), %rax
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x28(%rsp), %xmm1
movq -0x10(%rsp), %rax
movsd 0x18(%rax), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x20(%rsp), %xmm0
movq -0x10(%rsp), %rax
movsd 0x10(%rax), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x8(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movsd -0x38(%rsp), %xmm0
movq -0x10(%rsp), %rax
movsd 0x10(%rax), %xmm2
movsd -0x28(%rsp), %xmm1
movq -0x10(%rsp), %rax
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x20(%rsp), %xmm1
movq -0x10(%rsp), %rax
movsd 0x8(%rax), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x30(%rsp), %xmm0
movq -0x10(%rsp), %rax
movsd 0x18(%rax), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x8(%rsp), %rax
movsd %xmm0, 0x10(%rax)
movsd -0x38(%rsp), %xmm0
movq -0x10(%rsp), %rax
movsd 0x18(%rax), %xmm2
movsd -0x20(%rsp), %xmm1
movq -0x10(%rsp), %rax
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x30(%rsp), %xmm1
movq -0x10(%rsp), %rax
movsd 0x10(%rax), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x28(%rsp), %xmm0
movq -0x10(%rsp), %rax
movsd 0x8(%rax), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x8(%rsp), %rax
movsd %xmm0, 0x18(%rax)
retq
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglmath/src/quat.c
// Function: IsQuat
static int IsQuat(lua_State *L)
    {
    if(!testquat(L, 1, NULL))
        lua_pushboolean(L, 0);
    else
        lua_pushboolean(L, 1);
    return 1;
    }

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x8170
cmpl $0x0, %eax
jne 0x1b4c9
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x8890
jmp 0x1b4d7
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x8890
movl $0x1, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
leaq 0x8242(%rip), %rdx      # 0x23744
callq 0x8180
cmpl $0x0, %eax
jne 0x1b519
movl $0x0, 0x24(%rsp)
jmp 0x1b59b
cmpq $0x0, 0x8(%rsp)
je 0x1b593
movq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x8530
movq $0x0, (%rsp)
cmpq $0x4, (%rsp)
jae 0x1b591
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movq (%rsp), %rdx
addq $0x1, %rdx
callq 0x8e10
movq 0x18(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8350
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x18(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x1b53a
jmp 0x1b593
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x8320
movq 0x10(%rsp), %rdi
leaq 0x80ec(%rip), %rsi      # 0x23744
callq 0x89f0
movq $0x0, (%rsp)
cmpq $0x4, (%rsp)
jae 0x1b6a9
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x8840
movq 0x10(%rsp), %rdi
movq (%rsp), %rdx
addq $0x1, %rdx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x86a0
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x1b665
movl $0x1, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0x8930
cmpl $0x0, %eax
je 0x1b77e
movq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0x1b800
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x8650
jmp 0x1b7da
movq 0x28(%rsp), %rdi
movq %rsp, %rdx
movl $0x2, %esi
callq 0x8930
cmpl $0x0, %eax
je 0x1b7b3
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x8650
movq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0x1b800
jmp 0x1b7d8
movq 0x28(%rsp), %rdi
leaq 0x78b5(%rip), %rsi      # 0x23074
leaq 0x7f8e(%rip), %rdx      # 0x23754
movl $0x93, %ecx
movb $0x0, %al
callq 0x8b30
movl %eax, 0x34(%rsp)
jmp 0x1b7f1
jmp 0x1b7da
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x8ca0
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x228, %rsp            # imm = 0x228
movq %rdi, 0x218(%rsp)
movq %rsi, 0x210(%rsp)
movl $0x0, 0xc(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x200, %eax            # imm = 0x200
subl 0xc(%rsp), %eax
movslq %eax, %rsi
movq 0x210(%rsp), %rax
movsd (%rax), %xmm0
movq 0x210(%rsp), %rax
movsd 0x8(%rax), %xmm1
movq 0x210(%rsp), %rax
movsd 0x10(%rax), %xmm2
movq 0x210(%rsp), %rax
movsd 0x18(%rax), %xmm3
leaq 0x77dc(%rip), %rdx      # 0x23046
movb $0x4, %al
callq 0x8420
movl %eax, 0xc(%rsp)
movl $0x200, %eax            # imm = 0x200
subl 0xc(%rsp), %eax
cmpl $0x0, %eax
jge 0x1b8de
movl $0x1fb, 0xc(%rsp)       # imm = 0x1FB
leaq 0x10(%rsp), %rdi
movslq 0xc(%rsp), %rax
addq %rax, %rdi
movl $0x200, %eax            # imm = 0x200
subl 0xc(%rsp), %eax
movslq %eax, %rsi
leaq 0x77e9(%rip), %rdx      # 0x23094
movb $0x0, %al
callq 0x8420
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x218(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
callq 0x8a00
movl $0x1, 0x224(%rsp)
jmp 0x1b900
movq 0x218(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
callq 0x8a00
movl $0x1, 0x224(%rsp)
movl 0x224(%rsp), %eax
addq $0x228, %rsp            # imm = 0x228
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq $0x1, (%rsp)
movq 0x38(%rsp), %rdi
movq (%rsp), %rax
movl %eax, %esi
leaq 0x10(%rsp), %rdx
callq 0x8930
cmpl $0x0, %eax
je 0x1b950
movq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x8ae0
movl %eax, 0x44(%rsp)
jmp 0x1b9ad
movq $0x0, 0x8(%rsp)
cmpq $0x4, 0x8(%rsp)
jae 0x1b99a
movq 0x38(%rsp), %rdi
movq (%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, (%rsp)
movl %eax, %esi
xorps %xmm0, %xmm0
callq 0x8370
movq 0x8(%rsp), %rax
movsd %xmm0, 0x10(%rsp,%rax,8)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x1b959
movq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x8ae0
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm2, 0x8(%rsp)
movq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x8530
movsd 0x18(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x18(%rax)
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x38(%rax)
movsd 0x8(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x58(%rax)
movq 0x20(%rsp), %rax
movsd 0x7527(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x78(%rax)
movq 0x20(%rsp), %rax
movsd 0x7515(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x50(%rax)
movq 0x20(%rsp), %rax
movsd 0x7503(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x28(%rax)
movq 0x20(%rsp), %rax
movsd 0x74f1(%rip), %xmm0     # 0x230c0
movsd %xmm0, (%rax)
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm2, 0x8(%rsp)
movq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x8530
movsd 0x18(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x28(%rax)
movsd 0x8(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x50(%rax)
movq 0x20(%rsp), %rax
movsd 0x7478(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x78(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x8610
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x8c60
movsd %xmm0, 0x8(%rsp)
movq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x8530
movq 0x20(%rsp), %rax
movsd 0x7411(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x78(%rax)
movq 0x20(%rsp), %rax
movsd 0x73ff(%rip), %xmm0     # 0x230c0
movsd %xmm0, (%rax)
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x50(%rax)
movq 0x20(%rsp), %rax
movsd %xmm0, 0x28(%rax)
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x30(%rax)
movsd 0x8(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x48(%rax)
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x8610
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x8c60
movsd %xmm0, 0x8(%rsp)
movq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x8530
movq 0x20(%rsp), %rax
movsd 0x7351(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x78(%rax)
movq 0x20(%rsp), %rax
movsd 0x733f(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x28(%rax)
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x50(%rax)
movq 0x20(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x40(%rax)
movsd 0x8(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x10(%rax)
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x8610
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x8c60
movsd %xmm0, 0x8(%rsp)
movq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x8530
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x28(%rax)
movq 0x20(%rsp), %rax
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rax
movsd 0x7278(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x78(%rax)
movq 0x20(%rsp), %rax
movsd 0x7266(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x50(%rax)
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movsd 0x8(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x20(%rax)
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rdx
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x8b00
cmpl $0x0, %eax
jne 0x1bf47
movq 0xa0(%rsp), %rdi
movl $0x1, %esi
callq 0x8350
movsd %xmm0, 0x80(%rsp)
movq 0xa0(%rsp), %rdi
movl $0x2, %esi
callq 0x8350
movsd %xmm0, 0x88(%rsp)
movq 0xa0(%rsp), %rdi
movl $0x3, %esi
callq 0x8350
movsd %xmm0, 0x90(%rsp)
movq %rsp, %rdi
movsd 0x80(%rsp), %xmm0
movsd 0x88(%rsp), %xmm1
movsd 0x90(%rsp), %xmm2
callq 0x8570
movq 0xa0(%rsp), %rdi
movq %rsp, %rsi
movl $0x4, %r9d
movq %r9, %rdx
movq %r9, %rcx
movq %r9, %r8
callq 0x8500
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rdx
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x8b00
cmpl $0x0, %eax
jne 0x1c078
movq 0xa0(%rsp), %rdi
movl $0x1, %esi
callq 0x8350
movsd %xmm0, 0x80(%rsp)
movq 0xa0(%rsp), %rdi
movl $0x2, %esi
callq 0x8d20
cmpl $0x0, %eax
jg 0x1c040
movq 0xa0(%rsp), %rdi
movl $0x3, %esi
callq 0x8d20
cmpl $0x0, %eax
jg 0x1c040
movsd 0x80(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movsd %xmm0, 0x88(%rsp)
jmp 0x1c076
movq 0xa0(%rsp), %rdi
movl $0x2, %esi
callq 0x8350
movsd %xmm0, 0x88(%rsp)
movq 0xa0(%rsp), %rdi
movl $0x3, %esi
callq 0x8350
movsd %xmm0, 0x90(%rsp)
jmp 0x1c078
movq %rsp, %rdi
movsd 0x80(%rsp), %xmm0
movsd 0x88(%rsp), %xmm1
movsd 0x90(%rsp), %xmm2
callq 0x8880
movq 0xa0(%rsp), %rdi
movq %rsp, %rsi
movl $0x4, %r9d
movq %r9, %rdx
movq %r9, %rcx
movq %r9, %r8
callq 0x8500
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
movl $0x1, %esi
callq 0x8350
movsd %xmm0, 0x8(%rsp)
movq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x8b00
cmpl $0x0, %eax
jne 0x1c16f
movq 0xb0(%rsp), %rdi
movl $0x2, %esi
callq 0x8350
movsd %xmm0, 0x90(%rsp)
movq 0xb0(%rsp), %rdi
movl $0x3, %esi
callq 0x8350
movsd %xmm0, 0x98(%rsp)
movq 0xb0(%rsp), %rdi
movl $0x4, %esi
callq 0x8350
movsd %xmm0, 0xa0(%rsp)
leaq 0x10(%rsp), %rdi
movsd 0x90(%rsp), %xmm0
movsd 0x98(%rsp), %xmm1
movsd 0xa0(%rsp), %xmm2
movsd 0x8(%rsp), %xmm3
callq 0x1c2f0
movq 0xb0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x4, %r9d
movq %r9, %rdx
movq %r9, %rcx
movq %r9, %r8
callq 0x8500
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglmath/src/transform.c
// Function: rotate
static void rotate(mat_t m, double x, double y, double z, double rad)
/* c+(1-c)x^2  (1-c)xy-sz (1-c)xz+sy  0
 * (1-c)xy+sz  c+(1-c)y^2 (1-c)yz-sx  0
 * (1-c)xz-sy  (1-c)yz+sx c+(1-c)z^2  0
 *     0           0          0       1
 *
 * c=cos(rad) s=sin(rad)
 */
    {
    double s, c, c1, a, b;
    c = cos(rad);
    s = sin(rad);
    c1 = 1.0 - c;
    mat_clear(m); 
    m[0][0] = c + c1 * x*x;
    m[1][1] = c + c1 * y*y;
    m[2][2] = c + c1 * z*z;
    m[3][3] = 1;
    a = c1*x*y; b = s*z;
    m[0][1] = a - b;
    m[1][0] = a + b;
    a = c1*x*z; b = s*y;
    m[0][2] = a + b;
    m[2][0] = a - b;
    a = c1*y*z; b = s*x;
    m[1][2] = a - b;
    m[2][1] = a + b;
    }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movsd %xmm0, 0x48(%rsp)
movsd %xmm1, 0x40(%rsp)
movsd %xmm2, 0x38(%rsp)
movsd %xmm3, 0x30(%rsp)
movsd 0x30(%rsp), %xmm0
callq 0x8610
movsd %xmm0, 0x20(%rsp)
movsd 0x30(%rsp), %xmm0
callq 0x8c60
movsd %xmm0, 0x28(%rsp)
movsd 0x6d85(%rip), %xmm0     # 0x230c0
subsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x50(%rsp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x8530
movsd 0x20(%rsp), %xmm1
movsd 0x18(%rsp), %xmm0
mulsd 0x48(%rsp), %xmm0
movsd 0x48(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x50(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x20(%rsp), %xmm1
movsd 0x18(%rsp), %xmm0
mulsd 0x40(%rsp), %xmm0
movsd 0x40(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x50(%rsp), %rax
movsd %xmm0, 0x28(%rax)
movsd 0x20(%rsp), %xmm1
movsd 0x18(%rsp), %xmm0
mulsd 0x38(%rsp), %xmm0
movsd 0x38(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x50(%rsp), %rax
movsd %xmm0, 0x50(%rax)
movq 0x50(%rsp), %rax
movsd 0x6cde(%rip), %xmm0     # 0x230c0
movsd %xmm0, 0x78(%rax)
movsd 0x18(%rsp), %xmm0
mulsd 0x48(%rsp), %xmm0
mulsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x28(%rsp), %xmm0
mulsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
movq 0x50(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movq 0x50(%rsp), %rax
movsd %xmm0, 0x20(%rax)
movsd 0x18(%rsp), %xmm0
mulsd 0x48(%rsp), %xmm0
mulsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x28(%rsp), %xmm0
mulsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movq 0x50(%rsp), %rax
movsd %xmm0, 0x10(%rax)
movsd 0x10(%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
movq 0x50(%rsp), %rax
movsd %xmm0, 0x40(%rax)
movsd 0x18(%rsp), %xmm0
mulsd 0x40(%rsp), %xmm0
mulsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x28(%rsp), %xmm0
mulsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
movq 0x50(%rsp), %rax
movsd %xmm0, 0x30(%rax)
movsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movq 0x50(%rsp), %rax
movsd %xmm0, 0x48(%rax)
addq $0x58, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1c6b0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1c783
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x7096(%rip), %rsi      # 0x2380c
movb $0x0, %al
callq 0x8b30
movl %eax, 0x24(%rsp)
jmp 0x1c7b9
movq 0x8(%rsp), %rax
cmpl $-0x2, 0x28(%rax)
je 0x1c7b1
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movl 0x28(%rax), %edx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x8dc0
movq 0x8(%rsp), %rax
movl $0xfffffffe, 0x28(%rax) # imm = 0xFFFFFFFE
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1c6b0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1c813
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x7006(%rip), %rsi      # 0x2380c
movb $0x0, %al
callq 0x8b30
movl %eax, 0x24(%rsp)
jmp 0x1c856
movq 0x8(%rsp), %rax
cmpl $-0x2, 0x28(%rax)
je 0x1c835
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movl 0x28(%rax), %edx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x8dc0
movq 0x8(%rsp), %rdi
callq 0x1c860
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x8630
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1c6b0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1c8c3
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x6f56(%rip), %rsi      # 0x2380c
movb $0x0, %al
callq 0x8b30
movl %eax, 0x24(%rsp)
jmp 0x1c931
movq 0x8(%rsp), %rax
cmpl $-0x2, 0x28(%rax)
jne 0x1c8e7
movq 0x18(%rsp), %rdi
leaq 0x6f4f(%rip), %rsi      # 0x23829
movb $0x0, %al
callq 0x8b30
movl %eax, 0x24(%rsp)
jmp 0x1c931
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movslq 0x28(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x83b0
cmpl $0x7, %eax
je 0x1c929
movq 0x18(%rsp), %rdi
leaq 0x6764(%rip), %rsi      # 0x23074
leaq 0x6f26(%rip), %rdx      # 0x2383d
movl $0xa4, %ecx
movb $0x0, %al
callq 0x8b30
movl %eax, 0x24(%rsp)
jmp 0x1c931
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglmath/src/utils.c
// Function: moonglmath_errstring
const char* errstring(int err)
    {
    switch(err)
        {
        case 0: return "success";
        case ERR_GENERIC: return "generic error";
        case ERR_TABLE: return "not a table";
        case ERR_EMPTY: return "empty list";
        case ERR_TYPE: return "invalid type";
        case ERR_VALUE: return "invalid value";
        case ERR_NOTPRESENT: return "missing";
        case ERR_MEMORY: return "out of memory";
        case ERR_MALLOC_ZERO: return "zero bytes malloc";
        case ERR_LENGTH: return "invalid length";
        case ERR_POOL: return "elements are not from the same pool";
        case ERR_BOUNDARIES: return "invalid boundaries";
        case ERR_UNKNOWN: return "unknown field name";
        default:
            return "???";
        }
    return NULL; /* unreachable */
    }

// Assembly:
movl %edi, -0xc(%rsp)
movl -0xc(%rsp), %eax
addl $0xb, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rsp)
subl $0xc, %eax
ja 0x1e2b2
movq -0x18(%rsp), %rax
leaq 0x56a1(%rip), %rcx      # 0x23888
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x5792(%rip), %rax      # 0x23989
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x5789(%rip), %rax      # 0x23991
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x5786(%rip), %rax      # 0x2399f
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x5781(%rip), %rax      # 0x239ab
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x577b(%rip), %rax      # 0x239b6
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x577a(%rip), %rax      # 0x239c3
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x577a(%rip), %rax      # 0x239d1
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x5774(%rip), %rax      # 0x239d9
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x5774(%rip), %rax      # 0x239e7
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x517a(%rip), %rax      # 0x233fb
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x576a(%rip), %rax      # 0x239f9
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x5780(%rip), %rax      # 0x23a1d
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x5785(%rip), %rax      # 0x23a30
movq %rax, -0x8(%rsp)
jmp 0x1e2be
leaq 0x578a(%rip), %rax      # 0x23a43
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglmath/src/utils.c
// Function: moonglmath_sleeep
void sleeep(double seconds)
    {
#if _POSIX_C_SOURCE >= 199309L
    struct timespec ts, ts1;
    struct timespec *req, *rem, *tmp;
    sectots(&ts, seconds);
    req = &ts;
    rem = &ts1;
    while(1)
        {
        if(nanosleep(req, rem) == 0)
            return;
        tmp = req;
        req = rem;
        rem = tmp;
        }
#else
    usleep((useconds_t)(seconds*1.0e6));
#endif
    }

// Assembly:
subq $0x48, %rsp
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
leaq 0x30(%rsp), %rdi
callq 0x1e530
leaq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x8450
cmpl $0x0, %eax
jne 0x1e507
addq $0x48, %rsp
retq
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x1e4ee
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x8d70
movq 0x10(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8650
movq 0x10(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x52c0(%rip), %rdx      # 0x2387d
callq 0x84e0
movq 0x10(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq %rdx, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x8df0
cmpl $0x0, %eax
jne 0x1e657
movl $0x0, 0x24(%rsp)
jmp 0x1e69c
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x8e80
movq 0x18(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
callq 0x8dd0
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x80c0
movl 0x4(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x8e80
cmpq $0x0, 0x10(%rsp)
je 0x1e775
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x81a0
cmpq $0x0, 0x8(%rsp)
je 0x1e7b3
movq 0x20(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x50ef(%rip), %rdx      # 0x2387d
callq 0x85d0
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x81a0
movq 0x20(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movq 0x20(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
xorl %eax, %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x8ef0
cmpl $0x0, %eax
jne 0x1ea7f
movl $0x0, 0x34(%rsp)
jmp 0x1eaed
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x82c0
movq %rax, 0x8(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x1eae5
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x8(%rsp), %rsi
callq 0x8700
cmpl $0x0, %eax
jne 0x1ead6
movl $0x1, 0x34(%rsp)
jmp 0x1eaed
jmp 0x1ead8
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1ea9e
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
leaq 0x46de(%rip), %rdx      # 0x2338a
callq 0x8180
cmpl $0x0, %eax
jne 0x1ecc3
movl $0x0, 0x44(%rsp)
jmp 0x1ee16
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
leaq 0x4ceb(%rip), %rdx      # 0x239be
callq 0x8e80
movq 0x38(%rsp), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x8050
movl %eax, 0x4(%rsp)
movq 0x38(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
leaq 0x4d52(%rip), %rdx      # 0x23a5e
callq 0x8e80
movq 0x38(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8740
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
cmpq $0x1, 0x8(%rsp)
jb 0x1ed44
cmpq $0x4, 0x8(%rsp)
jbe 0x1ed60
movq 0x38(%rsp), %rdi
leaq 0x4cff(%rip), %rsi      # 0x23a4f
movb $0x0, %al
callq 0x8b30
movl %eax, 0x44(%rsp)
jmp 0x1ee16
jmp 0x1ed62
cmpq $0x0, 0x18(%rsp)
je 0x1ed75
movl 0x4(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
cmpq $0x0, 0x20(%rsp)
je 0x1ed8a
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x28(%rsp)
je 0x1ee0e
movq 0x28(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x8530
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jae 0x1ee0c
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
movq 0x10(%rsp), %rdx
addq $0x1, %rdx
callq 0x8e10
movq 0x38(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8350
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x38(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1edac
jmp 0x1ee0e
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movl %r8d, 0x1c(%rsp)
cmpq $0x1, 0x20(%rsp)
jb 0x1eeed
cmpq $0x4, 0x20(%rsp)
jbe 0x1ef09
movq 0x38(%rsp), %rdi
leaq 0x4b56(%rip), %rsi      # 0x23a4f
movb $0x0, %al
callq 0x8b30
movl %eax, 0x44(%rsp)
jmp 0x1efff
jmp 0x1ef0b
movq 0x38(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x8320
movq 0x38(%rsp), %rdi
leaq 0x4465(%rip), %rsi      # 0x2338a
callq 0x89f0
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x1efac
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0x1ef6b
movq 0x30(%rsp), %rax
movq 0x10(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rsp)
jmp 0x1ef75
xorps %xmm0, %xmm0
movsd %xmm0, (%rsp)
jmp 0x1ef75
movq 0x8(%rsp), %rdi
movsd (%rsp), %xmm0
callq 0x8840
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rdx
addq $0x1, %rdx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x86a0
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1ef33
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x8540
movq 0x38(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x4a92(%rip), %rdx      # 0x23a5e
callq 0x84e0
movq 0x38(%rsp), %rdi
movl 0x1c(%rsp), %edx
xorl %esi, %esi
callq 0x85c0
movq 0x38(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x49cc(%rip), %rdx      # 0x239be
callq 0x84e0
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x8530
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jae 0x1f08e
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq 0x20(%rsp), %rax
movq 0x8(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x1f03d
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x8530
movq $0x0, (%rsp)
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
jae 0x1f114
movq 0x18(%rsp), %rax
movq (%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x10(%rsp), %rax
movq (%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movq 0x20(%rsp), %rax
movq (%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x1f0d1
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x1f20e
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1f1c0
movsd 0x8(%rsp), %xmm0
callq 0x8db0
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rsp)
movq $0x0, -0x18(%rsp)
movq -0x18(%rsp), %rax
cmpq -0x10(%rsp), %rax
jae 0x1f28a
movq -0x8(%rsp), %rax
movq -0x18(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x8(%rsp), %rax
movq -0x18(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x20(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rsp)
movq -0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rsp)
jmp 0x1f23c
movsd -0x20(%rsp), %xmm0
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x82b0
movsd %xmm0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x1f30c
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd 0x8(%rsp), %xmm0
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1f2cc
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x8530
movq $0x0, (%rsp)
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
jae 0x1f38d
movq 0x18(%rsp), %rax
movq (%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movq (%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x1f352
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)