LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_network.c
// Function: clearbit
static void
clearbit(size_t pollpos, short bit)
{

	/* Clear the bit. */
	fds[pollpos].events &= (short)(~bit);
	fds[pollpos].revents &= (short)(~bit);

	/* Is this pollfd in the way? */
	if (fds[pollpos].events == 0) {
		/* Clear the descriptor's pollpos pointer. */
		socketlist_get(S,
		    (size_t)fds[pollpos].fd)->pollpos = (size_t)(-1);

		/* If this wasn't the last pollfd, move another one up. */
		if (pollpos != nfds - 1) {
			memcpy(&fds[pollpos], &fds[nfds-1],
			    sizeof(struct pollfd));
			socketlist_get(S,
			    (size_t)fds[pollpos].fd)->pollpos = pollpos;
		}

		/* Shrink the pollfd array. */
		nfds--;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movswl -0xa(%rbp), %eax
xorl $-0x1, %eax
movswl %ax, %esi
movq 0x1aa8c(%rip), %rax     # 0x1e4e0
movq -0x8(%rbp), %rcx
movswl 0x4(%rax,%rcx,8), %edx
andl %esi, %edx
movw %dx, 0x4(%rax,%rcx,8)
movswl -0xa(%rbp), %eax
xorl $-0x1, %eax
movswl %ax, %esi
movq 0x1aa6b(%rip), %rax     # 0x1e4e0
movq -0x8(%rbp), %rcx
movswl 0x6(%rax,%rcx,8), %edx
andl %esi, %edx
movw %dx, 0x6(%rax,%rcx,8)
movq 0x1aa54(%rip), %rax     # 0x1e4e0
movq -0x8(%rbp), %rcx
movswl 0x4(%rax,%rcx,8), %eax
cmpl $0x0, %eax
jne 0x3b37
movq 0x1aa2b(%rip), %rdi     # 0x1e4d0
movq 0x1aa34(%rip), %rax     # 0x1e4e0
movq -0x8(%rbp), %rcx
movslq (%rax,%rcx,8), %rsi
callq 0x36b0
movq $-0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x1aa0c(%rip), %rcx     # 0x1e4d8
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x3b25
movq 0x1aa04(%rip), %rax     # 0x1e4e0
movq -0x8(%rbp), %rcx
movq 0x1a9f9(%rip), %rdx     # 0x1e4e0
movq 0x1a9ea(%rip), %rsi     # 0x1e4d8
subq $0x1, %rsi
movq (%rdx,%rsi,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x1a9c7(%rip), %rdi     # 0x1e4d0
movq 0x1a9d0(%rip), %rax     # 0x1e4e0
movq -0x8(%rbp), %rcx
movslq (%rax,%rcx,8), %rsi
callq 0x36b0
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq 0x1a9ac(%rip), %rax     # 0x1e4d8
addq $-0x1, %rax
movq %rax, 0x1a9a1(%rip)     # 0x1e4d8
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_network.c
// Function: events_network_select
int
events_network_select(const struct timeval * tv,
    const volatile sig_atomic_t * interrupt_requested)
{
	int timeout;

	/* Initialize if necessary. */
	if (init())
		goto err0;

	/*
	 * Convert timeout to an integer number of ms.  We round up in order
	 * to avoid creating busy loops when 0 < ${tv} < 1 ms.
	 */
	if (tv == NULL)
		timeout = -1;
	else if (tv->tv_sec >= INT_MAX / 1000)
		timeout = INT_MAX;
	else
		timeout = (int)(tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000);

	/* We're about to call poll! */
	events_network_selectstats_select();

	/* Poll. */
	while (poll(fds, (nfds_t)nfds, timeout) == -1) {
		/* EINTR is harmless, unless we've requested an interrupt. */
		if (errno == EINTR) {
			if (*interrupt_requested)
				break;
			continue;
		}

		/* Anything else is an error. */
		warnp("poll()");
		goto err0;
	}

	/* If we have any events registered, start the clock again. */
	if (nfds > 0)
		events_network_selectstats_startclock();

	/* Start scanning at the last registered descriptor and work down. */
	fdscanpos = nfds - 1;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
callq 0x3550
cmpl $0x0, %eax
je 0x3b5f
jmp 0x3c57
cmpq $0x0, -0x10(%rbp)
jne 0x3b6f
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0x3bbb
movq -0x10(%rbp), %rax
cmpq $0x20c49b, (%rax)       # imm = 0x20C49B
jl 0x3b85
movl $0x7fffffff, -0x1c(%rbp) # imm = 0x7FFFFFFF
jmp 0x3bb9
movq -0x10(%rbp), %rax
imulq $0x3e8, (%rax), %rax    # imm = 0x3E8
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x3e7, %rax            # imm = 0x3E7
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x28(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x1c(%rbp)
jmp 0x3bbb
callq 0x3f90
movq 0x1a919(%rip), %rdi     # 0x1e4e0
movq 0x1a90a(%rip), %rsi     # 0x1e4d8
movl -0x1c(%rbp), %edx
callq 0x22a0
cmpl $-0x1, %eax
jne 0x3c2d
callq 0x20a0
cmpl $0x4, (%rax)
jne 0x3bf4
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl $0x0, %eax
je 0x3bf2
jmp 0x3c2d
jmp 0x3bc0
jmp 0x3bf6
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3c1b
leaq 0x65e9(%rip), %rdi      # 0xa1f0
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x3c29
leaq 0x65ce(%rip), %rdi      # 0xa1f0
movb $0x0, %al
callq 0x6810
jmp 0x3c2b
jmp 0x3c57
cmpq $0x0, 0x1a8a3(%rip)     # 0x1e4d8
jbe 0x3c3c
callq 0x3f50
movq 0x1a895(%rip), %rax     # 0x1e4d8
subq $0x1, %rax
movq %rax, 0x1a89a(%rip)     # 0x1e4e8
movl $0x0, -0x4(%rbp)
jmp 0x3c5e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_network_selectstats.c
// Function: events_network_selectstats_startclock
void
events_network_selectstats_startclock(void)
{

	/* If the clock is already running, return silently. */
	if (running)
		return;

	/* Get the current time; return silently on error. */
	if (monoclock_get(&st))
		return;

	/* The clock is now running. */
	running = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x1a59d(%rip)     # 0x1e4f8
je 0x3f5f
jmp 0x3f7c
leaq 0x1a59a(%rip), %rdi     # 0x1e500
callq 0x4630
cmpl $0x0, %eax
je 0x3f72
jmp 0x3f7c
movl $0x1, 0x1a57c(%rip)     # 0x1e4f8
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_network_selectstats.c
// Function: events_network_selectstats_select
void
events_network_selectstats_select(void)
{
	struct timeval tnow;
	double t, d;

	/* If the clock is not running, return silently. */
	if (!running)
		return;

	/* If we can't get the current time, fail silently. */
	if (monoclock_get(&tnow))
		goto done;

	/* Compute inter-select duration in seconds. */
	t = timeval_diff(st, tnow);

	/* Adjust statistics.  We track running mean, variance * N, and max. */
	N += 1.0;
	d = t - mu;
	mu += d / N;
	M2 += d * (t - mu);
	if (max < t)
		max = t;

done:
	/* The clock is no longer running. */
	running = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
cmpl $0x0, 0x1a559(%rip)     # 0x1e4f8
jne 0x3fa6
jmp 0x408b
leaq -0x10(%rbp), %rdi
callq 0x4630
cmpl $0x0, %eax
je 0x3fb9
jmp 0x4081
movq -0x10(%rbp), %rax
subq 0x1a53c(%rip), %rax     # 0x1e500
cvtsi2sd %rax, %xmm1
movq -0x8(%rbp), %rax
subq 0x1a534(%rip), %rax     # 0x1e508
cvtsi2sd %rax, %xmm0
movsd 0x62f7(%rip), %xmm2     # 0xa2d8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x6012(%rip), %xmm0     # 0xa008
addsd 0x1a512(%rip), %xmm0    # 0x1e510
movsd %xmm0, 0x1a50a(%rip)    # 0x1e510
movsd -0x18(%rbp), %xmm0
subsd 0x1a505(%rip), %xmm0    # 0x1e518
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
divsd 0x1a4eb(%rip), %xmm0    # 0x1e510
addsd 0x1a4eb(%rip), %xmm0    # 0x1e518
movsd %xmm0, 0x1a4e3(%rip)    # 0x1e518
movsd -0x20(%rbp), %xmm0
movsd -0x18(%rbp), %xmm2
subsd 0x1a4d1(%rip), %xmm2    # 0x1e518
movsd 0x1a4d1(%rip), %xmm1    # 0x1e520
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1a4c1(%rip)    # 0x1e520
movsd 0x1a4c1(%rip), %xmm1    # 0x1e528
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x407f
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x1a4a9(%rip)    # 0x1e528
jmp 0x4081
movl $0x0, 0x1a46d(%rip)     # 0x1e4f8
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_network_selectstats.c
// Function: events_network_selectstats
void
events_network_selectstats(double * _n, double * _mu, double * _va,
    double * _max)
{

	/* Copy statistics out. */
	*_n = N;
	*_mu = mu;
	if (N > 1.0)
		*_va = M2 / (N - 1.0);
	else
		*_va = 0.0;
	*_max = max;

	/* Zero statistics. */
	N = mu = M2 = max = 0.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd 0x1a454(%rip), %xmm0    # 0x1e510
movq -0x8(%rbp), %rax
movsd %xmm0, (%rax)
movsd 0x1a44c(%rip), %xmm0    # 0x1e518
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
movsd 0x1a434(%rip), %xmm0    # 0x1e510
movsd 0x5f24(%rip), %xmm1     # 0xa008
ucomisd %xmm1, %xmm0
jbe 0x4114
movsd 0x1a42e(%rip), %xmm0    # 0x1e520
movsd 0x1a416(%rip), %xmm1    # 0x1e510
movsd 0x5f06(%rip), %xmm2     # 0xa008
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x411f
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movsd 0x1a401(%rip), %xmm0    # 0x1e528
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1a3ee(%rip)    # 0x1e528
xorps %xmm0, %xmm0
movsd %xmm0, 0x1a3db(%rip)    # 0x1e520
xorps %xmm0, %xmm0
movsd %xmm0, 0x1a3c8(%rip)    # 0x1e518
xorps %xmm0, %xmm0
movsd %xmm0, 0x1a3b5(%rip)    # 0x1e510
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_timer.c
// Function: events_timer_register
void *
events_timer_register(int (* func)(void *), void * cookie,
    const struct timeval * timeo)
{
	struct eventrec * r;
	struct timerrec * t;
	struct timeval tv;

	/* Create the timer queue if it doesn't exist yet. */
	if (Q == NULL) {
		if ((Q = timerqueue_init()) == NULL)
			goto err0;

		/* Clean up the timer queue at exit. */
		if (atexit(events_timer_shutdown))
			goto err0;
	}

	/* Bundle into an eventrec record. */
	if ((r = events_mkrec(func, cookie)) == NULL)
		goto err0;

	/* Create a timer record. */
	if ((t = malloc(sizeof(struct timerrec))) == NULL)
		goto err1;
	t->r = r;
	memcpy(&t->tv_orig, timeo, sizeof(struct timeval));

	/* Compute the absolute timeout. */
	if (gettimeout(&tv, &t->tv_orig))
		goto err2;

	/* Add this to the timer queue. */
	if ((t->cookie = timerqueue_add(Q, &tv, t)) == NULL)
		goto err2;

	/* Success! */
	return (t);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, 0x1a3b4(%rip)     # 0x1e530
jne 0x41ad
callq 0x7db0
movq %rax, 0x1a3a6(%rip)     # 0x1e530
cmpq $0x0, %rax
jne 0x4195
jmp 0x4259
leaq 0xd4(%rip), %rdi        # 0x4270
callq 0x9380
cmpl $0x0, %eax
je 0x41ab
jmp 0x4259
jmp 0x41ad
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x27a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x41c9
jmp 0x4259
movl $0x20, %edi
callq 0x2240
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x41df
jmp 0x4250
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rsi
addq $0x10, %rsi
leaq -0x40(%rbp), %rdi
callq 0x42b0
cmpl $0x0, %eax
je 0x4219
jmp 0x4247
movq 0x1a310(%rip), %rdi     # 0x1e530
movq -0x30(%rbp), %rdx
leaq -0x40(%rbp), %rsi
callq 0x7e90
movq -0x30(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0x423d
jmp 0x4247
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4261
movq -0x30(%rbp), %rdi
callq 0x2040
movq -0x28(%rbp), %rdi
callq 0x2820
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_timer.c
// Function: gettimeout
static int
gettimeout(struct timeval * tv, const struct timeval * tdelta)
{

	if (monoclock_get(tv))
		goto err0;
	tv->tv_sec += tdelta->tv_sec;
	if ((tv->tv_usec += tdelta->tv_usec) >= 1000000) {
		tv->tv_usec -= 1000000;
		tv->tv_sec += 1;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4630
cmpl $0x0, %eax
je 0x42d0
jmp 0x4327
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, 0x8(%rcx)
cmpq $0xf4240, %rax          # imm = 0xF4240
jl 0x431e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
subq $0xf4240, %rcx          # imm = 0xF4240
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x432e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_timer.c
// Function: events_timer_cancel
void
events_timer_cancel(void * cookie)
{
	struct timerrec * t = cookie;

	/* Remove from the timer queue. */
	timerqueue_delete(Q, t->cookie);

	/* Free the eventrec and timer records. */
	events_freerec(t->r);
	free(t);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x1a175(%rip), %rdi     # 0x1e530
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7f20
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2820
movq -0x10(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_timer.c
// Function: events_timer_reset
int
events_timer_reset(void * cookie)
{
	struct timerrec * t = cookie;
	struct timeval tv;

	/* Compute the new timeout. */
	if (gettimeout(&tv, &t->tv_orig))
		goto err0;

	/* Adjust the timer. */
	timerqueue_increase(Q, t->cookie, &tv);

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
leaq -0x28(%rbp), %rdi
callq 0x42b0
cmpl $0x0, %eax
je 0x441c
jmp 0x443d
movq 0x1a10d(%rip), %rdi     # 0x1e530
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x28(%rbp), %rdx
callq 0x7f60
movl $0x0, -0x4(%rbp)
jmp 0x4444
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_timer.c
// Function: events_timer_min
int
events_timer_min(struct timeval ** timeo)
{
	struct timeval tnow;
	const struct timeval * tv;

	/* If we have no queue, we have no timers; return NULL. */
	if (Q == NULL) {
		*timeo = NULL;
		goto done;
	}

	/* Get the minimum timer from the queue. */
	tv = timerqueue_getmin(Q);

	/* If there are no timers, return NULL. */
	if (tv == NULL) {
		*timeo = NULL;
		goto done;
	}

	/* Allocate space for holding the returned timeval. */
	if ((*timeo = malloc(sizeof(struct timeval))) == NULL)
		goto err0;

	/* Get the current time... */
	if (monoclock_get(&tnow))
		goto err1;

	/* ... and compare it to the minimum timer. */
	if ((tnow.tv_sec > tv->tv_sec) ||
	    ((tnow.tv_sec == tv->tv_sec) && (tnow.tv_usec > tv->tv_usec))) {
		/* The timer has already expired, so return zero. */
		(*timeo)->tv_sec = 0;
		(*timeo)->tv_usec = 0;
	} else {
		/* Compute the difference. */
		(*timeo)->tv_sec = tv->tv_sec - tnow.tv_sec;
		(*timeo)->tv_usec = tv->tv_usec - tnow.tv_usec;
		if (tv->tv_usec < tnow.tv_usec) {
			(*timeo)->tv_usec += 1000000;
			(*timeo)->tv_sec -= 1;
		}
	}

done:
	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, 0x1a0cc(%rip)     # 0x1e530
jne 0x4476
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0x4578
movq 0x1a0b3(%rip), %rdi     # 0x1e530
callq 0x7fb0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x449d
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0x4578
movl $0x10, %edi
callq 0x2240
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x44b9
jmp 0x458d
leaq -0x20(%rbp), %rdi
callq 0x4630
cmpl $0x0, %eax
je 0x44cc
jmp 0x4581
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jg 0x44f4
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x4513
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jle 0x4513
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq $0x0, 0x8(%rax)
jmp 0x4576
movq -0x28(%rbp), %rax
movq (%rax), %rcx
subq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
subq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jge 0x4574
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
addq $0xf4240, %rcx          # imm = 0xF4240
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rcx
subq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x4576
jmp 0x4578
movl $0x0, -0x4(%rbp)
jmp 0x4594
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_timer.c
// Function: events_timer_get
int
events_timer_get(struct eventrec ** r)
{
	struct timeval tnow;
	struct timerrec * t;

	/* If we have no queue, we have no timers; return NULL. */
	if (Q == NULL) {
		*r = NULL;
		goto done;
	}

	/* Get current time. */
	if (monoclock_get(&tnow))
		goto err0;

	/* Get an expired timer, if there is one. */
	t = timerqueue_getptr(Q, &tnow);

	/* If there is an expired timer... */
	if (t != NULL) {
		/* ... pass back the eventrec and free the timer. */
		*r = t->r;
		free(t);
	} else {
		/* Otherwise, return NULL. */
		*r = NULL;
	}

done:
	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, 0x19f7c(%rip)     # 0x1e530
jne 0x45c3
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0x4614
leaq -0x20(%rbp), %rdi
callq 0x4630
cmpl $0x0, %eax
je 0x45d3
jmp 0x461d
movq 0x19f56(%rip), %rdi     # 0x1e530
leaq -0x20(%rbp), %rsi
callq 0x7ff0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4607
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x2040
jmp 0x4612
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0x4614
movl $0x0, -0x4(%rbp)
jmp 0x4624
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/monoclock.c
// Function: monoclock_get
int
monoclock_get(struct timeval * tv)
{
#if defined(USE_MONOTONIC) || defined(USE_REALTIME)
	struct timespec tp;
#endif

#ifdef USE_MONOTONIC
	if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) {
		tv->tv_sec = tp.tv_sec;
		tv->tv_usec = (suseconds_t)(tp.tv_nsec / 1000);
	} else if ((errno != ENOSYS) && (errno != EINVAL)) {
		warnp("clock_gettime(CLOCK_MONOTONIC)");
		goto err0;
	} else
#endif
#ifdef USE_REALTIME
	if (clock_gettime(CLOCK_REALTIME, &tp) == 0) {
		tv->tv_sec = tp.tv_sec;
		tv->tv_usec = (suseconds_t)(tp.tv_nsec / 1000);
	} else {
		warnp("clock_gettime(CLOCK_REALTIME)");
		goto err0;
	}
#else
	if (gettimeofday(tv, NULL)) {
		warnp("gettimeofday");
		goto err0;
	}
#endif

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1, %edi
leaq -0x20(%rbp), %rsi
callq 0x2100
cmpl $0x0, %eax
jne 0x4678
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x4738
callq 0x20a0
cmpl $0x26, (%rax)
je 0x46c5
callq 0x20a0
cmpl $0x16, (%rax)
je 0x46c5
jmp 0x468e
callq 0x20a0
cmpl $0x0, (%rax)
je 0x46b3
leaq 0x5c51(%rip), %rdi      # 0xa2f0
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x46c1
leaq 0x5c36(%rip), %rdi      # 0xa2f0
movb $0x0, %al
callq 0x6810
jmp 0x46c3
jmp 0x4741
xorl %edi, %edi
leaq -0x20(%rbp), %rsi
callq 0x2100
cmpl $0x0, %eax
jne 0x46fb
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x4734
jmp 0x46fd
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4722
leaq 0x5c01(%rip), %rdi      # 0xa30f
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4730
leaq 0x5be6(%rip), %rdi      # 0xa30f
movb $0x0, %al
callq 0x6810
jmp 0x4732
jmp 0x4741
jmp 0x4736
jmp 0x4738
movl $0x0, -0x4(%rbp)
jmp 0x4748
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/monoclock.c
// Function: monoclock_get_cputime
int
monoclock_get_cputime(struct timeval * tv)
{
	/* Use CLOCK_PROCESS_CPUTIME_ID if available. */
#ifdef CLOCK_PROCESS_CPUTIME_ID
	struct timespec tp;

	if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp) == 0) {
		tv->tv_sec = tp.tv_sec;
		tv->tv_usec = (suseconds_t)(tp.tv_nsec / 1000);
	} else if ((errno != ENOSYS) && (errno != EINVAL)) {
		warnp("clock_gettime(CLOCK_PROCESS_CPUTIME_ID)");
		goto err0;
	} else
#endif
	/* Fall back to monoclock_get(). */
	if (monoclock_get(tv))
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x2, %edi
leaq -0x20(%rbp), %rsi
callq 0x2100
cmpl $0x0, %eax
jne 0x47a5
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x4806
callq 0x20a0
cmpl $0x26, (%rax)
je 0x47f2
callq 0x20a0
cmpl $0x16, (%rax)
je 0x47f2
jmp 0x47bb
callq 0x20a0
cmpl $0x0, (%rax)
je 0x47e0
leaq 0x5b61(%rip), %rdi      # 0xa32d
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x47ee
leaq 0x5b46(%rip), %rdi      # 0xa32d
movb $0x0, %al
callq 0x6810
jmp 0x47f0
jmp 0x480f
movq -0x10(%rbp), %rdi
callq 0x4630
cmpl $0x0, %eax
je 0x4802
jmp 0x480f
jmp 0x4804
jmp 0x4806
movl $0x0, -0x4(%rbp)
jmp 0x4816
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/monoclock.c
// Function: monoclock_getres
int
monoclock_getres(double * resd)
{
#if defined(USE_MONOTONIC) || defined(USE_REALTIME)
	struct timespec res;
#endif

#ifdef USE_MONOTONIC
	if (clock_getres(CLOCK_MONOTONIC, &res) == 0) {
		/* Convert clock resolution to a double. */
		*resd = (double)res.tv_sec + (double)res.tv_nsec * 0.000000001;
	} else if ((errno != ENOSYS) && (errno != EINVAL)) {
		warnp("clock_getres(CLOCK_MONOTONIC)");
		goto err0;
	} else
#endif
#ifdef USE_REALTIME
	if (clock_getres(CLOCK_REALTIME, &res) == 0) {
		/* Convert clock resolution to a double. */
		*resd = (double)res.tv_sec + (double)res.tv_nsec * 0.000000001;
	} else {
		warnp("clock_getres(CLOCK_REALTIME)");
		goto err0;
	}
#else
	/*
	 * We'll be using gettimeofday().  There is no standard way of getting
	 * the resolution of this clock, but it seems safe to assume that it
	 * ticks at a minimum rate of CLOCKS_PER_SEC Hz (even though that is
	 * defined in relation to the measurement of processor time usage, not
	 * wallclock time); on non-broken systems we'll be relying on
	 * clock_gettime and clock_getres anyway.
	 */
	*resd = 1.0 / CLOCKS_PER_SEC;
#endif

	/* Success! */
	return (0);

#if defined(USE_MONOTONIC) || defined(USE_REALTIME)
err0:
	/* Failure! */
	return (-1);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1, %edi
leaq -0x20(%rbp), %rsi
callq 0x2250
cmpl $0x0, %eax
jne 0x4868
cvtsi2sdq -0x20(%rbp), %xmm1
cvtsi2sdq -0x18(%rbp), %xmm0
movsd 0x5a95(%rip), %xmm2     # 0xa2e8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x4928
callq 0x20a0
cmpl $0x26, (%rax)
je 0x48b5
callq 0x20a0
cmpl $0x16, (%rax)
je 0x48b5
jmp 0x487e
callq 0x20a0
cmpl $0x0, (%rax)
je 0x48a3
leaq 0x5ac6(%rip), %rdi      # 0xa355
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x48b1
leaq 0x5aab(%rip), %rdi      # 0xa355
movb $0x0, %al
callq 0x6810
jmp 0x48b3
jmp 0x4931
xorl %edi, %edi
leaq -0x20(%rbp), %rsi
callq 0x2250
cmpl $0x0, %eax
jne 0x48eb
cvtsi2sdq -0x20(%rbp), %xmm1
cvtsi2sdq -0x18(%rbp), %xmm0
movsd 0x5a0f(%rip), %xmm2     # 0xa2e8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x4924
jmp 0x48ed
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4912
leaq 0x5a75(%rip), %rdi      # 0xa373
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4920
leaq 0x5a5a(%rip), %rdi      # 0xa373
movb $0x0, %al
callq 0x6810
jmp 0x4922
jmp 0x4931
jmp 0x4926
jmp 0x4928
movl $0x0, -0x4(%rbp)
jmp 0x4938
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock.c
// Function: sock_resolve_unix
static struct sock_addr **
sock_resolve_unix(const char * addr)
{
	struct sock_addr ** sas;
	struct sock_addr * sa;
	struct sockaddr_un * sa_un;

	/* Allocate and populate a sockaddr_un structure. */
	if ((sa_un = calloc(1, sizeof(struct sockaddr_un))) == NULL)
		goto err0;
	sa_un->sun_family = AF_UNIX;

	/* Safely copy addr into the structure. */
	if (strlen(addr) >= sizeof(sa_un->sun_path)) {
		warn0("socket path too long: %s", addr);
		goto err1;
	}
	strcpy(sa_un->sun_path, addr);

	/* Allocate and populate our wrapper. */
	if ((sa = malloc(sizeof(struct sock_addr))) == NULL)
		goto err1;
	sa->ai_family = AF_UNIX;
	sa->ai_socktype = SOCK_STREAM;
	sa->name = (struct sockaddr *)sa_un;
	sa->namelen = sizeof(struct sockaddr_un);

	/* Allocate and populate an array of pointers. */
	if ((sas = malloc(2 * sizeof(struct sock_addr *))) == NULL)
		goto err2;
	sas[0] = sa;
	sas[1] = NULL;

	/* Success! */
	return (sas);

err2:
	free(sa);
err1:
	free(sa_un);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1, %edi
movl $0x6e, %esi
callq 0x21e0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x4c2a
jmp 0x4d02
movq -0x28(%rbp), %rax
movw $0x1, (%rax)
movq -0x10(%rbp), %rdi
callq 0x2120
cmpq $0x6c, %rax
jb 0x4c66
jmp 0x4c44
movq -0x10(%rbp), %rsi
leaq 0x5983(%rip), %rdi      # 0xa5d2
movb $0x0, %al
callq 0x6810
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4cf9
movq -0x28(%rbp), %rdi
addq $0x2, %rdi
movq -0x10(%rbp), %rsi
callq 0x20c0
movl $0x18, %edi
callq 0x2240
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x4c8d
jmp 0x4cf9
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x6e, 0x10(%rax)
movl $0x10, %edi
callq 0x2240
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x4ccf
jmp 0x4cf0
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4d0a
movq -0x20(%rbp), %rdi
callq 0x2040
movq -0x28(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/parsenum.h
// Function: parsenum_signed
static inline intmax_t
parsenum_signed(const char * s, intmax_t min, intmax_t max, int base,
    int trailing)
{
	char * eptr;
	intmax_t val;

	/* Sanity check. */
	assert(s != NULL);

	val = strtoimax(s, &eptr, base);
	if (eptr == s || (!trailing && (*eptr != '\0')))
		errno = EINVAL;
	else if ((val < min) || (val > max)) {
		errno = ERANGE;
		val = 0;
	}
	return (val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x4fe4
jmp 0x5003
leaq 0x56ae(%rip), %rdi      # 0xa699
leaq 0x56b1(%rip), %rsi      # 0xa6a3
movl $0xa7, %edx
leaq 0x56c4(%rip), %rcx      # 0xa6c2
callq 0x2180
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq -0x28(%rbp), %rsi
callq 0x2050
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x5033
cmpl $0x0, -0x20(%rbp)
jne 0x5040
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x5040
callq 0x20a0
movl $0x16, (%rax)
jmp 0x5069
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jl 0x5054
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jle 0x5067
callq 0x20a0
movl $0x22, (%rax)
movq $0x0, -0x30(%rbp)
jmp 0x5069
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/parsenum.h
// Function: parsenum_unsigned
static inline uintmax_t
parsenum_unsigned(const char * s, uintmax_t min, uintmax_t max,
    uintmax_t typemax, int base, int trailing)
{
	char * eptr;
	uintmax_t val;

	/* Sanity check. */
	assert(s != NULL);

	val = strtoumax(s, &eptr, base);
	if (eptr == s || (!trailing && (*eptr != '\0')))
		errno = EINVAL;
	else if ((val < min) || (val > max) || (val > typemax))
		errno = ERANGE;
	return (val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x50a9
jmp 0x50c8
leaq 0x55e9(%rip), %rdi      # 0xa699
leaq 0x55ec(%rip), %rsi      # 0xa6a3
movl $0xbb, %edx
leaq 0x5644(%rip), %rcx      # 0xa707
callq 0x2180
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq -0x30(%rbp), %rsi
callq 0x22c0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x50f8
cmpl $0x0, -0x28(%rbp)
jne 0x5105
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x5105
callq 0x20a0
movl $0x16, (%rax)
jmp 0x5130
movq -0x38(%rbp), %rax
cmpq -0x10(%rbp), %rax
jb 0x5123
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0x5123
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x512e
callq 0x20a0
movl $0x22, (%rax)
jmp 0x5130
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock.c
// Function: sock_resolve_ipv6
static struct sock_addr **
sock_resolve_ipv6(const char * addr, in_port_t p)
{
	struct sock_addr ** sas;
	struct sock_addr * sa;
	struct sockaddr_in6 * sin6;

	/* Allocate and populate a sockaddr_in6 structure. */
	if ((sin6 = calloc(1, sizeof(struct sockaddr_in6))) == NULL)
		goto err0;
	sin6->sin6_family = AF_INET6;
	sin6->sin6_port = htons(p);
	if (inet_pton(AF_INET6, addr, &sin6->sin6_addr) != 1) {
		warn0("Error parsing IP address: %s", addr);
		goto err1;
	}

	/* Allocate and populate our wrapper. */
	if ((sa = malloc(sizeof(struct sock_addr))) == NULL)
		goto err1;
	sa->ai_family = AF_INET6;
	sa->ai_socktype = SOCK_STREAM;
	sa->name = (struct sockaddr *)sin6;
	sa->namelen = sizeof(struct sockaddr_in6);

	/* Allocate and populate an array of pointers. */
	if ((sas = malloc(2 * sizeof(struct sock_addr *))) == NULL)
		goto err2;
	sas[0] = sa;
	sas[1] = NULL;

	/* Success! */
	return (sas);

err2:
	free(sa);
err1:
	free(sin6);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movl $0x1, %edi
movl $0x1c, %esi
callq 0x21e0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x5171
jmp 0x5258
movq -0x30(%rbp), %rax
movw $0xa, (%rax)
movzwl -0x12(%rbp), %edi
callq 0x2130
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0x8, %rdx
movl $0xa, %edi
callq 0x2220
cmpl $0x1, %eax
je 0x51cd
jmp 0x51ab
movq -0x10(%rbp), %rsi
leaq 0x55a6(%rip), %rdi      # 0xa75c
movb $0x0, %al
callq 0x6810
callq 0x20a0
movl $0x0, (%rax)
jmp 0x524f
movl $0x18, %edi
callq 0x2240
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x51e3
jmp 0x524f
movq -0x28(%rbp), %rax
movl $0xa, (%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movl $0x1c, 0x10(%rax)
movl $0x10, %edi
callq 0x2240
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5225
jmp 0x5246
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5260
movq -0x28(%rbp), %rdi
callq 0x2040
movq -0x30(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock.c
// Function: sock_resolve_ipv4
static struct sock_addr **
sock_resolve_ipv4(const char * addr, in_port_t p)
{
	struct sock_addr ** sas;
	struct sock_addr * sa;
	struct sockaddr_in * sin;

	/* Allocate and populate a sockaddr_in structure. */
	if ((sin = calloc(1, sizeof(struct sockaddr_in))) == NULL)
		goto err0;
	sin->sin_family = AF_INET;
	sin->sin_port = htons(p);
	if (inet_pton(AF_INET, addr, &sin->sin_addr) != 1) {
		warn0("Error parsing IP address: %s", addr);
		goto err1;
	}

	/* Allocate and populate our wrapper. */
	if ((sa = malloc(sizeof(struct sock_addr))) == NULL)
		goto err1;
	sa->ai_family = AF_INET;
	sa->ai_socktype = SOCK_STREAM;
	sa->name = (struct sockaddr *)sin;
	sa->namelen = sizeof(struct sockaddr_in);

	/* Allocate and populate an array of pointers. */
	if ((sas = malloc(2 * sizeof(struct sock_addr *))) == NULL)
		goto err2;
	sas[0] = sa;
	sas[1] = NULL;

	/* Success! */
	return (sas);

err2:
	free(sa);
err1:
	free(sin);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movl $0x1, %edi
movl $0x10, %esi
callq 0x21e0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x52a1
jmp 0x5388
movq -0x30(%rbp), %rax
movw $0x2, (%rax)
movzwl -0x12(%rbp), %edi
callq 0x2130
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0x4, %rdx
movl $0x2, %edi
callq 0x2220
cmpl $0x1, %eax
je 0x52fd
jmp 0x52db
movq -0x10(%rbp), %rsi
leaq 0x5476(%rip), %rdi      # 0xa75c
movb $0x0, %al
callq 0x6810
callq 0x20a0
movl $0x0, (%rax)
jmp 0x537f
movl $0x18, %edi
callq 0x2240
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x5313
jmp 0x537f
movq -0x28(%rbp), %rax
movl $0x2, (%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movl $0x10, 0x10(%rax)
movl $0x10, %edi
callq 0x2240
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5355
jmp 0x5376
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5390
movq -0x28(%rbp), %rdi
callq 0x2040
movq -0x30(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock.c
// Function: sock_resolve_one
struct sock_addr *
sock_resolve_one(const char * addr, int addport)
{
	struct sock_addr ** sas;
	struct sock_addr * sa;
	struct sock_addr ** sa_tmp;
	char * addr_alloc = NULL;

	/* Prepare the address to resolve. */
	if (addport &&
	    ((addr = addr_alloc = sock_addr_ensure_port(addr)) == NULL)) {
		warnp("sock_addr_ensure_port");
		goto err0;
	}

	/* Resolve target address. */
	if ((sas = sock_resolve(addr)) == NULL) {
		warnp("Error resolving socket address: %s", addr);
		goto err1;
	}

	/* Check that the array is not empty. */
	if (sas[0] == NULL) {
		warn0("No addresses found for %s", addr);
		goto err2;
	}

	/* If there's more than one address, give a warning. */
	if (sas[1] != NULL)
		warn0("Using the first of multiple addresses found for %s",
		    addr);

	/* Keep the address we want. */
	sa = sas[0];

	/* Free the other addresses and list. */
	for (sa_tmp = &sas[1]; *sa_tmp != NULL; sa_tmp++)
		sock_addr_free(*sa_tmp);
	free(sas);

	/* Clean up. */
	free(addr_alloc);

	/* Success! */
	return (sa);

err2:
	sock_addr_freelist(sas);
err1:
	free(addr_alloc);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x38(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x5410
movq -0x10(%rbp), %rdi
callq 0x6310
movq %rax, -0x38(%rbp)
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x5410
jmp 0x53d6
callq 0x20a0
cmpl $0x0, (%rax)
je 0x53fb
leaq 0x5085(%rip), %rdi      # 0xa46c
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x5409
leaq 0x506a(%rip), %rdi      # 0xa46c
movb $0x0, %al
callq 0x6810
jmp 0x540b
jmp 0x552a
movq -0x10(%rbp), %rdi
callq 0x4950
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5467
jmp 0x5425
callq 0x20a0
cmpl $0x0, (%rax)
je 0x544e
movq -0x10(%rbp), %rsi
leaq 0x5048(%rip), %rdi      # 0xa482
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x5460
movq -0x10(%rbp), %rsi
leaq 0x5029(%rip), %rdi      # 0xa482
movb $0x0, %al
callq 0x6810
jmp 0x5462
jmp 0x5521
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x5495
jmp 0x5473
movq -0x10(%rbp), %rsi
leaq 0x5027(%rip), %rdi      # 0xa4a5
movb $0x0, %al
callq 0x6810
callq 0x20a0
movl $0x0, (%rax)
jmp 0x5518
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x54c1
jmp 0x54a2
movq -0x10(%rbp), %rsi
leaq 0x5012(%rip), %rdi      # 0xa4bf
movb $0x0, %al
callq 0x6810
callq 0x20a0
movl $0x0, (%rax)
jmp 0x54c1
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x54fc
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0x5540
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0x54d8
movq -0x20(%rbp), %rdi
callq 0x2040
movq -0x38(%rbp), %rdi
callq 0x2040
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5532
movq -0x20(%rbp), %rdi
callq 0x5580
movq -0x38(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock.c
// Function: sock_addr_free
void
sock_addr_free(struct sock_addr * sa)
{

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

	/* Free the protocol-specific address structure and our struct. */
	free(sa->name);
	free(sa);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x5555
jmp 0x556b
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock.c
// Function: sock_addr_freelist
void
sock_addr_freelist(struct sock_addr ** sas)
{
	struct sock_addr ** p;

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

	/* Free structures until we hit NULL. */
	for (p = sas; *p != NULL; p++)
		sock_addr_free(*p);

	/* Free the list. */
	free(sas);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x5595
jmp 0x55ca
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x55c1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x5540
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x559d
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock.c
// Function: sock_connect
int
sock_connect(struct sock_addr * const * sas)
{
	int s = -1;

	/* Iterate through the addresses provided. */
	for (; sas[0] != NULL; sas++) {
		/* Create a socket. */
		if ((s = socket(sas[0]->ai_family,
		    sas[0]->ai_socktype, 0)) == -1)
			continue;

		/* Attempt to connect. */
		if (connect(s, sas[0]->name, sas[0]->namelen) == 0)
			break;

		/* Close the socket; this address didn't work. */
		if (close(s))
			warnp("close");
	}

	/* Did we manage to connect? */
	if (sas[0] == NULL) {
		warn0("Could not connect");
		goto err0;
	}

	/* Mark the socket as non-blocking. */
	if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) {
		warnp("Cannot make connection non-blocking");
		goto err1;
	}

	/* Success! */
	return (s);

err1:
	if (close(s))
		warnp("close");
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x58e2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x4(%rax), %esi
xorl %edx, %edx
callq 0x2380
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
jne 0x5865
jmp 0x58d1
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %edx
callq 0x2300
cmpl $0x0, %eax
jne 0x5889
jmp 0x58e2
movl -0x14(%rbp), %edi
callq 0x21a0
cmpl $0x0, %eax
je 0x58cf
jmp 0x5898
callq 0x20a0
cmpl $0x0, (%rax)
je 0x58bd
leaq 0x4ccd(%rip), %rdi      # 0xa576
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x58cb
leaq 0x4cb2(%rip), %rdi      # 0xa576
movb $0x0, %al
callq 0x6810
jmp 0x58cd
jmp 0x58cf
jmp 0x58d1
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x5833
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x590c
jmp 0x58ee
leaq 0x4c87(%rip), %rdi      # 0xa57c
movb $0x0, %al
callq 0x6810
callq 0x20a0
movl $0x0, (%rax)
jmp 0x59ae
movl -0x14(%rbp), %edi
movl $0x4, %esi
movl $0x800, %edx            # imm = 0x800
movb $0x0, %al
callq 0x20f0
cmpl $-0x1, %eax
jne 0x595e
jmp 0x5927
callq 0x20a0
cmpl $0x0, (%rax)
je 0x594c
leaq 0x4c56(%rip), %rdi      # 0xa58e
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x595a
leaq 0x4c3b(%rip), %rdi      # 0xa58e
movb $0x0, %al
callq 0x6810
jmp 0x595c
jmp 0x5966
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x59b5
movl -0x14(%rbp), %edi
callq 0x21a0
cmpl $0x0, %eax
je 0x59ac
jmp 0x5975
callq 0x20a0
cmpl $0x0, (%rax)
je 0x599a
leaq 0x4bf0(%rip), %rdi      # 0xa576
movb $0x0, %al
callq 0x65c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x59a8
leaq 0x4bd5(%rip), %rdi      # 0xa576
movb $0x0, %al
callq 0x6810
jmp 0x59aa
jmp 0x59ac
jmp 0x59ae
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/imalloc.h
// Function: imalloc
static inline void *
imalloc(size_t nrec, size_t reclen)
{

	/* Sanity check. */
	assert(reclen != 0);

	/* Handle cases where we don't allocate memory. */
	if (nrec == 0)
		return (NULL);
	if (nrec > SIZE_MAX / reclen) {
		errno = ENOMEM;
		return (NULL);
	}

	/* Allocate memory. */
	return (malloc(nrec * reclen));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5c79
jmp 0x5c98
leaq 0x49d1(%rip), %rdi      # 0xa651
leaq 0x49d6(%rip), %rsi      # 0xa65d
movl $0x13, %edx
leaq 0x49e8(%rip), %rcx      # 0xa67b
callq 0x2180
cmpq $0x0, -0x10(%rbp)
jne 0x5ca9
movq $0x0, -0x8(%rbp)
jmp 0x5cf3
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $-0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x18(%rbp)
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jbe 0x5ce1
callq 0x20a0
movl $0xc, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x5cf3
movq -0x10(%rbp), %rdi
imulq -0x18(%rbp), %rdi
callq 0x2240
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock_util.c
// Function: sock_addr_cmp
int
sock_addr_cmp(const struct sock_addr * sa1, const struct sock_addr * sa2)
{

	/* Family, socket type, and name length must match. */
	if ((sa1->ai_family != sa2->ai_family) ||
	    (sa1->ai_socktype != sa2->ai_socktype) ||
	    (sa1->namelen != sa2->namelen))
		return (1);

	/* The required length of the sockaddr must match. */
	if (memcmp(sa1->name, sa2->name, sa1->namelen) != 0)
		return (1);

	/* Everything matched. */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x5d3e
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x5d3e
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x5d47
movl $0x1, -0x4(%rbp)
jmp 0x5d7a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %edx
callq 0x21d0
cmpl $0x0, %eax
je 0x5d73
movl $0x1, -0x4(%rbp)
jmp 0x5d7a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock_util.c
// Function: sock_addr_dup
struct sock_addr *
sock_addr_dup(const struct sock_addr * sa)
{
	struct sock_addr * sa2;

	/* Allocate a struct sock_addr and copy fields. */
	if ((sa2 = malloc(sizeof(struct sock_addr))) == NULL)
		goto err0;
	sa2->ai_family = sa->ai_family;
	sa2->ai_socktype = sa->ai_socktype;
	sa2->namelen = sa->namelen;

	/* Allocate and copy the sockaddr. */
	if ((sa2->name = malloc(sa2->namelen)) == NULL)
		goto err1;
	memcpy(sa2->name, sa->name, sa2->namelen);

	/* Success! */
	return (sa2);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x18, %edi
callq 0x2240
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x5db2
jmp 0x5e29
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %edi
callq 0x2240
movq -0x18(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0x5df8
jmp 0x5e20
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %edx
callq 0x2200
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5e31
movq -0x18(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)