LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/carlitosmarin[P]Sistema-Ficheros-SOII/mi_cat.c
// Function: main
int main (int argc, char **argv) {
	if (argc != 3) {
		printf("Número de parametros incorrectos\n");
		return -1;
	}

	char *camino = argv[2];
    if(camino[strlen(camino)-1] == '/'){
        printf("ERROR: ( %s ) no es un fichero.\n",camino);
        return -1;
    }

	bmount(argv[1]);

 	int leidos = 0;
	unsigned char buf[tamBloque];
	memset(buf,0,tamBloque);
	int x = mi_read(camino,buf,0,tamBloque);
	unsigned int bucle;
	for(bucle = tamBloque; x > 0; bucle += tamBloque){ // Mientras no de error seguimos leyendo
		write(1,buf,x); //Mostrar los resultados por pantalla
		leidos += x;
		memset(buf,0,tamBloque);
		x = mi_read(camino,buf,bucle,tamBloque);
	}

	char string[128];
	sprintf(string, "Bytes Leídos %d\n", leidos); //Hay que mostrar el valor del num de bytes leidos y del tamanyo en bytes logico del inodo
	write(2, string, strlen(string)); //No sumara lo que ocupe esa informacion al fichero externo

	bumount();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
cmpl $0x3, %edi
jne 0x3d3c
movq %rsi, %rbx
movq 0x10(%rsi), %r14
movq %r14, %rdi
callq 0x1080
cmpb $0x2f, -0x1(%r14,%rax)
jne 0x3d52
leaq 0x7f8(%rip), %rdi       # 0x4528
movq %r14, %rsi
xorl %eax, %eax
callq 0x1090
jmp 0x3d48
leaq 0x818(%rip), %rdi       # 0x455b
callq 0x1060
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x3e1a
movq 0x8(%rbx), %rdi
callq 0x127c
leaq 0x80(%rsp), %r15
xorl %ebx, %ebx
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x10b0
movl $0x400, %ebp            # imm = 0x400
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl $0x400, %ecx            # imm = 0x400
callq 0x3a8b
movl $0x0, %r15d
testl %eax, %eax
jle 0x3de4
movl %eax, %r13d
xorl %r15d, %r15d
leaq 0x80(%rsp), %r12
movl %r13d, %edx
movl $0x1, %edi
movq %r12, %rsi
callq 0x1070
addl %r13d, %r15d
movl $0x400, %edx            # imm = 0x400
movq %r12, %rdi
xorl %esi, %esi
callq 0x10b0
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl $0x400, %ecx            # imm = 0x400
callq 0x3a8b
movl %eax, %r13d
addl $0x400, %ebp            # imm = 0x400
testl %eax, %eax
jg 0x3da3
leaq 0x75e(%rip), %rsi       # 0x4549
movq %rsp, %r14
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1160
movq %r14, %rdi
callq 0x1080
movl $0x2, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1070
xorl %eax, %eax
callq 0x12ba
movl %ebx, %eax
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/mtx.c
// Function: tt_mtx_mul
int tt_mtx_mul(struct tt_mtx *mo,
		const struct tt_mtx *mi1, const struct tt_mtx *mi2)
{
	tt_assert(mi1->cols == mi2->rows);
	tt_assert(mo->rows == mi1->rows);
	tt_assert(mo->cols == mi2->cols);

	for (int i = 0; i < mi1->rows; i++) {
		double *v1 = _tt_mtx_row(mi1, i);
		for (int j = 0; j < mi2->cols; j++) {
			double o = 0.0f;
			double *v2 = _tt_mtx_el(mi2, 0, j);
			for (int k = 0; k < mi1->cols; k++) {
				o += (*v1) * (*v2);
				v1++;
				v2 += mi2->cols;
			}
			*_tt_mtx_el(mo, i, j) = o;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x4(%rsi), %r10d
cmpl (%rdx), %r10d
jne 0x197c
movq %rsi, %rax
movl (%rdi), %ecx
cmpl (%rsi), %ecx
jne 0x1981
movl 0x4(%rdi), %r8d
cmpl 0x4(%rdx), %r8d
jne 0x1986
testl %ecx, %ecx
jle 0x195c
movslq %r10d, %rsi
movq %rsi, 0x10(%rsp)
movslq %r8d, %rsi
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
xorl %r11d, %r11d
testl %r8d, %r8d
movl $0x0, %ebx
cmovgl %r8d, %ebx
leaq (,%rsi,8), %r14
testl %r8d, %r8d
jle 0x1954
testl %r10d, %r10d
jle 0x1977
movq %r11, %rax
imulq 0x10(%rsp), %rax
movq 0x8(%rsp), %r9
leaq (%r9,%rax,8), %r15
movq %r11, %r12
imulq %rsi, %r12
movq 0x8(%rdx), %r9
shlq $0x3, %r12
xorl %ebp, %ebp
xorpd %xmm0, %xmm0
movq %r9, %r13
movl %r10d, %eax
movsd (%r15), %xmm1
mulsd (%r13), %xmm1
addsd %xmm1, %xmm0
addq $0x8, %r15
addq %r14, %r13
decl %eax
jne 0x1918
cmpq %rcx, %r11
jae 0x196d
cmpq %rbx, %rbp
je 0x1972
movq 0x8(%rdi), %rax
addq %r12, %rax
movsd %xmm0, (%rax,%rbp,8)
incq %rbp
addq $0x8, %r9
cmpq %r8, %rbp
jne 0x190e
incq %r11
cmpq %rcx, %r11
jne 0x18dd
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1220
callq 0x1248
callq 0x11f8
callq 0x1180
callq 0x11a8
callq 0x11d0
nop
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/dft.c
// Function: tt_dft
int tt_dft(double (*out)[2], double (*in)[2], uint N)
{
	tt_assert(N);

	double em = 0;
	double edelta = 2 * _TT_PI / N;
	for (uint m = 0; m < N; m++) {
		out[m][0] = out[m][1] = 0;

		double emn = 0;
		for (uint n = 0; n < N; n++) {
			double e[2] = { cos(emn), -sin(emn) };
			double t[2];
			tt_complex_mul(t, in[n], e);
			out[m][0] += t[0];
			out[m][1] += t[1];

			emn += em;
		}

		em += edelta;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
testl %edx, %edx
je 0x1ea4
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r12d
cvtsi2sd %r12, %xmm0
movsd 0x3590(%rip), %xmm1     # 0x5360
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq %r12, 0x10(%rsp)
shlq $0x4, %r12
xorpd %xmm2, %xmm2
xorl %r13d, %r13d
movq %r13, %rax
shlq $0x4, %rax
leaq (%r14,%rax), %rbp
xorpd %xmm1, %xmm1
movupd %xmm1, (%r14,%rax)
xorl %r15d, %r15d
xorpd %xmm0, %xmm0
movsd %xmm2, 0x18(%rsp)
movsd %xmm0, (%rsp)
callq 0x10d0
movapd %xmm0, 0x20(%rsp)
movsd (%rsp), %xmm0
callq 0x1130
movsd (%rbx,%r15), %xmm1
movsd 0x8(%rbx,%r15), %xmm2
movapd 0x20(%rsp), %xmm4
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm2, %xmm4
mulsd %xmm0, %xmm1
subsd %xmm1, %xmm4
mulsd %xmm2, %xmm0
addsd %xmm3, %xmm0
unpcklpd %xmm4, %xmm0            # xmm0 = xmm0[0],xmm4[0]
movupd (%rbp), %xmm1
addpd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm2
movupd %xmm1, (%rbp)
movsd (%rsp), %xmm0
addsd %xmm2, %xmm0
addq $0x10, %r15
cmpq %r15, %r12
jne 0x1e0c
addsd 0x8(%rsp), %xmm2
incq %r13
cmpq 0x10(%rsp), %r13
jne 0x1dea
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x13d8
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/dft.c
// Function: tt_idft
int tt_idft(double (*out)[2], double (*in)[2], uint N)
{
	tt_assert(N);

	double en = 0;
	double edelta = 2 * _TT_PI / N;
	for (uint n = 0; n < N; n++) {
		out[n][0] = out[n][1] = 0;

		double enm = 0;
		for (uint m = 0; m < N; m++) {
			double e[2] = { cos(enm), sin(enm) };
			double t[2];
			tt_complex_mul(t, in[m], e);
			out[n][0] += t[0];
			out[n][1] += t[1];

			enm += en;
		}
		out[n][0] /= N;
		out[n][1] /= N;

		en += edelta;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testl %edx, %edx
je 0x1fbf
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r12d
cvtsi2sd %r12, %xmm0
movsd 0x348b(%rip), %xmm1     # 0x5360
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movapd %xmm0, 0x20(%rsp)
movq %r12, 0x10(%rsp)
shlq $0x4, %r12
xorpd %xmm1, %xmm1
xorl %r13d, %r13d
movq %r13, %rax
shlq $0x4, %rax
leaq (%r14,%rax), %rbp
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14,%rax)
xorl %r15d, %r15d
xorps %xmm2, %xmm2
movsd %xmm1, 0x18(%rsp)
movsd %xmm2, (%rsp)
movaps %xmm2, %xmm0
callq 0x10d0
movaps %xmm0, 0x30(%rsp)
movsd (%rsp), %xmm0
callq 0x1130
movsd (%rbx,%r15), %xmm1
movsd 0x8(%rbx,%r15), %xmm2
movapd 0x30(%rsp), %xmm4
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm0, %xmm1
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm4
movsd (%rsp), %xmm2
addsd %xmm1, %xmm4
movsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm3
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
movupd (%rbp), %xmm0
addpd %xmm3, %xmm0
movupd %xmm0, (%rbp)
addsd %xmm1, %xmm2
addq $0x10, %r15
cmpq %r15, %r12
jne 0x1f1a
divpd 0x20(%rsp), %xmm0
movupd %xmm0, (%rbp)
addsd 0x8(%rsp), %xmm1
incq %r13
cmpq 0x10(%rsp), %r13
jne 0x1ef9
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1400
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/dft.c
// Function: tt_dft_real
int tt_dft_real(double (*out)[2], const double *in, uint N)
{
	tt_assert(N);

	double em = 0;
	double edelta = 2 * _TT_PI / N;
	for (uint m = 0; m < N; m++) {
		out[m][0] = out[m][1] = 0;

		double emn = 0;
		for (uint n = 0; n < N; n++) {
			out[m][0] += cos(emn) * in[n];
			out[m][1] += -sin(emn) * in[n];

			emn += em;
		}

		em += edelta;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %edx, %edx
je 0x2092
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
cvtsi2sd %r15, %xmm0
movsd 0x3370(%rip), %xmm1     # 0x5360
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
xorpd %xmm2, %xmm2
xorl %r12d, %r12d
movq %r12, %rax
shlq $0x4, %rax
leaq (%r14,%rax), %r13
xorpd %xmm1, %xmm1
movupd %xmm1, (%r14,%rax)
xorl %ebp, %ebp
xorpd %xmm0, %xmm0
movsd %xmm2, 0x10(%rsp)
movsd %xmm0, (%rsp)
callq 0x10d0
mulsd (%rbx,%rbp,8), %xmm0
addsd (%r13), %xmm0
movsd %xmm0, (%r13)
movsd (%rsp), %xmm0
callq 0x1130
movsd 0x8(%r13), %xmm1
mulsd (%rbx,%rbp,8), %xmm0
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm2
movsd %xmm1, 0x8(%r13)
movsd (%rsp), %xmm0
addsd %xmm2, %xmm0
incq %rbp
cmpq %rbp, %r15
jne 0x2022
addsd 0x8(%rsp), %xmm2
incq %r12
cmpq %r15, %r12
jne 0x2001
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1428
nop
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/fft.c
// Function: gen_wn_tbl
static double (*gen_wn_tbl(int N))[2]
{
	double wn = 0;
	const double step = 2 * _TT_PI / N;
	double (*tbl)[2] = malloc(N / 2 * sizeof(*tbl));

	if (tbl == NULL) {
		tt_error("Out of memory");
		return NULL;
	}

	for (int i = 0; i < N / 4; i++) {
		tbl[i][0] = cos(wn);
		tbl[i][1] = -sin(wn);
		tbl[i+N/4][0] = tbl[i][1];
		tbl[i+N/4][1] = -tbl[i][0];
		wn += step;
	}

	return tbl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %r14d
shrl %edi
shlq $0x4, %rdi
callq 0x1120
movq %rax, %rbx
testq %rax, %rax
je 0x2191
cmpl $0x4, %r14d
jb 0x21a8
cvtsi2sd %r14d, %xmm0
movsd 0x3253(%rip), %xmm1     # 0x5360
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
shrl $0x2, %r14d
shlq $0x4, %r14
leaq (%r14,%rbx), %r15
addq $0x8, %r15
xorpd %xmm0, %xmm0
xorl %r12d, %r12d
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x10d0
movsd %xmm0, (%rbx,%r12)
movsd 0x8(%rsp), %xmm0
callq 0x1130
movapd 0x31e8(%rip), %xmm1     # 0x5340
xorpd %xmm1, %xmm0
movlpd %xmm0, 0x8(%rbx,%r12)
movlpd %xmm0, -0x8(%r15,%r12)
movsd (%rbx,%r12), %xmm0
xorpd %xmm1, %xmm0
movlpd %xmm0, (%r15,%r12)
movsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
addq $0x10, %r12
cmpq %r12, %r14
jne 0x212e
jmp 0x21a8
leaq 0x3146(%rip), %rsi      # 0x52de
leaq 0x314a(%rip), %rdx      # 0x52e9
xorl %edi, %edi
xorl %eax, %eax
callq 0x290e
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/fft.c
// Function: tt_fft
int tt_fft(double (*out)[2], double (*in)[2], uint N)
{
	/* Check if N is 2^n */
	if (N <= 1 || (N & (N-1))) {
		tt_warn("%d is not power of 2, fallback to DFT", N);
		return tt_dft(out, in, N);
	}

	return do_stage(out, in, N, fft_stage);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x2, %edx
jb 0x2222
movl %ebx, %eax
shrl %eax
andl $0x55555555, %eax       # imm = 0x55555555
movl %ebx, %ecx
subl %eax, %ecx
movl $0x33333333, %eax       # imm = 0x33333333
movl %ecx, %edx
andl %eax, %edx
shrl $0x2, %ecx
andl %eax, %ecx
addl %edx, %ecx
movl %ecx, %eax
shrl $0x4, %eax
addl %ecx, %eax
andl $0xf0f0f0f, %eax        # imm = 0xF0F0F0F
imull $0x1010101, %eax, %eax  # imm = 0x1010101
shrl $0x18, %eax
cmpl $0x2, %eax
jae 0x2222
leaq 0x13c(%rip), %rcx       # 0x234f
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x2250
leaq 0x304d(%rip), %rsi      # 0x5276
leaq 0x304d(%rip), %rdx      # 0x527d
movl $0x1, %edi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x290e
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x1da4
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/fft.c
// Function: do_stage
static int do_stage(double (*out)[2], double (*in)[2], uint N,
		void (*stage)(double (*)[2], int, uint, double (*)[2], int))
{
	double (*tbl)[2];
	int delta;

	tbl = get_wn_tbl(N, &delta);
	if (!tbl)
		return TT_ENOMEM;

	/* Bit reversal */
	const int nb = __builtin_ctz(N);
	for (int i = 0; i < N ; i++)
		tt_complex_set(out[i], in[_tt_bitrev(i, nb)]);

	for (int i = 1; i <= nb; i++)
		stage(out, i, N, tbl, delta);

	put_wn_tbl(tbl);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r14
leaq 0x14(%rsp), %rsi
movl %edx, %edi
callq 0x27b6
testq %rax, %rax
je 0x2339
movq %rax, 0x18(%rsp)
movq %r14, %r15
movq %rbx, 0x20(%rsp)
movl %ebp, 0xc(%rsp)
bsfl %ebp, %r12d
je 0x22d4
movl 0xc(%rsp), %r14d
leaq 0x8(%r15), %rbp
xorl %ebx, %ebx
movl %ebx, %edi
movl %r12d, %esi
callq 0x28c9
movl %eax, %eax
shlq $0x4, %rax
movsd (%r13,%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd 0x8(%r13,%rax), %xmm0
movsd %xmm0, (%rbp)
incq %rbx
addq $0x10, %rbp
cmpq %rbx, %r14
jne 0x22a0
testl %r12d, %r12d
movq 0x20(%rsp), %rbp
movl 0xc(%rsp), %edx
movq 0x18(%rsp), %r14
je 0x2324
movq %r15, %rbx
movl 0x14(%rsp), %ecx
movl %ecx, 0x10(%rsp)
negl %r12d
movl $0x1, %r13d
movq %rbx, %rdi
movl %r13d, %esi
movl %edx, %r15d
movq %r14, %rcx
movl 0x10(%rsp), %r8d
callq *%rbp
movl %r15d, %edx
leal (%r12,%r13), %eax
incl %eax
movl %r13d, %ecx
incl %ecx
movl %ecx, %r13d
cmpl $0x1, %eax
jne 0x22fb
xorl %ebx, %ebx
cmpq %r14, 0x5deb(%rip)      # 0x8118
je 0x233e
movq %r14, %rdi
callq 0x1030
jmp 0x233e
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/fft.c
// Function: fft_stage
static void fft_stage(double (*x)[2], int stage, uint N,
		double (*tbl)[2], int delta)
{
	const int idx_step = 1 << (stage - 1);
	int idx;
	double tmp[2];

	/* Multiply W(N,k) */
	const int tbl_step = delta * (N >> stage);
	idx = idx_step;
	for (int i = 0; i < (N >> stage); i++) {
		int tbl_idx = 0;
		for (int j = 0; j < idx_step; j++) {
			tt_complex_mul(x[idx], x[idx], tbl[tbl_idx]);
			idx++;
			tbl_idx += tbl_step;
		}
		idx += idx_step;
	}

	/* Cross add/sub */
	idx = 0;
	for (int i = 0; i < (N >> stage); i++) {
		for (int j = 0; j < idx_step; j++) {
			tt_complex_add(tmp, x[idx], x[idx+idx_step]);
			tt_complex_sub(x[idx+idx_step], x[idx], x[idx+idx_step]);
			tt_complex_set(x[idx], tmp);
			idx++;
		}
		idx += idx_step;
	}
}

// Assembly:
movq %rcx, %r9
leal -0x1(%rsi), %eax
movl $0x1, %r11d
movl $0x1, %r10d
movl %eax, %ecx
shll %cl, %r10d
movl %esi, %ecx
shrl %cl, %edx
testl %edx, %edx
je 0x2479
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
imull %edx, %r8d
movslq %r8d, %rcx
cmpl $0x2, %r10d
cmovgel %r10d, %r11d
leaq 0x8(%rdi), %rsi
addq $0x8, %r9
shlq $0x4, %rcx
negl %r11d
xorl %r8d, %r8d
movl %r10d, %ebx
cmpl $0x1f, %eax
je 0x2401
movslq %ebx, %r14
shlq $0x4, %r14
addq %rsi, %r14
xorl %ebp, %ebp
movq %r9, %r15
movsd -0x8(%r14), %xmm0
movsd (%r14), %xmm1
movsd -0x8(%r15), %xmm2
movsd (%r15), %xmm3
movapd %xmm0, %xmm4
mulsd %xmm2, %xmm4
movapd %xmm1, %xmm5
mulsd %xmm3, %xmm5
subsd %xmm5, %xmm4
mulsd %xmm2, %xmm1
mulsd %xmm3, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%r14)
movsd %xmm4, -0x8(%r14)
addq $0x10, %r14
decl %ebp
addq %rcx, %r15
cmpl %ebp, %r11d
jne 0x23b0
subl %ebp, %ebx
addl %r10d, %ebx
incl %r8d
cmpl %edx, %r8d
jne 0x239c
movslq %r10d, %rcx
cmpl $0x2, %r10d
movl $0x1, %esi
cmovgel %r10d, %esi
shlq $0x4, %rcx
negl %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpl $0x1f, %eax
je 0x2468
movslq %r9d, %r11
shlq $0x4, %r11
addq %rdi, %r11
xorl %ebx, %ebx
movupd (%r11), %xmm0
movupd (%r11,%rcx), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
subpd %xmm1, %xmm0
movupd %xmm0, (%r11,%rcx)
movupd %xmm2, (%r11)
addq $0x10, %r11
decl %ebx
cmpl %ebx, %esi
jne 0x2439
subl %ebx, %r9d
addl %r10d, %r9d
incl %r8d
cmpl %edx, %r8d
jne 0x2428
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/fft.c
// Function: tt_ifft
int tt_ifft(double (*out)[2], double (*in)[2], uint N)
{
	if (N <= 1 || (N & (N-1))) {
		tt_warn("%d is not power of 2, fallback to IDFT", N);
		return tt_idft(out, in, N);
	}

	int ret = do_stage(out, in, N, ifft_stage);
	if (ret)
		return ret;

	/* Divide N */
	for (int i = 0; i < N; i++) {
		out[i][0] /= N;
		out[i][1] /= N;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x2, %edx
jb 0x2514
movl %ebp, %eax
shrl %eax
andl $0x55555555, %eax       # imm = 0x55555555
movl %ebp, %ecx
subl %eax, %ecx
movl $0x33333333, %eax       # imm = 0x33333333
movl %ecx, %edx
andl %eax, %edx
shrl $0x2, %ecx
andl %eax, %ecx
addl %edx, %ecx
movl %ecx, %eax
shrl $0x4, %eax
addl %ecx, %eax
andl $0xf0f0f0f, %eax        # imm = 0xF0F0F0F
imull $0x1010101, %eax, %eax  # imm = 0x1010101
shrl $0x18, %eax
cmpl $0x2, %eax
jae 0x2514
leaq 0x74(%rip), %rcx        # 0x2541
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x250f
movl %ebp, %ecx
cvtsi2sd %rcx, %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
shlq $0x4, %rcx
xorl %eax, %eax
xorl %edx, %edx
movupd (%rbx,%rdx), %xmm1
divpd %xmm0, %xmm1
movupd %xmm1, (%rbx,%rdx)
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x24f8
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2d88(%rip), %rsi      # 0x52a3
leaq 0x2d89(%rip), %rdx      # 0x52ab
movl $0x1, %edi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x290e
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x1ea9
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/fft.c
// Function: ifft_stage
static void ifft_stage(double (*x)[2], int stage, uint N,
		double (*tbl)[2], int delta)
{
	const int idx_step = 1 << (stage - 1);
	int idx;
	double tmp[2];

	const int tbl_step = delta * (N >> stage);
	idx = idx_step;
	for (int i = 0; i < (N >> stage); i++) {
		int tbl_idx = 0;
		for (int j = 0; j < idx_step; j++) {
			tmp[0] = tbl[tbl_idx][0];
			tmp[1] = -tbl[tbl_idx][1];
			tt_complex_mul(x[idx], x[idx], tmp);
			idx++;
			tbl_idx += tbl_step;
		}
		idx += idx_step;
	}

	idx = 0;
	for (int i = 0; i < (N >> stage); i++) {
		for (int j = 0; j < idx_step; j++) {
			tt_complex_add(tmp, x[idx], x[idx+idx_step]);
			tt_complex_sub(x[idx+idx_step], x[idx], x[idx+idx_step]);
			tt_complex_set(x[idx], tmp);
			idx++;
		}
		idx += idx_step;
	}
}

// Assembly:
movq %rcx, %r9
leal -0x1(%rsi), %eax
movl $0x1, %r11d
movl $0x1, %r10d
movl %eax, %ecx
shll %cl, %r10d
movl %esi, %ecx
shrl %cl, %edx
testl %edx, %edx
je 0x2667
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
imull %edx, %r8d
movslq %r8d, %rcx
cmpl $0x2, %r10d
cmovgel %r10d, %r11d
leaq 0x8(%rdi), %rsi
addq $0x8, %r9
shlq $0x4, %rcx
negl %r11d
xorl %r8d, %r8d
movl %r10d, %ebx
cmpl $0x1f, %eax
je 0x25ef
movslq %ebx, %r14
shlq $0x4, %r14
addq %rsi, %r14
xorl %ebp, %ebp
movq %r9, %r15
movsd -0x8(%r15), %xmm0
movsd (%r15), %xmm1
movsd -0x8(%r14), %xmm2
movsd (%r14), %xmm3
movapd %xmm0, %xmm4
mulsd %xmm2, %xmm4
mulsd %xmm3, %xmm0
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
movsd %xmm0, (%r14)
mulsd %xmm3, %xmm1
addsd %xmm4, %xmm1
movsd %xmm1, -0x8(%r14)
addq $0x10, %r14
decl %ebp
addq %rcx, %r15
cmpl %ebp, %r11d
jne 0x25a2
subl %ebp, %ebx
addl %r10d, %ebx
incl %r8d
cmpl %edx, %r8d
jne 0x258e
movslq %r10d, %rcx
cmpl $0x2, %r10d
movl $0x1, %esi
cmovgel %r10d, %esi
shlq $0x4, %rcx
negl %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpl $0x1f, %eax
je 0x2656
movslq %r9d, %r11
shlq $0x4, %r11
addq %rdi, %r11
xorl %ebx, %ebx
movupd (%r11), %xmm0
movupd (%r11,%rcx), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
subpd %xmm1, %xmm0
movupd %xmm0, (%r11,%rcx)
movupd %xmm2, (%r11)
addq $0x10, %r11
decl %ebx
cmpl %ebx, %esi
jne 0x2627
subl %ebx, %r9d
addl %r10d, %r9d
incl %r8d
cmpl %edx, %r8d
jne 0x2616
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/num/fft.c
// Function: tt_fft_real
int tt_fft_real(double (*out)[2], const double *in, uint N)
{
	if (N <= 1 || (N & (N-1))) {
		tt_warn("%d is not power of 2, fallback to DFT", N);
		return tt_dft_real(out, in, N);
	}

	double (*tbl)[2];
	int delta;

	tbl = get_wn_tbl(N, &delta);
	if (!tbl)
		return TT_ENOMEM;

	const int nb = __builtin_ctz(N);
	for (int i = 0; i < N ; i++) {
		out[i][0] = in[_tt_bitrev(i, nb)];
		out[i][1] = 0;
	}

	for (int i = 1; i <= nb; i++)
		fft_stage(out, i, N, tbl, delta);

	put_wn_tbl(tbl);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x2, %edx
jb 0x2769
movl %ebp, %eax
shrl %eax
andl $0x55555555, %eax       # imm = 0x55555555
movl %ebp, %ecx
subl %eax, %ecx
movl $0x33333333, %eax       # imm = 0x33333333
movl %ecx, %edx
andl %eax, %edx
shrl $0x2, %ecx
andl %eax, %ecx
addl %edx, %ecx
movl %ecx, %eax
shrl $0x4, %eax
addl %ecx, %eax
andl $0xf0f0f0f, %eax        # imm = 0xF0F0F0F
imull $0x1010101, %eax, %eax  # imm = 0x1010101
shrl $0x18, %eax
cmpl $0x2, %eax
jae 0x2769
leaq 0xc(%rsp), %rsi
movl %ebp, %edi
callq 0x27b6
testq %rax, %rax
je 0x27a0
movq %rax, %r15
movl %ebp, %r12d
bsfl %ebp, %r13d
movq %rbx, 0x10(%rsp)
addq $0x8, %rbx
xorl %ebp, %ebp
movl %ebp, %edi
movl %r13d, %esi
callq 0x28c9
movl %eax, %eax
movsd (%r14,%rax,8), %xmm0
movsd %xmm0, -0x8(%rbx)
movq $0x0, (%rbx)
incq %rbp
addq $0x10, %rbx
cmpq %rbp, %r12
jne 0x26ec
testl %r13d, %r13d
movq 0x10(%rsp), %rbx
je 0x2754
movl 0xc(%rsp), %ebp
negl %r13d
movl $0x1, %r14d
movq %rbx, %rdi
movl %r14d, %esi
movl %r12d, %edx
movq %r15, %rcx
movl %ebp, %r8d
callq 0x234f
leal (%r14,%r13), %eax
incl %eax
movl %r14d, %ecx
incl %ecx
movl %ecx, %r14d
cmpl $0x1, %eax
jne 0x272d
xorl %ebx, %ebx
cmpq %r15, 0x59bb(%rip)      # 0x8118
je 0x27a5
movq %r15, %rdi
callq 0x1030
jmp 0x27a5
leaq 0x2b62(%rip), %rsi      # 0x52d2
leaq 0x2b06(%rip), %rdx      # 0x527d
movl $0x1, %edi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x290e
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1fc4
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
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_O3/cyb70289[P]tt/src/num/fft.c
// Function: get_wn_tbl
static double (*get_wn_tbl(int N, int *delta))[2]
{
	if (N > WN_PTS) {
		tt_info("Points > %d, new lookup table created.", WN_PTS);
		*delta = 1;
		return gen_wn_tbl(N);
	} else {
		*delta = WN_PTS / N;
		return wn_ftbl;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x2001, %edi           # imm = 0x2001
jl 0x27f8
leaq 0x2b2a(%rip), %rsi      # 0x52f7
leaq 0x2b2e(%rip), %rdx      # 0x5302
movl $0x2, %edi
movl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
callq 0x290e
movl $0x1, (%rbx)
movl %ebp, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20d1
movl $0x2000, %eax           # imm = 0x2000
xorl %edx, %edx
idivl %ebp
movl %eax, (%rbx)
movq 0x590e(%rip), %rax      # 0x8118
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/lib.c
// Function: tt_digits
int _tt_digits(int n)
{
	int d = 1;
	n /= 10;

	while (n) {
		n /= 10;
		d++;
	}

	return d;
}

// Assembly:
leal 0x9(%rdi), %ecx
movl $0x1, %eax
cmpl $0x13, %ecx
jb 0x2845
movslq %edi, %rcx
imulq $0x66666667, %rcx, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
leal (%rcx,%rdx), %edi
incl %eax
addl %edx, %ecx
addl $0x9, %ecx
cmpl $0x12, %ecx
ja 0x2821
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/lib.c
// Function: tt_digits_ll
int _tt_digits_ll(long long int n)
{
	int d = 1;
	n /= 10;

	while (n) {
		n /= 10;
		d++;
	}

	return d;
}

// Assembly:
leaq 0x9(%rdi), %rdx
movl $0x1, %ecx
cmpq $0x13, %rdx
jb 0x2883
movq %rdi, %rax
movabsq $0x6666666666666667, %rsi # imm = 0x6666666666666667
imulq %rsi
movq %rdx, %rdi
shrq $0x3f, %rdi
sarq $0x2, %rdx
leaq (%rdx,%rdi), %rax
incl %ecx
addq %rdi, %rdx
addq $0x9, %rdx
cmpq $0x12, %rdx
ja 0x2862
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/lib.c
// Function: tt_atoi
int _tt_atoi(const char *str, int *i)
{
	const char *s = str;

	/* Check syntax */
	if (*s == '+' || *s == '-')
		s++;
	while (*s) {
		if (*s < '0' || *s > '9')
			return TT_EINVAL;
		s++;
	}

	/* XXX: check overflow/underflow */
	*i = atoi(str);
	return 0;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movzbl (%rdi), %eax
cmpl $0x2d, %eax
je 0x289a
movq %rdi, %rcx
cmpl $0x2b, %eax
jne 0x28a1
leaq 0x1(%rdi), %rcx
movb 0x1(%rdi), %al
testb %al, %al
je 0x28b7
incq %rcx
addb $-0x3a, %al
cmpb $-0xa, %al
jb 0x28c2
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x28a8
callq 0x1140
movl %eax, (%rbx)
xorl %eax, %eax
jmp 0x28c7
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/lib.c
// Function: tt_bitrev
uint _tt_bitrev(uint n, int bits)
{
	uint rev = n;
	uint cnt = bits - 1;
	uint N = 1 << bits;

	for (n >>= 1; n; n >>= 1) {
		rev <<= 1;
		rev |= (n & 1);
		cnt--;
	}

	rev <<= cnt;
	rev &= (N - 1);

	return rev;
}

// Assembly:
leal -0x1(%rsi), %ecx
cmpl $0x2, %edi
jb 0x28eb
bsrl %edi, %eax
subl %eax, %ecx
movl %edi, %edx
shrl %edi
movl %edi, %r8d
andl $0x1, %r8d
leal (%r8,%rdx,2), %edx
decl %eax
jne 0x28d8
movl %edx, %edi
shll %cl, %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %esi, %ecx
shll %cl, %eax
notl %eax
andl %edi, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/log.c
// Function: tt_log
void tt_log(int level, const char *func, const char *format, ...)
{
	tt_assert(level >= 0 && level < TT_LOG_MAX);

	if (__target == TT_LOG_TARGET_NULL)
		return;
	if (level > __level)
		return;

	va_list ap;
	va_start(ap, format);

	char msg[512+12];
	if (vsnprintf(msg, 512, format, ap) >= 512)
		snprintf(msg+511, 13, "<Truncated>");

	char meta[32];
	const char *prefix = "", *suffix = "";

	switch (__target) {
	case TT_LOG_TARGET_STDERR:
		if (level == TT_LOG_ERROR)
			prefix = "\x1B[1;31m";	/* Red bold */
		else if (level == TT_LOG_WARN)
			prefix = "\x1B[1;33m";	/* Yellow bold */
		else if (level == TT_LOG_INFO)
			prefix = "\x1B[1;37m";  /* White bold */
		if (prefix[0])
			suffix = "\x1B[0m";
		fprintf(stderr, "[%c]%s: %s%s%s\n", level2char[level], func,
				prefix, msg, suffix);
		break;

	case TT_LOG_TARGET_FD:
		snprintf(meta, 32, "\n[%c]%s: ", level2char[level], func);
		if (write(__fd, meta, strlen(meta)) < 0 ||
				write(__fd, msg, strlen(msg)) < 0) {
			tt_log_set_fd(-1);
			fprintf(stderr, "Error writing logs to file descriptor,"
					" redirect messges to console.\n");
			tt_log_set_target(TT_LOG_TARGET_STDERR);
		}
		break;

	default:
		break;
	}

	va_end(ap);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x300, %rsp            # imm = 0x300
movq %rcx, 0x58(%rsp)
movq %r8, 0x60(%rsp)
movq %r9, 0x68(%rsp)
testb %al, %al
je 0x2969
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
cmpl $0x4, %edi
jae 0x2a98
cmpl $0x2, 0x57a7(%rip)      # 0x8120
je 0x2a85
movl %edi, %ebp
cmpl %edi, 0x5741(%rip)      # 0x80c8
jl 0x2a85
movq %rsi, %rbx
leaq 0x40(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x320(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
leaq 0xf0(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x1060
cmpl $0x200, %eax            # imm = 0x200
jl 0x29eb
movabsq $0x7461636e7572543c, %rax # imm = 0x7461636E7572543C
movq %rax, 0x2ef(%rsp)
movl $0x3e6465, 0x2f7(%rsp) # imm = 0x3E6465
movl 0x572f(%rip), %eax      # 0x8120
cmpl $0x1, %eax
je 0x2a12
testl %eax, %eax
jne 0x2a85
leaq 0xf0(%rsp), %rdx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x14be
jmp 0x2a85
movl %ebp, %eax
leaq 0x2d82(%rip), %rcx      # 0x579d
movsbl (%rax,%rcx), %ecx
leaq 0x2a02(%rip), %rdx      # 0x5428
leaq 0x20(%rsp), %r14
movl $0x20, %esi
movq %r14, %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0x10b0
movl 0x5689(%rip), %ebx      # 0x80cc
movq %r14, %rdi
callq 0x1090
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1070
testq %rax, %rax
js 0x2a91
movl 0x5669(%rip), %ebx      # 0x80cc
leaq 0xf0(%rsp), %r14
movq %r14, %rdi
callq 0x1090
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1070
testq %rax, %rax
js 0x2a91
addq $0x300, %rsp            # imm = 0x300
popq %rbx
popq %r14
popq %rbp
retq
callq 0x1478
jmp 0x2a85
callq 0x151f
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/log.c
// Function: tt_log_set_fd
void tt_log_set_fd(int fd)
{
	if (fd >= 0) {
		__fd = fd;
	} else if (__fd >= 0) {
		tt_log_set_target(TT_LOG_TARGET_STDERR);
		close(__fd);
		__fd = -1;
	}
}

// Assembly:
testl %edi, %edi
jns 0x2adc
movl 0x560d(%rip), %edi      # 0x80cc
testl %edi, %edi
js 0x2ae2
pushq %rax
movl $0x0, 0x5652(%rip)      # 0x8120
callq 0x10c0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
addq $0x8, %rsp
movl %edi, 0x55ea(%rip)      # 0x80cc
retq
nop
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/key.c
// Function: tt_key_select
int _tt_key_select(struct tt_key *num)
{
	if (!num->swap)
		num->swap = tt_swap_select(num->size);
	if (!num->cmp) {
		tt_error("No compare routine");
		return TT_EINVAL;
	}
	num->_set = tt_set_select(num->size);

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
jne 0x2b3d
movl (%rbx), %eax
decl %eax
cmpl $0x7, %eax
ja 0x2b18
movl %eax, %eax
leaq 0x2890(%rip), %rcx      # 0x5394
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
leaq 0x526e(%rip), %rcx      # 0x7d80
movq (%rcx,%rax,8), %r14
jmp 0x2b26
leaq 0x14d(%rip), %r14       # 0x2c6c
leaq 0x29b1(%rip), %rdx      # 0x54d7
leaq 0x296c(%rip), %rsi      # 0x5499
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
movq %r14, 0x10(%rbx)
cmpq $0x0, 0x8(%rbx)
je 0x2b87
movl (%rbx), %eax
decl %eax
cmpl $0x7, %eax
ja 0x2c11
leaq 0x281c(%rip), %rcx      # 0x5374
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x297c(%rip), %rsi      # 0x54e4
leaq 0x2983(%rip), %rdx      # 0x54f2
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
leaq 0x151(%rip), %rax       # 0x2cd3
jmp 0x2c32
leaq 0x28e9(%rip), %rsi      # 0x5477
leaq 0x28f1(%rip), %rdx      # 0x5486
xorl %edi, %edi
xorl %eax, %eax
callq 0x290e
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x2c38
leaq 0x2935(%rip), %rsi      # 0x54e4
leaq 0x2951(%rip), %rdx      # 0x5507
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
leaq 0x116(%rip), %rax       # 0x2cdf
jmp 0x2c32
leaq 0x2912(%rip), %rsi      # 0x54e4
leaq 0x2923(%rip), %rdx      # 0x54fc
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
leaq 0xec(%rip), %rax        # 0x2cd8
jmp 0x2c32
leaq 0x28ef(%rip), %rsi      # 0x54e4
leaq 0x2916(%rip), %rdx      # 0x5512
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
leaq 0xd5(%rip), %rax        # 0x2ce4
jmp 0x2c32
leaq 0x28cc(%rip), %rsi      # 0x54e4
leaq 0x28fe(%rip), %rdx      # 0x551d
movl $0x2, %edi
xorl %eax, %eax
callq 0x290e
leaq 0xb9(%rip), %rax        # 0x2ceb
movq %rax, 0x18(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/key.c
// Function: tt_swap_general
static void tt_swap_general(const struct tt_key *num, void *v1, void *v2)
{
	int size4 = num->size / 4;
	int size1 = num->size % 4;

	while (size4--) {
		int32_t tmp = *(int32_t *)v1;
		*(int32_t *)v1 = *(int32_t *)v2;
		*(int32_t *)v2 = tmp;
		v1 += 4;
		v2 += 4;
	}

	while (size1--) {
		int8_t tmp = *(int8_t *)v1;
		*(int8_t *)v1 = *(int8_t *)v2;
		*(int8_t *)v2 = tmp;
		v1++;
		v2++;
	}
}

// Assembly:
movl (%rdi), %eax
leal 0x3(%rax), %edi
testl %eax, %eax
movl %eax, %ecx
cmovsl %edi, %ecx
movl %ecx, %r8d
andl $-0x4, %r8d
subl %r8d, %eax
cmpl $0x7, %edi
jb 0x2cb3
sarl $0x2, %ecx
movl %ecx, %edi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl (%rsi,%r8,4), %r9d
movl (%rdx,%r8,4), %r10d
movl %r10d, (%rsi,%r8,4)
movl %r9d, (%rdx,%r8,4)
incq %r8
addq $-0x4, %rcx
cmpl %r8d, %edi
jne 0x2c91
subq %rcx, %rsi
subq %rcx, %rdx
testl %eax, %eax
je 0x2cd2
movl %eax, %eax
xorl %ecx, %ecx
movb (%rsi,%rcx), %dil
movb (%rdx,%rcx), %r8b
movb %r8b, (%rsi,%rcx)
movb %dil, (%rdx,%rcx)
incq %rcx
cmpl %ecx, %eax
jne 0x2cbb
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/rand.c
// Function: tt_rand
uint _tt_rand(void)
{
	uint r;

	pthread_mutex_lock(&_mtx);
	if (_si == -1)
		__tt_srand(clock());
	r = __tt_rand();
	pthread_mutex_unlock(&_mtx);

	return r;
}

// Assembly:
pushq %rbx
leaq 0x538e(%rip), %rdi      # 0x8130
callq 0x1160
movslq 0x5326(%rip), %rcx      # 0x80d4
cmpq $-0x1, %rcx
je 0x2dc8
cmpl $0x270, %ecx            # imm = 0x270
jne 0x2ecc
movl 0x539a(%rip), %eax      # 0x8160
jmp 0x2dff
callq 0x1080
movl %eax, 0x538d(%rip)      # 0x8160
movl $0x1, %ecx
leaq 0x5381(%rip), %rdx      # 0x8160
movl %eax, %esi
movl %esi, %edi
shrl $0x1e, %edi
xorl %esi, %edi
imull $0x6c078965, %edi, %esi # imm = 0x6C078965
addl %ecx, %esi
movl %esi, (%rdx,%rcx,4)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x2de1
xorl %esi, %esi
leaq 0x5358(%rip), %rdx      # 0x8160
leaq 0x2995(%rip), %rcx      # 0x57a4
andl $0x80000000, %eax       # imm = 0x80000000
movl 0x4(%rdx,%rsi,4), %edi
movl %edi, %r8d
andl $0x7ffffffe, %r8d       # imm = 0x7FFFFFFE
orl %eax, %r8d
shrl %r8d
movl %edi, %eax
andl $0x1, %edi
movl (%rcx,%rdi,4), %edi
xorl 0x634(%rdx,%rsi,4), %edi
xorl %r8d, %edi
movl %edi, (%rdx,%rsi,4)
leaq 0x1(%rsi), %rdi
movq %rdi, %rsi
cmpq $0xe3, %rdi
jne 0x2e0f
movl 0x5699(%rip), %esi      # 0x84ec
xorl %eax, %eax
andl $0x80000000, %esi       # imm = 0x80000000
movl 0x390(%rdx,%rax,4), %edi
movl %edi, %r8d
andl $0x7ffffffe, %r8d       # imm = 0x7FFFFFFE
orl %esi, %r8d
shrl %r8d
movl %edi, %esi
andl $0x1, %edi
movl (%rcx,%rdi,4), %edi
xorl (%rdx,%rax,4), %edi
xorl %r8d, %edi
movl %edi, 0x38c(%rdx,%rax,4)
incq %rax
cmpq $0x18c, %rax            # imm = 0x18C
jne 0x2e55
movl $0x80000000, %edx       # imm = 0x80000000
andl 0x5c7f(%rip), %edx      # 0x8b1c
movl 0x52bd(%rip), %eax      # 0x8160
movl %eax, %esi
andl $0x7ffffffe, %esi       # imm = 0x7FFFFFFE
orl %edx, %esi
movl %eax, %edx
andl $0x1, %edx
movl (%rcx,%rdx,4), %ecx
xorl 0x58d5(%rip), %ecx      # 0x8790
shrl %esi
xorl %esi, %ecx
movl %ecx, 0x5c57(%rip)      # 0x8b1c
movl $0x1, %ecx
jmp 0x2ed8
leaq 0x528d(%rip), %rax      # 0x8160
movl (%rax,%rcx,4), %eax
incl %ecx
movl %ecx, 0x51f6(%rip)      # 0x80d4
movl %eax, %ecx
shrl $0xb, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0x7, %eax
andl $0x9d2c5680, %eax       # imm = 0x9D2C5680
xorl %ecx, %eax
movl %eax, %ecx
shll $0xf, %ecx
andl $0xefc60000, %ecx       # imm = 0xEFC60000
xorl %eax, %ecx
movl %ecx, %ebx
shrl $0x12, %ebx
xorl %ecx, %ebx
leaq 0x5224(%rip), %rdi      # 0x8130
callq 0x1110
movl %ebx, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/sort.c
// Function: tt_sort
int tt_sort(struct tt_sort_input *input)
{
	tt_assert(input->alg >= 0 && input->alg < TT_SORT_MAX);

	_tt_key_select(&input->num);

	struct tt_sort_stat stat;
	memset(&stat, 0, sizeof(struct tt_sort_stat));
	stat.tail = input->count - 1;	/* Only for quick sort */
	int ret = tt_sort_internal[input->alg](input, &stat);

	tt_debug("time: %u, space: %u", stat.time, stat.space);

	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpl $0x4, 0x2c(%rdi)
jae 0x2f80
movq %rdi, %rbx
callq 0x2ae4
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movl 0x28(%rbx), %eax
decl %eax
movl %eax, 0x10(%r14)
movl 0x2c(%rbx), %eax
leaq 0x4e76(%rip), %rcx      # 0x7dc0
movq %rbx, %rdi
movq %r14, %rsi
callq *(%rcx,%rax,8)
movl %eax, %ebx
movl (%r14), %ecx
movl 0x4(%r14), %r8d
leaq 0x25e9(%rip), %rsi      # 0x554c
leaq 0x25fc(%rip), %rdx      # 0x5566
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
callq 0x1597
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/sort.c
// Function: tt_sort_insert
static int tt_sort_insert(struct tt_sort_input *in, struct tt_sort_stat *stat)
{
	/* Allocate buffer for one temporary element */
	char tmp[in->num.size] _tt_align(8);
	stat->space += 1;

	void *p = in->data;
	for (int i = 1; i < in->count; i++) {
		p += in->num.size;
		/* tmp = data[i] */
		in->num._set(&in->num, tmp, p);
		/* Insert data[i] into sorted list data[0] ~ data[i-1] */
		void *q = p - in->num.size;
		for (int j = i - 1; j >= 0; q -= in->num.size, j--) {
			stat->time++;	/* Compare */
			/* if (tmp < data[j]) */
			if (in->num.cmp(&in->num, tmp, q) < 0) {
				/* data[j+1] = data[j] */
				in->num._set(&in->num, q + in->num.size, q);
				stat->time++;	/* Set */
			} else {
				break;
			}
		}
		/* data[j+1] = tmp */
		in->num._set(&in->num, q + in->num.size, tmp);
		stat->time++;	/* Set */
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl (%rdi), %eax
movq %rsp, %r15
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
incl 0x4(%rsi)
cmpl $0x2, 0x28(%rdi)
jb 0x3054
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rcx
movl $0x1, %eax
movl $0x2, %r12d
movl %eax, -0x30(%rbp)
movslq (%r14), %r13
addq %rcx, %r13
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq *0x18(%r14)
movslq (%r14), %rax
movq %r13, -0x38(%rbp)
subq %rax, %r13
movl (%rbx), %eax
movl %r12d, -0x2c(%rbp)
incl %eax
movl %eax, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq *0x8(%r14)
movslq (%r14), %rsi
testl %eax, %eax
jns 0x302b
addq %r13, %rsi
movq %r14, %rdi
movq %r13, %rdx
callq *0x18(%r14)
movl (%rbx), %eax
incl %eax
movl %eax, (%rbx)
movslq (%r14), %rsi
subq %rsi, %r13
decl %r12d
cmpl $0x1, %r12d
jg 0x2ff1
addq %r13, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq *0x18(%r14)
incl (%rbx)
movl -0x30(%rbp), %eax
incl %eax
movl -0x2c(%rbp), %r12d
incl %r12d
cmpl 0x28(%r14), %eax
movq -0x38(%rbp), %rcx
jb 0x2fcb
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/sort.c
// Function: tt_sort_heap
static int tt_sort_heap(struct tt_sort_input *in, struct tt_sort_stat *stat)
{
	struct tt_heap heap = {
		.num	= in->num,
		.data	= in->data,
		.cap	= in->count,
		.htype	= TT_HEAP_MAX,
	};

	int ret = tt_heap_init(&heap);
	if (ret)
		return ret;

	/* Build heap */
	tt_heap_build(&heap, heap.cap);

	void *head = heap.data;
	heap.__heaplen--;
	void *end = sort_ptr(&heap, heap.__heaplen);
	for (; heap.__heaplen >= 1; heap.__heaplen--) {
		/* NOTE: Heap length is __heaplen+1 */
		/* Swap [0] with [__heaplen] */
		heap.num.swap(&heap.num, head, end);
		end -= heap.num.size;
		/* [__heaplen] is OK, let's heapify [0] ~ [__heaplen-1] */
		tt_heap_heapify(&heap, 0);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movq %rsp, %rax
movaps %xmm1, 0x10(%rax)
movaps %xmm0, (%rax)
movq 0x20(%rdi), %rcx
movq %rcx, 0x20(%rax)
movl 0x28(%rdi), %ecx
movl %ecx, 0x28(%rax)
movq $0x0, 0x2c(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rax)
movq %rax, %rdi
callq 0x3bdf
movl %eax, %ebp
testl %eax, %eax
jne 0x32e1
movl 0x28(%rsp), %ebx
movl %ebx, 0x30(%rsp)
cmpl $0x2, %ebx
jb 0x32a1
shrl %ebx
incl %ebx
movq %rsp, %r14
leal -0x2(%rbx), %esi
movq %r14, %rdi
callq *0x38(%rsp)
decl %ebx
cmpl $0x1, %ebx
ja 0x328c
movl 0x30(%rsp), %ebx
movq 0x20(%rsp), %r14
decl %ebx
movl %ebx, 0x30(%rsp)
je 0x32df
movq %rsp, %r15
imull (%r15), %ebx
addq %r14, %rbx
xorl %ebp, %ebp
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq *0x10(%rsp)
movslq (%rsp), %rax
subq %rax, %rbx
movq %r15, %rdi
xorl %esi, %esi
callq *0x38(%rsp)
decl 0x30(%rsp)
jne 0x32ba
jmp 0x32e1
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/stack.c
// Function: tt_stack_init
int tt_stack_init(struct tt_stack *stack)
{
	if (stack->cap) {
		/* Allocate fixed array */
		stack->_data = malloc(stack->esize * stack->cap);
		if (!stack->_data)
			return TT_ENOMEM;
		stack->_top = stack->_data;
		stack->_push = tt_stack_push_array;
		stack->_pop = tt_stack_pop_array;
		tt_debug("Stack created, max elements = %u", stack->cap);
	} else {
		/* XXX: Allocate tt_list struct before element,
		 * the stack element only ensures 8-bytes alignment
		 */
		tt_assert(sizeof(struct tt_list) % 8 == 0);
		/* Initialize list head */
		tt_list_init(&stack->_head);
		stack->_push = tt_stack_push_list;
		stack->_pop = tt_stack_pop_list;
		tt_debug("Dynamic stack created");
	}

	stack->_count = 0;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %ebp
testl %ebp, %ebp
je 0x3660
movl 0x4(%rbx), %edi
imull %ebp, %edi
callq 0x1120
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x36a7
movq %rax, 0x18(%rbx)
leaq 0x80(%rip), %rax        # 0x36b3
movq %rax, 0x20(%rbx)
leaq 0xbb(%rip), %rax        # 0x36f9
movq %rax, 0x28(%rbx)
leaq 0x1f31(%rip), %rsi      # 0x557a
leaq 0x1f38(%rip), %rdx      # 0x5588
movl $0x3, %edi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x290e
jmp 0x369c
leaq 0x10(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
leaq 0xd1(%rip), %rax        # 0x3744
movq %rax, 0x20(%rbx)
leaq 0x12b(%rip), %rax       # 0x37a9
movq %rax, 0x28(%rbx)
leaq 0x1ef1(%rip), %rsi      # 0x557a
leaq 0x1f19(%rip), %rdx      # 0x55a9
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
movl $0x0, 0x8(%rbx)
xorl %eax, %eax
jmp 0x36ac
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/stack.c
// Function: tt_stack_push_array
static int tt_stack_push_array(struct tt_stack *stack, const void *e)
{
	if (stack->_count >= stack->cap) {
		tt_debug("Overflow");
		return TT_EOVERFLOW;
	}
	memcpy(stack->_top, e, stack->esize);
	stack->_top += stack->esize;

	stack->_count++;
	return 0;
}

// Assembly:
pushq %rbx
movl 0x8(%rdi), %eax
cmpl (%rdi), %eax
jae 0x36d8
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl 0x4(%rbx), %edx
callq 0x1100
movl 0x4(%rbx), %eax
addq %rax, 0x18(%rbx)
incl 0x8(%rbx)
xorl %eax, %eax
jmp 0x36f7
leaq 0x1efe(%rip), %rsi      # 0x55dd
leaq 0x1f0b(%rip), %rdx      # 0x55f1
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/stack.c
// Function: tt_stack_pop_array
static int tt_stack_pop_array(struct tt_stack *stack, void *e)
{
	if (stack->_count == 0) {
		tt_debug("Underflow");
		return TT_EUNDERFLOW;
	}
	stack->_top -= stack->esize;
	memcpy(e, stack->_top, stack->esize);

	stack->_count--;
	return 0;
}

// Assembly:
pushq %rbx
cmpl $0x0, 0x8(%rdi)
je 0x3723
movq %rdi, %rbx
movl 0x4(%rdi), %edx
movq 0x18(%rdi), %rax
subq %rdx, %rax
movq %rax, 0x18(%rdi)
movq %rsi, %rdi
movq %rax, %rsi
callq 0x1100
decl 0x8(%rbx)
xorl %eax, %eax
jmp 0x3742
leaq 0x1ed0(%rip), %rsi      # 0x55fa
leaq 0x1edc(%rip), %rdx      # 0x560d
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/stack.c
// Function: tt_stack_push_list
static int tt_stack_push_list(struct tt_stack *stack, const void *e)
{
	void *se = malloc(sizeof(struct tt_list) + stack->esize);
	if (!se)
		return TT_EOVERFLOW;
	memcpy(se + sizeof(struct tt_list), e, stack->esize);
	tt_list_add(se, &stack->_head);

	stack->_count++;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %r12d
leaq 0x10(%r12), %rdi
callq 0x1120
testq %rax, %rax
je 0x3798
movq %rax, %r15
movq %rax, %rdi
addq $0x10, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1100
leaq 0x10(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %r15, 0x10(%rbx)
movq %rax, 0x8(%r15)
movq %rcx, (%r15)
movq %r15, 0x8(%rcx)
incl 0x8(%rbx)
xorl %eax, %eax
jmp 0x379d
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/stack.c
// Function: tt_stack_pop_list
static int tt_stack_pop_list(struct tt_stack *stack, void *e)
{
	if (stack->_count == 0) {
		tt_debug("Underflow");
		return TT_EUNDERFLOW;
	}
	void *top = stack->_head.prev;
	memcpy(e, top + sizeof(struct tt_list), stack->esize);
	tt_list_del(top);
	free(top);

	stack->_count--;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x8(%rdi)
je 0x37e9
movq %rdi, %rbx
movq 0x10(%rdi), %r14
leaq 0x10(%r14), %rax
movl 0x4(%rdi), %edx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x1100
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq %r14, %rdi
callq 0x1030
decl 0x8(%rbx)
xorl %eax, %eax
jmp 0x3808
leaq 0x1e27(%rip), %rsi      # 0x5617
leaq 0x1e16(%rip), %rdx      # 0x560d
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/stack.c
// Function: tt_stack_free
void tt_stack_free(struct tt_stack *stack)
{
	if (stack->cap) {
		/* Free the array */
		free(stack->_data);
		stack->_data = NULL;
	} else {
		/* Free the list */
		struct tt_list *pos, *tmp;
		tt_list_for_each_safe(pos, tmp, &stack->_head)
			free(pos);
	}

	tt_debug("Stack destroyed");
	stack->_count = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
cmpl $0x0, (%rdi)
je 0x3832
movq (%r14), %rdi
callq 0x1030
movq $0x0, (%r14)
jmp 0x384c
movq 0x18(%rbx), %rdi
cmpq %r14, %rdi
je 0x384c
movq 0x8(%rdi), %r15
callq 0x1030
movq %r15, %rdi
cmpq %r14, %r15
jne 0x383b
leaq 0x1d6c(%rip), %rsi      # 0x55bf
leaq 0x1d73(%rip), %rdx      # 0x55cd
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
movl $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/common/queue.c
// Function: tt_queue_init
int tt_queue_init(struct tt_queue *queue)
{
	if (queue->cap) {
		/* Allocate fixed array */
		queue->_data = malloc(queue->esize * queue->cap);
		if (!queue->_data)
			return TT_ENOMEM;
		queue->_qhead = queue->_qtail = queue->_data;
		queue->_enque = tt_queue_enque_array;
		queue->_deque = tt_queue_deque_array;
		tt_debug("Queue created, max elements = %u", queue->cap);
	} else {
		/* XXX: Allocate tt_list struct before element,
		 * the queue element only ensures 8-bytes alignment
		 */
		tt_assert(sizeof(struct tt_list) % 8 == 0);
		/* Initialize list head */
		tt_list_init(&queue->_head);
		queue->_enque = tt_queue_enque_list;
		queue->_deque = tt_queue_deque_list;
		tt_debug("Dynamic queue created");
	}

	queue->_count = 0;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %ebp
testl %ebp, %ebp
je 0x38d4
movl 0x4(%rbx), %edi
imull %ebp, %edi
callq 0x1120
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x391b
movq %rax, 0x20(%rbx)
movq %rax, 0x18(%rbx)
leaq 0x80(%rip), %rax        # 0x3927
movq %rax, 0x28(%rbx)
leaq 0xd2(%rip), %rax        # 0x3984
movq %rax, 0x30(%rbx)
leaq 0x1d6c(%rip), %rsi      # 0x5629
leaq 0x1d73(%rip), %rdx      # 0x5637
movl $0x3, %edi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x290e
jmp 0x3910
leaq 0x10(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
leaq 0xff(%rip), %rax        # 0x39e6
movq %rax, 0x28(%rbx)
leaq 0x159(%rip), %rax       # 0x3a4b
movq %rax, 0x30(%rbx)
leaq 0x1d2c(%rip), %rsi      # 0x5629
leaq 0x1d54(%rip), %rdx      # 0x5658
movl $0x3, %edi
xorl %eax, %eax
callq 0x290e
movl $0x0, 0x8(%rbx)
xorl %eax, %eax
jmp 0x3920
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq