LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/serverpool/serverpool.c
// Function: serverpool_free
void
serverpool_free(struct serverpool * P)
{
	size_t i;

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

	/* Signal the child process to die. */
	kill(P->pid, SIGTERM);

	/* Stop reading addresses. */
	network_read_cancel(P->read_cookie);

	/* Free the address buffer, if we have a read in progress. */
	free(P->addr);

	/* Free addresses. */
	for (i = serverpool_addrs_getsize(P->A); i > 0; i--)
		sock_addr_free(serverpool_addrs_get(P->A, i - 1)->sa);

	/* Free the list of addresses. */
	serverpool_addrs_free(P->A);

	/* Free the server pool. */
	free(P);
}

// Assembly:
testq %rdi, %rdi
je 0x593b
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc(%rdi), %edi
movl $0xf, %esi
callq 0x2210
movq 0x20(%rbx), %rdi
callq 0x6200
movq 0x18(%rbx), %rdi
callq 0x2040
movq (%rbx), %rdi
movl $0x20, %esi
callq 0x5bca
testq %rax, %rax
je 0x5924
movq %rax, %r14
decq %r14
movq (%rbx), %rdi
movl $0x20, %edx
movq %r14, %rsi
callq 0x5d0c
movq (%rax), %rdi
callq 0x456a
addq $-0x1, %r14
jb 0x5906
movq (%rbx), %rdi
callq 0x5b0c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/serverpool/serverpool.c
// Function: callback_read_addr
static int
callback_read_addr(void * cookie, ssize_t readlen)
{
	struct serverpool * P = cookie;
	struct sock_addr * sa = NULL;

	/* We should get -1 (error), 0 (EOF), or a complete address. */
	assert((readlen == -1) || (readlen == 0) ||
	    ((readlen > 0) && ((size_t)readlen == P->addrlen)));

	/* Handle failures. */
	if (readlen == -1)
		goto err2;
	if (readlen == 0)
		goto eof;

	/* Parse the address. */
	if ((sa = sock_addr_deserialize(P->addr, P->addrlen)) == NULL)
		goto err0;

	/* Free the serialized address. */
	free(P->addr);
	P->addr = NULL;

	/* Add the address to the pool. */
	if (addaddr(P, sa))
		goto err1;

	/* Start reading another address. */
	if ((P->read_cookie = network_read(P->s, (uint8_t *)&P->addrlen,
	    sizeof(size_t), sizeof(size_t), callback_read_len, P)) == NULL)
		goto err2;

	/* Free the parsed address. */
	sock_addr_free(sa);

	/* Success! */
	return (0);

eof:
	warn0("DNS lookup process died");

	/* Failure! */
	return (-1);

err2:
	warnp("Error reading address via socket");
err1:
	sock_addr_free(sa);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x1(%rsi), %rax
cmpq $0x2, %rax
jb 0x5960
testq %rsi, %rsi
jle 0x5a45
cmpq %rsi, 0x10(%r14)
jne 0x5a45
cmpq $-0x1, %rsi
je 0x5989
testq %rsi, %rsi
jne 0x59b3
leaq 0x1f24(%rip), %rdi      # 0x7896
xorl %eax, %eax
callq 0x5017
callq 0x2090
movl $0x0, (%rax)
jmp 0x5a38
xorl %ebx, %ebx
callq 0x2090
cmpl $0x0, (%rax)
je 0x5a22
movq %rax, %r14
leaq 0x1df1(%rip), %rdi      # 0x7794
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%r14)
jmp 0x5a30
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdi
callq 0x4c00
testq %rax, %rax
je 0x5a38
movq %rax, %rbx
movq 0x18(%r14), %rdi
callq 0x2040
movq $0x0, 0x18(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x553e
testl %eax, %eax
jne 0x5a30
leaq 0x10(%r14), %rsi
movl 0x8(%r14), %edi
leaq -0x3cd(%rip), %r8       # 0x562a
movl $0x8, %edx
movl $0x8, %ecx
movq %r14, %r9
callq 0x5f48
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x598b
movq %rbx, %rdi
callq 0x456a
xorl %eax, %eax
jmp 0x5a3d
leaq 0x1d6b(%rip), %rdi      # 0x7794
xorl %eax, %eax
callq 0x5017
movq %rbx, %rdi
callq 0x456a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1e62(%rip), %rdi      # 0x78ae
leaq 0x1d85(%rip), %rsi      # 0x77d8
leaq 0x1eac(%rip), %rcx      # 0x7906
movl $0xdb, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/elasticarray.c
// Function: elasticarray_init
struct elasticarray *
elasticarray_init(size_t nrec, size_t reclen)
{
	struct elasticarray * EA;

	/* Sanity check. */
	assert(reclen > 0);

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

	/* The array is empty for now. */
	EA->size = EA->alloc = 0;
	EA->buf = NULL;

	/* Reallocate to the requested length. */
	if (elasticarray_resize(EA, nrec, reclen))
		goto err1;

	/* Success! */
	return (EA);

err1:
	elasticarray_free(EA);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x5ab9
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x18, %esi
callq 0x21c0
testq %rax, %rax
je 0x5aae
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x5ad8
testl %eax, %eax
je 0x5ab0
movq 0x10(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1e6e(%rip), %rdi      # 0x792e
leaq 0x1e72(%rip), %rsi      # 0x7939
leaq 0x1e94(%rip), %rcx      # 0x7962
movl $0x5a, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/elasticarray.c
// Function: elasticarray_append
int
elasticarray_append(struct elasticarray * EA,
    const void * buf, size_t nrec, size_t reclen)
{
	size_t bufpos = EA->size;
	size_t nsize;

	/* Check for overflow. */
	if ((nrec > SIZE_MAX / reclen) ||
	    (nrec * reclen > SIZE_MAX - EA->size)) {
		errno = ENOMEM;
		goto err0;
	}

	/* Resize the buffer. */
	nsize = EA->size + nrec * reclen;
	if (resize(EA, nsize))
		goto err0;

	/* Copy bytes in. */
	if (nrec > 0) {
		/* We shouldn't have requested a 0-size array. */
		assert(nsize > 0);

		/* Copy bytes in. */
		memcpy((uint8_t *)(EA->buf) + bufpos, buf, nrec * reclen);
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r13
movq %rcx, %rax
mulq %rdx
jo 0x5bfe
movq %rcx, %rbx
movq %rdi, %r15
movq (%rdi), %r14
imulq %r13, %rbx
movq %r14, %r12
addq %rbx, %r12
jae 0x5c1f
callq 0x2090
movl $0xc, (%rax)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x5b28
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x5c0e
xorl %ebp, %ebp
testq %r13, %r13
je 0x5c0e
testq %r12, %r12
je 0x5c58
addq 0x10(%r15), %r14
movq %r14, %rdi
movq (%rsp), %rsi
movq %rbx, %rdx
callq 0x21e0
jmp 0x5c0e
leaq 0x1d3a(%rip), %rdi      # 0x7999
leaq 0x1cd3(%rip), %rsi      # 0x7939
leaq 0x1d36(%rip), %rcx      # 0x79a3
movl $0xb9, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/elasticarray.c
// Function: elasticarray_shrink
void
elasticarray_shrink(struct elasticarray * EA, size_t nrec, size_t reclen)
{
	size_t nsize;

	/* Figure out how much to keep. */
	if ((nrec > SIZE_MAX / reclen) ||
	    (nrec * reclen > EA->size))
		nsize = 0;
	else
		nsize = EA->size - nrec * reclen;

	/* Resize the buffer... */
	if (resize(EA, nsize)) {
		/*
		 * ... and if we fail to reallocate, just record the new
		 * length and continue using the old buffer.
		 */
		EA->size = nsize;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rcx
movq %rdi, %rbx
movq %rdx, %rax
mulq %rsi
jno 0x5c8e
xorl %r14d, %r14d
jmp 0x5c9f
imulq %rsi, %rcx
movq (%rbx), %rax
xorl %r14d, %r14d
subq %rcx, %rax
cmovaeq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5b28
testl %eax, %eax
je 0x5cb1
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/elasticarray.c
// Function: elasticarray_truncate
int
elasticarray_truncate(struct elasticarray * EA)
{
	void * nbuf;

	/*
	 * Truncating down to zero needs special handling due to some strange
	 * interpretations of what realloc(p, 0) should do if it fails to
	 * allocate zero bytes of memory.
	 */
	if (EA->size == 0) {
		free(EA->buf);
		EA->buf = NULL;
		EA->alloc = 0;
	} else if (EA->alloc > EA->size) {
		/* Reallocate to eliminate spare space if necessary. */
		if ((nbuf = realloc(EA->buf, EA->size)) == NULL)
			goto err0;
		EA->buf = nbuf;
		EA->alloc = EA->size;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x5cea
xorl %ebp, %ebp
cmpq %rsi, 0x8(%rbx)
jbe 0x5d03
movq 0x10(%rbx), %rdi
callq 0x2270
testq %rax, %rax
je 0x5cfe
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq %rax, 0x8(%rbx)
jmp 0x5d03
movq 0x10(%rbx), %rdi
callq 0x2040
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
xorl %ebp, %ebp
jmp 0x5d03
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/elasticarray.c
// Function: elasticarray_export
int
elasticarray_export(struct elasticarray * EA, void ** buf, size_t * nrec,
    size_t reclen)
{

	/* Remove any spare space. */
	if (elasticarray_truncate(EA))
		goto err0;

	/* Return the buffer and number of records. */
	*buf = EA->buf;
	*nrec = elasticarray_getsize(EA, reclen);

	/*
	 * Free the elastic array structure -- but not its buffer, since we've
	 * passed the buffer out to the caller.
	 */
	free(EA);

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
callq 0x5cb9
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x5d5a
movq 0x10(%rbx), %rax
movq %rax, (%r13)
movq (%rbx), %rax
xorl %r12d, %r12d
xorl %edx, %edx
divq %r15
movq %rax, (%r14)
movq %rbx, %rdi
callq 0x2040
movl %r12d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/elasticarray.c
// Function: elasticarray_exportdup
int
elasticarray_exportdup(const struct elasticarray * EA, void ** buf,
    size_t * nrec, size_t reclen)
{

	/* Allocate buffer for the caller's copy of the data. */
	if ((*buf = malloc(EA->size)) == NULL)
		goto err0;

	/* Copy the data in. */
	memcpy(*buf, EA->buf, EA->size);

	/* Tell the caller how many records we have. */
	*nrec = elasticarray_getsize(EA, reclen);

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r12
movq (%rdi), %r15
movq %r15, %rdi
callq 0x2220
movq %rax, (%r13)
testq %rax, %rax
je 0x5daf
movq 0x10(%r12), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x21e0
xorl %ecx, %ecx
movq %r15, %rax
xorl %edx, %edx
divq %r14
movq %rax, (%rbx)
jmp 0x5db4
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/timerqueue.c
// Function: timerqueue_add
void *
timerqueue_add(struct timerqueue * Q, const struct timeval * tv, void * ptr)
{
	struct timerrec * r;

	/* Allocate (timeval, ptr) pair record. */
	if ((r = malloc(sizeof(struct timerrec))) == NULL)
		goto err0;

	/* Fill in values. */
	memcpy(&r->tv, tv, sizeof(struct timeval));
	r->ptr = ptr;

	/*
	 * Add the record to the heap.  The value r->rc will be filled in
	 * by setreccookie which will be called by ptrheap_add.
	 */
	if (ptrheap_add(Q->H, r))
		goto err1;

	/* Success! */
	return (r);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl $0x20, %edi
callq 0x2220
testq %rax, %rax
je 0x5e77
movq %rax, %rbx
movups (%r12), %xmm0
movups %xmm0, (%rax)
movq %r14, 0x18(%rax)
movq (%r15), %rdi
movq %rax, %rsi
callq 0x684b
testl %eax, %eax
je 0x5e79
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/timerqueue.c
// Function: timerqueue_free
void
timerqueue_free(struct timerqueue * Q)
{
	struct timerrec * r;

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

	/* Extract elements from the heap and free them one by one. */
	while ((r = ptrheap_getmin(Q->H)) != NULL) {
		free(r);
		ptrheap_deletemin(Q->H);
	}

	/* Free the heap. */
	ptrheap_free(Q->H);

	/* Free the timer priority queue structure. */
	free(Q);
}

// Assembly:
testq %rdi, %rdi
je 0x5f45
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rdi
callq 0x695c
testq %rax, %rax
je 0x5f34
movq %rax, %rdi
callq 0x2040
movq (%rbx), %rdi
callq 0x6b71
jmp 0x5f15
movq (%rbx), %rdi
callq 0x6bc7
movq %rbx, %rdi
popq %rbx
jmp 0x2040
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/network/network_read.c
// Function: network_read_cancel
void
network_read_cancel(void * cookie)
{
	struct network_read_cookie * C = cookie;

	/* Kill the network event. */
	events_network_cancel(C->fd, EVENTS_NETWORK_OP_READ);

	/* Free the cookie. */
	mpool_network_read_cookie_free(C);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x10(%rdi), %edi
xorl %esi, %esi
callq 0x33d9
movq 0x5243(%rip), %r12      # 0xb460
movq 0x5244(%rip), %r13      # 0xb468
cmpq %r13, %r12
jae 0x6245
movq 0x5240(%rip), %rax      # 0xb470
leaq 0x1(%r12), %rcx
movq %rcx, 0x5224(%rip)      # 0xb460
movq %rbx, (%rax,%r12,8)
jmp 0x62e4
movq 0x522c(%rip), %rax      # 0xb478
shrq $0x8, %rax
cmpq %rax, 0x5229(%rip)      # 0xb480
jbe 0x62d2
testq %r13, %r13
je 0x62ee
movq %r13, %rdi
shlq $0x4, %rdi
callq 0x2220
testq %rax, %rax
je 0x62d2
movq %rax, %r14
movq 0x51f3(%rip), %r15      # 0xb470
leaq (,%r13,8), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21e0
cmpq 0x51f9(%rip), %r15      # 0xb490
je 0x62af
movq %r15, %rdi
callq 0x2040
movq 0x51c0(%rip), %r13      # 0xb468
movq 0x51b1(%rip), %r12      # 0xb460
movq %r14, 0x51ba(%rip)      # 0xb470
addq %r13, %r13
movq %r13, 0x51a8(%rip)      # 0xb468
leaq 0x1(%r12), %rax
movq %rax, 0x5194(%rip)      # 0xb460
movq %rbx, (%r14,%r12,8)
jmp 0x62da
movq %rbx, %rdi
callq 0x2040
xorps %xmm0, %xmm0
movups %xmm0, 0x5194(%rip)     # 0xb478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xdcb(%rip), %rdi       # 0x70c0
leaq 0xdd5(%rip), %rsi       # 0x70d1
leaq 0xdf0(%rip), %rcx       # 0x70f3
movl $0x5a, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/network/network_read.c
// Function: docallback
static int
docallback(struct network_read_cookie * C, ssize_t nbytes)
{
	int rc;

	/* Invoke the callback. */
	rc = (C->callback)(C->cookie, nbytes);

	/* Clean up. */
	mpool_network_read_cookie_free(C);

	/* Return the callback's status. */
	return (rc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq *(%r14)
movl %eax, %ebx
movq 0x50e1(%rip), %r13      # 0xb460
movq 0x50e2(%rip), %rbp      # 0xb468
cmpq %rbp, %r13
jae 0x63a6
movq 0x50de(%rip), %rax      # 0xb470
leaq 0x1(%r13), %rcx
movq %rcx, 0x50c3(%rip)      # 0xb460
movq %r14, (%rax,%r13,8)
jmp 0x6444
movq 0x50cb(%rip), %rax      # 0xb478
shrq $0x8, %rax
cmpq %rax, 0x50c8(%rip)      # 0xb480
jbe 0x6432
testq %rbp, %rbp
je 0x6455
movq %rbp, %rdi
shlq $0x4, %rdi
callq 0x2220
testq %rax, %rax
je 0x6432
movq %rax, %r15
movq 0x5092(%rip), %r12      # 0xb470
leaq (,%rbp,8), %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21e0
cmpq 0x5098(%rip), %r12      # 0xb490
je 0x6410
movq %r12, %rdi
callq 0x2040
movq 0x505f(%rip), %rbp      # 0xb468
movq 0x5050(%rip), %r13      # 0xb460
movq %r15, 0x5059(%rip)      # 0xb470
addq %rbp, %rbp
movq %rbp, 0x5047(%rip)      # 0xb468
leaq 0x1(%r13), %rax
movq %rax, 0x5034(%rip)      # 0xb460
movq %r14, (%r15,%r13,8)
jmp 0x643a
movq %r14, %rdi
callq 0x2040
xorps %xmm0, %xmm0
movups %xmm0, 0x5034(%rip)     # 0xb478
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc64(%rip), %rdi       # 0x70c0
leaq 0xc6e(%rip), %rsi       # 0x70d1
leaq 0xc89(%rip), %rcx       # 0x70f3
movl $0x5a, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/util/asprintf.c
// Function: libcperciva_asprintf
int
asprintf(char ** ret, const char * format, ...)
{
	va_list ap;
	int len;
	size_t buflen;

	/* Figure out how long the string needs to be. */
	va_start(ap, format);
	len = vsnprintf(NULL, 0, format, ap);
	va_end(ap);

	/* Did we fail? */
	if (len < 0)
		goto err0;
	buflen = (size_t)(len) + 1;

	/* Allocate memory. */
	if ((*ret = malloc(buflen)) == NULL)
		goto err0;

	/* Actually generate the string. */
	va_start(ap, format);
	len = vsnprintf(*ret, buflen, format, ap);
	va_end(ap);

	/* Did we fail? */
	if (len < 0)
		goto err1;

	/* Success! */
	return (len);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %r12
movq %rdx, 0x10(%r12)
movq %rcx, 0x18(%r12)
movq %r8, 0x20(%r12)
movq %r9, 0x28(%r12)
testb %al, %al
je 0x64df
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %r12, 0x10(%rcx)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %r13     # imm = 0x3000000010
movq %r13, (%rcx)
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20d0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x6561
movl %eax, %r15d
incl %r15d
movq %r15, %rdi
callq 0x2220
movq %rax, (%rbx)
testq %rax, %rax
je 0x6561
movq %rsp, %rcx
movq %r12, 0x10(%rcx)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rcx)
movq %r13, (%rcx)
movq (%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x20d0
movl %eax, %ebp
testl %eax, %eax
jns 0x6561
movq (%rbx), %rdi
callq 0x2040
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/util/noeintr.c
// Function: noeintr_write
ssize_t
noeintr_write(int d, const void * buf, size_t nbytes)
{
	const uint8_t * p = buf;
	size_t len = nbytes;
	ssize_t lenwrit;

	/* Implementation-defined: Don't allow oversized writes. */
	assert(nbytes <= SSIZE_MAX);

	/* Loop until we have no data left to write. */
	while (len > 0) {
		if ((lenwrit = write(d, p, len)) == -1) {
			/* EINTR is harmless. */
			if (errno == EINTR)
				continue;

			/* Anything else isn't. */
			goto err0;
		}

		/* Sanity check. */
		assert(lenwrit >= 0);
		assert(lenwrit <= (ssize_t)len);

		/*
		 * We might have done a partial write; advance the buffer
		 * pointer and adjust the remaining write length.
		 */
		p += (size_t)lenwrit;
		len -= (size_t)lenwrit;
	}

	/* Success! */
	return (ssize_t)(nbytes);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
js 0x65d9
movq %rdx, %rbx
je 0x65cb
movq %rsi, %r14
movl %edi, %ebp
movq %rbx, %r15
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2110
cmpq $-0x1, %rax
jne 0x65b0
callq 0x2090
cmpl $0x4, (%rax)
je 0x6591
jmp 0x65c4
testq %rax, %rax
js 0x65f8
cmpq %rax, %r15
jl 0x6617
addq %rax, %r14
subq %rax, %r15
jne 0x6591
jmp 0x65cb
movq $-0x1, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1510(%rip), %rdi      # 0x7af0
leaq 0x151d(%rip), %rsi      # 0x7b04
leaq 0x1534(%rip), %rcx      # 0x7b22
movl $0x17, %edx
callq 0x2160
leaq 0x1554(%rip), %rdi      # 0x7b53
leaq 0x14fe(%rip), %rsi      # 0x7b04
leaq 0x1515(%rip), %rcx      # 0x7b22
movl $0x25, %edx
callq 0x2160
leaq 0x1542(%rip), %rdi      # 0x7b60
leaq 0x14df(%rip), %rsi      # 0x7b04
leaq 0x14f6(%rip), %rcx      # 0x7b22
movl $0x26, %edx
callq 0x2160
nop
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/ptrheap.c
// Function: ptrheap_create
struct ptrheap *
ptrheap_create(int (* compar)(void *, const void *, const void *),
    void (* setreccookie)(void *, void *, size_t), void * cookie,
    size_t N, void ** ptrs)
{
	struct ptrheap * H;
	size_t i;

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

	/* Store parameters. */
	H->compar = compar;
	H->setreccookie = setreccookie;
	H->cookie = cookie;

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

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

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

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

	/* Advise the caller about the record cookies. */
	if (H->setreccookie != NULL)
		for (i = 0; i < N; i++)
			(H->setreccookie)(H->cookie,
			    *ptrlist_get(H->elems, i), i);

	/* Success! */
	return (H);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbp
movq %rdi, %r13
movl $0x28, %edi
callq 0x2220
testq %rax, %rax
je 0x6740
movq %rax, %r12
movq %r13, 0x10(%rsp)
movq %r13, (%rax)
movq %rbp, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x20(%rax)
movl $0x8, %esi
movq %r14, %rdi
callq 0x5a64
movq %rax, 0x18(%r12)
testq %rax, %rax
je 0x6738
testq %r14, %r14
je 0x6743
movq %rax, %r13
movq %rbp, (%rsp)
movq %r12, 0x8(%rsp)
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rbp
movl $0x8, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x5d0c
movq %rbp, (%rax)
incq %r12
cmpq %r12, %r14
jne 0x66bc
leaq -0x1(%r14), %rbx
movq 0x10(%rsp), %r12
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %r15, %r9
callq 0x6755
decq %rbx
cmpq %r14, %rbx
jb 0x66e4
movq (%rsp), %rbp
testq %rbp, %rbp
movq 0x8(%rsp), %r12
je 0x6743
xorl %ebx, %ebx
movl $0x8, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5d0c
movq (%rax), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq *%rbp
incq %rbx
cmpq %rbx, %r14
jne 0x6713
jmp 0x6743
movq %r12, %rdi
callq 0x2040
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/ptrheap.c
// Function: heapify
static void
heapify(PTRLIST elems, size_t i, size_t N,
    int (* compar)(void *, const void *, const void *),
    void (* setreccookie)(void *, void *, size_t), void * cookie)
{
	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) &&
		    (compar(cookie, *ptrlist_get(elems, min),
			*ptrlist_get(elems, 2 * i + 1)) > 0))
			min = 2 * i + 1;

		/* Is this bigger than element 2i+2? */
		if ((2 * i + 2 < N) &&
		    (compar(cookie, *ptrlist_get(elems, min),
			*ptrlist_get(elems, 2 * i + 2)) > 0))
			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, setreccookie, cookie);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, (%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
movq %rsi, %r14
movq %rdx, 0x8(%rsp)
leaq 0x1(,%r15,2), %rbp
cmpq %r12, %rbp
jae 0x67c6
movl $0x8, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x5d0c
movq (%rax), %r14
movl $0x8, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x5d0c
movq (%rax), %rdx
movq (%rsp), %rdi
movq %r14, %rsi
callq *%rbx
testl %eax, %eax
jg 0x67c3
movq %r15, %rbp
movq %rbp, %r14
leaq (%r15,%r15), %rbp
addq $0x2, %rbp
cmpq %r12, %rbp
jae 0x6818
movl $0x8, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x5d0c
movq %rbx, %r12
movq (%rax), %rbx
movl $0x8, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x5d0c
movq (%rax), %rdx
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rbx
callq *%r12
testl %eax, %eax
jg 0x6810
movq %r14, %rbp
movq %rbp, %r14
movq 0x8(%rsp), %r12
cmpq %r15, %r14
je 0x683c
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq 0x10(%rsp), %rcx
movq (%rsp), %r8
callq 0x6aad
movq %r14, %r15
jmp 0x6780
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/ptrheap.c
// Function: ptrheap_add
int
ptrheap_add(struct ptrheap * H, void * ptr)
{

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

	/* Advise the caller about the current location of this record. */
	if (H->setreccookie != NULL)
		(H->setreccookie)(H->cookie, ptr, H->nelems - 1);

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

	/* Success! */
	return (0);

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %rax
movq %rsi, (%rax)
movq 0x18(%rdi), %rdi
movl $0x1, %edx
movl $0x8, %ecx
movq %rax, %rsi
callq 0x5bd3
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x68bf
movq 0x8(%rbx), %rcx
movq 0x20(%rbx), %rax
leaq 0x1(%rax), %rdx
movq %rdx, 0x20(%rbx)
xorl %r14d, %r14d
testq %rcx, %rcx
je 0x68aa
movq 0x10(%rbx), %rdi
movq (%rsp), %rsi
movq %rax, %rdx
callq *%rcx
movq 0x8(%rbx), %rcx
movq 0x20(%rbx), %rax
decq %rax
jmp 0x68ac
xorl %ecx, %ecx
movq 0x18(%rbx), %rdi
movq (%rbx), %rdx
movq 0x10(%rbx), %r8
movq %rax, %rsi
callq 0x68ca
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/ptrheap.c
// Function: heapifyup
static void
heapifyup(PTRLIST elems, size_t i,
    int (* compar)(void *, const void *, const void *),
    void (* setreccookie)(void *, void *, size_t), void * cookie)
{

	/* Iterate up the tree. */
	do {
		/* If we're at the root, we have nothing to do. */
		if (i == 0)
			break;

		/* If this is >= its parent, we're done. */
		if (compar(cookie, *ptrlist_get(elems, i),
		    *ptrlist_get(elems, (i - 1) / 2)) >= 0)
			break;

		/* Swap with the parent. */
		swap(elems, i, (i - 1) / 2, setreccookie, cookie);

		/* Move up the tree. */
		i = (i - 1) / 2;
	} while (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
testq %rsi, %rsi
je 0x694d
movq %r8, %rbx
movq %rsi, %r13
movq %rdi, %r12
movl $0x8, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x5d0c
movq (%rax), %r14
leaq -0x1(%r13), %r15
movq %r15, %rbp
shrq %rbp
movl $0x8, %edx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x5d0c
movq (%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rsp)
testl %eax, %eax
jns 0x694d
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %r8
callq 0x6aad
movq %rbp, %r13
cmpq $0x1, %r15
ja 0x68f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/ptrheap.c
// Function: ptrheap_getmin
void *
ptrheap_getmin(struct ptrheap * H)
{

	/* If we have any elements, the minimum is in position 0. */
	if (H->nelems)
		return (*ptrlist_get(H->elems, 0));
	else
		return (NULL);
}

// Assembly:
cmpq $0x0, 0x20(%rdi)
je 0x697c
pushq %rax
movq 0x18(%rdi), %rdi
movl $0x8, %edx
xorl %esi, %esi
callq 0x5d0c
movq (%rax), %rax
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/ptrheap.c
// Function: ptrheap_delete
void
ptrheap_delete(struct ptrheap * H, size_t rc)
{

	/*
	 * If the element we're deleting is not at the end of the heap,
	 * replace it with the element which is currently at the end.
	 */
	if (rc != H->nelems - 1) {
		/* Move ptr from position H->nelems - 1 into position rc. */
		*ptrlist_get(H->elems, rc) =
		    *ptrlist_get(H->elems, H->nelems - 1);
		if (H->setreccookie != NULL)
			(H->setreccookie)(H->cookie,
			    *ptrlist_get(H->elems, rc), rc);

		/* Is this too small to be in position ${rc}? */
		if ((rc > 0) &&
		    (H->compar(H->cookie, *ptrlist_get(H->elems, rc),
			*ptrlist_get(H->elems, (rc - 1) / 2)) < 0)) {
			/* Swap with the parent, and keep moving up. */
			swap(H->elems, rc, (rc - 1) / 2,
			    H->setreccookie, H->cookie);
			heapifyup(H->elems, (rc - 1) / 2,
			    H->compar, H->setreccookie, H->cookie);
		} else {
			/* Maybe we need to move it down instead? */
			heapify(H->elems, rc, H->nelems,
			    H->compar, H->setreccookie, H->cookie);
		}
	}

	/*
	 * We've got everything we want to keep in positions 0 .. nelems - 2,
	 * and we have heap-nature, so all we need to do is strip off the
	 * final pointer.
	 */
	ptrlist_shrink(H->elems, 1);
	H->nelems--;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rsi
decq %rsi
cmpq %r14, %rsi
je 0x6a87
movq 0x18(%rbx), %rdi
movl $0x8, %edx
callq 0x5d0c
movq (%rax), %r15
movq 0x18(%rbx), %rdi
movl $0x8, %edx
movq %r14, %rsi
callq 0x5d0c
movq %r15, (%rax)
movq 0x8(%rbx), %r12
testq %r12, %r12
je 0x69ef
movq 0x10(%rbx), %r15
movq 0x18(%rbx), %rdi
movl $0x8, %edx
movq %r14, %rsi
callq 0x5d0c
movq (%rax), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq *%r12
testq %r14, %r14
je 0x6a6c
movq (%rbx), %rbp
movq 0x10(%rbx), %r12
movq 0x18(%rbx), %rdi
movl $0x8, %edx
movq %r14, %rsi
callq 0x5d0c
movq (%rax), %r13
movq 0x18(%rbx), %rdi
leaq -0x1(%r14), %r15
shrq %r15
movl $0x8, %edx
movq %r15, %rsi
callq 0x5d0c
movq (%rax), %rdx
movq %r12, %rdi
movq %r13, %rsi
callq *%rbp
movq 0x8(%rbx), %r8
testl %eax, %eax
jns 0x6a70
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r8, %rcx
movq %rax, %r8
callq 0x6aad
movq 0x18(%rbx), %rdi
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %r8
movq %r15, %rsi
callq 0x68ca
jmp 0x6a87
movq 0x8(%rbx), %r8
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rdx
movq (%rbx), %rcx
movq 0x10(%rbx), %r9
movq %r14, %rsi
callq 0x6755
movq 0x18(%rbx), %rdi
movl $0x1, %esi
movl $0x8, %edx
callq 0x5c77
decq 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/ptrheap.c
// Function: swap
static void
swap(PTRLIST elems, size_t i, size_t j,
    void (* setreccookie)(void *, void *, size_t), void * cookie)
{
	void * tmp;

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

	/* Notify about the moved elements. */
	if (setreccookie != NULL) {
		setreccookie(cookie, *ptrlist_get(elems, i), i);
		setreccookie(cookie, *ptrlist_get(elems, j), j);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movl $0x8, %edx
callq 0x5d0c
movq (%rax), %r13
movl $0x8, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5d0c
movq (%rax), %rbp
movl $0x8, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5d0c
movq %rbp, (%rax)
movl $0x8, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5d0c
movq %r13, (%rax)
testq %r14, %r14
je 0x6b62
movq %r14, %r13
movl $0x8, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5d0c
movq (%rax), %rsi
movq (%rsp), %r14
movq %r14, %rdi
movq %r12, %rdx
callq *%r13
movl $0x8, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5d0c
movq (%rax), %rsi
movq %r14, %rdi
movq %rbx, %rdx
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/ptrheap.c
// Function: ptrheap_free
void
ptrheap_free(struct ptrheap * H)
{

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

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

// Assembly:
testq %rdi, %rdi
je 0x6be2
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x5b0c
movq %rbx, %rdi
popq %rbx
jmp 0x2040
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/debbiemarkslab[P]plmc/src/lib/twister.c
// Function: init_genrand
void init_genrand(unsigned long s)
{
    mt[0]= s & 0xffffffffUL;
    for (mti=1; mti<N; mti++) {
        mt[mti] = 
	    (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti); 
        /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
        /* In the previous versions, MSBs of the seed affect   */
        /* only MSBs of the array mt[].                        */
        /* 2002/01/09 modified by Makoto Matsumoto             */
        mt[mti] &= 0xffffffffUL;
        /* for >32 bit machines */
    }
}

// Assembly:
movl %edi, %eax
movq %rax, 0xecab(%rip)      # 0x11180
movl $0x1, %ecx
leaq 0xec9f(%rip), %rdx      # 0x11180
movq %rax, %rsi
shrq $0x1e, %rsi
xorl %eax, %esi
imull $0x6c078965, %esi, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, (%rdx,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x24e1
movl $0x270, 0xec3c(%rip)    # imm = 0x270
retq
// File: /workspace/github_c_makefile_star2_O3/debbiemarkslab[P]plmc/src/lib/twister.c
// Function: init_by_array
void init_by_array(unsigned long init_key[], int key_length)
{
    int i, j, k;
    init_genrand(19650218UL);
    i=1; j=0;
    k = (N>key_length ? N : key_length);
    for (; k; k--) {
        mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL))
          + init_key[j] + j; /* non linear */
        mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
        i++; j++;
        if (i>=N) { mt[0] = mt[N-1]; i=1; }
        if (j>=key_length) j=0;
    }
    for (k=N-1; k; k--) {
        mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL))
          - i; /* non linear */
        mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
        i++;
        if (i>=N) { mt[0] = mt[N-1]; i=1; }
    }

    mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ 
}

// Assembly:
movq $0x12bd6aa, 0xec68(%rip) # imm = 0x12BD6AA
movl $0x1, %ecx
movl $0x12bd6aa, %edx        # imm = 0x12BD6AA
leaq 0xec57(%rip), %rax      # 0x11180
movq %rdx, %r8
shrq $0x1e, %r8
xorl %edx, %r8d
imull $0x6c078965, %r8d, %edx # imm = 0x6C078965
addl %ecx, %edx
movq %rdx, (%rax,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x2529
pushq %r14
pushq %rbx
movl $0x270, %edx            # imm = 0x270
movl %edx, 0xebee(%rip)      # 0x11148
cmpl $0x271, %esi            # imm = 0x271
cmovgel %esi, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
movslq %ecx, %r10
movq -0x8(%rax,%r10,8), %r11
movq %r11, %rbx
shrq $0x1e, %rbx
xorl %r11d, %ebx
imull $0x19660d, %ebx, %r11d  # imm = 0x19660D
xorl (%rax,%r10,8), %r11d
movslq %r9d, %rbx
movl (%rdi,%rbx,8), %r14d
addl %ebx, %r14d
addl %r11d, %r14d
movq %r14, (%rax,%r10,8)
cmpl $0x26f, %ecx            # imm = 0x26F
jge 0x25a8
incl %ecx
jmp 0x25bb
movq 0xff49(%rip), %rcx      # 0x124f8
movq %rcx, 0xebca(%rip)      # 0x11180
movl $0x1, %ecx
incl %r9d
cmpl %esi, %r9d
cmovgel %r8d, %r9d
decl %edx
jne 0x256e
movl $0xfffffd91, %edx       # imm = 0xFFFFFD91
popq %rbx
popq %r14
movslq %ecx, %rsi
movq -0x8(%rax,%rsi,8), %rdi
movq %rdi, %r8
shrq $0x1e, %r8
xorl %edi, %r8d
imull $0x5d588b65, %r8d, %edi # imm = 0x5D588B65
xorl (%rax,%rsi,8), %edi
subl %esi, %edi
movq %rdi, (%rax,%rsi,8)
cmpl $0x26f, %ecx            # imm = 0x26F
jge 0x25ff
incl %ecx
jmp 0x2612
movq 0xfef2(%rip), %rcx      # 0x124f8
movq %rcx, 0xeb73(%rip)      # 0x11180
movl $0x1, %ecx
incl %edx
jne 0x25d1
movl $0x80000000, %eax       # imm = 0x80000000
movq %rax, 0xeb5e(%rip)      # 0x11180
retq
// File: /workspace/github_c_makefile_star2_O3/debbiemarkslab[P]plmc/src/lib/lbfgs.c
// Function: owlqn_pseudo_gradient
static void owlqn_pseudo_gradient(
    lbfgsfloatval_t* pg,
    const lbfgsfloatval_t* x,
    const lbfgsfloatval_t* g,
    const int n,
    const lbfgsfloatval_t c,
    const int start,
    const int end
    )
{
    int i;

    /* Compute the negative of gradients. */
    for (i = 0;i < start;++i) {
        pg[i] = g[i];
    }

    /* Compute the psuedo-gradients. */
    for (i = start;i < end;++i) {
        if (x[i] < 0.) {
            /* Differentiable. */
            pg[i] = g[i] - c;
        } else if (0. < x[i]) {
            /* Differentiable. */
            pg[i] = g[i] + c;
        } else {
            if (g[i] < -c) {
                /* Take the right partial derivative. */
                pg[i] = g[i] + c;
            } else if (c < g[i]) {
                /* Take the left partial derivative. */
                pg[i] = g[i] - c;
            } else {
                pg[i] = 0.;
            }
        }
    }

    for (i = end;i < n;++i) {
        pg[i] = g[i];
    }
}

// Assembly:
testl %r8d, %r8d
jle 0x40c0
movl %r8d, %eax
xorl %r10d, %r10d
movsd (%rdx,%r10,8), %xmm1
movsd %xmm1, (%rdi,%r10,8)
incq %r10
cmpq %r10, %rax
jne 0x40ac
cmpl %r9d, %r8d
jge 0x4129
movapd 0x8fe3(%rip), %xmm1     # 0xd0b0
xorpd %xmm0, %xmm1
movslq %r8d, %rax
movslq %r9d, %r8
xorpd %xmm2, %xmm2
movsd (%rsi,%rax,8), %xmm3
ucomisd %xmm3, %xmm2
jbe 0x40f1
movsd (%rdx,%rax,8), %xmm4
subsd %xmm0, %xmm4
jmp 0x410a
ucomisd %xmm2, %xmm3
movsd (%rdx,%rax,8), %xmm3
ja 0x4102
ucomisd %xmm3, %xmm1
jbe 0x4119
addsd %xmm0, %xmm3
movapd %xmm3, %xmm4
movsd %xmm4, (%rdi,%rax,8)
incq %rax
cmpq %rax, %r8
jne 0x40db
jmp 0x4129
xorpd %xmm4, %xmm4
ucomisd %xmm0, %xmm3
jbe 0x410a
subsd %xmm0, %xmm3
jmp 0x4106
cmpl %ecx, %r9d
jge 0x4146
movslq %r9d, %rax
movslq %ecx, %rcx
movsd (%rdx,%rax,8), %xmm0
movsd %xmm0, (%rdi,%rax,8)
incq %rax
cmpq %rax, %rcx
jne 0x4134
retq
// File: /workspace/github_c_makefile_star2_O3/debbiemarkslab[P]plmc/src/plm.c
// Function: run_plmc
void run_plmc(char *alignFile, char* outputFile, char *couplingsFile,
    char *weightsFile, char *weightsOutputFile, options_t *options) {

    /* Initialize PRNG */
    init_genrand(42);

    /* Read multiple sequence alignment */
    alignment_t *ali = MSARead(alignFile, options);

    if (weightsFile != NULL) {
        ReadCustomWeightsFile(weightsFile, ali);
    } else {
        /* Reweight sequences by inverse neighborhood density */
        MSAReweightSequences(ali, options);
    }
    if (weightsOutputFile != NULL) {
        WriteWeightsFile(weightsOutputFile, ali);
    }

    /* Compute sitewise and pairwise marginal distributions */
    MSACountMarginals(ali, options);

    /* Infer model parameters */
    numeric_t *x = InferPairModel(ali, options);

    /* (Optionally) Output estimated parameters and coupling scores */
    if (outputFile != NULL)
        OutputParametersFull(outputFile, x, ali, options);
    if (couplingsFile != NULL)
        OutputCouplingScores(couplingsFile, x, ali, options);

    /* Free alignment and options */
    MSAFree(ali, options);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r13
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl $0x2a, %edi
callq 0x24cc
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4bf7
movq %rax, %r15
testq %rbp, %rbp
je 0x4b7e
movq %rbp, %rdi
movq %r15, %rsi
callq 0xc0bb
jmp 0x4b89
movq %r15, %rdi
movq %rbx, %rsi
callq 0xb450
testq %r13, %r13
je 0x4b99
movq %r13, %rdi
movq %r15, %rsi
callq 0xc273
movq %r15, %rdi
movq %rbx, %rsi
callq 0x585e
movq %r15, %rdi
movq %rbx, %rsi
callq 0x70d4
movq %rax, %r13
testq %r12, %r12
je 0x4bc8
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x608b
testq %r14, %r14
je 0x4bde
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x6710
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6cc9
// File: /workspace/github_c_makefile_star2_O3/debbiemarkslab[P]plmc/src/plm.c
// Function: MSAFree
void MSAFree(alignment_t *ali, options_t *options) {
    /* Free alignment and options */
    if (ali->names && ali->names[0])
        for (int i = 0; i < ali->nSeqs; i++) free(ali->names[i]);
    free(ali->names);
    free(ali->sequences);
    free(ali->weights);
    free(ali->fi);
    free(ali->fij);

    /* Note: options->target and options->alphabet are never allocated */
    free(options);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x6d0a
cmpq $0x0, (%rdi)
je 0x6d0c
cmpl $0x0, (%r14)
jle 0x6d0c
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x1050
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x6cec
movq 0x18(%r14), %rdi
jmp 0x6d0c
xorl %edi, %edi
callq 0x1050
movq 0x20(%r14), %rdi
callq 0x1050
movq 0x50(%r14), %rdi
callq 0x1050
movq 0x58(%r14), %rdi
callq 0x1050
movq 0x60(%r14), %rdi
callq 0x1050
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O3/debbiemarkslab[P]plmc/src/plm.c
// Function: MSAReadSeq
void MSAReadSeq(char *seq, FILE *fpAli) {
    /* Read sequence from the current line(s) */
    char buf[BUFFER_SIZE];
    /* Look ahead one character */
    char c = fgetc(fpAli); 
    ungetc(c, fpAli);
    seq[0] = '\0';
    while (c != '>' && !feof(fpAli)) {
        fgetstr(buf, fpAli);
        strcat(seq, buf);
        /* Look ahead one character */
        c = fgetc(fpAli);
        ungetc(c, fpAli);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa008, %rsp           # imm = 0xA008
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x1120
movsbl %al, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x11c0
movb $0x0, (%r14)
cmpb $0x3e, %bpl
je 0x6e0b
movq %rsp, %r15
movq %rbx, %rdi
callq 0x1190
testl %eax, %eax
jne 0x6e0b
movq %r15, %rdi
movl $0xa000, %esi           # imm = 0xA000
movq %rbx, %rdx
callq 0x1150
testq %rax, %rax
je 0x6de1
movq %r15, %rdi
movl $0xa, %esi
callq 0x10d0
testq %rax, %rax
je 0x6db5
movb $0x0, (%rax)
movq %r15, %rdi
callq 0x10c0
cmpb $0xd, -0x1(%rax,%r15)
jne 0x6de1
addq %r15, %rax
decq %rax
movb $0x0, (%rax)
movq %r15, %rdi
callq 0x10c0
addq %r15, %rax
decq %rax
cmpb $0xd, (%rax)
je 0x6dcb
movq %r14, %rdi
movq %r15, %rsi
callq 0x11f0
movq %rbx, %rdi
callq 0x1120
movsbl %al, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x11c0
cmpb $0x3e, %bpl
jne 0x6d7b
addq $0xa008, %rsp           # imm = 0xA008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/debbiemarkslab[P]plmc/src/plm.c
// Function: MSAReadCode
letter_t MSAReadCode(char c, char *alphabet, int nCodes) {
    /* Encode a character as an integer between -nCodes and +nCodes
          In alphabet:                     store index           [0, nCodes - 1]
          Lowercase version of alphabet:   downshift by nCodes   [-nCodes, -1]
          Out of alphabet:                 store nCodes          [nCodes]
     */
    letter_t i = 0;

    /* Protein-specific treatment of '.' */
    if (alphabet == codesAA) if (c == '.') c = '-';

    /* Store lowercase characters as down-shifted by nCodes */
    while ((i < nCodes - 1) && toupper(c) != alphabet[i]) i++;
    if (c != alphabet[i] && toupper(c) == alphabet[i]) i -= nCodes;

    /* Encode out-of-alphabet characters by [nCodes] */
    if (i > 0 && toupper(c) != alphabet[i]) i = nCodes;
    return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq %rsi, 0xa32a(%rip)      # 0x11158
movl $0x2d, %r12d
cmovnel %edi, %r12d
cmpb $0x2e, %dil
cmovnel %edi, %r12d
movl %edx, %r14d
xorl %ebp, %ebp
movsbq %r12b, %r15
cmpl $0x2, %edx
jl 0x6e76
leal -0x1(%r14), %ebp
callq 0x1030
movq (%rax), %rax
movl (%rax,%r15,4), %eax
movl %ebp, %edx
xorl %ecx, %ecx
movsbl (%rbx,%rcx), %esi
cmpl %esi, %eax
je 0x6e74
incq %rcx
cmpq %rcx, %rdx
jne 0x6e62
jmp 0x6e76
movl %ecx, %ebp
movl %ebp, %eax
movsbl (%rbx,%rax), %r13d
cmpb %r13b, %r12b
je 0x6e96
callq 0x1030
movq (%rax), %rax
xorl %ecx, %ecx
cmpl %r13d, (%rax,%r15,4)
cmovel %r14d, %ecx
subl %ecx, %ebp
testl %ebp, %ebp
jle 0x6eb3
callq 0x1030
movq (%rax), %rax
movl %ebp, %ecx
movsbl (%rbx,%rcx), %ecx
cmpl %ecx, (%rax,%r15,4)
cmovel %ebp, %r14d
movl %r14d, %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/debbiemarkslab[P]plmc/src/inference.c
// Function: ElapsedTime
numeric_t ElapsedTime(struct timeval *start) {
/* Computes the elapsed time from START to NOW in seconds */
    struct timeval now;
    gettimeofday(&now, NULL);
    if (now.tv_usec < start->tv_usec) {
        int nsec = (start->tv_usec - now.tv_usec) / 1000000 + 1;
        start->tv_usec -= 1000000 * nsec;
        start->tv_sec += nsec;
    }
    if (now.tv_usec - start->tv_usec > 1000000) {
        int nsec = (now.tv_usec - start->tv_usec) / 1000000;
        start->tv_usec += 1000000 * nsec;
        start->tv_sec -= nsec;
    }
    return (numeric_t) (now.tv_sec - start->tv_sec)
                      + ((numeric_t) (now.tv_usec - start->tv_usec)) / 1E6;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x10f0
movq 0x8(%r14), %rsi
movq (%rbx), %rcx
movq 0x8(%rbx), %rdi
movq %rdi, %rax
movabsq $0x431bde82d7b634db, %r8 # imm = 0x431BDE82D7B634DB
subq %rsi, %rax
jle 0xb147
imulq %r8
movq %rdx, %rax
shrq $0x12, %rax
shrq $0x3f, %rdx
addl %edx, %eax
incl %eax
imull $0xf4240, %eax, %edx    # imm = 0xF4240
movslq %edx, %rdx
subq %rdx, %rdi
movq %rdi, 0x8(%rbx)
cltq
addq %rax, %rcx
movq %rcx, (%rbx)
movq %rsi, %rax
subq %rdi, %rax
cmpq $0xf4241, %rax          # imm = 0xF4241
jl 0xb184
mulq %r8
shrq $0x12, %rdx
movabsq $0xf424000000000, %rax  # imm = 0xF424000000000
imulq %rdx, %rax
sarq $0x20, %rax
addq %rdi, %rax
movq %rax, 0x8(%rbx)
movslq %edx, %rdx
subq %rdx, %rcx
movq %rcx, (%rbx)
subq %rax, %rsi
movq %rsi, %rax
movq 0x8(%rsp), %rdx
subq %rcx, %rdx
cvtsi2sd %rdx, %xmm1
cvtsi2sd %rax, %xmm0
divsd 0x232a(%rip), %xmm0     # 0xd4c8
addsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/debbiemarkslab[P]plmc/src/weights.c
// Function: ValidateCustomWeightsFile
int ValidateCustomWeightsFile(char *weightsFile, alignment_t *ali) {
    /* Check that the weights file exists */
    /* Remember to close file pointer before returning. */
    FILE *fp = fopen(weightsFile, "r");
    if (fp == NULL) {
        fprintf(stderr, "Error: weights file %s does not exist\n", weightsFile);
        fclose(fp);
        return 1;
    }

    /* Count number of lines in file */
    int nLines = 0;
    int MAX_LINE_LENGTH = 1024;
    char line[MAX_LINE_LENGTH];
    while (fgets(line, MAX_LINE_LENGTH, fp) != NULL) nLines++;

    int nSeqsRaw = ali->nSeqs + ali->nSkippedSeqs;
    if (nLines != nSeqsRaw) {
        fprintf(stderr, "Error: weights file %s has %d lines, but alignment has %d sequences\n",
                weightsFile, nLines, nSeqsRaw);
        fclose(fp);
        return 1;
    }

    fclose(fp);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
leaq 0x2268(%rip), %rsi      # 0xe284
callq 0x11d0
testq %rax, %rax
je 0xc085
movq %rax, %rbx
movq %rsp, -0x30(%rbp)
movq %rsp, %r13
addq $-0x400, %r13           # imm = 0xFC00
movq %r13, %rsp
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %r13, %rdi
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdx
callq 0x1150
incl %r12d
testq %rax, %rax
jne 0xc040
movl 0x28(%r15), %r8d
addl (%r15), %r8d
xorl %r15d, %r15d
cmpl %r12d, %r8d
jne 0xc095
movq %rbx, %rdi
callq 0x10b0
movq -0x30(%rbp), %rsp
movl %r15d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x224f
movl $0x1, %r15d
jmp 0xc073
movq 0x4f5c(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x1959(%rip), %rsi      # 0xd9ff
movq %r14, %rdx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x1180
movl $0x1, %r15d
jmp 0xc067