LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: beaconSource::update(unsigned char, unsigned int, unsigned long, unsigned long, unsigned long, bool)
void beaconSource::update(uint8_t ttl, uint32_t seqnum, uint64_t timestamp, uint64_t now, uint64_t recvts, bool ssm) {
	if (verbose > 2)
		info("beacon(%s%s) update %u, %llu, %llu",
			name.c_str(), (ssm ? "/SSM" : ""), seqnum, timestamp, now);

	beaconMcastState *st = ssm ? &SSM : &ASM;

	st->update(ttl, seqnum, timestamp, now, recvts);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb 0x10(%rbp), %al
movq %rdi, -0x8(%rbp)
movb %sil, -0x9(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x2, 0x21a92(%rip)     # 0x295e8
jle 0x7b9c
movq -0x40(%rbp), %rdi
addq $0x290, %rdi            # imm = 0x290
callq 0x41b0
movq %rax, %rsi
movb -0x29(%rbp), %cl
leaq 0x137ca(%rip), %rdx     # 0x1b33f
leaq 0x14377(%rip), %rax     # 0x1bef3
testb $0x1, %cl
cmovneq %rax, %rdx
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0x1433b(%rip), %rdi     # 0x1bed0
movb $0x0, %al
callq 0x51b0
testb $0x1, -0x29(%rbp)
je 0x7bb2
movq -0x40(%rbp), %rax
addq $0x198, %rax            # imm = 0x198
movq %rax, -0x48(%rbp)
jmp 0x7bc0
movq -0x40(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movb -0x9(%rbp), %al
movl -0x10(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
movzbl %al, %esi
callq 0x7bf0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: beaconMcastState::refresh(unsigned int, unsigned long)
void beaconMcastState::refresh(uint32_t seq, uint64_t now) {
	lastseq = seq;
	s.timestamp = 0;
	s.lastupdate = now;

	packetcount = packetcountreal = 0;
	pointer = 0;

	lastdelay = lastjitter = lastloss = lastdup = lastooo = 0;
	s.avgdelay = s.avgjitter = s.avgloss = s.avgdup = s.avgooo = 0;
	s.valid = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, (%rax)
movq $0x0, 0x28(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x30(%rax)
movl $0x0, 0x8(%rax)
movl $0x0, 0x4(%rax)
movl $0x0, 0xc(%rax)
movl $0x0, 0x20(%rax)
movl $0x0, 0x1c(%rax)
movl $0x0, 0x18(%rax)
movl $0x0, 0x14(%rax)
movl $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x48(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x44(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x40(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x3c(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x38(%rax)
movb $0x0, 0x4c(%rax)
popq %rbp
retq
nop
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: dumpStats(_IO_FILE*, char const*, Stats const&, unsigned long, int, bool)
void dumpStats(FILE *fp, const char *tag, const Stats &s, uint64_t now, int sttl, bool diff) {
	fprintf(fp, "\t\t\t\t<%s", tag);
	if (!diff)
		fprintf(fp, " ttl=\"%i\"", s.rttl);
	else if (sttl)
		fprintf(fp, " ttl=\"%i\"", sttl - s.rttl);
	fprintf(fp, " rptage=\"%u\"", (uint32_t)((now - s.lastupdate) / 1000));
	fprintf(fp, " loss=\"%.1f\"", s.avgloss * 100);
	fprintf(fp, " delay=\"%.3f\"", fabs(s.avgdelay));
	if (s.avgdelay < 0) {
		fprintf(fp, " future=\"true\"");
	}
	fprintf(fp, " jitter=\"%.3f\"", s.avgjitter);
	fprintf(fp, " ooo=\"%.3f\"", s.avgooo * 100);
	fprintf(fp, " dup=\"%.3f\"", s.avgdup * 100);
	fprintf(fp, " />\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
andb $0x1, %al
movb %al, -0x25(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x13ed5(%rip), %rsi     # 0x1bef8
movb $0x0, %al
callq 0x4600
testb $0x1, -0x25(%rbp)
jne 0x804c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl 0x25(%rax), %edx
leaq 0x13ebd(%rip), %rsi     # 0x1bf00
movb $0x0, %al
callq 0x4600
jmp 0x8073
cmpl $0x0, -0x24(%rbp)
je 0x8071
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movzbl 0x25(%rax), %eax
subl %eax, %edx
leaq 0x13e96(%rip), %rsi     # 0x1bf00
movb $0x0, %al
callq 0x4600
jmp 0x8073
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq 0x8(%rcx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movl %eax, %edx
leaq 0x13e74(%rip), %rsi     # 0x1bf0a
movb $0x0, %al
callq 0x4600
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movss 0x12fe3(%rip), %xmm0    # 0x1b090
mulss 0x18(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x13e5a(%rip), %rsi     # 0x1bf17
movb $0x1, %al
callq 0x4600
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movss 0x10(%rax), %xmm0
callq 0xb680
movq -0x30(%rbp), %rdi
cvtss2sd %xmm0, %xmm0
leaq 0x13e3b(%rip), %rsi     # 0x1bf24
movb $0x1, %al
callq 0x4600
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0x10(%rax), %xmm0
jbe 0x810f
movq -0x8(%rbp), %rdi
leaq 0x13e2a(%rip), %rsi     # 0x1bf32
movb $0x0, %al
callq 0x4600
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x13e1a(%rip), %rsi     # 0x1bf41
movb $0x1, %al
callq 0x4600
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movss 0x12f52(%rip), %xmm0    # 0x1b090
mulss 0x20(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x13e02(%rip), %rsi     # 0x1bf50
movb $0x1, %al
callq 0x4600
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movss 0x12f2b(%rip), %xmm0    # 0x1b090
mulss 0x1c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x13de7(%rip), %rsi     # 0x1bf5c
movb $0x1, %al
callq 0x4600
movq -0x8(%rbp), %rdi
leaq 0x14205(%rip), %rsi     # 0x1c38c
movb $0x0, %al
callq 0x4600
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: resolve_tok(char const*, bool)
static const param_tok *resolve_tok(const char *arg, bool longonly) {
	for (int j = 0; param_format[j].sf != NULL; j++) {
		if (param_format[j].lf && !strcmp(arg, param_format[j].lf))
			return &param_format[j];

		if (longonly)
			continue;

		if (!strcmp(arg, param_format[j].sf))
			return &param_format[j];
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movl $0x0, -0x18(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x2080a(%rip), %rax     # 0x28a20
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x82d1
movslq -0x18(%rbp), %rcx
leaq 0x207ed(%rip), %rax     # 0x28a20
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x827d
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rcx
leaq 0x207d0(%rip), %rax     # 0x28a20
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rsi
callq 0x45f0
cmpl $0x0, %eax
jne 0x827d
movslq -0x18(%rbp), %rcx
leaq 0x207b0(%rip), %rax     # 0x28a20
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x82d9
testb $0x1, -0x11(%rbp)
je 0x8285
jmp 0x82c3
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rcx
leaq 0x2078c(%rip), %rax     # 0x28a20
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
callq 0x45f0
cmpl $0x0, %eax
jne 0x82c1
movslq -0x18(%rbp), %rcx
leaq 0x2076c(%rip), %rax     # 0x28a20
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x82d9
jmp 0x82c3
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x820b
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: check_option_value(param_tok const*, char const*, char const*)
static void check_option_value(const param_tok *tok, const char *lp,
	const char *value)
{
	if (tok == NULL)
		fatal("Unknown option `%s`", lp);
	else if (tok->param == REQ_ARG && value == NULL)
		fatal("Parameter `%s` requires an argument.", lp);
	else if (tok->param == NO_ARG && value != NULL)
		fatal("Parameter `%s` doesn't accept an argument.", lp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x831f
movq -0x10(%rbp), %rsi
leaq 0x13d4b(%rip), %rdi     # 0x1c061
movb $0x0, %al
callq 0x5250
jmp 0x836b
movq -0x8(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x8344
cmpq $0x0, -0x18(%rbp)
jne 0x8344
movq -0x10(%rbp), %rsi
leaq 0x13d3a(%rip), %rdi     # 0x1c075
movb $0x0, %al
callq 0x5250
jmp 0x8369
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x8367
cmpq $0x0, -0x18(%rbp)
je 0x8367
movq -0x10(%rbp), %rsi
leaq 0x13d3a(%rip), %rdi     # 0x1c09a
movb $0x0, %al
callq 0x5250
jmp 0x8369
jmp 0x836b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: check_good_string(char const*, char const*)
static const char *check_good_string(const char *what, const char *value) {
	int l = strlen(value);

	for (int i = 0; i < l; i++) {
		if (!isprint(value[i])) {
			fprintf(stderr, "Invalid `%s` string.\n", what);
			exit(1);
		}
	}

	return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x41d0
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x8894
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x4700
cmpl $0x0, %eax
jne 0x8887
movq 0x20768(%rip), %rax     # 0x28fd0
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x13927(%rip), %rsi     # 0x1c19d
movb $0x0, %al
callq 0x4600
movl $0x1, %edi
callq 0x4550
jmp 0x8889
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8843
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: parse_bool(char const*, char const*, bool)
static bool parse_bool(const char *name, const char *arg, bool def) {
	if (arg == NULL)
		return def;

	if (!strcasecmp(arg, "yes"))
		return true;
	else if (!strcasecmp(arg, "true"))
		return true;
	else if (!strcasecmp(arg, "1"))
		return true;
	else if (!strcasecmp(arg, "no"))
		return false;
	else if (!strcasecmp(arg, "false"))
		return false;
	else if (!strcasecmp(arg, "0"))
		return false;

	fatal("%s: Expected one of \'yes\', \'true\', \'no\' or \'false\'.");
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x88cb
movb -0x19(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x898f
movq -0x18(%rbp), %rdi
leaq 0x138dd(%rip), %rsi     # 0x1c1b3
callq 0x44e0
cmpl $0x0, %eax
jne 0x88e9
movb $0x1, -0x1(%rbp)
jmp 0x898f
movq -0x18(%rbp), %rdi
leaq 0x138c3(%rip), %rsi     # 0x1c1b7
callq 0x44e0
cmpl $0x0, %eax
jne 0x8907
movb $0x1, -0x1(%rbp)
jmp 0x898f
movq -0x18(%rbp), %rdi
leaq 0x138aa(%rip), %rsi     # 0x1c1bc
callq 0x44e0
cmpl $0x0, %eax
jne 0x8922
movb $0x1, -0x1(%rbp)
jmp 0x898f
movq -0x18(%rbp), %rdi
leaq 0x13891(%rip), %rsi     # 0x1c1be
callq 0x44e0
cmpl $0x0, %eax
jne 0x893d
movb $0x0, -0x1(%rbp)
jmp 0x898f
movq -0x18(%rbp), %rdi
leaq 0x13879(%rip), %rsi     # 0x1c1c1
callq 0x44e0
cmpl $0x0, %eax
jne 0x8958
movb $0x0, -0x1(%rbp)
jmp 0x898f
movq -0x18(%rbp), %rdi
leaq 0x128fd(%rip), %rsi     # 0x1b260
callq 0x44e0
cmpl $0x0, %eax
jne 0x8973
movb $0x0, -0x1(%rbp)
jmp 0x898f
jmp 0x8975
jmp 0x8977
jmp 0x8979
jmp 0x897b
jmp 0x897d
leaq 0x13843(%rip), %rdi     # 0x1c1c7
movb $0x0, %al
callq 0x5250
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: parse_u32(char const*, char const*)
static uint32_t parse_u32(const char *name, const char *arg) {
	uint32_t result;
	char *end;

	result = strtoul(arg, &end, 10);
	if (end[0] != 0)
		fatal("%s: Expected unsigned integer.", name);

	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x4160
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x8a93
movq -0x8(%rbp), %rsi
leaq 0x13783(%rip), %rdi     # 0x1c20f
movb $0x0, %al
callq 0x5250
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: parse_config_file(char const*)
static void parse_config_file(const char *filename) {
	FILE *f = fopen(filename, "r");

	if (f == NULL)
		fatal("Failed to open configuration file.");

	char linebuf[256];
	int lc = 0;

	while (fgets(linebuf, sizeof(linebuf), f)) {
		char *lp = skip_spaces(linebuf);
		char *val, *end = lp + strlen(lp);

		lc++;

		if (lp[0] == 0 || lp[0] == '#' || strncmp(lp, "//", 2) == 0)
			continue;

		val = strchr(lp, ':');
		if (val) {
			terminate_str(lp, val - 1);
			val = terminate_str(skip_spaces(val + 1), end - 1);
		} else {
			terminate_str(lp, lp + strlen(lp) - 1);
		}

		const param_tok *tok = resolve_tok(lp, true);

		check_option_value(tok, lp, val);

		if (val)
			resolve_string(lp, &val);
		process_param(tok, val);
	}

	fclose(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x13d56(%rip), %rsi     # 0x1c810
callq 0x4530
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8ad8
leaq 0x1375d(%rip), %rdi     # 0x1c22e
movb $0x0, %al
callq 0x5250
movl $0x0, -0x114(%rbp)
leaq -0x110(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x4660
cmpq $0x0, %rax
je 0x8c9f
leaq -0x110(%rbp), %rdi
callq 0x8cc0
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x120(%rbp), %rdi
callq 0x41d0
movq %rax, %rcx
movq -0x140(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x130(%rbp)
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
movq -0x120(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x8b8c
movq -0x120(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x8b8c
movq -0x120(%rbp), %rdi
leaq 0x136d4(%rip), %rsi     # 0x1c251
movl $0x2, %edx
callq 0x4200
cmpl $0x0, %eax
jne 0x8b91
jmp 0x8ae2
movq -0x120(%rbp), %rdi
movl $0x3a, %esi
callq 0x4190
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
je 0x8bf6
movq -0x120(%rbp), %rdi
movq -0x128(%rbp), %rsi
addq $-0x1, %rsi
callq 0x8d00
movq -0x128(%rbp), %rdi
addq $0x1, %rdi
callq 0x8cc0
movq %rax, %rdi
movq -0x130(%rbp), %rsi
addq $-0x1, %rsi
callq 0x8d00
movq %rax, -0x128(%rbp)
jmp 0x8c38
movq -0x120(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x120(%rbp), %rdi
callq 0x41d0
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rdi
addq %rax, %rsi
addq $-0x1, %rsi
callq 0x8d00
movq -0x120(%rbp), %rdi
movl $0x1, %esi
callq 0x81f0
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
movq -0x120(%rbp), %rsi
movq -0x128(%rbp), %rdx
callq 0x82f0
cmpq $0x0, -0x128(%rbp)
je 0x8c87
movq -0x120(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x8d60
movq -0x138(%rbp), %rdi
movq -0x128(%rbp), %rsi
callq 0x8380
jmp 0x8ae2
movq -0x10(%rbp), %rdi
callq 0x4460
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: resolve_string(char const*, char**)
static void resolve_string(const char *name, char **ptr) {
	char *p, *str = (*ptr);

	if (str[0] != '\"')
		return;

	for (p = str + 1; (*p) != '\"'; p++);

	if (p[0] == 0 || p[1] != 0)
		fatal("%s: Bad string format.", name);

	p[0] = 0;

	(*ptr) = str + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x8d89
jmp 0x8df2
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x8db1
jmp 0x8da3
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x8d95
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x8dca
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x8ddc
movq -0x8(%rbp), %rsi
leaq 0x1347f(%rip), %rdi     # 0x1c254
movb $0x0, %al
callq 0x5250
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rcx
addq $0x1, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: update_taccum()
static void update_taccum() {
	uint64_t now = get_timestamp();
	int32_t diff = now - (int64_t)lastclk;

	assert(now >= lastclk);

	lastclk = now;
	taccum += diff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x184e0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
subq 0x20b24(%rip), %rax     # 0x29940
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq 0x20b16(%rip), %rax     # 0x29940
jb 0x8e2e
jmp 0x8e4d
leaq 0x13436(%rip), %rdi     # 0x1c26b
leaq 0x1343e(%rip), %rsi     # 0x1c27a
movl $0x3a9, %edx            # imm = 0x3A9
leaq 0x1343e(%rip), %rcx     # 0x1c286
callq 0x42b0
movq -0x8(%rbp), %rax
movq %rax, 0x20ae8(%rip)     # 0x29940
movl -0xc(%rbp), %eax
addl 0x20ae7(%rip), %eax     # 0x29948
movl %eax, 0x20ae1(%rip)     # 0x29948
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: handle_gc()
void handle_gc() {
	uint64_t now = get_timestamp();

	Sources::iterator i = sources.begin();
	while (i != sources.end()) {
		Sources::iterator k = i;
		i++;

		if (isStillValid(now, k->second.lastevent)) {
			k->second.ASM.s.check_validity(now);
			k->second.SSM.s.check_validity(now);

			beaconSource::ExternalSources::iterator j = k->second.externalSources.begin();
			while (j != k->second.externalSources.end()) {
				beaconSource::ExternalSources::iterator m = j;
				j++;

				if (isStillValid(now, m->second.lastupdate)) {
					m->second.ASM.check_validity(now);
					m->second.SSM.check_validity(now);
				} else {
					k->second.externalSources.erase(m);
				}
			}
		} else {
			removeSource(k->first, true);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
callq 0x184e0
movq %rax, -0x8(%rbp)
leaq 0x203c0(%rip), %rdi     # 0x29508
callq 0xf550
movq %rax, -0x10(%rbp)
leaq 0x203b0(%rip), %rdi     # 0x29508
callq 0xb270
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xb240
testb $0x1, %al
jne 0x9177
jmp 0x9333
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xf580
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xb2a0
movq -0x60(%rbp), %rdi
movq 0x110(%rax), %rsi
callq 0xa6a0
testb $0x1, %al
jne 0x91b8
jmp 0x9318
leaq -0x20(%rbp), %rdi
callq 0xb2a0
movq %rax, %rdi
addq $0x80, %rdi
addq $0xa0, %rdi
addq $0x28, %rdi
movq -0x8(%rbp), %rsi
callq 0x6c70
leaq -0x20(%rbp), %rdi
callq 0xb2a0
movq %rax, %rdi
addq $0x80, %rdi
addq $0x198, %rdi            # imm = 0x198
addq $0x28, %rdi
movq -0x8(%rbp), %rsi
callq 0x6c70
leaq -0x20(%rbp), %rdi
callq 0xb2a0
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
callq 0xf5c0
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xb2a0
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
callq 0xb510
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xf5f0
testb $0x1, %al
jne 0x9262
jmp 0x9316
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xf620
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xb630
movq -0x68(%rbp), %rdi
movq 0x80(%rax), %rsi
callq 0xa6a0
testb $0x1, %al
jne 0x92a0
jmp 0x92e2
leaq -0x40(%rbp), %rdi
callq 0xb630
movq %rax, %rdi
addq $0x80, %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rsi
callq 0x6c70
leaq -0x40(%rbp), %rdi
callq 0xb630
movq %rax, %rdi
addq $0x80, %rdi
addq $0x38, %rdi
movq -0x8(%rbp), %rsi
callq 0x6c70
jmp 0x9311
leaq -0x20(%rbp), %rdi
callq 0xb2a0
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rsi
callq 0xf660
movq %rax, -0x58(%rbp)
jmp 0x9229
jmp 0x932e
leaq -0x20(%rbp), %rdi
callq 0xb2a0
movq %rax, %rdi
movl $0x1, %esi
callq 0x7310
jmp 0x9151
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: do_bw_dump(bool)
void do_bw_dump(bool big) {
	if (big) {
		outputBwStats(600, bigBytesReceived, bigBytesReceived * 8 / (1000. * 600),
					bigBytesSent, bigBytesSent * 8 / (1000. * 600));
		bigBytesReceived = 0;
		bigBytesSent = 0;
		lastDumpBwTS = get_timestamp();
	} else {
		double incomingRate = bytesReceived * 8 / 10000.;

		if (dumpBwReport) {
			d_log(LOG_DEBUG, "BW: Received %u bytes (%.2f Kb/s) Sent %u bytes (%.2f Kb/s)",
					bytesReceived, incomingRate, bytesSent, bytesSent * 8 / 10000.);
		}

		bigBytesReceived += bytesReceived;
		bigBytesSent += bytesSent;
		dumpBytesReceived += bytesReceived;
		dumpBytesSent += bytesSent;
		bytesReceived = 0;
		bytesSent = 0;

		scaleBeaconInterval(incomingRate);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
testb $0x1, -0x1(%rbp)
je 0xa50e
movq 0x1f50f(%rip), %rsi     # 0x29980
movq %rsi, %rax
shlq $0x3, %rax
movq %rax, %xmm0
movaps 0x10bdc(%rip), %xmm3    # 0x1b060
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x10be0(%rip), %xmm2    # 0x1b070
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x10b81(%rip), %xmm1    # 0x1b028
divsd %xmm1, %xmm0
movq 0x1f4d6(%rip), %rdx     # 0x29988
movq %rdx, %rax
shlq $0x3, %rax
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
movsd 0x10b4f(%rip), %xmm2    # 0x1b028
divsd %xmm2, %xmm1
movl $0x258, %edi            # imm = 0x258
callq 0x81a0
movq $0x0, 0x1f48e(%rip) # 0x29980
movq $0x0, 0x1f48b(%rip) # 0x29988
callq 0x184e0
movq %rax, 0x1f40f(%rip)     # 0x29918
jmp 0xa5de
movl 0x1f47c(%rip), %eax     # 0x29990
shll $0x3, %eax
cvtsi2sd %rax, %xmm0
movsd 0x10afc(%rip), %xmm1    # 0x1b020
divsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
testb $0x1, 0x1f3d9(%rip)     # 0x2990d
je 0xa570
movl 0x1f454(%rip), %edx     # 0x29990
movsd -0x10(%rbp), %xmm0
movl 0x21471(%rip), %ecx     # 0x2b9b8
movl %ecx, %eax
shll $0x3, %eax
cvtsi2sd %rax, %xmm1
movsd 0x10ac7(%rip), %xmm2    # 0x1b020
divsd %xmm2, %xmm1
movl $0x7, %edi
leaq 0x11f11(%rip), %rsi     # 0x1c47a
movb $0x2, %al
callq 0x5020
movl 0x1f41a(%rip), %eax     # 0x29990
addq 0x1f403(%rip), %rax     # 0x29980
movq %rax, 0x1f3fc(%rip)     # 0x29980
movl 0x2142e(%rip), %eax     # 0x2b9b8
addq 0x1f3f7(%rip), %rax     # 0x29988
movq %rax, 0x1f3f0(%rip)     # 0x29988
movl 0x1f3f2(%rip), %eax     # 0x29990
addq 0x21423(%rip), %rax     # 0x2b9c8
movq %rax, 0x2141c(%rip)     # 0x2b9c8
movl 0x21406(%rip), %eax     # 0x2b9b8
addq 0x21417(%rip), %rax     # 0x2b9d0
movq %rax, 0x21410(%rip)     # 0x2b9d0
movl $0x0, 0x1f3c6(%rip)     # 0x29990
movl $0x0, 0x213e4(%rip)     # 0x2b9b8
movsd -0x10(%rbp), %xmm0
callq 0xa750
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: send_nprobe(address const&, unsigned int&)
static int send_nprobe(const address &addr, uint32_t &seq) {
	int len;

	len = build_probe(buffer, bufferLen, seq, get_time_of_day());
	seq++;

	len = sendto(mcastSock, buffer, len, 0, addr.saddr(), addr.addrlen());
	if (len > 0)
		bytesSent += len;
	return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
callq 0x17960
movl -0x30(%rbp), %edx
movq %rax, %rcx
leaq 0x1f385(%rip), %rdi     # 0x299a0
movl $0x2000, %esi           # imm = 0x2000
callq 0x19200
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl 0x1f2cb(%rip), %eax     # 0x29904
movl %eax, -0x2c(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x17440
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x17450
movl -0x2c(%rbp), %edi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %r8
movl %eax, %r9d
leaq 0x1f331(%rip), %rsi     # 0x299a0
xorl %ecx, %ecx
callq 0x4060
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0xa68e
movl -0x14(%rbp), %eax
addl 0x21330(%rip), %eax     # 0x2b9b8
movl %eax, 0x2132a(%rip)     # 0x2b9b8
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: doLaunchSomething()
void doLaunchSomething() {
	pid_t p = fork();
	if (p == 0) {
		execlp(launchSomething.c_str(), launchSomething.c_str(),
		       dumpFile.c_str(), NULL);
		exit(errno);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x4110
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0xa744
leaq 0x1f03b(%rip), %rdi     # 0x29738
callq 0x41b0
movq %rax, -0x18(%rbp)
leaq 0x1f02b(%rip), %rdi     # 0x29738
callq 0x41b0
movq %rax, -0x10(%rbp)
leaq 0x1f03b(%rip), %rdi     # 0x29758
callq 0x41b0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x4140
callq 0x4040
movl (%rax), %edi
callq 0x4550
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: scaleBeaconInterval(double)
static void scaleBeaconInterval(double rate) {
	/* `rate' is the incoming data rate in kbit/s gathered from the
	 * last 10 seconds. */

	/* smooth our values */
	if (rate < 4.)
		rate = 4.;

	// Increase traffic will result in a larger interval between probe sending events
	beacInt = 4 * (log(rate) / 1.38);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd %xmm0, -0x8(%rbp)
movsd 0x108cb(%rip), %xmm0    # 0x1b030
ucomisd -0x8(%rbp), %xmm0
jbe 0xa779
movsd 0x108bc(%rip), %xmm0    # 0x1b030
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x4360
movaps %xmm0, %xmm1
movsd 0x108aa(%rip), %xmm0    # 0x1b038
divsd %xmm0, %xmm1
movsd 0x10896(%rip), %xmm0    # 0x1b030
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1eca2(%rip)    # 0x29448
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: Rand()
static inline double Rand() {
	double f = rand();

	/* Prevent 0.0 and 1.0, thanks to Alexander Gall */
	if (f == 0)
		f = 1;
	else if (f == RAND_MAX)
		f = RAND_MAX-1;

	return f / (double)RAND_MAX;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x4120
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xa845
jp 0xa845
movsd 0x10802(%rip), %xmm0    # 0x1b040
movsd %xmm0, -0x8(%rbp)
jmp 0xa869
movsd -0x8(%rbp), %xmm0
movsd 0x107f6(%rip), %xmm1    # 0x1b048
ucomisd %xmm1, %xmm0
jne 0xa867
jp 0xa867
movsd 0x107ee(%rip), %xmm0    # 0x1b050
movsd %xmm0, -0x8(%rbp)
jmp 0xa869
movsd -0x8(%rbp), %xmm0
movsd 0x107d2(%rip), %xmm1    # 0x1b048
divsd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbp
retq
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: MulticastStartup()
void MulticastStartup() {
	int sock = socket(AF_INET, SOCK_DGRAM, 0);
	if (sock > 0) {
		_loc_group_filter flt;
		memset(&flt, 0, sizeof(flt));
		socklen_t fltlen = sizeof(flt);

		// Check if OS supports MCAST_FILTER

		if (getsockopt(sock, IPPROTO_IP, MCAST_FILTER, &flt, &fltlen) == 0
				&& errno != ENOPROTOOPT) {
			if (verbose)
				info("Using new Multicast Filter API");

			_McastListen = _McastListenNewAPI;
		}

		close(sock);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movl $0x2, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x4100
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jle 0x16ebb
leaq -0x118(%rbp), %rdi
xorl %esi, %esi
movl $0x110, %edx            # imm = 0x110
callq 0x4230
movl $0x110, -0x11c(%rbp)    # imm = 0x110
movl -0x4(%rbp), %edi
xorl %esi, %esi
movl $0x30, %edx
leaq -0x118(%rbp), %rcx
leaq -0x11c(%rbp), %r8
callq 0x4320
cmpl $0x0, %eax
jne 0x16eb3
callq 0x4040
cmpl $0x5c, (%rax)
je 0x16eb3
leaq 0x12756(%rip), %rax     # 0x295e8
cmpl $0x0, (%rax)
je 0x16ea5
leaq 0x5814(%rip), %rdi      # 0x1c6b2
movb $0x0, %al
callq 0x51b0
leaq 0x24(%rip), %rax        # 0x16ed0
movq %rax, 0x125b5(%rip)     # 0x29468
movl -0x4(%rbp), %edi
callq 0x4780
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: McastListenNewAPI(int, address const&)
int _McastListenNewAPI(int sock, const address &grpaddr) {
	_loc_group_req grp;

	memset(&grp, 0, sizeof(grp));
	grp.gr_interface = mcastInterface;

	set_address(grp.gr_group, grpaddr);

	return setsockopt(sock, grpaddr.optlevel(), MCAST_JOIN_GROUP, &grp, sizeof(grp));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
movl $0x88, %edx
callq 0x4230
leaq 0x126f4(%rip), %rax     # 0x295f0
movl (%rax), %eax
movl %eax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0x16f60
movl -0x4(%rbp), %eax
movl %eax, -0x9c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x17010
movl -0x9c(%rbp), %edi
movl %eax, %esi
movl $0x2a, %edx
leaq -0x98(%rbp), %rcx
movl $0x88, %r8d
callq 0x4730
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: set_address(sockaddr_storage&, address const&)
static bool set_address(sockaddr_storage &t, const address &addr) {
	if (addr.family() == AF_INET)
		memcpy(&t, addr.v4(), addr.addrlen());
	else if (addr.family() == AF_INET6)
		memcpy(&t, addr.v6(), addr.addrlen());
	else
		return false;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x170e0
cmpl $0x2, %eax
jne 0x16fae
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x17110
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x17450
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movslq %eax, %rdx
callq 0x4390
jmp 0x16ff4
movq -0x18(%rbp), %rdi
callq 0x170e0
cmpl $0xa, %eax
jne 0x16fec
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x17100
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x17450
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movslq %eax, %rdx
callq 0x4390
jmp 0x16ff2
movb $0x0, -0x1(%rbp)
jmp 0x16ff8
jmp 0x16ff4
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: McastListenOldAPI(int, address const&)
int _McastListenOldAPI(int sock, const address &grpaddr) {
	if (grpaddr.family() == AF_INET6) {
		ipv6_mreq mreq;
		mreq.ipv6mr_interface = mcastInterface;
		mreq.ipv6mr_multiaddr = grpaddr.v6()->sin6_addr;

		return setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq));
	} else {
		ip_mreq mreq;
		memset(&mreq, 0, sizeof(mreq));
		// Specifying the interface doesn't work, there's ip_mreqn in linux..
		// but what about other OSs? -hugo
		mreq.imr_multiaddr = grpaddr.v4()->sin_addr;

		return setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x170e0
cmpl $0xa, %eax
jne 0x17091
leaq 0x1259c(%rip), %rax     # 0x295f0
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x17100
movq 0x8(%rax), %rcx
movq %rcx, -0x24(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x1c(%rbp)
movl -0x8(%rbp), %edi
movl $0x29, %esi
movl $0x14, %r8d
leaq -0x24(%rbp), %rcx
movl %r8d, %edx
callq 0x4730
movl %eax, -0x4(%rbp)
jmp 0x170cc
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x4230
movq -0x10(%rbp), %rdi
callq 0x17110
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x8(%rbp), %edi
xorl %esi, %esi
movl $0x23, %edx
leaq -0x2c(%rbp), %rcx
movl $0x8, %r8d
callq 0x4730
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: SSMJoinLeave(int, int, address const&, address const&)
static int SSMJoinLeave(int sock, int type, const address &grpaddr, const address &srcaddr) {
	_loc_group_source_req req;
	memset(&req, 0, sizeof(req));

	req.gsr_interface = mcastInterface;

	set_address(req.gsr_group, grpaddr);
	set_address(req.gsr_source, srcaddr);

	return setsockopt(sock, srcaddr.optlevel(), type, &req, sizeof(req));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x108, %edx            # imm = 0x108
callq 0x4230
leaq 0x1243d(%rip), %rax     # 0x295f0
movl (%rax), %eax
movl %eax, -0x120(%rbp)
leaq -0x120(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0x16f60
leaq -0x120(%rbp), %rdi
addq $0x88, %rdi
movq -0x18(%rbp), %rsi
callq 0x16f60
movl -0x4(%rbp), %eax
movl %eax, -0x124(%rbp)
movq -0x18(%rbp), %rdi
callq 0x17010
movl -0x124(%rbp), %edi
movl %eax, %esi
movl -0x8(%rbp), %edx
leaq -0x120(%rbp), %rcx
movl $0x108, %r8d            # imm = 0x108
callq 0x4730
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nop
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: SetHops(int, address const&, int)
bool SetHops(int sock, const address &addr, int ttl) {
	if (addr.optlevel() == IPPROTO_IPV6) {
		if (setsockopt(sock, addr.optlevel(), IPV6_MULTICAST_HOPS, &ttl, sizeof(ttl)) != 0) {
			return false;
		}
	} else {
		TTLType _ttl = ttl;

		if (setsockopt(sock, addr.optlevel(), IP_MULTICAST_TTL, &_ttl, sizeof(_ttl)) != 0) {
			return false;
		}
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x17010
cmpl $0x29, %eax
jne 0x174d5
movl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x17010
movl -0x1c(%rbp), %edi
movl %eax, %esi
movl $0x12, %edx
leaq -0x14(%rbp), %rcx
movl $0x4, %r8d
callq 0x4730
cmpl $0x0, %eax
je 0x174d3
movb $0x0, -0x1(%rbp)
jmp 0x17514
jmp 0x17510
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x17010
movl -0x20(%rbp), %edi
movl %eax, %esi
movl $0x21, %edx
leaq -0x18(%rbp), %rcx
movl $0x4, %r8d
callq 0x4730
cmpl $0x0, %eax
je 0x1750e
movb $0x0, -0x1(%rbp)
jmp 0x17514
jmp 0x17510
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::is_multicast() const
bool address::is_multicast() const {
	if (stor.ss_family == AF_INET6)
		return IN6_IS_ADDR_MULTICAST(&v6()->sin6_addr);
	else if (stor.ss_family == AF_INET)
		return IN_CLASSD(htonl(v4()->sin_addr.s_addr));
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movzwl (%rax), %eax
cmpl $0xa, %eax
jne 0x17558
movq -0x18(%rbp), %rdi
callq 0x17100
movzbl 0x8(%rax), %eax
cmpl $0xff, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1758f
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x17589
movq -0x18(%rbp), %rdi
callq 0x17110
movl 0x4(%rax), %edi
callq 0x4330
andl $0xf0000000, %eax       # imm = 0xF0000000
cmpl $0xe0000000, %eax       # imm = 0xE0000000
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1758f
jmp 0x1758b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: RequireToAddress(int, address const&)
bool RequireToAddress(int sock, const address &addr) {
#ifdef IPV6_PKTINFO
	if (addr.family() == AF_INET6) {
		int on = 1;
		return setsockopt(sock, IPPROTO_IPV6, IPV6_PKTINFO, &on, sizeof(on)) == 0;
	}
#endif

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x170e0
cmpl $0xa, %eax
jne 0x175ed
movl $0x1, -0x14(%rbp)
movl -0x8(%rbp), %edi
movl $0x29, %esi
movl $0x32, %edx
leaq -0x14(%rbp), %rcx
movl $0x4, %r8d
callq 0x4730
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x175f1
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::set_family(int)
bool address::set_family(int family) {
	if (family != AF_INET && family != AF_INET6)
		return false;
	stor.ss_family = family;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x2, -0x14(%rbp)
je 0x17925
cmpl $0xa, -0x14(%rbp)
je 0x17925
movb $0x0, -0x1(%rbp)
jmp 0x17933
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw (%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: get_time_of_day()
uint64_t get_time_of_day() {
	struct timeval tv;
	uint64_t timestamp;

	if (gettimeofday(&tv, 0) != 0)
		return 0;

	timestamp = tv.tv_sec;
	timestamp *= 1000;
	timestamp += tv.tv_usec / 1000;

	return timestamp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4690
cmpl $0x0, %eax
je 0x17984
movq $0x0, -0x8(%rbp)
jmp 0x179b6
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
imulq $0x3e8, -0x20(%rbp), %rax # imm = 0x3E8
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: SendTo(int, unsigned char const*, int, address const&, address const&)
int SendTo(int sock, const uint8_t *buffer, int len, const address &from, const address &to) {
#ifdef IPV6_PKTINFO
	if (from.family() == AF_INET6) {
		uint8_t ctlbuf[CMSG_SPACE(sizeof(in6_pktinfo))];

		cmsghdr *chdr = (cmsghdr *)ctlbuf;
		chdr->cmsg_len = CMSG_LEN(sizeof(in6_pktinfo));
		chdr->cmsg_level = IPPROTO_IPV6;
		chdr->cmsg_type = IPV6_PKTINFO;

		in6_pktinfo *info = (in6_pktinfo *)CMSG_DATA(chdr);
		info->ipi6_addr = from.v6()->sin6_addr;
		info->ipi6_ifindex = 0;

		msghdr msg;
		iovec iov;

		msg.msg_name = (char *)to.saddr();
		msg.msg_namelen = to.addrlen();
		msg.msg_iov = &iov;
		msg.msg_iovlen = 1;
		msg.msg_control = (char *)ctlbuf;
		msg.msg_controllen = sizeof(ctlbuf);
		msg.msg_flags = 0;

		iov.iov_base = (char *)buffer;
		iov.iov_len = len;

		return sendmsg(sock, &msg, 0);
	}
#endif
	return sendto(sock, buffer, len, 0, to.saddr(), to.addrlen());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x170e0
cmpl $0xa, %eax
jne 0x17ac6
leaq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq $0x24, (%rax)
movq -0x58(%rbp), %rax
movl $0x29, 0x8(%rax)
movq -0x58(%rbp), %rax
movl $0x32, 0xc(%rax)
movq -0x58(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rdi
callq 0x17100
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq 0x8(%rcx), %rdx
movq %rdx, (%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x28(%rbp), %rdi
callq 0x17440
movq %rax, -0x98(%rbp)
movq -0x28(%rbp), %rdi
callq 0x17450
movl %eax, -0x90(%rbp)
leaq -0xa8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq $0x1, -0x80(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x78(%rbp)
movq $0x28, -0x70(%rbp)
movl $0x0, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0x8(%rbp), %edi
leaq -0x98(%rbp), %rsi
xorl %edx, %edx
callq 0x4380
movl %eax, -0x4(%rbp)
jmp 0x17b26
movl -0x8(%rbp), %eax
movl %eax, -0xc4(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x28(%rbp), %rdi
callq 0x17440
movq %rax, -0xb0(%rbp)
movq -0x28(%rbp), %rdi
callq 0x17450
movl -0xc4(%rbp), %edi
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq -0xb0(%rbp), %r8
movl %eax, %r9d
xorl %ecx, %ecx
callq 0x4060
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::parse(char const*, bool, bool)
bool address::parse(const char *str, bool multicast, bool addport) {
	char tmp[128];
	strncpy(tmp, str, sizeof(tmp));

	char *port = strchr(tmp, '/');
	if (port) {
		*port = 0;
		port ++;
	} else if (addport) {
		port = (char *)defaultPort;
	}

	int cres;
	addrinfo hint, *rres, *res;
	memset(&hint, 0, sizeof(hint));

	hint.ai_family = forceFamily;
	hint.ai_socktype = SOCK_DGRAM;

	if ((cres = getaddrinfo(*tmp ? tmp : 0, port, &hint, &rres)) != 0) {
		info("getaddrinfo failed: %s", gai_strerror(cres));
		return false;
	}

	for (res = rres; res; res = res->ai_next) {
		set(res->ai_addr);
		if (multicast) {
			if (is_multicast())
				break;
		} else if (!is_unspecified())
			break;
	}

	freeaddrinfo(rres);

	if (!res) {
		info("Failed to resolve %s", tmp);
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movb %cl, %al
movb %dl, %cl
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %cl
movb %cl, -0x19(%rbp)
andb $0x1, %al
movb %al, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0xa0(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x80, %edx
callq 0x4210
leaq -0xa0(%rbp), %rdi
movl $0x2f, %esi
callq 0x4190
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x17c72
movq -0xa8(%rbp), %rax
movb $0x0, (%rax)
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
jmp 0x17c8b
testb $0x1, -0x1a(%rbp)
je 0x17c89
leaq 0x10d91(%rip), %rax     # 0x28a10
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
jmp 0x17c8b
leaq -0xe0(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x4230
leaq 0x11b4b(%rip), %rax     # 0x297f0
movl (%rax), %eax
movl %eax, -0xdc(%rbp)
movl $0x2, -0xd8(%rbp)
cmpb $0x0, -0xa0(%rbp)
je 0x17cd0
leaq -0xa0(%rbp), %rax
movq %rax, -0x100(%rbp)
jmp 0x17cdb
xorl %eax, %eax
movq %rax, -0x100(%rbp)
jmp 0x17cdb
movq -0x100(%rbp), %rdi
movq -0xa8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
leaq -0xe8(%rbp), %rcx
callq 0x4590
movl %eax, -0xac(%rbp)
cmpl $0x0, %eax
je 0x17d2c
movl -0xac(%rbp), %edi
callq 0x45e0
movq %rax, %rsi
leaq 0x4a67(%rip), %rdi      # 0x1c783
movb $0x0, %al
callq 0x51b0
movb $0x0, -0x1(%rbp)
jmp 0x17dd6
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
cmpq $0x0, -0xf0(%rbp)
je 0x17da1
movq -0xf8(%rbp), %rdi
movq -0xf0(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x17df0
testb $0x1, -0x19(%rbp)
je 0x17d77
movq -0xf8(%rbp), %rdi
callq 0x17520
testb $0x1, %al
jne 0x17d73
jmp 0x17d75
jmp 0x17da1
jmp 0x17d8b
movq -0xf8(%rbp), %rdi
callq 0x17ea0
testb $0x1, %al
jne 0x17d89
jmp 0x17da1
jmp 0x17d8b
jmp 0x17d8d
movq -0xf0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xf0(%rbp)
jmp 0x17d3a
movq -0xe8(%rbp), %rdi
callq 0x45b0
cmpq $0x0, -0xf0(%rbp)
jne 0x17dd2
leaq -0xa0(%rbp), %rsi
leaq 0x49d5(%rip), %rdi      # 0x1c79a
movb $0x0, %al
callq 0x51b0
movb $0x0, -0x1(%rbp)
jmp 0x17dd6
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::set(sockaddr const*)
void address::set(const sockaddr *sa) {
	stor.ss_family = sa->sa_family;
	if (stor.ss_family == AF_INET6) {
		v6()->sin6_addr = ((const sockaddr_in6 *)sa)->sin6_addr;
		v6()->sin6_port = ((const sockaddr_in6 *)sa)->sin6_port;
	} else {
		v4()->sin_addr = ((const sockaddr_in *)sa)->sin_addr;
		v4()->sin_port = ((const sockaddr_in *)sa)->sin_port;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movw (%rcx), %cx
movw %cx, (%rax)
movzwl (%rax), %eax
cmpl $0xa, %eax
jne 0x17e5e
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x17950
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rdi
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movw 0x2(%rax), %ax
movw %ax, -0x1a(%rbp)
callq 0x17950
movw -0x1a(%rbp), %cx
movw %cx, 0x2(%rax)
jmp 0x17e96
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x17be0
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rdi
movl 0x4(%rcx), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movw 0x2(%rax), %ax
movw %ax, -0x2a(%rbp)
callq 0x17be0
movw -0x2a(%rbp), %cx
movw %cx, 0x2(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::is_unspecified() const
bool address::is_unspecified() const {
	if (stor.ss_family == AF_INET6)
		return IN6_IS_ADDR_UNSPECIFIED(&v6()->sin6_addr);
	else if (stor.ss_family == AF_INET)
		return v4()->sin_addr.s_addr == 0;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movzwl (%rax), %eax
cmpl $0xa, %eax
jne 0x17f19
movq -0x28(%rbp), %rdi
callq 0x17100
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x29(%rbp)
jne 0x17f07
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x4(%rcx)
movb %al, -0x29(%rbp)
jne 0x17f07
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x8(%rcx)
movb %al, -0x29(%rbp)
jne 0x17f07
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x17f42
movq -0x28(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x17f3c
movq -0x28(%rbp), %rdi
callq 0x17110
cmpl $0x0, 0x4(%rax)
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x17f42
jmp 0x17f3e
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::set_addr(char const*)
bool address::set_addr(const char *addr) {
	if (stor.ss_family == AF_INET) {
		if (inet_pton(AF_INET, addr, &v4()->sin_addr) <= 0)
			return false;
	} else if (stor.ss_family == AF_INET6) {
		if (inet_pton(AF_INET6, addr, &v6()->sin6_addr) <= 0)
			return false;
	} else {
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x17fa3
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x17be0
movq -0x28(%rbp), %rsi
movq %rax, %rdx
addq $0x4, %rdx
movl $0x2, %edi
callq 0x4770
cmpl $0x0, %eax
jg 0x17fa1
movb $0x0, -0x1(%rbp)
jmp 0x17fee
jmp 0x17fea
movq -0x20(%rbp), %rax
movzwl (%rax), %eax
cmpl $0xa, %eax
jne 0x17fe2
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x17950
movq -0x30(%rbp), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movl $0xa, %edi
callq 0x4770
cmpl $0x0, %eax
jg 0x17fe0
movb $0x0, -0x1(%rbp)
jmp 0x17fee
jmp 0x17fe8
movb $0x0, -0x1(%rbp)
jmp 0x17fee
jmp 0x17fea
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::set_port(int)
bool address::set_port(int port) {
	if (stor.ss_family == AF_INET) {
		v4()->sin_port = htons(port);
	} else if (stor.ss_family == AF_INET6) {
		v6()->sin6_port = htons(port);
	} else {
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x18041
movl -0x14(%rbp), %eax
movzwl %ax, %edi
callq 0x4050
movq -0x20(%rbp), %rdi
movw %ax, -0x22(%rbp)
callq 0x17be0
movw -0x22(%rbp), %cx
movw %cx, 0x2(%rax)
jmp 0x18077
movq -0x20(%rbp), %rax
movzwl (%rax), %eax
cmpl $0xa, %eax
jne 0x1806f
movl -0x14(%rbp), %eax
movzwl %ax, %edi
callq 0x4050
movq -0x20(%rbp), %rdi
movw %ax, -0x24(%rbp)
callq 0x17950
movw -0x24(%rbp), %cx
movw %cx, 0x2(%rax)
jmp 0x18075
movb $0x0, -0x1(%rbp)
jmp 0x1807b
jmp 0x18077
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)