LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x180f7
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpl $0x2, 0xc(%rdi)
jl 0x180e9
movq %rsi, %rbx
movl 0x8(%rsi), %eax
cltd
idivl 0x10(%rsi)
testl %eax, %eax
jle 0x180e9
movl %eax, %ebp
movl %eax, %r12d
movq 0x19f8f(%rip), %r13     # 0x31fc0
xorl %r15d, %r15d
imull $0x64, %r15d, %eax
xorl %edx, %edx
divl %ebp
leaq 0x14e8e(%rip), %rdi     # 0x2ced1
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 0x180ad
movq (%rdx), %r8
movslq (%r8,%rcx,4), %r8
movq 0x18(%rbx), %r9
cmpl %ebp, (%r9,%r8,4)
jl 0x180dd
cmpl $0x0, 0xc(%r14)
jle 0x180a4
xorl %r8d, %r8d
movq (%rdx,%r8,8), %r9
movl %eax, (%r9,%rcx,4)
incq %r8
movslq 0xc(%r14), %r9
cmpq %r9, %r8
jl 0x18090
movl $0x0, (%rdi,%rsi,4)
jmp 0x180dd
movq 0x8(%rdx), %rsi
movslq (%rsi,%rcx,4), %rsi
movq 0x18(%rbx), %rdi
cmpl %ebp, (%rdi,%rsi,4)
jl 0x180dd
cmpl $0x2, 0xc(%r14)
jl 0x180dd
movl $0x1, %esi
movq (%rdx,%rsi,8), %rdi
movl %eax, (%rdi,%rcx,4)
incq %rsi
movslq 0xc(%r14), %rdi
cmpq %rdi, %rsi
jl 0x180ca
incq %r15
cmpq %r12, %r15
jne 0x18034
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
testq %rdi, %rdi
je 0x18188
movq %rsi, %r14
movq %rdi, %r15
callq 0x7054
movq %rax, %r13
movl $0x1, %ebp
movq %r13, %rdi
movl %ebp, %esi
movq 0x10(%rsp), %rdx
callq 0x181a5
movq %rax, %rbx
movl 0x14(%r15), %ecx
movq %r13, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x7cbb
movq %rax, %r12
movq %rbx, %rdi
callq 0x7060
testq %r12, %r12
je 0x18162
movl 0x8(%r12), %eax
cmpl 0x8(%r13), %eax
jne 0x18173
movq %r12, %rdi
callq 0x7060
xorl %eax, %eax
movq %r13, 0x8(%rsp)
jmp 0x18182
movq %r13, %rdi
callq 0x7060
addl %ebp, %ebp
movb $0x1, %al
movq %r12, %r13
testb %al, %al
jne 0x18123
jmp 0x18191
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, %ebx
movq %rsi, %r15
movl %edi, %ebp
callq 0x2290
cltd
idivl %ebx
movslq %edx, %rax
movq (%r15,%rax,8), %rdi
movslq %ebx, %rcx
movq -0x8(%r15,%rcx,8), %rdx
movq %rdx, (%r15,%rax,8)
movq %rdi, -0x8(%r15,%rcx,8)
callq 0x7054
movq %rax, %r13
cmpl %ebp, 0x14(%rax)
setge %al
cmpl $0x2, %ebx
setl %cl
orb %al, %cl
jne 0x1845e
decl %ebx
cmpl %ebp, 0x14(%r13)
jge 0x1840a
leal -0x1(%rbx), %eax
leaq (%r15,%rax,8), %r14
movl %ebx, %r12d
movq %r13, %rbx
callq 0x2290
cltd
idivl %r12d
movslq %edx, %rax
movq (%r15,%rax,8), %rsi
movq (%r14), %rcx
movq %rcx, (%r15,%rax,8)
movq %rsi, (%r14)
movq %r13, %rdi
movq 0x8(%rsp), %rdx
callq 0x7be3
movq %rax, %r13
movq %rbx, %rdi
callq 0x7060
leal -0x1(%r12), %ebx
cmpl %ebp, 0x14(%r13)
jge 0x1840a
addq $-0x8, %r14
cmpl $0x1, %r12d
movl %ebx, %r12d
jg 0x183bd
movq %r13, %r14
movq %r13, %rdi
movq 0x8(%rsp), %r12
movq %r12, %rsi
movq %r15, %rdx
movl %ebx, %ecx
callq 0x817d
movq %rax, %r13
movq %r14, %rdi
callq 0x7060
movq %r13, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x180f8
testq %rax, %rax
je 0x18450
movq %rax, %r14
movq %r13, %rdi
callq 0x7060
movq %r14, %r13
cmpl %ebp, 0x14(%r13)
jge 0x1845e
testl %ebx, %ebx
jg 0x183ad
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_O1/rongarret[P]clmm/utils.c
// Function: randombytes
void randombytes(u8 *buf, u64 cnt) {
  int devrandom = open("/dev/random", O_RDONLY);
  if (devrandom < 0) die("Failed to open /dev/random");
  int n = read(devrandom, buf, cnt);
  if (n != cnt) die("Failed to read enough random bytes from /dev/random");
  close(devrandom);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x2bb5(%rip), %rdi      # 0x4103
xorl %esi, %esi
xorl %eax, %eax
callq 0x1130
testl %eax, %eax
js 0x1584
movl %eax, %r14d
movl %eax, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x10d0
cltq
cmpq %rbx, %rax
jne 0x158d
movl %r14d, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
leaq 0x2b35(%rip), %rdi      # 0x40c0
jmp 0x1594
leaq 0x2b47(%rip), %rdi      # 0x40db
callq 0x1030
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1180
// File: /workspace/github_c_makefile_star2_O1/rongarret[P]clmm/utils.c
// Function: mkvector
p_vector mkvector(size_t size, size_t padding) {
  size_t psize = size + padding;
  u8 *p = malloc(psize);
  bzero(p, psize);
  p_vector v = malloc(sizeof(struct p_vector));
  v->size = size;
  v->padding = p;
  v->data = p + padding;
  return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq (%rsi,%rdi), %r15
movq %r15, %rdi
callq 0x1100
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x1170
movl $0x18, %edi
callq 0x1100
movq %r14, (%rax)
movq %r12, 0x8(%rax)
addq %rbx, %r12
movq %r12, 0x10(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/rongarret[P]clmm/utils.c
// Function: open_file
FILE *open_file(c_string path, c_string mode) {
  FILE *f = fopen(path, mode);
  if (!f) {
    perror(path);
    exit(-1);
  }
  return f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1140
testq %rax, %rax
je 0x163c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O1/rongarret[P]clmm/utils.c
// Function: file_contents
p_vector file_contents(char* path, size_t padding) {
  FILE *f = open_file(path, "r");
  p_vector v = mkvector(file_size(path), padding);
  if (fread(v->data, v->size, 1, f) != 1) die("Failed to read file");
  return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2aac(%rip), %rsi      # 0x410f
callq 0x1622
movq %rax, %rbx
leaq -0xb0(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x10e0
xorl %edi, %edi
negl %eax
sbbq %rdi, %rdi
orq 0x30(%r12), %rdi
movq %r14, %rsi
callq 0x15d6
movq %rax, %r14
movq (%rax), %rsi
movq 0x10(%rax), %rdi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1040
cmpq $0x1, %rax
jne 0x16c1
movq %r14, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a49(%rip), %rdi      # 0x4111
callq 0x1030
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1180
// File: /workspace/github_c_makefile_star2_O1/rongarret[P]clmm/utils.c
// Function: write_pvector
int write_pvector(c_string path, p_vector v) {
  FILE *f = open_file(path, "w");
  int result = fwrite(v->data, v->size, 1, f);
  fclose(f);
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq 0x2a3d(%rip), %rsi      # 0x4125
callq 0x1622
movq %rax, %r14
movq (%rbx), %rsi
movq 0x10(%rbx), %rdi
movl $0x1, %edx
movq %rax, %rcx
callq 0x1190
movq %rax, %rbx
movq %r14, %rdi
callq 0x1050
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/rongarret[P]clmm/utils.c
// Function: write_cstring
int write_cstring(c_string path, c_string s) {
  FILE *f = open_file(path, "w");
  int result = fputs(s, f);
  fclose(f);
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq 0x29fe(%rip), %rsi      # 0x4125
callq 0x1622
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10a0
movl %eax, %ebx
movq %r14, %rdi
callq 0x1050
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/rongarret[P]clmm/utils.c
// Function: b64decode
p_vector b64decode(c_string input, size_t padding) {
  size_t bytecnt_estimate = Base64decode_len(input);
  p_vector v = mkvector(bytecnt_estimate, padding);
  size_t bytecnt = Base64decode((char *)v->data, input);
  if ((bytecnt > bytecnt_estimate) || (bytecnt < bytecnt_estimate-3)) {
    die("Failed to decode base64 string");
  }
  v->size = bytecnt;
  return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x17e8
movslq %eax, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15d6
movq %rax, %r14
movq 0x10(%rax), %rdi
movq %r15, %rsi
callq 0x1817
cmpl %ebx, %eax
ja 0x17cf
cltq
addq $-0x3, %rbx
cmpq %rax, %rbx
ja 0x17cf
movq %rax, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2951(%rip), %rdi      # 0x4127
callq 0x1030
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1180
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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
jg 0x183e
addl $-0x4, %ecx
cmpl $0x2, %ecx
jl 0x18d2
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)
incq %rdi
cmpl $0x3, %ecx
jl 0x18fa
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, (%rdi)
incq %rdi
cmpl $0x4, %ecx
jne 0x191a
movzbl 0x2(%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x6, %r8b
movzbl 0x3(%rsi), %esi
orb (%rsi,%rdx), %r8b
movb %r8b, (%rdi)
incq %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_O1/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 0x19f3
leal -0x2(%rdx), %eax
movslq %eax, %r8
xorl %ecx, %ecx
leaq 0x28d1(%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
jl 0x1982
cmpl %edx, %ecx
jge 0x1a60
movl %ecx, %r9d
movzbl (%rsi,%r9), %r10d
shrl $0x2, %r10d
leaq 0x2846(%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 0x1a31
movb (%r10,%r8), %cl
movb %cl, 0x1(%rax)
movb $0x3d, 0x2(%rax)
jmp 0x1a58
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_O1/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 0x8fc0
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 0x8fd5
testq %r12, %r12
je 0x8f4e
movq %r15, (%r12)
movl $0x1, %r12d
testq %r14, %r14
je 0x8fc3
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
testq %r15, %r15
je 0x8fc3
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 0x8f80
jmp 0x8fc3
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe033(%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_O1/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 0x90ec
movq %rdx, %r14
movq %rsi, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x82f0
leaq 0xdf8b(%rip), %rsi      # 0x17000
movq %rbx, %rdi
callq 0x8950
testq %r14, %r14
je 0x90be
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 0x908f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8500
leaq 0xdf4b(%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 0xdf1c(%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_O1/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 0x91cc
movq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x923d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8600
jmp 0x9206
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8b20
testl %eax, %eax
je 0x921e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8600
movq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x923d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8bc0
movl $0x1, %eax
addq $0x50, %rsp
popq %rbx
retq
leaq 0xde4f(%rip), %rsi      # 0x17074
leaq 0xde62(%rip), %rdx      # 0x1708e
movq %rbx, %rdi
movl $0xb9, %ecx
xorl %eax, %eax
callq 0x8a80
jmp 0x9218
// File: /workspace/github_c_makefile_star2_O1/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 0x9283
cmpq $0x2, %rdx
jne 0x92f4
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
movsd 0x18(%rsi), %xmm3
leaq 0xddd4(%rip), %rdx      # 0x17046
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x4, %al
callq 0x83f0
jmp 0x92b6
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
movsd 0x18(%rsi), %xmm3
movsd 0x20(%rsi), %xmm4
movsd 0x28(%rsi), %xmm5
leaq 0xddb2(%rip), %rdx      # 0x17059
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x6, %al
callq 0x83f0
cmpl $0x201, %eax            # imm = 0x201
jl 0x92d8
movq %rsp, %rsi
movb $0x0, 0x1ff(%rsi)
movl $0x2e2e2e20, 0x1fb(%rsi) # imm = 0x2E2E2E20
movl $0x1ff, %edx            # imm = 0x1FF
jmp 0x92de
movslq %eax, %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8960
movl $0x1, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
retq
leaq 0xdd79(%rip), %rsi      # 0x17074
leaq 0xdd8c(%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_O1/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 0x937d
movq 0x8(%rsp), %rbx
jmp 0x93b2
testq %rbx, %rbx
je 0x93b2
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 0x9391
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_O1/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 0x944f
testq %rbx, %rbx
je 0x94e6
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x8630
xorpd %xmm1, %xmm1
jmp 0x94dd
leaq 0xdc8a(%rip), %rdx      # 0x170e0
movq %r14, %rdi
movl %ebp, %esi
callq 0x8170
testl %eax, %eax
je 0x94f4
testq %rbx, %rbx
je 0x94e6
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 0x94eb
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/complex.c
// Function: moonglmath_pushcomplex
int pushcomplex(lua_State *L, complex_t z)
    {
    lua_newtable(L);
    setmetatable(L, COMPLEX_MT);
    lua_pushnumber(L, creal(z));
    lua_seti(L, -2, 1);
    lua_pushnumber(L, cimag(z));
    lua_seti(L, -2, 2);
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x82f0
leaq 0xdb7a(%rip), %rsi      # 0x170e0
movq %rbx, %rdi
callq 0x8950
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x87d0
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8640
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x87d0
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8640
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglmath/src/complex.c
// Function: moonglmath_complex_Parts
int complex_Parts(lua_State *L)
    {
    complex_t z; 
    checkcomplex(L, 1, &z);
    lua_pushnumber(L, creal(z));
    lua_pushnumber(L, cimag(z));
    return 2;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x8820
movsd (%r14), %xmm0
movq %rbx, %rdi
callq 0x87d0
movsd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x87d0
movl $0x2, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9834
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %rbx, %rdi
callq 0x9b10
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8600
jmp 0x9868
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8b30
testl %eax, %eax
je 0x9880
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8600
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %rbx, %rdi
callq 0x9b10
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8bc0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0xd7ed(%rip), %rsi      # 0x17074
leaq 0xd896(%rip), %rdx      # 0x17124
movq %rbx, %rdi
movl $0xb8, %ecx
xorl %eax, %eax
callq 0x8a80
jmp 0x987a
// File: /workspace/github_c_makefile_star2_O1/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 0xa04b
cmpl $0x5, %eax
je 0xa08d
cmpl $0x3, %eax
jne 0xa0a5
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
xorpd %xmm1, %xmm1
mulsd %xmm0, %xmm1
addsd (%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
jmp 0xa0b7
leaq 0xd04c(%rip), %rdx      # 0x170e0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xa0dd
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8820
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %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 0xa0cb
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, 0x18(%rsp)
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x80c0
movsd 0x18(%rsp), %xmm1
movapd %xmm1, %xmm0
mulsd 0xcf47(%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 0xa111
jmp 0xa0cb
// File: /workspace/github_c_makefile_star2_O1/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 0xa256
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 0xa253
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 0xa22e
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 0xa283
// File: /workspace/github_c_makefile_star2_O1/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 0xa39f
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 0xa38d
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 0xa35b
movq %rbx, %rdi
movl 0x4(%rsp), %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0xa283
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 0xa378
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 0xa300
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcf09(%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_O1/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 0xa457
leaq 0xce08(%rip), %rax      # 0x171d8
movslq (%rax,%rsi,4), %rsi
addq %rax, %rsi
jmpq *%rsi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa47f
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa6d9
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa9eb
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa5a7
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa640
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa8ad
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa513
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa775
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa811
leaq 0xcc16(%rip), %rsi      # 0x17074
leaq 0xce3b(%rip), %rdx      # 0x172a0
movl $0x130, %ecx            # imm = 0x130
xorl %eax, %eax
jmp 0x8a80
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa949
// File: /workspace/github_c_makefile_star2_O1/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 0xa9da
movq %rsi, %r15
xorl %ebx, %ebx
testq %rsi, %rsi
je 0xa9da
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 0xa9d5
movq %r12, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
leaq (%r15,%r13), %rax
incq %rax
incq %r13
cmpq $0x1, %rax
jne 0xa984
jmp 0xa9da
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_O1/stetre[P]moonglmath/src/datahandling.c
// Function: moonglmath_checkdata
int checkdata(lua_State *L, int arg, int type, void *dst, size_t dstsize)
    {
    size_t n = toflattable(L, arg);
    int err = testdata(L, type, n, dst, dstsize);
    if(err)
        {
        lua_pop(L, 1); /* flat table */
        return luaL_argerror(L, arg, errstring(err));
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r15
movq %rcx, %r12
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
callq 0x8490
movslq %eax, %rdx
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rcx
movq %r15, %r8
callq 0x85b0
testl %eax, %eax
je 0xaae5
movl %eax, %ebp
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x80c0
movl %ebp, %edi
callq 0x8510
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x81b0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc375(%rip), %rdx      # 0x172e2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8850
testl %ebp, %ebp
jle 0xafa5
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 0xaf87
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x125a4(%rip), %rsi     # 0x1e420
xorl %edx, %edx
callq 0x81a0
leaq 0xb49c(%rip), %rcx      # 0x17326
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xbfa4
leaq 0xb4bc(%rip), %rcx      # 0x17359
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xbfa4
leaq 0xb47b(%rip), %rcx      # 0x1732e
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0xbfa4
leaq 0xb461(%rip), %rcx      # 0x1732d
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0xbfa4
leaq 0xb44f(%rip), %rcx      # 0x17334
movq %rbx, %rdi
movl $0x1, %esi
movl $0x3, %edx
callq 0xbfa4
leaq 0xb435(%rip), %rcx      # 0x17333
movq %rbx, %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0xbfa4
leaq 0xb424(%rip), %rcx      # 0x1733b
movq %rbx, %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0xbfa4
leaq 0xb40a(%rip), %rcx      # 0x1733a
movq %rbx, %rdi
movl $0x1, %esi
movl $0x6, %edx
callq 0xbfa4
leaq 0xb3f7(%rip), %rcx      # 0x17340
movq %rbx, %rdi
movl $0x1, %esi
movl $0x7, %edx
callq 0xbfa4
leaq 0xb3dd(%rip), %rcx      # 0x1733f
movq %rbx, %rdi
movl $0x1, %esi
movl $0x8, %edx
callq 0xbfa4
leaq 0xb3ca(%rip), %rcx      # 0x17345
movq %rbx, %rdi
movl $0x1, %esi
movl $0x9, %edx
callq 0xbfa4
leaq 0xb3b7(%rip), %rcx      # 0x1734b
movq %rbx, %rdi
movl $0x1, %esi
movl $0xa, %edx
popq %rbx
jmp 0xbfa4
// File: /workspace/github_c_makefile_star2_O1/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 0xad92(%rip), %rdx      # 0x17395
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc61a
movq %rbx, %rdi
popq %rbx
jmp 0x8a00
leaq 0xad99(%rip), %rdx      # 0x173ba
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc63b
movq %rbx, %rdi
popq %rbx
jmp 0x8480
leaq 0xaa9e(%rip), %rdx      # 0x170e0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc65c
movq %rbx, %rdi
popq %rbx
jmp 0x87b0
leaq 0xad41(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O1/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 0xad4e(%rip), %rdx      # 0x173ca
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc693
movq %rbx, %rdi
popq %rbx
jmp 0x8300
leaq 0xad20(%rip), %rdx      # 0x173ba
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc6b4
movq %rbx, %rdi
popq %rbx
jmp 0x8d60
leaq 0xaa25(%rip), %rdx      # 0x170e0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc6d5
movq %rbx, %rdi
popq %rbx
jmp 0x8cb0
leaq 0xacc8(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O1/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 0xacd5(%rip), %rdx      # 0x173ca
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc70c
movq %rbx, %rdi
popq %rbx
jmp 0x8b70
leaq 0xaca7(%rip), %rdx      # 0x173ba
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc72d
movq %rbx, %rdi
popq %rbx
jmp 0x86b0
leaq 0xa9ac(%rip), %rdx      # 0x170e0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc74e
movq %rbx, %rdi
popq %rbx
jmp 0x8260
leaq 0xac4f(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0
// File: /workspace/github_c_makefile_star2_O1/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 0xabac(%rip), %rdx      # 0x173ca
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc835
movq %rbx, %rdi
popq %rbx
jmp 0x8dc0
leaq 0xab7e(%rip), %rdx      # 0x173ba
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc856
movq %rbx, %rdi
popq %rbx
jmp 0x8bd0
leaq 0xa883(%rip), %rdx      # 0x170e0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8170
testl %eax, %eax
je 0xc877
movq %rbx, %rdi
popq %rbx
jmp 0x8200
leaq 0xab26(%rip), %rdx      # 0x173a4
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x81b0