LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_Clamp
int vec_Clamp(lua_State *L)
    {
    vec_t dst, v, minv, maxv;
    size_t size, size1;
    unsigned int isrow, isrow1;
    checkvec(L, 1, v, &size, &isrow);
    checkvec(L, 2, minv, &size1, &isrow1);
    if(size1 != size || isrow1 != isrow)
        return luaL_error(L, OPERANDS_ERROR);
    checkvec(L, 3, maxv, &size1, &isrow1);
    if(size1 != size || isrow1 != isrow)
        return luaL_error(L, OPERANDS_ERROR);
    vec_clamp(dst, v, minv, maxv, size);
    return pushvec(L, dst, size, size, isrow);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x60(%rsp), %rdx
leaq 0x10(%rsp), %r14
leaq 0xc(%rsp), %r8
movl $0x1, %esi
movq %r14, %rcx
callq 0x8670
leaq 0x40(%rsp), %rdx
leaq 0x18(%rsp), %r15
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rcx
callq 0x8670
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x15081
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jne 0x15081
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %rcx
callq 0x8670
movq 0x10(%rsp), %r15
cmpq %r15, (%r14)
jne 0x150ab
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jne 0x150ab
testq %r15, %r15
je 0x15062
xorl %r14d, %r14d
movsd 0x60(%rsp,%r14,8), %xmm0
movsd 0x40(%rsp,%r14,8), %xmm1
movsd 0x20(%rsp,%r14,8), %xmm2
callq 0x8390
movsd %xmm0, 0x80(%rsp,%r14,8)
incq %r14
cmpq %r14, %r15
jne 0x15036
movq 0x10(%rsp), %rcx
movl 0xc(%rsp), %r8d
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x82e0
jmp 0x1509e
leaq 0x25b5(%rip), %rsi      # 0x1763d
leaq 0x2a71(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x234, %ecx            # imm = 0x234
xorl %eax, %eax
callq 0x8a80
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x258b(%rip), %rsi      # 0x1763d
leaq 0x2a47(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x237, %ecx            # imm = 0x237
jmp 0x15097
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_Mix
int vec_Mix(lua_State *L)
    {
    vec_t dst, v1, v2;
    double k;
    size_t size, size1;
    unsigned int isrow, isrow1;
    checkvec(L, 1, v1, &size, &isrow);
    checkvec(L, 2, v2, &size1, &isrow1);
    if(size1 != size || isrow1 != isrow)
        return luaL_error(L, OPERANDS_ERROR);
    k = luaL_checknumber(L, 3);
    vec_mix(dst, v1, v2, size, k);
    return pushvec(L, dst, size, size, isrow);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x40(%rsp), %rdx
leaq 0x8(%rsp), %r14
movq %rsp, %r8
movl $0x1, %esi
movq %r14, %rcx
callq 0x8670
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %r15
leaq 0x4(%rsp), %r8
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rcx
callq 0x8670
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x1517f
movl 0x4(%rsp), %eax
cmpl (%rsp), %eax
jne 0x1517f
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
movq 0x8(%rsp), %r14
testq %r14, %r14
je 0x15164
xorl %r15d, %r15d
movsd %xmm0, 0x10(%rsp)
movsd 0x40(%rsp,%r15,8), %xmm0
movsd 0x20(%rsp,%r15,8), %xmm1
movsd 0x10(%rsp), %xmm2
callq 0x8780
movsd %xmm0, 0x60(%rsp,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x1513c
movq 0x8(%rsp), %rcx
movl (%rsp), %r8d
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x82e0
jmp 0x1519c
leaq 0x24b7(%rip), %rsi      # 0x1763d
leaq 0x2973(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x245, %ecx            # imm = 0x245
xorl %eax, %eax
callq 0x8a80
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_Step
int vec_Step(lua_State *L)
    {
    vec_t dst, v1, edge;
    double k;
    size_t size, size1;
    unsigned int isrow, isrow1;
    checkvec(L, 1, v1, &size, &isrow);
    if(lua_isnumber(L, 2))
        {
        k = lua_tonumber(L, 2);
        edge[0]=edge[1]=edge[2]=edge[3]=k;
        }
    else
        {
        checkvec(L, 2, edge, &size1, &isrow1);
        if(size1 != size || isrow1 != isrow)
            return luaL_error(L, OPERANDS_ERROR);
        }
    vec_step(dst, v1, edge, size);
    return pushvec(L, dst, size, size, isrow);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq 0x50(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x1, %esi
callq 0x8670
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8560
testl %eax, %eax
je 0x15249
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x8630
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x1522d
xorl %r15d, %r15d
movsd 0x50(%rsp,%r15,8), %xmm0
movsd 0x20(%rsp,%r15,8), %xmm1
callq 0x8860
movsd %xmm0, 0x70(%rsp,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x1520b
movq 0x10(%rsp), %rcx
movl 0xc(%rsp), %r8d
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x82e0
jmp 0x15299
leaq 0x20(%rsp), %rdx
leaq 0x48(%rsp), %r14
leaq 0x1c(%rsp), %r8
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rcx
callq 0x8670
movq (%r14), %rax
cmpq 0x10(%rsp), %rax
jne 0x1527c
movl 0x1c(%rsp), %eax
cmpl 0xc(%rsp), %eax
je 0x151fe
leaq 0x23ba(%rip), %rsi      # 0x1763d
leaq 0x2876(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x25b, %ecx            # imm = 0x25B
xorl %eax, %eax
callq 0x8a80
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_Smoothstep
int vec_Smoothstep(lua_State *L)
    {
    vec_t dst, v, edge0, edge1;
    double k;
    size_t size, size1;
    unsigned int isrow, isrow1;
    checkvec(L, 1, v, &size, &isrow);
    if(lua_isnumber(L, 2))
        {
        k = lua_tonumber(L, 2);
        edge0[0]=edge0[1]=edge0[2]=edge0[3]=k;
        }
    else
        {
        checkvec(L, 2, edge0, &size1, &isrow1);
        if(size1 != size || isrow1 != isrow)
            return luaL_error(L, OPERANDS_ERROR);
        }
    if(lua_isnumber(L, 3))
        {
        k = lua_tonumber(L, 3);
        edge1[0]=edge1[1]=edge1[2]=edge1[3]=k;
        }
    else
        {
        checkvec(L, 3, edge1, &size1, &isrow1);
        if(size1 != size || isrow1 != isrow)
            return luaL_error(L, OPERANDS_ERROR);
        }
    vec_smoothstep(dst, v, edge0, edge1, size);
    return pushvec(L, dst, size, size, isrow);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x60(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x1, %esi
callq 0x8670
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8560
testl %eax, %eax
je 0x1538b
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x8630
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8560
testl %eax, %eax
je 0x153da
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x8630
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x15369
xorl %r15d, %r15d
movsd 0x60(%rsp,%r15,8), %xmm0
movsd 0x40(%rsp,%r15,8), %xmm1
movsd 0x20(%rsp,%r15,8), %xmm2
callq 0x8690
movsd %xmm0, 0x80(%rsp,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x1533d
movq 0x10(%rsp), %rcx
movl 0xc(%rsp), %r8d
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x82e0
jmp 0x1542e
leaq 0x40(%rsp), %rdx
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rcx
callq 0x8670
movq (%r14), %rax
cmpq 0x10(%rsp), %rax
jne 0x153c2
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
je 0x152ff
leaq 0x2274(%rip), %rsi      # 0x1763d
leaq 0x2730(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x272, %ecx            # imm = 0x272
jmp 0x15427
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %rcx
callq 0x8670
movq (%r14), %rax
cmpq 0x10(%rsp), %rax
jne 0x15411
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
je 0x15330
leaq 0x2225(%rip), %rsi      # 0x1763d
leaq 0x26e1(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x27d, %ecx            # imm = 0x27D
xorl %eax, %eax
callq 0x8a80
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: moonglmath_vec_Fade
int vec_Fade(lua_State *L)
    {
    vec_t dst, v, edge0, edge1;
    double k;
    size_t size, size1;
    unsigned int isrow, isrow1;
    checkvec(L, 1, v, &size, &isrow);
    if(lua_isnumber(L, 2))
        {
        k = lua_tonumber(L, 2);
        edge0[0]=edge0[1]=edge0[2]=edge0[3]=k;
        }
    else
        {
        checkvec(L, 2, edge0, &size1, &isrow1);
        if(size1 != size || isrow1 != isrow)
            return luaL_error(L, OPERANDS_ERROR);
        }
    if(lua_isnumber(L, 3))
        {
        k = lua_tonumber(L, 3);
        edge1[0]=edge1[1]=edge1[2]=edge1[3]=k;
        }
    else
        {
        checkvec(L, 3, edge1, &size1, &isrow1);
        if(size1 != size || isrow1 != isrow)
            return luaL_error(L, OPERANDS_ERROR);
        }
    vec_fade(dst, v, edge0, edge1, size);
    return pushvec(L, dst, size, size, isrow);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x60(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x1, %esi
callq 0x8670
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8560
testl %eax, %eax
je 0x15520
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x8630
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8560
testl %eax, %eax
je 0x1556f
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x8630
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x154fe
xorl %r15d, %r15d
movsd 0x60(%rsp,%r15,8), %xmm0
movsd 0x40(%rsp,%r15,8), %xmm1
movsd 0x20(%rsp,%r15,8), %xmm2
callq 0x8790
movsd %xmm0, 0x80(%rsp,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x154d2
movq 0x10(%rsp), %rcx
movl 0xc(%rsp), %r8d
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x82e0
jmp 0x155c3
leaq 0x40(%rsp), %rdx
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rcx
callq 0x8670
movq (%r14), %rax
cmpq 0x10(%rsp), %rax
jne 0x15557
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
je 0x15494
leaq 0x20df(%rip), %rsi      # 0x1763d
leaq 0x259b(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x293, %ecx            # imm = 0x293
jmp 0x155bc
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %rcx
callq 0x8670
movq (%r14), %rax
cmpq 0x10(%rsp), %rax
jne 0x155a6
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
je 0x154c5
leaq 0x2090(%rip), %rsi      # 0x1763d
leaq 0x254c(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x29e, %ecx            # imm = 0x29E
xorl %eax, %eax
callq 0x8a80
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: Concat
static int Concat(lua_State *L)
    {
    vec_t v;
    size_t size;
    unsigned int isrow;
    if(testvec(L, 1, v, &size, &isrow))
        {
        ToString_(L, v, size, isrow);
        lua_pushvalue(L, 2);
        }
    else if(testvec(L, 2, v, &size, &isrow))
        {
        lua_pushvalue(L, 1);
        ToString_(L, v, size, isrow);
        }
    else 
        return unexpected(L);
    lua_concat(L, 2);
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0x4(%rsp), %r8
movl $0x1, %esi
callq 0x8a50
testl %eax, %eax
je 0x156af
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x15cba
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8600
jmp 0x156f2
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0x4(%rsp), %r8
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8a50
testl %eax, %eax
je 0x1570a
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8600
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x15cba
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8bc0
movl $0x1, %eax
addq $0x30, %rsp
popq %rbx
retq
leaq 0x1963(%rip), %rsi      # 0x17074
leaq 0x23e8(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0xe4, %ecx
xorl %eax, %eax
callq 0x8a80
jmp 0x15704
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: Unm
static int Unm(lua_State *L)
    {
    vec_t v; 
    size_t size, i; 
    unsigned int isrow;
    checkvec(L, 1, v, &size, &isrow);
    for(i=0; i < 4; i++)    
        v[i] = -v[i];
    return pushvec(L, v, size, size, isrow);
    }

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0x4(%rsp), %r8
movl $0x1, %esi
callq 0x8670
xorl %eax, %eax
movaps 0x197d(%rip), %xmm0     # 0x170d0
movaps 0x10(%rsp,%rax,8), %xmm1
xorps %xmm0, %xmm1
movaps %xmm1, 0x10(%rsp,%rax,8)
addq $0x2, %rax
cmpq $0x4, %rax
jne 0x15753
movq 0x8(%rsp), %rcx
movl 0x4(%rsp), %r8d
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x82e0
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: Add
static int Add(lua_State *L)
    {
    vec_t v, v1; 
    size_t size, size1, i; 
    unsigned int isrow, isrow1;
    checkvec(L, 1, v, &size, &isrow);
    checkvec(L, 2, v1, &size1, &isrow1);
    if((isrow != isrow1) || (size != size1))
        return luaL_error(L, OPERANDS_ERROR);
    for(i=0; i < size; i++) 
        v[i] += v1[i];
    return pushvec(L, v, size, size, isrow);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x1c(%rsp), %r14
movl $0x1, %esi
movq %r14, %r8
callq 0x8670
leaq 0x40(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0x18(%rsp), %r15
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %r8
callq 0x8670
movl (%r14), %r8d
cmpl (%r15), %r8d
jne 0x15818
movq 0x10(%rsp), %rcx
cmpq 0x8(%rsp), %rcx
jne 0x15818
testq %rcx, %rcx
je 0x15806
xorl %eax, %eax
movsd 0x40(%rsp,%rax,8), %xmm0
addsd 0x20(%rsp,%rax,8), %xmm0
movsd %xmm0, 0x20(%rsp,%rax,8)
incq %rax
cmpq %rax, %rcx
jne 0x157ec
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x82e0
jmp 0x15835
leaq 0x1e1e(%rip), %rsi      # 0x1763d
leaq 0x22da(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x18b, %ecx            # imm = 0x18B
xorl %eax, %eax
callq 0x8a80
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: Div
static int Div(lua_State *L)
    {
    vec_t v; 
    size_t size, i; 
    unsigned int isrow;
    double s;
    checkvec(L, 1, v, &size, &isrow);
    s = luaL_checknumber(L, 2);
    for(i=0; i < size; i++) 
        v[i] /= s;
    return pushvec(L, v, size, size, isrow);
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %r14
leaq 0xc(%rsp), %r8
movl $0x1, %esi
movq %r14, %rcx
callq 0x8670
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movq (%r14), %rcx
testq %rcx, %rcx
je 0x15b97
xorl %eax, %eax
movsd 0x10(%rsp,%rax,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp,%rax,8)
incq %rax
cmpq %rax, %rcx
jne 0x15b7f
movl 0xc(%rsp), %r8d
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x82e0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: Cross
static int Cross(lua_State *L)
/* always return a size=3 vector */
//@@ TODO?: v % scalar = component-wise mod
    {
    vec_t v1, v2, v;
    size_t size1, size2; 
    unsigned int isrow1, isrow2;
    checkvec(L, 1, v1, &size1, &isrow1);
    checkvec(L, 2, v2, &size2, &isrow2);
    if((isrow1 != isrow2) || (size1 != size2))
        return luaL_error(L, OPERANDS_ERROR);
    if(size1==2)
        v1[2] = v2[2] = 0;
    vec_cross(v, v1, v2);
    return pushvec(L, v, 3, 3, isrow1);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x40(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x1c(%rsp), %r14
movl $0x1, %esi
movq %r14, %r8
callq 0x8670
leaq 0x20(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0x18(%rsp), %r15
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %r8
callq 0x8670
movl (%r14), %r8d
cmpl (%r15), %r8d
jne 0x15c90
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jne 0x15c90
cmpq $0x2, %rax
jne 0x15c28
xorl %eax, %eax
movq %rax, 0x30(%rsp)
movq %rax, 0x50(%rsp)
movsd 0x20(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movupd 0x48(%rsp), %xmm2
movupd 0x28(%rsp), %xmm3
movapd %xmm2, %xmm4
shufpd $0x1, %xmm1, %xmm4      # xmm4 = xmm4[1],xmm1[0]
mulpd %xmm3, %xmm4
mulsd %xmm3, %xmm1
shufpd $0x1, %xmm0, %xmm3      # xmm3 = xmm3[1],xmm0[0]
mulpd %xmm2, %xmm3
subpd %xmm4, %xmm3
leaq 0x60(%rsp), %rsi
movapd %xmm3, (%rsi)
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsi)
movq $0x0, 0x18(%rsi)
movl $0x3, %edx
movl $0x3, %ecx
movq %rbx, %rdi
callq 0x82e0
jmp 0x15cad
leaq 0x19a6(%rip), %rsi      # 0x1763d
leaq 0x1e62(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x1fb, %ecx            # imm = 0x1FB
xorl %eax, %eax
callq 0x8a80
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: ToString_
static int ToString_(lua_State *L, vec_t v, size_t size, unsigned int isrow)
/* 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;
    switch(size)
        {
#define T isrow==1 ? "" : "'"
        case 2: p = snprintf(str, space, "{ "FMT", "FMT" }%s", v[0], v[1], T ); break;
        case 3: p = snprintf(str, space, "{ "FMT", "FMT", "FMT" }%s", 
                                                v[0], v[1], v[2], T); break;
        case 4: p = snprintf(str, space, "{ "FMT", "FMT", "FMT", "FMT" }%s", 
                                                v[0], v[1], v[2], v[3], T); 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;
        }
    lua_pushlstring(L, str, p);
    return 1;
#undef space
#undef SZ
    }

// Assembly:
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
cmpq $0x4, %rdx
je 0x15d50
cmpq $0x3, %rdx
je 0x15d15
cmpq $0x2, %rdx
jne 0x15dcc
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
cmpl $0x1, %ecx
leaq 0x1a48(%rip), %rax      # 0x1773a
leaq 0x1c05(%rip), %rcx      # 0x178fe
cmoveq %rax, %rcx
leaq 0x1e08(%rip), %rdx      # 0x17b0c
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x2, %al
callq 0x83f0
jmp 0x15d8e
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
cmpl $0x1, %ecx
leaq 0x1a0d(%rip), %rax      # 0x1773a
leaq 0x1bca(%rip), %rcx      # 0x178fe
cmoveq %rax, %rcx
leaq 0x1dda(%rip), %rdx      # 0x17b19
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x3, %al
callq 0x83f0
jmp 0x15d8e
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
movsd 0x18(%rsi), %xmm3
cmpl $0x1, %ecx
leaq 0x19cd(%rip), %rax      # 0x1773a
leaq 0x1b8a(%rip), %rcx      # 0x178fe
cmoveq %rax, %rcx
leaq 0x1dab(%rip), %rdx      # 0x17b2a
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x4, %al
callq 0x83f0
cmpl $0x201, %eax            # imm = 0x201
jl 0x15db0
movq %rsp, %rsi
movb $0x0, 0x1ff(%rsi)
movl $0x2e2e2e20, 0x1fb(%rsi) # imm = 0x2E2E2E20
movl $0x1ff, %edx            # imm = 0x1FF
jmp 0x15db6
movslq %eax, %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8960
movl $0x1, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
retq
leaq 0x12a1(%rip), %rsi      # 0x17074
leaq 0x1d26(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0xba, %ecx
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
jmp 0x8a80
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: Vxs
static int Vxs(lua_State *L, int sarg, int varg)
    {
    vec_t v; 
    size_t size, i; 
    unsigned int isrow;
    double s = luaL_checknumber(L, sarg);
    checkvec(L, varg, v, &size, &isrow);
    for(i=0; i < size; i++) 
        v[i] *= s;
    return pushvec(L, v, size, size, isrow);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebp
movq %rdi, %rbx
callq 0x8320
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %r14
leaq 0x4(%rsp), %r8
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rcx
callq 0x8670
movsd 0x8(%rsp), %xmm1
movq (%r14), %rcx
testq %rcx, %rcx
je 0x15e4d
xorl %eax, %eax
movsd 0x10(%rsp,%rax,8), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp,%rax,8)
incq %rax
cmpq %rax, %rcx
jne 0x15e35
movl 0x4(%rsp), %r8d
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x82e0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/vec.c
// Function: Vec
static int Vec(lua_State *L, size_t size, unsigned int isrow)
/* creates a vector of size 'size', from a vector or a list of values 
 * the size is adapted by discarding exceeding values or adding zeros
 * in lieu of missing values.
 * vecN(v)
 * vecN([x1 ,[x2,...[,xN]]])
 */
    {
    vec_t v;
    size_t vsize, i, arg;
    arg = 1;
    if(testvec(L, arg, v, &vsize, NULL))
        return pushvec(L, v, vsize, size, isrow);
    checkvecsize(L, size);
    for(i = 0; i < size; i++)
        v[i] = luaL_optnumber(L, arg++, 0);
    return pushvec(L, v, size, size, isrow);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movl $0x1, %esi
xorl %r8d, %r8d
callq 0x8a50
testl %eax, %eax
je 0x15f74
movq 0x8(%rsp), %rdx
jmp 0x15fa3
movq %r14, %rdx
testq %r14, %r14
je 0x15fa3
xorl %r13d, %r13d
leaq 0x1(%r13), %r12
xorps %xmm0, %xmm0
movq %r15, %rdi
movl %r12d, %esi
callq 0x8340
movsd %xmm0, 0x10(%rsp,%r13,8)
movq %r12, %r13
cmpq %r12, %r14
jne 0x15f7f
movq %r14, %rdx
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rcx
movl %ebx, %r8d
callq 0x82e0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/viewing.c
// Function: moonglmath_look_at
int look_at(mat_t dst, vec_t eye, vec_t at, vec_t up)
/* look_at(eye, at, up) 
 *
 * eye = camera position = (e1, e2, e3)
 * at  = target position
 * up  = camera 'up' direction
 *
 * NOTE: 'up' is the direction from the camera to a point above the target,
 *        on the vertical.
 *
 * d = (at - eye) : direction vector
 * n = (eye - at) = z : normal to the projection plane, oriented towards the camera
 * x = d % up = up % n : points to the right of the camera
 * y = z % x = n % x : points up fro the camera
 *  
 * M = |x1 x2 x3 0| |1 0 0 -e1|
 *     |y1 y2 y3 0|·|0 1 0 -e2|
 *     |z1 z2 z3 0| |0 0 1 -e3|
 *     |0  0  0  1| |0 0 0   1|
 *          |           |
 *       orient     translate
 */
    {

    size_t i;
    vec_t z, x, y;
    mat_t c, te;

    vec_sub(z, eye, at, 4); /* z = eye - at (normal vector = - direction vector) */
    vec_normalize(z, 4);

    vec_cross(x, up, z); /* x = up % z  (right vector) */
    vec_normalize(x, 4);

    vec_cross(y, z, x);  /* y = z % x  (up vector) */
    vec_normalize(y, 4);

    mat_clear(c);   
    /* c = x1 x2 x3  0
     *     y1 y2 y3  0
     *     z1 z2 z3  0
     *      0  0  0  1
     */
    for(i = 0; i< 4; i ++)
        {
        c[0][i] = x[i];
        c[1][i] = y[i];
        c[2][i] = z[i];
        }
    c[3][3] = 1;

    /* dst = c * translate(-eye) */
    translate(te, -eye[0], -eye[1], -eye[2]);
    mat_mul(dst, c, te, 4, 4, 4);

    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rcx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rsp), %r15
movl $0x4, %ecx
movq %r15, %rdi
callq 0x87c0
movl $0x4, %esi
movq %r15, %rdi
callq 0x8d90
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x8bf0
movl $0x4, %esi
movq %r13, %rdi
callq 0x8d90
movq %rsp, %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x8bf0
movl $0x4, %esi
movq %rbp, %rdi
callq 0x8d90
movaps (%r13), %xmm0
movaps 0x10(%r13), %xmm1
leaq 0xe0(%rsp), %r12
movaps %xmm1, 0x10(%r12)
movaps %xmm0, (%r12)
movaps (%rbp), %xmm0
movaps 0x10(%rbp), %xmm1
movaps %xmm0, 0x20(%r12)
movaps %xmm1, 0x30(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%r12)
movaps %xmm0, 0x60(%r12)
movaps (%r15), %xmm0
movaps 0x10(%r15), %xmm1
movaps %xmm0, 0x40(%r12)
movaps %xmm1, 0x50(%r12)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%r12)
movaps 0xfce(%rip), %xmm3      # 0x170d0
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
movsd 0x10(%r14), %xmm2
xorps %xmm3, %xmm0
xorps %xmm3, %xmm1
xorps %xmm3, %xmm2
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x8530
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x8730
xorl %eax, %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/viewing.c
// Function: moonglmath_ortho
int ortho(mat_t dst, double l, double r, double b, double t, double near, double far)
/* ortho(left, right, bottom, top, near,  far)
 * near=-1 and far=1 give a 2D projection
 *
 * Rfr. RTR3/4.6.1
 *
 * The viewing parallelepiped is: 
 * x: left .. right
 * y: bottom .. up
 * z: -near .. -far
 *
 * The camera is positioned at the origin, pointing to the -z axis (x=right, y=up)
 * and the projection plane is the x-y plane (or, equivalently, any plane parallel
 * to x-y, since the projectors are parallel to the z axis).
 *
 * M =  |2/(r-l)  0    0     0| |1 0 0 -(l+r)/2| = |2/(r-l)  0     0    -(r+l)/(r-l)|
 *      |  0   2/(t-b) 0     0|*|0 1 0 -(t+b)/2|   |  0   2/(t-b)  0    -(t+b)/(t-b)|
 *      |  0      0  2/(f-n) 0| |0 0 1 -(f+n)/2|   |  0     0   2/(f-n) -(f+n)/(f-n)|
 *      |  0      0    0     1| |0 0 0     1   |   |  0     0      0         1      |
 *           scaling               translation
 */
    {
    double n, f;
    n = -near;
    f = -far;
    mat_clear(dst);
    dst[0][0] = 2.0/(r-l);
    dst[0][3] = -(r+l)/(r-l);
    dst[1][1] = 2.0/(t-b);
    dst[1][3] = -(t+b)/(t-b);
    dst[2][2] = 2.0/(f-n);
    dst[2][3] = -(f+n)/(f-n);
    dst[3][3] = 1.0;
    return 0;
    }

// Assembly:
movapd 0xf6c(%rip), %xmm7      # 0x170d0
movapd %xmm4, %xmm6
xorpd %xmm7, %xmm6
xorps %xmm8, %xmm8
movups %xmm8, (%rdi)
movups %xmm8, 0x10(%rdi)
movups %xmm8, 0x20(%rdi)
movups %xmm8, 0x30(%rdi)
movups %xmm8, 0x70(%rdi)
movups %xmm8, 0x60(%rdi)
movups %xmm8, 0x40(%rdi)
movapd %xmm1, %xmm8
subsd %xmm0, %xmm8
movsd 0x15fb(%rip), %xmm9     # 0x177a0
movapd %xmm9, %xmm10
divsd %xmm8, %xmm10
movsd %xmm10, (%rdi)
addsd %xmm1, %xmm0
xorpd %xmm7, %xmm0
divsd %xmm8, %xmm0
movsd %xmm0, 0x18(%rdi)
movapd %xmm3, %xmm0
subsd %xmm2, %xmm0
divsd %xmm0, %xmm9
movsd %xmm9, 0x28(%rdi)
addsd %xmm3, %xmm2
xorpd %xmm7, %xmm2
divsd %xmm0, %xmm2
movsd %xmm2, 0x38(%rdi)
subsd %xmm5, %xmm4
subsd %xmm5, %xmm6
xorpd %xmm7, %xmm6
movapd 0x1972(%rip), %xmm0     # 0x17b70
unpcklpd %xmm6, %xmm0            # xmm0 = xmm0[0],xmm6[0]
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
divpd %xmm4, %xmm0
movupd %xmm0, 0x50(%rdi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/viewing.c
// Function: moonglmath_frustum
int frustum(mat_t dst, double l, double r, double b, double t, double n, double f)
    {
    mat_clear(dst);
    dst[0][0] = 2.0*n/(r-l);
    dst[0][2] = (r+l)/(r-l);
    dst[1][1] = 2.0*n/(t-b);
    dst[1][2] = (t+b)/(t-b);
    dst[2][2] = -(f+n)/(f-n);
    dst[2][3] = -2.0*f*n/(f-n);
    dst[3][2] = -1.0;
    return 0;
    }

// Assembly:
xorps %xmm6, %xmm6
movups %xmm6, (%rdi)
movups %xmm6, 0x10(%rdi)
movups %xmm6, 0x30(%rdi)
movups %xmm6, 0x20(%rdi)
movups %xmm6, 0x70(%rdi)
movups %xmm6, 0x60(%rdi)
movups %xmm6, 0x40(%rdi)
movapd %xmm4, %xmm6
addsd %xmm5, %xmm6
movapd %xmm5, %xmm7
subsd %xmm4, %xmm7
mulsd 0x192a(%rip), %xmm5     # 0x17b80
mulsd %xmm4, %xmm5
unpcklpd %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0]
movapd 0x1909(%rip), %xmm8     # 0x17b70
unpcklpd %xmm3, %xmm8            # xmm8 = xmm8[0],xmm3[0]
movapd %xmm4, %xmm9
mulpd %xmm8, %xmm9
addpd %xmm4, %xmm8
movsd %xmm9, %xmm8            # xmm8 = xmm9[0],xmm8[1]
movapd %xmm1, %xmm4
subsd %xmm0, %xmm4
divsd %xmm4, %xmm9
movsd %xmm9, (%rdi)
addsd %xmm1, %xmm0
divsd %xmm4, %xmm0
movsd %xmm0, 0x10(%rdi)
subsd %xmm2, %xmm3
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
divpd %xmm3, %xmm8
xorpd 0xe1c(%rip), %xmm6      # 0x170d0
movupd %xmm8, 0x28(%rdi)
unpcklpd %xmm5, %xmm6            # xmm6 = xmm6[0],xmm5[0]
unpcklpd %xmm7, %xmm7            # xmm7 = xmm7[0,0]
divpd %xmm7, %xmm6
movupd %xmm6, 0x50(%rdi)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x70(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/viewing.c
// Function: moonglmath_perspective
int perspective(mat_t dst, double fovy, double aspect, double n, double f)
    {
    double t = tan(fovy/2) * n; /* top */
    double r = t * aspect; /* right */
    mat_clear(dst);
    dst[0][0] = n/r;
    dst[1][1] = n/t;
    dst[2][2] = -(f+n)/(f-n);
    dst[2][3] = -2.0*f*n/(f-n);
    dst[3][2] = -1.0;
    return 0;
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movaps %xmm3, 0x10(%rsp)
movsd %xmm2, (%rsp)
movsd %xmm1, 0x8(%rsp)
movq %rdi, %rbx
mulsd 0x149c(%rip), %xmm0     # 0x17798
callq 0x88a0
movsd (%rsp), %xmm3
mulsd %xmm3, %xmm0
movsd 0x8(%rsp), %xmm2
mulsd %xmm0, %xmm2
xorps %xmm1, %xmm1
movups %xmm1, (%rbx)
movups %xmm1, 0x20(%rbx)
movups %xmm1, 0x70(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm1, 0x30(%rbx)
movups %xmm1, 0x40(%rbx)
movups %xmm1, 0x60(%rbx)
movapd %xmm3, %xmm1
divsd %xmm2, %xmm1
movsd %xmm1, (%rbx)
movapd %xmm3, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rbx)
movapd %xmm3, %xmm0
movapd 0x10(%rsp), %xmm2
addsd %xmm2, %xmm0
xorpd 0xd6f(%rip), %xmm0      # 0x170d0
movapd %xmm2, %xmm1
subsd %xmm3, %xmm1
mulsd 0x180f(%rip), %xmm2     # 0x17b80
mulsd %xmm3, %xmm2
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
divpd %xmm1, %xmm0
movupd %xmm0, 0x50(%rbx)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x70(%rbx)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/viewing.c
// Function: LookAt
static int LookAt(lua_State *L)
    {
    mat_t m;
    vec_t eye, at, up;
    checkvec(L, 1, eye, NULL, NULL);
    checkvec(L, 2, at, NULL, NULL);
    checkvec(L, 3, up, NULL, NULL);
    look_at(m, eye, at, up);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rdi, %rbx
leaq 0x40(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8670
leaq 0x20(%rsp), %r15
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8670
movq %rsp, %r12
movq %rbx, %rdi
movl $0x3, %esi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8670
leaq 0x60(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x80d0
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x84d0
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/viewing.c
// Function: Ortho
static int Ortho(lua_State *L)
    {
    mat_t m;
    double l = luaL_checknumber(L, 1); /* left */
    double r = luaL_checknumber(L, 2); /* right */
    double b = luaL_checknumber(L, 3); /* bottom */
    double t = luaL_checknumber(L, 4); /* top */
    double n = luaL_optnumber(L, 5, -1.0); /* near */
    double f = luaL_optnumber(L, 6, 1.0); /* far */
    ortho(m, l, r, b, t, n, f);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8320
movaps %xmm0, 0x20(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
movaps %xmm0, 0x30(%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8320
movsd %xmm0, 0x8(%rsp)
movsd 0x1481(%rip), %xmm0     # 0x17928
movq %rbx, %rdi
movl $0x5, %esi
callq 0x8340
movaps %xmm0, 0x10(%rsp)
movsd 0xbff(%rip), %xmm0      # 0x170c0
movq %rbx, %rdi
movl $0x6, %esi
callq 0x8340
movapd 0xbfa(%rip), %xmm2      # 0x170d0
movapd 0x10(%rsp), %xmm8
movapd %xmm8, %xmm1
xorpd %xmm2, %xmm1
xorps %xmm3, %xmm3
leaq 0x40(%rsp), %rsi
movaps %xmm3, (%rsi)
movaps %xmm3, 0x10(%rsi)
movaps %xmm3, 0x20(%rsi)
movaps %xmm3, 0x30(%rsi)
movaps %xmm3, 0x70(%rsi)
movaps %xmm3, 0x40(%rsi)
movaps %xmm3, 0x60(%rsi)
movsd (%rsp), %xmm7
movapd %xmm7, %xmm3
movapd 0x20(%rsp), %xmm6
subsd %xmm6, %xmm3
movsd 0x127c(%rip), %xmm4     # 0x177a0
movapd %xmm4, %xmm5
divsd %xmm3, %xmm5
movsd %xmm5, (%rsi)
addsd %xmm7, %xmm6
xorpd %xmm2, %xmm6
divsd %xmm3, %xmm6
movsd %xmm6, 0x18(%rsi)
movsd 0x8(%rsp), %xmm6
movapd %xmm6, %xmm3
movapd 0x30(%rsp), %xmm5
subsd %xmm5, %xmm3
divsd %xmm3, %xmm4
movsd %xmm4, 0x28(%rsi)
addsd %xmm6, %xmm5
xorpd %xmm2, %xmm5
divsd %xmm3, %xmm5
movsd %xmm5, 0x38(%rsi)
movapd %xmm8, %xmm3
subsd %xmm0, %xmm3
subsd %xmm0, %xmm1
xorpd %xmm2, %xmm1
movapd 0x15e8(%rip), %xmm0     # 0x17b70
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
divpd %xmm3, %xmm0
movapd %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 $0xc0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/viewing.c
// Function: Frustum
static int Frustum(lua_State *L)
    {
    mat_t m;
    double l = luaL_checknumber(L, 1); /* left */
    double r = luaL_checknumber(L, 2); /* right */
    double b = luaL_checknumber(L, 3); /* bottom */
    double t = luaL_checknumber(L, 4); /* top */
    double n = luaL_checknumber(L, 5); /* near */
    double f = luaL_checknumber(L, 6); /* far */
    frustum(m, l, r, b, t, n, f);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8320
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
movapd %xmm0, 0x30(%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8320
movapd %xmm0, 0x20(%rsp)
movq %rbx, %rdi
movl $0x5, %esi
callq 0x8320
movapd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movl $0x6, %esi
callq 0x8320
xorps %xmm1, %xmm1
leaq 0x40(%rsp), %rsi
movaps %xmm1, 0x10(%rsi)
movaps %xmm1, (%rsi)
movaps %xmm1, 0x20(%rsi)
movaps %xmm1, 0x30(%rsi)
movaps %xmm1, 0x70(%rsi)
movaps %xmm1, 0x40(%rsi)
movaps %xmm1, 0x60(%rsi)
movsd (%rsp), %xmm3
movapd %xmm3, %xmm1
movsd 0x8(%rsp), %xmm2
subsd %xmm2, %xmm1
addsd %xmm3, %xmm2
divsd %xmm1, %xmm2
movsd %xmm2, 0x10(%rsi)
movapd 0x20(%rsp), %xmm5
movapd %xmm5, %xmm2
movapd 0x30(%rsp), %xmm4
subsd %xmm4, %xmm2
movapd 0x10(%rsp), %xmm6
movapd %xmm6, %xmm3
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
movapd 0x14c2(%rip), %xmm4     # 0x17b70
unpcklpd %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0]
movapd %xmm3, %xmm5
mulpd %xmm4, %xmm5
addpd %xmm3, %xmm4
movsd %xmm5, %xmm4            # xmm4 = xmm5[0],xmm4[1]
divsd %xmm1, %xmm5
movsd %xmm5, (%rsi)
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
divpd %xmm2, %xmm4
movapd %xmm6, %xmm1
addsd %xmm0, %xmm1
xorpd 0x9ee(%rip), %xmm1      # 0x170d0
movupd %xmm4, 0x28(%rsi)
movapd %xmm0, %xmm2
mulsd 0x148d(%rip), %xmm0     # 0x17b80
subsd %xmm6, %xmm2
mulsd %xmm6, %xmm0
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
divpd %xmm2, %xmm1
movapd %xmm1, 0x50(%rsi)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x70(%rsi)
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
callq 0x84d0
addq $0xc0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/viewing.c
// Function: Perspective
static int Perspective(lua_State *L)
/* perspective(fovy, aspect, near, far)
 */
    {
    mat_t m;
    double fovy = luaL_checknumber(L, 1); /* radians */
    double aspect = luaL_checknumber(L, 2);
    double n = luaL_checknumber(L, 3); /* near */
    double f = luaL_checknumber(L, 4); /* far */
    perspective(m, fovy, aspect, n, f);
    return pushmat(L, m, 4, 4, 4, 4);
    }

// Assembly:
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8320
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8320
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8320
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x8320
movaps %xmm0, 0x20(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0xff6(%rip), %xmm0      # 0x17798
callq 0x88a0
movsd 0x8(%rsp), %xmm2
mulsd %xmm2, %xmm0
movsd 0x18(%rsp), %xmm3
mulsd %xmm0, %xmm3
xorps %xmm1, %xmm1
leaq 0x30(%rsp), %rsi
movaps %xmm1, (%rsi)
movaps %xmm1, 0x20(%rsi)
movaps %xmm1, 0x70(%rsi)
movaps %xmm1, 0x10(%rsi)
movaps %xmm1, 0x30(%rsi)
movaps %xmm1, 0x40(%rsi)
movaps %xmm1, 0x60(%rsi)
movapd %xmm2, %xmm1
divsd %xmm3, %xmm1
movsd %xmm1, (%rsi)
movapd %xmm2, %xmm1
divsd %xmm0, %xmm1
movapd %xmm2, %xmm0
movapd 0x20(%rsp), %xmm3
addsd %xmm3, %xmm0
xorpd 0x8c8(%rip), %xmm0      # 0x170d0
movsd %xmm1, 0x28(%rsi)
movapd %xmm3, %xmm1
mulsd 0x1367(%rip), %xmm3     # 0x17b80
subsd %xmm2, %xmm1
mulsd %xmm2, %xmm3
unpcklpd %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
divpd %xmm1, %xmm0
movapd %xmm0, 0x50(%rsi)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x70(%rsi)
movl $0x4, %edx
movl $0x4, %ecx
movl $0x4, %r8d
movl $0x4, %r9d
movq %rbx, %rdi
callq 0x84d0
addq $0xb0, %rsp
popq %rbx
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes128poetv1aes4/ni/aes-ni.c
// Function: AES_Key_Dec
void AES_Key_Dec(const AES_KEY enc_key, AES_KEY dec_key)
{
	dec_key[10] = enc_key[0];
	dec_key[9] = _mm_aesimc_si128(enc_key[1]);
	dec_key[8] = _mm_aesimc_si128(enc_key[2]);
	dec_key[7] = _mm_aesimc_si128(enc_key[3]);
	dec_key[6] = _mm_aesimc_si128(enc_key[4]);
	dec_key[5] = _mm_aesimc_si128(enc_key[5]);
	dec_key[4] = _mm_aesimc_si128(enc_key[6]);
	dec_key[3] = _mm_aesimc_si128(enc_key[7]);
	dec_key[2] = _mm_aesimc_si128(enc_key[8]);
	dec_key[1] = _mm_aesimc_si128(enc_key[9]);
	dec_key[0] = enc_key[10];
}

// Assembly:
vmovaps (%rdi), %xmm0
vmovaps %xmm0, 0xa0(%rsi)
vaesimc 0x10(%rdi), %xmm0
vmovdqa %xmm0, 0x90(%rsi)
vaesimc 0x20(%rdi), %xmm0
vmovdqa %xmm0, 0x80(%rsi)
vaesimc 0x30(%rdi), %xmm0
vmovdqa %xmm0, 0x70(%rsi)
vaesimc 0x40(%rdi), %xmm0
vmovdqa %xmm0, 0x60(%rsi)
vaesimc 0x50(%rdi), %xmm0
vmovdqa %xmm0, 0x50(%rsi)
vaesimc 0x60(%rdi), %xmm0
vmovdqa %xmm0, 0x40(%rsi)
vaesimc 0x70(%rdi), %xmm0
vmovdqa %xmm0, 0x30(%rsi)
vaesimc 0x80(%rdi), %xmm0
vmovdqa %xmm0, 0x20(%rsi)
vaesimc 0x90(%rdi), %xmm0
vmovdqa %xmm0, 0x10(%rsi)
vmovaps 0xa0(%rdi), %xmm0
vmovaps %xmm0, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes128poetv1aes4/ni/aes-ni.c
// Function: AESNI_Key_Expansion4
void AESNI_Key_Expansion4(const unsigned char *userkey, AUX_KEY key)
{
   __m128i temp1, temp2;
    __m128i *Key_Schedule = (__m128i*)key;

    temp1 = _mm_loadu_si128((__m128i*)userkey);
    _mm_storeu_si128(&Key_Schedule[0], temp1);
    temp2= _mm_aeskeygenassist_si128 (temp1 ,0x1);
    temp1 = AES_128_ASSIST(temp1, temp2);
    _mm_storeu_si128(&Key_Schedule[1], temp1);
    temp2 = _mm_aeskeygenassist_si128 (temp1,0x2);
    temp1 = AES_128_ASSIST(temp1, temp2);
    _mm_storeu_si128(&Key_Schedule[2], temp1);
    temp2 = _mm_aeskeygenassist_si128 (temp1,0x4);
    temp1 = AES_128_ASSIST(temp1, temp2);
    _mm_storeu_si128(&Key_Schedule[3], temp1);
    temp2 = _mm_aeskeygenassist_si128 (temp1,0x8);
    temp1 = AES_128_ASSIST(temp1, temp2);
    _mm_storeu_si128(&Key_Schedule[4], temp1);
}

// Assembly:
vmovdqu (%rdi), %xmm0
vaeskeygenassist $0x1, %xmm0, %xmm1
vmovdqu %xmm0, (%rsi)
vpshufd $0xff, %xmm1, %xmm1     # xmm1 = xmm1[3,3,3,3]
vpslldq $0x4, %xmm0, %xmm2      # xmm2 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11]
vpslldq $0x8, %xmm0, %xmm3      # xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
vpslldq $0xc, %xmm0, %xmm4      # xmm4 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3]
vpternlogq $0x96, %xmm3, %xmm2, %xmm4
vpternlogq $0x96, %xmm1, %xmm0, %xmm4
vmovdqu %xmm4, 0x10(%rsi)
vaeskeygenassist $0x2, %xmm4, %xmm0
vpshufd $0xff, %xmm0, %xmm0     # xmm0 = xmm0[3,3,3,3]
vpslldq $0x4, %xmm4, %xmm1      # xmm1 = zero,zero,zero,zero,xmm4[0,1,2,3,4,5,6,7,8,9,10,11]
vpslldq $0x8, %xmm4, %xmm2      # xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,xmm4[0,1,2,3,4,5,6,7]
vpslldq $0xc, %xmm4, %xmm3      # xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm4[0,1,2,3]
vpternlogq $0x96, %xmm2, %xmm1, %xmm3
vpternlogq $0x96, %xmm0, %xmm4, %xmm3
vaeskeygenassist $0x4, %xmm3, %xmm0
vpshufd $0xff, %xmm0, %xmm0     # xmm0 = xmm0[3,3,3,3]
vpslldq $0x4, %xmm3, %xmm1      # xmm1 = zero,zero,zero,zero,xmm3[0,1,2,3,4,5,6,7,8,9,10,11]
vpslldq $0x8, %xmm3, %xmm2      # xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,xmm3[0,1,2,3,4,5,6,7]
vpslldq $0xc, %xmm3, %xmm4      # xmm4 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm3[0,1,2,3]
vpternlogq $0x96, %xmm2, %xmm1, %xmm4
vpternlogq $0x96, %xmm0, %xmm3, %xmm4
vaeskeygenassist $0x8, %xmm4, %xmm0
vmovdqu %xmm3, 0x20(%rsi)
vmovdqu %xmm4, 0x30(%rsi)
vpshufd $0xff, %xmm0, %xmm0     # xmm0 = xmm0[3,3,3,3]
vpslldq $0x4, %xmm4, %xmm1      # xmm1 = zero,zero,zero,zero,xmm4[0,1,2,3,4,5,6,7,8,9,10,11]
vpslldq $0x8, %xmm4, %xmm2      # xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,xmm4[0,1,2,3,4,5,6,7]
vpslldq $0xc, %xmm4, %xmm3      # xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm4[0,1,2,3]
vpternlogq $0x96, %xmm2, %xmm1, %xmm3
vpternlogq $0x96, %xmm0, %xmm4, %xmm3
vmovdqu %xmm3, 0x40(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes128poetv1aes4/ni/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(unsigned char *m,unsigned long long *mlen,
			unsigned char *nsec,
			const unsigned char *c,unsigned long long clen,
			const unsigned char *ad,unsigned long long adlen,
			const unsigned char *npub,
			const unsigned char *k)
{
  struct poet_ctx ctx;
  unsigned char *header =  malloc((size_t) (adlen+CRYPTO_NPUBBYTES));
  unsigned char tag[CRYPTO_NPUBBYTES];
  int result;

  errno = 0;

  if(clen < CRYPTO_NPUBBYTES) return -1;
  *mlen = clen - CRYPTO_NPUBBYTES;

  keysetup(&ctx, k);
  memcpy(tag,c+(clen-CRYPTO_NPUBBYTES), CRYPTO_NPUBBYTES);

  memcpy(header,ad, adlen);
  memcpy(header+adlen, npub, CRYPTO_NPUBBYTES);
  process_header(&ctx, header, adlen+CRYPTO_NPUBBYTES);

  result = decrypt_final(&ctx, c, *mlen, tag,m);

  if (errno|result) return -1;
  else return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %r9, (%rsp)
movq %r8, %rbp
movq %rcx, %r14
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
movq 0x2f0(%rsp), %rax
leaq 0x10(%rax), %r13
movq %r13, %rdi
callq 0x1040
movq %rax, %rbx
callq 0x10f0
movq %rax, %r15
movl $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x10, %rbp
jb 0x17d8
movq 0x300(%rsp), %rsi
leaq -0x10(%rbp), %rax
movq %rax, (%r12)
leaq 0x20(%rsp), %rdi
callq 0x1150
vmovups -0x10(%r14,%rbp), %xmm0
leaq 0x10(%rsp), %rax
vmovaps %xmm0, (%rax)
movq %rbx, %rdi
movq (%rsp), %rsi
movq 0x2f0(%rsp), %rbp
movq %rbp, %rdx
callq 0x1140
movq 0x2f8(%rsp), %rax
vmovups (%rax), %xmm0
vmovups %xmm0, (%rbx,%rbp)
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1110
movq (%r12), %rdx
movq %rbp, %rdi
movq %r14, %rsi
leaq 0x10(%rsp), %rcx
movq 0x8(%rsp), %r8
callq 0x1080
movl %eax, %ecx
xorl %eax, %eax
orl (%r15), %ecx
setne %al
negl %eax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes128poetv1aes4/ni/poet.c
// Function: keysetup
void keysetup(struct poet_ctx *ctx, const uint8_t key[KEYLEN_BITS])
{
  uint8_t ctr[BLOCKLEN];
  AES_KEY aes_key;

  memset(ctx->tau,0,BLOCKLEN);
  memset(ctr,0, BLOCKLEN);

  /* Generate block cipher key */
  AESNI_Key_Expansion(key, aes_key);
  AESNI_encrypt(ctr, ctx->k,aes_key);

  AESNI_Key_Expansion(ctx->k, ctx->aes_enc);
  AES_Key_Dec(ctx->aes_enc, ctx->aes_dec);

  /* Generate header key */
  ctr[BLOCKLEN-1]+=1; AESNI_encrypt(ctr, ctx->l, aes_key);

  /* Generate almost XOR universal hash function keys */
  ctr[BLOCKLEN-1]+=1; AESNI_encrypt(ctr, ctx->lt, aes_key);
  AESNI_Key_Expansion4(ctx->lt, ctx->aes_lt);
  ctr[BLOCKLEN-1]+=1; AESNI_encrypt(ctr, ctx->lb, aes_key);
  AESNI_Key_Expansion4(ctx->lb,ctx->aes_lb);

  /* Generate tag masking keys */
  ctr[BLOCKLEN-1]+=1; AESNI_encrypt(ctr, ctx->tm, aes_key);

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
vxorps %xmm0, %xmm0, %xmm0
vmovaps %xmm0, 0x270(%rdi)
movq %rsp, %r14
vmovaps %xmm0, (%r14)
leaq 0x10(%rsp), %r15
movq %rsi, %rdi
movq %r15, %rsi
callq 0x10a0
leaq 0x200(%rbx), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1120
movq %r12, %rdi
movq %rbx, %rsi
callq 0x10a0
leaq 0xb0(%rbx), %rsi
movq %rbx, %rdi
callq 0x10b0
incb 0xf(%r14)
leaq 0x220(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x1120
incb 0xf(%r14)
leaq 0x230(%rbx), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1120
leaq 0x160(%rbx), %rsi
movq %r12, %rdi
callq 0x1100
incb 0xf(%r14)
leaq 0x240(%rbx), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1120
leaq 0x1b0(%rbx), %rsi
movq %r12, %rdi
callq 0x1100
incb 0xf(%r14)
addq $0x210, %rbx            # imm = 0x210
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1120
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes128poetv1aes4/ni/poet.c
// Function: encrypt_block
void encrypt_block(struct poet_ctx *ctx, const uint8_t plaintext[16],
		   uint8_t ciphertext[16])
{
  block tmp;
  TOP_HASH;
  xor_block(ctx->x, plaintext,ctx->x);

  AESNI_encrypt(ctx->x, tmp, ctx->aes_enc);

  BOTTOM_HASH;
  xor_block(ciphertext, tmp,ctx->y);

  memcpy(ctx->y, tmp, BLOCKLEN);
  ctx->mlen+=BLOCKLEN_BITS;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x250(%rdi), %r15
leaq 0x160(%rdi), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x1030
movl $0x250, %eax            # imm = 0x250
movb -0x250(%r12,%rax), %cl
xorb %cl, (%rbx,%rax)
incq %rax
cmpq $0x260, %rax            # imm = 0x260
jne 0x1ba6
movq %rsp, %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x1120
leaq 0x260(%rbx), %r15
leaq 0x1b0(%rbx), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x1030
xorl %eax, %eax
movb (%r15,%rax), %cl
xorb (%rsp,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x1be5
vmovaps (%rsp), %xmm0
vmovaps %xmm0, (%r15)
subq $-0x80, 0x280(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq