LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/reduce.c
// Function: eval_send
BEH_DECL(eval_send)
{
	CONS* msg = WHAT;
	CONS* expr = map_get(msg, expr_symbol);
	CONS* state = MINE;
	CONS* cont = map_get(state, cont_symbol);
/*	CONS* env = map_get(state, env_symbol); */
	CONS* actor;

	DBUG_ENTER("eval_send");
	actor = car(expr);
	if (actorp(actor)) {
		DBUG_PRINT("", ("actor=%s", cons_to_str(actor)));
		expr = car(cdr(expr));
		DBUG_PRINT("", ("msg=%s", cons_to_str(expr)));
		SEND(actor, expr);
		/* FIXME: should send return NIL, rather than the message sent? */
	} else {	/* error */
		SEND(an_error, ATOM("send: actor required"));
		expr = undefined_symbol;
	}
	SEND(cont, map_put(NIL, expr_symbol, expr));
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x11685
movq 0x151c2(%rip), %rsi     # 0x1b148
movq %rax, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r12
movq 0x30(%rbx), %rdi
callq 0x115e6
movq %rax, %rdi
callq 0x96d9
movq 0x15195(%rip), %rsi     # 0x1b140
movq %rax, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r14
leaq 0xe450(%rip), %rax      # 0x1440f
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x153bc(%rip), %rbp     # 0x1b388
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x3fc, 0xc(%rdi)       # imm = 0x3FC
leaq 0x10b1c(%rip), %r13     # 0x16b04
movq %r13, 0x10(%rdi)
leaq 0x1513d(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1339a
movq %r12, %rdi
callq 0x115e6
movq %rax, %r15
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x60d2
leaq 0x15912(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x6063
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x12afc
testl %eax, %eax
je 0x6063
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x3ff, 0xc(%rax)       # imm = 0x3FF
movq %r15, %rdi
callq 0xb5b4
leaq 0xe3c0(%rip), %rdi      # 0x14419
movq %rax, %rsi
xorl %eax, %eax
callq 0x1340b
movq %r12, %rdi
callq 0x11685
movq %rax, %rdi
callq 0x115e6
movq %rax, %r12
leaq 0x158b3(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x60c2
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x12afc
testl %eax, %eax
je 0x60c2
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x401, 0xc(%rax)       # imm = 0x401
movq %r12, %rdi
callq 0xb5b4
leaq 0xe36a(%rip), %rdi      # 0x14422
movq %rax, %rsi
xorl %eax, %eax
callq 0x1340b
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xa30f
jmp 0x60fa
movq 0x15087(%rip), %r15     # 0x1b160
leaq 0xe349(%rip), %rdi      # 0x14429
callq 0xea73
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xa30f
movq 0x1506e(%rip), %r12     # 0x1b168
movq 0x15047(%rip), %rsi     # 0x1b148
leaq 0x151f0(%rip), %rdi     # 0x1b2f8
movq %r12, %rdx
callq 0x11b2c
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xa30f
movq %rsp, %rdi
movl $0x409, 0xc(%rdi)       # imm = 0x409
callq 0x1351f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/reduce.c
// Function: reduce_background
BEH_DECL(reduce_background)
{
	CONS* msg = WHAT;
	CONS* cont = map_get(msg, cont_symbol);

	DBUG_ENTER("reduce_background");
	SEND(cont, map_put(NIL, expr_symbol, NIL));
	msg = map_put(msg, cont_symbol, a_sink);		/* add to inbound message */
	SEND(a_reduce_args, msg);		/* FIXME: use parallel evaluation, rather than sequential, when available */
	DBUG_RETURN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x11685
movq %rax, %r15
movq 0x14567(%rip), %rsi     # 0x1b140
movq %rax, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r12
leaq 0xd8ef(%rip), %rax      # 0x144dc
movq %rsp, %r14
movq %rax, (%r14)
leaq 0x1478e(%rip), %rax     # 0x1b388
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%r14)
movl $0x4b7, 0xc(%r14)       # imm = 0x4B7
leaq 0xfeed(%rip), %rcx      # 0x16b04
movq %rcx, 0x10(%r14)
leaq 0x1450e(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%r14)
movq %rax, 0x20(%r14)
movq %r14, %rdi
callq 0x1339a
movq 0x1450f(%rip), %rsi     # 0x1b148
leaq 0x146b8(%rip), %rdi     # 0x1b2f8
movq %rdi, %rdx
callq 0x11b2c
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xa30f
movq 0x144e3(%rip), %rsi     # 0x1b140
movq 0x14534(%rip), %rdx     # 0x1b198
movq %r15, %rdi
callq 0x11b2c
movq 0x1451d(%rip), %rsi     # 0x1b190
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa30f
movl $0x4bb, 0xc(%r14)       # imm = 0x4BB
movq %r14, %rdi
callq 0x1351f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/reduce.c
// Function: eval_par
BEH_DECL(eval_par)
{
	CONS* msg = WHAT;
	CONS* expr = map_get(msg, expr_symbol);
	CONS* state = MINE;
	CONS* i = map_get(state, ATOM("i"));
	CONS* collect = map_get(state, cont_symbol);

	DBUG_ENTER("eval_par");
	assert(numberp(i));
	assert(actorp(collect));
	DBUG_PRINT("", ("i=%d expr=%s", MK_INT(i), cons_to_str(expr)));
	msg = NIL;
	msg = map_put(msg, ATOM("op"), ATOM("i"));
	msg = map_put(msg, ATOM("i"), i);
	msg = map_put(msg, expr_symbol, expr);
	SEND(collect, msg);
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x11685
movq 0x13b76(%rip), %rsi     # 0x1b148
movq %rax, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x115e6
movq %rax, %rdi
callq 0x96d9
movq %rax, %r15
leaq 0xcf09(%rip), %rdi      # 0x14503
callq 0xea73
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r12
movq 0x13b2a(%rip), %rsi     # 0x1b140
movq %r15, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r15
leaq 0xcf35(%rip), %rax      # 0x1455f
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x13d51(%rip), %rbp     # 0x1b388
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x54f, 0xc(%rdi)       # imm = 0x54F
leaq 0xf4b1(%rip), %r13      # 0x16b04
movq %r13, 0x10(%rdi)
leaq 0x13ad2(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1339a
movl %r12d, %eax
notl %eax
testb $0x3, %al
jne 0x7764
movl %r15d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x7783
leaq 0x142a2(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x76dd
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x12afc
testl %eax, %eax
je 0x76dd
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x552, 0xc(%rax)       # imm = 0x552
movq %r12, %r13
shrq $0x2, %r13
movq %r14, %rdi
callq 0xb5b4
leaq 0xcec0(%rip), %rdi      # 0x14590
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1340b
leaq 0xcb60(%rip), %rdi      # 0x14244
callq 0xea73
movq %rax, %r13
leaq 0xce10(%rip), %rbp      # 0x14503
movq %rbp, %rdi
callq 0xea73
leaq 0x13bf6(%rip), %rdi     # 0x1b2f8
movq %r13, %rsi
movq %rax, %rdx
callq 0x11b2c
movq %rax, %r13
movq %rbp, %rdi
callq 0xea73
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x11b2c
movq 0x13a1b(%rip), %rsi     # 0x1b148
movq %rax, %rdi
movq %r14, %rdx
callq 0x11b2c
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xa30f
movq %rsp, %rdi
movl $0x558, 0xc(%rdi)       # imm = 0x558
callq 0x1351f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcda6(%rip), %rdi      # 0x14511
leaq 0xc8bb(%rip), %rsi      # 0x1402d
leaq 0xcdef(%rip), %rcx      # 0x14568
movl $0x550, %edx            # imm = 0x550
callq 0x2100
leaq 0xcdf6(%rip), %rdi      # 0x14580
leaq 0xc89c(%rip), %rsi      # 0x1402d
leaq 0xcdd0(%rip), %rcx      # 0x14568
movl $0x551, %edx            # imm = 0x551
callq 0x2100
// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/reduce.c
// Function: assert_reduce
static void
assert_reduce(char* expr, char* value)
{
	CONS* expect;
	CONS* state;
	CONS* cont;
	
	expect = str_to_cons(value);
	state = map_put(NIL, ATOM("expect"), expect);
	cont = CFG_ACTOR(reduce_cfg, assert_msg, state);
	if (!expect || !reduce_line(reduce_cfg, expr, cont)) {
		fprintf(stderr, "assert_reduce: FAILED! %s -> %s\n", expr, value);
		abort();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xcfda
movq %rax, %r15
leaq 0xc76c(%rip), %rdi      # 0x14f1e
callq 0xea73
leaq 0x12b3a(%rip), %rdi     # 0x1b2f8
movq %rax, %rsi
movq %r15, %rdx
callq 0x11b2c
movq 0x12c08(%rip), %rdi     # 0x1b3d8
leaq 0xff8(%rip), %rsi       # 0x97cf
movq %rax, %rdx
callq 0xa232
testq %r15, %r15
je 0x8801
movq 0x12bed(%rip), %rdi     # 0x1b3d8
movq %r14, %rsi
movq %rax, %rdx
callq 0x7f15
testq %rax, %rax
je 0x8801
popq %rbx
popq %r14
popq %r15
retq
movq 0x127f0(%rip), %rax     # 0x1aff8
movq (%rax), %rdi
leaq 0xc713(%rip), %rsi      # 0x14f25
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2170
callq 0x2050
// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/reduce.c
// Function: read_reduce_print
static void
read_reduce_print(FILE* in, CONS* out)
{
	char buf[1024];
	CONFIG* cfg;
	
	DBUG_ENTER("read_reduce_print");
	cfg = init_reduce();
	if ((out == NULL) || !actorp(out)) {
		out = a_sink;
	}
	while (fgets(buf, sizeof(buf), in)) {
		if (!reduce_line(cfg, buf, out)) {
			break;
		}
	}
	DBUG_RETURN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc338(%rip), %rax      # 0x14f46
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x1276b(%rip), %rax     # 0x1b388
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x66b, 0xc(%rdi)       # imm = 0x66B
leaq 0xdecc(%rip), %rcx      # 0x16b04
movq %rcx, 0x10(%rdi)
leaq 0x124ed(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1339a
callq 0x8cb7
movq %rax, %r15
movl %r14d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
je 0x8c6a
movq 0x1252e(%rip), %r14     # 0x1b198
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdx
callq 0x2140
testq %rax, %rax
je 0x8c97
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x7f15
testq %rax, %rax
jne 0x8c6f
leaq 0x8(%rsp), %rdi
movl $0x675, 0xc(%rdi)       # imm = 0x675
callq 0x1351f
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/vampirefrog[P]x68ksjis/utf82sjis.c
// Function: main
int main(int argc, char **argv) {
	FILE *in = stdin, *out = stdout;
	if(argc > 1) in = fopen(argv[1], "rb");
	if(argc > 2) out = fopen(argv[2], "wb");

	int b;
	while((b = utf8_fgetc(in)) != EOF) {
		if(b == -2) fprintf(stderr, "Invalid char found at %d\n", ftell(in));
		sjis_fputc(unicode_char_to_sjis(b), out);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x15df6(%rip), %rax     # 0x16fd0
movq (%rax), %rbx
cmpl $0x2, %edi
jl 0x1214
movq %rsi, %r15
movl %edi, %ebp
movq 0x8(%rsi), %rdi
leaq 0x1e12(%rip), %rsi      # 0x3004
callq 0x1080
movq %rax, %r14
cmpl $0x2, %ebp
je 0x121e
movq 0x10(%r15), %rdi
leaq 0x1dfd(%rip), %rsi      # 0x3007
callq 0x1080
movq %rax, %rbx
jmp 0x121e
movq 0x15dbd(%rip), %rax     # 0x16fd8
movq (%rax), %r14
movq %r14, %rdi
callq 0x26fc
movl %eax, %ebp
cmpl $-0x2, %eax
je 0x1246
cmpl $-0x1, %ebp
je 0x1250
movl %ebp, %edi
callq 0x1aa0
movzwl %ax, %edi
movq %rbx, %rsi
callq 0x1447
jmp 0x121e
movq %r14, %rdi
callq 0x10b0
jmp 0x1232
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_ub_test_fib.c
// Function: producer
int producer(void *ctx)
{
	printf("producer\n"); //DELETEME
	struct spsc_ub_queue *q = (struct spsc_ub_queue *) ctx;
	
	srand((unsigned) time(0) + thread_get_id());
	size_t pause = rand() % 1000;

	/* Wait for global start signal */
	while (g_start == 0)
		thrd_yield();
	
		/* Wait for a random time */
	for (size_t i = 0; i != pause; i += 1)
		nop();
	
	/* Enqueue */
	for (unsigned long count = 0, n1 = 0, n2 = 1; count < N; count++) {
		fibs[count] = n1 + n2;
		
		void *fibptr = (void *) &fibs[count];
		
		if (!spsc_ub_queue_push(q, fibptr)) {
			printf("Queue push failed\n");
			return -1;
		}
			
		n1 = n2; n2 = fibs[count];
	}
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xe25(%rip), %rdi       # 0x203a
callq 0x1040
xorl %edi, %edi
callq 0x1090
leal -0x1(%rax), %edi
callq 0x1080
callq 0x10f0
movslq %eax, %r14
imulq $0x10624dd3, %r14, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %r14d
cmpl $0x0, 0x2e4b(%rip)      # 0x40a0
jne 0x125e
callq 0x1070
jmp 0x124e
testl %r14d, %r14d
je 0x126d
movslq %r14d, %rax
pause
decq %rax
jne 0x1266
movl $0x1, 0x2e39(%rip)      # 0x40b0
leaq 0x2e32(%rip), %rsi      # 0x40b0
movq %rbx, %rdi
callq 0x1624
testl %eax, %eax
je 0x12d4
movl $0x1, %ecx
leaq 0x2e1e(%rip), %r14      # 0x40b4
movq $-0x1, %r15
cmpq $0x1312cfe, %r15        # imm = 0x1312CFE
je 0x12e7
movl -0x4(%r14), %ebp
addl %ebp, %ecx
movl %ecx, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1624
addq $0x4, %r14
incq %r15
movl %ebp, %ecx
testl %eax, %eax
jne 0x129d
xorl %ebx, %ebx
cmpq $0x1312cff, %r15        # imm = 0x1312CFF
sbbl %ebx, %ebx
jmp 0x12d9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0xd63(%rip), %rdi       # 0x2043
callq 0x1040
jmp 0x12e9
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_ub_test_fib.c
// Function: consumer
int consumer(void *ctx)
{
	printf("consumer\n"); 	//DELETEME
	struct spsc_ub_queue *q = (struct spsc_ub_queue *) ctx;
	
	srand((unsigned) time(0) + thread_get_id());
	size_t pause = rand() % 1000;

	/* Wait for global start signal */
	while (g_start == 0)
		thrd_yield();
	
		/* Wait for a random time */
	for (size_t i = 0; i != pause; i += 1)
		nop();
	
	/* Dequeue */
	for (unsigned long count = 0, n1 = 0, n2 = 1; count < N; count++) {
		int fib = n1 + n2;
		int *pulled;
		
		while (!spsc_ub_queue_pull(q, (void **) &pulled)) {
			//printf("Queue empty: %d\n", temp);
			//return -1;
		}
		
		if (*pulled != fib) {
			printf("Pulled != fib\n");
			return -1;
		}		
		
		n1 = n2; n2 = fib;
	}
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xd4a(%rip), %rdi       # 0x2055
callq 0x1040
xorl %edi, %edi
callq 0x1090
leal -0x1(%rax), %edi
callq 0x1080
callq 0x10f0
movslq %eax, %r14
imulq $0x10624dd3, %r14, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %r14d
cmpl $0x0, 0x2d55(%rip)      # 0x40a0
jne 0x1354
callq 0x1070
jmp 0x1344
testl %r14d, %r14d
je 0x1363
movslq %r14d, %rax
pause
decq %rax
jne 0x135c
movl $0x1, %eax
movb $0x1, %bpl
xorl %r15d, %r15d
movq %rsp, %r14
xorl %r12d, %r12d
movq %r15, %r13
movq %rax, %r15
addq %rax, %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x165c
testl %eax, %eax
je 0x137d
movq (%rsp), %rax
cmpl %r13d, (%rax)
jne 0x13b8
movslq %r13d, %rax
cmpq $0x1312cff, %r12        # imm = 0x1312CFF
leaq 0x1(%r12), %rcx
setb %bpl
movq %rcx, %r12
cmpq $0x1312d00, %rcx        # imm = 0x1312D00
jne 0x1374
xorl %eax, %eax
jmp 0x13cd
leaq 0xc9f(%rip), %rdi       # 0x205e
callq 0x1040
movzbl %bpl, %eax
andl $0x1, %eax
negl %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_ub_test_fib.c
// Function: test_single_threaded
int test_single_threaded(struct spsc_ub_queue *q)
{
	int resp, resc;
	
	resp = producer(q);
	if (resp)
		printf("Enqueuing failed\n");
	
	resc = consumer(q);
	if (resc)
		printf("Consumer failed\n");
	
	if (resc || resp)
		printf("Single Thread Test Failed\n");
	else
		printf("Single Thread Test Complete\n");
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x1204
movl %eax, %ebx
testl %eax, %eax
je 0x13fa
leaq 0xc77(%rip), %rdi       # 0x206c
callq 0x1040
movq %r14, %rdi
callq 0x12f6
movl %eax, %ebp
testl %eax, %eax
je 0x1414
leaq 0xc6e(%rip), %rdi       # 0x207d
callq 0x1040
orl %ebx, %ebp
leaq 0xc70(%rip), %rax       # 0x208d
leaq 0xc85(%rip), %rdi       # 0x20a9
cmoveq %rax, %rdi
callq 0x1040
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_ub_test_fib.c
// Function: test_multi_threaded
int test_multi_threaded(struct spsc_ub_queue *q)
{
	thrd_t thrp, thrc;
	int resp, resc;
	
	g_start = 0;
	
	thrd_create(&thrp, consumer, q);	/** @todo Why producer thread runs earlier? */
	thrd_create(&thrc, producer, q);
	
	sleep(1);

	uint64_t start_tsc_time, end_tsc_time;

	start_tsc_time = rdtscp();
	g_start = 1;

	thrd_join(thrp, &resp);
	thrd_join(thrc, &resc);
	
	end_tsc_time = rdtscp();

	if (resc || resp)
		printf("Queue Test failed\n");
	else
		printf("Two-thread Test Complete\n");

	printf("cycles/op for rdtsc %lu\n", (end_tsc_time - start_tsc_time)/N);
	
	if (q->_tail->_next != NULL)
		printf("slots in use? There is something wrong with the test\n");
	
	int ret = spsc_ub_queue_destroy(q);
	if (ret)
		printf("Failed to destroy queue: %d\n", ret);
	
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x0, 0x2c52(%rip)      # 0x40a0
leaq -0x15f(%rip), %rdx      # 0x12f6
leaq 0x18(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x10c0
leaq -0x26a(%rip), %rdx      # 0x1204
leaq 0x10(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x10c0
movl $0x1, %edi
callq 0x10e0
rdtsc
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, %r14
movl $0x1, 0x2c00(%rip)      # 0x40a0
movq (%r15), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x10d0
movq (%r15), %r13
movq (%r12), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x10d0
orl (%r15), %r13d
leaq 0xc0e(%rip), %rax       # 0x20dc
leaq 0xbee(%rip), %rdi       # 0x20c3
cmovneq %rax, %rdi
rdtsc
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, %r15
callq 0x1040
subq %r14, %r15
movabsq $-0x29406b2a1a85bd43, %rcx # imm = 0xD6BF94D5E57A42BD
movq %r15, %rax
mulq %rcx
shrq $0x18, %rdx
leaq 0xafc(%rip), %rdi       # 0x2004
movq %rdx, %rsi
xorl %eax, %eax
callq 0x1060
movq 0x48(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x152a
leaq 0xbc9(%rip), %rdi       # 0x20ee
callq 0x1040
movq %rbx, %rdi
callq 0x168a
testl %eax, %eax
je 0x1546
leaq 0xae0(%rip), %rdi       # 0x201d
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_ub_queue.c
// Function: spsc_ub_queue_init
int spsc_ub_queue_init(struct spsc_ub_queue* q, size_t size, const struct memtype *mem)
{
	q->mem = mem;
	struct node* n = memory_alloc(q->mem, sizeof(struct node) * size);
	n->_next = NULL;
	q->_tail = q->_head = q->_first= q->_tailcopy = n;
	
	/** Alloc memory at start for total size for efficiency */
	void *v = NULL;
	for(unsigned long i = 0; i < size; i++)		/** @todo fix this hack in bounded implementation */
		spsc_ub_queue_push(q, v);
	for(unsigned long i = 0; i < size; i++)
		spsc_ub_queue_pull(q, &v);
	
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, (%rdi)
shlq $0x4, %rsi
movq %rdx, %rdi
callq 0x16fc
xorl %ecx, %ecx
xchgq %rcx, (%rax)
movq %rax, 0x120(%r14)
movq %rax, 0xd8(%r14)
movq %rax, 0x90(%r14)
xchgq %rax, 0x48(%r14)
testq %rbx, %rbx
je 0x161c
movq %rbx, %r15
movq %r14, %rdi
callq 0x16ba
movq $0x0, (%rax)
movq $0x0, 0x8(%rax)
movq 0x90(%r14), %rcx
movq %rax, (%rcx)
movq %rax, 0x90(%r14)
decq %r15
jne 0x15cc
movq 0x48(%r14), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x1617
movq 0x48(%r14), %rax
movq (%rax), %rax
movq 0x48(%r14), %rax
movq (%rax), %rax
movq %rax, 0x48(%r14)
decq %rbx
jne 0x15f9
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_ub_queue.c
// Function: spsc_ub_queue_push
int spsc_ub_queue_push(struct spsc_ub_queue* q, void * v)
{
	struct node* n = spsc_ub_alloc_node(q);
	
	atomic_store_explicit(&(n->_next), NULL, memory_order_release);
	//n->_next = NULL;
	n->_value = v;
	
	//store_release(&(q->_head->_next), n);
	atomic_store_explicit(&(q->_head->_next), n, memory_order_release);
	
	q->_head = n;
	
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x16ba
movq $0x0, (%rax)
movq %rbx, 0x8(%rax)
movq 0x90(%r14), %rcx
movq %rax, (%rcx)
movq %rax, 0x90(%r14)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_ub_queue.c
// Function: spsc_ub_queue_destroy
int spsc_ub_queue_destroy(struct spsc_ub_queue* q)
{
	struct node* n = q->_first;

	do {
		struct node* next = n->_next;
		memory_free(q->mem, (void *) n, sizeof(struct node));
		n = next;
	} while (n);
	
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xd8(%rdi), %rsi
movq (%rsi), %r14
movq (%rbx), %rdi
movl $0x10, %edx
callq 0x1705
movq %r14, %rsi
testq %r14, %r14
jne 0x1698
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/antonblanchard[P]will-it-scale/tests/brk2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	unsigned long page_size = getpagesize();
	void *addr = sbrk(page_size) + page_size;

	while (1) {
		addr += page_size;
		assert(brk(addr) == 0);

		addr -= page_size;
		assert(brk(addr) == 0);

		(*iterations) += 2;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x1270
movslq %eax, %r14
movq %r14, %rdi
callq 0x1180
movq %rax, %r15
addq %r14, %r15
addq %r15, %r14
movq %r14, %rdi
callq 0x1170
testl %eax, %eax
jne 0x1d4f
movq %r15, %rdi
callq 0x1170
testl %eax, %eax
jne 0x1d6e
addq $0x2, (%rbx)
jmp 0x1d31
leaq 0x55d(%rip), %rdi       # 0x22b3
leaq 0x565(%rip), %rsi       # 0x22c2
leaq 0x56b(%rip), %rcx       # 0x22cf
movl $0xe, %edx
callq 0x1130
leaq 0x53e(%rip), %rdi       # 0x22b3
leaq 0x546(%rip), %rsi       # 0x22c2
leaq 0x54c(%rip), %rcx       # 0x22cf
movl $0x11, %edx
callq 0x1130
// File: /workspace/github_c_makefile_star2_O3/randyrossi[P]fisher-modem/mkfilter/src/gencode.C
// Function: pr_ypart(char const*)
static void pr_ypart(const char* vs) { /* output contribution from Y vec */
  for (int i = 0; i < npoles; i++) {
    if (i % 2 == 0)
      prnl();
    printf(" + (%14.10f * %s[%d])", ycoeffs[i], vs, i);
  }
}

// Assembly:
cmpl $0x0, 0x4769(%rip)      # 0x6208
jle 0x1afc
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x475d(%rip), %r12      # 0x6210
xorl %r14d, %r14d
leaq 0x1696(%rip), %r15      # 0x3153
testb $0x1, %r14b
jne 0x1ac8
callq 0x1cd3
movsd (%r12), %xmm0
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movb $0x1, %al
callq 0x1030
incq %r14
movslq 0x4720(%rip), %rax      # 0x6208
addq $0x8, %r12
cmpq %rax, %r14
jl 0x1abd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/randyrossi[P]fisher-modem/mkfilter/src/gencode.C
// Function: prxfac(double)
static void prxfac(double x) {
  if (nxfacs > 0 && nxfacs % 3 == 0)
    prnl();
  if (x > 0.0)
    printf((nxfacs > 0) ? " + " : "   ");
  if (x < 0.0) {
    printf(" - ");
    x = -x;
  }
  unless(x == 1.0) {
    double f = fmod(x, 1.0);
    const char* fmt = (f < EPS || f > 1.0 - EPS) ? "%g" : "%14.10f";
    printf(fmt, x);
    printf(" * ");
  }
  nxfacs++;
}

// Assembly:
subq $0x18, %rsp
movl 0x5513(%rip), %eax      # 0x721c
testl %eax, %eax
movapd %xmm0, (%rsp)
jle 0x1d33
movl $0xaaaaaaab, %ecx       # imm = 0xAAAAAAAB
movq %rax, %rdx
imulq %rcx, %rdx
shrq $0x21, %rdx
leal (%rdx,%rdx,2), %ecx
subl %ecx, %eax
jne 0x1d33
callq 0x1cd3
movapd (%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x1d66
cmpl $0x0, 0x54d8(%rip)      # 0x721c
leaq 0x1449(%rip), %rax      # 0x3194
leaq 0x14c3(%rip), %rdi      # 0x3215
cmovgq %rax, %rdi
xorl %eax, %eax
callq 0x1030
xorpd %xmm1, %xmm1
movapd (%rsp), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x1d87
leaq 0x1425(%rip), %rdi      # 0x3198
xorl %eax, %eax
callq 0x1030
movapd (%rsp), %xmm0
xorpd 0x1299(%rip), %xmm0     # 0x3020
ucomisd 0x1279(%rip), %xmm0     # 0x3008
jne 0x1d93
jnp 0x1de9
movsd 0x126d(%rip), %xmm1     # 0x3008
movapd %xmm0, (%rsp)
callq 0x10b0
ucomisd 0x1263(%rip), %xmm0     # 0x3010
leaq 0x13e8(%rip), %rax      # 0x319c
leaq 0x13e4(%rip), %rdi      # 0x319f
cmovaq %rax, %rdi
movsd 0x1251(%rip), %xmm1     # 0x3018
ucomisd %xmm0, %xmm1
cmovaq %rax, %rdi
movapd (%rsp), %xmm0
movb $0x1, %al
callq 0x1030
leaq 0x13c5(%rip), %rdi      # 0x31a7
xorl %eax, %eax
callq 0x1030
incl 0x542d(%rip)            # 0x721c
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/randyrossi[P]fisher-modem/mkfilter/src/readdata.C
// Function: rdline(char*)
static void rdline(char vec[]) {
  int n = 0;
  int ch = getchar();
  until(n >= MAXSTRING || ch == '\n' || ch < 0) {
    vec[n++] = ch;
    ch = getchar();
  }
  if (n == 0 && ch < 0)
    formaterror(6);
  vec[n] = '\0';
  until(ch == '\n' || ch < 0) ch = getchar();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x10c0
cmpl $0xa, %eax
sete %cl
testl %eax, %eax
sets %dl
orb %cl, %dl
jne 0x2182
xorl %r15d, %r15d
leaq 0x1(%r15), %r14
movb %al, (%rbx,%r15)
callq 0x10c0
testl %eax, %eax
js 0x2189
cmpq $0xfe, %r15
ja 0x2189
movq %r14, %r15
cmpl $0xa, %eax
jne 0x215e
jmp 0x2189
testl %eax, %eax
js 0x21b1
xorl %r14d, %r14d
movb $0x0, (%rbx,%r14)
cmpl $0xa, %eax
sete %cl
testl %eax, %eax
sets %al
orb %cl, %al
jne 0x21ab
callq 0x10c0
cmpl $0xa, %eax
je 0x21ab
testl %eax, %eax
jns 0x219d
popq %rbx
popq %r14
popq %r15
retq
callq 0x11fa
// File: /workspace/github_c_makefile_star2_O3/randyrossi[P]fisher-modem/mkfilter/src/readdata.C
// Function: rdcoeffs(char, int&, double*)
static void rdcoeffs(char c, int& n, double* coeffs) {
  char fmt[6];
  strcpy(fmt, "N? = ");
  fmt[1] = c;
  n = rdint(fmt);
  unless(n >= 0 && n <= MAXPZ) formaterror(3);
  for (int i = 0; i <= n; i++)
    coeffs[i] = rddouble("");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x8(%rsp), %rcx
movl $0x3d203f4e, (%rcx)     # imm = 0x3D203F4E
movw $0x20, 0x4(%rcx)
movb %dil, 0x1(%rcx)
leaq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %r15
movq %r15, %rsi
movl $0x4, %edx
callq 0x2278
movslq (%r15), %rax
leaq (%rsp,%rax), %rdi
addq $0x10, %rdi
callq 0x1110
movl %eax, (%r14)
cmpl $0x200, %eax            # imm = 0x200
ja 0x2273
movq $-0x1, %rbp
leaq 0xfaa(%rip), %r15       # 0x31cb
leaq 0x10(%rsp), %r12
leaq 0x4(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0x5, %edx
movq %r15, %rcx
callq 0x2278
movslq 0x4(%rsp), %rax
leaq (%rsp,%rax), %rdi
addq $0x10, %rdi
callq 0x10a0
movsd %xmm0, 0x8(%rbx,%rbp,8)
movslq (%r14), %rax
incq %rbp
cmpq %rax, %rbp
jl 0x222b
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1228
// File: /workspace/github_c_makefile_star2_O3/randyrossi[P]fisher-modem/mkfilter/src/readdata.C
// Function: getline(char*, int&, int, char const*)
static void getline(char* vec, int& p, int e, const char* exp) {
  rdline(vec);
  p = strlen(exp);
  unless(memcmp(vec, exp, p) == 0) formaterror(e);
  while (vec[p] == ' ' || vec[p] == '\t')
    p++;
  unless((vec[p] >= '0' && vec[p] <= '9') || (vec[p] == '+') ||
         (vec[p] == '-') || (vec[p] == '.')) formaterror(e);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r13
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x213f
movq %r13, %rdi
callq 0x1060
movq %rax, %r12
movl %r12d, (%r14)
movslq %r12d, %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x1080
testl %eax, %eax
jne 0x22ed
movslq %r12d, %rax
addq %rax, %r15
incl %eax
movzbl (%r15), %ecx
cmpl $0x20, %ecx
je 0x22c7
cmpl $0x9, %ecx
jne 0x22cf
movl %eax, (%r14)
incq %r15
jmp 0x22b7
leal -0x30(%rcx), %eax
cmpb $0xa, %al
jb 0x22e3
leal -0x2d(%rcx), %eax
cmpl $0x2, %eax
jb 0x22e3
cmpl $0x2b, %ecx
jne 0x22f4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %ebx, %edi
callq 0x1256
movl %ebx, %edi
callq 0x1283
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/matrix_lookup.c
// Function: parasail_matrix_lookup
const parasail_matrix_t* parasail_matrix_lookup(const char *matrixname)
{
    const parasail_matrix_t *matrix = NULL;

    if (matrixname) {
        int index = 0;
        const parasail_matrix_t *current = parasail_matrices[index++];
        while (current) {
            if (0 == strcmp(matrixname, current->name)) {
                matrix = current;
                break;
            }
            current = parasail_matrices[index++];
        }
    }

    return matrix;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x18a520
movq %rdi, %r14
leaq 0x50b5a1(%rip), %rbx    # 0x695a98
movl $0x1, %r15d
leaq 0x50b36c(%rip), %r12    # 0x695870
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x1291a0
testl %eax, %eax
je 0x18a522
movq (%r12,%r15,8), %rbx
incq %r15
cmpq $0x45, %r15
jne 0x18a504
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/parser.c
// Function: strdup_rpl
static char* strdup_rpl(const char *str)
{
    size_t l = strlen(str);
    char *s = (char*)calloc(l + 1, sizeof(char));
    if(!s) {
        return NULL;
    }
    (void)memcpy(s, str, l);
    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1290a0
movq %rax, %r14
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x1290e0
testq %rax, %rax
je 0x18cb73
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x129100
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/parser.c
// Function: parasail_sequences_free
void parasail_sequences_free(parasail_sequences_t *sequences)
{
    size_t i;
    for (i=0; i<sequences->l; ++i) {
        if (sequences->seqs[i].name.s)    free(sequences->seqs[i].name.s);
        if (sequences->seqs[i].comment.s) free(sequences->seqs[i].comment.s);
        if (sequences->seqs[i].seq.s)     free(sequences->seqs[i].seq.s);
        if (sequences->seqs[i].qual.s)    free(sequences->seqs[i].qual.s);
    }
    free(sequences->seqs);
    free(sequences);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x18cbe5
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq 0x8(%rax,%r14), %rdi
testq %rdi, %rdi
je 0x18cba5
callq 0x129170
movq (%rbx), %rax
movq 0x18(%rax,%r14), %rdi
testq %rdi, %rdi
je 0x18cbb7
callq 0x129170
movq (%rbx), %rax
movq 0x28(%rax,%r14), %rdi
testq %rdi, %rdi
je 0x18cbc9
callq 0x129170
movq (%rbx), %rax
movq 0x38(%rax,%r14), %rdi
testq %rdi, %rdi
je 0x18cbd8
callq 0x129170
incq %r15
addq $0x40, %r14
cmpq 0x8(%rbx), %r15
jb 0x18cb90
movq (%rbx), %rdi
callq 0x129170
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x129170
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/parser.c
// Function: parasail_sequences_pack
char* parasail_sequences_pack(const parasail_sequences_t *sequences, size_t *size)
{
    size_t i = 0;
    size_t offset = 0;
    char *packed = NULL;

    packed = (char*)malloc(sizeof(char) * (sequences->characters+sequences->l+1));
    if (NULL == packed) {
        perror("malloc");
        fprintf(stderr, "parasail_sequences_pack: failed\n");
        return NULL;
    }

    for (i=0; i<sequences->l; ++i) {
        memcpy(&packed[offset], sequences->seqs[i].seq.s, sequences->seqs[i].seq.l);
        offset += sequences->seqs[i].seq.l;
        packed[offset++] = '$';
    }
    packed[offset] = '\0';

    *size = offset;

    return packed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq 0x8(%rdi), %r12
movq 0x10(%rdi), %rax
leaq (%rax,%r12), %rdi
incq %rdi
callq 0x129190
movq %rax, %r14
testq %rax, %rax
je 0x18cc81
testq %r12, %r12
je 0x18cc64
movq (%r15), %rbp
addq $0x28, %rbp
xorl %r13d, %r13d
leaq (%r14,%r13), %rdi
movq -0x8(%rbp), %r15
movq (%rbp), %rsi
movq %r15, %rdx
callq 0x129100
leaq (%r15,%r13), %rax
addq %r15, %r13
incq %r13
movb $0x24, (%r14,%rax)
addq $0x40, %rbp
decq %r12
jne 0x18cc36
jmp 0x18cc67
xorl %r13d, %r13d
movb $0x0, (%r14,%r13)
movq %r13, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x12a2f3
jmp 0x18cc6f
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/benes.c
// Function: layer_ex
static void layer_ex(uint64_t * data, uint64_t * bits, int lgs)
{
	int i, j, s;

	uint64_t d;

	s = 1 << lgs;

	for (i = 0; i < 128; i += s*2)
	for (j = i; j < i+s; j++)
	{

		d = (data[j+0] ^ data[j+s]);
		d &= (*bits++);
		data[j+0] ^= d;
		data[j+s] ^= d;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ecx
movl $0x1, %edx
shll %cl, %edx
movl $0x2, %eax
shll %cl, %eax
cltq
movslq %edx, %rdx
leaq (%rdi,%rdx,8), %r8
xorl %r9d, %r9d
cmpl $0x1f, %ecx
je 0x17e6
leaq (%r9,%rdx), %r10
movq %r9, %r11
movq (%rdi,%r11,8), %rbx
movq (%r8,%r11,8), %r14
movq %r14, %r15
xorq %rbx, %r15
andq (%rsi), %r15
addq $0x8, %rsi
xorq %r15, %rbx
movq %rbx, (%rdi,%r11,8)
xorq %r14, %r15
movq %r15, (%r8,%r11,8)
incq %r11
cmpq %r10, %r11
jl 0x17bb
addq %rax, %r9
cmpq $0x80, %r9
jl 0x17af
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/benes.c
// Function: layer_in
static void layer_in(uint64_t data[2][64], uint64_t * bits, int lgs)
{
	int i, j, s;

	uint64_t d;

	s = 1 << lgs;

	for (i = 0; i < 64; i += s*2)
	for (j = i; j < i+s; j++)
	{

		d = (data[0][j+0] ^ data[0][j+s]);
		d &= (*bits++);
		data[0][j+0] ^= d;
		data[0][j+s] ^= d;

		d = (data[1][j+0] ^ data[1][j+s]);
		d &= (*bits++);
		data[1][j+0] ^= d;
		data[1][j+s] ^= d;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ecx
movl $0x1, %edx
shll %cl, %edx
movl $0x2, %eax
shll %cl, %eax
cltq
movslq %edx, %rdx
leaq (%rdi,%rdx,8), %r8
addq $0x200, %r8             # imm = 0x200
xorl %r9d, %r9d
cmpl $0x1f, %ecx
je 0x1887
leaq (%r9,%rdx), %r10
movq %r9, %r11
movq (%rdi,%r11,8), %rbx
movq -0x200(%r8,%r11,8), %r14
movq %r14, %r15
xorq %rbx, %r15
andq (%rsi), %r15
xorq %r15, %rbx
movq %rbx, (%rdi,%r11,8)
xorq %r14, %r15
movq %r15, -0x200(%r8,%r11,8)
movq 0x200(%rdi,%r11,8), %rbx
movq (%r8,%r11,8), %r14
movq %r14, %r15
xorq %rbx, %r15
andq 0x8(%rsi), %r15
addq $0x10, %rsi
xorq %r15, %rbx
movq %rbx, 0x200(%rdi,%r11,8)
xorq %r14, %r15
movq %r15, (%r8,%r11,8)
incq %r11
cmpq %r10, %r11
jl 0x182c
addq %rax, %r9
cmpq $0x40, %r9
jl 0x1820
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/benes.c
// Function: support_gen
void support_gen(gf * s, const unsigned char *c)
{
	gf a;
	int i, j;
	unsigned char L[ GFBITS ][ (1 << GFBITS)/8 ];

	for (i = 0; i < GFBITS; i++)
		for (j = 0; j < (1 << GFBITS)/8; j++)
			L[i][j] = 0;

	for (i = 0; i < (1 << GFBITS); i++)
	{
		a = bitrev((gf) i);

		for (j = 0; j < GFBITS; j++)
			L[j][ i/8 ] |= ((a >> j) & 1) << (i%8);
	}
			
	for (j = 0; j < GFBITS; j++)
		apply_benes(L[j], c, 0);

	for (i = 0; i < SYS_N; i++)
	{
		a = bitrev((gf) i);
	
		s[i] = 0;
		for (j = GFBITS-1; j >= 0; j--)
		{
			s[i] <<= 1;
			s[i] |= (L[j][i/8] >> (i%8)) & 1;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x3408, %rsp           # imm = 0x3408
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
xorl %r15d, %r15d
movl $0x3400, %edx           # imm = 0x3400
xorl %esi, %esi
callq 0x1070
movq %r15, %rax
shrq $0x3, %rax
leaq (%rsp,%rax), %r12
movzwl %r15w, %edi
callq 0x6f5a
movzwl %ax, %eax
movl %r15d, %ecx
andl $0x7, %ecx
xorl %edx, %edx
xorl %esi, %esi
btl %edx, %eax
setb %sil
shll %cl, %esi
orb %sil, (%r12)
incq %rdx
addq $0x400, %r12            # imm = 0x400
cmpq $0xd, %rdx
jne 0x18db
incq %r15
cmpl $0x2000, %r15d          # imm = 0x2000
jne 0x18bc
xorl %r15d, %r15d
leaq (%rsp,%r15), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1504
addq $0x400, %r15            # imm = 0x400
cmpq $0x3400, %r15           # imm = 0x3400
jne 0x1909
xorl %r14d, %r14d
movq %r14, %rax
shrq $0x3, %rax
leaq (%rsp,%rax), %r15
movzwl %r14w, %edi
callq 0x6f5a
movl %r14d, %eax
andl $0x7, %eax
movl $0x3400, %edx           # imm = 0x3400
xorl %ecx, %ecx
movzbl -0x400(%r15,%rdx), %esi
xorl %edi, %edi
btl %eax, %esi
setb %dil
leal (%rdi,%rcx,2), %ecx
addq $-0x400, %rdx           # imm = 0xFC00
jne 0x194b
movw %cx, (%rbx,%r14,2)
incq %r14
cmpq $0x2000, %r14           # imm = 0x2000
jne 0x192a
addq $0x3408, %rsp           # imm = 0x3408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/checkfd.c
// Function: checkfd
int checkfd(int fd, short event) {

    struct pollfd p;
    char ch = 0;
    int r;
    struct stat st;

    if (fstat(fd, &st) != 0) return 0;

    p.fd = fd;
    p.events = event;
    p.revents = 0;
    for (;;) {
        r = poll(&p, 1, 0);
        if (r == -1) {
            if (errno == EAGAIN) continue;
            if (errno == EINTR) continue;
        }
        if (r != 1) return 0;
        if (r == 1) break;
    }
    if (p.revents) return 1;
    /* catch errno */
    if (event == POLLOUT)
        r = write(fd, &ch, 1);
    if (event == POLLIN)
        r = read(fd, &ch, 1);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %esi, %ebp
movl %edi, %ebx
movb $0x0, 0x7(%rsp)
leaq 0x10(%rsp), %rsi
callq 0x1120
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x3bb3
leaq 0x8(%rsp), %r14
movl %ebx, (%r14)
movw %bp, 0x4(%r14)
movw $0x0, 0x6(%r14)
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x10d0
cmpl $-0x1, %eax
jne 0x3b6e
callq 0x1040
movl (%rax), %ecx
cmpl $0x4, %ecx
je 0x3b42
movl $0x0, %eax
cmpl $0xb, %ecx
je 0x3b42
jmp 0x3bb3
cmpl $0x1, %eax
jne 0x3bb1
movl $0x1, %eax
cmpw $0x0, 0xe(%rsp)
jne 0x3bb3
movswl %bp, %eax
cmpl $0x1, %eax
je 0x3ba0
cmpl $0x4, %eax
jne 0x3bb1
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
movl %ebx, %edi
callq 0x1060
jmp 0x3bb1
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
movl %ebx, %edi
callq 0x1090
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/controlbits.c
// Function: controlbits
void controlbits(unsigned char * out)
{
	int i;
	uint32_t pi[ (1 << GFBITS) ];
	unsigned char c[ (2*GFBITS - 1) * (1 << GFBITS) / 16 ];

	perm_gen(pi);

	for (i = 0; i < sizeof(c); i++)
		c[i] = 0;

	controlbitsfrompermutation(GFBITS, (1 << GFBITS), 1, 0, c, pi);

	for (i = 0; i < sizeof(c); i++)
		out[i] = c[i];
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x18000, %rsp          # imm = 0x18000
movq %rdi, %rbx
movq %rsp, %r14
movl $0x1, %ebp
movl $0x10000, %esi          # imm = 0x10000
movq %r14, %rdi
callq 0x6930
movdqa 0x4505(%rip), %xmm2     # 0x80f0
xorl %eax, %eax
movdqa 0x44eb(%rip), %xmm0     # 0x80e0
movdqa (%rsp,%rax,8), %xmm1
psllq $0xd, %xmm1
paddq %xmm0, %xmm1
movdqa %xmm1, (%rsp,%rax,8)
addq $0x2, %rax
paddq %xmm2, %xmm0
cmpq $0x2000, %rax           # imm = 0x2000
jne 0x3bf5
xorl %eax, %eax
movl $0x1, %ecx
movq (%rsp,%rcx,8), %rdx
xorl %esi, %esi
movq (%rsp,%rsi,8), %rdi
xorq %rdx, %rdi
cmpq $0x2000, %rdi           # imm = 0x2000
cmovbl %ebp, %eax
incq %rsi
cmpq %rsi, %rcx
jne 0x3c25
incq %rcx
cmpq $0x2000, %rcx           # imm = 0x2000
jne 0x3c1f
testl %eax, %eax
jne 0x3bd6
movq %rsp, %rsi
movl $0x2000, %edi           # imm = 0x2000
callq 0x4395
xorl %eax, %eax
movdqa 0x449b(%rip), %xmm0     # 0x8100
pshufd $0xe8, (%rsp,%rax,8), %xmm1 # xmm1 = mem[0,2,2,3]
pand %xmm0, %xmm1
movq %xmm1, 0x10000(%rsp,%rax,4)
addq $0x2, %rax
cmpq $0x2000, %rax           # imm = 0x2000
jne 0x3c65
movq %rsp, %r14
movl $0x3200, %edx           # imm = 0x3200
movq %r14, %rdi
xorl %esi, %esi
callq 0x1070
leaq 0x10000(%rsp), %r9
movl $0xd, %edi
movl $0x2000, %esi           # imm = 0x2000
movl $0x1, %edx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x3cd3
movl $0x3200, %edx           # imm = 0x3200
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10a0
addq $0x18000, %rsp          # imm = 0x18000
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/controlbits.c
// Function: sort_64b
static void sort_64b(int n, uint64_t x[n])
{
  if (n <= 1) return;
  sort_64b(n/2,x);
  sort_64b(n/2,x + n/2);
  merge_64b(n/2,x,1);
}

// Assembly:
cmpl $0x1, %edi
jg 0x439b
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
shrl %r14d
movl %r14d, %edi
callq 0x4395
leaq (%rbx,%r14,8), %rsi
movl %r14d, %edi
callq 0x4395
movl %r14d, %edi
movq %rbx, %rsi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x43d0
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/controlbits.c
// Function: merge_64b
static void merge_64b(int n,uint64_t x[n],int step)
{
  int i;
  if (n == 1)
    minmax_64b(&x[0],&x[step]);
  else {
    merge_64b(n / 2,x,step * 2);
    merge_64b(n / 2,x + step,step * 2);
    for (i = 1;i < 2*n-1;i += 2)
      minmax_64b(&x[i * step],&x[(i + 1) * step]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %rbx
cmpl $0x1, %edi
jne 0x4415
movslq %r15d, %rax
movq (%rbx,%rax,8), %rcx
movq (%rbx), %rdx
movq %rdx, %rsi
shrq %rsi
movq %rdx, %rdi
xorq %rcx, %rdi
shrq %rcx
xorl %r8d, %r8d
cmpq %rsi, %rcx
cmovbq %rdi, %r8
xorq %r8, %rdx
movq %rdx, (%rbx)
xorq %r8, (%rbx,%rax,8)
jmp 0x4496
movl %edi, %r14d
movl %edi, %ebp
shrl $0x1f, %ebp
addl %edi, %ebp
sarl %ebp
leal (%r15,%r15), %r12d
movl %ebp, %edi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x43d0
movslq %r15d, %r15
leaq (%rbx,%r15,8), %rsi
movl %ebp, %edi
movl %r12d, %edx
callq 0x43d0
cmpl $0x2, %r14d
jl 0x4496
leal -0x1(,%r14,2), %eax
cltq
movq %r15, %rcx
shlq $0x4, %rcx
movl $0x1, %edx
xorl %esi, %esi
movq (%rbx,%rcx), %rdi
movq (%rbx,%r15,8), %r8
movq %r8, %r9
shrq %r9
movq %r8, %r10
xorq %rdi, %r10
shrq %rdi
cmpq %r9, %rdi
cmovaeq %rsi, %r10
xorq %r10, %r8
movq %r8, (%rbx,%r15,8)
xorq %r10, (%rbx,%rcx)
addq %rcx, %rbx
addq $0x2, %rdx
cmpq %rax, %rdx
jl 0x4461
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/controlbits.c
// Function: composeinv
static void composeinv(int n,uint32_t y[n],uint32_t x[n],uint32_t pi[n]) /* // NC */
{
  int i;
  uint32_t t[n];

  for (i = 0;i < n;++i) 
    t[i] = x[i] | (pi[i] << 16);

  sort(n,t);

  for (i = 0;i < n;++i)
    y[i] = t[i] & 0xFFFF;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %r15d
movl %edi, %r12d
movq %rsp, %r14
leaq 0xf(,%r12,4), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
testl %edi, %edi
jle 0x4507
movq %rsi, %rbx
xorl %eax, %eax
movl (%rcx,%rax,4), %esi
shll $0x10, %esi
orl (%rdx,%rax,4), %esi
movl %esi, (%r14,%rax,4)
incq %rax
cmpq %rax, %r12
jne 0x44ce
movl %r15d, %edi
movq %r14, %rsi
callq 0x451f
testl %r15d, %r15d
jle 0x4512
xorl %eax, %eax
movzwl (%r14,%rax,4), %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r12
jne 0x44f5
jmp 0x4512
movl %r15d, %edi
movq %r14, %rsi
callq 0x451f
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/controlbits.c
// Function: sort
static void sort(int n, uint32_t x[n])
{
  if (n <= 1) return;
  sort(n/2,x);
  sort(n/2,x + n/2);
  merge(n/2,x,1);
}

// Assembly:
cmpl $0x1, %edi
jg 0x4525
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
shrl %r14d
movl %r14d, %edi
callq 0x451f
leaq (%rbx,%r14,4), %rsi
movl %r14d, %edi
callq 0x451f
movl %r14d, %edi
movq %rbx, %rsi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x455a
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/controlbits.c
// Function: merge
static void merge(int n,uint32_t x[n],int step)
{
  int i;
  if (n == 1)
    minmax(&x[0],&x[step]);
  else {
    merge(n / 2,x,step * 2);
    merge(n / 2,x + step,step * 2);
    for (i = 1;i < 2*n-1;i += 2)
      minmax(&x[i * step],&x[(i + 1) * step]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %rbx
cmpl $0x1, %edi
jne 0x4589
movslq %r15d, %rax
movl (%rbx,%rax,4), %ecx
movl (%rbx), %edx
movl %edx, %esi
xorl %ecx, %esi
subl %edx, %ecx
sarl $0x1f, %ecx
andl %esi, %ecx
xorl %ecx, %edx
movl %edx, (%rbx)
xorl %ecx, (%rbx,%rax,4)
jmp 0x4600
movl %edi, %r14d
movl %edi, %ebp
shrl $0x1f, %ebp
addl %edi, %ebp
sarl %ebp
leal (%r15,%r15), %r12d
movl %ebp, %edi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x455a
movslq %r15d, %r15
leaq (%rbx,%r15,4), %rsi
movl %ebp, %edi
movl %r12d, %edx
callq 0x455a
cmpl $0x2, %r14d
jl 0x4600
leal -0x1(,%r14,2), %eax
cltq
leaq (,%r15,8), %rcx
movl $0x1, %edx
movl (%rbx,%r15,8), %esi
movl (%rbx,%r15,4), %edi
movl %edi, %r8d
xorl %esi, %r8d
subl %edi, %esi
sarl $0x1f, %esi
andl %r8d, %esi
xorl %esi, %edi
movl %edi, (%rbx,%r15,4)
xorl %esi, (%rbx,%r15,8)
addq $0x2, %rdx
addq %rcx, %rbx
cmpq %rax, %rdx
jl 0x45d4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/janmojzis[P]mcencrypt/crypto_hash_sha512.c
// Function: crypto_hash_sha512
int crypto_hash_sha512(unsigned char *o,const unsigned char *m, unsigned long long n) {

    long long i;
    unsigned char x[256];
    unsigned long long b = n;
    unsigned long long h[8] = {
        0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL,
        0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL
    };

    blocks(h, m, n);
    m += n;
    n &= 127;
    m -= n;

    for (i = 0; i < sizeof x; ++i) x[i] = 0;
    for (i = 0; i < n; ++i) x[i] = m[i];
    x[n] = 128;

    n = 256 - 128 * (n < 112);
    x[n - 9] = b >> 61;
    store64_bigendian(x + n - 8, b << 3);
    blocks(h, x, n);

    for (i = 0; i < 8; ++i) store64_bigendian(o + 8 * i, h[i]);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movaps 0x3b74(%rip), %xmm0     # 0x81a0
movq %rsp, %rdi
movaps %xmm0, 0x30(%rdi)
movaps 0x3b56(%rip), %xmm0     # 0x8190
movaps %xmm0, 0x20(%rdi)
movaps 0x3b3b(%rip), %xmm0     # 0x8180
movaps %xmm0, 0x10(%rdi)
movaps 0x3b20(%rip), %xmm0     # 0x8170
movaps %xmm0, (%rdi)
callq 0x4715
leaq 0x40(%rsp), %r15
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movq %r14, %r13
andq $0x7f, %r13
je 0x468b
addq %r14, %r12
subq %r13, %r12
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x10a0
movb $-0x80, 0x40(%rsp,%r13)
xorl %eax, %eax
cmpq $0x70, %r13
setae %al
shll $0x7, %eax
leaq 0x80(%rax), %rdx
movq %r14, %rcx
shrq $0x3d, %rcx
movb %cl, 0x77(%rax,%r15)
addq %rsp, %rax
addq $0xb8, %rax
shlq $0x3, %r14
movl $0x8, %ecx
movb %r14b, -0x1(%rax,%rcx)
shrq $0x8, %r14
decq %rcx
jne 0x46c2
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x4715
xorl %eax, %eax
movq (%rsp,%rax,8), %rcx
movl $0x8, %edx
movb %cl, -0x1(%rbx,%rdx)
shrq $0x8, %rcx
decq %rdx
jne 0x46e8
incq %rax
addq $0x8, %rbx
cmpq $0x8, %rax
jne 0x46df
xorl %eax, %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq