LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ls4154[P]hash-c/sha512_check.c
// Function: main
int main(int argc, char **argv)
{
	int fd = STDIN_FILENO;
	if (argc > 1 && (fd = open(argv[1], O_RDONLY)) < 0) {
		fprintf(stderr, "%s : cannot access '%s'\n", argv[0], argv[1]);
		exit(EXIT_FAILURE);
	}

	struct sha512_ctx ctx;
	sha512_init(&ctx);

	int total = 0;
	int rd = 0;
	while ((rd = read(fd, buffer + total, CHUNK_SIZE - total)) > 0) {
		total += rd;
		if (total >= CHUNK_SIZE) {
			sha512_update(&ctx, buffer);
			total = 0;
		}
	}
	sha512_update_last(&ctx, buffer, total);

	for (int i = 0; i < WORD_CNT; ++i)
		printf("%016lx", ctx.h[i]);
	printf("\n");

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
xorl %ebp, %ebp
movl $0x0, %ebx
cmpl $0x2, %edi
jl 0x11ce
movq %rsi, %r14
movq 0x8(%rsi), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1080
movl %eax, %ebx
testl %eax, %eax
js 0x1268
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1290
leaq 0x2e8e(%rip), %r15      # 0x4070
movl %ebp, %r12d
leaq (%r15,%r12), %rsi
movl $0x80, %edx
subl %ebp, %edx
movl %ebx, %edi
callq 0x1050
testl %eax, %eax
jle 0x1219
addl %eax, %r12d
movl %r12d, %ebp
cmpl $0x80, %r12d
jl 0x11e2
movq %r14, %rdi
movq %r15, %rsi
callq 0x1305
xorl %ebp, %ebp
jmp 0x11e2
leaq 0x2e50(%rip), %rsi      # 0x4070
leaq 0x8(%rsp), %rdi
movq %r12, %rdx
callq 0x1512
leaq 0xde9(%rip), %rbx       # 0x201d
xorl %r14d, %r14d
cmpq $0x8, %r14
je 0x1251
movq 0x8(%rsp,%r14,8), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1040
incq %r14
jmp 0x1237
pushq $0xa
popq %rdi
callq 0x1030
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x2d89(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%r14), %rdx
movq 0x8(%r14), %rcx
leaq 0xd84(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1060
pushq $0x1
popq %rdi
callq 0x1090
nop
// File: /workspace/github_c_makefile_star2_O2/ls4154[P]hash-c/sha512.c
// Function: sha512_update_last
void sha512_update_last(struct sha512_ctx *ctx, byte_t *chunk, len_t len)
{
	ctx->len += len;
	len_t bit_len = ctx->len * 8;

	byte_t padding[128];
	memset(padding, 0, sizeof(padding));

	memcpy(padding, chunk, len);
	*(padding + len) = 0x80;

	if (len >= 112) {
		_sha512_iterate(ctx, padding);
		memset(padding, 0, sizeof(padding));
	}

	/* todo : length should be 128 bit */
	byte_t *ptr = padding + 112 + 8;
	for (int i = 7; i >= 0; --i) {
		*ptr = (bit_len >> 8 * i) & 0xFF;
		++ptr;
	}
	_sha512_iterate(ctx, padding);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq 0x40(%rdi), %r15
addq %rdx, %r15
movq %r15, 0x40(%rdi)
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x70(%rdi)
movaps %xmm0, 0x60(%rdi)
movaps %xmm0, 0x50(%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x1070
movb $-0x80, (%rsp,%r14)
cmpq $0x70, %r14
jb 0x159c
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1315
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%r14)
movaps %xmm0, 0x60(%r14)
movaps %xmm0, 0x50(%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
shlq $0x3, %r15
pushq $0x7
popq %rax
pushq $0x38
popq %rcx
leaq 0x78(%rsp), %rdx
testl %eax, %eax
js 0x15c2
movq %r15, %rsi
shrq %cl, %rsi
movb %sil, (%rdx)
incq %rdx
decl %eax
addl $-0x8, %ecx
jmp 0x15ab
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1315
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ls4154[P]hash-c/sha512.c
// Function: sha512_offline
void sha512_offline(struct sha512_ctx *ctx, byte_t *msg, len_t len)
{
	sha512_init(ctx);

	while (len >= 128) {
		sha512_update(ctx, msg);

		msg += 128;
		len -= 128;
	}

	sha512_update_last(ctx, msg, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1290
cmpq $0x80, %rbx
jb 0x160b
movq %r15, %rdi
movq %r14, %rsi
callq 0x1305
subq $-0x80, %r14
addq $-0x80, %rbx
jmp 0x15ed
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x1512
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/tests/onlinequantile/main.c
// Function: parse_line
static int
parse_line(FILE * fp, char * instr, double * val)
{
	char line[LINELEN];

	/* Repeat until we have a non-comment, non-blank line. */
	do {
		if (fgets(line, LINELEN, fp) == NULL) {
			/* Handle error or EOF. */
			if (ferror(fp)) {
				warnp("fgets");
				goto err0;
			}
			goto eof;
		}

		/* If we have a newline, remove it. */
		if (line[strlen(line) - 1] == '\n')
			line[strlen(line) - 1] = '\0';
	} while ((line[0] == '#') || (line[0] == '\0'));

	/* Sanity-check the format.  Multiple tabs characters are ok. */
	if (line[1] != '\t') {
		warn0("Unrecognized character in line: %s", line);
		goto err0;
	}

	/* Get instruction and value from the line. */
	*instr = line[0];
	if (PARSENUM(val, &line[2])) {
		warnp("parsenum");
		goto err0;
	}

	/* Success! */
	return (0);

eof:
	/* End of file! */
	return (1);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rsp), %r12
pushq $0x50
popq %rbp
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x1100
testq %rax, %rax
je 0x160b
movq %r12, %rdi
callq 0x10b0
cmpb $0xa, -0x1(%rax,%r12)
jne 0x1591
movb $0x0, 0xf(%rsp,%rax)
movzbl 0x10(%rsp), %eax
testl %eax, %eax
je 0x1566
cmpl $0x23, %eax
je 0x1566
cmpb $0x9, 0x11(%rsp)
jne 0x163b
movb %al, (%r14)
callq 0x1060
movq %rax, %r14
andl $0x0, (%rax)
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, (%rbx)
leaq 0x12(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1080
movq (%r12), %rax
cmpq %r15, %rax
je 0x15ec
cmpb $0x0, (%rax)
je 0x1676
movl $0x16, (%r14)
movsd %xmm0, (%rbx)
leaq 0x1b07(%rip), %rdi      # 0x3105
xorl %eax, %eax
callq 0x1705
andl $0x0, (%r14)
jmp 0x1666
movq %r15, %rdi
callq 0x1070
testl %eax, %eax
je 0x1637
callq 0x1060
cmpl $0x0, (%rax)
je 0x1658
movq %rax, %rbx
leaq 0x1ab1(%rip), %rdi      # 0x30dc
xorl %eax, %eax
callq 0x1705
andl $0x0, (%rbx)
jmp 0x1666
pushq $0x1
jmp 0x1668
leaq 0x1aa0(%rip), %rdi      # 0x30e2
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x1894
callq 0x1060
andl $0x0, (%rax)
jmp 0x1666
leaq 0x1a7d(%rip), %rdi      # 0x30dc
xorl %eax, %eax
callq 0x1894
pushq $-0x1
popq %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, (%r14)
movsd %xmm0, (%rbx)
jne 0x15f7
xorl %eax, %eax
jmp 0x1669
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/datastruct/onlinequantile.c
// Function: onlinequantile_init
struct onlinequantile *
onlinequantile_init(double q)
{
	struct onlinequantile * Q;

	/* Allocate structure and initialize parameters. */
	if ((Q = malloc(sizeof(struct onlinequantile))) == NULL)
		goto err0;
	Q->larger_min = (double)INFINITY;
	Q->smaller_max = - (double)INFINITY;
	Q->N = 0;
	Q->N_smaller = 0;
	Q->q = q;

	/* Create "smaller" heap. */
	if ((Q->smaller = doubleheap_init()) == NULL)
		goto err1;

	/* Create "larger" heap. */
	if ((Q->larger = doubleheap_init()) == NULL)
		goto err2;

	/* Success! */
	return (Q);

err2:
	doubleheap_free(Q->smaller);
err1:
	free(Q);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
pushq $0x38
popq %rdi
callq 0x1140
testq %rax, %rax
je 0x1a7b
movq %rax, %rbx
movaps 0x1758(%rip), %xmm0     # 0x3190
movups %xmm0, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movsd (%rsp), %xmm0
movsd %xmm0, 0x30(%rax)
callq 0x1ef4
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x1a73
movq %rax, %r14
callq 0x1ef4
movq %rax, (%rbx)
testq %rax, %rax
jne 0x1a7d
movq %r14, %rdi
callq 0x2208
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/datastruct/onlinequantile.c
// Function: onlinequantile_get
int
onlinequantile_get(struct onlinequantile * Q, double * x)
{
	size_t i;
	double r;

	/* If empty, return 1. */
	if (Q->N == 0)
		return (1);

	/* Figure out the necessary averaging. */
	hazenquantile(Q->N, Q->q, &i, &r);

	/* Sanity-check. */
	assert(Q->N_smaller - 1 == i);

	/* Are we averaging two values? */
	if (r != 0.0) {
		/* Sanity-check. */
		assert(Q->N_smaller < Q->N);

		/* Compute the average. */
		*x = Q->smaller_max + (Q->larger_min - Q->smaller_max) * r;
	} else {
		/* The median is just a single value. */
		*x = Q->smaller_max;
	}

	/* Success! */
	return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x1af4
movq %rsi, %rbx
movsd 0x30(%r14), %xmm0
leaq 0x8(%rsp), %r15
movq %rsp, %rdx
movq %r15, %rsi
callq 0x1b45
movq 0x28(%r14), %rax
leaq -0x1(%rax), %rcx
cmpq (%r15), %rcx
jne 0x1b0f
movsd (%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1ad4
jnp 0x1af9
cmpq 0x20(%r14), %rax
jae 0x1b28
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
jmp 0x1aff
pushq $0x1
popq %rax
jmp 0x1b05
movsd 0x18(%r14), %xmm1
movsd %xmm1, (%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x16d2(%rip), %rdi      # 0x31e8
leaq 0x16e1(%rip), %rsi      # 0x31fe
leaq 0x16fd(%rip), %rcx      # 0x3221
pushq $0x56
jmp 0x1b3f
leaq 0x172c(%rip), %rdi      # 0x325b
leaq 0x16c8(%rip), %rsi      # 0x31fe
leaq 0x16e4(%rip), %rcx      # 0x3221
pushq $0x5b
popq %rdx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/datastruct/hazenquantile.h
// Function: hazenquantile
static inline void
hazenquantile(size_t N, double x, size_t * i, double * r)
{
	double q;

	/* Sanity-check. */
	assert(N > 0);
	assert((0 <= x) && (x <= 1));

	/* Scale to [0, N]. */
	q = (double)(N) * x;

	/* In most cases, i is equal to q rounded to nearest, minus one. */
	*i = (size_t)(q + 0.5) - 1;

	/* In most cases, r is the fractional part of q + 0.5. */
	*r = (q + 0.5) - (double)(*i + 1);

	/* The endpoints need special treatment. */
	if (*i == (size_t)(-1)) {
		/* In the case q < 0.5, quantile = S_0. */
		*i = 0;
		*r = 0.0;
	} else if (*i == N - 1) {
		/* In the case q > N - 0.5, quantile = S_{N-1}. */
		*i = N - 1;
		*r = 0.0;
	}

	/* Sanity-check. */
	assert((double)*i + *r <= (double)(N-1));
	assert((0.0 <= *r) && (*r < 1.0));
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1c5d
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1c76
movsd 0x166b(%rip), %xmm1     # 0x31d0
ucomisd %xmm0, %xmm1
jb 0x1c76
movq %rdi, %xmm5
movq 0x1624(%rip), %xmm2     # 0x31a0
punpckldq %xmm2, %xmm5    # xmm5 = xmm5[0],xmm2[0],xmm5[1],xmm2[1]
movapd 0x1628(%rip), %xmm3     # 0x31b0
subpd %xmm3, %xmm5
movapd %xmm5, %xmm4
unpckhpd %xmm5, %xmm4            # xmm4 = xmm4[1],xmm5[1]
addsd %xmm5, %xmm4
mulsd %xmm0, %xmm4
addsd 0x1634(%rip), %xmm4     # 0x31d8
cvttsd2si %xmm4, %rax
movq %rax, %r8
movapd %xmm4, %xmm0
subsd 0x1628(%rip), %xmm0     # 0x31e0
sarq $0x3f, %r8
cvttsd2si %xmm0, %rcx
andq %r8, %rcx
orq %rax, %rcx
movq %rcx, %rax
subq $0x1, %rax
movq %rax, (%rsi)
movq %rcx, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm5
unpckhpd %xmm0, %xmm5            # xmm5 = xmm5[1],xmm0[1]
addsd %xmm0, %xmm5
subsd %xmm5, %xmm4
movsd %xmm4, (%rdx)
jae 0x1bf8
xorl %eax, %eax
jmp 0x1c01
cmpq %rdi, %rcx
jne 0x1c0c
leaq -0x1(%rdi), %rax
movq %rax, (%rsi)
andq $0x0, (%rdx)
xorpd %xmm4, %xmm4
movq %rax, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm5
unpckhpd %xmm0, %xmm5            # xmm5 = xmm5[1],xmm0[1]
addsd %xmm0, %xmm5
addsd %xmm4, %xmm5
decq %rdi
movq %rdi, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
ucomisd %xmm5, %xmm2
jb 0x1c8f
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm4
jb 0x1ca8
ucomisd %xmm4, %xmm1
jbe 0x1ca8
popq %rax
retq
leaq 0x1666(%rip), %rdi      # 0x32ca
leaq 0x1665(%rip), %rsi      # 0x32d0
leaq 0x1680(%rip), %rcx      # 0x32f2
pushq $0x25
jmp 0x1cbf
leaq 0x16ac(%rip), %rdi      # 0x3329
leaq 0x164c(%rip), %rsi      # 0x32d0
leaq 0x1667(%rip), %rcx      # 0x32f2
pushq $0x26
jmp 0x1cbf
leaq 0x16a8(%rip), %rdi      # 0x333e
leaq 0x1633(%rip), %rsi      # 0x32d0
leaq 0x164e(%rip), %rcx      # 0x32f2
pushq $0x3d
jmp 0x1cbf
leaq 0x16b0(%rip), %rdi      # 0x335f
leaq 0x161a(%rip), %rsi      # 0x32d0
leaq 0x1635(%rip), %rcx      # 0x32f2
pushq $0x3e
popq %rdx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_create
struct doubleheap *
doubleheap_create(double * buf, size_t N)
{
	struct doubleheap * H;
	size_t i;

	/* Allocate structure. */
	if ((H = malloc(sizeof(struct doubleheap))) == NULL)
		goto err0;

	/* We will have N elements. */
	H->nelems = N;

	/* Allocate space for N heap elements. */
	if ((H->elems = doublelist_init(N)) == NULL)
		goto err1;

	/* Copy the heap elements in. */
	for (i = 0; i < N; i++)
		*doublelist_get(H->elems, i) = buf[i];

	/* Turn this into a heap. */
	for (i = N - 1; i < N; i--)
		heapify(H->elems, i, N);

	/* Success! */
	return (H);

err1:
	free(H);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r12
pushq $0x10
popq %rdi
callq 0x1140
testq %rax, %rax
je 0x1f8c
movq %rax, %rbx
movq %r14, 0x8(%rax)
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x228c
movq %rax, (%rbx)
testq %rax, %rax
je 0x1f84
movq %rax, %r15
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x1f68
movsd (%r12,%r13,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x1f9f
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
incq %r13
jmp 0x1f3d
leaq -0x1(%r14), %r12
cmpq %r14, %r12
jae 0x1f8e
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1fa7
decq %r12
jmp 0x1f6c
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: heapify
static void
heapify(DOUBLELIST elems, size_t i, size_t N)
{
	size_t min;

	/* Iterate down the tree. */
	do {
		/* Look for the minimum element out of {i, 2i+1, 2i+2}. */
		min = i;

		/* Is this bigger than element 2i+1? */
		if (2 * i + 1 < N &&
		    *doublelist_get(elems, min) >
		    *doublelist_get(elems, 2 * i + 1))
			min = 2 * i + 1;

		/* Is this bigger than element 2i+2? */
		if (2 * i + 2 < N &&
		    *doublelist_get(elems, min) >
		    *doublelist_get(elems, 2 * i + 2))
			min = 2 * i + 2;

		/* If the minimum is i, we have heap-property. */
		if (min == i)
			break;

		/* Move the minimum into position i. */
		swap(elems, min, i);

		/* Move down the tree. */
		i = min;
	} while (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %r12
leaq 0x1(,%r15,2), %r13
cmpq %rbx, %r13
jae 0x1fff
movq %r14, %rdi
movq %r15, %rsi
callq 0x1f9f
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x1f9f
movsd 0x8(%rsp), %xmm0
ucomisd (%rax), %xmm0
movq %r15, %r12
jbe 0x1fff
movq %r13, %r12
leaq (%r15,%r15), %r13
addq $0x2, %r13
cmpq %rbx, %r13
jae 0x203b
movq %r14, %rdi
movq %r12, %rsi
callq 0x1f9f
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x1f9f
movsd 0x8(%rsp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x203b
movq %r13, %r12
cmpq %r15, %r12
je 0x2056
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2223
movq %r12, %r15
jmp 0x1fc0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_add
int
doubleheap_add(struct doubleheap * H, double x)
{

	/* Add the element to the end of the heap. */
	if (doublelist_append(H->elems, &x, 1))
		goto err0;
	H->nelems += 1;

	/* Move the new element up in the tree if necessary. */
	heapifyup(H->elems, H->nelems - 1);

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
leaq 0x10(%rsp), %rsi
movsd %xmm0, (%rsi)
movq (%rdi), %rdi
pushq $0x1
popq %rdx
pushq $0x8
popq %rcx
callq 0x23e6
testl %eax, %eax
je 0x209c
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rbx
movq 0x8(%r15), %r14
leaq 0x1(%r14), %rax
movq %rax, 0x8(%r15)
xorl %ebp, %ebp
testq %r14, %r14
je 0x208f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1f9f
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq -0x1(%r14), %r15
shrq %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1f9f
movsd 0x8(%rsp), %xmm0
ucomisd (%rax), %xmm0
jae 0x208f
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2223
movq %r15, %r14
jmp 0x20ad
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_setmin
void
doubleheap_setmin(struct doubleheap * H, double x)
{

	/* Sanity-check; We must have a minimum element. */
	assert(H->nelems > 0);

	/* Set the new value. */
	*doublelist_get(H->elems, 0) = x;

	/* Move it down the heap if necessary. */
	heapify(H->elems, 0, H->nelems);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
cmpq $0x0, 0x8(%rdi)
je 0x2168
movq %rdi, %rbx
movq (%rdi), %rdi
xorl %esi, %esi
callq 0x1f9f
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
jmp 0x1fa7
leaq 0x120a(%rip), %rdi      # 0x3379
leaq 0x1211(%rip), %rsi      # 0x3387
leaq 0x1229(%rip), %rcx      # 0x33a6
movl $0xc7, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_deletemin
void
doubleheap_deletemin(struct doubleheap * H)
{

	/* Sanity-check: Can't delete something which doesn't exist. */
	assert(H->nelems > 0);

	/* Move the last element to the top. */
	*doublelist_get(H->elems, 0) =
	    *doublelist_get(H->elems, H->nelems - 1);

	/* Shrink the heap. */
	doublelist_shrink(H->elems, 1);
	H->nelems--;

	/* Move it down the heap until it finds the right place. */
	heapify(H->elems, 0, H->nelems);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x21e9
movq %rdi, %rbx
movq (%rdi), %rdi
decq %rsi
callq 0x1f9f
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x1f9f
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
callq 0x2481
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
decq %rdx
movq %rdx, 0x8(%rbx)
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
jmp 0x1fa7
leaq 0x1189(%rip), %rdi      # 0x3379
leaq 0x1190(%rip), %rsi      # 0x3387
leaq 0x11dc(%rip), %rcx      # 0x33da
movl $0xd9, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_free
void
doubleheap_free(struct doubleheap * H)
{

	/* Behave consistently with free(NULL). */
	if (H == NULL)
		return;

	doublelist_free(H->elems);
	free(H);
}

// Assembly:
testq %rdi, %rdi
je 0x2222
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2323
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: swap
static void
swap(DOUBLELIST elems, size_t i, size_t j)
{
	double tmp;

	/* Swap the elements. */
	tmp = *doublelist_get(elems, i);
	*doublelist_get(elems, i) = *doublelist_get(elems, j);
	*doublelist_get(elems, j) = tmp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1f9f
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1f9f
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f9f
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1f9f
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: read_input
void * read_input(void *nothing)
{
	int c;

	while(1)
	{
		if( (c = getchar()) == 0 )
		{
			printf("End of input. Bye\n");
			exit(1);
		}

		pthread_mutex_lock(&mutex);
		if(c != '\n')
		{
			global_input = c;
			while( getchar() != '\n');
		}
		pthread_cond_signal(&input_cond);
		pthread_mutex_unlock(&mutex);
	}
	pthread_exit(NULL);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x2e79(%rip), %rbx      # 0x40c0
leaq 0x2e9a(%rip), %r14      # 0x40e8
callq 0x1080
testl %eax, %eax
je 0x1288
movl %eax, %ebp
movq %rbx, %rdi
callq 0x1110
cmpl $0xa, %ebp
je 0x1276
movl %ebp, 0x2e4c(%rip)      # 0x40b8
callq 0x1080
cmpl $0xa, %eax
jne 0x126c
movq %r14, %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x10a0
jmp 0x124e
leaq 0xf40(%rip), %rdi       # 0x21cf
callq 0x1030
pushq $0x1
popq %rdi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O2/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: display
void display(int dice[], int life, int point, int level)
{
	int i;
	system("clear");
	printf("+---+---+---+\n");
	for(i = 0; i < DICE_COUNT; i++)
		printf("| %d ", dice[i]);
	printf("|\n");
	printf("+---+---+---+\n");
	printf("[LIFE LEFT: %d]\t[POINTS: %2d]\t[LEVEL: %2d]\t[B/S/N]? ", life-1, point, level+1);
	fflush(stdout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
leaq 0xd2a(%rip), %rdi       # 0x2004
callq 0x1040
leaq 0xefd(%rip), %rdi       # 0x21e3
callq 0x1030
leaq 0xd18(%rip), %r12       # 0x200a
xorl %r13d, %r13d
cmpq $0x3, %r13
je 0x130e
movl (%r15,%r13,4), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1050
incq %r13
jmp 0x12f5
leaq 0xecc(%rip), %rdi       # 0x21e1
callq 0x1030
leaq 0xec2(%rip), %rdi       # 0x21e3
callq 0x1030
decl %r14d
incl %ebx
leaq 0xcde(%rip), %rdi       # 0x2010
movl %r14d, %esi
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1050
movq 0x2c99(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O2/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: wait_for_input
int wait_for_input(int level)
{
	int wait_ret, input, timeout;
	struct timespec t;

	timeout = TIMEOUT_INIT - level;
	if(timeout < TIMEOUT_MIN)
		timeout = TIMEOUT_MIN;

	t.tv_sec = time(NULL) + timeout;
	t.tv_nsec = 0;

	pthread_mutex_lock(&mutex);

		if(global_input == 0)
		{
			wait_ret = pthread_cond_timedwait(&input_cond, &mutex, &t);
			if(wait_ret == ETIMEDOUT)
			{
				input = 0;
				sleep(1);
			}
			else
			{
				input = global_input;
			}
		}
		else
			input = global_input;

		global_input = 0;

	pthread_mutex_unlock(&mutex);

	return input;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
pushq $0x8
popq %rax
subl %edi, %eax
cmpl $0x3, %eax
pushq $0x2
popq %rbx
cmovgel %eax, %ebx
xorl %edi, %edi
callq 0x1090
addq %rax, %rbx
movq %rbx, (%rsp)
andq $0x0, 0x8(%rsp)
leaq 0x2d35(%rip), %rdi      # 0x40c0
callq 0x1110
movl 0x2d22(%rip), %ebx      # 0x40b8
testl %ebx, %ebx
jne 0x13c7
leaq 0x2d47(%rip), %rdi      # 0x40e8
leaq 0x2d18(%rip), %rsi      # 0x40c0
movq %rsp, %rdx
callq 0x10d0
cmpl $0x6e, %eax
jne 0x13c1
pushq $0x1
popq %rdi
callq 0x1100
xorl %ebx, %ebx
jmp 0x13c7
movl 0x2cf1(%rip), %ebx      # 0x40b8
andl $0x0, 0x2cea(%rip)      # 0x40b8
leaq 0x2ceb(%rip), %rdi      # 0x40c0
callq 0x10a0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: game_play
void *game_play(void *nothing)
{
	int i, input, sum, life = LIFE_INIT, point = 0, level = 0;
	int dice[DICE_COUNT];

	srand(time(NULL));
	while(1)
	{
		for(i = 0; i < DICE_COUNT; i++)
			dice[i] = rand() % 6 + 1;

		display(dice, life, point, level);
		input = wait_for_input(level);

		if(input == 0)	// 0 - means no input until timeout.
		{
			life--;
			printf("\nTIMEOUT\n");
		}
		else	// has an input.
		{
			if(input != 'B' && input != 'b' &&
			   input != 's' && input != 'S' &&
			   input != 'n' && input != 'N')
			{
				life--;
				printf("WRONG\n");
			}
			else
			{
				if(input == 'B')
					input = 'b';
				if(input == 'S')
					input = 's';
				if(input == 'N')
					input = 'n';

				for(i = 0, sum = 0; i < DICE_COUNT; i++)
					sum += dice[i];

				if((IS_BIG(sum) && input != 'b') ||
				   (IS_SMALL(sum) && input != 's') ||
				   (all_the_same(dice) && input != 'n') )
				{
					life--;
					printf("WRONG\n");
				}
				else
				{
					point++;
					printf("CORRECT\n");
				}
			}
		}

		if(life == 0)
		{
			printf("End of game. Bye\n");
			exit(0);
		}

		if(point > 0 && point % 10 == 0)
			level++;

		usleep(500000);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x1090
movl %eax, %edi
callq 0x1060
pushq $0x3
popq %rbp
leaq 0xc(%rsp), %r14
pushq $0x6
popq %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq $0x3, %r13
je 0x142d
callq 0x1120
cltd
idivl %r15d
incl %edx
movl %edx, 0xc(%rsp,%r13,4)
incq %r13
jmp 0x1412
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %r12d, %ecx
callq 0x12be
movl %r12d, %edi
callq 0x135d
movl %eax, %r13d
leal -0x42(%r13), %eax
cmpl $0x31, %eax
ja 0x14e9
movabsq $0x2100100021001, %rcx  # imm = 0x2100100021001
btq %rax, %rcx
jae 0x14e9
cmpl $0x42, %r13d
pushq $0x62
popq %rax
cmovel %eax, %r13d
cmpl $0x53, %r13d
pushq $0x73
popq %rax
cmovel %eax, %r13d
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x3, %rcx
je 0x1491
addl 0xc(%rsp,%rcx,4), %eax
incq %rcx
jmp 0x1482
cmpl $0x4e, %r13d
pushq $0x6e
popq %rcx
cmovel %ecx, %r13d
cmpl $0x62, %r13d
je 0x14ae
leaq 0xd50(%rip), %rdi       # 0x21f9
cmpl $0xa, %eax
jg 0x14fc
cmpl $0x73, %r13d
je 0x14c0
leaq 0xd3e(%rip), %rdi       # 0x21f9
cmpl $0xb, %eax
jl 0x14fc
movq %r14, %rdi
callq 0x129c
cmpl $0x6e, %r13d
je 0x14d9
leaq 0xd24(%rip), %rdi       # 0x21f9
testl %eax, %eax
jne 0x14fc
incl %ebx
leaq 0xd0f(%rip), %rdi       # 0x21f1
callq 0x1030
jmp 0x1505
leaq 0xd0f(%rip), %rdi       # 0x21ff
testl %r13d, %r13d
je 0x14fc
leaq 0xcfd(%rip), %rdi       # 0x21f9
callq 0x1030
decl %ebp
je 0x152f
testl %ebx, %ebx
setg %cl
movl %ebx, %eax
xorl %edx, %edx
pushq $0xa
popq %rsi
divl %esi
testl %edx, %edx
sete %al
andb %cl, %al
movzbl %al, %eax
addl %eax, %r12d
movl $0x7a120, %edi          # imm = 0x7A120
callq 0x1130
jmp 0x140f
leaq 0xcd2(%rip), %rdi       # 0x2208
callq 0x1030
xorl %edi, %edi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O2/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: main
int main(void)
{
	pthread_t tid1, tid2;
	display_intro();
	pthread_create(&tid1, NULL, read_input, NULL);
	pthread_create(&tid2, NULL, game_play, NULL);
	pthread_join(tid1, NULL);
	pthread_join(tid2, NULL);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
callq 0x1542
leaq -0x34f(%rip), %rdx      # 0x123c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x10c0
leaq -0x1c1(%rip), %rdx      # 0x13e2
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x10c0
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x10f0
movq (%r14), %rdi
xorl %esi, %esi
callq 0x10f0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/antonblanchard[P]will-it-scale/tests/lock2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	int fd = open(tmpfile, O_RDWR);

	assert(fd >= 0);

	while (1) {
		struct flock lck;

		lck.l_type = F_WRLCK;
		lck.l_whence = SEEK_SET;
		lck.l_start = 0;
		lck.l_len = 1;
		assert(fcntl(fd, F_SETLKW, &lck) == 0);

		lck.l_type = F_UNLCK;
		lck.l_whence = SEEK_SET;
		lck.l_start = 0;
		lck.l_len = 1;
		assert(fcntl(fd, F_SETLKW, &lck) == 0);

		(*iterations) += 2;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x256b(%rip), %rdi      # 0x4180
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x1220
testl %eax, %eax
js 0x1c88
movl %eax, %ebp
pushq $0x7
popq %r14
leaq 0x8(%rsp), %r15
movl $0x1, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movq $0x1, 0x18(%rsp)
movl %ebp, %edi
movl %r14d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1ca1
movl $0x2, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movq $0x1, 0x18(%rsp)
movl %ebp, %edi
movl %r14d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1cba
addq $0x2, (%rbx)
jmp 0x1c2e
leaq 0x62f(%rip), %rdi       # 0x22be
leaq 0x5f5(%rip), %rsi       # 0x228b
leaq 0x629(%rip), %rcx       # 0x22c6
pushq $0x14
jmp 0x1cd1
leaq 0x651(%rip), %rdi       # 0x22f9
leaq 0x5dc(%rip), %rsi       # 0x228b
leaq 0x610(%rip), %rcx       # 0x22c6
pushq $0x1d
jmp 0x1cd1
leaq 0x638(%rip), %rdi       # 0x22f9
leaq 0x5c3(%rip), %rsi       # 0x228b
leaq 0x5f7(%rip), %rcx       # 0x22c6
pushq $0x23
popq %rdx
callq 0x1140
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/2mg.cc
// Function: parse_opt(int, char*, argp_state*)
static error_t parse_opt(int key, char *arg, struct argp_state *state) {
  struct arguments *arguments = static_cast<struct arguments *>(state->input);
  switch (key) {
    case 'l':
      arguments->list = true;
      break;
    case ARGP_KEY_ARG:
      if (state->arg_num >= 1) {
        argp_usage(state);
      }
      arguments->diskimage = arg;
      break;
    case ARGP_KEY_END:
      if (state->arg_num < 1) {
        argp_usage(state);
      }
      break;
    default:
      return ARGP_ERR_UNKNOWN;
  }
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rdx), %r14
testl %edi, %edi
je 0x60c7
cmpl $0x1000001, %edi        # imm = 0x1000001
je 0x60b5
cmpl $0x6c, %edi
jne 0x60df
movb $0x1, 0x8(%r14)
jmp 0x60db
xorl %ebx, %ebx
cmpl $0x0, 0x20(%rdx)
jne 0x60e2
movq %rdx, %rdi
callq 0x52c0
jmp 0x60e2
movq %rsi, %rbx
cmpl $0x0, 0x20(%rdx)
je 0x60d8
movq %rdx, %rdi
callq 0x52c0
movq %rbx, (%r14)
xorl %ebx, %ebx
jmp 0x60e2
pushq $0x7
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/2mg.cc
// Function: readFilename[abi:cxx11](std::shared_ptr<TheHandle>, int)
static std::string readFilename(Handle h, int len) {
  static const char *digits = "0123456789abcdef";
  std::string r;
  for (int i = 0; i < len; i++) {
    uint8_t ch = h->r8();
    if (isalnum(ch) || ch == '_' || ch == '.' || ch == ' ') {
      r += static_cast<char>(ch);
    } else {
      r += 'x';
      uint8_t hi = ch >> 4;
      uint8_t lo = ch & 0xf;
      r += digits[hi];
      r += digits[lo];
    }
  }
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %r13d, %r13d
testl %edx, %edx
cmovgl %edx, %r13d
movb $0x0, 0x10(%rdi)
movabsq $-0x7fffffffffffbfff, %rbp # imm = 0x8000000000004001
subl $0x1, %r13d
jb 0x619c
movq (%r14), %rdi
callq 0x6b8e
movl %eax, %r12d
movzbl %al, %r15d
movl %r15d, %edi
callq 0x51d0
testl %eax, %eax
jne 0x6150
leal -0x20(%r15), %eax
cmpl $0x3f, %eax
ja 0x615e
btq %rax, %rbp
jae 0x615e
movsbl %r12b, %esi
movq %rbx, %rdi
callq 0x5150
jmp 0x6120
movq %rbx, %rdi
pushq $0x78
popq %rsi
callq 0x5150
movl %r15d, %eax
shrl $0x4, %eax
leaq 0xf4c(%rip), %rcx       # 0x70c2
movsbl (%rax,%rcx), %esi
movq %rbx, %rdi
callq 0x5150
andl $0xf, %r15d
leaq 0xf35(%rip), %rax       # 0x70c2
movsbl (%r15,%rax), %esi
movq %rbx, %rdi
callq 0x5150
jmp 0x6120
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x61b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x50e0
movq %r14, %rdi
callq 0x5350
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/2mg.cc
// Function: printDateTime(unsigned short, unsigned short)
static void printDateTime(uint16_t date, uint16_t time) {
  std::cout << std::setfill('0')
            << std::setw(2) << ((date >> 9) & 0x7f) << "-"
            << std::setw(2) << ((date >> 5) & 0xf) << "-"
            << std::setw(2) << (date & 0x1f) << " "
            << std::setw(2) << ((time >> 8) & 0x1f) << ":"
            << std::setw(2) << (time & 0x3f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movq 0x5b87(%rip), %rdi      # 0xbfd0
pushq $0x30
popq %rsi
callq 0x52d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
pushq $0x2
popq %r15
movq %r15, 0x10(%rax,%rcx)
movl %ebp, %esi
shrl $0x9, %esi
movq %rax, %rdi
callq 0x5320
leaq 0xcbe(%rip), %r14       # 0x7133
movq %rax, %rdi
movq %r14, %rsi
callq 0x5180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %r15, 0x10(%rax,%rcx)
movl %ebp, %esi
shrl $0x5, %esi
andl $0xf, %esi
movq %rax, %rdi
callq 0x5320
movq %rax, %rdi
movq %r14, %rsi
callq 0x5180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %r15, 0x10(%rax,%rcx)
andl $0x1f, %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x5320
leaq 0xc0d(%rip), %rsi       # 0x70d4
movq %rax, %rdi
callq 0x5180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %r15, 0x10(%rax,%rcx)
movl %ebx, %esi
shrl $0x8, %esi
andl $0x1f, %esi
movq %rax, %rdi
callq 0x5320
leaq 0xc43(%rip), %rsi       # 0x7135
movq %rax, %rdi
callq 0x5180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %r15, 0x10(%rax,%rcx)
andl $0x3f, %ebx
movq %rax, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5320
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/2mg.cc
// Function: dumpSapling(std::shared_ptr<TheHandle>, unsigned int, std::ostream&)
static void dumpSapling(Handle h, uint32_t len, std::ostream &f) {
  auto index = h->tell();
  while (len > 0) {
    h->seek(index);
    uint16_t blockid = h->r8();
    h->skip(255);
    blockid |= h->r8() << 8;
    uint32_t blen = std::min<uint32_t>(512, len);
    if (blockid && (blockid + 1) * 512 <= h->length) {
      h->seek(blockid * 512);
      dumpSeedling(h, blen, f);
    } else {
      f.seekp(blen, std::ios::cur);
    }
    len -= blen;
    index++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x6aec
movq %rax, %r12
testl %ebp, %ebp
je 0x65f1
movq (%r14), %rdi
movq %r12, %rsi
callq 0x6c90
movq (%r14), %rdi
callq 0x6b8e
movl %eax, %r15d
movq (%r14), %rdi
movl $0xff, %esi
callq 0x6c9a
movq (%r14), %rdi
callq 0x6b8e
movzbl %al, %ecx
shll $0x8, %ecx
movzbl %r15b, %eax
movl $0x200, %edx            # imm = 0x200
cmpl %edx, %ebp
movl $0x200, %r13d           # imm = 0x200
cmovbl %ebp, %r13d
orw %cx, %ax
movl %r13d, %r15d
je 0x65a8
movzwl %ax, %eax
shll $0x9, %eax
leal 0x200(%rax), %ecx
movq (%r14), %rdi
cmpq %rcx, (%rdi)
jge 0x65b8
movq %rbx, %rdi
movq %r15, %rsi
pushq $0x1
popq %rdx
callq 0x5190
jmp 0x65e6
movl %eax, %esi
callq 0x6c90
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6878
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6ca0
leaq 0x10(%rsp), %rdi
callq 0x67fc
subl %r13d, %ebp
incq %r12
jmp 0x653e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x67fc
movq %rbx, %rdi
callq 0x5350
nop
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/handle.cc
// Function: TheHandle::TheHandle(char const*)
TheHandle::TheHandle(const char *filename) {
  data = pos = nullptr;
  std::ifstream f(filename, std::ios::in | std::ios::binary | std::ios::ate);
  if (!f.is_open()) {
    return;
  }
  length = f.tellg();
  data = new uint8_t[length];
  f.seekg(0, std::ios::beg);
  f.read(reinterpret_cast<char*>(data), length);
  f.close();
  pos = data;
}

// Assembly:
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x8(%rsp), %rdi
pushq $0xe
popq %rdx
callq 0x5370
leaq 0x80(%rsp), %rdi
callq 0x5050
testb %al, %al
je 0x6a59
leaq 0x8(%rsp), %rdi
callq 0x5330
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x5030
leaq 0x8(%rbx), %rcx
movq %rax, (%rcx)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5230
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5200
leaq 0x8(%rsp), %rdi
callq 0x5040
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5070
addq $0x210, %rsp            # imm = 0x210
popq %rbx
retq
jmp 0x6a6e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5070
movq %rbx, %rdi
callq 0x5350
nop
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/handle.cc
// Function: TheHandle::TheHandle(std::vector<unsigned char, std::allocator<unsigned char>> const&)
TheHandle::TheHandle(const std::vector<uint8_t> &data) {
  length = data.size();
  this->data = new uint8_t[length];
  std::copy(data.begin(), data.end(), this->data);
  pos = this->data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rdi
subq (%rsi), %rdi
movq %rdi, (%rbx)
callq 0x5030
movq %rax, %r14
movq %rax, 0x8(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
je 0x6ab9
movq %r14, %rdi
callq 0x52e0
movq %r14, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/handle.cc
// Function: TheHandle::rs[abi:cxx11]()
std::string TheHandle::rs() {
  std::string r;
  uint8_t len = *pos++;
  for (auto i = 0; i < len; i++) {
    r += static_cast<char>(*pos++);
  }
  return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x10(%rsi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%rsi)
movzbl (%rax), %ebp
subl $0x1, %ebp
jb 0x6be5
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%r14)
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x5150
jmp 0x6bc7
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x50e0
movq %r14, %rdi
callq 0x5350
// File: /workspace/github_c_makefile_star2_O2/mrkite[P]regs/src/handle.cc
// Function: TheHandle::read[abi:cxx11](int)
std::string TheHandle::read(int32_t len) {
  std::string r;
  for (auto i = 0; i < len; i++) {
    r += static_cast<char>(*pos++);
  }
  return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
xorl %ebp, %ebp
testl %edx, %edx
cmovgl %edx, %ebp
subl $0x1, %ebp
jb 0x6c3f
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%r14)
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x5150
jmp 0x6c21
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x50e0
movq %r14, %rdi
callq 0x5350
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aes128otrpv2/ref/OTR.c
// Function: Setup
int Setup(const uint8 *skey)
{
	uint8 cst[16] = {0};

	KeySchedule(KeyLen, ENC, skey);
	Encryption(KeyLen, cst, J);
	mul2(J, J2); 
	mul2(J2, Q); /* Q = 4J */
	return SUCCESS;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rdx
vxorps %xmm0, %xmm0, %xmm0
movq %rsp, %rbx
vmovaps %xmm0, (%rbx)
movl $0x80, %edi
xorl %esi, %esi
callq 0x1090
movq 0x3da4(%rip), %r14      # 0x4fc8
movl $0x80, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1100
movq 0x3db5(%rip), %rbx      # 0x4ff0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x125f
movq 0x3d63(%rip), %rsi      # 0x4fb0
movq %rbx, %rdi
callq 0x125f
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/big5enc.c
// Function: read_big5
static void read_big5(charset_spec const *charset, long int input_chr,
		      charset_state *state,
		      void (*emit)(void *ctx, long int output), void *emitctx)
{
    UNUSEDARG(charset);

    /*
     * For reading Big5, state->s0 simply contains the single
     * stored lead byte when we are half way through a double-byte
     * character, or 0 if we aren't.
     */

    if (state->s0 == 0) {
	if (input_chr >= 0xA1 && input_chr <= 0xFE) {
	    /*
	     * Lead byte. Just store it.
	     */
	    state->s0 = input_chr;
	} else {
	    /*
	     * Anything else we pass straight through unchanged.
	     */
	    emit(emitctx, input_chr);
	}
    } else {
	/*
	 * We have a stored lead byte. We expect a valid followup
	 * byte.
	 */
	if ((input_chr >= 0x40 && input_chr <= 0x7E) ||
	    (input_chr >= 0xA1 && input_chr <= 0xFE)) {
	    emit(emitctx, big5_to_unicode(state->s0 - 0xA1, input_chr - 0x40));
	} else {
	    emit(emitctx, ERROR);
	}
	state->s0 = 0;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %r14
movq %rdx, %rbx
movq (%rdx), %rdi
testq %rdi, %rdi
je 0x6539
leaq -0x40(%rsi), %rax
cmpq $0x3f, %rax
setae %r8b
leaq -0xa1(%rsi), %rax
cmpq $0x5e, %rax
setae %dl
movl $0xffff, %eax           # imm = 0xFFFF
testb %dl, %r8b
jne 0x652b
addl $0xffffff5f, %edi       # imm = 0xFFFFFF5F
addl $-0x40, %esi
movq %rcx, %r15
callq 0x65c8
movq %r15, %rcx
movq %r14, %rdi
movq %rax, %rsi
callq *%rcx
andq $0x0, (%rbx)
jmp 0x6549
leaq -0xa1(%rsi), %rax
cmpq $0x5d, %rax
ja 0x654f
movq %rsi, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/big5enc.c
// Function: write_big5
static int write_big5(charset_spec const *charset, long int input_chr,
		      charset_state *state,
		      void (*emit)(void *ctx, long int output), void *emitctx)
{
    UNUSEDARG(charset);
    UNUSEDARG(state);

    if (input_chr == -1)
	return TRUE;		       /* stateless; no cleanup required */

    if (input_chr < 0x80) {
	emit(emitctx, input_chr);
	return TRUE;
    } else {
	int r, c;
	if (unicode_to_big5(input_chr, &r, &c)) {
	    emit(emitctx, r + 0xA1);
	    emit(emitctx, c + 0x40);
	    return TRUE;
	} else {
	    return FALSE;
	}
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
pushq $0x1
popq %rbp
cmpq $-0x1, %rsi
je 0x65bc
movq %r8, %r14
movq %rcx, %rbx
cmpq $0x7f, %rsi
jg 0x657d
movq %r14, %rdi
callq *%rbx
jmp 0x65bc
leaq 0xc(%rsp), %rax
leaq 0x8(%rsp), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x662f
testl %eax, %eax
je 0x65ba
movslq 0xc(%rsp), %rsi
addq $0xa1, %rsi
movq %r14, %rdi
callq *%rbx
movslq 0x8(%rsp), %rsi
addq $0x40, %rsi
movq %r14, %rdi
callq *%rbx
pushq $0x1
popq %rbp
jmp 0x65bc
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/big5set.c
// Function: unicode_to_big5
int unicode_to_big5(long int unicode, int *r, int *c)
{
    int rr, cc;
    long int uu;
    int i, j, k;

    i = -1;
    j = lenof(big5_backward);
    while (j - i > 1) {
	k = (i + j) / 2;
	rr = big5_backward[k].r;
	cc = big5_backward[k].c;
	uu = big5_forward[rr][cc];
	if (unicode > uu)
	    i = k;
	else if (unicode < uu)
	    j = k;
	else {
	    *r = rr;
	    *c = cc;
	    return 1;
	}
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rcx
movl $0x3587, %r8d           # imm = 0x3587
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl $0x2, %r9d
leaq 0xcbdf(%rip), %r11      # 0x13230
leaq 0x3f88(%rip), %rbx      # 0xa5e0
leal 0x1(%r10), %ebp
cmpl %ebp, %r8d
jle 0x6697
leal (%r8,%r10), %eax
cltd
idivl %r9d
movslq %eax, %r14
movzbl (%r11,%r14,2), %edx
movzbl 0x1(%r11,%r14,2), %r14d
imulq $0x17e, %rdx, %r15      # imm = 0x17E
addq %rbx, %r15
movzwl (%r15,%r14,2), %r15d
cmpq %rdi, %r15
jl 0x6692
movl %eax, %r8d
jg 0x665c
jmp 0x669b
movl %eax, %r10d
jmp 0x6658
xorl %eax, %eax
jmp 0x66a5
movl %edx, (%rsi)
movl %r14d, (%rcx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/cns11643.c
// Function: cns11643_to_unicode
long int cns11643_to_unicode(int p, int r, int c)
{
    assert(p >= 0 && p < 7);
    assert(r >= 0 && r < 94);
    assert(c >= 0 && c < 94);
    return cns11643_forward((p*94+r)*94+c);
}

// Assembly:
pushq %rax
cmpl $0x7, %edi
jae 0x66ee
cmpl $0x5e, %esi
jae 0x670d
cmpl $0x5e, %edx
jae 0x672c
imull $0x5e, %edi, %eax
addl %esi, %eax
imull $0x5e, %eax, %ecx
addl %edx, %ecx
leaq 0x136d3(%rip), %rax     # 0x19da0
movzwl (%rax,%rcx,2), %edx
movl %ecx, %eax
shrl $0x4, %eax
leaq 0x49663(%rip), %rsi     # 0x4fd40
movl (%rsi,%rax,4), %eax
addl %ecx, %ecx
shrl %cl, %eax
andl $0x3, %eax
shll $0x10, %eax
orl %edx, %eax
popq %rcx
retq
leaq 0x13649(%rip), %rdi     # 0x19d3e
leaq 0x13652(%rip), %rsi     # 0x19d4e
leaq 0x13656(%rip), %rcx     # 0x19d59
movl $0x32d9, %edx           # imm = 0x32D9
callq 0x6060
leaq 0x3e7c(%rip), %rdi      # 0xa590
leaq 0x13633(%rip), %rsi     # 0x19d4e
leaq 0x13637(%rip), %rcx     # 0x19d59
movl $0x32da, %edx           # imm = 0x32DA
callq 0x6060
leaq 0x1364e(%rip), %rdi     # 0x19d81
leaq 0x13614(%rip), %rsi     # 0x19d4e
leaq 0x13618(%rip), %rcx     # 0x19d59
movl $0x32db, %edx           # imm = 0x32DB
callq 0x6060
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/cns11643.c
// Function: unicode_to_cns11643
int unicode_to_cns11643(long int unicode, int *p, int *r, int *c)
{
    int index, pp, rr, cc;
    long int uu;
    int i, j, k;

    i = -1;
    j = lenof(cns11643_backward);
    while (j - i > 1) {
	k = (i + j) / 2;
	index = cns11643_backward[k];
	uu = cns11643_forward(index);
	if (unicode > uu)
	    i = k;
	else if (unicode < uu)
	    j = k;
	else {
	    cc = index % 94;
	    rr = index / 94;
	    pp = rr / 94;
	    rr %= 94;
	    *p = pp;
	    *r = rr;
	    *c = cc;
	    return 1;
	}
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, -0x8(%rsp)
movq %rdx, %r9
movl $0xbe2e, %r11d          # imm = 0xBE2E
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl $0x2, %ebx
leaq 0x3196b(%rip), %r15     # 0x380e0
leaq 0x13624(%rip), %r12     # 0x19da0
leaq 0x495bd(%rip), %r13     # 0x4fd40
leal 0x1(%r14), %ebp
cmpl %ebp, %r11d
jle 0x67cf
leal (%r11,%r14), %eax
cltd
idivl %ebx
movslq %eax, %rcx
movzwl (%r15,%rcx,2), %r8d
leal (%r8,%r8), %ecx
movzwl (%rcx,%r12), %edx
movl %r8d, %r10d
shrl $0x4, %r10d
movl (%r13,%r10,4), %r10d
shrl %cl, %r10d
andl $0x3, %r10d
shll $0x10, %r10d
orl %edx, %r10d
cmpq %rdi, %r10
jl 0x67ca
movl %eax, %r11d
jg 0x6787
jmp 0x67d3
movl %eax, %r14d
jmp 0x6783
xorl %eax, %eax
jmp 0x6814
movw $0x5e, %di
movl %r8d, %eax
xorl %edx, %edx
divw %di
movl %eax, %ecx
movzwl %dx, %r10d
movw $0x2284, %r11w          # imm = 0x2284
movl %r8d, %eax
xorl %edx, %edx
divw %r11w
movzwl %ax, %r8d
movl %ecx, %eax
xorl %edx, %edx
divw %di
movzwl %dx, %eax
movl %r8d, (%rsi)
movl %eax, (%r9)
movq -0x8(%rsp), %rax
movl %r10d, (%rax)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/cp949.c
// Function: write_cp949
static int write_cp949(charset_spec const *charset, long int input_chr,
		       charset_state *state,
		       void (*emit)(void *ctx, long int output),
		       void *emitctx)
{
    UNUSEDARG(charset);
    UNUSEDARG(state);

    if (input_chr == -1)
	return TRUE;		       /* stateless; no cleanup required */

    if (input_chr < 0x80) {
	emit(emitctx, input_chr);
	return TRUE;
    } else {
	int r, c;
	if (unicode_to_cp949(input_chr, &r, &c)) {
	    emit(emitctx, r + 0x80);
	    emit(emitctx, c + 0x40);
	    return TRUE;
	} else {
	    return FALSE;
	}
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
pushq $0x1
popq %rbp
cmpq $-0x1, %rsi
je 0x68e4
movq %r8, %r14
movq %rcx, %rbx
cmpq $0x7f, %rsi
jg 0x68a8
movq %r14, %rdi
callq *%rbx
jmp 0x68e4
leaq 0xc(%rsp), %rax
leaq 0x8(%rsp), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x8f2e
testl %eax, %eax
je 0x68e2
movslq 0xc(%rsp), %rsi
subq $-0x80, %rsi
movq %r14, %rdi
callq *%rbx
movslq 0x8(%rsp), %rsi
addq $0x40, %rsi
movq %r14, %rdi
callq *%rbx
pushq $0x1
popq %rbp
jmp 0x68e4
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop