LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x20
popq %rdi
callq 0x2220
testq %rax, %rax
je 0x5856
movq %rax, %rbx
movups (%r12), %xmm0
movups %xmm0, (%rax)
movq %r14, 0x18(%rax)
movq (%r15), %rdi
movq %rax, %rsi
callq 0x6035
testl %eax, %eax
je 0x5858
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_O2/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 0x5944
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rdi
callq 0x6129
testq %rax, %rax
je 0x5933
movq %rax, %rdi
callq 0x2040
movq (%rbx), %rdi
callq 0x62fe
jmp 0x5914
movq (%rbx), %rdi
callq 0x6354
movq %rbx, %rdi
popq %rbx
jmp 0x2040
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../libcperciva/network/network_read.c
// Function: network_read
void *
network_read(int fd, uint8_t * buf, size_t buflen, size_t minread,
    int (* callback)(void *, ssize_t), void * cookie)
{
	struct network_read_cookie * C;

	/* Make sure buflen is non-zero. */
	assert(buflen != 0);

	/* Sanity-check: # bytes must fit into a ssize_t. */
	assert(buflen <= SSIZE_MAX);

	/* Bake a cookie. */
	if ((C = mpool_network_read_cookie_malloc()) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;
	C->fd = fd;
	C->buf = buf;
	C->buflen = buflen;
	C->minlen = minread;
	C->bufpos = 0;

	/* Register a callback for network readiness. */
	if (events_network_register(callback_buf, C, C->fd,
	    EVENTS_NETWORK_OP_READ))
		goto err1;

	/* Success! */
	return (C);

err1:
	mpool_network_read_cookie_free(C);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x5a2a
js 0x5a43
movq %r9, %r12
movq %r8, %rbp
movq %rdx, %r15
movq %rsi, %r13
movl %edi, %ebx
incq 0x5b01(%rip)            # 0xb478
movq 0x5ae2(%rip), %rax      # 0xb460
testq %rax, %rax
je 0x599c
movq 0x5ae6(%rip), %rsi      # 0xb470
leaq -0x1(%rax), %rdx
movq %rdx, 0x5acb(%rip)      # 0xb460
movq -0x8(%rsi,%rax,8), %r14
jmp 0x59d5
movq %rcx, (%rsp)
incq 0x5ad9(%rip)            # 0xb480
cmpl $0x0, 0x5ada(%rip)      # 0xb488
jne 0x59c6
movq 0x5ae1(%rip), %rdi      # 0xb498
callq 0x6370
movl $0x1, 0x5ac2(%rip)      # 0xb488
pushq $0x38
popq %rdi
callq 0x2220
movq %rax, %r14
movq (%rsp), %rcx
testq %r14, %r14
je 0x5a15
movq %rbp, (%r14)
movq %r12, 0x8(%r14)
movl %ebx, 0x10(%r14)
movq %r13, 0x18(%r14)
movq %r15, 0x20(%r14)
movq %rcx, 0x28(%r14)
andq $0x0, 0x30(%r14)
leaq 0x63(%rip), %rdi        # 0x5a60
movq %r14, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x2ce8
testl %eax, %eax
je 0x5a18
movq %r14, %rdi
callq 0x5b11
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f86(%rip), %rdi      # 0x79b7
leaq 0x1f8b(%rip), %rsi      # 0x79c3
leaq 0x1faa(%rip), %rcx      # 0x79e9
pushq $0x76
jmp 0x5a5a
leaq 0x1ff4(%rip), %rdi      # 0x7a3e
leaq 0x1f72(%rip), %rsi      # 0x79c3
leaq 0x1f91(%rip), %rcx      # 0x79e9
pushq $0x79
popq %rdx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../libcperciva/network/network_read.c
// Function: callback_buf
static int
callback_buf(void * cookie)
{
	struct network_read_cookie * C = cookie;
	size_t oplen;
	ssize_t len;

	/* Attempt to read/write data to/from the buffer. */
	oplen = C->buflen - C->bufpos;
	len = recv(C->fd, C->buf + C->bufpos, oplen, 0);

	/* Failure? */
	if (len == -1) {
		/* Was it really an error, or just a try-again? */
		if ((errno == EAGAIN) ||
#if EAGAIN != EWOULDBLOCK
		    (errno == EWOULDBLOCK) ||
#endif
		    (errno == EINTR))
			goto tryagain;

		/* Something went wrong. */
		goto failed;
	} else if (len == 0) {
		/* The socket was shut down by the remote host. */
		goto eof;
	}

	/* We processed some data. */
	C->bufpos += (size_t)len;

	/* Do we need to keep going? */
	if (C->bufpos < C->minlen)
		goto tryagain;

	/* Sanity-check: buffer position must fit into a ssize_t. */
	assert(C->bufpos <= SSIZE_MAX);

	/* Invoke the callback and return. */
	return (docallback(C, (ssize_t)C->bufpos));

tryagain:
	/* Reset the event. */
	if (events_network_register(callback_buf, C, C->fd,
	    EVENTS_NETWORK_OP_READ))
		goto failed;

	/* Callback was reset. */
	return (0);

eof:
	/* Invoke the callback with an EOF status and return. */
	return (docallback(C, 0));

failed:
	/* Invoke the callback with a failure status and return. */
	return (docallback(C, -1));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdx
movq 0x30(%rdi), %rsi
subq %rsi, %rdx
movl 0x10(%rdi), %edi
addq 0x18(%rbx), %rsi
xorl %ecx, %ecx
callq 0x2060
testq %rax, %rax
je 0x5aa2
pushq $-0x1
popq %r14
cmpq $-0x1, %rax
jne 0x5aa7
callq 0x2090
movl (%rax), %eax
cmpl $0x4, %eax
je 0x5ab8
cmpl $0xb, %eax
je 0x5ab8
jmp 0x5ae2
movq %rax, %r14
jmp 0x5ae2
movq 0x30(%rbx), %rcx
addq %rax, %rcx
movq %rcx, 0x30(%rbx)
cmpq 0x28(%rbx), %rcx
jae 0x5ada
movl 0x10(%rbx), %edx
leaq -0x62(%rip), %rdi       # 0x5a60
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x2ce8
testl %eax, %eax
jne 0x5ae2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rcx, %r14
testq %rcx, %rcx
js 0x5af4
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5c7f
leaq 0x1f57(%rip), %rdi      # 0x7a52
leaq 0x1ec1(%rip), %rsi      # 0x79c3
leaq 0x1f60(%rip), %rcx      # 0x7a69
pushq $0x4f
popq %rdx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../libcperciva/network/network_read.c
// Function: mpool_network_read_cookie_atexit
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 %r14
pushq %rbx
pushq %rax
movq 0x5833(%rip), %rbx      # 0xb470
movq 0x581c(%rip), %r14      # 0xb460
decq %r14
cmpq $-0x1, %r14
je 0x5c5f
movq %r14, 0x580c(%rip)      # 0xb460
movq (%rbx,%r14,8), %rdi
callq 0x2040
jmp 0x5c44
cmpq 0x582a(%rip), %rbx      # 0xb490
je 0x5c77
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5d0b
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), %r13
movq %r13, 0x8(%rcx)
movabsq $0x3000000010, %rbp     # imm = 0x3000000010
movq %rbp, (%rcx)
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20d0
movl %eax, %r15d
pushq $-0x1
popq %rax
testl %r15d, %r15d
js 0x5d80
incl %r15d
movq %r15, %rdi
callq 0x2220
movq %rax, (%rbx)
testq %rax, %rax
je 0x5d7d
movq %rsp, %rcx
movq %r12, 0x10(%rcx)
movq %r13, 0x8(%rcx)
movq %rbp, (%rcx)
movq (%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x20d0
testl %eax, %eax
jns 0x5d80
movq (%rbx), %rdi
callq 0x2040
pushq $-0x1
popq %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
testq %rdx, %rdx
js 0x5df2
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
pushq $-0x1
popq %r12
movq %rdx, %r15
testq %r15, %r15
je 0x5de6
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2110
cmpq $-0x1, %rax
jne 0x5dd4
callq 0x2090
cmpl $0x4, (%rax)
je 0x5db5
jmp 0x5de3
testq %rax, %rax
js 0x5e0b
subq %rax, %r15
jl 0x5e24
addq %rax, %r14
jmp 0x5db0
movq %r12, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c89(%rip), %rdi      # 0x7a82
leaq 0x1c96(%rip), %rsi      # 0x7a96
leaq 0x1cad(%rip), %rcx      # 0x7ab4
pushq $0x17
jmp 0x5e3b
leaq 0x1cd3(%rip), %rdi      # 0x7ae5
leaq 0x1c7d(%rip), %rsi      # 0x7a96
leaq 0x1c94(%rip), %rcx      # 0x7ab4
pushq $0x25
jmp 0x5e3b
leaq 0x1cc7(%rip), %rdi      # 0x7af2
leaq 0x1c64(%rip), %rsi      # 0x7a96
leaq 0x1c7b(%rip), %rcx      # 0x7ab4
pushq $0x26
popq %rdx
callq 0x2160
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x28
popq %rdi
callq 0x2220
testq %rax, %rax
je 0x5f36
movq %rax, %r12
movq %r13, 0x10(%rsp)
movq %r13, (%rax)
movq %rbp, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x20(%rax)
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x5488
movq %rax, 0x18(%r12)
testq %rax, %rax
je 0x5f2e
movq %rax, %r13
movq %rbp, (%rsp)
movq %r12, 0x8(%rsp)
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x5ed7
movq (%rbx,%r12,8), %rbp
movq %r13, %rdi
movq %r12, %rsi
callq 0x5f4b
movq %rbp, (%rax)
incq %r12
jmp 0x5ebb
leaq -0x1(%r14), %rbx
movq 0x8(%rsp), %r12
movq (%rsp), %rbp
cmpq %r14, %rbx
jae 0x5f07
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq 0x10(%rsp), %rcx
xorl %r8d, %r8d
movq %r15, %r9
callq 0x5f53
decq %rbx
jmp 0x5ee4
testq %rbp, %rbp
je 0x5f39
xorl %ebx, %ebx
cmpq %rbx, %r14
je 0x5f39
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5f4b
movq (%rax), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq *%rbp
incq %rbx
jmp 0x5f0e
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_O2/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 0x5fba
movq %r13, %rdi
movq %r15, %rsi
callq 0x5f4b
movq (%rax), %r14
movq %r13, %rdi
movq %rbp, %rsi
callq 0x5f4b
movq (%rax), %rdx
movq (%rsp), %rdi
movq %r14, %rsi
callq *%rbx
testl %eax, %eax
jg 0x5fb7
movq %r15, %rbp
movq %rbp, %r14
leaq (%r15,%r15), %rbp
addq $0x2, %rbp
cmpq %r12, %rbp
jae 0x6002
movq %r13, %rdi
movq %r14, %rsi
callq 0x5f4b
movq %rbx, %r12
movq (%rax), %rbx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x5f4b
movq (%rax), %rdx
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rbx
callq *%r12
testl %eax, %eax
jg 0x5ffa
movq %r14, %rbp
movq %rbp, %r14
movq 0x8(%rsp), %r12
cmpq %r15, %r14
je 0x6026
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq 0x10(%rsp), %rcx
movq (%rsp), %r8
callq 0x6258
movq %r14, %r15
jmp 0x5f7e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rdx
pushq $0x8
popq %rcx
movq %rax, %rsi
callq 0x55e2
testl %eax, %eax
je 0x605e
pushq $-0x1
popq %r14
jmp 0x60a5
movq 0x8(%rbx), %rcx
movq 0x20(%rbx), %rax
leaq 0x1(%rax), %rdx
movq %rdx, 0x20(%rbx)
xorl %r14d, %r14d
testq %rcx, %rcx
je 0x6090
movq 0x10(%rbx), %rdi
movq (%rsp), %rsi
movq %rax, %rdx
callq *%rcx
movq 0x8(%rbx), %rcx
movq 0x20(%rbx), %rax
decq %rax
jmp 0x6092
xorl %ecx, %ecx
movq 0x18(%rbx), %rdi
movq (%rbx), %rdx
movq 0x10(%rbx), %r8
movq %rax, %rsi
callq 0x60b0
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %r8, %rbx
movq %rcx, (%rsp)
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
testq %r13, %r13
je 0x611a
movq %r12, %rdi
movq %r13, %rsi
callq 0x5f4b
movq (%rax), %r14
leaq -0x1(%r13), %rbp
shrq %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x5f4b
movq (%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq *%r15
testl %eax, %eax
jns 0x611a
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq (%rsp), %rcx
movq %rbx, %r8
callq 0x6258
movq %rbp, %r13
jmp 0x60cb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6236
movq 0x18(%rbx), %rdi
callq 0x5f4b
movq (%rax), %r15
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x5f4b
movq %r15, (%rax)
movq 0x8(%rbx), %r12
testq %r12, %r12
je 0x61a8
movq 0x10(%rbx), %r15
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x5f4b
movq (%rax), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq *%r12
testq %r14, %r14
je 0x621b
movq (%rbx), %rbp
movq 0x10(%rbx), %r12
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x5f4b
movq (%rax), %r13
movq 0x18(%rbx), %rdi
leaq -0x1(%r14), %r15
shrq %r15
movq %r15, %rsi
callq 0x5f4b
movq (%rax), %rdx
movq %r12, %rdi
movq %r13, %rsi
callq *%rbp
movq 0x8(%rbx), %r8
testl %eax, %eax
jns 0x621f
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r8, %rcx
movq %rax, %r8
callq 0x6258
movq 0x18(%rbx), %rdi
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %r8
movq %r15, %rsi
callq 0x60b0
jmp 0x6236
movq 0x8(%rbx), %r8
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rdx
movq (%rbx), %rcx
movq 0x10(%rbx), %r9
movq %r14, %rsi
callq 0x5f53
movq 0x18(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
callq 0x567d
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_O2/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
callq 0x5f4b
movq (%rax), %r13
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5f4b
movq (%rax), %rbp
movq %r15, %rdi
movq %r12, %rsi
callq 0x5f4b
movq %rbp, (%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5f4b
movq %r13, (%rax)
testq %r14, %r14
je 0x62ef
movq %r14, %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x5f4b
movq (%rax), %rsi
movq (%rsp), %r14
movq %r14, %rdi
movq %r12, %rdx
callq *%r13
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5f4b
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_O2/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 0x636f
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x551f
movq %rbx, %rdi
popq %rbx
jmp 0x2040
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0xee1b(%rip)      # 0x10180
pushq $0x1
popq %rcx
leaq 0xee11(%rip), %rdx      # 0x10180
cmpq $0x270, %rcx            # imm = 0x270
je 0x1392
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
jmp 0x136f
movl $0x270, 0xeda4(%rip)    # imm = 0x270
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl $0x12bd6aa, %edi        # imm = 0x12BD6AA
callq 0x135c
cmpl $0x271, %ebx            # imm = 0x271
movl $0x270, %edx            # imm = 0x270
cmovgel %ebx, %edx
xorl %esi, %esi
pushq $0x1
popq %rdi
leaq 0xedb5(%rip), %rax      # 0x10180
movl %edi, %ecx
xorl %r8d, %r8d
subl $0x1, %edx
jb 0x142b
movslq %ecx, %r9
movq -0x8(%rax,%r9,8), %r10
movq %r10, %r11
shrq $0x1e, %r11
xorl %r10d, %r11d
imull $0x19660d, %r11d, %r10d # imm = 0x19660D
xorl (%rax,%r9,8), %r10d
movslq %r8d, %r11
movl (%r14,%r11,8), %r15d
addl %r11d, %r15d
addl %r10d, %r15d
movq %r15, (%rax,%r9,8)
cmpl $0x26f, %ecx            # imm = 0x26F
jge 0x140f
incl %ecx
jmp 0x141f
movq 0x100e2(%rip), %rcx     # 0x114f8
movq %rcx, 0xed63(%rip)      # 0x10180
movl %edi, %ecx
incl %r8d
cmpl %ebx, %r8d
cmovgel %esi, %r8d
jmp 0x13d0
movl $0xfffffd91, %edx       # imm = 0xFFFFFD91
pushq $0x1
popq %rsi
testl %edx, %edx
je 0x147b
movslq %ecx, %rdi
movq -0x8(%rax,%rdi,8), %r8
movq %r8, %r9
shrq $0x1e, %r9
xorl %r8d, %r9d
imull $0x5d588b65, %r9d, %r8d # imm = 0x5D588B65
xorl (%rax,%rdi,8), %r8d
subl %edi, %r8d
movq %r8, (%rax,%rdi,8)
cmpl $0x26f, %ecx            # imm = 0x26F
jge 0x1467
incl %ecx
jmp 0x1477
movq 0x1008a(%rip), %rcx     # 0x114f8
movq %rcx, 0xed0b(%rip)      # 0x10180
movl %esi, %ecx
incl %edx
jmp 0x1433
movl $0x80000000, %eax       # imm = 0x80000000
movq %rax, 0xecf9(%rip)      # 0x10180
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/debbiemarkslab[P]plmc/src/lib/twister.c
// Function: genrand_int32
unsigned long genrand_int32(void)
{   
    unsigned long y;
    static unsigned long mag01[2]={0x0UL, MATRIX_A};
    /* mag01[x] = x * MATRIX_A  for x=0,1 */

    if (mti >= N) { /* generate N words at one time */
        int kk;

        if (mti == N+1)   /* if init_genrand() has not been called, */
            init_genrand(5489UL); /* a default initial seed is used */

        for (kk=0;kk<N-M;kk++) {
            y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
            mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1UL];
        }
        for (;kk<N-1;kk++) {
            y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
            mt[kk] = mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1UL];
        }
        y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK);
        mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL];

        mti = 0;
    }
  
    y = mt[mti++];

    /* Tempering */
    y ^= (y >> 11);
    y ^= (y << 7) & 0x9d2c5680UL;
    y ^= (y << 15) & 0xefc60000UL;
    y ^= (y >> 18);

    return y;
}

// Assembly:
movslq 0xecac(%rip), %rax      # 0x10140
cmpq $0x26f, %rax            # imm = 0x26F
jle 0x1506
cmpl $0x271, %eax            # imm = 0x271
jne 0x14b2
pushq %rax
movl $0x1571, %edi           # imm = 0x1571
callq 0x135c
addq $0x8, %rsp
xorl %edx, %edx
leaq 0xecc5(%rip), %rcx      # 0x10180
movl $0x80000000, %esi       # imm = 0x80000000
leaq 0xab69(%rip), %rax      # 0xc030
cmpq $0xe3, %rdx
je 0x1518
movl (%rcx,%rdx,8), %edi
andl %esi, %edi
movl 0x8(%rcx,%rdx,8), %r8d
movl %r8d, %r9d
andl $0x7ffffffe, %r9d       # imm = 0x7FFFFFFE
orl %edi, %r9d
shrl %r9d
andl $0x1, %r8d
movq (%rax,%r8,8), %rdi
xorq 0xc68(%rcx,%rdx,8), %rdi
xorq %r9, %rdi
movq %rdi, (%rcx,%rdx,8)
incq %rdx
jmp 0x14c7
leaq 0xec73(%rip), %rcx      # 0x10180
movq (%rcx,%rax,8), %rcx
incl %eax
jmp 0x15a0
xorl %edx, %edx
movl $0x80000000, %esi       # imm = 0x80000000
cmpq $0x18c, %rdx            # imm = 0x18C
je 0x1565
movl 0x718(%rcx,%rdx,8), %edi
andl %esi, %edi
movl 0x720(%rcx,%rdx,8), %r8d
movl %r8d, %r9d
andl $0x7ffffffe, %r9d       # imm = 0x7FFFFFFE
orl %edi, %r9d
andl $0x1, %r8d
movq (%rax,%r8,8), %rdi
xorq (%rcx,%rdx,8), %rdi
shrl %r9d
xorq %r9, %rdi
movq %rdi, 0x718(%rcx,%rdx,8)
incq %rdx
jmp 0x151f
movl $0x80000000, %edx       # imm = 0x80000000
andl 0xff88(%rip), %edx      # 0x114f8
movq 0xec09(%rip), %rcx      # 0x10180
movl %ecx, %esi
andl $0x7ffffffe, %esi       # imm = 0x7FFFFFFE
orl %edx, %esi
movl %ecx, %edx
andl $0x1, %edx
movq (%rax,%rdx,8), %rax
xorq 0xf84f(%rip), %rax      # 0x10de0
shrl %esi
xorq %rsi, %rax
movq %rax, 0xff5b(%rip)      # 0x114f8
pushq $0x1
popq %rax
movl %eax, 0xeb9a(%rip)      # 0x10140
movq %rcx, %rax
shrq $0xb, %rax
xorq %rcx, %rax
movl %eax, %ecx
shll $0x7, %ecx
andl $0x9d2c5680, %ecx       # imm = 0x9D2C5680
xorq %rax, %rcx
movl %ecx, %edx
shll $0xf, %edx
andl $0xefc60000, %edx       # imm = 0xEFC60000
xorq %rcx, %rdx
movq %rdx, %rax
shrq $0x12, %rax
xorq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testl %r8d, %r8d
movl $0x0, %r10d
cmovgl %r8d, %r10d
cmpq %rax, %r10
je 0x2cbe
movsd (%rdx,%rax,8), %xmm1
movsd %xmm1, (%rdi,%rax,8)
incq %rax
jmp 0x2caa
movapd 0x93da(%rip), %xmm1     # 0xc0a0
xorpd %xmm0, %xmm1
movslq %r8d, %r8
movslq %r9d, %rax
xorpd %xmm2, %xmm2
cmpq %rax, %r8
jge 0x2d28
movsd (%rsi,%r8,8), %xmm3
ucomisd %xmm3, %xmm2
jbe 0x2cf1
movsd (%rdx,%r8,8), %xmm3
subsd %xmm0, %xmm3
jmp 0x2d1d
ucomisd %xmm2, %xmm3
movsd (%rdx,%r8,8), %xmm4
movapd %xmm4, %xmm3
addsd %xmm0, %xmm3
ja 0x2d1d
ucomisd %xmm4, %xmm1
ja 0x2d1d
xorpd %xmm3, %xmm3
ucomisd %xmm0, %xmm4
jbe 0x2d1d
subsd %xmm0, %xmm4
movapd %xmm4, %xmm3
movsd %xmm3, (%rdi,%r8,8)
incq %r8
jmp 0x2cd4
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x2d3f
movsd (%rdx,%rax,8), %xmm0
movsd %xmm0, (%rdi,%rax,8)
incq %rax
jmp 0x2d2b
retq
// File: /workspace/github_c_makefile_star2_O2/debbiemarkslab[P]plmc/src/lib/../include/arithmetic_ansi.h
// Function: vecdot
inline static void vecdot(lbfgsfloatval_t* s, const lbfgsfloatval_t *x, const lbfgsfloatval_t *y, const int n)
{
    int i;
    *s = 0.;
    for (i = 0;i < n;++i) {
        *s += x[i] * y[i];
    }
}

// Assembly:
andq $0x0, (%rdi)
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
xorpd %xmm0, %xmm0
cmpq %rax, %rcx
je 0x2dfa
movsd (%rsi,%rax,8), %xmm1
mulsd (%rdx,%rax,8), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rdi)
incq %rax
jmp 0x2dde
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2a
popq %rdi
callq 0x135c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x38d1
movq %rax, %r15
testq %rbp, %rbp
je 0x3858
movq %rbp, %rdi
movq %r15, %rsi
callq 0xaab6
jmp 0x3863
movq %r15, %rdi
movq %rbx, %rsi
callq 0xa078
testq %r13, %r13
je 0x3873
movq %r13, %rdi
movq %r15, %rsi
callq 0xac89
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4359
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5870
movq %rax, %r13
testq %r12, %r12
je 0x38a2
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x49a5
testq %r14, %r14
je 0x38b8
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x4f2a
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5469
// File: /workspace/github_c_makefile_star2_O2/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 0x54a0
cmpq $0x0, (%rdi)
je 0x54a2
xorl %r15d, %r15d
movslq (%r14), %rax
movq 0x18(%r14), %rdi
cmpq %rax, %r15
jge 0x54a2
movq (%rdi,%r15,8), %rdi
callq 0x1050
incq %r15
jmp 0x5486
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_O2/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 %r12
pushq %rbx
subq $0xa000, %rsp           # imm = 0xA000
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x1110
movl %eax, %r12d
movsbl %r12b, %edi
movq %rbx, %rsi
callq 0x11b0
movb $0x0, (%r14)
movq %rsp, %r15
pushq $0xa
popq %rbp
cmpb $0x3e, %r12b
je 0x5580
movq %rbx, %rdi
callq 0x1180
testl %eax, %eax
jne 0x5580
movq %r15, %rdi
movl $0xa000, %esi           # imm = 0xA000
movq %rbx, %rdx
callq 0x1140
testq %rax, %rax
je 0x555c
movq %r15, %rdi
movl %ebp, %esi
callq 0x10d0
testq %rax, %rax
jne 0x5557
movq %r15, %rdi
callq 0x10c0
addq %r15, %rax
decq %rax
cmpb $0xd, (%rax)
jne 0x555c
movb $0x0, (%rax)
jmp 0x5544
movq %r14, %rdi
movq %r15, %rsi
callq 0x11e0
movq %rbx, %rdi
callq 0x1110
movl %eax, %r12d
movsbl %r12b, %edi
movq %rbx, %rsi
callq 0x11b0
jmp 0x550e
addq $0xa000, %rsp           # imm = 0xA000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movq %rsi, %rbx
cmpq %rsi, 0xabae(%rip)      # 0x10150
pushq $0x2d
popq %rax
cmovnel %edi, %eax
cmpb $0x2e, %dil
cmovnel %edi, %eax
movl %edx, %ebp
movslq %eax, %r15
cmpl $0x2, %edx
pushq $0x1
popq %r14
cmovgel %edx, %r14d
decl %r14d
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x55e2
callq 0x1030
movq (%rax), %rax
movsbl (%rbx,%r12), %ecx
cmpl %ecx, (%rax,%r15,4)
je 0x55e7
incq %r12
jmp 0x55c5
movq %r14, %r12
jmp 0x55ea
movl %r12d, %r14d
movsbl (%rbx,%r12), %r12d
cmpb %r12b, %r15b
je 0x5608
callq 0x1030
movq (%rax), %rax
xorl %ecx, %ecx
cmpl %r12d, (%rax,%r15,4)
cmovel %ebp, %ecx
subl %ecx, %r14d
testl %r14d, %r14d
jle 0x5627
callq 0x1030
movq (%rax), %rax
movl %r14d, %ecx
movsbl (%rbx,%rcx), %ecx
cmpl %ecx, (%rax,%r15,4)
cmovel %r14d, %ebp
movl %ebp, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
subq %rsi, %rax
jle 0x9df1
movl $0xf4240, %r8d          # imm = 0xF4240
cqto
idivq %r8
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 0x9e31
movl $0xf4240, %r8d          # imm = 0xF4240
xorl %edx, %edx
divq %r8
movabsq $0xf424000000000, %rdx  # imm = 0xF424000000000
imulq %rax, %rdx
sarq $0x20, %rdx
addq %rdi, %rdx
movq %rdx, 0x8(%rbx)
cltq
subq %rax, %rcx
movq %rcx, (%rbx)
subq %rdx, %rsi
movq %rsi, %rax
movq 0x8(%rsp), %rdx
subq %rcx, %rdx
cvtsi2sd %rdx, %xmm1
cvtsi2sd %rax, %xmm0
divsd 0x2605(%rip), %xmm0     # 0xc450
addsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
leaq 0x27ed(%rip), %rsi      # 0xd1f0
callq 0x11c0
testq %rax, %rax
je 0xaa6a
movq %rax, %r14
movq %rsp, -0x30(%rbp)
movq %rsp, %r13
addq $-0x400, %r13           # imm = 0xFC00
movq %r13, %rsp
pushq $-0x1
popq %r12
movq %r13, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x1140
incl %r12d
testq %rax, %rax
jne 0xaa25
movl 0x28(%r15), %r8d
addl (%r15), %r8d
xorl %r15d, %r15d
cmpl %r12d, %r8d
jne 0xaa92
movq %r14, %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 0x5587(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x1ec9(%rip), %rsi      # 0xc944
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1170
xorl %edi, %edi
callq 0x10b0
pushq $0x1
popq %r15
jmp 0xaa58
movq 0x555f(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x1ec8(%rip), %rsi      # 0xc96b
movq %rbx, %rdx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x1170
pushq $0x1
popq %r15
jmp 0xaa4c
// File: /workspace/github_c_makefile_star2_O2/debbiemarkslab[P]plmc/src/weights.c
// Function: WriteWeightsFile
void WriteWeightsFile(char *weightsFile, alignment_t *ali) {
    // Note: Ignoring options->scale and options->theta here, writing out raw weights
    /* Write weights to file */
    FILE *fpOutput = fopen(weightsFile, "w");
    if (fpOutput == NULL) {
        fprintf(stderr, "Error: could not open weights file %s\n", weightsFile);
        exit(1);
    }
    // Write out weights, one float per line, and include invalid seqs as weight 0
    // Copied from plm.OutputParametersFull()
    int skipix = 0, reducedix = 0;
    for (int i = 0; i < (ali->nSeqs + ali->nSkippedSeqs); i++) {
        if (skipix < ali->nSkippedSeqs && i == ali->skippedSeqs[skipix]) {
            /* Skip skipped sequences */
            fprintf(fpOutput, "0.0\n");
            skipix++;
        } else {
            numeric_t w = ali->weights[reducedix];
            fprintf(fpOutput, weights_fmt, w);
            reducedix++;
        }
    }
    fclose(fpOutput);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x16df(%rip), %rsi      # 0xc380
callq 0x11c0
testq %rax, %rax
je 0xad30
movq %rax, %r14
xorl %ebp, %ebp
pushq $0x1
popq %r13
xorl %r15d, %r15d
xorl %r12d, %r12d
movl 0x28(%rbx), %eax
movl (%rbx), %ecx
addl %eax, %ecx
cmpl %ecx, %r15d
jge 0xad1a
cmpl %eax, %r12d
jge 0xacf6
movq 0x30(%rbx), %rax
movslq %r12d, %rcx
cmpl (%rax,%rcx,4), %r15d
jne 0xacf6
leaq 0x1dda(%rip), %rdi      # 0xcabd
pushq $0x4
popq %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x1200
incl %r12d
jmp 0xad15
movq 0x50(%rbx), %rax
movslq %ebp, %rbp
movsd (%rax,%rbp,8), %xmm0
movq 0x544f(%rip), %rsi      # 0x10158
movq %r14, %rdi
movb $0x1, %al
callq 0x1170
incl %ebp
incl %r15d
jmp 0xacbe
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
movq 0x52c1(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x1c92(%rip), %rsi      # 0xc9d3
movq %r15, %rdx
xorl %eax, %eax
callq 0x1170
pushq $0x1
popq %rdi
callq 0x11f0
nop
// File: /workspace/github_c_makefile_star2_O2/OpenGene[P]pecheck/src/fastqreader.cpp
// Function: FastqReader::FastqReader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, bool)
FastqReader::FastqReader(string filename, bool hasQuality, bool phred64){
	mFilename = filename;
	mZipFile = NULL;
	mZipped = false;
	mFile = NULL;
	mStdinMode = false;
	mPhred64 = phred64;
	mHasQuality = hasQuality;
	mBuf = new char[FQ_BUF_SIZE];
	mBufDataLen = 0;
	mBufUsedLen = 0;
	init();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %r14d
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
callq 0x3170
xorl %eax, %eax
movb %al, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movb %al, 0x30(%rbx)
movb %r14b, 0x32(%rbx)
movb %bpl, 0x31(%rbx)
movl $0x100000, %edi         # imm = 0x100000
callq 0x3040
movq %rax, 0x38(%rbx)
andq $0x0, 0x40(%rbx)
movq %rbx, %rdi
callq 0x37f8
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3568
movq %r14, %rdi
callq 0x34e0
nop
// File: /workspace/github_c_makefile_star2_O2/OpenGene[P]pecheck/src/fastqreader.cpp
// Function: FastqReader::init()
void FastqReader::init(){
	if (ends_with(mFilename, ".gz")){
		mZipFile = gzopen(mFilename.c_str(), "r");
		mZipped = true;
		gzrewind(mZipFile);
	}
	else {
		if(mFilename == "/dev/stdin") {
			mFile = stdin;
		}
		else
			mFile = fopen(mFilename.c_str(), "rb");
		if(mFile == NULL) {
			error_exit("Failed to open file: " + mFilename);
		}
		mZipped = false;
	}
	readToBuf();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x684f(%rip), %rsi      # 0xa059
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x44ec
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x44ab
movl %eax, %ebp
leaq 0x10(%rsp), %rdi
callq 0x3568
testb %bpl, %bpl
je 0x3858
movq (%rbx), %rdi
leaq 0x67db(%rip), %rsi      # 0xa01c
callq 0x33d0
movq %rax, 0x20(%rbx)
movb $0x1, 0x30(%rbx)
movq %rax, %rdi
callq 0x32d0
jmp 0x38bc
leaq 0x67bf(%rip), %rsi      # 0xa01e
movq %rbx, %rdi
callq 0x4527
testb %al, %al
je 0x3877
movq 0xc756(%rip), %rax      # 0xffc8
movq (%rax), %rax
jmp 0x3886
movq (%rbx), %rdi
leaq 0x67a8(%rip), %rsi      # 0xa029
callq 0x3310
movq %rax, 0x28(%rbx)
testq %rax, %rax
jne 0x38b8
leaq 0x6796(%rip), %rsi      # 0xa02c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4566
movq %r14, %rdi
callq 0x4534
leaq 0x10(%rsp), %rdi
callq 0x3568
movb $0x0, 0x30(%rbx)
movq %rbx, %rdi
callq 0x3946
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x38cf
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3568
jmp 0x38e1
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34e0
nop
// File: /workspace/github_c_makefile_star2_O2/OpenGene[P]pecheck/src/fastqreader.cpp
// Function: FastqReader::close()
void FastqReader::close(){
	if (mZipped){
		if (mZipFile){
			gzclose(mZipFile);
			mZipFile = NULL;
		}
	}
	else {
		if (mFile){
			fclose(mFile);//mFile.close();
			mFile = NULL;
		}
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x30(%rdi)
jne 0x392e
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3944
addq $0x20, %rbx
callq 0x34a0
jmp 0x3940
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x3944
addq $0x28, %rbx
callq 0x3270
andq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/OpenGene[P]pecheck/src/fastqreader.cpp
// Function: FastqReader::readToBuf()
void FastqReader::readToBuf() {
	if(mZipped) {
		mBufDataLen = gzread(mZipFile, mBuf, FQ_BUF_SIZE);
		if(mBufDataLen == -1) {
			cerr << "Error to read gzip file" << endl;
		}
	} else {
		mBufDataLen = fread(mBuf, 1, FQ_BUF_SIZE, mFile);
	}
	mBufUsedLen = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x30(%rdi)
jne 0x3987
movq 0x20(%rbx), %rdi
movq 0x38(%rbx), %rsi
movl $0x100000, %edx         # imm = 0x100000
callq 0x3510
movl %eax, 0x40(%rbx)
cmpl $-0x1, %eax
jne 0x399f
movq 0xc67f(%rip), %rdi      # 0xfff0
leaq 0x668c(%rip), %rsi      # 0xa004
callq 0x3260
movq %rax, %rdi
callq 0x3140
jmp 0x399f
movq 0x28(%rbx), %rcx
movq 0x38(%rbx), %rdi
pushq $0x1
popq %rsi
movl $0x100000, %edx         # imm = 0x100000
callq 0x33f0
movl %eax, 0x40(%rbx)
andl $0x0, 0x44(%rbx)
popq %rbx
retq
nop