LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0x16429
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpl $0x2, 0xc(%rdi)
jl 0x1641b
movq %rsi, %rbx
movl 0x8(%rsi), %eax
cltd
idivl 0x10(%rsi)
movl %eax, %ebp
testl %eax, %eax
movl $0x0, %r12d
cmovgl %eax, %r12d
leaq 0x14b63(%rip), %r15     # 0x2aed1
xorl %r13d, %r13d
cmpq %r12, %r13
je 0x1641b
imull $0x64, %r13d, %eax
cltd
idivl %ebp
movq %r15, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x2110
movq 0x19c2c(%rip), %rax     # 0x2ffc0
movq (%rax), %rdi
callq 0x21d0
movq 0x20(%rbx), %rax
movl (%rax,%r13,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 0x163e6
movq (%rdx), %r8
movslq (%r8,%rcx,4), %r8
movq 0x18(%rbx), %r9
cmpl %ebp, (%r9,%r8,4)
jl 0x16413
xorl %r8d, %r8d
movslq 0xc(%r14), %r9
cmpq %r9, %r8
jge 0x1640f
movq (%rdx,%r8,8), %r9
movl %eax, (%r9,%rcx,4)
incq %r8
jmp 0x163d0
movq 0x8(%rdx), %rsi
movslq (%rsi,%rcx,4), %rsi
movq 0x18(%rbx), %rdi
cmpl %ebp, (%rdi,%rsi,4)
jl 0x16413
pushq $0x1
popq %rsi
movslq 0xc(%r14), %rdi
cmpq %rdi, %rsi
jge 0x16413
movq (%rdx,%rsi,8), %rdi
movl %eax, (%rdi,%rcx,4)
incq %rsi
jmp 0x163fa
andl $0x0, (%rdi,%rsi,4)
incq %r13
jmp 0x16371
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq %rdx, (%rsp)
testq %rdi, %rdi
je 0x164a6
movq %rsi, %r14
movq %rdi, %r15
callq 0x6846
movq %rax, %r12
pushq $0x1
popq %rbp
movq %r12, %rdi
movl %ebp, %esi
movq (%rsp), %rdx
callq 0x164bb
movq %rax, %rbx
movl 0x14(%r15), %ecx
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x73be
movq %rax, %r13
movq %rbx, %rdi
callq 0x6852
testq %r13, %r13
je 0x1649c
movl 0x8(%r13), %eax
cmpl 0x8(%r12), %eax
je 0x1649c
movq %r12, %rdi
callq 0x6852
addl %ebp, %ebp
movq %r13, %r12
jmp 0x1644f
movq %r13, %rdi
callq 0x6852
jmp 0x164a9
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %r14d
movq %rsi, %r15
movl %edi, %ebp
callq 0x2280
cltd
idivl %r14d
movslq %edx, %rax
movq (%r15,%rax,8), %rdi
movslq %r14d, %rcx
decl %r14d
movq -0x8(%r15,%rcx,8), %rdx
movq %rdx, (%r15,%rax,8)
movq %rdi, -0x8(%r15,%rcx,8)
callq 0x6846
movq %rax, %r13
movl 0x14(%r13), %eax
cmpl %ebp, %eax
jge 0x16755
testl %r14d, %r14d
jle 0x16755
movl %r14d, %r14d
movq %r14, %r12
addq $-0x1, %r12
setb %cl
cmpl %ebp, %eax
jge 0x16709
testb %cl, %cl
je 0x16709
callq 0x2280
cltd
idivl %r14d
movslq %edx, %rax
movq (%r15,%rax,8), %rsi
movq (%r15,%r12,8), %rcx
movq %rcx, (%r15,%rax,8)
movq %rsi, (%r15,%r12,8)
movq %r13, %rdi
movq 0x8(%rsp), %rdx
callq 0x72e2
movq %rax, %rbx
movq %r13, %rdi
callq 0x6852
movl 0x14(%rbx), %eax
movq %r12, %r14
movq %rbx, %r13
jmp 0x166bb
movq %r13, %rdi
movq 0x8(%rsp), %r12
movq %r12, %rsi
movq %r15, %rdx
movl %r14d, %ecx
callq 0x788d
movq %rax, %rbx
movq %r13, %rdi
callq 0x6852
movq %rbx, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x1642a
testq %rax, %rax
je 0x1674d
movq %rax, %r13
movq %rbx, %rdi
callq 0x6852
movq %r13, %rbx
movq %rbx, %r13
jmp 0x166a0
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_O2/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 0x2bfb(%rip), %rdi      # 0x4103
xorl %esi, %esi
xorl %eax, %eax
callq 0x1110
testl %eax, %eax
js 0x153e
movl %eax, %r14d
movl %eax, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x10c0
cltq
cmpq %rbx, %rax
jne 0x154a
movl %r14d, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
leaq 0x2b7b(%rip), %rdi      # 0x40c0
callq 0x14e0
leaq 0x2b8a(%rip), %rdi      # 0x40db
callq 0x14e0
// File: /workspace/github_c_makefile_star2_O2/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 0x10e0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x1150
pushq $0x18
popq %rdi
callq 0x10e0
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_O2/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 0x1120
testq %rax, %rax
je 0x15ed
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x1130
pushq $-0x1
popq %rdi
callq 0x1160
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2afb(%rip), %rsi      # 0x410f
callq 0x15d3
movq %rax, %r15
movq %r14, %rdi
callq 0x1556
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1589
movq %rax, %rbx
movq (%rax), %rsi
movq 0x10(%rax), %rdi
pushq $0x1
popq %rdx
movq %r15, %rcx
callq 0x1040
cmpq $0x1, %rax
jne 0x1658
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ab2(%rip), %rdi      # 0x4111
callq 0x14e0
// File: /workspace/github_c_makefile_star2_O2/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 0x2ab0(%rip), %rsi      # 0x4125
callq 0x15d3
movq %rax, %r14
movq (%rbx), %rsi
movq 0x10(%rbx), %rdi
pushq $0x1
popq %rdx
movq %rax, %rcx
callq 0x1170
movq %rax, %rbx
movq %r14, %rdi
callq 0x1050
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2a73(%rip), %rsi      # 0x4125
callq 0x15d3
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_O2/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 0x1768
movslq %eax, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1589
movq %rax, %r14
movq 0x10(%rax), %rdi
movq %r15, %rsi
callq 0x1794
cmpl %ebx, %eax
ja 0x175a
cltq
addq $-0x3, %rbx
cmpq %rax, %rbx
ja 0x175a
movq %rax, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29c6(%rip), %rdi      # 0x4127
callq 0x14e0
nop
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq 0x29ac(%rip), %rdx      # 0x4150
movq %rsi, %rcx
movzbl (%rcx), %r8d
incq %rcx
incl %eax
cmpb $0x40, (%r8,%rdx)
jb 0x17a7
addq $0x3, %rsi
addq $0x3, %rdi
movl %eax, %ecx
cmpl $0x5, %ecx
jl 0x182e
movzbl -0x3(%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x2, %r8b
movzbl -0x2(%rsi), %r9d
movb (%r9,%rdx), %r9b
shrb $0x4, %r9b
orb %r8b, %r9b
movb %r9b, -0x3(%rdi)
movzbl -0x2(%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x4, %r8b
movzbl -0x1(%rsi), %r9d
movb (%r9,%rdx), %r9b
shrb $0x2, %r9b
orb %r8b, %r9b
movb %r9b, -0x2(%rdi)
movzbl -0x1(%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x6, %r8b
movzbl (%rsi), %r9d
orb (%r9,%rdx), %r8b
movb %r8b, -0x1(%rdi)
addl $-0x4, %ecx
addq $0x4, %rsi
addq $0x3, %rdi
jmp 0x17c1
cmpl $0x2, %ecx
jl 0x185f
movzbl -0x3(%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x2, %r8b
movzbl -0x2(%rsi), %r9d
movb (%r9,%rdx), %r9b
shrb $0x4, %r9b
orb %r8b, %r9b
movb %r9b, -0x3(%rdi)
cmpl $0x2, %ecx
jne 0x187d
addq $-0x2, %rdi
jmp 0x1863
addq $-0x3, %rdi
addl $0x3, %eax
movl $0x4, %esi
cltd
idivl %esi
leal (%rax,%rax,2), %eax
movb $0x0, (%rdi)
negl %ecx
andl $0x3, %ecx
subl %ecx, %eax
popq %rbp
retq
movzbl -0x2(%rsi), %r8d
movb (%r8,%rdx), %r8b
shlb $0x4, %r8b
movzbl -0x1(%rsi), %r9d
movb (%r9,%rdx), %r9b
shrb $0x2, %r9b
orb %r8b, %r9b
leaq -0x1(%rdi), %r8
movb %r9b, -0x2(%rdi)
cmpl $0x4, %ecx
jne 0x18c0
movzbl -0x1(%rsi), %r9d
movb (%r9,%rdx), %r9b
shlb $0x6, %r9b
movzbl (%rsi), %esi
orb (%rsi,%rdx), %r9b
movb %r9b, (%r8)
jmp 0x1863
movq %r8, %rdi
jmp 0x1863
// File: /workspace/github_c_makefile_star2_O2/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
leal -0x2(%rdx), %eax
movslq %eax, %r9
xorl %r8d, %r8d
leaq 0x295f(%rip), %rcx      # 0x4250
movq %rdi, %rax
cmpq %r9, %r8
jge 0x1967
movzbl (%rsi,%r8), %r10d
shrl $0x2, %r10d
movb (%r10,%rcx), %r10b
movb %r10b, (%rax)
movzbl (%rsi,%r8), %r10d
shll $0x4, %r10d
andl $0x30, %r10d
movzbl 0x1(%rsi,%r8), %r11d
shrl $0x4, %r11d
orl %r10d, %r11d
movb (%r11,%rcx), %r10b
movb %r10b, 0x1(%rax)
movzbl 0x1(%rsi,%r8), %r10d
andl $0xf, %r10d
movzbl 0x2(%rsi,%r8), %r11d
shrl $0x6, %r11d
leal (%r11,%r10,4), %r10d
movb (%r10,%rcx), %r10b
movb %r10b, 0x2(%rax)
movzbl 0x2(%rsi,%r8), %r10d
andl $0x3f, %r10d
movb (%r10,%rcx), %r10b
movb %r10b, 0x3(%rax)
addq $0x4, %rax
addq $0x3, %r8
jmp 0x18f4
cmpl %edx, %r8d
jge 0x19c9
movzbl (%rsi,%r8), %r9d
shrl $0x2, %r9d
movb (%r9,%rcx), %r9b
movb %r9b, (%rax)
decl %edx
movzbl (%rsi,%r8), %r9d
shll $0x4, %r9d
andl $0x30, %r9d
cmpl %r8d, %edx
jne 0x199b
movb (%r9,%rcx), %cl
movb %cl, 0x1(%rax)
movb $0x3d, %cl
jmp 0x19be
movzbl 0x1(%rsi,%r8), %edx
shrl $0x4, %edx
movzbl %r9b, %r9d
orq %rdx, %r9
movb (%r9,%rcx), %dl
movb %dl, 0x1(%rax)
movzbl 0x1(%rsi,%r8), %edx
andl $0xf, %edx
movb (%rcx,%rdx,4), %cl
movb %cl, 0x2(%rax)
movb $0x3d, 0x3(%rax)
addq $0x4, %rax
movb $0x0, (%rax)
subl %edi, %eax
incl %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0xd047(%rip), %rdx      # 0x16000
callq 0x8180
testl %eax, %eax
je 0x906f
leaq 0xd04e(%rip), %rdx      # 0x1601b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8e50
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x8740
movq %rax, %r15
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x80c0
movq %r15, %rax
andq $-0x2, %rax
cmpq $0x2, %rax
jne 0x9073
testq %r12, %r12
je 0x9006
movq %r15, (%r12)
pushq $0x1
popq %rax
testq %r14, %r14
je 0x9095
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
addq %r15, %r15
negq %r15
pushq $0x1
popq %r13
pushq $-0x2
popq %r12
leaq (%r15,%r13), %rax
cmpq $0x1, %rax
je 0x9092
movq %rbx, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x8de0
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0x8350
movsd %xmm0, -0x8(%r14,%r13,8)
movq %rbx, %rdi
movl %r12d, %esi
callq 0x80c0
incq %r13
jmp 0x9036
xorl %eax, %eax
jmp 0x9095
leaq 0xcf95(%rip), %rsi      # 0x1600f
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8b00
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdx, %rax
andq $-0x2, %rax
cmpq $0x2, %rax
jne 0x9162
movq %rdx, %r14
movq %rsi, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8320
leaq 0xcedf(%rip), %rsi      # 0x16000
movq %rbx, %rdi
callq 0x89c0
leaq (%r14,%r14), %r13
negq %r13
pushq $0x1
popq %r12
pushq $-0x2
popq %rbp
leaq (%r12,%r13), %rax
cmpq $0x1, %rax
je 0x9181
movsd -0x8(%r15,%r12,8), %xmm0
movq %rbx, %rdi
callq 0x8840
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x86a0
incq %r12
jmp 0x9137
leaq 0xcea6(%rip), %rsi      # 0x1600f
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8b00
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8540
leaq 0xce88(%rip), %rdx      # 0x1601b
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x84e0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movl %ebx, %esi
callq 0x8bc0
testl %eax, %eax
je 0x9274
movq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x92e0
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x8650
jmp 0x92aa
pushq $0x2
popq %rsi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
callq 0x8bc0
testl %eax, %eax
je 0x92bf
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x8650
movq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x92e0
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x8c70
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
leaq 0xcdae(%rip), %rsi      # 0x16074
leaq 0xcdc1(%rip), %rdx      # 0x1608e
movq %r14, %rdi
movl $0xb9, %ecx
xorl %eax, %eax
callq 0x8b00
movl %eax, %ebx
jmp 0x92b5
// File: /workspace/github_c_makefile_star2_O2/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 0x9326
cmpq $0x2, %rdx
jne 0x9395
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
movsd 0x18(%rsi), %xmm3
leaq 0xcd31(%rip), %rdx      # 0x16046
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x4, %al
callq 0x8420
jmp 0x9359
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
movsd 0x18(%rsi), %xmm3
movsd 0x20(%rsi), %xmm4
movsd 0x28(%rsi), %xmm5
leaq 0xcd0f(%rip), %rdx      # 0x16059
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movb $0x6, %al
callq 0x8420
cmpl $0x201, %eax            # imm = 0x201
jl 0x937b
movq %rsp, %rsi
movb $0x0, 0x1ff(%rsi)
movl $0x2e2e2e20, 0x1fb(%rsi) # imm = 0x2E2E2E20
movl $0x1ff, %edx            # imm = 0x1FF
jmp 0x9381
movslq %eax, %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x89d0
pushq $0x1
popq %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
retq
leaq 0xccd8(%rip), %rsi      # 0x16074
leaq 0xcceb(%rip), %rdx      # 0x1608e
movq %rbx, %rdi
movl $0x91, %ecx
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
jmp 0x8b00
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x8bc0
testl %eax, %eax
je 0x942c
movq 0x8(%rsp), %rbx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8dd0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq (%rbx,%rbx), %r12
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x940e
leaq 0x1(%r13), %r15
xorps %xmm0, %xmm0
movq %r14, %rdi
movl %r15d, %esi
callq 0x8370
movsd %xmm0, 0x10(%rsp,%r13,8)
movq %r15, %r13
jmp 0x9433
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
callq 0x85a0
pushq $0x1
popq %rbx
testl %eax, %eax
je 0x94dc
testq %r14, %r14
je 0x9577
movq %r15, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x8680
xorpd %xmm1, %xmm1
jmp 0x9568
leaq 0xcbfd(%rip), %rdx      # 0x160e0
movq %r15, %rdi
movl %ebp, %esi
callq 0x8180
testl %eax, %eax
je 0x9575
testq %r14, %r14
je 0x9577
pushq $0x1
popq %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0x8de0
pushq $-0x1
popq %r12
movq %r15, %rdi
movl %r12d, %esi
callq 0x8350
movsd %xmm0, 0x10(%rsp)
pushq $-0x2
popq %r13
movq %r15, %rdi
movl %r13d, %esi
callq 0x80c0
pushq $0x2
popq %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0x8de0
movq %r15, %rdi
movl %r12d, %esi
callq 0x8350
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movl %r13d, %esi
callq 0x80c0
movsd 0x8(%rsp), %xmm1
xorpd %xmm0, %xmm0
mulsd %xmm1, %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, (%r14)
movsd %xmm1, 0x8(%r14)
jmp 0x9577
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
subq $0x18, %rsp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x8320
leaq 0xcaea(%rip), %rsi      # 0x160e0
movq %rbx, %rdi
callq 0x89c0
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x8840
pushq $-0x2
popq %rbp
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x86a0
movq %rbx, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x8840
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x86a0
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdx
callq 0x8890
movsd (%r14), %xmm0
movq %rbx, %rdi
callq 0x8840
movsd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x8840
pushq $0x2
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
leaq 0x8(%rsp), %rdx
movl %ebx, %esi
callq 0x8bd0
testl %eax, %eax
je 0x98aa
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq %r14, %rdi
callq 0x9b7f
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x8650
jmp 0x98dd
pushq $0x2
popq %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x8bd0
testl %eax, %eax
je 0x98f2
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x8650
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq %r14, %rdi
callq 0x9b7f
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x8c70
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0xc77b(%rip), %rsi      # 0x16074
leaq 0xc824(%rip), %rdx      # 0x16124
movq %r14, %rdi
movl $0xb8, %ecx
xorl %eax, %eax
callq 0x8b00
movl %eax, %ebx
jmp 0x98e8
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x8cf0
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0xa081
cmpl $0x5, %eax
je 0xa0c3
cmpl $0x3, %eax
jne 0xa0d9
pushq $0x1
popq %rsi
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x8370
movsd %xmm0, (%rsp)
pushq $0x2
popq %rsi
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x8370
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
mulsd %xmm1, %xmm0
addsd (%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0x20(%rsp)
jmp 0xa0f7
leaq 0xc016(%rip), %rdx      # 0x160e0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xa111
pushq $0x1
popq %rsi
leaq 0x18(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x8890
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
movq %rbx, %rdi
callq 0x87e0
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8d10
movq %rax, %r12
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8320
movq %rbx, %rdi
callq 0x8060
movl %eax, 0xc(%rsp)
movslq %r12d, %rbp
pushq $0x1
popq %r12
pushq $-0x1
popq %r13
pushq $0x1
popq %r15
cmpq %rbp, %r14
jge 0xa0ff
leaq 0x1(%r14), %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x83b0
xorps %xmm0, %xmm0
movq %rbx, %rdi
movl %r13d, %esi
callq 0x8370
movsd %xmm0, (%rsp)
addq $0x2, %r14
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x83b0
xorps %xmm0, %xmm0
movq %rbx, %rdi
movl %r13d, %esi
callq 0x8370
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
pushq $-0x3
popq %rsi
callq 0x80c0
movsd 0x10(%rsp), %xmm1
movapd %xmm1, %xmm0
mulsd 0xbf15(%rip), %xmm0     # 0x160c8
addsd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x87e0
movq %rbx, %rdi
movl 0xc(%rsp), %esi
movq %r12, %rdx
callq 0x8770
incq %r12
jmp 0xa149
// File: /workspace/github_c_makefile_star2_O2/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, %ebp
movq %rdi, %rbx
callq 0x8cf0
cmpl $0x5, %eax
je 0xa286
movq %rbx, %rdi
callq 0x8060
movl %eax, %r15d
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8320
movq %rbx, %rdi
callq 0x8060
movl %eax, %r14d
movslq %ebp, %r13
movslq %r15d, %r15
movl %ebp, %ebp
leaq (%r12,%r13), %rax
cmpq %r15, %rax
jg 0xa283
leal (%r12,%rbp), %esi
movq %rbx, %rdi
callq 0x8650
incq %r12
movslq %r12d, %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x8770
jmp 0xa25b
movl %r14d, %ebp
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8320
movq %rbx, %rdi
callq 0x8060
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
movl %ebp, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa2b3
// File: /workspace/github_c_makefile_star2_O2/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, %r12d
movl %esi, 0x8(%rsp)
movq %rdi, %rbx
movl %ecx, %esi
callq 0x8cf0
cmpl $0x5, %eax
jne 0xa3c3
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8850
xorl %r13d, %r13d
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x8290
movq %rax, %r15
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x80c0
movq %r15, %rcx
testl %ecx, %ecx
je 0xa3e2
xorl %r13d, %r13d
testl %ecx, %ecx
cmovlel %r13d, %ecx
negq %rcx
pushq $0x1
popq %r15
movl %ebp, 0xc(%rsp)
movq %rcx, 0x10(%rsp)
leaq (%rcx,%r15), %rax
cmpq $0x1, %rax
je 0xa3e2
movq %r13, %r14
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x8de0
movq %rbx, %rdi
callq 0x8060
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x8cf0
cmpl $0x5, %eax
jne 0xa391
movq %rbx, %rdi
movl 0x8(%rsp), %esi
movl %r12d, %edx
movl %ebp, %ecx
callq 0xa2b3
movl %eax, %r13d
addl %eax, %r12d
movq %rbx, %rdi
movl %ebp, %esi
pushq $-0x1
popq %rdx
callq 0x89b0
movq %rbx, %rdi
pushq $-0x2
popq %rsi
callq 0x80c0
jmp 0xa3ac
movl %r12d, %eax
incl %eax
movl %eax, %r12d
movslq %eax, %rdx
movq %rbx, %rdi
movl 0x8(%rsp), %esi
callq 0x8770
pushq $0x1
popq %r13
addl %r13d, %r14d
movq %r14, %r13
incq %r15
movl 0xc(%rsp), %ebp
movq 0x10(%rsp), %rcx
jmp 0xa329
leaq 0xbee5(%rip), %rsi      # 0x162af
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8b00
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xa48d
leaq 0xbdd2(%rip), %rax      # 0x161d8
movslq (%rax,%rsi,4), %rsi
addq %rax, %rsi
jmpq *%rsi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa4b5
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa6c7
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa97f
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa5b9
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa640
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa865
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa537
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa751
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa7db
leaq 0xbbe0(%rip), %rsi      # 0x16074
leaq 0xbe05(%rip), %rdx      # 0x162a0
movl $0x130, %ecx            # imm = 0x130
xorl %eax, %eax
jmp 0x8b00
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
jmp 0xa8ef
// File: /workspace/github_c_makefile_star2_O2/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
cmpq %rcx, %rax
jbe 0xa90c
pushq $-0x8
popq %rbp
jmp 0xa96e
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
negq %r14
pushq $0x1
popq %r12
pushq $-0x1
popq %r13
pushq $-0x2
popq %rbp
leaq (%r14,%r12), %rax
cmpq $0x1, %rax
je 0xa96c
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x83b0
movq %r15, %rdi
movl %r13d, %esi
leaq 0x4(%rsp), %rdx
callq 0x8680
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbx,%r12,4)
cmpl $0x0, 0x4(%rsp)
je 0xa96e
movq %r15, %rdi
movl %ebp, %esi
callq 0x80c0
incq %r12
jmp 0xa923
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x84c0
movslq %eax, %rdx
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rcx
movq %r15, %r8
callq 0x85f0
testl %eax, %eax
je 0xaa65
movl %eax, %ebp
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x80c0
movl %ebp, %edi
callq 0x8550
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x81c0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x84c0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x8060
movl %eax, %r14d
leaq 0xb445(%rip), %rdx      # 0x162e2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x88c0
xorl %r12d, %r12d
testl %ebp, %ebp
cmovgl %ebp, %r12d
negq %r12
pushq $0x1
popq %r15
leaq (%r12,%r15), %rax
cmpq $0x1, %rax
je 0xaed4
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x83b0
incq %r15
jmp 0xaeb7
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x126ec(%rip), %rsi     # 0x1e420
xorl %edx, %edx
callq 0x81b0
leaq 0xa5e4(%rip), %rcx      # 0x16326
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xbe2e
leaq 0xa604(%rip), %rcx      # 0x16359
pushq $0x1
popq %rbp
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0xbe2e
leaq 0xa5c3(%rip), %rcx      # 0x1632e
movq %rbx, %rdi
movl %ebp, %esi
movl %ebp, %edx
callq 0xbe2e
leaq 0xa5af(%rip), %rcx      # 0x1632d
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xbe2e
leaq 0xa5a2(%rip), %rcx      # 0x16334
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xbe2e
leaq 0xa58d(%rip), %rcx      # 0x16333
pushq $0x4
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xbe2e
leaq 0xa581(%rip), %rcx      # 0x1633b
pushq $0x5
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xbe2e
leaq 0xa56c(%rip), %rcx      # 0x1633a
pushq $0x6
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xbe2e
leaq 0xa55e(%rip), %rcx      # 0x16340
pushq $0x7
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xbe2e
leaq 0xa549(%rip), %rcx      # 0x1633f
pushq $0x8
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xbe2e
leaq 0xa53b(%rip), %rcx      # 0x16345
pushq $0x9
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xbe2e
leaq 0xa52d(%rip), %rcx      # 0x1634b
pushq $0xa
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xbe2e
// File: /workspace/github_c_makefile_star2_O2/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 0x9f06(%rip), %rdx      # 0x16395
pushq $0x1
popq %rsi
callq 0x8180
testl %eax, %eax
je 0xc4a4
movq %rbx, %rdi
popq %rbx
jmp 0x8a70
leaq 0x9f0f(%rip), %rdx      # 0x163ba
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xc4c3
movq %rbx, %rdi
popq %rbx
jmp 0x84b0
leaq 0x9c16(%rip), %rdx      # 0x160e0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xc4e2
movq %rbx, %rdi
popq %rbx
jmp 0x8820
leaq 0x9ebb(%rip), %rdx      # 0x163a4
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x81c0
// File: /workspace/github_c_makefile_star2_O2/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 0x9eca(%rip), %rdx      # 0x163ca
pushq $0x1
popq %rsi
callq 0x8180
testl %eax, %eax
je 0xc515
movq %rbx, %rdi
popq %rbx
jmp 0x8330
leaq 0x9e9e(%rip), %rdx      # 0x163ba
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xc534
movq %rbx, %rdi
popq %rbx
jmp 0x8e10
leaq 0x9ba5(%rip), %rdx      # 0x160e0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xc553
movq %rbx, %rdi
popq %rbx
jmp 0x8d60
leaq 0x9e4a(%rip), %rdx      # 0x163a4
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x81c0
// File: /workspace/github_c_makefile_star2_O2/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 0x9e59(%rip), %rdx      # 0x163ca
pushq $0x1
popq %rsi
callq 0x8180
testl %eax, %eax
je 0xc586
movq %rbx, %rdi
popq %rbx
jmp 0x8c20
leaq 0x9e2d(%rip), %rdx      # 0x163ba
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xc5a5
movq %rbx, %rdi
popq %rbx
jmp 0x8710
leaq 0x9b34(%rip), %rdx      # 0x160e0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xc5c4
movq %rbx, %rdi
popq %rbx
jmp 0x8280
leaq 0x9dd9(%rip), %rdx      # 0x163a4
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x81c0
// File: /workspace/github_c_makefile_star2_O2/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 0x9d44(%rip), %rdx      # 0x163ca
pushq $0x1
popq %rsi
callq 0x8180
testl %eax, %eax
je 0xc69b
movq %rbx, %rdi
popq %rbx
jmp 0x8e70
leaq 0x9d18(%rip), %rdx      # 0x163ba
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xc6ba
movq %rbx, %rdi
popq %rbx
jmp 0x8c80
leaq 0x9a1f(%rip), %rdx      # 0x160e0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xc6d9
movq %rbx, %rdi
popq %rbx
jmp 0x8210
leaq 0x9cc4(%rip), %rdx      # 0x163a4
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x81c0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x85a0
testl %eax, %eax
je 0xc7f0
movq %rbx, %rdi
popq %rbx
jmp 0x8b10
leaq 0x9bd3(%rip), %rdx      # 0x163ca
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xc80f
movq %rbx, %rdi
popq %rbx
jmp 0x8b50
leaq 0x9b7f(%rip), %rdx      # 0x16395
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8180
testl %eax, %eax
je 0xc82e
movq %rbx, %rdi
popq %rbx
jmp 0x8b90
leaq 0x9b6f(%rip), %rdx      # 0x163a4
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x81c0