LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/amanelis[P]uici/uiciudp.c
// Function: u_sendto
ssize_t u_sendto(int fd, void *buf, size_t nbytes, u_buf_t *ubufp) {
   int len;
   struct sockaddr *remotep;
   int retval;

   len = sizeof(struct sockaddr_in);
   remotep = (struct sockaddr *)ubufp;
   while (((retval = sendto(fd, buf, nbytes, 0, remotep, len)) == -1) &&
           (errno == EINTR)) ;  
   return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
movl %r12d, %edi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
movl $0x10, %r9d
callq 0x10c0
movq %rax, %r13
cmpl $-0x1, %r13d
jne 0x1dea
callq 0x1030
cmpl $0x4, (%rax)
je 0x1dbe
movslq %r13d, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/amanelis[P]uici/uiciudp.c
// Function: u_sendtohost
ssize_t u_sendtohost(int fd, void *buf, size_t nbytes, char *hostn,
                     u_port_t port) {
   struct sockaddr_in remote;

   if (name2addr(hostn, &(remote.sin_addr.s_addr)) == -1) {
      errno = EINVAL;
      return -1;
   }
   remote.sin_port = htons((short)port);
   remote.sin_family = AF_INET;
   return u_sendto(fd, buf, nbytes, &remote);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %r15d
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r12d
leaq -0x2c(%rbp), %rsi
movq %rcx, %rdi
callq 0x1afe
cmpl $-0x1, %eax
je 0x1e4b
rolw $0x8, %r15w
leaq -0x30(%rbp), %rcx
movw %r15w, 0x2(%rcx)
movw $0x2, (%rcx)
movl %r12d, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1da4
jmp 0x1e5d
callq 0x1030
movl $0x16, (%rax)
movq $-0x1, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/amanelis[P]uici/uiciudp.c
// Function: u_join
int u_join(char *IP_address, u_port_t port, u_buf_t *ubufp) {
   int mcastfd;
   struct ip_mreq tempaddress;

   if ((mcastfd = u_openudp(port)) == -1)
      return mcastfd;
   
   tempaddress.imr_multiaddr.s_addr = inet_addr(IP_address);
   tempaddress.imr_interface.s_addr = htonl(INADDR_ANY);

        /* Join the multicast group. Let kernel choose the interface */
   if (setsockopt(mcastfd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
                   &tempaddress, sizeof(tempaddress)) == -1)
      return -1;
   ubufp->sin_family = AF_INET;
   ubufp->sin_addr.s_addr = inet_addr(IP_address);
   ubufp->sin_port = htons((short)port);
   return mcastfd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r12
movl %esi, %edi
callq 0x1b58
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x1ee2
movl %eax, %r15d
movq %r12, %rdi
callq 0x10f0
leaq -0x30(%rbp), %rcx
movl %eax, (%rcx)
movl $0x0, 0x4(%rcx)
movl %r15d, %edi
xorl %esi, %esi
movl $0x23, %edx
movl $0x8, %r8d
callq 0x1050
cmpl $-0x1, %eax
je 0x1ee2
movw $0x2, (%rbx)
movq %r12, %rdi
callq 0x10f0
movl %eax, 0x4(%rbx)
rolw $0x8, %r14w
movw %r14w, 0x2(%rbx)
movl %r15d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x15bb
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1344
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)
movq %r15, %xmm0
pshufd $0x44, %xmm0, %xmm2     # xmm2 = xmm0[0,1,0,1]
psllq $0x3, %xmm2
movdqa %xmm2, %xmm0
movdqa %xmm2, %xmm3
movdqa %xmm2, %xmm1
movdqa %xmm2, %xmm4
movdqa %xmm2, %xmm5
movdqa %xmm2, %xmm6
psrlq $0x8, %xmm6
punpcklqdq %xmm2, %xmm6    # xmm6 = xmm6[0],xmm2[0]
psrlq $0x38, %xmm2
psrlq $0x30, %xmm0
movsd %xmm2, %xmm0            # xmm0 = xmm2[0],xmm0[1]
psrlq $0x28, %xmm3
psrlq $0x20, %xmm1
movsd %xmm3, %xmm1            # xmm1 = xmm3[0],xmm1[1]
psrlq $0x18, %xmm4
psrlq $0x10, %xmm5
movsd %xmm4, %xmm5            # xmm5 = xmm4[0],xmm5[1]
movdqa 0xa13(%rip), %xmm2      # 0x2030
pand %xmm2, %xmm6
andpd %xmm2, %xmm5
packuswb %xmm6, %xmm5
andpd %xmm2, %xmm1
andpd %xmm2, %xmm0
packuswb %xmm1, %xmm0
packuswb %xmm5, %xmm0
packuswb %xmm0, %xmm0
movq %rsp, %rsi
movq %xmm0, 0x78(%rsi)
movq %rbx, %rdi
callq 0x1344
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movabsq $0x6a09e667f3bcc908, %rax # imm = 0x6A09E667F3BCC908
movq %rax, (%rdi)
movabsq $-0x4498517a7b3558c5, %rax # imm = 0xBB67AE8584CAA73B
movq %rax, 0x8(%rdi)
movabsq $0x3c6ef372fe94f82b, %rax # imm = 0x3C6EF372FE94F82B
movq %rax, 0x10(%rdi)
movabsq $-0x5ab00ac5a0e2c90f, %rax # imm = 0xA54FF53A5F1D36F1
movq %rax, 0x18(%rdi)
movabsq $0x510e527fade682d1, %rax # imm = 0x510E527FADE682D1
movq %rax, 0x20(%rdi)
movabsq $-0x64fa9773d4c193e1, %rax # imm = 0x9B05688C2B3E6C1F
movq %rax, 0x28(%rdi)
movabsq $0x1f83d9abfb41bd6b, %rax # imm = 0x1F83D9ABFB41BD6B
movq %rax, 0x30(%rdi)
movabsq $0x5be0cd19137e2179, %rax # imm = 0x5BE0CD19137E2179
movq %rax, 0x38(%rdi)
movq $0x0, 0x40(%rdi)
cmpq $0x80, %rdx
jb 0x1706
movq %r15, %rdi
movq %r14, %rsi
callq 0x1344
subq $-0x80, 0x40(%r15)
subq $-0x80, %r14
addq $-0x80, %rbx
cmpq $0x7f, %rbx
ja 0x16e8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x1531
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movl $0x50, %esi
movq %r15, %rdx
callq 0x1100
testq %rax, %rax
je 0x1751
movq %r12, %rdi
callq 0x10b0
cmpb $0xa, -0x1(%rax,%r12)
jne 0x16d1
movb $0x0, 0xf(%rsp,%rax)
movzbl 0x10(%rsp), %eax
cmpl $0x23, %eax
je 0x16a3
testl %eax, %eax
je 0x16a3
cmpb $0x9, 0x11(%rsp)
jne 0x1797
movb %al, (%r14)
callq 0x1060
movq %rax, %r14
movl $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 0x172f
cmpb $0x0, (%rax)
je 0x17c6
movl $0x16, (%r14)
movsd %xmm0, (%rbx)
leaq 0x19c4(%rip), %rdi      # 0x3105
xorl %eax, %eax
callq 0x1858
movl $0x0, (%r14)
jmp 0x17b5
movq %r15, %rdi
callq 0x1070
testl %eax, %eax
je 0x1780
callq 0x1060
cmpl $0x0, (%rax)
je 0x1787
movq %rax, %rbx
leaq 0x196b(%rip), %rdi      # 0x30dc
xorl %eax, %eax
callq 0x1858
movl $0x0, (%rbx)
jmp 0x17b5
movl $0x1, %eax
jmp 0x17ba
leaq 0x194e(%rip), %rdi      # 0x30dc
xorl %eax, %eax
callq 0x1977
jmp 0x17b5
leaq 0x1944(%rip), %rdi      # 0x30e2
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x1977
callq 0x1060
movl $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpl $0x0, (%r14)
movsd %xmm0, (%rbx)
jne 0x173a
xorl %eax, %eax
jmp 0x17ba
// File: /workspace/github_c_makefile_star2_O3/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)
movl $0x38, %edi
callq 0x1140
testq %rax, %rax
je 0x1b01
movq %rax, %rbx
movaps 0x16d2(%rip), %xmm0     # 0x3190
movups %xmm0, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movsd (%rsp), %xmm0
movsd %xmm0, 0x30(%rax)
callq 0x20c4
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x1af9
movq %rax, %r14
callq 0x20c4
movq %rax, (%rbx)
testq %rax, %rax
jne 0x1b03
movq %r14, %rdi
callq 0x242a
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_O3/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, %r15
movl $0x10, %edi
callq 0x1140
testq %rax, %rax
je 0x2168
movq %rax, %rbx
movq %r14, 0x8(%rax)
movl $0x8, %esi
movq %r14, %rdi
callq 0x24c4
movq %rax, (%rbx)
testq %rax, %rax
je 0x2160
testq %r14, %r14
je 0x216a
movq %rax, %r12
xorl %r13d, %r13d
movsd (%r15,%r13,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x8, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x276c
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
incq %r13
cmpq %r13, %r14
jne 0x2116
leaq -0x1(%r14), %r15
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x217b
decq %r15
cmpq %r14, %r15
jb 0x2148
jmp 0x216a
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_O3/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 0x21dd
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x276c
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x8, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x276c
movsd 0x8(%rsp), %xmm0
ucomisd (%rax), %xmm0
movq %r15, %r12
jbe 0x21dd
movq %r13, %r12
leaq (%r15,%r15), %r13
addq $0x2, %r13
cmpq %rbx, %r13
jae 0x2223
movl $0x8, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x276c
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x8, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x276c
movsd 0x8(%rsp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x2223
movq %r13, %r12
cmpq %r15, %r12
je 0x223e
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2445
movq %r12, %r15
jmp 0x2194
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r12
leaq 0x8(%rsp), %rsi
movsd %xmm0, (%rsi)
movq (%rdi), %rdi
movl $0x1, %edx
movl $0x8, %ecx
callq 0x2633
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x2290
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r12), %r14
movq 0x8(%r12), %r15
leaq 0x1(%r15), %rax
movq %rax, 0x8(%r12)
xorl %ebx, %ebx
testq %r15, %r15
je 0x2280
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x276c
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
leaq -0x1(%r15), %r13
movq %r13, %r12
shrq %r12
movl $0x8, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x276c
movsd (%rsp), %xmm0
ucomisd (%rax), %xmm0
jae 0x2280
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2445
movq %r12, %r15
cmpq $0x1, %r13
ja 0x22a9
jmp 0x2280
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_getmin
int
doubleheap_getmin(struct doubleheap * H, double * x)
{

	/* If we have any elements, the minimum is in position 0. */
	if (H->nelems) {
		*x = *doublelist_get(H->elems, 0);
		return (0);
	} else
		return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rdi)
je 0x232a
movq %rsi, %rbx
movq (%rdi), %rdi
xorl %r14d, %r14d
movl $0x8, %edx
xorl %esi, %esi
callq 0x276c
movsd (%rax), %xmm0
movsd %xmm0, (%rbx)
jmp 0x2330
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x237c
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0x8, %edx
xorl %esi, %esi
callq 0x276c
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
jmp 0x217b
leaq 0xfe5(%rip), %rdi       # 0x3368
leaq 0xfec(%rip), %rsi       # 0x3376
leaq 0x1004(%rip), %rcx      # 0x3395
movl $0xc7, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/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 0x240b
movq %rdi, %rbx
movq (%rdi), %rdi
decq %rsi
movl $0x8, %edx
callq 0x276c
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rdi
movl $0x8, %edx
xorl %esi, %esi
callq 0x276c
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq (%rbx), %rdi
movl $0x1, %esi
movl $0x8, %edx
callq 0x26d7
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
decq %rdx
movq %rdx, 0x8(%rbx)
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
jmp 0x217b
leaq 0xf56(%rip), %rdi       # 0x3368
leaq 0xf5d(%rip), %rsi       # 0x3376
leaq 0xfa9(%rip), %rcx       # 0x33c9
movl $0xd9, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/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 0x2444
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x256c
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rdi, %r14
movl $0x8, %edx
callq 0x276c
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x8, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x276c
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x276c
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movl $0x8, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x276c
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0xd1f(%rip), %rdi       # 0x2004
callq 0x1040
leaq 0xef2(%rip), %rdi       # 0x21e3
callq 0x1030
leaq 0xd0d(%rip), %r12       # 0x200a
xorl %r13d, %r13d
movl (%r15,%r13,4), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1050
incq %r13
cmpq $0x3, %r13
jne 0x1300
leaq 0xec3(%rip), %rdi       # 0x21e1
callq 0x1030
leaq 0xeb9(%rip), %rdi       # 0x21e3
callq 0x1030
decl %r14d
incl %ebx
leaq 0xcd5(%rip), %rdi       # 0x2010
movl %r14d, %esi
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1050
movq 0x2c90(%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_O3/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
movl $0x8, %eax
subl %edi, %eax
cmpl $0x3, %eax
movl $0x2, %ebx
cmovgel %eax, %ebx
xorl %edi, %edi
callq 0x1090
addq %rax, %rbx
movq %rbx, (%rsp)
movq $0x0, 0x8(%rsp)
leaq 0x2d25(%rip), %rdi      # 0x40c0
callq 0x1110
movl 0x2d12(%rip), %ebx      # 0x40b8
testl %ebx, %ebx
jne 0x13d9
leaq 0x2d37(%rip), %rdi      # 0x40e8
leaq 0x2d08(%rip), %rsi      # 0x40c0
movq %rsp, %rdx
callq 0x10d0
cmpl $0x6e, %eax
jne 0x13d3
movl $0x1, %edi
callq 0x1100
xorl %ebx, %ebx
jmp 0x13d9
movl 0x2cdf(%rip), %ebx      # 0x40b8
movl $0x0, 0x2cd5(%rip)      # 0x40b8
leaq 0x2cd6(%rip), %rdi      # 0x40c0
callq 0x10a0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x3, %ebp
leaq 0xc(%rsp), %r14
leaq 0xdd3(%rip), %r15       # 0x21f9
xorl %r12d, %r12d
xorl %r13d, %r13d
callq 0x1120
cltq
imulq $0x2aaaaaab, %rax, %rcx # imm = 0x2AAAAAAB
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
addl %ecx, %eax
incl %eax
movl %eax, 0xc(%rsp,%r13,4)
incq %r13
cmpq $0x3, %r13
jne 0x142c
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %r12d, %ecx
callq 0x12c9
movl %r12d, %edi
callq 0x1366
leal -0x42(%rax), %ecx
cmpl $0x31, %ecx
ja 0x14fc
movabsq $0x2100100021001, %rdx  # imm = 0x2100100021001
btq %rcx, %rdx
jae 0x14fc
cmpl $0x42, %eax
movl $0x62, %ecx
cmovel %ecx, %eax
cmpl $0x53, %eax
movl $0x73, %ecx
cmovel %ecx, %eax
movl 0xc(%rsp), %ecx
movl 0x10(%rsp), %edx
addl %ecx, %edx
addl 0x14(%rsp), %edx
cmpl $0x4e, %eax
movl $0x6e, %esi
cmovel %esi, %eax
cmpl $0x62, %eax
je 0x14cb
movq %r15, %rdi
cmpl $0xa, %edx
jg 0x150a
cmpl $0x73, %eax
je 0x14d8
movq %r15, %rdi
cmpl $0xb, %edx
jl 0x150a
cmpl 0x10(%rsp), %ecx
jne 0x14ec
cmpl 0x14(%rsp), %ecx
jne 0x14ec
movq %r15, %rdi
cmpl $0x6e, %eax
jne 0x150a
incl %ebx
leaq 0xcfc(%rip), %rdi       # 0x21f1
callq 0x1030
jmp 0x1513
leaq 0xcfc(%rip), %rdi       # 0x21ff
testl %eax, %eax
je 0x150a
movq %r15, %rdi
callq 0x1030
decl %ebp
je 0x1540
testl %ebx, %ebx
setg %al
imull $0xcccccccd, %ebx, %ecx # imm = 0xCCCCCCCD
rorl %ecx
cmpl $0x1999999a, %ecx       # imm = 0x1999999A
setb %cl
andb %al, %cl
movzbl %cl, %eax
addl %eax, %r12d
movl $0x7a120, %edi          # imm = 0x7A120
callq 0x1130
jmp 0x1429
leaq 0xcc1(%rip), %rdi       # 0x2208
callq 0x1030
xorl %edi, %edi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O3/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 0x1553
leaq -0x360(%rip), %rdx      # 0x123c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x10c0
leaq -0x1bd(%rip), %rdx      # 0x13f7
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_O3/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 %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x242b(%rip), %rdi      # 0x4180
movl $0x2, %esi
xorl %eax, %eax
callq 0x1220
testl %eax, %eax
js 0x1e18
movl %eax, %ebp
movq %rsp, %rdx
movl $0x1, (%rdx)
movq $0x0, 0x8(%rdx)
movq $0x1, 0x10(%rdx)
movl %eax, %edi
movl $0x7, %esi
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1df9
movq %rsp, %r14
movl $0x2, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
movl %ebp, %edi
movl $0x7, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1e37
addq $0x2, (%rbx)
movl $0x1, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
movl %ebp, %edi
movl $0x7, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
je 0x1d99
leaq 0x529(%rip), %rdi       # 0x2329
leaq 0x4b4(%rip), %rsi       # 0x22bb
leaq 0x4e8(%rip), %rcx       # 0x22f6
movl $0x1d, %edx
callq 0x1140
leaq 0x4cf(%rip), %rdi       # 0x22ee
leaq 0x495(%rip), %rsi       # 0x22bb
leaq 0x4c9(%rip), %rcx       # 0x22f6
movl $0x14, %edx
callq 0x1140
leaq 0x4eb(%rip), %rdi       # 0x2329
leaq 0x476(%rip), %rsi       # 0x22bb
leaq 0x4aa(%rip), %rcx       # 0x22f6
movl $0x23, %edx
callq 0x1140
// File: /workspace/github_c_makefile_star2_O3/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 0x6776
cmpl $0x1000001, %edi        # imm = 0x1000001
je 0x6764
movl $0x7, %ebx
cmpl $0x6c, %edi
jne 0x678c
movb $0x1, 0x8(%r14)
jmp 0x678a
xorl %ebx, %ebx
cmpl $0x0, 0x20(%rdx)
jne 0x678c
movq %rdx, %rdi
callq 0x52c0
jmp 0x678c
movq %rsi, %rbx
cmpl $0x0, 0x20(%rdx)
je 0x6787
movq %rdx, %rdi
callq 0x52c0
movq %rbx, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
movq 0x6446(%rip), %r14      # 0xcfc8
movq (%r14), %rax
movq -0x18(%rax), %rcx
leaq (%r14,%rcx), %r15
cmpb $0x0, 0xe1(%r14,%rcx)
jne 0x6bb0
movq %r15, %rdi
movl $0x20, %esi
callq 0x5180
movb $0x1, 0xe1(%r15)
movq (%r14), %rax
movb $0x30, 0xe0(%r15)
movq -0x18(%rax), %rax
movl $0x2, %r12d
movq %r12, 0x10(%r14,%rax)
movzwl %bp, %ebp
movl %ebp, %esi
shrl $0x9, %esi
movq %r14, %rdi
callq 0x5310
movq %rax, %r14
leaq 0x1552(%rip), %r15      # 0x8133
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5200
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r14,%rax)
movl %ebp, %esi
shrl $0x5, %esi
andl $0xf, %esi
movq %r14, %rdi
callq 0x5310
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5200
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r14,%rax)
andl $0x1f, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x5310
movq %rax, %r14
leaq 0x1491(%rip), %rsi      # 0x80d4
movl $0x1, %edx
movq %rax, %rdi
callq 0x5200
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r14,%rax)
movzwl %bx, %ebx
movl %ebx, %esi
shrl $0x8, %esi
andl $0x1f, %esi
movq %r14, %rdi
callq 0x5310
movq %rax, %r14
leaq 0x14bc(%rip), %rsi      # 0x8135
movl $0x1, %edx
movq %rax, %rdi
callq 0x5200
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r14,%rax)
andl $0x3f, %ebx
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5310
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movq %rdx, (%rsp)
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x724e
testl %ebp, %ebp
je 0x6d8f
movq %rax, %r15
movq (%r14), %rdi
movq %r15, %rsi
callq 0x741e
movq (%r14), %rdi
callq 0x72f0
movl %eax, %r12d
movq (%r14), %rdi
movl $0xff, %esi
callq 0x7428
movq (%r14), %rdi
callq 0x72f0
movzbl %al, %ecx
shll $0x8, %ecx
movzbl %r12b, %eax
movl $0x200, %edx            # imm = 0x200
cmpl %edx, %ebp
movl $0x200, %ebx            # imm = 0x200
cmovbl %ebp, %ebx
orw %cx, %ax
movl %ebx, %r12d
je 0x6d2e
movzwl %ax, %eax
shll $0x9, %eax
leal 0x200(%rax), %ecx
movq (%r14), %rdi
cmpq %rcx, (%rdi)
jge 0x6d41
movq (%rsp), %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x5190
jmp 0x6d84
movl %eax, %esi
callq 0x741e
movq (%r14), %rdi
movq 0x8(%r14), %r13
testq %r13, %r13
je 0x6d6b
movq 0x6265(%rip), %rax      # 0xcfc0
cmpb $0x0, (%rax)
je 0x6d66
incl 0x8(%r13)
jmp 0x6d6b
lock
incl 0x8(%r13)
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x742e
testq %r13, %r13
je 0x6d84
movq %r13, %rdi
callq 0x6f48
incq %r15
subl %ebx, %ebp
jne 0x6cce
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
testq %r13, %r13
je 0x6dae
movq %r13, %rdi
callq 0x6f48
movq %rbx, %rdi
callq 0x5340
// File: /workspace/github_c_makefile_star2_O3/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
movl $0xe, %edx
callq 0x5360
leaq 0x80(%rsp), %rdi
callq 0x5060
testb %al, %al
je 0x71bb
leaq 0x8(%rsp), %rdi
callq 0x5320
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 0x5240
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5210
leaq 0x8(%rsp), %rdi
callq 0x5050
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5080
addq $0x210, %rsp            # imm = 0x210
popq %rbx
retq
jmp 0x71d0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5080
movq %rbx, %rdi
callq 0x5340
nop
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x10(%rsi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%rsi)
movzbl (%rax), %ebp
testl %ebp, %ebp
je 0x734e
movq %rsi, %r14
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%r14)
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x5160
decl %ebp
jne 0x7333
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x7372
movq (%r15), %rsi
incq %rsi
callq 0x51c0
movq %r14, %rdi
callq 0x5340
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
testl %edx, %edx
jle 0x73bb
movl %edx, %ebp
movq %rsi, %r14
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%r14)
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x5160
decl %ebp
jne 0x73a0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x73df
movq (%r15), %rsi
incq %rsi
callq 0x51c0
movq %r14, %rdi
callq 0x5340
nop
// File: /workspace/github_c_makefile_star2_O3/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
movzbl (%r14), %eax
vmovd %eax, %xmm0
vpbroadcastb %xmm0, %xmm0
movw $0x7fff, %cx            # imm = 0x7FFF
kmovd %ecx, %k1
vmovdqu8 0x1(%r14), %xmm1 {%k1} {z}
vpalignr $0xf, %xmm0, %xmm1, %xmm0 # xmm0 = xmm0[15],xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
vpsrlw $0x7, %xmm1, %xmm1
vpbroadcastd 0x1d99(%rip), %xmm2 # 0x3000
vpaddw %xmm0, %xmm0, %xmm0
vpternlogd $0xe2, %xmm1, %xmm2, %xmm0
movq 0x3d77(%rip), %rcx      # 0x4ff0
vmovdqu8 %xmm0, (%rcx) {%k1}
shrl $0x7, %eax
movb 0xf(%r14), %dl
addb %dl, %dl
leaq 0x1eb1(%rip), %rsi      # 0x3140
xorb (%rax,%rsi), %dl
movb %dl, 0xf(%rcx)
movzbl (%rcx), %eax
vmovd %eax, %xmm0
vpbroadcastb %xmm0, %xmm0
vmovdqu8 0x1(%rcx), %xmm1 {%k1} {z}
vpalignr $0xf, %xmm0, %xmm1, %xmm0 # xmm0 = xmm0[15],xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
vpsrlw $0x7, %xmm1, %xmm1
vpaddw %xmm0, %xmm0, %xmm0
vpternlogd $0xe2, %xmm1, %xmm2, %xmm0
movq 0x3ce8(%rip), %rcx      # 0x4fb0
vmovdqu8 %xmm0, (%rcx) {%k1}
shrl $0x7, %eax
addb %dl, %dl
xorb (%rax,%rsi), %dl
movb %dl, 0xf(%rcx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x653c
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 0x65d0
movq %r15, %rcx
movq %r14, %rdi
movq %rax, %rsi
callq *%rcx
movq $0x0, (%rbx)
jmp 0x654c
leaq -0xa1(%rsi), %rax
cmpq $0x5d, %rax
ja 0x6552
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_O3/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
movl $0x1, %ebp
cmpq $-0x1, %rsi
je 0x65c3
movq %r8, %r14
movq %rcx, %rbx
cmpq $0x7f, %rsi
jg 0x6582
movq %r14, %rdi
callq *%rbx
jmp 0x65c3
leaq 0xc(%rsp), %rax
leaq 0x8(%rsp), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x6637
testl %eax, %eax
je 0x65c1
movslq 0xc(%rsp), %rsi
addq $0xa1, %rsi
movq %r14, %rdi
callq *%rbx
movslq 0x8(%rsp), %rsi
addq $0x40, %rsi
movq %r14, %rdi
callq *%rbx
movl $0x1, %ebp
jmp 0x65c3
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x3587, %r9d           # imm = 0x3587
leaq 0xdbe4(%rip), %rcx      # 0x14230
leaq 0x4f8d(%rip), %r8       # 0xb5e0
leal (%r9,%rax), %r11d
movl %r11d, %r10d
shrl $0x1f, %r10d
addl %r11d, %r10d
sarl %r10d
movslq %r10d, %rbx
movzbl (%rcx,%rbx,2), %r11d
movzbl 0x1(%rcx,%rbx,2), %ebx
imulq $0x17e, %r11, %r14      # imm = 0x17E
addq %r8, %r14
movzwl (%r14,%rbx,2), %r14d
cmpq %rdi, %r14
jge 0x668d
movl %r10d, %eax
movl %r9d, %r10d
jmp 0x668f
jle 0x66a2
movl %r10d, %r11d
subl %eax, %r11d
movl %r10d, %r9d
cmpl $0x1, %r11d
jg 0x6653
xorl %eax, %eax
jmp 0x66ac
movl %r11d, (%rsi)
movl %ebx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x66f2
cmpl $0x5e, %esi
jae 0x6711
cmpl $0x5e, %edx
jae 0x6730
imull $0x5e, %edi, %eax
addl %esi, %eax
imull $0x5e, %eax, %ecx
addl %edx, %ecx
leaq 0x146cf(%rip), %rax     # 0x1ada0
movzwl (%rax,%rcx,2), %edx
movl %ecx, %eax
shrl $0x4, %eax
leaq 0x4a65f(%rip), %rsi     # 0x50d40
movl (%rsi,%rax,4), %eax
addl %ecx, %ecx
shrl %cl, %eax
andl $0x3, %eax
shll $0x10, %eax
orl %edx, %eax
popq %rcx
retq
leaq 0x14645(%rip), %rdi     # 0x1ad3e
leaq 0x1464e(%rip), %rsi     # 0x1ad4e
leaq 0x14652(%rip), %rcx     # 0x1ad59
movl $0x32d9, %edx           # imm = 0x32D9
callq 0x6060
leaq 0x4e78(%rip), %rdi      # 0xb590
leaq 0x1462f(%rip), %rsi     # 0x1ad4e
leaq 0x14633(%rip), %rcx     # 0x1ad59
movl $0x32da, %edx           # imm = 0x32DA
callq 0x6060
leaq 0x1464a(%rip), %rdi     # 0x1ad81
leaq 0x14610(%rip), %rsi     # 0x1ad4e
leaq 0x14614(%rip), %rcx     # 0x1ad59
movl $0x32db, %edx           # imm = 0x32DB
callq 0x6060
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movq %rcx, %rax
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0xbe2e, %r14d          # imm = 0xBE2E
leaq 0x32973(%rip), %r9      # 0x390e0
leaq 0x1462c(%rip), %r10     # 0x1ada0
leaq 0x4a5c5(%rip), %r11     # 0x50d40
leal (%r14,%r8), %ecx
movl %ecx, %ebp
shrl $0x1f, %ebp
addl %ecx, %ebp
sarl %ebp
movslq %ebp, %rcx
movzwl (%r9,%rcx,2), %ebx
leal (%rbx,%rbx), %ecx
movzwl (%rcx,%r10), %r15d
movl %ebx, %r12d
shrl $0x4, %r12d
movl (%r11,%r12,4), %r12d
shrl %cl, %r12d
andl $0x3, %r12d
shll $0x10, %r12d
orl %r15d, %r12d
cmpq %rdi, %r12
jge 0x67be
movl %ebp, %r8d
movl %r14d, %ebp
jmp 0x67c0
jle 0x67d1
movl %ebp, %ecx
subl %r8d, %ecx
movl %ebp, %r14d
cmpl $0x1, %ecx
jg 0x677b
xorl %eax, %eax
jmp 0x6818
movzwl %bx, %ecx
imull $0x1dab, %ecx, %edi     # imm = 0x1DAB
shrl %ecx
imull $0xae4d, %ecx, %ecx     # imm = 0xAE4D
shrl $0x15, %ecx
imull $0x5e, %ecx, %r8d
subl %r8d, %ebx
movl $0xffff, %r8d           # imm = 0xFFFF
andl %r8d, %ebx
shrl $0x1a, %edi
imull $0x573, %ecx, %r9d      # imm = 0x573
shrl $0x11, %r9d
imull $0x5e, %r9d, %r9d
subl %r9d, %ecx
andl %r8d, %ecx
movl %edi, (%rsi)
movl %ecx, (%rdx)
movl %ebx, (%rax)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %ebp
cmpq $-0x1, %rsi
je 0x68ef
movq %r8, %r14
movq %rcx, %rbx
cmpq $0x7f, %rsi
jg 0x68b1
movq %r14, %rdi
callq *%rbx
jmp 0x68ef
leaq 0xc(%rsp), %rax
leaq 0x8(%rsp), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x90df
testl %eax, %eax
je 0x68ed
movslq 0xc(%rsp), %rsi
subq $-0x80, %rsi
movq %r14, %rdi
callq *%rbx
movslq 0x8(%rsp), %rsi
addq $0x40, %rsi
movq %r14, %rdi
callq *%rbx
movl $0x1, %ebp
jmp 0x68ef
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/euc.c
// Function: write_euc
static int write_euc(charset_spec const *charset, long int input_chr,
		     charset_state *state,
		     void (*emit)(void *ctx, long int output), void *emitctx)
{
    struct euc const *euc = (struct euc *)charset->data;
    unsigned long c;
    int cset, len;

    UNUSEDARG(state);

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

    /* ASCII is the easy bit, and is always the same. */
    if (input_chr < 0x80) {
	emit(emitctx, input_chr);
	return TRUE;
    }

    c = euc->from_ucs(input_chr);
    if (!c) {
	return FALSE;
    }

    cset = c >> 28;
    len = euc->nchars[cset-1];
    c &= 0xFFFFFF;

    if (cset > 1)
	emit(emitctx, 0x8C + cset);    /* SS2/SS3 */

    while (len--)
	emit(emitctx, (c >> (8*len)) & 0xFF);
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %ebp
cmpq $-0x1, %rsi
je 0x6abd
movq %r8, %r15
movq %rcx, %r14
cmpq $0x7f, %rsi
jg 0x6a33
movq %r15, %rdi
callq *%r14
jmp 0x6abd
movq 0x18(%rdi), %rbx
movq %rsi, %rdi
callq *0x18(%rbx)
testq %rax, %rax
je 0x6abb
movq %rax, %r12
movq %rax, %rsi
shrq $0x1c, %rsi
movq %rsi, %rax
shlq $0x20, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %rax, %rcx
sarq $0x1e, %rcx
movl (%rbx,%rcx), %ebx
cmpl $0x2, %esi
jl 0x6a78
addl $0x8c, %esi
movq %r15, %rdi
callq *%r14
testq %rbx, %rbx
je 0x6abd
andl $0xffffff, %r12d        # imm = 0xFFFFFF
leaq -0x8(,%rbx,8), %rbp
decq %rbx
movq %rbx, %r13
movl %ebp, %ecx
andb $-0x8, %cl
movq %r12, %rax
shrq %cl, %rax
movzbl %al, %esi
movq %r15, %rdi
callq *%r14
decq %r13
addq $-0x8, %rbp
testl %ebx, %ebx
movq %r13, %rbx
jne 0x6a92
movl $0x1, %ebp
jmp 0x6abd
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/euc.c
// Function: euc_cn_to_ucs
static long int euc_cn_to_ucs(unsigned long state)
{
    switch (state >> 28) {
      case 1: return gb2312_to_unicode(((state >> 8) & 0xFF) - 0xA1,
				       ((state     ) & 0xFF) - 0xA1);
      default: return ERROR;
    }
}

// Assembly:
movq %rdi, %rax
andq $-0x10000000, %rax      # imm = 0xF0000000
cmpq $0x10000000, %rax       # imm = 0x10000000
jne 0x6afc
movq %rdi, %rsi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
movl $0xffffff5f, %ecx       # imm = 0xFFFFFF5F
addl %ecx, %edi
andl %eax, %esi
addl %ecx, %esi
jmp 0x6d9c
movl $0xffff, %eax           # imm = 0xFFFF
retq