LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x17bc2(%rip)     # 0x1b520
je 0x39b5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27dc
testq %rax, %rax
je 0x39d6
movq %rax, %r14
movl $0x20, %edi
callq 0x2220
testq %rax, %rax
je 0x39ab
movq %rax, %rbx
movq %r14, (%rax)
movq %rax, %rsi
addq $0x10, %rsi
movups (%r15), %xmm0
movups %xmm0, 0x10(%rax)
movq %rsp, %rdi
callq 0x3a35
testl %eax, %eax
je 0x39e5
movq %rbx, %rdi
callq 0x2040
movq %r14, %rdi
callq 0x2856
jmp 0x39d6
callq 0x5dc0
movq %rax, 0x17b5f(%rip)     # 0x1b520
testq %rax, %rax
je 0x39d6
leaq 0x35(%rip), %rdi        # 0x3a02
callq 0x6bf0
testl %eax, %eax
je 0x3960
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x17b34(%rip), %rdi     # 0x1b520
movq %rsp, %rsi
movq %rbx, %rdx
callq 0x5e31
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x39d8
jmp 0x39a3
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3c38
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x3a81
movdqu (%r14), %xmm1
movdqu (%rbx), %xmm0
paddq %xmm1, %xmm0
movdqu %xmm0, (%rbx)
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movq %xmm1, %rcx
xorl %eax, %eax
cmpq $0xf4240, %rcx          # imm = 0xF4240
jl 0x3a81
paddq 0x3873(%rip), %xmm0     # 0x72f0
movdqu %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/events/events_timer.c
// Function: events_timer_register_double
void *
events_timer_register_double(int (* func)(void *), void * cookie,
    double timeo)
{
	struct timeval tv;

	/* Convert timeo to a struct timeval. */
	tv.tv_sec = (time_t)timeo;
	tv.tv_usec = (suseconds_t)((timeo - (double)tv.tv_sec) * 1000000.0);

	/* Schedule the timeout. */
	return (events_timer_register(func, cookie, &tv));
}

// Assembly:
subq $0x18, %rsp
cvttsd2si %xmm0, %rax
cvtsi2sd %rax, %xmm1
leaq 0x8(%rsp), %rdx
subsd %xmm1, %xmm0
mulsd 0x3858(%rip), %xmm0     # 0x7300
movq %rax, (%rdx)
cvttsd2si %xmm0, %rax
movq %rax, 0x8(%rdx)
callq 0x3944
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x179f1(%rip), %rdi     # 0x1b520
testq %rdi, %rdi
je 0x3b6e
callq 0x5eb3
testq %rax, %rax
je 0x3b6e
movq %rax, %r14
movl $0x10, %edi
callq 0x2220
movq %rax, (%rbx)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x3b77
movq %rsp, %rdi
callq 0x3c38
testl %eax, %eax
je 0x3b82
movq (%rbx), %rdi
callq 0x2040
jmp 0x3b77
movq $0x0, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq (%r14), %rax
subq (%rsp), %rax
jge 0x3b96
movq (%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
jmp 0x3b75
jne 0x3ba8
movq 0x8(%rsp), %rdx
movq 0x8(%r14), %rcx
cmpq %rcx, %rdx
jg 0x3b8b
jmp 0x3bb1
movq 0x8(%r14), %rcx
movq 0x8(%rsp), %rdx
subq %rdx, %rcx
movq (%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rdx)
movq 0x8(%r14), %rsi
xorl %ebp, %ebp
cmpq 0x8(%rsp), %rsi
jge 0x3b77
addq $0xf4240, %rcx          # imm = 0xF4240
movq %rcx, 0x8(%rdx)
decq %rax
movq %rax, (%rdx)
jmp 0x3b77
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rsi
movl $0x1, %edi
callq 0x2100
testl %eax, %eax
je 0x3c8b
callq 0x2090
movq %rax, %r14
movl (%rax), %eax
testl %eax, %eax
je 0x3cb7
cmpl $0x16, %eax
je 0x3c6c
cmpl $0x26, %eax
jne 0x3cc0
xorl %ebp, %ebp
movq %rsp, %rsi
xorl %edi, %edi
callq 0x2100
testl %eax, %eax
je 0x3cd7
cmpl $0x0, (%r14)
je 0x3d01
leaq 0x36a6(%rip), %rdi      # 0x732f
jmp 0x3cc7
movq (%rsp), %rax
movq %rax, (%rbx)
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x8(%rsp)
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, 0x8(%rbx)
xorl %ebp, %ebp
jmp 0x3d14
leaq 0x3652(%rip), %rdi      # 0x7310
jmp 0x3d08
leaq 0x3649(%rip), %rdi      # 0x7310
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%r14)
jmp 0x3d0f
movq (%rsp), %rax
movq %rax, (%rbx)
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x8(%rsp)
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, 0x8(%rbx)
jmp 0x3d14
leaq 0x3627(%rip), %rdi      # 0x732f
xorl %eax, %eax
callq 0x5017
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
movl $0x2, %edi
callq 0x2100
testl %eax, %eax
je 0x3d62
callq 0x2090
movq %rax, %r14
movl (%rax), %eax
testl %eax, %eax
je 0x3d8f
cmpl $0x16, %eax
je 0x3d54
cmpl $0x26, %eax
jne 0x3d9f
movq %rbx, %rdi
callq 0x3c38
testl %eax, %eax
jne 0x3db4
jmp 0x3d8b
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x10(%rsp)
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, 0x8(%rbx)
xorl %eax, %eax
jmp 0x3db9
leaq 0x35b7(%rip), %rdi      # 0x734d
xorl %eax, %eax
callq 0x5017
jmp 0x3db4
leaq 0x35a7(%rip), %rdi      # 0x734d
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%r14)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
movl $0x1, %edi
callq 0x2230
testl %eax, %eax
je 0x3e14
callq 0x2090
movq %rax, %rbx
movl (%rax), %eax
testl %eax, %eax
je 0x3e37
cmpl $0x16, %eax
je 0x3df6
cmpl $0x26, %eax
jne 0x3e40
leaq 0x8(%rsp), %rsi
xorl %edi, %edi
callq 0x2230
testl %eax, %eax
je 0x3e14
cmpl $0x0, (%rbx)
je 0x3e56
leaq 0x3581(%rip), %rdi      # 0x7393
jmp 0x3e47
cvtsi2sdq 0x8(%rsp), %xmm0
cvtsi2sdq 0x10(%rsp), %xmm1
mulsd 0x34de(%rip), %xmm1     # 0x7308
addsd %xmm0, %xmm1
movsd %xmm1, (%r14)
xorl %eax, %eax
jmp 0x3e69
leaq 0x3537(%rip), %rdi      # 0x7375
jmp 0x3e5d
leaq 0x352e(%rip), %rdi      # 0x7375
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%rbx)
jmp 0x3e64
leaq 0x3536(%rip), %rdi      # 0x7393
xorl %eax, %eax
callq 0x5017
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x426c
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rsi
movl $0xa, %edx
callq 0x2050
movq %rax, %rbx
movq (%r15), %rax
movl $0x16, %ebp
cmpq %r14, %rax
je 0x4257
cmpb $0x0, (%rax)
jne 0x4257
movq $-0x10000, %rax         # imm = 0xFFFF0000
movq %rbx, %rcx
addq %rax, %rcx
cmpq %rax, %rcx
ja 0x425e
movl $0x22, %ebp
xorl %ebx, %ebx
callq 0x2090
movl %ebp, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3393(%rip), %rdi      # 0x7606
leaq 0x3396(%rip), %rsi      # 0x7610
leaq 0x33ae(%rip), %rcx      # 0x762f
movl $0xa7, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x1, %edi
movl $0x1c, %esi
callq 0x21c0
testq %rax, %rax
je 0x4340
movq %rax, %rbx
rolw $0x8, %bp
movw $0xa, (%rax)
movw %bp, 0x2(%rax)
movq %rax, %rdx
addq $0x8, %rdx
movl $0xa, %edi
movq %r14, %rsi
callq 0x2200
cmpl $0x1, %eax
jne 0x431c
movl $0x18, %edi
callq 0x2220
testq %rax, %rax
je 0x4338
movq %rax, %r14
movabsq $0x10000000a, %rax      # imm = 0x10000000A
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
movl $0x1c, 0x10(%r14)
movl $0x10, %edi
callq 0x2220
testq %rax, %rax
je 0x4347
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
jmp 0x4342
leaq 0x3351(%rip), %rdi      # 0x7674
movq %r14, %rsi
xorl %eax, %eax
callq 0x5017
callq 0x2090
movl $0x0, (%rax)
movq %rbx, %rdi
callq 0x2040
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
callq 0x2040
jmp 0x4338
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x1, %edi
movl $0x10, %esi
callq 0x21c0
testq %rax, %rax
je 0x4406
movq %rax, %rbx
rolw $0x8, %bp
movw $0x2, (%rax)
movw %bp, 0x2(%rax)
movq %rax, %rdx
addq $0x4, %rdx
movl $0x2, %edi
movq %r14, %rsi
callq 0x2200
cmpl $0x1, %eax
jne 0x43e2
movl $0x18, %edi
callq 0x2220
testq %rax, %rax
je 0x43fe
movq %rax, %r14
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
movl $0x10, 0x10(%r14)
movl $0x10, %edi
callq 0x2220
testq %rax, %rax
je 0x440d
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
jmp 0x4408
leaq 0x328b(%rip), %rdi      # 0x7674
movq %r14, %rsi
xorl %eax, %eax
callq 0x5017
callq 0x2090
movl $0x0, (%rax)
movq %rbx, %rdi
callq 0x2040
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
callq 0x2040
jmp 0x43fe
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
testl %esi, %esi
je 0x4467
movq %r15, %rdi
callq 0x4d80
movq %rax, %r15
movq %rax, %rbx
testq %rax, %rax
jne 0x4469
callq 0x2090
cmpl $0x0, (%rax)
je 0x4557
movq %rax, %rbx
leaq 0x2fcf(%rip), %rdi      # 0x7421
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%rbx)
jmp 0x454a
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x3e74
testq %rax, %rax
je 0x44e1
movq %rax, %r12
movq (%rax), %r14
testq %r14, %r14
je 0x4508
movq 0x8(%r12), %r13
testq %r13, %r13
je 0x44cf
leaq 0x2fde(%rip), %rdi      # 0x7474
movq %r15, %rsi
xorl %eax, %eax
callq 0x5017
callq 0x2090
movl $0x0, (%rax)
movq %r12, %r15
addq $0x10, %r15
movq 0x8(%r13), %rdi
callq 0x2040
movq %r13, %rdi
callq 0x2040
movq (%r15), %r13
addq $0x8, %r15
testq %r13, %r13
jne 0x44b2
movq %r12, %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2040
jmp 0x454a
callq 0x2090
cmpl $0x0, (%rax)
je 0x452e
movq %rax, %r14
leaq 0x2f42(%rip), %rdi      # 0x7437
movq %r15, %rsi
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%r14)
jmp 0x453f
leaq 0x2f4b(%rip), %rdi      # 0x745a
movq %r15, %rsi
xorl %eax, %eax
callq 0x5017
callq 0x2090
movl $0x0, (%rax)
movq %r12, %rdi
callq 0x4586
jmp 0x453f
leaq 0x2f02(%rip), %rdi      # 0x7437
movq %r15, %rsi
xorl %eax, %eax
callq 0x5017
movq %rbx, %rdi
callq 0x2040
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2ec3(%rip), %rdi      # 0x7421
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x5017
jmp 0x454a
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x45c9
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x45bc
leaq 0x8(%rbx), %r15
movq 0x8(%r14), %rdi
callq 0x2040
movq %r14, %rdi
callq 0x2040
movq (%r15), %r14
addq $0x8, %r15
testq %r14, %r14
jne 0x459f
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2040
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock.c
// Function: sock_listener
int
sock_listener(const struct sock_addr * sa)
{
	int s;
	int val = 1;

	/* Create a socket. */
	if ((s = socket(sa->ai_family, sa->ai_socktype, 0)) == -1) {
		warnp("socket(%d, %d)", sa->ai_family, sa->ai_socktype);
		goto err0;
	}

	/* Attempt to set SO_REUSEADDR. */
	if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val))) {
		/* ENOPROTOOPT is ok. */
		if (errno != ENOPROTOOPT) {
			warnp("setsockopt(SO_REUSEADDR)");
			goto err1;
		}
	}

	/* Bind the socket. */
	if (bind(s, sa->name, sa->namelen)) {
		warnp("Error binding socket");
		goto err1;
	}

	/* Mark the socket as listening. */
	if (listen(s, 10)) {
		warnp("Error marking socket as listening");
		goto err1;
	}

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

	/* Success! */
	return (s);

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movl $0x1, 0xc(%rsp)
movl (%rdi), %edi
movl 0x4(%r14), %esi
xorl %edx, %edx
callq 0x2360
cmpl $-0x1, %eax
je 0x465a
movl %eax, %ebx
leaq 0xc(%rsp), %rcx
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x20e0
testl %eax, %eax
je 0x462d
callq 0x2090
movq %rax, %r15
movl (%rax), %eax
testl %eax, %eax
je 0x46d0
cmpl $0x5c, %eax
jne 0x46d9
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
movl %ebx, %edi
callq 0x2290
testl %eax, %eax
je 0x469c
callq 0x2090
cmpl $0x0, (%rax)
je 0x46f0
movq %rax, %r14
leaq 0x2e77(%rip), %rdi      # 0x74cf
jmp 0x46c0
callq 0x2090
cmpl $0x0, (%rax)
movl (%r14), %esi
movl 0x4(%r14), %edx
je 0x4684
movq %rax, %rbx
leaq 0x2e32(%rip), %rdi      # 0x74a7
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%rbx)
jmp 0x4692
leaq 0x2e1c(%rip), %rdi      # 0x74a7
xorl %eax, %eax
callq 0x5017
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x4777
movl %ebx, %edi
movl $0xa, %esi
callq 0x2250
testl %eax, %eax
je 0x46f9
callq 0x2090
cmpl $0x0, (%rax)
je 0x4727
movq %rax, %r14
leaq 0x2e24(%rip), %rdi      # 0x74e4
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%r14)
jmp 0x4735
leaq 0x2ddf(%rip), %rdi      # 0x74b6
jmp 0x472e
leaq 0x2dd6(%rip), %rdi      # 0x74b6
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%r15)
jmp 0x4735
leaq 0x2dd8(%rip), %rdi      # 0x74cf
jmp 0x472e
movl %ebx, %edi
movl $0x4, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x20f0
cmpl $-0x1, %eax
jne 0x4777
callq 0x2090
cmpl $0x0, (%rax)
je 0x4783
movq %rax, %r14
leaq 0x2de1(%rip), %rdi      # 0x7506
jmp 0x46c0
leaq 0x2db6(%rip), %rdi      # 0x74e4
xorl %eax, %eax
callq 0x5017
movl %ebx, %edi
callq 0x2180
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x4777
callq 0x2090
cmpl $0x0, (%rax)
je 0x4769
movq %rax, %r14
leaq 0x2dd2(%rip), %rdi      # 0x752b
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%r14)
jmp 0x4777
leaq 0x2dbb(%rip), %rdi      # 0x752b
xorl %eax, %eax
callq 0x5017
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2d7c(%rip), %rdi      # 0x7506
jmp 0x472e
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x480c
movq %rdi, %r14
leaq 0x2d88(%rip), %r15      # 0x752b
movl (%rax), %edi
movl 0x4(%rax), %esi
xorl %edx, %edx
callq 0x2360
cmpl $-0x1, %eax
je 0x47ff
movl %eax, %ebx
movq (%r14), %rax
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
movl %ebx, %edi
callq 0x22d0
testl %eax, %eax
je 0x4832
movl %ebx, %edi
callq 0x2180
testl %eax, %eax
je 0x47ff
callq 0x2090
cmpl $0x0, (%rax)
je 0x47f5
movq %rax, %rbx
movq %r15, %rdi
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%rbx)
jmp 0x47ff
movq %r15, %rdi
xorl %eax, %eax
callq 0x5017
movq 0x8(%r14), %rax
addq $0x8, %r14
testq %rax, %rax
jne 0x47a3
leaq 0x2d1e(%rip), %rdi      # 0x7531
xorl %eax, %eax
callq 0x5017
callq 0x2090
movl $0x0, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
cmpq $0x0, (%r14)
je 0x480c
movl %ebx, %edi
movl $0x4, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x20f0
cmpl $-0x1, %eax
jne 0x482a
callq 0x2090
movq %rax, %r14
cmpl $0x0, (%rax)
je 0x4874
leaq 0x2cdf(%rip), %rdi      # 0x7543
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%r14)
jmp 0x4882
leaq 0x2cc8(%rip), %rdi      # 0x7543
xorl %eax, %eax
callq 0x5017
movl %ebx, %edi
callq 0x2180
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x482a
cmpl $0x0, (%r14)
je 0x48b2
leaq 0x2c8c(%rip), %rdi      # 0x752b
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%r14)
jmp 0x482a
leaq 0x2c72(%rip), %rdi      # 0x752b
xorl %eax, %eax
callq 0x5017
jmp 0x482a
// File: /workspace/github_c_makefile_star2_O3/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:
movl (%rdi), %ecx
movl $0x1, %eax
cmpl (%rsi), %ecx
jne 0x4af2
movl 0x4(%rdi), %ecx
cmpl 0x4(%rsi), %ecx
jne 0x4af2
movl 0x10(%rdi), %edx
cmpl 0x10(%rsi), %edx
jne 0x4af2
pushq %rax
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
callq 0x2260
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x2220
testq %rax, %rax
je 0x4b45
movq %rax, %rbx
movq (%r14), %rax
movq %rax, (%rbx)
movl 0x10(%r14), %r15d
movl %r15d, 0x10(%rbx)
movq %r15, %rdi
callq 0x2220
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x4b3d
movq 0x8(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x21e0
jmp 0x4b47
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock_util.c
// Function: sock_addr_serialize
int
sock_addr_serialize(const struct sock_addr * sa,
    uint8_t ** buf, size_t * buflen)
{
	uint8_t * p;

	/* Compute buffer length and allocate buffer. */
	*buflen = 2 * sizeof(int) + sizeof(socklen_t) + sa->namelen;
	if ((p = *buf = malloc(*buflen)) == NULL)
		goto err0;

	/* Copy in data. */
	memcpy(p, &sa->ai_family, sizeof(int));
	p += sizeof(int);
	memcpy(p, &sa->ai_socktype, sizeof(int));
	p += sizeof(int);
	memcpy(p, &sa->namelen, sizeof(socklen_t));
	p += sizeof(socklen_t);
	memcpy(p, sa->name, sa->namelen);

	/* Success! */
	return (0);

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x10(%rdi), %edi
addq $0xc, %rdi
movq %rdi, (%rdx)
callq 0x2220
movq %rax, (%r14)
testq %rax, %rax
je 0x4bf3
movq (%rbx), %rcx
movq %rcx, (%rax)
movl 0x10(%rbx), %edx
movl %edx, 0x8(%rax)
addq $0xc, %rax
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x21e0
xorl %eax, %eax
jmp 0x4bf8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock_util.c
// Function: sock_addr_deserialize
struct sock_addr *
sock_addr_deserialize(const uint8_t * buf, size_t buflen)
{
	struct sock_addr * sa;

	/* Sanity check. */
	if (buflen < 2 * sizeof(int) + sizeof(socklen_t))
		goto err0;

	/* Allocate a structure and copy in fields. */
	if ((sa = malloc(sizeof(struct sock_addr))) == NULL)
		goto err0;
	memcpy(&sa->ai_family, buf, sizeof(int));
	buf += sizeof(int);
	memcpy(&sa->ai_socktype, buf, sizeof(int));
	buf += sizeof(int);
	memcpy(&sa->namelen, buf, sizeof(socklen_t));
	buf += sizeof(socklen_t);

	/* Allocate and copy the sockaddr. */
	if (buflen != 2 * sizeof(int) + sizeof(socklen_t) + sa->namelen)
		goto err1;
	if ((sa->name = malloc(sa->namelen)) == NULL)
		goto err1;
	memcpy(sa->name, buf, sa->namelen);

	/* Success! */
	return (sa);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpq $0xc, %rsi
jb 0x4c6a
movq %rsi, %r12
movq %rdi, %r14
movl $0x18, %edi
callq 0x2220
testq %rax, %rax
je 0x4c6a
movq %rax, %rbx
movq (%r14), %rax
movq %rax, (%rbx)
movl 0x8(%r14), %r15d
movl %r15d, 0x10(%rbx)
leaq 0xc(%r15), %rax
cmpq %r12, %rax
jne 0x4c62
movq %r15, %rdi
callq 0x2220
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x4c62
addq $0xc, %r14
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
jmp 0x4c6c
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock_util.c
// Function: sock_addr_prettyprint
char *
sock_addr_prettyprint(const struct sock_addr * sa)
{

	/* Handle different types of addresses differently. */
	switch (sa->ai_family) {
	case AF_INET:
		return (prettyprint_ipv4(sa->name, sa->namelen));
	case AF_INET6:
		return (prettyprint_ipv6(sa->name, sa->namelen));
	case AF_UNIX:
		return (prettyprint_unix((struct sockaddr_un *)(sa->name)));
	default:
		return (strdup("Unknown address"));
	}
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
movl (%rdi), %eax
cmpl $0x1, %eax
je 0x4d65
cmpl $0xa, %eax
je 0x4cf1
cmpl $0x2, %eax
jne 0x4d6f
cmpl $0x10, 0x10(%rdi)
jne 0x4d5a
movq 0x8(%rdi), %rax
movups (%rax), %xmm0
leaq 0x34(%rsp), %rsi
movaps %xmm0, -0x4(%rsi)
leaq 0x10(%rsp), %rdx
movl $0x2, %edi
movl $0x10, %ecx
callq 0x2030
testq %rax, %rax
je 0x4d5a
movzwl 0x32(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
leaq 0x2a65(%rip), %rsi      # 0x7748
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
jmp 0x4d47
cmpl $0x1c, 0x10(%rdi)
jne 0x4d5a
movq 0x8(%rdi), %rax
movups (%rax), %xmm0
movups 0xc(%rax), %xmm1
leaq 0x18(%rsp), %rsi
movups %xmm1, 0x4(%rsi)
movaps %xmm0, -0x8(%rsi)
leaq 0x30(%rsp), %rdx
movl $0xa, %edi
movl $0x2e, %ecx
callq 0x2030
testq %rax, %rax
je 0x4d5a
movzwl 0x12(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
leaq 0x2a0d(%rip), %rsi      # 0x7748
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
xorl %eax, %eax
callq 0x6474
cmpl $-0x1, %eax
je 0x4d5c
movq 0x8(%rsp), %rbx
jmp 0x4d5c
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
retq
movq 0x8(%rdi), %rdi
addq $0x2, %rdi
jmp 0x4d76
leaq 0x291b(%rip), %rdi      # 0x7691
addq $0x60, %rsp
popq %rbx
jmp 0x2300
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/util/sock_util.c
// Function: sock_addr_validate
int
sock_addr_validate(const char * addr)
{

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

	/* Check for an empty address. */
	if (strlen(addr) == 0) {
		warn0("Empty socket address.");
		goto err0;
	}

	/* If this isn't a UNIX socket address, check for a missing hostname. */
	if ((addr[0] != '/') && (addr[0] == ':')) {
		warn0("No host in \"%s\"", addr);
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x4e59
movq %rdi, %rsi
movzbl (%rdi), %ecx
cmpl $0x3a, %ecx
je 0x4e39
xorl %eax, %eax
testl %ecx, %ecx
jne 0x4e57
leaq 0x28f2(%rip), %rdi      # 0x7722
xorl %eax, %eax
callq 0x5017
jmp 0x4e47
leaq 0x28f8(%rip), %rdi      # 0x7738
xorl %eax, %eax
callq 0x5017
callq 0x2090
movl $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
leaq 0x2841(%rip), %rdi      # 0x76a1
leaq 0x2847(%rip), %rsi      # 0x76ae
leaq 0x288f(%rip), %rcx      # 0x76fd
movl $0x15e, %edx            # imm = 0x15E
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/util/warnp.c
// Function: warnp_setprogname
void
warnp_setprogname(const char * progname)
{
	const char * p;

	/* Free the name if we already have one. */
	free(name);

	/* Find the last segment of the program name. */
	for (p = progname; progname[0] != '\0'; progname++)
		if (progname[0] == '/')
			p = progname + 1;

	/* Copy the name string. */
	name = strdup(p);

	/* If we haven't already done so, register our exit handler. */
	if (initialized == 0) {
		atexit(warnp_atexit);
		initialized = 1;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x166a5(%rip), %rdi     # 0x1b528
callq 0x2040
leaq 0x1(%rbx), %rax
movzbl -0x1(%rax), %ecx
cmpl $0x2f, %ecx
je 0x4e9b
testl %ecx, %ecx
jne 0x4e9e
jmp 0x4ea3
movq %rax, %rbx
incq %rax
jmp 0x4e8c
movq %rbx, %rdi
callq 0x2300
movq %rax, 0x16676(%rip)     # 0x1b528
cmpb $0x0, 0x16677(%rip)     # 0x1b530
jne 0x4ece
leaq 0xe(%rip), %rdi         # 0x4ed0
callq 0x6bf0
movb $0x1, 0x16662(%rip)     # 0x1b530
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/util/warnp.c
// Function: libcperciva_warn
void
warn(const char * fmt, ...)
{
	va_list ap;
	char msgbuf[WARNP_SYSLOG_MAX_LINE + 1];
	int saved_errno;

	/* Save errno in case it gets clobbered. */
	saved_errno = errno;

	va_start(ap, fmt);
	if (use_syslog == 0) {
		/* Stop other threads writing to stderr. */
		flockfile(stderr);

		/* Print to stderr. */
		fprintf(stderr, "%s", (name != NULL) ? name : "(unknown)");
		if (fmt != NULL) {
			fprintf(stderr, ": ");
			vfprintf(stderr, fmt, ap);
		}
		fprintf(stderr, ": %s\n", strerror(saved_errno));

		/* Allow other threads to write to stderr. */
		funlockfile(stderr);
	} else {
		/* Print to syslog. */
		if (fmt != NULL) {
			/* No need to print "${name}: "; syslog does it. */
			vsnprintf(msgbuf, WARNP_SYSLOG_MAX_LINE + 1, fmt, ap);
			syslog(syslog_priority, "%s: %s\n", msgbuf,
			    strerror(saved_errno));
		} else
			syslog(syslog_priority, "%s\n", strerror(saved_errno));
	}
	va_end(ap);

	/* Restore saved errno. */
	errno = saved_errno;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x10d8, %rsp           # imm = 0x10D8
movq %rdi, %r14
leaq 0x20(%rsp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x4f5c
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)
callq 0x2090
movq %rax, %rbx
movl (%rax), %ebp
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
leaq 0x1100(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
cmpl $0x0, 0x165a7(%rip)     # 0x1b534
je 0x5008
testq %r14, %r14
je 0x4fd6
leaq 0xd0(%rsp), %r15
movq %rsp, %rcx
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
movq %r14, %rdx
callq 0x20d0
movl 0x64a2(%rip), %r14d     # 0xb458
movl %ebp, %edi
callq 0x2310
leaq 0x2799(%rip), %rsi      # 0x775d
movl %r14d, %edi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x2240
jmp 0x4ff8
movl 0x647b(%rip), %r14d     # 0xb458
movl %ebp, %edi
callq 0x2310
leaq 0x2776(%rip), %rsi      # 0x7761
movl %r14d, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2240
movl %ebp, (%rbx)
addq $0x10d8, %rsp           # imm = 0x10D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x2380
jmp 0x4ff8
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../libcperciva/util/warnp.c
// Function: libcperciva_warnx
void
warnx(const char * fmt, ...)
{
	va_list ap;
	char msgbuf[WARNP_SYSLOG_MAX_LINE + 1];
	int saved_errno;

	/* Save errno in case it gets clobbered. */
	saved_errno = errno;

	va_start(ap, fmt);
	if (use_syslog == 0) {
		/* Stop other threads writing to stderr. */
		flockfile(stderr);

		/* Print to stderr. */
		fprintf(stderr, "%s", (name != NULL) ? name : "(unknown)");
		if (fmt != NULL) {
			fprintf(stderr, ": ");
			vfprintf(stderr, fmt, ap);
		}
		fprintf(stderr, "\n");

		/* Allow other threads to write to stderr. */
		funlockfile(stderr);
	} else {
		/* Print to syslog. */
		if (fmt != NULL) {
			/* No need to print "${name}: "; syslog does it. */
			vsnprintf(msgbuf, WARNP_SYSLOG_MAX_LINE + 1, fmt, ap);
			syslog(syslog_priority, "%s\n", msgbuf);
		} else
			syslog(syslog_priority, "\n");
	}
	va_end(ap);

	/* Restore saved errno. */
	errno = saved_errno;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x10d8, %rsp           # imm = 0x10D8
movq %rdi, %r14
leaq 0x20(%rsp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x507b
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)
callq 0x2090
movq %rax, %rbx
movl (%rax), %ebp
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
leaq 0x1100(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
cmpl $0x0, 0x16488(%rip)     # 0x1b534
je 0x510b
testq %r14, %r14
je 0x50e7
leaq 0xd0(%rsp), %r15
movq %rsp, %rcx
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
movq %r14, %rdx
callq 0x20d0
movl 0x6384(%rip), %edi      # 0xb458
leaq 0x2686(%rip), %rsi      # 0x7761
movq %r15, %rdx
xorl %eax, %eax
callq 0x2240
jmp 0x50fb
movl 0x636b(%rip), %edi      # 0xb458
leaq 0x266f(%rip), %rsi      # 0x7763
xorl %eax, %eax
callq 0x2240
movl %ebp, (%rbx)
addq $0x10d8, %rsp           # imm = 0x10D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rsi
movq %r14, %rdi
callq 0x241c
jmp 0x50fb
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/serverpool/serverpool.c
// Function: addaddr
static int
addaddr(struct serverpool * P, struct sock_addr * sa)
{
	struct serverpool_addr SPA;
	struct serverpool_addr * SPAp;
	size_t i;

	/* Do we already have this address? */
	for (i = 0; i < serverpool_addrs_getsize(P->A); i++) {
		SPAp = serverpool_addrs_get(P->A, i);
		if (sock_addr_cmp(sa, SPAp->sa) == 0) {
			/* Update EOL and generation number. */
			if (monoclock_get(&SPAp->eol))
				goto err0;
			SPAp->eol.tv_sec += P->ttl;
			SPAp->generation = P->generation;

			/* All done. */
			goto done;
		}
	}

	/* Copy address. */
	if ((SPA.sa = sock_addr_dup(sa)) == NULL)
		goto err0;

	/* Record EOL. */
	if (monoclock_get(&SPA.eol))
		goto err1;
	SPA.eol.tv_sec += P->ttl;

	/* Record generation. */
	SPA.generation = P->generation;

	/* Add this structure to the array. */
	if (serverpool_addrs_append(P->A, &SPA, 1))
		goto err1;

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

err1:
	sock_addr_free(SPA.sa);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0x20, %esi
callq 0x5bca
testq %rax, %rax
je 0x559c
xorl %r15d, %r15d
movq (%rbx), %rdi
movl $0x20, %edx
movq %r15, %rsi
callq 0x5d0c
movq %rax, %r12
movq (%rax), %rsi
movq %r14, %rdi
callq 0x4abc
testl %eax, %eax
je 0x55f4
incq %r15
movq (%rbx), %rdi
movl $0x20, %esi
callq 0x5bca
cmpq %rax, %r15
jb 0x5565
movq %r14, %rdi
callq 0x4af3
movq %rax, (%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x561b
leaq 0x8(%rsp), %rdi
callq 0x3c38
testl %eax, %eax
jne 0x55e9
movq 0x28(%rbx), %rax
movq %rsp, %rsi
addq %rax, 0x8(%rsi)
movq 0x30(%rbx), %rax
movq %rax, 0x18(%rsi)
movq (%rbx), %rdi
movl $0x1, %edx
movl $0x20, %ecx
callq 0x5bd3
testl %eax, %eax
je 0x5619
movq (%rsp), %rdi
callq 0x456a
jmp 0x561b
leaq 0x8(%r12), %rdi
callq 0x3c38
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x561b
movq 0x28(%rbx), %rax
addq %rax, 0x8(%r12)
movq 0x30(%rbx), %rax
movq %rax, 0x18(%r12)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/serverpool/serverpool.c
// Function: callback_read_len
static int
callback_read_len(void * cookie, ssize_t readlen)
{
	struct serverpool * P = cookie;

	/* We should get -1 (error), 0 (EOF), or a size_t. */
	assert((readlen == -1) || (readlen == 0) ||
	    (readlen == sizeof(size_t)));

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

	/* Sanity-check. */
	if (P->addrlen > SSIZE_MAX)
		goto err1;

	/* An address length of 0 indicates the end of a generation. */
	if (P->addrlen == 0) {
		P->generation++;

		/* Remove expired addresses from the pool. */
		if (pruneaddrs(P))
			goto err0;

		/* Read another address length. */
		if ((P->read_cookie = network_read(P->s,
		    (uint8_t *)&P->addrlen, sizeof(size_t), sizeof(size_t),
		    callback_read_len, P)) == NULL)
			goto err1;
	} else {
		/* Allocate space to hold the address. */
		if ((P->addr = malloc(P->addrlen)) == NULL)
			goto err0;

		/* Read the address. */
		if ((P->read_cookie = network_read(P->s, P->addr, P->addrlen,
		    P->addrlen, callback_read_addr, P)) == NULL)
			goto err1;
	}

	/* Success! */
	return (0);

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

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $-0x1, %rsi
je 0x56e6
testq %rsi, %rsi
je 0x5688
cmpq $0x8, %rsi
jne 0x5722
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq 0x10(%rdi), %r15
testq %r15, %r15
js 0x56e6
je 0x56a3
movq %r15, %rdi
callq 0x2220
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x5717
movl 0x8(%rbx), %edi
leaq 0x2bf(%rip), %r8        # 0x593c
movq %rax, %rsi
movq %r15, %rdx
movq %r15, %rcx
jmp 0x56d1
leaq 0x2207(%rip), %rdi      # 0x7896
xorl %eax, %eax
callq 0x5017
callq 0x2090
movl $0x0, (%rax)
jmp 0x5717
incq 0x30(%rbx)
movq %rbx, %rdi
callq 0x57cb
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x571c
movl 0x8(%rbx), %edi
leaq -0x9a(%rip), %r8        # 0x562a
movl $0x8, %edx
movl $0x8, %ecx
movq %r14, %rsi
movq %rbx, %r9
callq 0x5f48
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x56e6
xorl %eax, %eax
jmp 0x571c
callq 0x2090
cmpl $0x0, (%rax)
je 0x5709
movq %rax, %rbx
leaq 0x209a(%rip), %rdi      # 0x7794
xorl %eax, %eax
callq 0x4ef8
movl $0x0, (%rbx)
jmp 0x5717
leaq 0x2084(%rip), %rdi      # 0x7794
xorl %eax, %eax
callq 0x5017
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2105(%rip), %rdi      # 0x782e
leaq 0x20a8(%rip), %rsi      # 0x77d8
leaq 0x2138(%rip), %rcx      # 0x786f
movl $0x9e, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/serverpool/serverpool.c
// Function: serverpool_pick
struct sock_addr *
serverpool_pick(struct serverpool * P)
{
	size_t i;

	/* Get rid of any expired addresses. */
	if (pruneaddrs(P))
		goto err0;

	/* We should always have at least one address at this point. */
	assert(serverpool_addrs_getsize(P->A) > 0);

	/* Pick a (non-cryptographically) random address. */
	i = (size_t)rand() % serverpool_addrs_getsize(P->A);

	/* Return a copy of the address. */
	return (sock_addr_dup(serverpool_addrs_get(P->A, i)->sa));

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x57cb
testl %eax, %eax
je 0x575b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%rbx), %rdi
movl $0x20, %esi
callq 0x5bca
testq %rax, %rax
je 0x57ac
callq 0x2340
movslq %eax, %r14
movq (%rbx), %rdi
movl $0x20, %esi
callq 0x5bca
movq %rax, %rcx
movq %r14, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
movq (%rbx), %rdi
movl $0x20, %edx
callq 0x5d0c
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4af3
leaq 0x2002(%rip), %rdi      # 0x77b5
leaq 0x201e(%rip), %rsi      # 0x77d8
leaq 0x2036(%rip), %rcx      # 0x77f7
movl $0x1bc, %edx            # imm = 0x1BC
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/liball/../lib/serverpool/serverpool.c
// Function: pruneaddrs
static int
pruneaddrs(struct serverpool * P)
{
	struct timeval tv;
	struct serverpool_addr * SPA;
	size_t i;

	/* We need to compare address EOLs against the current time. */
	if (monoclock_get(&tv))
		goto err0;

	/* Iterate through the pool. */
	for (i = 0; i < serverpool_addrs_getsize(P->A); i++) {
		SPA = serverpool_addrs_get(P->A, i);

		/*
		 * Keep anything from the current or immediately previous
		 * generation; we need both in case we're running just as
		 * we start reading addresses for a new generation.
		 */
		if ((SPA->generation == P->generation) ||
		    (SPA->generation == P->generation - 1))
			continue;

		/* Keep if the EOL hasn't expired. */
		if ((SPA->eol.tv_sec > tv.tv_sec) ||
		    ((SPA->eol.tv_sec == tv.tv_sec) &&
		     (SPA->eol.tv_usec > tv.tv_usec)))
			continue;

		/* Free this address. */
		sock_addr_free(SPA->sa);

		/* Replace this with the last structure. */
		memcpy(SPA, serverpool_addrs_get(P->A,
		    serverpool_addrs_getsize(P->A) - 1),
		    sizeof(struct serverpool_addr));

		/* Shrink the array (now that the last element has moved). */
		serverpool_addrs_shrink(P->A, 1);
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3c38
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x58b7
movq (%rbx), %rdi
movl $0x20, %esi
callq 0x5bca
testq %rax, %rax
je 0x58b5
xorl %r14d, %r14d
movq (%rbx), %rdi
movl $0x20, %edx
movq %r14, %rsi
callq 0x5d0c
movq %rax, %r15
movq 0x18(%rax), %rax
movq 0x30(%rbx), %rcx
cmpq %rcx, %rax
sete %dl
decq %rcx
cmpq %rcx, %rax
sete %al
orb %dl, %al
jne 0x589c
movq 0x8(%rsp), %rax
cmpq %rax, 0x8(%r15)
jg 0x589c
jne 0x5851
movq 0x10(%r15), %rax
cmpq 0x10(%rsp), %rax
jg 0x589c
movq (%r15), %rdi
callq 0x456a
movq (%rbx), %r12
movl $0x20, %esi
movq %r12, %rdi
callq 0x5bca
leaq -0x1(%rax), %rsi
movl $0x20, %edx
movq %r12, %rdi
callq 0x5d0c
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm0, (%r15)
movups %xmm1, 0x10(%r15)
movq (%rbx), %rdi
movl $0x1, %esi
movl $0x20, %edx
callq 0x5c77
incq %r14
movq (%rbx), %rdi
movl $0x20, %esi
callq 0x5bca
cmpq %rax, %r14
jb 0x580b
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq