LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/addrfunc.c
// Function: af_ai_deep_supported_ipv
int
af_ai_deep_supported_ipv(const struct addrinfo *ai_addr)
{
	const struct addrinfo *ai_iter;
	int ip4, ip6;

	ip4 = 0;
	ip6 = 0;

	for (ai_iter = ai_addr; ai_iter != NULL; ai_iter = ai_iter->ai_next) {
		switch (af_ai_supported_ipv(ai_iter)) {
		case 4:
			ip4 = 1;
			break;
		case 6:
			ip6 = 1;
			break;
		case 0:
			DEBUG_PRINTF("internal program error.");
			err(1, "Internal program error");
			break;
		}
	}

	if (ip4 && ip6)
		return (0);
	if (ip6)
		return (6);
	if (ip4)
		return (4);

	return (-1);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x26d7
xorl %eax, %eax
movl $0x6, %ecx
movl $0x4, %edx
leaq 0x7987(%rip), %rsi      # 0xa004
xorl %r8d, %r8d
movl 0x4(%rdi), %r9d
cmpl $0xa, %r9d
movl $0x0, %r10d
cmovel %ecx, %r10d
cmpl $0x2, %r9d
cmovel %edx, %r10d
movslq (%rsi,%r10,4), %r9
addq %rsi, %r9
jmpq *%r9
movl $0x1, %r8d
jmp 0x26b1
movl $0x1, %eax
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
jne 0x2680
xorl %ecx, %ecx
xorl %edx, %edx
testl %r8d, %r8d
setne %dl
movl $0x6, %esi
cmovnel %ecx, %esi
testl %eax, %eax
leal -0x1(%rdx,%rdx,4), %eax
cmovnel %esi, %eax
jmp 0x26dc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
leaq 0x793b(%rip), %rdi      # 0xa020
leaq 0x793f(%rip), %rcx      # 0xa02b
movl $0x84, %esi
movl $0x2, %edx
xorl %eax, %eax
callq 0x4ad6
leaq 0x793f(%rip), %rsi      # 0xa043
movl $0x1, %edi
xorl %eax, %eax
callq 0x2240
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/addrfunc.c
// Function: af_ai_is_dup
int
af_ai_is_dup(const struct addrinfo *ai_list, const struct addrinfo *ai)
{
	const struct addrinfo *ai_i;
	int res;

	res = 0;

	for (ai_i = ai_list; res == 0 && ai_i != ai && ai_i != NULL; ai_i = ai_i->ai_next) {
		if (af_ai_eq(ai_i, ai)) {
			res = 1;
		}
	}

	return (res);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
cmpq %rbx, %r14
je 0x275a
testq %r14, %r14
je 0x275a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x244c
movq 0x28(%r14), %r14
testl %eax, %eax
je 0x2736
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/addrfunc.c
// Function: af_copy_addr
int
af_copy_addr(const struct sockaddr_storage *a1, const struct sockaddr_storage *a2, int addr_source,
    int port_source, struct sockaddr_storage *res)
{
	const struct sockaddr_storage *sas;

	if (addr_source != 1 && addr_source != 2) {
		return (-1);
	}

	if (port_source != 1 && port_source != 2) {
		return (-1);
	}

	sas = (addr_source == 1 ? a1 : a2);
	memcpy(res, sas, sizeof(struct sockaddr_storage));

	if (addr_source == port_source) {
		return (0);
	}

	sas = (port_source == 1 ? a1 : a2);

	switch (sas->ss_family) {
	case AF_INET:
		((struct sockaddr_in *)res)->sin_port = ((struct sockaddr_in *)sas)->sin_port;
		break;
	case AF_INET6:
		((struct sockaddr_in6 *)res)->sin6_port = ((struct sockaddr_in6 *)sas)->sin6_port;
		break;
	default:
		DEBUG_PRINTF("Unknown sas family %d", sas->ss_family);
		errx(1, "Unknown sas family %d", sas->ss_family);

	}

	return (0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r10d
leal -0x3(%rdx), %eax
cmpl $-0x2, %eax
setb %al
leal -0x3(%r10), %ecx
cmpl $-0x2, %ecx
setb %cl
orb %al, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x27c4
movq %rsi, %rbx
movq %rdi, %r9
cmpl $0x1, %edx
cmoveq %rdi, %rsi
movl $0x10, %ecx
movq %r8, %rdi
rep  movsq (%rsi), %es:(%rdi)
xorl %eax, %eax
cmpl %r10d, %edx
je 0x27c4
cmpl $0x1, %r10d
cmoveq %r9, %rbx
movzwl (%rbx), %r9d
movl %r9d, %ecx
orl $0x8, %ecx
cmpl $0xa, %ecx
jne 0x27cc
movzwl 0x2(%rbx), %ecx
movw %cx, 0x2(%r8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x784d(%rip), %rdi      # 0xa020
leaq 0x7895(%rip), %r14      # 0xa06f
movl $0xff, %esi
movl $0x2, %edx
movq %r14, %rcx
movl %r9d, %r8d
xorl %eax, %eax
callq 0x4ad6
movzwl (%rbx), %edx
movl $0x1, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/addrfunc.c
// Function: af_sa_len
socklen_t
af_sa_len(const struct sockaddr *sa)
{
	socklen_t res;

	switch (sa->sa_family) {
	case AF_INET:
		res = sizeof(struct sockaddr_in);
		break;
	case AF_INET6:
		res = sizeof(struct sockaddr_in6);
		break;
	default:
		DEBUG_PRINTF("Internal program error");
		errx(1,"Internal program error");
		break;
	}

	return (res);
}

// Assembly:
movzwl (%rdi), %ecx
movl $0x10, %eax
cmpl $0x2, %ecx
je 0x2846
cmpl $0xa, %ecx
jne 0x2847
movl $0x1c, %eax
retq
pushq %rbx
leaq 0x77d1(%rip), %rdi      # 0xa020
leaq 0x77ed(%rip), %rbx      # 0xa043
movl $0x1ca, %esi            # imm = 0x1CA
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ad6
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/addrfunc.c
// Function: af_create_any_addr
void
af_create_any_addr(struct sockaddr *sa, int sa_family, uint16_t port)
{
	struct sockaddr_in sa_in;
	struct sockaddr_in6 sa_in6;

	switch (sa_family) {
	case PF_INET:
		memset(&sa_in, 0, sizeof(sa_in));
		sa_in.sin_family = sa_family;
		sa_in.sin_port = htons(port);
		sa_in.sin_addr.s_addr = INADDR_ANY;
		memcpy(sa, &sa_in, sizeof(sa_in));
		break;
	case PF_INET6:
		memset(&sa_in6, 0, sizeof(sa_in6));
		sa_in6.sin6_family = sa_family;
		sa_in6.sin6_port = htons(port);
		sa_in6.sin6_addr = in6addr_any;
		memcpy(sa, &sa_in6, sizeof(sa_in6));
		break;
	default:
		DEBUG_PRINTF("Unknown ai family %d", sa_family);
		errx(1, "Unknown ai family %d", sa_family);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpl $0xa, %esi
je 0x28aa
movl %esi, %ebx
cmpl $0x2, %esi
jne 0x28f7
rolw $0x8, %dx
movw $0x2, (%rdi)
movw %dx, 0x2(%rdi)
movl $0x0, 0x4(%rdi)
movq $0x0, 0x8(%rdi)
jmp 0x28ef
rolw $0x8, %dx
movq 0xc713(%rip), %rax      # 0xefc8
movl (%rax), %ecx
shlq $0x20, %rcx
movl 0xc(%rax), %esi
movl %esi, 0x10(%rsp)
movq 0x4(%rax), %rax
movq %rax, 0x8(%rsp)
movw $0xa, (%rdi)
movw %dx, 0x2(%rdi)
movq %rcx, 0x4(%rdi)
movq 0x8(%rsp), %rax
movq %rax, 0xc(%rdi)
movl 0x10(%rsp), %eax
movl %eax, 0x14(%rdi)
movl $0x0, 0x18(%rdi)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x7722(%rip), %rdi      # 0xa020
leaq 0x7755(%rip), %r14      # 0xa05a
movl $0x12c, %esi            # imm = 0x12C
movl $0x2, %edx
movq %r14, %rcx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x4ad6
movl $0x1, %edi
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/addrfunc.c
// Function: af_host_to_ai
struct addrinfo *
af_host_to_ai(const char *host_name, const char *port, int ip_ver)
{
	struct addrinfo ai_hints, *ai_res0, *ai_i;
	int error;
	char ai_s[LOGGING_SA_TO_STR_LEN];

	memset(&ai_hints, 0, sizeof(ai_hints));
	switch (ip_ver) {
	case 0:
		ai_hints.ai_family = PF_UNSPEC;
		break;
	case 4:
		ai_hints.ai_family = PF_INET;
		break;
	case 6:
		ai_hints.ai_family = PF_INET6;
		break;
	default:
		errx(1, "Unknown PF Family");
		/* NOTREACHED */
	}

	ai_hints.ai_socktype = SOCK_DGRAM;
	ai_hints.ai_protocol = IPPROTO_UDP;
	ai_hints.ai_flags = AI_PASSIVE;

	DEBUG_PRINTF("getaddrinfo for \"%s\" port %s ip_ver %d", host_name,
	    port, ip_ver);
	error = getaddrinfo(host_name, port, &ai_hints, &ai_res0);
	if (error != 0) {
		errx(1, "Can't get addr info for %s: %s", host_name, gai_strerror(error));
	}

	if (logging_get_verbose() >= LOGGING_LEVEL_DEBUG2) {
		for (ai_i = ai_res0; ai_i != NULL; ai_i = ai_i->ai_next) {
			logging_ai_to_str(ai_i, ai_s, sizeof(ai_s));
			DEBUG2_PRINTF("%s", ai_s);
		}
	}

	return (ai_res0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
testl %edx, %edx
je 0x2973
movl $0x2, %eax
cmpl $0x4, %edx
je 0x296f
cmpl $0x6, %edx
jne 0x2a63
movl $0xa, %eax
movl %eax, 0x14(%rsp)
movabsq $0x1100000002, %rax     # imm = 0x1100000002
leaq 0x10(%rsp), %r15
movq %rax, 0x8(%r15)
movl $0x1, (%r15)
movl %edx, (%rsp)
leaq 0x7689(%rip), %rdi      # 0xa020
leaq 0x76f9(%rip), %rcx      # 0xa097
movl $0x151, %esi            # imm = 0x151
movl $0x2, %edx
movq %rbx, %r8
movq %r14, %r9
xorl %eax, %eax
callq 0x4ad6
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2300
testl %eax, %eax
jne 0x2a43
callq 0x4a03
cmpl $0x3, %eax
setl %al
movq 0x8(%rsp), %rbx
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x2a31
leaq 0x40(%rsp), %r14
leaq 0x762e(%rip), %r15      # 0xa020
leaq 0x7cf5(%rip), %r12      # 0xa6ee
movq %rbx, %rdi
movq %r14, %rsi
movl $0x3e, %edx
callq 0x4990
movq %r15, %rdi
movl $0x15a, %esi            # imm = 0x15A
movl $0x3, %edx
movq %r12, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x4ad6
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
jne 0x29f9
movq 0x8(%rsp), %rbx
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x2130
leaq 0x766d(%rip), %rsi      # 0xa0be
movl $0x1, %edi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x20f0
leaq 0x761b(%rip), %rsi      # 0xa085
movl $0x1, %edi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/addrfunc.c
// Function: af_sa_to_any_addr
void
af_sa_to_any_addr(struct sockaddr *dest, const struct sockaddr *src)
{
	uint16_t port;

	switch (src->sa_family) {
	case PF_INET:
		port = ntohs(((struct sockaddr_in *)src)->sin_port);
		break;
	case PF_INET6:
		port = ntohs(((struct sockaddr_in6 *)src)->sin6_port);
		break;
	default:
		DEBUG_PRINTF("Unknown ai family %d", src->sa_family);
		errx(1, "Unknown ai family %d", src->sa_family);
	}

	af_create_any_addr(dest, src->sa_family, port);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movzwl (%rsi), %r8d
movl %r8d, %eax
orl $0x8, %eax
cmpl $0xa, %eax
jne 0x2cd8
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %edx
movl %r8d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2879
leaq 0x7341(%rip), %rdi      # 0xa020
leaq 0x7374(%rip), %r14      # 0xa05a
movl $0x226, %esi            # imm = 0x226
movl $0x2, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x4ad6
movzwl (%rbx), %edx
movl $0x1, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/aiifunc.c
// Function: aii_list_free
void
aii_list_free(struct aii_list *aii_list)
{
	struct ai_item *ai_item;
	struct ai_item *ai_item_next;

	ai_item = TAILQ_FIRST(aii_list);

	while (ai_item != NULL) {
		ai_item_next = TAILQ_NEXT(ai_item, entries);

		free(ai_item->host_name);
		free(ai_item);

		ai_item = ai_item_next;
	}

	TAILQ_INIT(aii_list);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x2d87
movq 0x80(%r14), %rdi
movq 0x88(%r14), %r15
callq 0x2040
movq %r14, %rdi
callq 0x2040
movq %r15, %r14
testq %r15, %r15
jne 0x2d64
movq $0x0, (%rbx)
movq %rbx, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/aiifunc.c
// Function: aii_list_ai_to_sa
void
aii_list_ai_to_sa(struct aii_list *aii_list, int ip_ver)
{
	struct sockaddr_storage tmp_sas;
	struct addrinfo *ai_i;
	struct ai_item *ai_item_i;
	char *hn;

	TAILQ_FOREACH(ai_item_i, aii_list, entries) {
		hn = (char *)malloc(strlen(ai_item_i->host_name) + 1);
		if (hn == NULL) {
			errx(1, "Can't alloc memory");
		}

		memcpy(hn, ai_item_i->host_name, strlen(ai_item_i->host_name) + 1);
		ai_item_i->host_name = hn;

		for (ai_i = ai_item_i->ai; ai_i != NULL; ai_i = ai_i->ai_next) {
			if (af_ai_supported_ipv(ai_i) == ip_ver) {
				memset(&tmp_sas, 0, sizeof(tmp_sas));

				memcpy(&tmp_sas, ai_i->ai_addr, ai_i->ai_addrlen);

				freeaddrinfo(ai_item_i->ai);

				memcpy(&ai_item_i->sas, &tmp_sas, sizeof(tmp_sas));
				break;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq (%rdi), %r14
testq %r14, %r14
je 0x2e75
movl %esi, %ebx
movq %rsp, %r15
movq 0x80(%r14), %r12
movq %r12, %rdi
callq 0x20e0
movq %rax, %r13
incq %r13
movq %r13, %rdi
callq 0x2250
testq %rax, %rax
je 0x2e87
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2200
movq %rbp, 0x80(%r14)
movq (%r14), %r12
testq %r12, %r12
je 0x2e65
movq %r12, %rdi
callq 0x2710
cmpl %ebx, %eax
je 0x2e13
movq 0x28(%r12), %r12
jmp 0x2dfb
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq 0x18(%r12), %rsi
movl 0x10(%r12), %edx
movq %r15, %rdi
callq 0x2200
movq (%r14), %rdi
callq 0x2330
movl $0x10, %ecx
movq %r14, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x88(%r14), %r14
testq %r14, %r14
jne 0x2dba
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7362(%rip), %rsi      # 0xa1f0
movl $0x1, %edi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/aiifunc.c
// Function: aii_ifa_local_to_ai
void
aii_ifa_local_to_ai(struct aii_list *aii_list, struct ai_item *ai_local,
    const struct ifaddrs *ifa_local, int ip_ver, struct ai_item *local_addr, int *single_addr)
{
	size_t addr_len;
	uint16_t port;

	switch (ifa_local->ifa_addr->sa_family) {
	case AF_INET:
		addr_len = sizeof(struct sockaddr_in);
		port = ((struct sockaddr_in *)&ai_local->sas)->sin_port;
		break;
	case AF_INET6:
		addr_len = sizeof(struct sockaddr_in6);
		port = ((struct sockaddr_in6 *)&ai_local->sas)->sin6_port;
		break;
	default:
		DEBUG_PRINTF("Internal program error");
		err(1, "Internal program error");
		break;
	}

	memcpy(&local_addr->sas, ifa_local->ifa_addr, addr_len);
	local_addr->host_name = strdup(ai_local->host_name);
	if (local_addr->host_name == NULL) {
		err(1, "Can't alloc memory");
		/* NOTREACHED */
	}

	switch (ifa_local->ifa_addr->sa_family) {
	case AF_INET:
		((struct sockaddr_in *)&local_addr->sas)->sin_port = port;
		break;
	case AF_INET6:
		((struct sockaddr_in6 *)&local_addr->sas)->sin6_port = port;
		break;
	default:
		DEBUG_PRINTF("Internal program error");
		err(1, "Internal program error");
		break;
	}

	*single_addr = (TAILQ_NEXT(TAILQ_FIRST(aii_list), entries) == NULL);

	if (!*single_addr) {
		TAILQ_REMOVE(aii_list, ai_local, entries);

		free(ai_local->host_name);
		free(ai_local);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdx), %rsi
movzwl (%rsi), %eax
movl $0x10, %edx
cmpl $0x2, %eax
je 0x3174
cmpl $0xa, %eax
jne 0x3230
movl $0x1c, %edx
movzwl 0x2(%rbx), %ebp
movq %r12, %rdi
callq 0x2200
movq 0x80(%rbx), %rdi
callq 0x2320
movq %rax, 0x80(%r12)
testq %rax, %rax
je 0x3222
movq 0x18(%r13), %rax
movzwl (%rax), %eax
orl $0x8, %eax
cmpl $0xa, %eax
jne 0x3245
movw %bp, 0x2(%r12)
movq (%r14), %rax
xorl %ecx, %ecx
cmpq $0x0, 0x88(%rax)
sete %cl
movl %ecx, (%r15)
je 0x3213
movq 0x88(%rbx), %rax
addq $0x8, %r14
leaq 0x90(%rax), %rcx
testq %rax, %rax
cmoveq %r14, %rcx
movq 0x90(%rbx), %rdx
movq %rdx, (%rcx)
movq %rax, (%rdx)
movq 0x80(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6fc7(%rip), %rsi      # 0xa1f0
movl $0x1, %edi
jmp 0x326f
leaq 0x6fd7(%rip), %rdi      # 0xa20e
leaq 0x6e05(%rip), %rbx      # 0xa043
movl $0xda, %esi
jmp 0x3258
leaq 0x6fc2(%rip), %rdi      # 0xa20e
leaq 0x6df0(%rip), %rbx      # 0xa043
movl $0xee, %esi
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ad6
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2240
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/aiifunc.c
// Function: aii_ipbc_to_ai
int
aii_ipbc_to_ai(struct ai_item *ipbc_addr, const char *ipbc_addr_s, const char *port_s,
    const struct ifaddrs *ifa_local)
{
	struct addrinfo *ai_res, *ai_i;
	char ifa_ipbc_addr_s[INET6_ADDRSTRLEN];
	int ip_ver;

	ip_ver = 4;

	if (ifa_local->ifa_broadaddr == NULL) {
		errx(1, "selected local interface isn't broadcast aware");
	}

	if (ipbc_addr_s == NULL) {
		af_sa_to_str(ifa_local->ifa_broadaddr, ifa_ipbc_addr_s);
		ipbc_addr_s = ifa_ipbc_addr_s;
	}

	ipbc_addr->host_name = (char *)malloc(strlen(ipbc_addr_s) + 1);
	if (ipbc_addr->host_name == NULL) {
		errx(1, "Can't alloc memory");
	}
	memcpy(ipbc_addr->host_name, ipbc_addr_s, strlen(ipbc_addr_s) + 1);

	ai_res = af_host_to_ai(ipbc_addr_s, port_s, ip_ver);

	for (ai_i = ai_res; ai_i != NULL; ai_i = ai_i->ai_next) {
		if (af_ai_supported_ipv(ai_i) == ip_ver) {
			memcpy(&ipbc_addr->sas, ai_i->ai_addr, ai_i->ai_addrlen);
			break;
		}
	}

	if (ai_i == NULL) {
		DEBUG_PRINTF("Internal program error");
		err(1, "Internal program error");
	}

	freeaddrinfo(ai_res);

	/*
	 * Test if interface broadcast addr is same as returned broadcast addr
	 */
	if (!af_sockaddr_eq(ifa_local->ifa_broadaddr, AF_CAST_SA(&ipbc_addr->sas))) {
		return (-1);
	}

	return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x28(%rcx), %rdi
testq %rdi, %rdi
je 0x3387
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
testq %rsi, %rsi
jne 0x32ac
movq %rsp, %r12
movq %r12, %rsi
callq 0x2d0c
movq %r12, %rdi
callq 0x20e0
leaq 0x1(%rax), %rdi
callq 0x2250
movq %rax, 0x80(%rbx)
testq %rax, %rax
je 0x3390
movq %rax, %r13
movq %r12, %rdi
callq 0x20e0
leaq 0x1(%rax), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x2200
movq %r12, %rdi
movq %r15, %rsi
movl $0x4, %edx
callq 0x292d
testq %rax, %rax
je 0x3319
movq %rax, %r15
movq %rax, %r12
movq %r12, %rdi
callq 0x2710
cmpl $0x4, %eax
je 0x334a
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x3302
leaq 0x6eee(%rip), %rdi      # 0xa20e
leaq 0x6d1c(%rip), %rbx      # 0xa043
movl $0x124, %esi            # imm = 0x124
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ad6
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2240
movq 0x18(%r12), %rsi
movl 0x10(%r12), %edx
movq %rbx, %rdi
callq 0x2200
movq %r15, %rdi
callq 0x2330
movq 0x28(%r14), %rdi
movq %rbx, %rsi
callq 0x2474
xorl %ecx, %ecx
cmpl $0x1, %eax
sbbl %ecx, %ecx
movl %ecx, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6f30(%rip), %rsi      # 0xa2be
jmp 0x3397
leaq 0x6e59(%rip), %rsi      # 0xa1f0
movl $0x1, %edi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/aiifunc.c
// Function: aii_mcast_to_ai
void
aii_mcast_to_ai(int ip_ver, struct ai_item *mcast_addr, const char *mcast_addr_s,
    const char *port_s)
{
	struct addrinfo *ai_res, *ai_i;

	if (mcast_addr_s == NULL) {
		switch (ip_ver) {
		case 4:
			mcast_addr_s = DEFAULT_MCAST4_ADDR;
			break;
		case 6:
			mcast_addr_s = DEFAULT_MCAST6_ADDR;
			break;
		default:
			DEBUG_PRINTF("Internal program error");
			err(1, "Internal program error");
			break;
		}
	}

	mcast_addr->host_name = (char *)malloc(strlen(mcast_addr_s) + 1);
	if (mcast_addr->host_name == NULL) {
		errx(1, "Can't alloc memory");
	}
	memcpy(mcast_addr->host_name, mcast_addr_s, strlen(mcast_addr_s) + 1);

	ai_res = af_host_to_ai(mcast_addr_s, port_s, ip_ver);

	for (ai_i = ai_res; ai_i != NULL; ai_i = ai_i->ai_next) {
		if (af_ai_supported_ipv(ai_i) == ip_ver) {
			memcpy(&mcast_addr->sas, ai_i->ai_addr, ai_i->ai_addrlen);
			break;
		}
	}

	if (ai_i == NULL) {
		DEBUG_PRINTF("Internal program error");
		err(1, "Internal program error");
	}

	freeaddrinfo(ai_res);

	/*
	 * Test if addr is really multicast
	 */
	if (!af_is_sa_mcast(AF_CAST_SA(&mcast_addr->sas))) {
		errx(1, "Given address %s is not valid multicast address", mcast_addr_s);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
testq %rdx, %rdx
jne 0x3415
cmpl $0x4, %ebp
je 0x340e
cmpl $0x6, %ebp
jne 0x3507
leaq 0x6ef0(%rip), %rbx      # 0xa2fc
jmp 0x3415
leaq 0x6ed8(%rip), %rbx      # 0xa2ed
movq %rbx, %rdi
callq 0x20e0
leaq 0x1(%rax), %rdi
callq 0x2250
movq %rax, 0x80(%r14)
testq %rax, %rax
je 0x34de
movq %rax, %r12
movq %rbx, %rdi
callq 0x20e0
leaq 0x1(%rax), %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2200
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x292d
testq %rax, %rax
je 0x347e
movq %rax, %r15
movq %rax, %r12
movq %r12, %rdi
callq 0x2710
cmpl %ebp, %eax
je 0x34af
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x3468
leaq 0x6d89(%rip), %rdi      # 0xa20e
leaq 0x6bb7(%rip), %rbx      # 0xa043
movl $0x16c, %esi            # imm = 0x16C
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ad6
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2240
movq 0x18(%r12), %rsi
movl 0x10(%r12), %edx
movq %r14, %rdi
callq 0x2200
movq %r15, %rdi
callq 0x2330
movq %r14, %rdi
callq 0x260b
testl %eax, %eax
je 0x34f1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6d0b(%rip), %rsi      # 0xa1f0
movl $0x1, %edi
xorl %eax, %eax
callq 0x20f0
leaq 0x6e14(%rip), %rsi      # 0xa30c
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x20f0
leaq 0x6d00(%rip), %rdi      # 0xa20e
leaq 0x6b2e(%rip), %rbx      # 0xa043
movl $0x156, %esi            # imm = 0x156
jmp 0x3491
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/aiifunc.c
// Function: aii_parse_remote_addrs
int
aii_parse_remote_addrs(struct aii_list *aii_list, int argc, char * const argv[], const char *port,
    int ip_ver)
{
	struct addrinfo *ai_res;
	struct ai_item *ai_item;
	int no_ai;
	int i;

	no_ai = 0;

	for (i = 0; i < argc; i++) {
		ai_res = af_host_to_ai(argv[i], port, ip_ver);
		if (!aii_is_ai_in_list(ai_res, aii_list)) {
			if (af_ai_deep_is_loopback(ai_res)) {
				errx(1,"Address %s looks like loopback. Loopback ping is not "
				    "supported", argv[i]);
			}

			if (af_ai_deep_is_mcast(ai_res)) {
				errx(1,"Address %s looks like multicast. To set multicast address "
				    "use -m parameter", argv[i]);
			}

			ai_item = (struct ai_item *)malloc(sizeof(struct ai_item));
			if (ai_item == NULL) {
				errx(1, "Can't alloc memory");
			}

			memset(ai_item, 0, sizeof(struct ai_item));
			ai_item->ai = ai_res;
			ai_item->host_name = argv[i];

			TAILQ_INSERT_TAIL(aii_list, ai_item, entries);
			DEBUG_PRINTF("new address \"%s\" added to list (position %d)", argv[i],
			    no_ai);
			no_ai++;
		} else {
			freeaddrinfo(ai_res);
		}
	}

	return (no_ai);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0x4(%rsp)
movq %rcx, 0x10(%rsp)
testl %esi, %esi
jle 0x363c
movq %rdx, %rbx
movq %rdi, %r15
movl %esi, %eax
movq %rax, 0x8(%rsp)
xorl %r14d, %r14d
xorl %r12d, %r12d
movq (%rbx,%r14,8), %rdi
movq 0x10(%rsp), %rsi
movl 0x4(%rsp), %edx
callq 0x292d
movq %rax, %r13
movq (%r15), %rbp
testq %rbp, %rbp
je 0x358c
movq (%rbp), %rsi
movq %r13, %rdi
callq 0x24ca
testl %eax, %eax
jne 0x3624
movq 0x88(%rbp), %rbp
jmp 0x356a
movq %r13, %rdi
callq 0x251e
testl %eax, %eax
jne 0x3671
movq %r13, %rdi
callq 0x25d6
testl %eax, %eax
jne 0x3664
movl $0x1, %edi
movl $0x98, %esi
callq 0x2190
testq %rax, %rax
je 0x3651
movq %r13, (%rax)
movq (%rbx,%r14,8), %rcx
movq %rcx, 0x80(%rax)
movq %rax, %rcx
addq $0x88, %rcx
movq $0x0, 0x88(%rax)
movq 0x8(%r15), %rdx
movq %rdx, 0x90(%rax)
movq %rax, (%rdx)
movq %rcx, 0x8(%r15)
movq (%rbx,%r14,8), %r8
leaq 0x6c0a(%rip), %rdi      # 0xa20e
movl $0x1a2, %esi            # imm = 0x1A2
movl $0x2, %edx
leaq 0x6db1(%rip), %rcx      # 0xa3c6
movl %r12d, %r9d
xorl %eax, %eax
callq 0x4ad6
incl %r12d
jmp 0x362c
movq %r13, %rdi
callq 0x2330
incq %r14
cmpq 0x8(%rsp), %r14
jne 0x3552
jmp 0x363f
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6b98(%rip), %rsi      # 0xa1f0
movl $0x1, %edi
xorl %eax, %eax
callq 0x20f0
movq (%rbx,%r14,8), %rdx
leaq 0x6d0c(%rip), %rsi      # 0xa37b
jmp 0x367c
movq (%rbx,%r14,8), %rdx
leaq 0x6cc0(%rip), %rsi      # 0xa33c
movl $0x1, %edi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/cliprint.c
// Function: cliprint_final_remote_version
void
cliprint_final_remote_version(const struct rh_list *remote_hosts, int host_name_len)
{
	struct rh_item *rh_item;
	struct rh_item_ci *ci;
	size_t i;
	unsigned char ch;

	printf("\n");

	TAILQ_FOREACH(rh_item, remote_hosts, entries) {
			ci = &rh_item->client_info;

			printf("%-*s : ", host_name_len, rh_item->addr->host_name);

			if (ci->server_info_len == 0) {
				printf("response message not received\n");
			} else {
				for (i = 0; i < ci->server_info_len; i++) {
					ch = ci->server_info[i];

				if (ch >= ' ' && ch < 0x7f && ch != '\\') {
					fputc(ch, stdout);
				} else {
					if (ch == '\\') {
						printf("\\\\");
					} else {
						printf("\\x%02X", ch);
					}
				}
			}

			printf("\n");
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0xa, %edi
callq 0x2050
movq (%r14), %rbp
testq %rbp, %rbp
je 0x43ef
movq 0xac7a(%rip), %r15      # 0xefc0
leaq 0x679a(%rip), %r12      # 0xaae7
leaq 0x6796(%rip), %r13      # 0xaaea
movq (%rbp), %rax
movq 0x80(%rax), %rdx
leaq 0x6692(%rip), %rdi      # 0xa9f8
movl %ebx, %esi
xorl %eax, %eax
callq 0x2100
cmpq $0x0, 0x68(%rbp)
je 0x43d3
xorl %r14d, %r14d
movq 0x48(%rbp), %rax
movzbl (%rax,%r14), %eax
cmpl $0x5c, %eax
sete %cl
leal -0x20(%rax), %edx
cmpb $0x5f, %dl
setae %dl
orb %cl, %dl
jne 0x43a1
movq (%r15), %rsi
movl %eax, %edi
callq 0x2170
jmp 0x43be
cmpl $0x5c, %eax
jne 0x43b2
movq %r12, %rdi
xorl %eax, %eax
callq 0x2100
jmp 0x43be
movq %r13, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x2100
incq %r14
cmpq 0x68(%rbp), %r14
jb 0x4379
movl $0xa, %edi
callq 0x2050
jmp 0x43df
leaq 0x68e5(%rip), %rdi      # 0xacbf
callq 0x2090
movq 0x138(%rbp), %rbp
testq %rbp, %rbp
jne 0x4354
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/cliprint.c
// Function: cliprint_packet_stats
void
cliprint_packet_stats(const char *host_name, int host_name_len, uint32_t seq, int is_dup,
    size_t msg_len, int dist_set, uint8_t dist, int rtt_set, double rtt, double avg_rtt, int loss,
    enum sf_cast_type cast_type, int cont_stat)
{
	const char *cast_str;

	cast_str = sf_cast_type_to_str(cast_type);

	printf("%-*s : ", host_name_len, host_name);
	printf("%5scast, ", cast_str);
	printf("seq=%"PRIu32, seq);

	if (is_dup) {
		printf(" (dup)");
	}

	printf(", ");
	printf("size=%zu bytes", msg_len);

	if (dist_set) {
		printf(", dist=%"PRIu8, dist);
	}

	if (rtt_set) {
		printf(", time=%.3fms", rtt);
	}

	if (cont_stat) {
		printf(" (");

		if (rtt_set) {
			printf("%.3f avg, ", avg_rtt);
		}

		printf("%d%% loss)", loss);
	}

	printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x20(%rsp)
movl %r9d, 0x10(%rsp)
movq %r8, %r14
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
movl 0x80(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x70(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x68(%rsp), %eax
movl %eax, 0x14(%rsp)
movb 0x60(%rsp), %al
movb %al, 0x7(%rsp)
movl 0x78(%rsp), %edi
callq 0x7e37
movq %rax, %rbp
leaq 0x6312(%rip), %rdi      # 0xa9f8
movl %r13d, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2100
leaq 0x6421(%rip), %rdi      # 0xab1b
movq %rbp, %rsi
xorl %eax, %eax
callq 0x2100
leaq 0x647c(%rip), %rdi      # 0xab87
movl %r12d, %esi
xorl %eax, %eax
callq 0x2100
testl %r15d, %r15d
je 0x4728
leaq 0x646d(%rip), %rdi      # 0xab8e
xorl %eax, %eax
callq 0x2100
leaq 0x6498(%rip), %rdi      # 0xabc7
xorl %eax, %eax
callq 0x2100
leaq 0x6458(%rip), %rdi      # 0xab95
movq %r14, %rsi
xorl %eax, %eax
callq 0x2100
cmpl $0x0, 0x10(%rsp)
je 0x4761
movzbl 0x7(%rsp), %esi
leaq 0x644a(%rip), %rdi      # 0xaba4
xorl %eax, %eax
callq 0x2100
cmpl $0x0, 0x14(%rsp)
je 0x47a7
leaq 0x643f(%rip), %rdi      # 0xabae
movsd 0x20(%rsp), %xmm0
movb $0x1, %al
callq 0x2100
cmpl $0x0, 0x8(%rsp)
je 0x47ce
leaq 0x6432(%rip), %rdi      # 0xabbc
xorl %eax, %eax
callq 0x2100
leaq 0x6427(%rip), %rdi      # 0xabbf
movsd 0x18(%rsp), %xmm0
movb $0x1, %al
callq 0x2100
jmp 0x47bc
cmpl $0x0, 0x8(%rsp)
je 0x47ce
leaq 0x6407(%rip), %rdi      # 0xabbc
xorl %eax, %eax
callq 0x2100
leaq 0x6407(%rip), %rdi      # 0xabca
movl 0xc(%rsp), %esi
xorl %eax, %eax
callq 0x2100
movl $0xa, %edi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/clisig.c
// Function: clisig_register_handlers
void
clisig_register_handlers(void)
{
	struct sigaction act;

	act.sa_handler = sigint_handler;
	sigemptyset(&act.sa_mask);
	act.sa_flags = 0;

	sigaction(SIGINT, &act, NULL);

	act.sa_handler = siginfo_handler;
#ifdef SIGINFO
	sigaction(SIGINFO, &act, NULL);
#endif
	sigaction(SIGUSR1, &act, NULL);
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
leaq 0x51(%rip), %rax        # 0x48a4
leaq 0x10(%rsp), %rbx
movq %rax, -0x8(%rbx)
movq %rbx, %rdi
callq 0x21d0
movl $0x0, 0x80(%rbx)
leaq 0x8(%rsp), %rbx
movl $0x2, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x20a0
leaq 0x20(%rip), %rax        # 0x48a9
movq %rax, (%rbx)
movl $0xa, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x20a0
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/clistate.c
// Function: clistate_request_exit
void
clistate_request_exit(void)
{

	exit_requested++;
	DEBUG2_PRINTF("Exit requested %d times", exit_requested);

	if (exit_requested > MAX_EXIT_REQUESTS) {
		signal(SIGINT, SIG_DFL);
		kill(getpid(), SIGINT);
	}
}

// Assembly:
pushq %rax
movl 0xa8e0(%rip), %r8d      # 0xf1bc
incl %r8d
movl %r8d, 0xa8d6(%rip)      # 0xf1bc
leaq 0x6410(%rip), %rdi      # 0xacfd
leaq 0x6414(%rip), %rcx      # 0xad08
movl $0x5d, %esi
movl $0x3, %edx
xorl %eax, %eax
callq 0x4ad6
cmpl $0x3, 0xa8b0(%rip)      # 0xf1bc
jl 0x492c
movl $0x2, %edi
xorl %esi, %esi
callq 0x21b0
callq 0x20d0
movl %eax, %edi
movl $0x2, %esi
popq %rax
jmp 0x2210
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/logging.c
// Function: logging_hexdump
int
logging_hexdump(const char *file_name, int line, int log_level, const char *prefix_str,
    const void *data, size_t data_len)
{
	size_t i;
	int res;
	uint8_t u8;

	res = 0;

	if (logging_get_verbose() >= log_level) {
		if (logging_get_verbose() >= LOGGING_LEVEL_DEBUG) {
			res += fprintf(stderr, "%s:%d ", file_name, line);
		}

		if (prefix_str != NULL) {
			res += fprintf(stderr, "%s", prefix_str);
		}

		for (i = 0; i < data_len; i++)	{
			u8 = ((const unsigned char *)data)[i];

			res += fprintf(stderr, "%02"PRIX8, u8);
		}
		res += fprintf(stderr, "\n");
	}

	return (res);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %esi, %ecx
movl 0xa7a4(%rip), %esi      # 0xf1c4
xorl %eax, %eax
cmpl %edx, %esi
jge 0x4a35
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r9, %rbx
movq %r8, %r14
xorl %ebp, %ebp
cmpl $0x2, %esi
jl 0x4a62
movq %rdi, %r8
movq 0xa5ac(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x62ca(%rip), %rsi      # 0xad20
movq %r8, %rdx
xorl %eax, %eax
callq 0x21c0
movl %eax, %ebp
testq %r15, %r15
je 0x4a84
movq 0xa58a(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x5c76(%rip), %rsi      # 0xa6ee
movq %r15, %rdx
xorl %eax, %eax
callq 0x21c0
addl %eax, %ebp
testq %rbx, %rbx
je 0x4ab7
movq 0xa568(%rip), %r12      # 0xeff8
leaq 0x6055(%rip), %r15      # 0xaaec
xorl %r13d, %r13d
movzbl (%r14,%r13), %edx
movq (%r12), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x21c0
addl %eax, %ebp
incq %r13
cmpq %r13, %rbx
jne 0x4a9a
movq 0xa53a(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x61e6(%rip), %rsi      # 0xacae
xorl %eax, %eax
callq 0x21c0
addl %ebp, %eax
jmp 0x4a26
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/logging.c
// Function: logging_printf
int
logging_printf(const char *file_name, int line, int log_level, const char *format, ...)
{
	va_list ap;
	int res;

	res = 0;

	if (logging_verbose >= log_level) {
		va_start(ap, format);
		if (logging_verbose >= LOGGING_LEVEL_DEBUG) {
			res += fprintf(stderr, "%s:%d ", file_name, line);
		}
		res += vfprintf(stderr, format, ap);
		res += fprintf(stderr, "\n");
		va_end(ap);
	}

	return (res);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rcx, %rbx
movl %esi, %ecx
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x4b2b
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)
movl 0xa693(%rip), %esi      # 0xf1c4
xorl %eax, %eax
cmpl %edx, %esi
jge 0x4b43
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%rsp)
xorl %ebp, %ebp
cmpl $0x2, %esi
jl 0x4b8f
movq %rdi, %r10
movq 0xa47f(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x619d(%rip), %rsi      # 0xad20
movq %r10, %rdx
xorl %eax, %eax
callq 0x21c0
movl %eax, %ebp
movq 0xa462(%rip), %r14      # 0xeff8
movq (%r14), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x22d0
movl %eax, %ebx
addl %ebp, %ebx
movq (%r14), %rdi
leaq 0x60fc(%rip), %rsi      # 0xacae
xorl %eax, %eax
callq 0x21c0
addl %ebx, %eax
jmp 0x4b37
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/msg.c
// Function: msg_answer_create
size_t
msg_answer_create(const char *orig_msg, size_t orig_msg_len, char *new_msg, size_t new_msg_len,
    uint8_t ttl, int server_tstamp)
{
	struct tlv_iterator tlv_iter;
	enum tlv_opt_type opt_type;
	size_t pos;

	pos = 0;

	new_msg[pos++] = (unsigned char)MSG_TYPE_ANSWER;

	memset(&tlv_iter, 0, sizeof(tlv_iter));
	tlv_iter_init(orig_msg, orig_msg_len, &tlv_iter);

	while (tlv_iter_next(&tlv_iter) != -1) {
		opt_type = tlv_iter_get_type(&tlv_iter);
		if (opt_type != TLV_OPT_TYPE_SERVER_INFO &&
		    opt_type != TLV_OPT_TYPE_MCAST_PREFIX &&
		    opt_type != TLV_OPT_TYPE_SES_ID &&
		    opt_type != TLV_OPT_TYPE_TTL &&
		    opt_type != TLV_OPT_TYPE_SERVER_TSTAMP) {
			tlv_iter_item_copy(&tlv_iter, new_msg, new_msg_len, &pos);
		}
	}

	if (tlv_add_ttl(new_msg, new_msg_len, &pos, ttl) == -1)
		goto small_buf_err;

	if (server_tstamp) {
		if (tlv_add_server_tstamp(new_msg, new_msg_len, &pos) == -1)
			goto small_buf_err;
	}

	return (pos);

small_buf_err:
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebp
movl %r8d, %r15d
movq %rcx, %rbx
movq %rdx, %r14
movq $0x1, 0x8(%rsp)
movb $0x41, (%rdx)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movaps %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movq %r12, %rdx
callq 0x8a23
movq %r12, %rdi
callq 0x8b06
cmpl $-0x1, %eax
je 0x4c56
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r12, %rdi
callq 0x8a10
leal -0x9(%rax), %ecx
cmpl $0x4, %ecx
jb 0x4c49
cmpl $0x6, %eax
je 0x4c49
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x8a33
movq %r12, %rdi
callq 0x8b06
cmpl $-0x1, %eax
jne 0x4c23
movzbl %r15b, %ecx
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x89bc
cmpl $-0x1, %eax
je 0x4c8f
testl %ebp, %ebp
je 0x4c88
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8972
cmpl $-0x1, %eax
je 0x4c8f
movq 0x8(%rsp), %rax
jmp 0x4c91
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/msg.c
// Function: msg_has_prefix
int
msg_has_prefix(const char *msg, size_t msg_len, const struct sockaddr_storage *mcast_addr)
{
	struct tlv_iterator tlv_iter;
	int has_prefix;

	has_prefix = 0;

	tlv_iter_init(msg, msg_len, &tlv_iter);
	while (tlv_iter_next(&tlv_iter) == 0) {
		if (tlv_iter_get_type(&tlv_iter) == TLV_OPT_TYPE_MCAST_PREFIX) {
			if (tlv_iter_pref_eq(&tlv_iter, mcast_addr)) {
				has_prefix = 1;

				break;
			}
		}
	}

	return (has_prefix);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdx
callq 0x8a23
movq %r14, %rdi
callq 0x8b06
xorl %ebp, %ebp
testl %eax, %eax
jne 0x5268
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x8a10
cmpl $0xa, %eax
jne 0x5255
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8b3d
testl %eax, %eax
jne 0x5263
movq %r14, %rdi
callq 0x8b06
testl %eax, %eax
je 0x5239
jmp 0x5268
movl $0x1, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/msg.c
// Function: msg_init_create
size_t
msg_init_create(char *msg, size_t msg_len, int req_si, const struct sockaddr_storage *mcast_addr,
    const char *client_id, size_t client_id_len)
{
	size_t pos;
	uint16_t u16;

	pos = 0;

	if (client_id == NULL) {
		return (0);
	}

	msg[pos++] = (unsigned char)MSG_TYPE_INIT;

	if (tlv_add_version(msg, msg_len, &pos) == -1)
		goto small_buf_err;

	if (tlv_add(msg, msg_len, &pos, TLV_OPT_TYPE_CLIENT_ID, client_id_len, client_id) == -1)
		goto small_buf_err;


	if (req_si) {
		u16 = TLV_OPT_TYPE_SERVER_INFO;

		if (tlv_add_opt_request(msg, msg_len, &pos, &u16, 1) == -1)
			goto small_buf_err;
	}


	if (tlv_add_mcast_prefix(msg, msg_len, &pos, mcast_addr) == -1)
		goto small_buf_err;

	return (pos);

small_buf_err:
	return (0);
}

// Assembly:
testq %r8, %r8
je 0x532e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r13
movq %r8, %r12
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rdx
movq $0x1, (%rdx)
movb $0x49, (%rdi)
callq 0x89d7
cmpl $-0x1, %eax
je 0x531d
movzwl %r13w, %r8d
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %ecx
movq %r12, %r9
callq 0x8664
cmpl $-0x1, %eax
je 0x531d
testl %ebp, %ebp
je 0x52fe
leaq 0x16(%rsp), %rcx
movw $0x6, (%rcx)
leaq 0x8(%rsp), %rdx
movl $0x1, %r8d
movq %r15, %rdi
movq %r14, %rsi
callq 0x88a6
cmpl $-0x1, %eax
je 0x531d
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x8893
cmpl $-0x1, %eax
je 0x531d
movq 0x8(%rsp), %rax
jmp 0x531f
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/msg.c
// Function: msg_query_create
size_t
msg_query_create(char *msg, size_t msg_len, const struct sockaddr_storage *mcast_addr,
    uint32_t seq_num, int server_tstamp, const char *client_id, size_t client_id_len,
    const char *session_id, size_t session_id_len)
{
	size_t pos;
	uint16_t u16;

	pos = 0;

	msg[pos++] = (unsigned char)MSG_TYPE_QUERY;

	if (tlv_add_version(msg, msg_len, &pos) == -1)
		goto small_buf_err;

	if (client_id) {
		if (tlv_add(msg, msg_len, &pos, TLV_OPT_TYPE_CLIENT_ID, client_id_len,
		    client_id) == -1) {
			goto small_buf_err;
		}
	}

	if (tlv_add_seq_num(msg, msg_len, &pos, seq_num) == -1)
		goto small_buf_err;

	if (tlv_add_client_tstamp(msg, msg_len, &pos) == -1)
		goto small_buf_err;

	if (tlv_add_mcast_grp(msg, msg_len, &pos, mcast_addr) == -1)
		goto small_buf_err;

	if (server_tstamp) {
		u16 = TLV_OPT_TYPE_SERVER_TSTAMP;

		if (tlv_add_opt_request(msg, msg_len, &pos, &u16, 1) == -1)
			goto small_buf_err;
	}

	if (tlv_add(msg, msg_len, &pos, TLV_OPT_TYPE_SES_ID, session_id_len, session_id) == -1)
		goto small_buf_err;

	return (pos);

small_buf_err:
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r13
movl %r8d, %ebp
movl %ecx, %r12d
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %rdx
movq $0x1, (%rdx)
movb $0x51, (%rdi)
callq 0x89d7
cmpl $-0x1, %eax
je 0x543e
testq %r13, %r13
je 0x539d
movq 0x50(%rsp), %rax
movzwl %ax, %r8d
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
movq %r13, %r9
callq 0x8664
cmpl $-0x1, %eax
je 0x543e
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %ecx
callq 0x88fe
cmpl $-0x1, %eax
je 0x543e
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x873d
cmpl $-0x1, %eax
je 0x543e
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x8787
cmpl $-0x1, %eax
je 0x543e
testl %ebp, %ebp
je 0x540f
leaq 0x16(%rsp), %rcx
movw $0xc, (%rcx)
leaq 0x8(%rsp), %rdx
movl $0x1, %r8d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x88a6
cmpl $-0x1, %eax
je 0x543e
movq 0x60(%rsp), %rax
movq 0x58(%rsp), %r9
movzwl %ax, %r8d
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movl $0xb, %ecx
callq 0x8664
cmpl $-0x1, %eax
je 0x543e
movq 0x8(%rsp), %rax
jmp 0x5440
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/msg.c
// Function: msg_response_create
size_t
msg_response_create(char *msg, size_t msg_len, const struct msg_decoded *msg_decoded,
    int mcast_grp, int mcast_prefix, const struct sockaddr_storage *mcast_addr,
    const char *session_id, size_t session_id_len)
{
	size_t pos;

	pos = 0;

	msg[pos++] = (unsigned char)MSG_TYPE_RESPONSE;
	if (tlv_add_version(msg, msg_len, &pos) == -1)
		goto small_buf_err;

	if (msg_decoded->client_id) {
		if (tlv_add(msg, msg_len, &pos, TLV_OPT_TYPE_CLIENT_ID, msg_decoded->client_id_len,
		    msg_decoded->client_id) == -1)
			goto small_buf_err;
	}

	if (msg_decoded->seq_num_isset) {
		if (tlv_add_seq_num(msg, msg_len, &pos, msg_decoded->seq_num) == -1)
			goto small_buf_err;
	}

	if (mcast_grp) {
		if (tlv_add_mcast_grp(msg, msg_len, &pos, mcast_addr) == -1)
			goto small_buf_err;
	}

	if (msg_decoded->request_opt_server_info) {
		if (tlv_add_server_info(msg, msg_len, &pos, PROGRAM_SERVER_INFO) == -1)
			goto small_buf_err;
	}

	if (mcast_prefix) {
		if (tlv_add_mcast_prefix(msg, msg_len, &pos, mcast_addr) == -1)
			goto small_buf_err;
	}

	if (session_id) {
		if (tlv_add(msg, msg_len, &pos, TLV_OPT_TYPE_SES_ID, session_id_len,
		    session_id) == -1) {
			goto small_buf_err;
		}
	}

	return (pos);

small_buf_err:
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movl %r8d, %ebp
movl %ecx, %r13d
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rdx
movq $0x1, (%rdx)
movb $0x53, (%rdi)
callq 0x89d7
cmpl $-0x1, %eax
je 0x555f
movq 0x70(%r12), %r9
testq %r9, %r9
je 0x54b3
movzwl 0x28(%r12), %r8d
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq 0x8664
cmpl $-0x1, %eax
je 0x555f
cmpl $0x0, 0x64(%r12)
je 0x54d7
movl 0x50(%r12), %ecx
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x88fe
cmpl $-0x1, %eax
je 0x555f
testl %r13d, %r13d
je 0x54f2
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x8787
cmpl $-0x1, %eax
je 0x555f
cmpl $0x0, 0x5c(%r12)
je 0x5514
leaq 0x5942(%rip), %rcx      # 0xae43
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x891b
cmpl $-0x1, %eax
je 0x555f
testl %ebp, %ebp
je 0x552e
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x8893
cmpl $-0x1, %eax
je 0x555f
movq 0x40(%rsp), %r9
testq %r9, %r9
je 0x5559
movq 0x48(%rsp), %rax
movzwl %ax, %r8d
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
movl $0xb, %ecx
callq 0x8664
cmpl $-0x1, %eax
je 0x555f
movq (%rsp), %rax
jmp 0x5561
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/msg.c
// Function: msg_update_server_tstamp
int
msg_update_server_tstamp(char *msg, size_t msg_len)
{
	struct tlv_iterator tlv_iter;
	size_t pos;

	memset(&tlv_iter, 0, sizeof(tlv_iter));
	tlv_iter_init(msg, msg_len, &tlv_iter);

	while (tlv_iter_next(&tlv_iter) != -1) {
		if (tlv_iter_get_type(&tlv_iter) == TLV_OPT_TYPE_SERVER_TSTAMP) {
			pos = tlv_iter.pos;

			if (tlv_add_server_tstamp(msg, msg_len, &pos) == -1)
				goto add_tstamp_err;
		}
	}

	return (0);

add_tstamp_err:
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movq %r15, %rdx
callq 0x8a23
movq %r15, %rdi
callq 0x8b06
xorl %ebp, %ebp
cmpl $-0x1, %eax
je 0x55f5
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r15, %rdi
callq 0x8a10
cmpl $0xc, %eax
jne 0x55e1
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x8972
cmpl $-0x1, %eax
je 0x55f0
movq %r15, %rdi
callq 0x8b06
cmpl $-0x1, %eax
jne 0x55b7
jmp 0x55f5
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jfriesse[P]omping/msgsend.c
// Function: ms_answer
int
ms_answer(int ucast_socket, const struct sockaddr_storage *mcast_addr, const char *orig_msg,
    size_t orig_msg_len, const struct msg_decoded *decoded, const struct sockaddr_storage *to,
    uint8_t ttl, enum ms_answer_type answer_type)
{
	char addr_str[INET6_ADDRSTRLEN];
	char new_msg[MAX_MSG_SIZE];
	struct sockaddr_storage to_mcast;
	size_t new_msg_len;
	ssize_t sent;

	new_msg_len = msg_answer_create(orig_msg, orig_msg_len, new_msg, sizeof(new_msg),
	    ttl, decoded->request_opt_server_tstamp);

	if (new_msg_len == 0) {
		return (-4);
	}

	if (answer_type == MS_ANSWER_UCAST || answer_type == MS_ANSWER_BOTH) {
		af_sa_to_str(AF_CAST_SA(to), addr_str);
		DEBUG_PRINTF("Sending unicast answer msg to %s", addr_str);

		msg_update_server_tstamp(new_msg, new_msg_len);

		sent = rs_sendto(ucast_socket, new_msg, new_msg_len, to);

		if (sent < 0) {
			return (sent);
		}
	}

	if (answer_type == MS_ANSWER_MCAST || answer_type == MS_ANSWER_BOTH) {
		af_copy_addr(mcast_addr, to, 1, 2, &to_mcast);

		af_sa_to_str(AF_CAST_SA(&to_mcast), addr_str);
		DEBUG_PRINTF("Sending multicast answer msg to %s", addr_str);

		msg_update_server_tstamp(new_msg, new_msg_len);

		sent = rs_sendto(ucast_socket, new_msg, new_msg_len, &to_mcast);

		if (sent < 0) {
			return (sent);
		}
	}

	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x100b8, %rsp          # imm = 0x100B8
movq %r9, %r15
movq %rcx, %rax
movq %rdx, %r11
movq %rsi, %r12
movl %edi, %ebx
movzbl 0x100f0(%rsp), %r10d
movl 0x60(%r8), %r9d
leaq 0xb0(%rsp), %rdx
movl $0xffff, %ecx           # imm = 0xFFFF
movq %r11, %rdi
movq %rax, %rsi
movl %r10d, %r8d
callq 0x4bc8
testq %rax, %rax
je 0x574d
movq %rax, %r14
movl 0x100f8(%rsp), %ebp
movl %ebp, %eax
andl $-0x3, %eax
cmpl $0x1, %eax
jne 0x56c4
movq %rsp, %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x2d0c
leaq 0x57d3(%rip), %rdi      # 0xae50
leaq 0x57d6(%rip), %rcx      # 0xae5a
movl $0x43, %esi
movl $0x2, %edx
movq %r13, %r8
xorl %eax, %eax
callq 0x4ad6
leaq 0xb0(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x5570
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x761a
testq %rax, %rax
js 0x5752
andl $-0x2, %ebp
xorl %eax, %eax
cmpl $0x2, %ebp
jne 0x5752
leaq 0x30(%rsp), %r13
movq %r12, %rdi
movq %r15, %rsi
movl $0x1, %edx
movl $0x2, %ecx
movq %r13, %r8
callq 0x2762
movq %rsp, %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x2d0c
leaq 0x574c(%rip), %rdi      # 0xae50
leaq 0x5770(%rip), %rcx      # 0xae7b
movl $0x52, %esi
movl $0x2, %edx
movq %r15, %r8
xorl %eax, %eax
callq 0x4ad6
leaq 0xb0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x5570
movl %ebx, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x761a
movq %rax, %rcx
sarq $0x3f, %rax
andl %ecx, %eax
jmp 0x5752
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addq $0x100b8, %rsp          # imm = 0x100B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq