LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Symetric.c
// Function: UpdateSymetricStructure
void UpdateSymetricStructure(Symetric_structure S, SysEqLin E)
{
	if (S!=NULL && S->n_message>1)
	{
		const int NombreDeVariables = E->a/E->gen;
		int i;
		for (i = 0; i < NombreDeVariables; i++)
		{
			printf("\rUpdateSymetricStructure : %d %%",(i*100)/NombreDeVariables);
			fflush(stdout);
			const int v = E->varligne[i];
			const int pos = S->position_by_var[v];
			const int mes = S->message_by_var[v];
			if (mes)
			{
				const int w = S->var_by_message[0][pos];
				if (E->lignevar[w]>=NombreDeVariables)
				{
					int j;
					for (j = 0; j < S->n_message; j++) S->var_by_message[j][pos] = v;
					S->message_by_var[v]=0;
				}
			}
			else
			{
				const int w = S->var_by_message[1][pos];
				if (E->lignevar[w]>=NombreDeVariables)
				{
					int j;
					for (j = 1; j < S->n_message; j++) S->var_by_message[j][pos] = v;
				}
			}
		}
		/*for (i = 0; i < S->n_message; i++)
		{
			int j;
			for (j = 0; j < S->n_var_by_message; j++)
			{
				printf("%03d ",S->var_by_message[i][j]);
			}
			printf("\n");
		}
		getchar();
		printf("\n");*/
		
	}
}

// Assembly:
testq %rdi, %rdi
je 0x1832f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpl $0x2, 0xc(%rdi)
jl 0x18321
movq %rsi, %rbx
movl 0x8(%rsi), %eax
cltd
idivl 0x10(%rsi)
testl %eax, %eax
jle 0x18321
movl %eax, %ebp
movl %eax, %r12d
movq 0x19d57(%rip), %r13     # 0x31fc0
xorl %r15d, %r15d
imull $0x64, %r15d, %eax
xorl %edx, %edx
divl %ebp
leaq 0x14cb6(%rip), %rdi     # 0x2cf31
movl %eax, %esi
xorl %eax, %eax
callq 0x2110
movq (%r13), %rdi
callq 0x21e0
movq 0x20(%rbx), %rax
movl (%rax,%r15,4), %eax
movq 0x18(%r14), %rcx
movslq %eax, %rsi
movslq (%rcx,%rsi,4), %rcx
movq (%r14), %rdx
movq 0x10(%r14), %rdi
cmpl $0x0, (%rdi,%rsi,4)
je 0x182e5
movq (%rdx), %r8
movslq (%r8,%rcx,4), %r8
movq 0x18(%rbx), %r9
cmpl %ebp, (%r9,%r8,4)
jl 0x18315
cmpl $0x0, 0xc(%r14)
jle 0x182dc
xorl %r8d, %r8d
movq (%rdx,%r8,8), %r9
movl %eax, (%r9,%rcx,4)
incq %r8
movslq 0xc(%r14), %r9
cmpq %r9, %r8
jl 0x182c8
movl $0x0, (%rdi,%rsi,4)
jmp 0x18315
movq 0x8(%rdx), %rsi
movslq (%rsi,%rcx,4), %rsi
movq 0x18(%rbx), %rdi
cmpl %ebp, (%rdi,%rsi,4)
jl 0x18315
cmpl $0x2, 0xc(%r14)
jl 0x18315
movl $0x1, %esi
movq (%rdx,%rsi,8), %rdi
movl %eax, (%rdi,%rcx,4)
incq %rsi
movslq 0xc(%r14), %rdi
cmpq %rdi, %rsi
jl 0x18302
incq %r15
cmpq %r12, %r15
jne 0x1826c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Symetric.c
// Function: SymetriseSolver
Solver SymetriseSolver(Solver B, SysEqLin E, Symetric_structure S)
{
	if (B!=NULL)
	{
		int decalage = 1;
		Solver out = copySolver(B);
		do
		{
			Solver tmp = SolverSymetrique(out,decalage,S);
			Solver tmp2 = UnionSolverBorne(out,tmp,E,B->sortie);
			freeSolver(tmp);
			if (tmp2!=NULL && tmp2->Nvar!=out->Nvar)
			{
				freeSolver(out);
				out=tmp2;
				decalage=2*decalage;
			}
			else
			{
				freeSolver(tmp2);
				return out;
			}
		} while (1);
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x183f2
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
callq 0x743b
movq %rax, %rbx
movl $0x1, %ebp
movq %rax, %rdi
movl $0x1, %esi
movq %r12, (%rsp)
movq %r12, %rdx
callq 0x18406
movq %rax, %r12
movl 0x14(%r15), %ecx
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %r14
movq %r13, %rdx
callq 0x7ff0
movq %rax, %r13
movq %r12, %rdi
callq 0x7447
testq %r13, %r13
je 0x183e5
movq %r13, %r12
movl 0x8(%r13), %eax
cmpl 0x8(%rbx), %eax
je 0x183e8
movq %rbx, %rdi
callq 0x7447
addl %ebp, %ebp
movq %r12, %rdi
movl %ebp, %esi
movq (%rsp), %rdx
callq 0x18406
movq %rax, %rbx
movl 0x14(%r15), %ecx
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x7ff0
movq %rax, %r13
movq %rbx, %rdi
callq 0x7447
movq %r12, %rbx
testq %r13, %r13
jne 0x18396
movq %r12, %rbx
xorl %r12d, %r12d
movq %r12, %rdi
callq 0x7447
jmp 0x183f4
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Symetric.c
// Function: SearchUneSolver3_SymetricVersion
Solver SearchUneSolver3_SymetricVersion(const int T, Solver *B1, const int N1, SysEqLin E, Symetric_structure S) 
{
	int i=rand()%N1;
	int N=N1-1;
	Solver B=B1[i]; // On prend une solver au hasard
	B1[i]=B1[N];
	B1[N]=B;
	B=copySolver(B);
	while (B->sortie<T && N>0) // Tant que l'on peux guesser des solvers
	{
		while (B->sortie<T && N>0) // Tant que l'on peux guesser des solvers
		{
			i=rand()%N;
			Solver tmp=B1[i];
			N--;
			B1[i]=B1[N];
			B1[N]=tmp;
			tmp=UnionSolver(B,B1[N],E);
			freeSolver(B);
			B=tmp;
		}
		Solver tmp=PropagateSolver2(B,E,B1,N); // On l'augmente gratuitement
		freeSolver(B);
		B=SymetriseSolver(tmp,E,S);
		if (B==NULL) B=tmp;
		else freeSolver(tmp);
	}
	return B;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movl %edx, %ebp
movq %rsi, %r15
movl %edi, %ebx
callq 0x2290
cltd
idivl %ebp
movslq %edx, %rax
movq (%r15,%rax,8), %rdi
movslq %ebp, %rcx
movq -0x8(%r15,%rcx,8), %rdx
movq %rdx, (%r15,%rax,8)
movq %rdi, -0x8(%r15,%rcx,8)
callq 0x743b
movq %rax, %r13
movl 0x14(%rax), %eax
movl %ebx, 0x4(%rsp)
cmpl %ebx, %eax
setge %cl
cmpl $0x2, %ebp
setl %dl
orb %cl, %dl
jne 0x186bd
decl %ebp
cmpl 0x4(%rsp), %eax
jge 0x18665
leal -0x1(%rbp), %eax
leaq (%r15,%rax,8), %r14
movl %ebp, %r12d
movq %r13, %rbx
callq 0x2290
cltd
idivl %r12d
movslq %edx, %rax
movq (%r15,%rax,8), %rsi
leal -0x1(%r12), %ebp
movq (%r14), %rcx
movq %rcx, (%r15,%rax,8)
movq %rsi, (%r14)
movq %r13, %rdi
movq 0x8(%rsp), %rdx
callq 0x7f14
movq %rax, %r13
movq %rbx, %rdi
callq 0x7447
movl 0x4(%rsp), %eax
cmpl %eax, 0x14(%r13)
jge 0x18665
addq $-0x8, %r14
cmpl $0x1, %r12d
movl %ebp, %r12d
jne 0x18614
movq %r13, %rbx
movq %r13, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x84b9
movq %rax, %r13
movq %rbx, %rdi
callq 0x7447
movq %r13, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %rdx
callq 0x18330
testq %rax, %rax
je 0x186ab
movq %rax, %rbx
movq %r13, %rdi
callq 0x7447
movq %rbx, %r13
movl 0x14(%r13), %eax
cmpl 0x4(%rsp), %eax
jge 0x186bd
testl %ebp, %ebp
jg 0x18604
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rongarret[P]clmm/base64.c
// Function: Base64decode
int Base64decode(char *bufplain, const char *bufcoded)
{
    int nbytesdecoded;
    register const unsigned char *bufin;
    register unsigned char *bufout;
    register int nprbytes;

    bufin = (const unsigned char *) bufcoded;
    while (pr2six[*(bufin++)] <= 63);
    nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;
    nbytesdecoded = ((nprbytes + 3) / 4) * 3;

    bufout = (unsigned char *) bufplain;
    bufin = (const unsigned char *) bufcoded;

    while (nprbytes > 4) {
    *(bufout++) =
        (unsigned char) (pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4);
    *(bufout++) =
        (unsigned char) (pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2);
    *(bufout++) =
        (unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]);
    bufin += 4;
    nprbytes -= 4;
    }

    /* Note: (nprbytes == 1) would be an error, so just ingore that case */
    if (nprbytes > 1) {
    *(bufout++) =
        (unsigned char) (pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4);
    }
    if (nprbytes > 2) {
    *(bufout++) =
        (unsigned char) (pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2);
    }
    if (nprbytes > 3) {
    *(bufout++) =
        (unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]);
    }

    *(bufout++) = '\0';
    nbytesdecoded -= (4 - nprbytes) & 3;
    return nbytesdecoded;
}

// Assembly:
xorl %eax, %eax
leaq 0x2930(%rip), %rdx      # 0x4150
movzbl (%rsi,%rax), %ecx
incq %rax
cmpb $0x40, (%rcx,%rdx)
jb 0x1820
pushq %rbp
movq %rsp, %rbp
leaq -0x1(%rax), %rcx
cmpl $0x4, %ecx
jle 0x18ab
leaq 0x3(%rax), %rcx
movzbl (%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x2, %r8b
movzbl 0x1(%rsi), %r9d
movb (%r9,%rdx), %r9b
shrb $0x4, %r9b
orb %r8b, %r9b
movb %r9b, (%rdi)
movzbl 0x1(%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x4, %r8b
movzbl 0x2(%rsi), %r9d
movb (%r9,%rdx), %r9b
shrb $0x2, %r9b
orb %r8b, %r9b
movb %r9b, 0x1(%rdi)
movzbl 0x2(%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x6, %r8b
movzbl 0x3(%rsi), %r9d
orb (%r9,%rdx), %r8b
movb %r8b, 0x2(%rdi)
addq $0x3, %rdi
addq $0x4, %rsi
addl $-0x4, %ecx
cmpl $0x8, %ecx
ja 0x183e
addl $-0x4, %ecx
cmpl $0x2, %ecx
jl 0x1922
movzbl (%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x2, %r8b
movzbl 0x1(%rsi), %r9d
movb (%r9,%rdx), %r9b
shrb $0x4, %r9b
orb %r8b, %r9b
movb %r9b, (%rdi)
cmpl $0x2, %ecx
jne 0x18d9
incq %rdi
jmp 0x1922
movzbl 0x1(%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x4, %r8b
movzbl 0x2(%rsi), %r9d
movb (%r9,%rdx), %r9b
shrb $0x2, %r9b
orb %r8b, %r9b
movb %r9b, 0x1(%rdi)
cmpl $0x4, %ecx
jne 0x191e
movzbl 0x2(%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x6, %r8b
movzbl 0x3(%rsi), %esi
orb (%rsi,%rdx), %r8b
movb %r8b, 0x2(%rdi)
addq $0x3, %rdi
jmp 0x1922
addq $0x2, %rdi
leal 0x2(%rax), %edx
addl $0x5, %eax
testl %edx, %edx
cmovnsl %edx, %eax
sarl $0x2, %eax
leal (%rax,%rax,2), %eax
movb $0x0, (%rdi)
negl %ecx
andl $0x3, %ecx
subl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rongarret[P]clmm/base64.c
// Function: Base64encode
int Base64encode(char *encoded, const char *string, int len)
{
    int i;
    char *p;

    p = encoded;
    for (i = 0; i < len - 2; i += 3) {
    *p++ = basis_64[(string[i] >> 2) & 0x3F];
    *p++ = basis_64[((string[i] & 0x3) << 4) |
                    ((int) (string[i + 1] & 0xF0) >> 4)];
    *p++ = basis_64[((string[i + 1] & 0xF) << 2) |
                    ((int) (string[i + 2] & 0xC0) >> 6)];
    *p++ = basis_64[string[i + 2] & 0x3F];
    }
    if (i < len) {
    *p++ = basis_64[(string[i] >> 2) & 0x3F];
    if (i == (len - 1)) {
        *p++ = basis_64[((string[i] & 0x3) << 4)];
        *p++ = '=';
    }
    else {
        *p++ = basis_64[((string[i] & 0x3) << 4) |
                        ((int) (string[i + 1] & 0xF0) >> 4)];
        *p++ = basis_64[((string[i + 1] & 0xF) << 2)];
    }
    *p++ = '=';
    }

    *p++ = '\0';
    return p - encoded;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
movq %rdi, %rax
cmpl $0x3, %edx
jl 0x19f9
leal -0x2(%rdx), %r8d
xorl %ecx, %ecx
leaq 0x28cb(%rip), %r9       # 0x4250
movq %rdi, %rax
movzbl (%rsi,%rcx), %r10d
shrl $0x2, %r10d
movb (%r10,%r9), %r10b
movb %r10b, (%rax)
movzbl (%rsi,%rcx), %r10d
shll $0x4, %r10d
andl $0x30, %r10d
movzbl 0x1(%rsi,%rcx), %r11d
shrl $0x4, %r11d
orl %r10d, %r11d
movb (%r11,%r9), %r10b
movb %r10b, 0x1(%rax)
movzbl 0x1(%rsi,%rcx), %r10d
andl $0xf, %r10d
movzbl 0x2(%rsi,%rcx), %r11d
shrl $0x6, %r11d
leal (%r11,%r10,4), %r10d
movb (%r10,%r9), %r10b
movb %r10b, 0x2(%rax)
movzbl 0x2(%rsi,%rcx), %r10d
andl $0x3f, %r10d
movb (%r10,%r9), %r10b
movb %r10b, 0x3(%rax)
addq $0x4, %rax
addq $0x3, %rcx
cmpq %r8, %rcx
jb 0x1988
cmpl %edx, %ecx
jge 0x1a64
movl %ecx, %r9d
movzbl (%rsi,%r9), %r10d
shrl $0x2, %r10d
leaq 0x2840(%rip), %r8       # 0x4250
movb (%r10,%r8), %r10b
movb %r10b, (%rax)
decl %edx
movzbl (%rsi,%r9), %r10d
shll $0x4, %r10d
andl $0x30, %r10d
cmpl %edx, %ecx
jne 0x1a35
movb (%r10,%r8), %cl
movb %cl, 0x1(%rax)
movb $0x3d, %cl
jmp 0x1a59
movzbl 0x1(%rsi,%r9), %ecx
shrl $0x4, %ecx
movzbl %r10b, %edx
orq %rcx, %rdx
movb (%rdx,%r8), %cl
movb %cl, 0x1(%rax)
movzbl 0x1(%rsi,%r9), %ecx
andl $0xf, %ecx
movb (%r8,%rcx,4), %cl
movb %cl, 0x2(%rax)
movb $0x3d, 0x3(%rax)
addq $0x4, %rax
movb $0x0, (%rax)
subl %edi, %eax
incl %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/box.c
// Function: moonglmath_testbox
int testbox(lua_State *L, int arg, box_t b, size_t *dim)
/* Tests if the element at arg is a box and sets b and *dim accordingly
 * (unless they are passed as 0).
 */
    {
    size_t i;
    size_t dim_;
    if(!testmetatable(L, arg, BOX_MT)) return 0;

    lua_getfield(L, arg, "dimensions");   
    dim_ = luaL_checkinteger(L, -1);
    lua_pop(L, 1);
    checkboxdim(L, dim_);

    if(dim != NULL) *dim = dim_;
    if(b != NULL)
        {
        box_clear(b);
        for(i=0; i < 2*dim_; i++)
            {
            lua_geti(L, arg, i+1);
            b[i] = luaL_checknumber(L, -1);
            lua_pop(L, 1);
            }
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xe107(%rip), %rdx      # 0x17000
callq 0x8170
testl %eax, %eax
je 0x8fbb
leaq 0xe10e(%rip), %rdx      # 0x1701b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8da0
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x86e0
movq %rax, %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movq %r15, %rax
andq $-0x2, %rax
cmpq $0x2, %rax
jne 0x8fd0
testq %r12, %r12
je 0x8f4e
movq %r15, (%r12)
movl $0x1, %r12d
testq %r14, %r14
je 0x8fbe
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
addq %r15, %r15
negq %r15
movl $0x1, %r13d
movq %rbx, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x8d30
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8320
movsd %xmm0, -0x8(%r14,%r13,8)
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
leaq (%r15,%r13), %rax
incq %rax
incq %r13
cmpq $0x1, %rax
jne 0x8f7b
jmp 0x8fbe
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe038(%rip), %rsi      # 0x1700f
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8a80
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/box.c
// Function: moonglmath_pushbox
int pushbox(lua_State *L, box_t b, size_t dim)
/* dim = 2 or 3
 */
    {
    size_t i;
    checkboxdim(L, dim);
    lua_newtable(L);
    setmetatable(L, BOX_MT);
    for(i=0; i<2*dim; i++)
        {
        lua_pushnumber(L, b[i]);
        lua_seti(L, -2, i+1);
        }
    lua_pushinteger(L, dim);
    lua_setfield(L, -2, "dimensions");
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq %rdx, %rax
andq $-0x2, %rax
cmpq $0x2, %rax
jne 0x90e2
movq %rdx, %r14
movq %rsi, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x82f0
leaq 0xdf90(%rip), %rsi      # 0x17000
movq %rbx, %rdi
callq 0x8950
leaq (%r14,%r14), %r13
negq %r13
movl $0x1, %r12d
movsd -0x8(%r15,%r12,8), %xmm0
movq %rbx, %rdi
callq 0x87d0
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x8640
leaq (%r12,%r13), %rax
incq %rax
incq %r12
cmpq $0x1, %rax
jne 0x9085
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8500
leaq 0xdf55(%rip), %rdx      # 0x1701b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x84b0
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xdf26(%rip), %rsi      # 0x1700f
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x8a80
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/box.c
// Function: Concat
static int Concat(lua_State *L)
    {
    box_t b;
    size_t dim;
    if(testbox(L, 1, b, &dim))
        {
        ToString_(L, b, dim);
        lua_pushvalue(L, 2);
        }
    else if(testbox(L, 2, b, &dim))
        {
        lua_pushvalue(L, 1);
        ToString_(L, b, dim);
        }
    else 
        return unexpected(L);
    lua_concat(L, 2);
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movl $0x1, %esi
callq 0x8b20
testl %eax, %eax
je 0x91c2
movq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x9233
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8600
jmp 0x91fc
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8b20
testl %eax, %eax
je 0x9214
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8600
movq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x9233
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8bc0
movl $0x1, %eax
addq $0x50, %rsp
popq %rbx
retq
leaq 0xde59(%rip), %rsi      # 0x17074
leaq 0xde6c(%rip), %rdx      # 0x1708e
movq %rbx, %rdi
movl $0xb9, %ecx
xorl %eax, %eax
callq 0x8a80
jmp 0x920e
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/box.c
// Function: ToString_
static int ToString_(lua_State *L, box_t b, size_t dim)
/* 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(dim)
        {
        case 2: p = snprintf(str, space, "[ "FMT", "FMT", "FMT", "FMT" ]", 
                                                b[0], b[1], b[2], b[3]); break;
        case 3: p = snprintf(str, space, "[ "FMT", "FMT", "FMT", "FMT", "FMT", "FMT" ]", 
                                                b[0], b[1], b[2], b[3], b[4], b[5]); 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 $0x3, %rdx
je 0x9279
cmpq $0x2, %rdx
jne 0x92ea
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
movsd 0x18(%rsi), %xmm3
leaq 0xddde(%rip), %rdx      # 0x17046
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x4, %al
callq 0x83f0
jmp 0x92ac
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
movsd 0x18(%rsi), %xmm3
movsd 0x20(%rsi), %xmm4
movsd 0x28(%rsi), %xmm5
leaq 0xddbc(%rip), %rdx      # 0x17059
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x6, %al
callq 0x83f0
cmpl $0x201, %eax            # imm = 0x201
jl 0x92ce
movq %rsp, %rsi
movb $0x0, 0x1ff(%rsi)
movl $0x2e2e2e20, 0x1fb(%rsi) # imm = 0x2E2E2E20
movl $0x1ff, %edx            # imm = 0x1FF
jmp 0x92d4
movslq %eax, %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8960
movl $0x1, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
retq
leaq 0xdd83(%rip), %rsi      # 0x17074
leaq 0xdd96(%rip), %rdx      # 0x1708e
movq %rbx, %rdi
movl $0x91, %ecx
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
jmp 0x8a80
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/box.c
// Function: Box
static int Box(lua_State *L, size_t dim)
/* creates a box of dimensions 'dim', from a box or a list of values 
 * the size is adapted by discarding exceeding values or adding zeros
 * in lieu of missing values.
 * boxN(b)
 * boxN([x1 ,[x2,...[,x2N]]])
 */
    {
    box_t b;
    size_t bdim, i, arg;
    arg = 1;
    if(testbox(L, arg, b, &bdim))
        return pushbox(L, b, bdim);
    checkboxdim(L, dim);
    for(i = 0; i < 2*dim; i++)
        b[i] = luaL_optnumber(L, arg++, 0);
    return pushbox(L, b, dim);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movl $0x1, %esi
callq 0x8b20
testl %eax, %eax
je 0x9373
movq 0x8(%rsp), %rbx
jmp 0x93a8
testq %rbx, %rbx
je 0x93a8
leaq (%rbx,%rbx), %r12
cmpq $0x1, %r12
adcq $0x0, %r12
xorl %r13d, %r13d
leaq 0x1(%r13), %r15
xorps %xmm0, %xmm0
movq %r14, %rdi
movl %r15d, %esi
callq 0x8340
movsd %xmm0, 0x10(%rsp,%r13,8)
movq %r15, %r13
cmpq %r15, %r12
jne 0x9387
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8d20
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/complex.c
// Function: moonglmath_testcomplex
int testcomplex(lua_State *L, int arg, complex_t *z)
/* Tests if the element at arg is a complex number and sets z accordingly
 * (unless it is passed as 0).
 * Accepts also a real number x, in which case z = x+I*0;
 */
    {
    double x, y;
    if(lua_isnumber(L, arg))
        {
        if(z != NULL)
            *z = lua_tonumber(L, arg);
        return 1;
        }

    if(!testmetatable(L, arg, COMPLEX_MT)) return 0;

    if(z != NULL)
        {
        lua_geti(L, arg, 1);
        x = luaL_checknumber(L, -1);
        lua_pop(L, 1);
        lua_geti(L, arg, 2);
        y = luaL_checknumber(L, -1);
        lua_pop(L, 1);
        *z = x + I*y;
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x8560
testl %eax, %eax
je 0x9443
testq %rbx, %rbx
je 0x94da
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x8630
xorpd %xmm1, %xmm1
jmp 0x94d1
leaq 0xdc96(%rip), %rdx      # 0x170e0
movq %r14, %rdi
movl %ebp, %esi
callq 0x8170
testl %eax, %eax
je 0x94e8
testq %rbx, %rbx
je 0x94da
movl $0x1, %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x8d30
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8320
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movl $0x2, %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x8d30
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8320
movsd %xmm0, (%rsp)
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movsd (%rsp), %xmm1
xorpd %xmm0, %xmm0
mulsd %xmm1, %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rbx)
movsd %xmm1, 0x8(%rbx)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
jmp 0x94df
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/complex.c
// Function: Concat
static int Concat(lua_State *L)
    {
    complex_t z;
    if(testcomplex(L, 1, &z))
        {
        ToString_(L, z);
        lua_pushvalue(L, 2);
        }
    else if(testcomplex(L, 2, &z))
        {
        lua_pushvalue(L, 1);
        ToString_(L, z);
        }
    else 
        return unexpected(L);
    lua_concat(L, 2);
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rdx
movl $0x1, %esi
callq 0x8b30
testl %eax, %eax
je 0x9828
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %rbx, %rdi
callq 0x9b04
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8600
jmp 0x985c
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8b30
testl %eax, %eax
je 0x9874
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8600
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %rbx, %rdi
callq 0x9b04
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8bc0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0xd7f9(%rip), %rsi      # 0x17074
leaq 0xd8a2(%rip), %rdx      # 0x17124
movq %rbx, %rdi
movl $0xb8, %ecx
xorl %eax, %eax
callq 0x8a80
jmp 0x986e
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/complex.c
// Function: Complex
static int Complex(lua_State *L)
/* creates a complex number from another on or from its real and imag parts
 * complex()      --> 0+0i
 * complex(x, y)  --> x+yi
 * complex(z)     --> z
 * complex({x1, y1, x2, y2, ...}) --> {z1, z2, ...}
 */
    {
    complex_t z;
    double x, y;
    int t = lua_type(L, 1);

    if((t == LUA_TNONE)||(t == LUA_TNIL)||(t == LUA_TNUMBER))
        {
        x = luaL_optnumber(L, 1, 0);
        y = luaL_optnumber(L, 2, 0);
        z = x + I*y;
        }
    else if(t == LUA_TTABLE && !testmetatable(L, 1, COMPLEX_MT))
        return ComplexArray(L);
    else
        checkcomplex(L, 1, &z);
    return pushcomplex(L, z);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8c40
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0xa03f
cmpl $0x5, %eax
je 0xa085
cmpl $0x3, %eax
jne 0xa09d
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8340
movsd %xmm0, (%rsp)
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8340
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
mulsd %xmm1, %xmm0
addsd (%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x18(%rsp)
jmp 0xa0bd
leaq 0xd054(%rip), %rdx      # 0x170e0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xa0d7
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x8820
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
movq %rbx, %rdi
callq 0x8770
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8c60
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x82f0
movq %rbx, %rdi
callq 0x8060
testl %r14d, %r14d
jle 0xa0c5
movl %eax, %ebp
movl $0x1, %r15d
xorl %r12d, %r12d
leaq 0x1(%r12), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8380
xorps %xmm0, %xmm0
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8340
movsd %xmm0, (%rsp)
addq $0x2, %r12
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x8380
xorps %xmm0, %xmm0
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8340
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x80c0
movsd 0x8(%rsp), %xmm1
movapd %xmm1, %xmm0
mulsd 0xcf4d(%rip), %xmm0     # 0x170c8
addsd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x8770
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x8710
incq %r15
cmpl %r14d, %r12d
jl 0xa10b
jmp 0xa0c5
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/datahandling.c
// Function: moonglmath_toflattable
int toflattable(lua_State *L, int arg)
/* Creates a flat table with all the arguments starting from arg, and leaves 
 * it on top of the stack.
 */
    {
    int table_index, last_arg, i, n;
    if(lua_type(L, arg) == LUA_TTABLE)
        {
        lua_newtable(L);
        n = Flatten1_(L, lua_gettop(L), 0, arg);
        }
    else
        {
        /* create a table with all the arguments, and flatten it */
        last_arg = lua_gettop(L);
        lua_newtable(L);
        table_index = lua_gettop(L);
        for(i=arg; i <= last_arg; i++)
            {
            lua_pushvalue(L, i);
            lua_rawseti(L, table_index, i-arg+1);
            }
        lua_newtable(L);
        n = Flatten1_(L, lua_gettop(L), 0, table_index);
        }
    return n;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x8c40
cmpl $0x5, %eax
je 0xa24e
movq %r14, %rdi
callq 0x8060
movl %eax, %ebp
xorl %r13d, %r13d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x82f0
movq %r14, %rdi
callq 0x8060
movl %eax, %r15d
cmpl %ebx, %ebp
jl 0xa24b
notl %ebp
addl %ebx, %ebp
leal (%rbx,%r13), %esi
movq %r14, %rdi
callq 0x8600
incl %r13d
movslq %r13d, %r12
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x8710
addl %ebp, %r12d
jne 0xa226
movl %r15d, %ebx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x82f0
movq %r14, %rdi
callq 0x8060
movq %r14, %rdi
movl %eax, %esi
xorl %edx, %edx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa27b
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/datahandling.c
// Function: Flatten1_
static int Flatten1_(lua_State *L, int table_index, int cur_index, int arg)
    {
    int len, i, top, m, n=0;

    if(lua_type(L, arg) != LUA_TTABLE)
        return luaL_error(L, "table expected");

    lua_len(L, arg);
    len = lua_tointeger(L, -1);
    lua_pop(L, 1);

    if(len==0) return n;

    for(i=1; i<=len; i++)
        {
        lua_geti(L, arg, i);
        top = lua_gettop(L);
        if(lua_type(L, top) == LUA_TTABLE)
            {
            m = Flatten1_(L, table_index, cur_index, top);
            n += m;
            cur_index += m;
            lua_remove(L, top);
            }
        else
            {
            n++;
            cur_index++;
            lua_rawseti(L, table_index, cur_index);
            }
        }
    return n;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, 0x4(%rsp)
movq %rdi, %rbx
movl %ecx, %esi
callq 0x8c40
cmpl $0x5, %eax
jne 0xa397
movq %rbx, %rdi
movl %ebp, %esi
callq 0x87e0
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x8270
movq %rax, %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movq %r15, 0x8(%rsp)
testl %r15d, %r15d
jle 0xa385
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
movl $0x1, %r15d
movl %ebp, 0x14(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x8d30
movq %rbx, %rdi
callq 0x8060
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x8c40
cmpl $0x5, %eax
jne 0xa353
movq %rbx, %rdi
movl 0x4(%rsp), %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0xa27b
movl %eax, %r13d
addl %eax, %r14d
movq %rbx, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x8940
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
jmp 0xa370
movl %r14d, %eax
incl %eax
movl %eax, %r14d
movslq %eax, %rdx
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x8710
movl $0x1, %r13d
addl %r13d, %r12d
incq %r15
cmpq %r15, 0x8(%rsp)
movl 0x14(%rsp), %ebp
jne 0xa2f8
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcf11(%rip), %rsi      # 0x172af
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8a80
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/datahandling.c
// Function: moonglmath_testdata
int testdata(lua_State *L, int type, size_t n, void *dst, size_t dstsize)
/* expects, on top of the stack, a flat table containing n elements of the given type
 * dst must point to at least n * sizeoftype(type) bytes of memory, where
 * the data will be packed according to the given type
 */
    {
    int err = 0;
    switch(type)
        {
#define P(T) do { err = Pack##T(L, n, dst, dstsize, NULL); } while(0)
        case MOONGLMATH_TYPE_CHAR:   P(int8_t); break;
        case MOONGLMATH_TYPE_UCHAR:  P(uint8_t); break;
        case MOONGLMATH_TYPE_SHORT:  P(int16_t); break;
        case MOONGLMATH_TYPE_USHORT: P(uint16_t); break;
        case MOONGLMATH_TYPE_INT:    P(int32_t); break;
        case MOONGLMATH_TYPE_UINT:   P(uint32_t); break;
        case MOONGLMATH_TYPE_LONG:   P(int64_t); break;
        case MOONGLMATH_TYPE_ULONG:  P(uint64_t); break;
        case MOONGLMATH_TYPE_FLOAT:  P(float); break;
        case MOONGLMATH_TYPE_DOUBLE: P(double); break;
        default:
            return unexpected(L);
#undef P
        }
    return err;
    }

// Assembly:
decl %esi
cmpl $0x9, %esi
ja 0xa44f
leaq 0xce10(%rip), %rax      # 0x171d8
movslq (%rax,%rsi,4), %rsi
addq %rax, %rsi
jmpq *%rsi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa477
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa6d1
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa9e3
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa59f
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa638
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa8a5
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa50b
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa76d
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa809
leaq 0xcc1e(%rip), %rsi      # 0x17074
leaq 0xce43(%rip), %rdx      # 0x172a0
movl $0x130, %ecx            # imm = 0x130
xorl %eax, %eax
jmp 0x8a80
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa941
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/datahandling.c
// Function: Packfloat
PACK_NUMBERS(float)
PACK_NUMBERS(double)
PACK_INTEGERS(int8_t)
PACK_INTEGERS(uint8_t)
PACK_INTEGERS(int16_t)
PACK_INTEGERS(uint16_t)
PACK_INTEGERS(int32_t)
PACK_INTEGERS(uint32_t)
PACK_INTEGERS(int64_t)
PACK_INTEGERS(uint64_t)

static int Pack(lua_State *L)
    {
    int err = 0;
    void *dst = NULL;
    size_t dstsize = 0;
    int type = checktype(L, 1);
    size_t n = toflattable(L, 2);
    switch(type)
        {
#define P(T) do { dstsize = n * sizeof(T);      \
                  dst = Malloc(L, dstsize);     \
                  err = Pack##T(L, n, dst, dstsize, NULL); } while(0)

        case MOONGLMATH_TYPE_CHAR:   P(int8_t); break;
        case MOONGLMATH_TYPE_UCHAR:  P(uint8_t); break;
        case MOONGLMATH_TYPE_SHORT:  P(int16_t); break;
        case MOONGLMATH_TYPE_USHORT: P(uint16_t); break;
        case MOONGLMATH_TYPE_INT:    P(int32_t); break;
        case MOONGLMATH_TYPE_UINT:   P(uint32_t); break;
        case MOONGLMATH_TYPE_LONG:   P(int64_t); break;
        case MOONGLMATH_TYPE_ULONG:  P(uint64_t); break;
        case MOONGLMATH_TYPE_FLOAT:  P(float); break;
        case MOONGLMATH_TYPE_DOUBLE: P(double); break;
        default:
            return unexpected(L);
#undef P
        }
    if(err)
        {
        Free(L, dst);
        return luaL_argerror(L, 2, errstring(err));
        }
    lua_pushlstring(L, (char*)dst, dstsize);
    Free(L, dst);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq (,%rsi,4), %rax
movl $0xfffffff8, %ebx       # imm = 0xFFFFFFF8
cmpq %rcx, %rax
ja 0xa9d2
movq %rsi, %r15
xorl %ebx, %ebx
testq %rsi, %rsi
je 0xa9d2
movq %rdx, %r14
movq %rdi, %r12
negq %r15
movl $0x1, %r13d
leaq 0x4(%rsp), %rbp
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r13, %rdx
callq 0x8380
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbp, %rdx
callq 0x8630
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%r14,%r13,4)
cmpl $0x0, 0x4(%rsp)
je 0xa9cd
movq %r12, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
leaq (%r15,%r13), %rax
incq %rax
incq %r13
cmpq $0x1, %rax
jne 0xa97c
jmp 0xa9d2
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/datahandling.c
// Function: Flatten
static int Flatten(lua_State *L)
    {
    int n, i, table_index;
    n = toflattable(L, 1);
    table_index = lua_gettop(L);
    luaL_checkstack(L, n, "too many elements, cannot grow Lua stack");
    for(i = 0; i < n; i++)
        lua_rawgeti(L, table_index, i+1);
    return n;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8490
movl %eax, %ebp
movq %rbx, %rdi
callq 0x8060
movl %eax, %r14d
leaq 0xc394(%rip), %rdx      # 0x172e2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8850
testl %ebp, %ebp
jle 0xaf86
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x8380
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0xaf68
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/enums.c
// Function: moonglmath_open_enums
void moonglmath_open_enums(lua_State *L)
    {
    uint32_t domain;

    luaL_setfuncs(L, Functions, 0);

    /* Add all the code<->string mappings */
#define ADD(what, s) do { enums_new(L, domain, MOONGLMATH_##what, s); } while(0)
    domain = DOMAIN_ISROW; 
    ADD(COLUMN, "column");
    ADD(ROW, "row");

    domain = DOMAIN_TYPE; 
    ADD(TYPE_CHAR, "char");
    ADD(TYPE_UCHAR, "uchar");
    ADD(TYPE_SHORT, "short");
    ADD(TYPE_USHORT, "ushort");
    ADD(TYPE_INT, "int");
    ADD(TYPE_UINT, "uint");
    ADD(TYPE_LONG, "long");
    ADD(TYPE_ULONG, "ulong");
    ADD(TYPE_FLOAT, "float");
    ADD(TYPE_DOUBLE, "double");
#undef ADD
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x12598(%rip), %rsi     # 0x1e420
xorl %edx, %edx
callq 0x81a0
leaq 0xb490(%rip), %rcx      # 0x17326
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xbfb0
leaq 0xb4b0(%rip), %rcx      # 0x17359
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xbfb0
leaq 0xb46f(%rip), %rcx      # 0x1732e
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0xbfb0
leaq 0xb455(%rip), %rcx      # 0x1732d
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0xbfb0
leaq 0xb443(%rip), %rcx      # 0x17334
movq %rbx, %rdi
movl $0x1, %esi
movl $0x3, %edx
callq 0xbfb0
leaq 0xb429(%rip), %rcx      # 0x17333
movq %rbx, %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0xbfb0
leaq 0xb418(%rip), %rcx      # 0x1733b
movq %rbx, %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0xbfb0
leaq 0xb3fe(%rip), %rcx      # 0x1733a
movq %rbx, %rdi
movl $0x1, %esi
movl $0x6, %edx
callq 0xbfb0
leaq 0xb3eb(%rip), %rcx      # 0x17340
movq %rbx, %rdi
movl $0x1, %esi
movl $0x7, %edx
callq 0xbfb0
leaq 0xb3d1(%rip), %rcx      # 0x1733f
movq %rbx, %rdi
movl $0x1, %esi
movl $0x8, %edx
callq 0xbfb0
leaq 0xb3be(%rip), %rcx      # 0x17345
movq %rbx, %rdi
movl $0x1, %esi
movl $0x9, %edx
callq 0xbfb0
leaq 0xb3ab(%rip), %rcx      # 0x1734b
movq %rbx, %rdi
movl $0x1, %esi
movl $0xa, %edx
popq %rbx
jmp 0xbfb0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/funcs.c
// Function: Inv
static int Inv(lua_State *L)
    {
    if(ismat(L,1)) return mat_Inv(L);
    if(isquat(L,1)) return quat_Inv(L);
    if(iscomplex(L,1)) return complex_Inv(L);
    return badarg(L, 1);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xad3a(%rip), %rdx      # 0x17395
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc672
movq %rbx, %rdi
popq %rbx
jmp 0x8a00
leaq 0xad41(%rip), %rdx      # 0x173ba
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc693
movq %rbx, %rdi
popq %rbx
jmp 0x8480
leaq 0xaa46(%rip), %rdx      # 0x170e0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc6b4
movq %rbx, %rdi
popq %rbx
jmp 0x87b0
leaq 0xace9(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/funcs.c
// Function: Norm
static int Norm(lua_State *L)
    {
    if(isvec(L,1)) return vec_Norm(L);
    if(isquat(L,1)) return quat_Norm(L);
    if(iscomplex(L,1)) return complex_Norm(L);
    return badarg(L, 1);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xacf6(%rip), %rdx      # 0x173ca
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc6eb
movq %rbx, %rdi
popq %rbx
jmp 0x8300
leaq 0xacc8(%rip), %rdx      # 0x173ba
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc70c
movq %rbx, %rdi
popq %rbx
jmp 0x8d60
leaq 0xa9cd(%rip), %rdx      # 0x170e0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc72d
movq %rbx, %rdi
popq %rbx
jmp 0x8cb0
leaq 0xac70(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/funcs.c
// Function: Norm2
static int Norm2(lua_State *L)
    {
    if(isvec(L,1)) return vec_Norm2(L);
    if(isquat(L,1)) return quat_Norm2(L);
    if(iscomplex(L,1)) return complex_Norm2(L);
    return badarg(L, 1);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xac7d(%rip), %rdx      # 0x173ca
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc764
movq %rbx, %rdi
popq %rbx
jmp 0x8b70
leaq 0xac4f(%rip), %rdx      # 0x173ba
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc785
movq %rbx, %rdi
popq %rbx
jmp 0x86b0
leaq 0xa954(%rip), %rdx      # 0x170e0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc7a6
movq %rbx, %rdi
popq %rbx
jmp 0x8260
leaq 0xabf7(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/funcs.c
// Function: Normalize
static int Normalize(lua_State *L)
    {
    if(isvec(L,1)) return vec_Normalize(L);
    if(isquat(L,1)) return quat_Normalize(L);
    if(iscomplex(L,1)) return complex_Normalize(L);
    return badarg(L, 1);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xab54(%rip), %rdx      # 0x173ca
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc88d
movq %rbx, %rdi
popq %rbx
jmp 0x8dc0
leaq 0xab26(%rip), %rdx      # 0x173ba
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc8ae
movq %rbx, %rdi
popq %rbx
jmp 0x8bd0
leaq 0xa82b(%rip), %rdx      # 0x170e0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc8cf
movq %rbx, %rdi
popq %rbx
jmp 0x8200
leaq 0xaace(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/funcs.c
// Function: Clamp
static int Clamp(lua_State *L)
    {
    if(lua_isnumber(L,1)) return num_Clamp(L);
    if(isvec(L,1)) return vec_Clamp(L);
    if(ismat(L,1)) return mat_Clamp(L);
    return badarg(L, 1);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8560
testl %eax, %eax
je 0xc9fc
movq %rbx, %rdi
popq %rbx
jmp 0x8a90
leaq 0xa9c7(%rip), %rdx      # 0x173ca
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xca1d
movq %rbx, %rdi
popq %rbx
jmp 0x8ad0
leaq 0xa971(%rip), %rdx      # 0x17395
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xca3e
movq %rbx, %rdi
popq %rbx
jmp 0x8af0
leaq 0xa95f(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/funcs.c
// Function: Mix
static int Mix(lua_State *L)
    {
    if(lua_isnumber(L,1)) return num_Mix(L);
    if(isvec(L,1)) return vec_Mix(L);
    if(ismat(L,1)) return mat_Mix(L);
    if(isquat(L,1)) return quat_Mix(L);
    return badarg(L, 1);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8560
testl %eax, %eax
je 0xca6e
movq %rbx, %rdi
popq %rbx
jmp 0x8110
leaq 0xa955(%rip), %rdx      # 0x173ca
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xca8f
movq %rbx, %rdi
popq %rbx
jmp 0x8910
leaq 0xa8ff(%rip), %rdx      # 0x17395
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xcab0
movq %rbx, %rdi
popq %rbx
jmp 0x8100
leaq 0xa903(%rip), %rdx      # 0x173ba
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xcad1
movq %rbx, %rdi
popq %rbx
jmp 0x80b0
leaq 0xa8cc(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/funcs.c
// Function: Step
static int Step(lua_State *L)
    {
    if(lua_isnumber(L,1)) return num_Step(L);
    if(isvec(L,1)) return vec_Step(L);
    if(ismat(L,1)) return mat_Step(L);
    return badarg(L, 1);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8560
testl %eax, %eax
je 0xcb38
movq %rbx, %rdi
popq %rbx
jmp 0x89b0
leaq 0xa88b(%rip), %rdx      # 0x173ca
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xcb59
movq %rbx, %rdi
popq %rbx
jmp 0x83a0
leaq 0xa835(%rip), %rdx      # 0x17395
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xcb7a
movq %rbx, %rdi
popq %rbx
jmp 0x8d80
leaq 0xa823(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/funcs.c
// Function: Smoothstep
static int Smoothstep(lua_State *L)
    {
    if(lua_isnumber(L,1)) return num_Smoothstep(L);
    if(isvec(L,1)) return vec_Smoothstep(L);
    if(ismat(L,1)) return mat_Smoothstep(L);
    return badarg(L, 1);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8560
testl %eax, %eax
je 0xcbaa
movq %rbx, %rdi
popq %rbx
jmp 0x84e0
leaq 0xa819(%rip), %rdx      # 0x173ca
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xcbcb
movq %rbx, %rdi
popq %rbx
jmp 0x89d0
leaq 0xa7c3(%rip), %rdx      # 0x17395
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xcbec
movq %rbx, %rdi
popq %rbx
jmp 0x8830
leaq 0xa7b1(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/funcs.c
// Function: Fade
static int Fade(lua_State *L)
    {
    if(lua_isnumber(L,1)) return num_Fade(L);
    if(isvec(L,1)) return vec_Fade(L);
    if(ismat(L,1)) return mat_Fade(L);
    return badarg(L, 1);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8560
testl %eax, %eax
je 0xcc1c
movq %rbx, %rdi
popq %rbx
jmp 0x8d70
leaq 0xa7a7(%rip), %rdx      # 0x173ca
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xcc3d
movq %rbx, %rdi
popq %rbx
jmp 0x8890
leaq 0xa751(%rip), %rdx      # 0x17395
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xcc5e
movq %rbx, %rdi
popq %rbx
jmp 0x8360
leaq 0xa73f(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/hostmem.c
// Function: Write
static int Write(lua_State *L)
    {
    int t = lua_type(L, 3);
    if(t == LUA_TSTRING) return WritePack(L);
    if(t == LUA_TNIL) return WriteData(L);
    return luaL_argerror(L, 3, errstring(ERR_TYPE));    
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x3, %esi
callq 0x8c40
testl %eax, %eax
je 0xcdbe
cmpl $0x4, %eax
jne 0xce3e
leaq 0xa679(%rip), %rcx      # 0x173d9
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x80e0
movq %rax, %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0x86e0
movq %rax, %r12
movq %rbx, %rdi
movl $0x1, %esi
movl $0x3, %edx
callq 0x8050
movq 0x8(%r15), %r8
subq %r12, %r8
jbe 0xce65
addq (%r15), %r12
movq %rbx, %rdi
movl $0x4, %esi
movl %eax, %edx
movq %r12, %rcx
callq 0x81c0
jmp 0xce97
leaq 0xa614(%rip), %rcx      # 0x173d9
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x80e0
movq %rax, %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0x86e0
movq %rax, %r12
leaq 0x8(%rsp), %r13
movq %rbx, %rdi
movl $0x4, %esi
movq %r13, %rdx
callq 0x85c0
movq (%r13), %rdx
testq %rdx, %rdx
je 0xce97
movq 0x8(%r15), %rcx
subq %r12, %rcx
seta %sil
cmpq %rcx, %rdx
setbe %cl
testb %cl, %sil
jne 0xce89
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
callq 0x8510
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x8a80
movl %eax, %r14d
jmp 0xce97
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
callq 0x8510
movq %rbx, %rdi
movl $0x3, %esi
movq %rax, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x81b0
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
callq 0x8510
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x8a80
addq (%r15), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x8760
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq