LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/mat.c
// Function: Add
static int Add(lua_State *L)
    {
    size_t i, j, nr, nc, nr1, nc1;
    mat_t m, m1;
    checkmat(L, 1, m, &nr, &nc);
    checkmat(L, 2, m1, &nr1, &nc1);
    if((nr!=nr1) || (nc!=nc1))
        return luaL_error(L, OPERANDS_ERROR);
    for(i = 0; i < nr; i++)
        for(j = 0; j < nc; j++)
            m[i][j] += m1[i][j];
    return pushmat(L, m, nr, nc, nr, nc);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
leaq 0x18(%rsp), %r12
leaq 0x8(%rsp), %r8
movl $0x1, %esi
movq %r14, %rdx
movq %r12, %rcx
callq 0x8520
leaq 0xa0(%rsp), %r15
leaq 0x10(%rsp), %r13
movq %rsp, %r8
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
movq %r13, %rcx
callq 0x8520
movq (%r12), %rdx
cmpq (%r13), %rdx
jne 0x100d2
movq 0x8(%rsp), %rcx
cmpq (%rsp), %rcx
jne 0x100d2
testq %rdx, %rdx
je 0x100bd
xorl %eax, %eax
testq %rcx, %rcx
je 0x100ad
xorl %esi, %esi
movsd (%r15,%rsi,8), %xmm0
addsd (%r14,%rsi,8), %xmm0
movsd %xmm0, (%r14,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x10093
incq %rax
addq $0x20, %r15
addq $0x20, %r14
cmpq %rdx, %rax
jne 0x1008c
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %rdx, %r8
movq %rcx, %r9
callq 0x84d0
jmp 0x100ef
leaq 0x7564(%rip), %rsi      # 0x1763d
leaq 0x7577(%rip), %rdx      # 0x17657
movq %rbx, %rdi
movl $0x23c, %ecx            # imm = 0x23C
xorl %eax, %eax
callq 0x8a80
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/mat.c
// Function: Div
static int Div(lua_State *L)
    {
    size_t i, j, nr, nc;
    mat_t m;
    double s;
    checkmat(L, 1, m, &nr, &nc);
    s = luaL_checknumber(L, 2);
    for(i = 0; i < nr; i++)
        for(j = 0; j < nc; j++)
            m[i][j] /= s;
    return pushmat(L, m, nr, nc, nr, nc);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %rsp, %r12
movl $0x1, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x8520
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movq (%r15), %rdx
movq (%r12), %rcx
testq %rdx, %rdx
je 0x104b7
xorl %eax, %eax
testq %rcx, %rcx
je 0x104ab
xorl %esi, %esi
movsd (%r14,%rsi,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%r14,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x10493
incq %rax
addq $0x20, %r14
cmpq %rdx, %rax
jne 0x1048c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %rdx, %r8
movq %rcx, %r9
callq 0x84d0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/mat.c
// Function: Pow
static int Pow(lua_State *L)
    {
    size_t nr, nc;
    mat_t m, dst;
    lua_Integer n, i;
    checkmat(L, 1, m, &nr, &nc);
    if((nc != nr))
        return luaL_error(L, OPERANDS_ERROR);
    n = luaL_checkinteger(L, 2);
    if(n==0) /* m^0 = identity */
        {
        mat_clear(dst);
        dst[0][0] = dst[1][1] = dst[2][2] = dst[3][3]= 1;
        }
    else 
        {
        if(n > 0)
            mat_copy(dst, m);
        else /* n < 0 */
            { 
            if(!mat_inv(dst, m, nr))
                return luaL_argerror(L, 1, "singular matrix");
            mat_copy(m, dst); 
            n = -n; 
            }
        for(i = 0; i < (n-1); i++)
            mat_mulby(dst, m, nr, nr, nr);
        }
    return pushmat(L, dst, nr, nc, nr, nc);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rdi, %rbx
leaq 0x90(%rsp), %rdx
movq %rsp, %r14
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r14, %rcx
movq %r15, %r8
callq 0x8520
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x1054d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x86e0
testq %rax, %rax
je 0x1056f
movq %rax, %r15
jle 0x105c4
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movl $0x10, %ecx
rep  movsq (%rsi), %es:(%rdi)
movq (%rsp), %r14
jmp 0x105f9
leaq 0x70e9(%rip), %rsi      # 0x1763d
leaq 0x70fc(%rip), %rdx      # 0x17657
movq %rbx, %rdi
movl $0x2ad, %ecx            # imm = 0x2AD
xorl %eax, %eax
callq 0x8a80
jmp 0x10643
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x20(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x88(%rsp)
movq %rax, 0x60(%rsp)
movq %rax, 0x38(%rsp)
movq %rax, 0x10(%rsp)
movq (%rsp), %r14
jmp 0x10628
movq (%rsp), %r14
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movq %r14, %rdx
callq 0x82b0
testl %eax, %eax
je 0x10654
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x10, %ecx
rep  movsq (%rsi), %es:(%rdi)
negq %r15
cmpq $0x2, %r15
jb 0x10628
decq %r15
leaq 0x10(%rsp), %r12
leaq 0x90(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r14, %rcx
movq %r14, %r8
callq 0x8a30
decq %r15
jne 0x1060f
movq 0x8(%rsp), %rcx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
movq %r14, %r8
movq %rcx, %r9
callq 0x84d0
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6fab(%rip), %rdx      # 0x17606
movq %rbx, %rdi
movl $0x1, %esi
callq 0x81b0
jmp 0x10643
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/mat.c
// Function: ToString_
static int ToString_(lua_State *L, mat_t m, size_t nr, size_t nc)
/* 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;
    size_t i;
    p += snprintf(str, space, "{");
    for(i=0; i < nr; i++)
        {
        switch(nc)
            {
            case 2: p+=snprintf(str+p, space, "{ "FMT", "FMT" }, ", 
                            m[i][0], m[i][1]); break;
            case 3: p+=snprintf(str+p, space, "{ "FMT", "FMT", "FMT" }, ",
                            m[i][0], m[i][1], m[i][2]); break;
            case 4: p+=snprintf(str+p, space, "{ "FMT", "FMT", "FMT", "FMT" }, ", 
                            m[i][0], m[i][1], m[i][2], m[i][3]); break;
            default:
                return luaL_error(L, UNEXPECTED_ERROR);
            }
        if(space<0)
            { 
            /* truncate */
            p = SZ - 5; 
            p+=snprintf(str+p, space, " ...");
            lua_pushlstring(L, str, p);
            return 1;
            }
        }
    p-=2; /* strip the last separator */
    p+=snprintf(str+p, space, "}");
    lua_pushlstring(L, str, p);
    return 1;
#undef space
#undef SZ
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
movw $0x7b, (%rsp)
testq %rdx, %rdx
je 0x10732
movq %rcx, %r14
leaq -0x2(%rcx), %rax
cmpq $0x2, %rax
ja 0x1076c
movq %rdx, %r15
movq %rsi, %r12
addq $0x18, %r12
movl $0x1, %ebp
leaq 0x6fc7(%rip), %r13      # 0x1767b
movslq %ebp, %rax
leaq (%rsp,%rax), %rdi
movl $0x200, %ecx            # imm = 0x200
subl %eax, %ecx
movslq %ecx, %rsi
movsd -0x18(%r12), %xmm0
movsd -0x10(%r12), %xmm1
cmpq $0x3, %r14
je 0x106ef
cmpq $0x2, %r14
jne 0x10706
leaq 0x6f77(%rip), %rdx      # 0x1765d
movb $0x2, %al
callq 0x83f0
jmp 0x1071d
movsd -0x8(%r12), %xmm2
leaq 0x6f6d(%rip), %rdx      # 0x1766a
movb $0x3, %al
callq 0x83f0
jmp 0x1071d
movsd -0x8(%r12), %xmm2
movsd (%r12), %xmm3
movq %r13, %rdx
movb $0x4, %al
callq 0x83f0
addl %eax, %ebp
cmpl $0x201, %ebp            # imm = 0x201
jge 0x1079a
addq $0x20, %r12
decq %r15
jne 0x106b4
jmp 0x10737
movl $0x1, %ebp
movslq %ebp, %r15
movq %rsp, %r14
leaq (%r15,%r14), %rdi
addq $-0x2, %rdi
movl $0x202, %esi            # imm = 0x202
subl %r15d, %esi
leaq 0x6f3c(%rip), %rdx      # 0x17690
xorl %eax, %eax
callq 0x83f0
addl %r15d, %eax
addl $-0x2, %eax
movslq %eax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x107b6
leaq 0x6901(%rip), %rsi      # 0x17074
leaq 0x6edd(%rip), %rdx      # 0x17657
movq %rbx, %rdi
movl $0xf0, %ecx
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8a80
movq %rsp, %rsi
movb $0x0, 0x1ff(%rsi)
movl $0x2e2e2e20, 0x1fb(%rsi) # imm = 0x2E2E2E20
movl $0x1ff, %edx            # imm = 0x1FF
movq %rbx, %rdi
callq 0x8960
movl $0x1, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/mat.c
// Function: Mxs
static int Mxs(lua_State *L, int sarg, int marg)
    {
    size_t i, j, nr, nc;
    mat_t m;
    double s = luaL_checknumber(L, sarg);
    checkmat(L, marg, m, &nr, &nc);
    for(i = 0; i < nr; i++)
        for(j = 0; j < nc; j++)
            m[i][j] *= s;
    return pushmat(L, m, nr, nc, nr, nc);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movl %edx, %ebp
movq %rdi, %rbx
callq 0x8320
movsd %xmm0, 0x8(%rsp)
leaq 0x20(%rsp), %r14
leaq 0x18(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x8520
movsd 0x8(%rsp), %xmm1
movq (%r15), %rdx
movq (%r12), %rcx
testq %rdx, %rdx
je 0x10852
xorl %eax, %eax
testq %rcx, %rcx
je 0x10846
xorl %esi, %esi
movsd (%r14,%rsi,8), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, (%r14,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x1082e
incq %rax
addq $0x20, %r14
cmpq %rdx, %rax
jne 0x10827
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %rdx, %r8
movq %rcx, %r9
callq 0x84d0
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/num.c
// Function: moonglmath_num_Step
int num_Step(lua_State *L)
    {
    double x = luaL_checknumber(L, 1);
    double edge = luaL_checknumber(L, 2);
    lua_pushnumber(L, step(x, edge));
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8320
movapd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movapd (%rsp), %xmm1
cmplesd %xmm0, %xmm1
movsd 0x618a(%rip), %xmm0     # 0x170c0
andnpd %xmm0, %xmm1
movapd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x87d0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/num.c
// Function: moonglmath_num_Smoothstep
int num_Smoothstep(lua_State *L)
    {
    double x = luaL_checknumber(L, 1);
    double edge0 = luaL_checknumber(L, 2);
    double edge1 = luaL_checknumber(L, 3);
    lua_pushnumber(L, smoothstep(x, edge0, edge1));
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8320
movapd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
movapd 0x10(%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
subsd %xmm1, %xmm2
subsd %xmm1, %xmm0
divsd %xmm0, %xmm2
movsd 0x60d1(%rip), %xmm0     # 0x170c0
minsd %xmm2, %xmm0
xorpd %xmm1, %xmm1
cmpltsd %xmm1, %xmm2
andnpd %xmm0, %xmm2
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm2, %xmm2
movsd 0x66f4(%rip), %xmm0     # 0x17708
subsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x87d0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/num.c
// Function: moonglmath_num_Fade
int num_Fade(lua_State *L)
    {
    double x = luaL_checknumber(L, 1);
    double edge0 = luaL_checknumber(L, 2);
    double edge1 = luaL_checknumber(L, 3);
    lua_pushnumber(L, fade(x, edge0, edge1));
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8320
movapd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
movapd 0x10(%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
subsd %xmm1, %xmm2
subsd %xmm1, %xmm0
divsd %xmm0, %xmm2
movsd 0x5fe3(%rip), %xmm0     # 0x170c0
minsd %xmm2, %xmm0
xorpd %xmm1, %xmm1
cmpltsd %xmm1, %xmm2
andnpd %xmm0, %xmm2
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
movsd 0x660e(%rip), %xmm0     # 0x17710
mulsd %xmm2, %xmm0
addsd 0x660a(%rip), %xmm0     # 0x17718
mulsd %xmm2, %xmm0
addsd 0x6606(%rip), %xmm0     # 0x17720
mulsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x87d0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/objects.c
// Function: moonglmath_newuserdata
ud_t *newuserdata(lua_State *L, void *handle, const char *mt, const char *tracename)
    {
    ud_t *ud;
    /* we use handle as search key */
    ud = (ud_t*)udata_new(L, sizeof(ud_t), (uint64_t)(uintptr_t)handle, mt);
    memset(ud, 0, sizeof(ud_t));
    ud->handle = handle;
    MarkValid(ud);
    if(trace_objects)
        printf("create %s %p (%p)\n", tracename, (void*)ud, handle);
    return ud;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdx, %rcx
movq %rsi, %rbx
movl $0x28, %esi
movq %rbx, %rdx
callq 0x85e0
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movq %rbx, (%rax)
movl $0x1, 0x18(%rax)
movq 0xde72(%rip), %rax      # 0x1efe0
cmpl $0x0, (%rax)
je 0x1118a
leaq 0x65ae(%rip), %rdi      # 0x17728
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8370
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/objects.c
// Function: moonglmath_checkxxxlist
void** checkxxxlist(lua_State *L, int arg, uint32_t *count, int *err, const char *mt)
/* xxx_t* checkxxxlist(lua_State *L, int arg, uint32_t *count, int *err)
 * Checks if the variable at arg on the Lua stack is a list of xxx_t objects.
 * On success, returns an array of xxx_t handles and sets its length in *count.
 * The array s Malloc'd and must be released by the caller using Free(L, ...).
 * On error, sets *err to ERR_XXX, *count to 0, and returns NULL. 
 */
    {
    void** list;
    uint32_t i;

    *count = 0;
    *err = 0;
    if(lua_isnoneornil(L, arg))
        { *err = ERR_NOTPRESENT; return NULL; }
    if(lua_type(L, arg) != LUA_TTABLE)
        { *err = ERR_TABLE; return NULL; }
    *count = luaL_len(L, arg);
    if(*count == 0)
        { *err = ERR_EMPTY; return NULL; }
    list = (void**)MallocNoErr(L, sizeof(void*) * (*count));

    if(!list)
        { *count = 0; *err = ERR_MEMORY; return NULL; }

    for(i=0; i<*count; i++)
        {
        lua_rawgeti(L, arg, i+1);
        list[i] = (void*)(uintptr_t)testxxx(L, -1, NULL, mt);
        if(!list[i])
            { Free(L, list); *count = 0; *err = ERR_TYPE; return NULL; }
        lua_pop(L, 1);
        }
    return list;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, (%rcx)
callq 0x8c40
testl %eax, %eax
jle 0x113e6
movq %r15, %rdi
movl %ebp, %esi
callq 0x8c40
movl $0xfffffffc, %ecx       # imm = 0xFFFFFFFC
cmpl $0x5, %eax
jne 0x11420
movq %r15, %rdi
movl %ebp, %esi
callq 0x8c60
movl %eax, (%r14)
testl %eax, %eax
je 0x113ed
movl %eax, %esi
shlq $0x3, %rsi
movq %r15, %rdi
callq 0x89f0
testq %rax, %rax
je 0x113f4
movq %rax, %r13
cmpl $0x0, (%r14)
je 0x11425
movq %r12, 0x10(%rsp)
movq %rbx, 0x8(%rsp)
xorl %ebx, %ebx
leaq 0x1(%rbx), %r12
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x8380
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq 0x10(%rsp), %rdx
callq 0x8750
testq %rax, %rax
je 0x113fb
testb $0x1, 0x18(%rax)
je 0x113fb
movq (%rax), %rax
movq %rax, (%r13,%rbx,8)
testq %rax, %rax
je 0x11404
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movl (%r14), %eax
movq %r12, %rbx
cmpq %rax, %r12
jb 0x11391
jmp 0x11425
movl $0x1, %ecx
jmp 0x11420
movl $0xfffffffb, %ecx       # imm = 0xFFFFFFFB
jmp 0x11420
movl $0xfffffffa, %ecx       # imm = 0xFFFFFFFA
jmp 0x11419
movq $0x0, (%r13,%rbx,8)
movq %r15, %rdi
movq %r13, %rsi
callq 0x85f0
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
movq 0x8(%rsp), %rbx
movl $0x0, (%r14)
movl %ecx, (%rbx)
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/quat.c
// Function: moonglmath_testquat
int testquat(lua_State *L, int arg, quat_t q)
/* Tests if the element at arg is a quaternion and sets q accordingly
 * (unless it is passed as 0).
 */
    {
    size_t i;
    if(!testmetatable(L, arg, QUAT_MT)) return 0;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x5f6b(%rip), %rdx      # 0x173ba
callq 0x8170
testl %eax, %eax
je 0x114a2
movl $0x1, %r15d
testq %rbx, %rbx
je 0x114a5
movl $0x1, %r12d
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x8d30
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8320
movsd %xmm0, -0x8(%rbx,%r12,8)
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
incq %r12
cmpq $0x5, %r12
jne 0x11469
jmp 0x114a5
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/quat.c
// Function: moonglmath_quat_normalize
void quat_normalize(quat_t q) 
/* in place */
    {
    size_t i;
    double norm = quat_norm(q);
    for(i=0; i < 4; i++)    
        q[i] = q[i]/norm;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd (%rbx,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq $0x4, %rax
jne 0x1160d
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x11633
sqrtsd %xmm0, %xmm0
jmp 0x11638
callq 0x8cd0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
xorl %eax, %eax
movupd (%rbx,%rax,8), %xmm1
divpd %xmm0, %xmm1
movupd %xmm1, (%rbx,%rax,8)
addq $0x2, %rax
cmpq $0x4, %rax
jne 0x1163e
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/quat.c
// Function: moonglmath_quat_conj
void quat_conj(quat_t dst, quat_t q) 
    {
    dst[0] = q[0];
    dst[1] = -q[1];
    dst[2] = -q[2];
    dst[3] = -q[3];
    }

// Assembly:
movsd (%rsi), %xmm0
movsd %xmm0, (%rdi)
movsd 0x8(%rsi), %xmm0
movaps 0x5a64(%rip), %xmm1     # 0x170d0
xorps %xmm1, %xmm0
movlps %xmm0, 0x8(%rdi)
movsd 0x10(%rsi), %xmm0
xorps %xmm1, %xmm0
movlps %xmm0, 0x10(%rdi)
movsd 0x18(%rsi), %xmm0
xorps %xmm1, %xmm0
movlps %xmm0, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/quat.c
// Function: moonglmath_quat_inv
void quat_inv(quat_t dst, quat_t q) 
    {
    double norm2 = quat_norm(q);
    norm2 = norm2*norm2;
    dst[0] = q[0]/norm2;
    dst[1] = -q[1]/norm2;
    dst[2] = -q[2]/norm2;
    dst[3] = -q[3]/norm2;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd (%r14,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq $0x4, %rax
jne 0x1169c
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x116c3
sqrtsd %xmm0, %xmm0
jmp 0x116c8
callq 0x8cd0
mulsd %xmm0, %xmm0
movsd (%r14), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
movsd 0x8(%r14), %xmm1
movapd 0x59e9(%rip), %xmm2     # 0x170d0
xorpd %xmm2, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rbx)
movsd 0x10(%r14), %xmm1
xorpd %xmm2, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rbx)
movsd 0x18(%r14), %xmm1
xorpd %xmm2, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/quat.c
// Function: moonglmath_quat_Norm
int quat_Norm(lua_State *L)
    {
    quat_t q;
    size_t i;
    double r = 0;
    checkquat(L, 1, q);
    for(i=0; i < 4; i++)
        r += q[i]*q[i];
    lua_pushnumber(L, sqrt(r));
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdx
movl $0x1, %esi
callq 0x8240
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd (%rsp,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq $0x4, %rax
jne 0x11aa3
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x11ac9
sqrtsd %xmm0, %xmm0
jmp 0x11ace
callq 0x8cd0
movq %rbx, %rdi
callq 0x87d0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/quat.c
// Function: moonglmath_quat_Norm2
int quat_Norm2(lua_State *L)
    {
    quat_t q;
    size_t i;
    double r = 0;
    checkquat(L, 1, q);
    for(i=0; i < 4; i++)
        r += q[i]*q[i];
    lua_pushnumber(L, r);
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdx
movl $0x1, %esi
callq 0x8240
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd (%rsp,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq $0x4, %rax
jne 0x11afc
movq %rbx, %rdi
callq 0x87d0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/quat.c
// Function: moonglmath_quat_Normalize
int quat_Normalize(lua_State *L)
    {
    quat_t q; 
    checkquat(L, 1, q);
    quat_normalize(q);
    return pushquat(L, q);
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdx
movl $0x1, %esi
callq 0x8240
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd (%rsp,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq $0x4, %rax
jne 0x11b94
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x11bba
sqrtsd %xmm0, %xmm0
jmp 0x11bbf
callq 0x8cd0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
xorl %eax, %eax
movapd (%rsp,%rax,8), %xmm1
divpd %xmm0, %xmm1
movapd %xmm1, (%rsp,%rax,8)
addq $0x2, %rax
cmpq $0x4, %rax
jne 0x11bc5
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x82d0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/quat.c
// Function: moonglmath_quat_FromMat
int quat_FromMat(lua_State *L)
    {
    size_t nr, nc;
    double t, s, r;
    mat_t m;
    quat_t q;
    checkmat(L, 1, m, &nr, &nc);
    if( !(((nr==3) && (nc==3)) || ((nr==4) && (nc==4))) )
        return luaL_argerror(L, 1, "expected 3x3 or 4x4 matrix");
    t = m[0][0] + m[1][1] + m[2][2];
    if( t < 0 )
        {
        r = sqrt(1 + m[0][0] - m[1][1] - m[2][2]);
        s = 0.5/r;
        q[0] = (m[2][1] - m[1][2])*s;
        q[1] = 0.5*r;
        q[2] = (m[0][1] + m[1][0])*s;
        q[3] = (m[2][0] + m[0][2])*s;
        }
    else
        {
        r = sqrt(1+t);
        s = 0.5/r;
        q[0] = 0.5*r;
        q[1] = (m[2][1] - m[1][2])*s;
        q[2] = (m[0][2] - m[2][0])*s;
        q[3] = (m[1][0] + m[0][1])*s;
        }
    return pushquat(L, q);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %r14
movq %rsp, %r15
movl $0x1, %esi
movq %r14, %rcx
movq %r15, %r8
callq 0x8520
movq (%r14), %rax
movq %rax, %rdx
xorq $0x3, %rdx
movq (%r15), %rcx
movq %rcx, %rsi
xorq $0x3, %rsi
orq %rdx, %rsi
je 0x11cf5
xorq $0x4, %rax
xorq $0x4, %rcx
orq %rax, %rcx
jne 0x11d50
movsd 0x10(%rsp), %xmm0
movsd 0x38(%rsp), %xmm3
movapd %xmm0, %xmm1
addsd %xmm3, %xmm1
movsd 0x60(%rsp), %xmm4
addsd %xmm4, %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
jbe 0x11d39
addsd 0x539b(%rip), %xmm0     # 0x170c0
subsd %xmm3, %xmm0
subsd %xmm4, %xmm0
ucomisd %xmm2, %xmm0
jb 0x11d69
sqrtsd %xmm0, %xmm0
jmp 0x11d6e
addsd 0x537f(%rip), %xmm1     # 0x170c0
ucomisd %xmm2, %xmm1
jb 0x11db9
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
jmp 0x11dc2
leaq 0x5a51(%rip), %rdx      # 0x177a8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x81b0
jmp 0x11e37
callq 0x8cd0
movsd 0x5a22(%rip), %xmm1     # 0x17798
divsd %xmm0, %xmm1
movsd 0x58(%rsp), %xmm2
subsd 0x40(%rsp), %xmm2
movapd %xmm1, %xmm3
unpcklpd %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
shufpd $0x2, 0x59e9(%rip), %xmm2 # xmm2 = xmm2[0],mem[1]
movupd 0x18(%rsp), %xmm0
movapd 0x30(%rsp), %xmm4
movhpd 0x50(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
movhpd 0x20(%rsp), %xmm4       # xmm4 = xmm4[0],mem[0]
mulpd %xmm3, %xmm2
addpd %xmm0, %xmm4
jmp 0x11e11
movapd %xmm1, %xmm0
callq 0x8cd0
movsd 0x59ce(%rip), %xmm1     # 0x17798
movsd 0x58(%rsp), %xmm3
subsd 0x40(%rsp), %xmm3
divsd %xmm0, %xmm1
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movapd 0x598a(%rip), %xmm2     # 0x17770
unpcklpd %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
mulpd %xmm0, %xmm2
movapd 0x30(%rsp), %xmm0
movupd 0x18(%rsp), %xmm3
movapd %xmm3, %xmm4
addpd %xmm0, %xmm3
movhpd 0x50(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
subpd %xmm0, %xmm4
shufpd $0x1, %xmm3, %xmm4      # xmm4 = xmm4[1],xmm3[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm4, %xmm1
leaq 0x90(%rsp), %rsi
movapd %xmm2, (%rsi)
movapd %xmm1, 0x10(%rsi)
movq %rbx, %rdi
callq 0x82d0
movl $0x1, %eax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/quat.c
// Function: Concat
static int Concat(lua_State *L)
    {
    quat_t q;
    if(testquat(L, 1, q))
        {
        ToString_(L, q);
        lua_pushvalue(L, 2);
        }
    else if(testquat(L, 2, q))
        {
        lua_pushvalue(L, 1);
        ToString_(L, q);
        }
    else 
        return unexpected(L);
    lua_concat(L, 2);
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdx
movl $0x1, %esi
callq 0x8160
testl %eax, %eax
je 0x11ffc
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x124ed
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8600
jmp 0x12028
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8160
testl %eax, %eax
je 0x12040
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8600
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x124ed
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8bc0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x502d(%rip), %rsi      # 0x17074
leaq 0x5788(%rip), %rdx      # 0x177d6
movq %rbx, %rdi
movl $0xb7, %ecx
xorl %eax, %eax
callq 0x8a80
jmp 0x1203a
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/quat.c
// Function: Unm
static int Unm(lua_State *L)
    {
    quat_t q; 
    size_t i; 
    checkquat(L, 1, q);
    for(i=0; i < 4; i++)    
        q[i] = -q[i];
    return pushquat(L, q);
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdx
movl $0x1, %esi
callq 0x8240
xorl %eax, %eax
movaps 0x5053(%rip), %xmm0     # 0x170d0
movaps (%rsp,%rax,8), %xmm1
xorps %xmm0, %xmm1
movaps %xmm1, (%rsp,%rax,8)
addq $0x2, %rax
cmpq $0x4, %rax
jne 0x1207d
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x82d0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
leaq 0x20(%rsp), %rdx
movl $0x1, %esi
callq 0x8240
movq %rbx, %rdi
movl $0x2, %esi
callq 0x86e0
testq %rax, %rax
je 0x1234f
movq %rax, %r14
jle 0x12368
movaps 0x20(%rsp), %xmm0
movapd 0x30(%rsp), %xmm1
movapd %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
jmp 0x12394
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movsd 0x4d5d(%rip), %xmm0     # 0x170c0
jmp 0x124cd
movq %rsp, %r15
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x8d50
movaps (%r15), %xmm0
movapd 0x10(%r15), %xmm1
movapd %xmm1, 0x10(%r12)
movaps %xmm0, (%r12)
negq %r14
movsd (%rsp), %xmm0
cmpq $0x2, %r14
jb 0x124cd
movsd 0x20(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
movapd 0x30(%rsp), %xmm3
movsd 0x10(%rsp), %xmm4
movsd 0x18(%rsp), %xmm8
movhps 0x8(%rsp), %xmm8        # xmm8 = xmm8[0,1],mem[0,1]
movapd %xmm1, %xmm5
unpcklpd %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0]
movapd %xmm3, %xmm6
unpckhpd %xmm3, %xmm6            # xmm6 = xmm6[1],xmm3[1]
movapd %xmm3, %xmm7
shufpd $0x1, %xmm2, %xmm7      # xmm7 = xmm7[1],xmm2[0]
movapd %xmm2, %xmm9
unpcklpd %xmm3, %xmm9            # xmm9 = xmm9[0],xmm3[0]
decq %r14
movaps 0x4cda(%rip), %xmm10    # 0x170d0
movapd %xmm0, %xmm12
movaps %xmm8, %xmm0
xorps %xmm10, %xmm0
pshufd $0xee, %xmm0, %xmm11    # xmm11 = xmm0[2,3,2,3]
mulsd %xmm2, %xmm11
movapd %xmm12, %xmm13
mulsd %xmm1, %xmm13
addsd %xmm11, %xmm13
movapd %xmm4, %xmm11
mulsd %xmm3, %xmm11
subsd %xmm11, %xmm13
mulsd %xmm6, %xmm0
addsd %xmm13, %xmm0
movaps %xmm8, %xmm11
unpckhpd %xmm8, %xmm11           # xmm11 = xmm11[1],xmm8[1]
movaps %xmm8, %xmm13
shufps $0x4e, %xmm4, %xmm13    # xmm13 = xmm13[2,3],xmm4[0,1]
mulpd %xmm5, %xmm13
movapd %xmm12, %xmm14
unpcklpd %xmm12, %xmm14          # xmm14 = xmm14[0],xmm12[0]
mulpd %xmm9, %xmm14
addpd %xmm13, %xmm14
movaps %xmm4, %xmm13
movlhps %xmm8, %xmm13           # xmm13 = xmm13[0],xmm8[0]
mulpd %xmm7, %xmm13
addpd %xmm14, %xmm13
movaps %xmm8, %xmm14
mulpd %xmm3, %xmm14
subpd %xmm14, %xmm13
mulsd %xmm1, %xmm8
mulsd %xmm6, %xmm12
addsd %xmm8, %xmm12
mulsd %xmm3, %xmm11
addsd %xmm12, %xmm11
mulsd %xmm2, %xmm4
subsd %xmm4, %xmm11
movapd %xmm11, %xmm8
unpcklpd %xmm13, %xmm8           # xmm8 = xmm8[0],xmm13[0]
movapd %xmm13, %xmm4
unpckhpd %xmm13, %xmm4           # xmm4 = xmm4[1],xmm13[1]
decq %r14
jne 0x123f6
movupd %xmm13, 0x8(%rsp)
movsd %xmm11, 0x18(%rsp)
movq %rsp, %rsi
movsd %xmm0, (%rsi)
movq %rbx, %rdi
callq 0x82d0
movl $0x1, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x4e69(%rip), %rdx      # 0x177e4
callq 0x8170
testl %eax, %eax
je 0x129d8
movl $0x1, %r15d
testq %rbx, %rbx
je 0x129db
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movl $0x1, %r12d
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x8d30
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8320
movsd %xmm0, -0x8(%rbx,%r12,8)
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
incq %r12
cmpq $0x5, %r12
jne 0x1299f
jmp 0x129db
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x82f0
leaq 0x4d97(%rip), %rsi      # 0x177e4
movq %r14, %rdi
callq 0x8950
movl $0x1, %r15d
movsd -0x8(%rbx,%r15,8), %xmm0
movq %r14, %rdi
callq 0x87d0
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x8640
incq %r15
cmpq $0x5, %r15
jne 0x12a5b
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdx
movl $0x1, %esi
callq 0x88b0
testl %eax, %eax
je 0x12b3a
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x12b9d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8600
jmp 0x12b66
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x88b0
testl %eax, %eax
je 0x12b7e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8600
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x12b9d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8bc0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x44ef(%rip), %rsi      # 0x17074
leaq 0x4c68(%rip), %rdx      # 0x177f4
movq %rbx, %rdi
movl $0x93, %ecx
xorl %eax, %eax
callq 0x8a80
jmp 0x12b78
// File: /workspace/github_c_makefile_star2_O3/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 0x4484(%rip), %rdx      # 0x17046
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x4, %al
callq 0x83f0
cmpl $0x201, %eax            # imm = 0x201
jl 0x12bf2
movb $0x0, 0x1ff(%rsp)
movl $0x2e2e2e20, 0x1fb(%rsp) # imm = 0x2E2E2E20
movl $0x1ff, %edx            # imm = 0x1FF
jmp 0x12bf5
movslq %eax, %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8960
addq $0x200, %rsp            # imm = 0x200
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x85d0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8b80
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 0x429b(%rip), %xmm1     # 0x170d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x30(%rbx)
movsd %xmm0, 0x48(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x85d0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8b80
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 0x4220(%rip), %xmm1     # 0x170d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x40(%rbx)
movsd %xmm0, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x85d0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8b80
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)
movq $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 0x41a1(%rip), %xmm1     # 0x170d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%rbx)
movsd %xmm0, 0x20(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq %rsp, %rdx
movl $0x1, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8a50
testl %eax, %eax
je 0x12f78
movsd 0x10(%rsp), %xmm0
jmp 0x12fb0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8320
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
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)
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
callq 0x84d0
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq %rsp, %rdx
movl $0x1, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8a50
testl %eax, %eax
je 0x13057
movsd 0x10(%rsp), %xmm0
jmp 0x130b5
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8320
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8c40
testl %eax, %eax
jg 0x1308f
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8c40
testl %eax, %eax
jle 0x13127
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
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)
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
callq 0x84d0
addq $0xa0, %rsp
popq %rbx
retq
movsd (%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
jmp 0x130b5
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %esi
callq 0x8320
movsd %xmm0, 0x10(%rsp)
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8a50
testl %eax, %eax
je 0x13181
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x131c0
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movsd %xmm0, 0x30(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8320
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 0x85d0
movsd %xmm0, 0x18(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x8b80
movsd 0x3ec4(%rip), %xmm3     # 0x170c0
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)
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
callq 0x84d0
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %esi
callq 0x8320
movsd %xmm0, (%rsp)
callq 0x85d0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8b80
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 0x3d31(%rip), %xmm1     # 0x170d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x30(%rsi)
movsd %xmm0, 0x48(%rsi)
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
callq 0x84d0
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %esi
callq 0x8320
movsd %xmm0, (%rsp)
callq 0x85d0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x8b80
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 0x3c83(%rip), %xmm1     # 0x170d0
xorps %xmm0, %xmm1
movlps %xmm1, 0x40(%rsi)
movsd %xmm0, 0x10(%rsi)
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
callq 0x84d0
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rsi, %rdx
movq 0xbe74(%rip), %rbx      # 0x1f738
testq %rbx, %rbx
je 0x138da
cmpq %rdx, 0x20(%rbx)
ja 0x138d5
jae 0x138e9
addq $0x8, %rbx
movq (%rbx), %rbx
jmp 0x138c4
leaq 0x3fcb(%rip), %rsi      # 0x178ac
xorl %eax, %eax
popq %rbx
jmp 0x8a80
movl 0x28(%rbx), %edx
cmpl $-0x2, %edx
je 0x13902
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x8ce0
movl $0xfffffffe, 0x28(%rbx) # imm = 0xFFFFFFFE
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rdx
movq %rdi, %rbx
movq 0xbe21(%rip), %r14      # 0x1f738
testq %r14, %r14
je 0x1392d
cmpq %rdx, 0x20(%r14)
ja 0x13928
jae 0x13945
addq $0x8, %r14
movq (%r14), %r14
jmp 0x13917
leaq 0x3f78(%rip), %rsi      # 0x178ac
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8a80
movl 0x28(%r14), %edx
cmpl $-0x2, %edx
je 0x1395b
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x8ce0
movq %r14, %rdi
callq 0x13978
movq %rbx, %rdi
movq %r14, %rsi
callq 0x85f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rsi, %rdx
movq %rdi, %rbx
movq 0xb9b9(%rip), %rax      # 0x1f738
testq %rax, %rax
je 0x13d95
cmpq %rdx, 0x20(%rax)
ja 0x13d90
jae 0x13da7
addq $0x8, %rax
movq (%rax), %rax
jmp 0x13d7f
leaq 0x3b10(%rip), %rsi      # 0x178ac
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x8a80
movslq 0x28(%rax), %rdx
cmpq $-0x2, %rdx
jne 0x13dc3
leaq 0x3b11(%rip), %rsi      # 0x178c9
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x8a80
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x8380
cmpl $0x7, %eax
jne 0x13ddc
movl $0x1, %eax
popq %rbx
retq
leaq 0x3291(%rip), %rsi      # 0x17074
leaq 0x3af3(%rip), %rdx      # 0x178dd
movq %rbx, %rdi
movl $0xa4, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x8a80