LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/sfset.c
// Function: sfset_buf_size
int
sfset_buf_size(int sock, int snd_buf, int buf_size, int *new_buf_size, int force_buf_size)
{
	const char *opt_name_s;
	socklen_t optlen;
	int opt_name;
	int res;
	int tmp_buf_size;

	if (snd_buf) {
		opt_name = SO_SNDBUF;
		opt_name_s = "SO_SNDBUF";
	} else {
		opt_name = SO_RCVBUF;
		opt_name_s = "SO_RCVBUF";
	}

	if (buf_size > 0) {
		res = setsockopt(sock, SOL_SOCKET, opt_name, &buf_size, sizeof(buf_size));

		if (res == -1) {
			DEBUG_PRINTF("setsockopt %s failed", opt_name_s);

			return (-1);
		}
	}

	if (new_buf_size == NULL && !force_buf_size) {
		return (0);
	}

	optlen = sizeof(tmp_buf_size);
	res = getsockopt(sock, SOL_SOCKET, opt_name, &tmp_buf_size, &optlen);

	if (res == -1) {
		DEBUG_PRINTF("getsockopt %s failed", opt_name_s);

		return (-1);
	}

	if (force_buf_size && tmp_buf_size < buf_size) {
		VERBOSE_PRINTF("Buffer size request was %u bytes, but only %u"
		    " bytes was allocated", buf_size, tmp_buf_size);
		errno = ENOBUFS;
		return (-1);
	}

	if (new_buf_size != NULL) {
		*new_buf_size = tmp_buf_size;
	}

	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebp
movq %rcx, %rbx
movl %edi, %r13d
movl %edx, 0x10(%rsp)
xorl %r12d, %r12d
testl %esi, %esi
sete %r12b
leaq 0x3f7f(%rip), %rax      # 0xb7e6
leaq 0x3f6e(%rip), %r14      # 0xb7dc
cmoveq %rax, %r14
addl $0x7, %r12d
testl %edx, %edx
jle 0x789a
leaq 0x10(%rsp), %rcx
movl %r13d, %edi
movl $0x1, %esi
movl %r12d, %edx
movl $0x4, %r8d
callq 0x20c0
cmpl $-0x1, %eax
je 0x7915
testq %rbx, %rbx
sete %al
testl %ebp, %ebp
sete %cl
xorl %r15d, %r15d
testb %cl, %al
jne 0x795f
leaq 0x14(%rsp), %r8
movl $0x4, (%r8)
leaq 0xc(%rsp), %rcx
movl %r13d, %edi
movl $0x1, %esi
movl %r12d, %edx
callq 0x2180
cmpl $-0x1, %eax
je 0x7937
testl %ebp, %ebp
je 0x792a
movl 0xc(%rsp), %r9d
movl 0x10(%rsp), %r8d
cmpl %r8d, %r9d
jge 0x792a
leaq 0x3f00(%rip), %rdi      # 0xb7f0
leaq 0x3f2b(%rip), %rcx      # 0xb822
movl $0x58, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x4ada
callq 0x2060
movl $0x69, (%rax)
jmp 0x7959
leaq 0x3ed4(%rip), %rdi      # 0xb7f0
leaq 0x3ed5(%rip), %rcx      # 0xb7f8
movl $0x43, %esi
jmp 0x794a
testq %rbx, %rbx
je 0x795f
movl 0xc(%rsp), %eax
movl %eax, (%rbx)
jmp 0x795f
leaq 0x3eb2(%rip), %rdi      # 0xb7f0
leaq 0x3ec8(%rip), %rcx      # 0xb80d
movl $0x51, %esi
movl $0x2, %edx
movq %r14, %r8
xorl %eax, %eax
callq 0x4ada
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/sfset.c
// Function: sfset_ipv6only
int
sfset_ipv6only(const struct sockaddr *sa, int sock)
{
	int opt;

	opt = 1;

	if (sa->sa_family != AF_INET6) {
		return (-1);
	}

#ifdef IPV6_V6ONLY
	if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt)) == -1) {
		DEBUG_PRINTF("setsockopt IPV6_V6ONLY failed");

		return (-1);
	}
#endif

	return (0);
}

// Assembly:
pushq %rax
movl $0x1, 0x4(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpw $0xa, (%rdi)
jne 0x7a21
leaq 0x4(%rsp), %rcx
movl %esi, %edi
movl $0x29, %esi
movl $0x1a, %edx
movl $0x4, %r8d
callq 0x20c0
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x7a21
leaq 0x3dec(%rip), %rdi      # 0xb7f0
leaq 0x3e78(%rip), %rcx      # 0xb883
movl $0x89, %esi
movl $0x2, %edx
xorl %eax, %eax
callq 0x4ada
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/sfset.c
// Function: sfset_mcast_if
int
sfset_mcast_if(const struct sockaddr *local_addr, int sock, const char *local_ifname)
{
	int iface_index;

	switch (local_addr->sa_family) {
	case AF_INET:
		if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_IF,
		    &((struct sockaddr_in *)local_addr)->sin_addr, sizeof(struct in_addr)) == -1) {
			DEBUG_PRINTF("setsockopt IP_MULTICAST_IF failed");

			return (-1);
		}
		break;
	case AF_INET6:
		iface_index = if_nametoindex(local_ifname);
		if (iface_index == 0) {
			DEBUG_PRINTF("if_nametoindex cannot convert iface name %s to index",
			    local_ifname);

			return (-1);
		}

		if (setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_IF, &iface_index,
		    sizeof(iface_index)) == -1) {
			DEBUG_PRINTF("setsockopt IPV6_MULTICAST_IF failed");

			return (-1);
		}
		break;

	default:
		DEBUG_PRINTF("Unknown sockaddr family");
		errx(1, "Unknown sockaddr family");
	}

	return (0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movzwl (%rdi), %eax
cmpl $0xa, %eax
je 0x7a74
cmpl $0x2, %eax
jne 0x7afb
movq %rdi, %rcx
addq $0x4, %rcx
xorl %ebx, %ebx
movl %ebp, %edi
xorl %esi, %esi
movl $0x20, %edx
movl $0x4, %r8d
callq 0x20c0
cmpl $-0x1, %eax
jne 0x7af2
leaq 0x3d8a(%rip), %rdi      # 0xb7f0
leaq 0x3e34(%rip), %rcx      # 0xb8a1
movl $0xa1, %esi
jmp 0x7abd
movq %rdx, %rbx
movq %rdx, %rdi
callq 0x21d0
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x7acb
leaq 0x4(%rsp), %rcx
movl %ebp, %edi
movl $0x29, %esi
movl $0x11, %edx
movl $0x4, %r8d
callq 0x20c0
xorl %ebx, %ebx
cmpl $-0x1, %eax
jne 0x7af2
leaq 0x3d3f(%rip), %rdi      # 0xb7f0
leaq 0x3e40(%rip), %rcx      # 0xb8f8
movl $0xb1, %esi
movl $0x2, %edx
xorl %eax, %eax
callq 0x4ada
jmp 0x7aed
leaq 0x3d1e(%rip), %rdi      # 0xb7f0
leaq 0x3dea(%rip), %rcx      # 0xb8c3
movl $0xaa, %esi
movl $0x2, %edx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4ada
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x3cee(%rip), %rdi      # 0xb7f0
leaq 0x25d4(%rip), %rbx      # 0xa0dd
movl $0xb8, %esi
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ada
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/sfset.c
// Function: sfset_mcast_loop
int
sfset_mcast_loop(const struct sockaddr *mcast_addr, int sock, int enable)
{
	uint8_t val;
	int ival;

	val = (enable ? 1 : 0);
	ival = val;

	switch (mcast_addr->sa_family) {
	case AF_INET:
		if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_LOOP, &val, sizeof(val)) == -1) {
			DEBUG_PRINTF("setsockopt IP_MULTICAST_LOOP failed");

			return (-1);
		}
		break;
	case AF_INET6:
		if (setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &ival,
		    sizeof(ival)) == -1) {
			DEBUG_PRINTF("setsockopt IPV6_MULTICAST_LOOP failed");

			return (-1);
		}
		break;
	default:
		DEBUG_PRINTF("Unknown sockaddr family");
		errx(1, "Unknown sockaddr family");
	}

	return (0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorl %eax, %eax
testl %edx, %edx
setne 0xb(%rsp)
setne %al
movl %eax, 0xc(%rsp)
movzwl (%rdi), %eax
cmpl $0xa, %eax
je 0x7b87
cmpl $0x2, %eax
jne 0x7bd6
xorl %ebx, %ebx
leaq 0xb(%rsp), %rcx
movl %esi, %edi
xorl %esi, %esi
movl $0x22, %edx
movl $0x1, %r8d
callq 0x20c0
cmpl $-0x1, %eax
jne 0x7bce
leaq 0x3c77(%rip), %rdi      # 0xb7f0
leaq 0x3d9c(%rip), %rcx      # 0xb91c
movl $0xd1, %esi
jmp 0x7bbd
leaq 0xc(%rsp), %rcx
movl %esi, %edi
movl $0x29, %esi
movl $0x13, %edx
movl $0x4, %r8d
callq 0x20c0
xorl %ebx, %ebx
cmpl $-0x1, %eax
jne 0x7bce
leaq 0x3c3f(%rip), %rdi      # 0xb7f0
leaq 0x3d88(%rip), %rcx      # 0xb940
movl $0xd9, %esi
movl $0x2, %edx
xorl %eax, %eax
callq 0x4ada
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x3c13(%rip), %rdi      # 0xb7f0
leaq 0x24f9(%rip), %rbx      # 0xa0dd
movl $0xdf, %esi
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ada
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/sfset.c
// Function: sfset_recvttl
int
sfset_recvttl(const struct sockaddr *sa, int sock)
{
	int opt;

	opt = 1;

	switch (sa->sa_family) {
	case AF_INET:
#ifdef IP_RECVTTL
		if (setsockopt(sock, IPPROTO_IP, IP_RECVTTL, &opt, sizeof(opt)) == -1) {
			DEBUG_PRINTF("setsockopt IP_RECVTTL failed");

			return (-1);
		}
#else
		return (-2);
#endif
		break;
	case AF_INET6:
#ifdef IPV6_RECVHOPLIMIT
		if (setsockopt(sock, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &opt, sizeof(opt)) == -1) {
			DEBUG_PRINTF("setsockopt IPV6_RECVHOPLIMIT failed");

			return (-1);
		}
#else
		if (setsockopt(sock, IPPROTO_IPV6, IPV6_HOPLIMIT, &opt, sizeof(opt)) == -1) {
			DEBUG_PRINTF("setsockopt IPV6_HOPLIMIT failed");

			return (-1);
		}
#endif
		break;
	default:
		DEBUG_PRINTF("Unknown sockaddr family");
		errx(1, "Unknown sockaddr family");
	}


	return (0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x1, 0xc(%rsp)
movzwl (%rdi), %eax
cmpl $0xa, %eax
je 0x7c5a
cmpl $0x2, %eax
jne 0x7ca9
xorl %ebx, %ebx
leaq 0xc(%rsp), %rcx
movl %esi, %edi
xorl %esi, %esi
movl $0xc, %edx
movl $0x4, %r8d
callq 0x20c0
cmpl $-0x1, %eax
jne 0x7ca1
leaq 0x3ba4(%rip), %rdi      # 0xb7f0
leaq 0x3d13(%rip), %rcx      # 0xb966
movl $0xf7, %esi
jmp 0x7c90
leaq 0xc(%rsp), %rcx
movl %esi, %edi
movl $0x29, %esi
movl $0x33, %edx
movl $0x4, %r8d
callq 0x20c0
xorl %ebx, %ebx
cmpl $-0x1, %eax
jne 0x7ca1
leaq 0x3b6c(%rip), %rdi      # 0xb7f0
leaq 0x3cf8(%rip), %rcx      # 0xb983
movl $0x102, %esi            # imm = 0x102
movl $0x2, %edx
xorl %eax, %eax
callq 0x4ada
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x3b40(%rip), %rdi      # 0xb7f0
leaq 0x2426(%rip), %rbx      # 0xa0dd
movl $0x10f, %esi            # imm = 0x10F
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ada
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/sfset.c
// Function: sfset_reuse
int
sfset_reuse(int sock)
{
	int opt;

	opt = 1;

	if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1) {
		DEBUG_PRINTF("setsockopt SO_REUSEADDR failed");

		return (-1);
	}

#ifdef SO_REUSEPORT
	if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt)) == -1) {
		DEBUG_PRINTF("setsockopt SO_REUSEPORT failed");

		return (-1);
	}
#endif

	return (0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x20c0
cmpl $-0x1, %eax
je 0x7d40
leaq 0xc(%rsp), %rcx
movl %ebx, %edi
movl $0x1, %esi
movl $0xf, %edx
movl $0x4, %r8d
callq 0x20c0
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x7d64
leaq 0x3abe(%rip), %rdi      # 0xb7f0
leaq 0x3c8d(%rip), %rcx      # 0xb9c6
movl $0x12a, %esi            # imm = 0x12A
jmp 0x7d53
leaq 0x3aa9(%rip), %rdi      # 0xb7f0
leaq 0x3c59(%rip), %rcx      # 0xb9a7
movl $0x123, %esi            # imm = 0x123
movl $0x2, %edx
xorl %eax, %eax
callq 0x4ada
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/sfset.c
// Function: sfset_ttl
int
sfset_ttl(const struct sockaddr *sa, enum sf_cast_type cast_type, int sock, uint8_t ttl)
{
	int ittl;
	int res;

	ittl = ttl;

	switch (sa->sa_family) {
	case AF_INET:
		if (cast_type == SF_CT_MULTI) {
			res = setsockopt(sock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));
			if (res == -1) {
				DEBUG_PRINTF("setsockopt IP_MULTICAST_TTL failed");
				return (-1);
			}
		} else {
			res = setsockopt(sock, IPPROTO_IP, IP_TTL, &ittl, sizeof(ittl));
			if (res == -1) {
				DEBUG_PRINTF("setsockopt IP_TTL failed");
				return (-1);
			}
		}
		break;
	case AF_INET6:
		if (cast_type == SF_CT_MULTI) {
			res = setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &ittl,
			    sizeof(ittl));

			if (res == -1) {
				DEBUG_PRINTF("setsockopt IPV6_MULTICAST_HOPS failed");

				return (-1);
			}
		} else {
			res = setsockopt(sock, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ittl,
			    sizeof(ittl));

			if (res == -1) {
				DEBUG_PRINTF("setsockopt IPV6_UNICAST_HOPS failed");

				return (-1);
			}
		}
		break;
	default:
		DEBUG_PRINTF("Unknown sockaddr family");
		errx(1, "Unknown sockaddr family");
	}

	return (0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movb %cl, 0xb(%rsp)
movl %ecx, 0xc(%rsp)
movzwl (%rdi), %eax
cmpl $0xa, %eax
je 0x7e1d
cmpl $0x2, %eax
jne 0x7ed5
xorl %ebx, %ebx
cmpl $0x1, %esi
jne 0x7e76
leaq 0xb(%rsp), %rcx
movl %edx, %edi
xorl %esi, %esi
movl $0x21, %edx
movl $0x1, %r8d
callq 0x20c0
cmpl $-0x1, %eax
jne 0x7ecd
leaq 0x39e4(%rip), %rdi      # 0xb7f0
leaq 0x3bf1(%rip), %rcx      # 0xba04
movl $0x15c, %esi            # imm = 0x15C
jmp 0x7ebc
leaq 0xc(%rsp), %rcx
movl %edx, %edi
cmpl $0x1, %esi
jne 0x7e58
movl $0x29, %esi
movl $0x12, %edx
movl $0x4, %r8d
callq 0x20c0
cmpl $-0x1, %eax
jne 0x7e72
leaq 0x39a6(%rip), %rdi      # 0xb7f0
leaq 0x3bef(%rip), %rcx      # 0xba40
movl $0x16d, %esi            # imm = 0x16D
jmp 0x7ebc
movl $0x29, %esi
movl $0x10, %edx
movl $0x4, %r8d
callq 0x20c0
cmpl $-0x1, %eax
je 0x7ea9
xorl %ebx, %ebx
jmp 0x7ecd
leaq 0xc(%rsp), %rcx
movl %edx, %edi
xorl %esi, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x20c0
cmpl $-0x1, %eax
jne 0x7ecd
leaq 0x3955(%rip), %rdi      # 0xb7f0
leaq 0x3b85(%rip), %rcx      # 0xba27
movl $0x162, %esi            # imm = 0x162
jmp 0x7ebc
leaq 0x3940(%rip), %rdi      # 0xb7f0
leaq 0x3baf(%rip), %rcx      # 0xba66
movl $0x176, %esi            # imm = 0x176
movl $0x2, %edx
xorl %eax, %eax
callq 0x4ada
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x3914(%rip), %rdi      # 0xb7f0
leaq 0x21fa(%rip), %rbx      # 0xa0dd
movl $0x17d, %esi            # imm = 0x17D
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ada
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
nop
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/sockfunc.c
// Function: sf_set_socket_common_options
static int
sf_set_socket_common_options(int sock, const struct sockaddr *addr, enum sf_cast_type cast_type,
    uint8_t ttl, int force_recvttl, int receive_timestamp, int sndbuf_size, int rcvbuf_size,
    int force_buf_size)
{
	const char *cast_str;
	int new_buf_size;
	int res;

	cast_str = sf_cast_type_to_str(cast_type);

	if (sfset_buf_size(sock, 1, sndbuf_size, &new_buf_size, force_buf_size) == -1) {
		return (-1);
	}

	DEBUG_PRINTF("Send buffer (%scast socket) allocated %u bytes", cast_str, new_buf_size);

	if (sfset_buf_size(sock, 0, rcvbuf_size, &new_buf_size, force_buf_size) == -1) {
		return (-1);
	}

	DEBUG_PRINTF("Receive buffer (%scast socket) allocated %u bytes", cast_str, new_buf_size);

	if (addr->sa_family == AF_INET6) {
		if (sfset_ipv6only(addr, sock) == -1) {
			return (-1);
		}
	}

	if (sfset_ttl(addr, cast_type, sock, ttl) == -1) {
		return (-1);
	}

	res = sfset_recvttl(addr, sock);
	if (res == -1 || (res == -2 && force_recvttl)) {
		return (-1);
	}

	if (receive_timestamp) {
		if (sfset_timestamp(sock) == -1) {
			return (-1);
		}
	}

	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r14d
movl %r8d, 0x10(%rsp)
movl %ecx, 0x14(%rsp)
movl %edx, %r13d
movq %rsi, %r12
movl %edi, %ebp
movl 0x50(%rsp), %ebx
movl %edx, %edi
callq 0x7f57
movq %rax, %r15
leaq 0x8(%rsp), %rcx
movl %ebp, %edi
movl $0x1, %esi
movl %ebx, %edx
movl $0x1, %r8d
callq 0x783c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x82c1
movl %r14d, 0xc(%rsp)
movl 0x58(%rsp), %r14d
leaq 0x8(%rsp), %rbx
movl (%rbx), %r9d
leaq 0x3899(%rip), %rdi      # 0xba8a
leaq 0x39b9(%rip), %rcx      # 0xbbb1
movl $0x1fc, %esi            # imm = 0x1FC
movl $0x2, %edx
movq %r15, %r8
xorl %eax, %eax
callq 0x4ada
movl %ebp, %edi
xorl %esi, %esi
movl %r14d, %edx
movq %rbx, %rcx
movl $0x1, %r8d
callq 0x783c
cmpl $-0x1, %eax
je 0x82bc
movl 0x8(%rsp), %r9d
leaq 0x3854(%rip), %rdi      # 0xba8a
leaq 0x39a3(%rip), %rcx      # 0xbbe0
movl $0x202, %esi            # imm = 0x202
movl $0x2, %edx
movq %r15, %r8
xorl %eax, %eax
callq 0x4ada
cmpw $0xa, (%r12)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jne 0x826d
movq %r12, %rdi
movl %ebp, %esi
callq 0x79c4
cmpl $-0x1, %eax
je 0x82c1
movzbl 0x14(%rsp), %ecx
movq %r12, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x7dba
cmpl $-0x1, %eax
je 0x82c1
movq %r12, %rdi
movl %ebp, %esi
callq 0x7c07
cmpl $-0x1, %eax
je 0x82c1
cmpl $-0x2, %eax
sete %al
cmpl $0x0, 0x10(%rsp)
setne %cl
testb %al, %cl
jne 0x82c1
cmpl $0x0, 0xc(%rsp)
je 0x82b8
movl %ebp, %edi
callq 0x7d6a
cmpl $-0x1, %eax
je 0x82c1
xorl %ebx, %ebx
jmp 0x82c1
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/sockfunc.c
// Function: sf_mcast_join_asm_group
int
sf_mcast_join_asm_group(const struct sockaddr *mcast_addr, const struct sockaddr *local_addr,
    const char *local_ifname, int sock)
{
	struct ip_mreq mreq4;
	struct ipv6_mreq mreq6;
	int iface_index;

	switch (mcast_addr->sa_family) {
	case AF_INET:
		memset(&mreq4, 0, sizeof(mreq4));

		mreq4.imr_multiaddr = ((struct sockaddr_in *)mcast_addr)->sin_addr;
		mreq4.imr_interface = ((struct sockaddr_in *)local_addr)->sin_addr;
		if (setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq4, sizeof(mreq4)) == -1) {
			DEBUG_PRINTF("setsockopt IP_ADD_MEMBERSHIP failed");

			return (-1);
		}
		break;
	case AF_INET6:
		iface_index = if_nametoindex(local_ifname);
		if (iface_index == 0) {
			DEBUG_PRINTF("if_nametoindex cannot convert iface name %s to index",
			    local_ifname);

			return (-1);
		}
		memset(&mreq6, 0, sizeof(mreq6));

		mreq6.ipv6mr_multiaddr = ((struct sockaddr_in6 *)mcast_addr)->sin6_addr;
		mreq6.ipv6mr_interface = iface_index;
		if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq6, sizeof(mreq6)) == -1) {
			DEBUG_PRINTF("setsockopt IPV6_JOIN_GROUP failed");

			return (-1);
		}
		break;
	default:
		DEBUG_PRINTF("Unknown sockaddr family");
		errx(1, "Unknown sockaddr family");
	}

	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movq %rdi, %r15
movzwl (%rdi), %eax
cmpl $0xa, %eax
je 0x833c
cmpl $0x2, %eax
jne 0x83d3
movq %rsp, %rcx
movq $0x0, (%rcx)
movl 0x4(%r15), %eax
movl %eax, (%rcx)
movl 0x4(%rsi), %eax
movl %eax, 0x4(%rcx)
xorl %ebp, %ebp
movl %ebx, %edi
xorl %esi, %esi
movl $0x23, %edx
movl $0x8, %r8d
callq 0x20c0
cmpl $-0x1, %eax
jne 0x83c6
leaq 0x375c(%rip), %rdi      # 0xba8a
leaq 0x3796(%rip), %rcx      # 0xbacb
movl $0x157, %esi            # imm = 0x157
jmp 0x8391
movq %rdx, %r14
movq %rdx, %rdi
callq 0x21d0
testl %eax, %eax
je 0x839f
movq %rsp, %rcx
movl $0x0, 0x10(%rcx)
movups 0x8(%r15), %xmm0
movaps %xmm0, (%rcx)
movl %eax, 0x10(%rcx)
movl %ebx, %edi
movl $0x29, %esi
movl $0x14, %edx
movl $0x14, %r8d
callq 0x20c0
xorl %ebp, %ebp
cmpl $-0x1, %eax
jne 0x83c6
leaq 0x3705(%rip), %rdi      # 0xba8a
leaq 0x3763(%rip), %rcx      # 0xbaef
movl $0x169, %esi            # imm = 0x169
movl $0x2, %edx
xorl %eax, %eax
callq 0x4ada
jmp 0x83c1
leaq 0x36e4(%rip), %rdi      # 0xba8a
leaq 0x3516(%rip), %rcx      # 0xb8c3
movl $0x160, %esi            # imm = 0x160
movl $0x2, %edx
movq %r14, %r8
xorl %eax, %eax
callq 0x4ada
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x36b0(%rip), %rdi      # 0xba8a
leaq 0x1cfc(%rip), %rbx      # 0xa0dd
movl $0x16f, %esi            # imm = 0x16F
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ada
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/sockfunc.c
// Function: sf_mcast_join_ssm_group_list
int
sf_mcast_join_ssm_group_list(const struct sockaddr *mcast_addr, const struct sockaddr *local_addr,
    const struct aii_list *remote_addrs, const char *local_ifname, int sock)
{
	struct ai_item *ai_item_i;

	TAILQ_FOREACH(ai_item_i, remote_addrs, entries) {
		if (sf_mcast_join_ssm_group(mcast_addr, local_addr,
		    (const struct sockaddr *)&ai_item_i->sas, local_ifname, sock) == -1) {
			return (-1);
		}
	}

	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdx), %r13
xorl %ebx, %ebx
testq %r13, %r13
je 0x8451
movl %r8d, %ebp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x85e7
cmpl $-0x1, %eax
je 0x844c
movq 0x88(%r13), %r13
testq %r13, %r13
jne 0x8425
jmp 0x8451
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/tlv.c
// Function: tlv_add
int
tlv_add(char *msg, size_t msg_len, size_t *pos, enum tlv_opt_type opt_type, uint16_t opt_len,
    const void *value)
{
	uint16_t nlen;
	uint16_t nopt_type;

	DEBUG2_PRINTF("Add option %"PRIu16" with len %"PRIu16" pos %zu", opt_type, opt_len, *pos);

	if (*pos + sizeof(nopt_type) + sizeof(nlen) + opt_len > msg_len) {
		DEBUG2_PRINTF("Can't store option. msg_len too small.");
		return (-1);
	}

	nopt_type = ntohs((uint16_t)opt_type);
	memcpy(msg + *pos, &nopt_type, sizeof(nopt_type));
	*pos += sizeof(nopt_type);

	nlen = htons(opt_len);

	memcpy(msg + *pos, &nlen, sizeof(nlen));
	*pos += sizeof(nlen);

	memcpy(msg + *pos, value, opt_len);

	*pos += opt_len;

	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, %r12d
movl %ecx, %r13d
movq %rdx, %rbx
movq %rsi, %rbp
movq %rdi, %r15
movq (%rdx), %rax
movq %rax, (%rsp)
leaq 0x3454(%rip), %rdi      # 0xbc2c
leaq 0x3453(%rip), %rcx      # 0xbc32
movl $0x40, %esi
movl $0x3, %edx
movl %r13d, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x4ada
movq (%rbx), %rax
movl %r12d, %r14d
leaq (%r14,%rax), %rcx
addq $0x4, %rcx
cmpq %rbp, %rcx
jbe 0x882f
leaq 0x341c(%rip), %rdi      # 0xbc2c
leaq 0x343d(%rip), %rcx      # 0xbc54
movl $0x43, %esi
movl $0x3, %edx
xorl %eax, %eax
callq 0x4ada
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x8872
rolw $0x8, %r13w
movw %r13w, (%r15,%rax)
movq (%rbx), %rax
leaq 0x2(%rax), %rcx
movq %rcx, (%rbx)
rolw $0x8, %r12w
movw %r12w, 0x2(%r15,%rax)
movq (%rbx), %rax
leaq 0x2(%rax), %rcx
movq %rcx, (%rbx)
leaq (%r15,%rax), %rdi
addq $0x2, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x21f0
addq %r14, (%rbx)
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_O1/jfriesse[P]omping/tlv.c
// Function: tlv_add_sas
static int
tlv_add_sas(char *msg, size_t msg_len, size_t *pos, enum tlv_opt_type opt,
    const struct sockaddr_storage *sas, int store_prefix_len)
{
	char *value;
	void *addr_pointer;
	size_t addr_len;
	size_t opt_len;
	uint16_t af;
	uint8_t pref_len_val;

	switch (sas->ss_family) {
	case AF_INET:
		af = AF_IANA_IP;
		addr_len = sizeof(struct in_addr);
		addr_pointer = &((struct sockaddr_in *)sas)->sin_addr;
		break;
	case AF_INET6:
		af = AF_IANA_IP6;
		addr_len = sizeof(struct in6_addr);
		addr_pointer = &((struct sockaddr_in6 *)sas)->sin6_addr;
		break;
	default:
		DEBUG_PRINTF("Unknown sas family %d", sas->ss_family);
		errx(1, "Unknown sas family %d", sas->ss_family);
	}

	pref_len_val = addr_len * 8;

	opt_len = sizeof(af) + addr_len;

	if (store_prefix_len)
		opt_len += sizeof(pref_len_val);

	value = (char *)alloca(opt_len);

	af = htons(af);

	memcpy(value, &af, sizeof(af));
	if (store_prefix_len)
		memcpy(value + sizeof(af), &pref_len_val, sizeof(pref_len_val));

	memcpy(value + sizeof(af) + (store_prefix_len ? sizeof(pref_len_val) : 0), addr_pointer,
	    addr_len);

	return (tlv_add(msg, msg_len, pos, opt, opt_len, value));

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movl %ecx, %r12d
movq %rdx, %r13
movzwl (%r8), %r8d
cmpl $0x2, %r8d
movq %rsi, -0x38(%rbp)
je 0x891a
cmpl $0xa, %r8d
jne 0x89a3
movw $0x200, %cx             # imm = 0x200
movl $0x10, %edx
movl $0x8, %eax
jmp 0x8928
movw $0x100, %cx             # imm = 0x100
movl $0x4, %eax
movl $0x4, %edx
movq %rdi, -0x30(%rbp)
xorl %r14d, %r14d
testl %r9d, %r9d
setne %r14b
orq %rdx, %r14
orq $0x2, %r14
leal 0xf(%r14), %esi
andl $-0x10, %esi
movq %rsp, %r15
subq %rsi, %r15
movq %r15, %rsp
movw %cx, (%r15)
testl %r9d, %r9d
je 0x8961
leal (,%rdx,8), %ecx
movb %cl, 0x2(%r15)
addq %rax, %rbx
cmpl $0x1, %r9d
movq %r15, %rdi
sbbq $-0x1, %rdi
addq $0x2, %rdi
movq %rbx, %rsi
callq 0x21f0
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
movl %r12d, %ecx
movl %r14d, %r8d
movq %r15, %r9
callq 0x87a8
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3282(%rip), %rdi      # 0xbc2c
leaq 0x16be(%rip), %r14      # 0xa06f
movl $0xb5, %esi
movl $0x2, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x4ada
movzwl (%rbx), %edx
movl $0x1, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/tlv.c
// Function: tlv_add_opt_request
int
tlv_add_opt_request(char *msg, size_t msg_len, size_t *pos, uint16_t *opts, size_t opts_len)
{
	char *value;
	size_t val_len;
	unsigned int i;
	uint16_t opt;

	if (opts_len == 0)
		return (-1);

	val_len = opts_len * sizeof(uint16_t);

	value = (char *)alloca(val_len);

	for (i = 0; i < opts_len; i++) {
		opt = htons(opts[i]);

		memcpy(value + i * sizeof(opt), &opt, sizeof(opt));
	}

	return (tlv_add(msg, msg_len, pos, TLV_OPT_TYPE_OPT_REQUEST, val_len, value));
}

// Assembly:
testq %r8, %r8
je 0x8a3c
pushq %rbp
movq %rsp, %rbp
leaq (%r8,%r8), %rax
movq %rsp, %r9
leaq 0xf(,%r8,2), %r10
andq $-0x10, %r10
subq %r10, %r9
movq %r9, %rsp
xorl %r10d, %r10d
movzwl (%rcx,%r10,2), %r11d
rolw $0x8, %r11w
movw %r11w, (%r9,%r10,2)
incq %r10
movl %r10d, %r11d
cmpq %r8, %r11
jb 0x8a0f
movzwl %ax, %r8d
movl $0x5, %ecx
callq 0x87a8
movq %rbp, %rsp
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/tlv.c
// Function: tlv_iter_item_copy
int
tlv_iter_item_copy(const struct tlv_iterator *tlv_iter, char *new_msg, size_t new_msg_len,
    size_t *pos)
{
	size_t item_size;

	DEBUG2_PRINTF("Copy option %"PRIu16" with len %"PRIu16" pos %zu",
	    tlv_iter_get_type(tlv_iter), tlv_iter_get_len(tlv_iter), *pos);

	item_size = tlv_iter_get_len(tlv_iter) + 2 * sizeof(uint16_t);

	if (*pos + item_size > new_msg_len) {
		DEBUG2_PRINTF("Can't copy option. new_msg_len too small.");

		return (-1);
	}

	memcpy(new_msg + *pos, tlv_iter->msg + tlv_iter->pos, item_size);

	*pos += item_size;

	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movzwl (%rax,%rcx), %edx
movzwl 0x2(%rax,%rcx), %eax
rolw $0x8, %dx
movzwl %dx, %r8d
rolw $0x8, %ax
movzwl %ax, %r9d
movq (%rbx), %rax
movq %rax, (%rsp)
leaq 0x306f(%rip), %rdi      # 0xbc2c
leaq 0x30b7(%rip), %rcx      # 0xbc7b
xorl %ebp, %ebp
movl $0x160, %esi            # imm = 0x160
movl $0x3, %edx
xorl %eax, %eax
callq 0x4ada
movq (%r12), %rsi
movq 0x10(%r12), %rax
movzwl 0x2(%rsi,%rax), %ecx
rolw $0x8, %cx
movzwl %cx, %r12d
movq (%rbx), %rcx
leaq (%r12,%rcx), %rdx
addq $0x4, %rdx
cmpq %r15, %rdx
jbe 0x8c23
leaq 0x3028(%rip), %rdi      # 0xbc2c
leaq 0x3093(%rip), %rcx      # 0xbc9e
movl $0x165, %esi            # imm = 0x165
movl $0x3, %edx
xorl %eax, %eax
callq 0x4ada
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x8c3b
addq %rax, %rsi
addq $0x4, %r12
addq %rcx, %r14
movq %r14, %rdi
movq %r12, %rdx
callq 0x21f0
addq %r12, (%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/tlv.c
// Function: tlv_pref_eq
int
tlv_pref_eq(const struct sockaddr_storage *sas, uint16_t iana_af, uint8_t prefix, const char *addr)
{
	char sas_addr[32];
	size_t sas_addr_len;
	uint16_t sas_iana_af;
	unsigned char cb1, cb2;
	uint8_t plen_max, plen_min;

	memset(sas_addr, 0, sizeof(sas_addr));

	switch (sas->ss_family) {
	case AF_INET:
		sas_iana_af = AF_IANA_IP;

		plen_min = 4;
		plen_max = 32;

		sas_addr_len = sizeof(struct in_addr);
		memcpy(sas_addr, &((struct sockaddr_in *)sas)->sin_addr, sas_addr_len);
		break;
	case AF_INET6:
		sas_iana_af = AF_IANA_IP6;

		plen_min = 8;
		plen_max = 128;

		sas_addr_len = sizeof(struct in6_addr);
		memcpy(sas_addr, &((struct sockaddr_in6 *)sas)->sin6_addr, sas_addr_len);
		break;
	default:
		DEBUG_PRINTF("Unknown ss family %d", sas->ss_family);
		errx(1, "Unknown ss family %d", sas->ss_family);
	}

	if (iana_af != sas_iana_af) {
		return (0);
	}

	if (prefix == 0) {
		/*
		 * Wildcard
		 */
		return (1);
	}

	if (prefix < plen_min || prefix > plen_max) {
		return (0);
	}

	/*
	 * Full bytes comparation
	 */
	if (memcmp(sas_addr, addr, prefix / 8) != 0) {
		return (0);
	}


	/*
	 * Rest bit comparation
	 */
	if (prefix % 8 != 0 && prefix / 8 < sizeof(sas_addr_len)) {
		cb1 = (unsigned char)(sas_addr[prefix / 8] & (0xff << (8 - (prefix % 8))));
		cb2 = (unsigned char)(addr[prefix / 8] & (0xff << (8 - (prefix % 8))));
		if (cb1 != cb2) {
			return (0);
		}
	}

	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movzwl (%rdi), %r8d
cmpl $0xa, %r8d
je 0x8d3f
cmpl $0x2, %r8d
jne 0x8dd3
movl 0x4(%r14), %eax
movl %eax, (%rsp)
movl $0x4, %ecx
movl $0x20, %eax
movl $0x1, %edx
jmp 0x8d57
movups 0x8(%r14), %xmm0
movaps %xmm0, (%rsp)
movl $0x8, %ecx
movl $0x80, %eax
movl $0x2, %edx
movzwl %si, %esi
xorl %r14d, %r14d
cmpl %esi, %edx
jne 0x8dc3
testb %bpl, %bpl
je 0x8dbd
movzbl %bpl, %r12d
cmpl %r12d, %ecx
seta %cl
cmpl %r12d, %eax
setb %al
orb %cl, %al
jne 0x8dc3
movl %r12d, %r15d
shrl $0x3, %r15d
movq %rsp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2260
testl %eax, %eax
jne 0x8dc3
andl $0x7, %r12d
sete %al
cmpb $0x40, %bpl
setae %cl
orb %al, %cl
jne 0x8dbd
movb $0x8, %cl
subb %r12b, %cl
movl $0xff, %eax
shll %cl, %eax
movb (%rbx,%r15), %cl
xorb (%rsp,%r15), %cl
testb %al, %cl
jne 0x8dc3
movl $0x1, %r14d
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e52(%rip), %rdi      # 0xbc2c
leaq 0x2f8c(%rip), %rbx      # 0xbd6d
movl $0x20d, %esi            # imm = 0x20D
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ada
movzwl (%r14), %edx
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/tlv.c
// Function: tlv_mcast_grp_eq
int
tlv_mcast_grp_eq(const struct sockaddr_storage *sas, const char *mcast_grp, size_t mcast_grp_len)
{
	uint16_t u16;

	memcpy(&u16, mcast_grp, sizeof(u16));
	u16 = ntohs(u16);

	if (!((u16 == AF_IANA_IP && mcast_grp_len == 6) ||
	    (u16 == AF_IANA_IP6 && mcast_grp_len == 18))) {
		return (0);
	}

	if (u16 == AF_IANA_IP && sas->ss_family != AF_INET) {
		return (0);
	}

	if (u16 == AF_IANA_IP6 && sas->ss_family != AF_INET6) {
		return (0);
	}

	return (tlv_pref_eq(sas, u16, (mcast_grp_len - 2) * 8, mcast_grp + 2));
}

// Assembly:
movq %rsi, %rcx
movzwl (%rsi), %eax
cmpl $0x100, %eax            # imm = 0x100
sete %r8b
cmpq $0x6, %rdx
sete %r9b
movzwl %ax, %esi
testb %r8b, %r9b
jne 0x8e3e
cmpl $0x200, %esi            # imm = 0x200
setne %r8b
cmpq $0x12, %rdx
setne %r9b
orb %r8b, %r9b
jne 0x8e73
cmpl $0x100, %esi            # imm = 0x100
jne 0x8e4c
cmpw $0x2, (%rdi)
jne 0x8e73
cmpl $0x200, %esi            # imm = 0x200
jne 0x8e5a
cmpw $0xa, (%rdi)
jne 0x8e73
rolw $0x8, %ax
shlb $0x3, %dl
addb $-0x10, %dl
addq $0x2, %rcx
movzwl %ax, %esi
movzbl %dl, %edx
jmp 0x8cf3
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/util.c
// Function: util_gen_id
static void
util_gen_id(char *id, size_t len, const struct ai_item *ai_item,
    const struct sockaddr_storage *sas)
{
	pid_t pid;
	size_t pos;

	/*
	 * First fill item with some random data
	 */
	for (pos = 0; pos < len; pos++) {
#if defined(__FreeBSD__) || defined(__OPENBSD__)
		id[pos] = (unsigned char)arc4random_uniform(UCHAR_MAX);
#else
		id[pos] = (unsigned char)random();
#endif
	}

	pos = 0;

	if (pos + sizeof(pid) < len) {
		/*
		 * Add PID
		 */
		pid = getpid();
		memcpy(id, &pid, sizeof(pid));

		pos += sizeof(pid);
	}

	/*
	 * Add sas from ai_item
	 */
	if (ai_item != NULL) {
		util_gen_id_add_sas(id, len, &pos, &ai_item->sas);
	}

	if (sas != NULL) {
		util_gen_id_add_sas(id, len, &pos, sas);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rsi, %rsi
je 0x8f0b
xorl %r12d, %r12d
callq 0x2220
movb %al, (%r14,%r12)
incq %r12
cmpq %r12, %r15
jne 0x8efa
callq 0x20d0
movl %eax, (%r14)
testq %rbx, %rbx
je 0x8f62
movzwl (%rbx), %r8d
movl $0x4, %eax
movl $0x4, %edx
cmpl $0x2, %r8d
je 0x8f3c
cmpl $0xa, %r8d
jne 0x8f6e
movl $0x10, %edx
movl $0x8, %eax
leaq 0x4(%rdx), %rcx
cmpq %r15, %rcx
jae 0x8f62
addq %rax, %rbx
addq $0x4, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2e8b(%rip), %rdi      # 0xbe00
leaq 0x2df1(%rip), %r14      # 0xbd6d
movl $0xc9, %esi
movl $0x2, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x4ada
movzwl (%rbx), %edx
movl $0x1, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/util.c
// Function: util_random_init
void
util_random_init(const struct sockaddr_storage *local_addr)
{
	unsigned int seed;
	unsigned int i;

	seed = time(NULL) + getpid();

	for (i = 0; i < af_sas_len(local_addr); i++) {
		seed += ((uint8_t *)local_addr)[i];
	}

	srandom(seed);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %edi, %edi
callq 0x2210
movq %rax, %r14
callq 0x20d0
addl %eax, %r14d
movq %rbx, %rdi
callq 0x2d49
testl %eax, %eax
je 0x9054
xorl %r15d, %r15d
movzbl (%rbx,%r15), %eax
addl %eax, %r14d
incq %r15
movq %rbx, %rdi
callq 0x2d49
movl %eax, %eax
cmpq %rax, %r15
jb 0x903a
movl %r14d, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x2070
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/util.c
// Function: util_time_absdiff
uint64_t
util_time_absdiff(struct timeval t1, struct timeval t2)
{
	uint64_t u64t1, u64t2, tmp;

	u64t1 = t1.tv_usec / 1000 + t1.tv_sec * 1000;
	u64t2 = t2.tv_usec / 1000 + t2.tv_sec * 1000;

	if (u64t2 > u64t1) {
		tmp = u64t1;
		u64t1 = u64t2;
		u64t2 = tmp;
	}

	return (u64t1 - u64t2);
}

// Assembly:
movq %rdx, %r8
movq %rsi, %rax
movabsq $0x20c49ba5e353f7cf, %r9 # imm = 0x20C49BA5E353F7CF
imulq %r9
movq %rdx, %rsi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rsi
addq %rax, %rsi
imulq $0x3e8, %rdi, %rdi      # imm = 0x3E8
movq %rcx, %rax
imulq %r9
addq %rsi, %rdi
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rdx
addq %rdx, %rcx
imulq $0x3e8, %r8, %rax       # imm = 0x3E8
addq %rcx, %rax
movq %rax, %rcx
subq %rdi, %rcx
negq %rcx
subq %rdi, %rax
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/util.c
// Function: util_time_double_absdiff
double
util_time_double_absdiff_us(struct timeval t1, struct timeval t2)
{
	double dt1, dt2, tmp;

	dt1 = t1.tv_usec + t1.tv_sec * UTIL_NSINMS;
	dt2 = t2.tv_usec + t2.tv_sec * UTIL_NSINMS;

	if (dt2 > dt1) {
		tmp = dt1;
		dt1 = dt2;
		dt2 = tmp;
	}

	return (dt1 - dt2);
}

// Assembly:
cvtsi2sd %rsi, %xmm0
cvtsi2sd %rdi, %xmm1
movsd 0x1920(%rip), %xmm2     # 0xa9f0
mulsd %xmm2, %xmm1
cvtsi2sd %rcx, %xmm3
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm3, %xmm0
movapd %xmm1, %xmm2
minsd %xmm0, %xmm2
maxsd %xmm1, %xmm0
subsd %xmm2, %xmm0
divsd 0x146b(%rip), %xmm0     # 0xa570
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/util.c
// Function: util_u64sqrt
uint32_t
util_u64sqrt(uint64_t n)
{
	double x, x2;

	if (n == 0) {
		return (0);
	}

	x = n;

	while (util_fabs((x2 = (x + n / x) / 2) - x) >= 0.5) {
		x = x2;
	}

	return ((uint32_t)x2);
}

// Assembly:
testq %rdi, %rdi
je 0x92c5
movq %rdi, %xmm1
punpckldq 0x2b67(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x2b6f(%rip), %xmm1     # 0xbde0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd 0x2b6b(%rip), %xmm1     # 0xbdf0
movapd 0x2b33(%rip), %xmm2     # 0xbdc0
movapd %xmm0, %xmm3
movapd %xmm3, %xmm4
movapd %xmm0, %xmm3
divsd %xmm4, %xmm3
addsd %xmm4, %xmm3
mulsd %xmm1, %xmm3
movapd %xmm3, %xmm5
subsd %xmm4, %xmm5
movapd %xmm5, %xmm4
xorpd %xmm2, %xmm4
maxsd %xmm5, %xmm4
ucomisd %xmm1, %xmm4
jae 0x9291
cvttsd2si %xmm3, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jfriesse[P]omping/util.c
// Function: util_packet_loss_percent
int
util_packet_loss_percent(uint64_t packet_sent, uint64_t packet_received)
{
	int loss;

	if (packet_received > packet_sent) {
		DEBUG_PRINTF("packet_received > packet_sent");
		loss = 0;
	} else {
		loss = (int)((1.0 - (double)packet_received / (double)packet_sent) * 100.0);
	}

	return (loss);
}

// Assembly:
pushq %rbx
cmpq %rdi, %rsi
jbe 0x9372
leaq 0x2aaa(%rip), %rdi      # 0xbe00
leaq 0x2acc(%rip), %rcx      # 0xbe29
xorl %ebx, %ebx
movl $0x170, %esi            # imm = 0x170
movl $0x2, %edx
xorl %eax, %eax
callq 0x4ada
jmp 0x93d0
movq %rsi, %xmm0
movq 0x2a51(%rip), %xmm1     # 0xbdd0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x2a55(%rip), %xmm2     # 0xbde0
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
movq %rdi, %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
subpd %xmm2, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm3
movsd 0x11c8(%rip), %xmm0     # 0xa588
subsd %xmm3, %xmm0
mulsd 0x2a2c(%rip), %xmm0     # 0xbdf8
cvttsd2si %xmm0, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/poll2.c
// Function: testcase_prepare
void testcase_prepare(unsigned long nr_tasks)
{
	struct rlimit rlim;
	int nr_procs = sysconf(_SC_NPROCESSORS_CONF);
	rlim_t new_lim = (NR_FILES + 10) * nr_procs;

	getrlimit(RLIMIT_NOFILE, &rlim);
	if (rlim.rlim_max < new_lim) {
		rlim.rlim_cur = new_lim;
		rlim.rlim_max = new_lim;
	}
	if (rlim.rlim_cur < new_lim) {
		rlim.rlim_cur = new_lim;
	}
	assert(setrlimit(RLIMIT_NOFILE, &rlim) == 0);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl $0x53, %edi
callq 0x2220
movabsq $0x8a00000000, %r14     # imm = 0x8A00000000
imulq %rax, %r14
sarq $0x20, %r14
leaq 0x8(%rsp), %rbx
movl $0x7, %edi
movq %rbx, %rsi
callq 0x22a0
cmpq %r14, 0x8(%rbx)
jae 0x2c41
movq %r14, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpq %r14, 0x8(%rsp)
jae 0x2c4d
movq %r14, 0x8(%rsp)
leaq 0x8(%rsp), %rsi
movl $0x7, %edi
callq 0x21d0
testl %eax, %eax
jne 0x2c68
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x609(%rip), %rdi       # 0x3278
leaq 0x627(%rip), %rsi       # 0x329d
leaq 0x62e(%rip), %rcx       # 0x32ab
movl $0x1d, %edx
callq 0x2120
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/poll2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	int i;
	char tmpfile[PATH_MAX];
	int tmpfiles[NR_FILES];

	for (i = 0; i < NR_FILES; i++) {
		sprintf(tmpfile, "/tmp/willitscale.XXXXXX");
		tmpfiles[i] = mkstemp(tmpfile);
		assert(tmpfiles[i] >= 0);
		unlink(tmpfile);
	}

	while (1) {
		struct pollfd pfd[NR_FILES];

		memset(&pfd, 0, sizeof(pfd));

		for (i = 0; i < NR_FILES; i++) {
			pfd[i].fd = tmpfiles[i];
			pfd[i].events = POLLOUT;
		}

		assert(poll(pfd, NR_FILES, 0) >= 0);

		(*iterations)++;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1608, %rsp           # imm = 0x1608
movq %rdi, %rbx
xorl %r15d, %r15d
movabsq $0x5858585858582e, %r12 # imm = 0x5858585858582E
leaq 0x600(%rsp), %r14
movups 0x61c(%rip), %xmm0      # 0x32d0
movaps %xmm0, 0x600(%rsp)
movq %r12, 0x610(%rsp)
movq %r14, %rdi
callq 0x21c0
movl %eax, (%rsp,%r15,4)
testl %eax, %eax
js 0x2d38
movq %r14, %rdi
callq 0x2080
incq %r15
cmpq $0x80, %r15
jne 0x2cad
leaq 0x200(%rsp), %r14
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x2130
xorl %eax, %eax
movl (%rsp,%rax,4), %ecx
movl %ecx, 0x200(%rsp,%rax,8)
movw $0x4, 0x204(%rsp,%rax,8)
incq %rax
cmpq $0x80, %rax
jne 0x2d01
movl $0x80, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x21e0
testl %eax, %eax
js 0x2d57
incq (%rbx)
jmp 0x2cf0
leaq 0x5a9(%rip), %rdi       # 0x32e8
leaq 0x557(%rip), %rsi       # 0x329d
leaq 0x5ac(%rip), %rcx       # 0x32f9
movl $0x29, %edx
callq 0x2120
leaq 0x5ce(%rip), %rdi       # 0x332c
leaq 0x538(%rip), %rsi       # 0x329d
leaq 0x58d(%rip), %rcx       # 0x32f9
movl $0x37, %edx
callq 0x2120
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/pi32cipher256v2/ref3/pi-cipher.c
// Function: pi32_init
int PI_INIT(
        PI_CTX *ctx,
        const void *key,
        size_t key_length_B,
        const void *pmn,
        size_t pmn_length_B)
{
	int i;
	uint8_t setup_buf[PI_IS_BITS / 8];
    if (key_length_B + pmn_length_B + 1 >= PI_IS_BITS / 8) {
        return -1;
    }
    memset(ctx->tag, 0, sizeof(ctx->tag));
    memset(setup_buf, 0, sizeof(setup_buf));
    memcpy(setup_buf, key, key_length_B);
    memcpy(&setup_buf[key_length_B], pmn, pmn_length_B);
    setup_buf[key_length_B + pmn_length_B] = 1;
    for (i = 0; i < 16; ++i) {
        ctx->cis[i / 4][i % 4] = load_word_little(&setup_buf[i * PI_WORD_SIZE / 8]);
    }
    pi((word_t*)ctx->cis);
    ctx->ctr = 0;
    for (i = 0; i * PI_WORD_SIZE < 64; ++i) {
		ctx->ctr |= (uint64_t)ctx->cis[1][i] << (i * PI_WORD_SIZE);
	}
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %r15
leaq (%r8,%rdx), %rcx
addq $-0x3f, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $-0x40, %rcx
jb 0x13d6
movq %r8, %r14
movq %rdx, %r12
movq %rdi, %rbx
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, 0x40(%rdi)
leaq (%r8,%rdx), %r13
movq %rsp, %rdi
vmovups %ymm0, 0x20(%rdi)
vmovups %ymm0, (%rdi)
vzeroupper
callq 0x1110
leaq (%rsp,%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1110
movb $0x1, (%rsp,%r13)
vpmovsxbq 0x1d6a(%rip), %ymm0 # 0x3070
vpmovsxbq 0x1d65(%rip), %ymm1 # 0x3074
vpbroadcastq 0x1d28(%rip), %ymm2 # 0x3040
xorl %eax, %eax
vpbroadcastq 0x1d25(%rip), %ymm3 # 0x3048
vpbroadcastq %rbx, %ymm4
vpbroadcastq 0x1d1e(%rip), %ymm5 # 0x3050
vpsrlq $0x2, %ymm1, %ymm6
vpand %ymm2, %ymm6, %ymm6
vpand %ymm3, %ymm1, %ymm7
vpsllq $0x4, %ymm6, %ymm6
vpaddq %ymm6, %ymm4, %ymm6
vpsllq $0x2, %ymm7, %ymm7
vmovdqa (%rsp,%rax,4), %xmm8
vpaddq %ymm7, %ymm6, %ymm6
vmovdqa 0x10(%rsp,%rax,4), %xmm7
kxnorw %k0, %k0, %k1
vpscatterqd %xmm8, (,%ymm6) {%k1}
vpsrlq $0x2, %ymm0, %ymm6
vpand %ymm2, %ymm6, %ymm6
vpand %ymm3, %ymm0, %ymm8
vpsllq $0x4, %ymm6, %ymm6
vpaddq %ymm6, %ymm4, %ymm6
vpsllq $0x2, %ymm8, %ymm8
vpaddq %ymm6, %ymm8, %ymm6
kxnorw %k0, %k0, %k1
vpscatterqd %xmm7, (,%ymm6) {%k1}
addq $0x8, %rax
vpaddq %ymm5, %ymm1, %ymm1
vpaddq %ymm5, %ymm0, %ymm0
cmpq $0x10, %rax
jne 0x1332
movq %rbx, %rdi
vzeroupper
callq 0x13e4
vpmovzxdq 0x10(%rbx), %xmm0
vpsllvq 0x1c9a(%rip), %xmm0, %xmm0 # 0x3060
vpshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
vpor %xmm1, %xmm0, %xmm0
vmovq %xmm0, 0x60(%rbx)
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/pi32cipher256v2/ref3/pi-cipher.c
// Function: pi32_process_ad_last_block
void PI_PROCESS_AD_LAST_BLOCK(
        PI_CTX *ctx,
        const void *ad,
        size_t ad_length_B,
        unsigned long ad_num )
{
    state_t a;
    while (ad_length_B >= PI_AD_BLOCK_LENGTH_BYTES) {
        PI_PROCESS_AD_BLOCK(ctx, ad, ad_num);
        ad_num++;
        ad_length_B -= PI_AD_BLOCK_LENGTH_BYTES;
        ad = &((uint8_t*)ad)[PI_AD_BLOCK_LENGTH_BYTES];
    }

    ctr_trans(ctx, a, ad_num);
    inject_last_block(a, ad, ad_length_B);
    pi((word_t*)a);
    add_tag(ctx, a);
    ctx->ctr += ad_num;
    inject_tag(ctx->cis, ctx->tag);
    pi((word_t*)ctx->cis);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
cmpq $0x20, %rdx
jb 0x158b
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x10c0
incq %r14
addq $-0x20, %r15
addq $0x20, %r12
cmpq $0x1f, %r15
ja 0x156c
movq %rsp, %r13
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1515
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x15fe
movq %r13, %rdi
callq 0x13e4
vmovdqu 0x40(%rbx), %xmm0
vmovdqu 0x50(%rbx), %xmm1
vpaddd (%r13), %xmm0, %xmm0
vmovdqu %xmm0, 0x40(%rbx)
vpaddd 0x20(%r13), %xmm1, %xmm1
vmovdqu %xmm1, 0x50(%rbx)
addq %r14, 0x60(%rbx)
vpxor (%rbx), %xmm0, %xmm0
vmovdqu %xmm0, (%rbx)
vpxor 0x20(%rbx), %xmm1, %xmm0
vmovdqu %xmm0, 0x20(%rbx)
movq %rbx, %rdi
callq 0x13e4
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/pi32cipher256v2/ref3/pi-cipher.c
// Function: inject_last_block
static void inject_last_block(
        state_t a,
        const void *block,
        size_t length_B )
{
    uint8_t t[PI_RATE_BYTES];
    if (length_B >= PI_RATE_BYTES) {
        /* error */
    	printf("ERROR <%s %s %d>\n", __FILE__, __func__, __LINE__);
        return;
    }
    memset(t, 0, sizeof(t));
    memcpy(t, block, length_B);
    t[length_B] = 1;
    inject_block(a, t);
}

// Assembly:
cmpq $0x1f, %rdx
ja 0x1655
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rdi, %rbx
vxorps %xmm0, %xmm0, %xmm0
movq %rsp, %r15
vmovups %ymm0, (%r15)
movq %r15, %rdi
vzeroupper
callq 0x1110
movb $0x1, (%rsp,%r14)
vmovups (%rbx), %xmm0
vmovups 0x20(%rbx), %xmm1
vxorps (%r15), %xmm0, %xmm0
vmovups %xmm0, (%rbx)
vxorps 0x10(%r15), %xmm1, %xmm0
vmovups %xmm0, 0x20(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/pi32cipher256v2/ref3/pi-cipher.c
// Function: pi32_encrypt_last_block
void PI_ENCRYPT_LAST_BLOCK(
        PI_CTX *ctx,
        void *dest,
        const void *src,
        size_t length_B,
        unsigned long num )
{
    state_t a;
    while (length_B >= PI_PT_BLOCK_LENGTH_BYTES) {
        PI_ENCRYPT_BLOCK(ctx, dest, src, num);
        num++;
        length_B -= PI_PT_BLOCK_LENGTH_BYTES;
        src = &((uint8_t*)src)[PI_PT_BLOCK_LENGTH_BYTES];
        if (dest) {
            dest = &((uint8_t*)dest)[PI_CT_BLOCK_LENGTH_BYTES];
        }
    }
    ctr_trans(ctx, a, num);
    inject_last_block(a, src, length_B);
    if (dest) {
        uint8_t tmp[PI_PT_BLOCK_LENGTH_BYTES];
        extract_block(tmp, a);
        memcpy(dest, tmp, length_B);
    }
    pi((word_t*)a);
    add_tag(ctx, a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r13
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x20, %rcx
jb 0x18cb
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x1050
incq %r13
addq $-0x20, %r14
addq $0x20, %r12
leaq 0x20(%r15), %rax
testq %r15, %r15
cmovneq %rax, %r15
cmpq $0x1f, %r14
ja 0x189e
movq %rsp, %rbp
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x1515
movq %rbp, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x15fe
testq %r15, %r15
je 0x1913
vmovaps (%rsp), %xmm0
vmovaps 0x20(%rsp), %xmm1
leaq 0x40(%rsp), %rsi
vmovaps %xmm0, (%rsi)
vmovaps %xmm1, 0x10(%rsi)
movq %r15, %rdi
movq %r14, %rdx
callq 0x1110
movq %rsp, %r14
movq %r14, %rdi
callq 0x13e4
vmovdqu 0x40(%rbx), %xmm0
vmovdqu 0x50(%rbx), %xmm1
vpaddd (%r14), %xmm0, %xmm0
vmovdqu %xmm0, 0x40(%rbx)
vpaddd 0x20(%r14), %xmm1, %xmm0
vmovdqu %xmm0, 0x50(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq