LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/dbeacon.cpp
// Function: show_version()
void show_version() {
	fprintf(stderr, "\n");
	fprintf(stderr, "dbeacon - a Multicast Beacon %s\n", versionInfo);
	fprintf(stderr, "\n");
	fprintf(stderr, "  Copyright (c) 2005-7, Hugo Santos <hugo@fivebits.net>\n");
	fprintf(stderr, "\n");
	fprintf(stderr, "  http://fivebits.net/proj/dbeacon\n");
	fprintf(stderr, "\n");
	fprintf(stderr, "  o Ideas, IPv4 port, SSM pushing by Hoerdt Mickael;\n");
	fprintf(stderr, "  o Ideas and testing by Sebastien Chaumontet;\n");
	fprintf(stderr, "  o SSM Ping originaly by Stig Venaas\n");
	fprintf(stderr, "    - first proposed by Pavan Namburi, Kamil Sarac and Kevin C. Almeroth;\n");
	fprintf(stderr, "  o Bernhard Schmidt provided valuable resources and helped during testing.\n");
	fprintf(stderr, "\n");

	exit(1);
}

// Assembly:
pushq %rbx
movq 0xbb59(%rip), %rbx      # 0x11fd0
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x3480
movq (%rbx), %rdi
leaq 0x6712(%rip), %rsi      # 0xcba0
leaq 0x672c(%rip), %rdx      # 0xcbc1
xorl %eax, %eax
callq 0x34e0
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x3480
movq (%rbx), %rcx
leaq 0x671e(%rip), %rdi      # 0xcbd1
movl $0x38, %esi
movl $0x1, %edx
callq 0x3650
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x3480
movq (%rbx), %rcx
leaq 0x6731(%rip), %rdi      # 0xcc0a
movl $0x23, %esi
movl $0x1, %edx
callq 0x3650
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x3480
movq (%rbx), %rcx
leaq 0x672f(%rip), %rdi      # 0xcc2e
movl $0x35, %esi
movl $0x1, %edx
callq 0x3650
movq (%rbx), %rcx
leaq 0x674c(%rip), %rdi      # 0xcc64
movl $0x2f, %esi
movl $0x1, %edx
callq 0x3650
movq (%rbx), %rcx
leaq 0x6763(%rip), %rdi      # 0xcc94
movl $0x26, %esi
movl $0x1, %edx
callq 0x3650
movq (%rbx), %rcx
leaq 0x6771(%rip), %rdi      # 0xccbb
movl $0x4a, %esi
movl $0x1, %edx
callq 0x3650
movq (%rbx), %rcx
leaq 0x67a3(%rip), %rdi      # 0xcd06
movl $0x4c, %esi
movl $0x1, %edx
callq 0x3650
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x3480
movl $0x1, %edi
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/dbeacon.cpp
// Function: insert_sorted_event(timer&)
void insert_sorted_event(timer &t) {
	uint32_t accum = 0;

	tq_def::iterator i = timers.begin();

	while (1) {
		if (i == timers.end() || (accum + i->target) >= t.interval)
			break;
		accum += i->target;
		++i;
	}

	t.target = t.interval - accum;

	if (i != timers.end())
		i->target -= t.target;

	if (timers.empty()) {
		lastclk = get_timestamp();
		taccum = 0;
	}

	timers.insert(i, t);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xc2d1(%rip), %rax      # 0x12868
leaq 0xc2ca(%rip), %rcx      # 0x12868
cmpq %rcx, %rax
je 0x65c1
movl 0x4(%rbx), %esi
xorl %edi, %edi
movq %rax, %r14
movl 0x18(%r14), %edx
addl %edi, %edx
cmpl %esi, %edx
jae 0x65c8
movq (%r14), %r14
movl %edx, %edi
cmpq %rcx, %r14
jne 0x65ab
jmp 0x65ca
xorl %edx, %edx
movq %rax, %r14
jmp 0x65ca
movl %edi, %edx
movl 0x4(%rbx), %esi
subl %edx, %esi
movl %esi, 0x8(%rbx)
cmpq %rcx, %r14
je 0x65db
subl %esi, 0x18(%r14)
cmpq %rcx, %rax
jne 0x65f6
callq 0xa6ca
movq %rax, 0xc294(%rip)      # 0x12880
movl $0x0, 0xc292(%rip)      # 0x12888
movl $0x20, %edi
callq 0x33c0
movq (%rbx), %rcx
movq %rcx, 0x10(%rax)
movl 0x8(%rbx), %ecx
movl %ecx, 0x18(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x3050
incq 0xc259(%rip)            # 0x12878
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/dbeacon.cpp
// Function: beaconExternalStats::beaconExternalStats()
Stats::Stats() {
	valid = false;
	timestamp = lastupdate = 0;
	avgdelay = avgjitter = avgloss = avgdup = avgooo = 0;
	rttl = 0;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x2e(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movq %rax, 0x56(%rdi)
movb %al, 0x60(%rdi)
leaq 0x78(%rdi), %rcx
movq %rcx, 0x68(%rdi)
movq %rax, 0x70(%rdi)
movb %al, 0x78(%rdi)
leaq 0x98(%rdi), %rcx
movq %rcx, 0x88(%rdi)
movq %rax, 0x90(%rdi)
movb %al, 0x98(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/dbeacon.cpp
// Function: beaconSource::getExternal(address const&, unsigned long, unsigned long)
beaconExternalStats &beaconSource::getExternal(const address &baddr, uint64_t now, uint64_t ts) {
	ExternalSources::iterator k = externalSources.find(baddr);
	if (k == externalSources.end()) {
		externalSources.insert(make_pair(baddr, beaconExternalStats()));
		k = externalSources.find(baddr);

		k->second.age = 0;

		if (verbose) {
			char tmp[64];
			info("Adding external source (%s) %s", name.c_str(), baddr.to_string(tmp, sizeof(tmp)));
		}
	}

	beaconExternalStats &stats = k->second;

	stats.lastupdate = now;

	return stats;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2f8(%rdi), %r12
movq %r12, %rdi
callq 0x97f2
movq %rax, %r13
leaq 0x300(%r15), %rax
cmpq %rax, %r13
jne 0x6d38
xorl %eax, %eax
leaq 0x80(%rsp), %r13
movq %rax, -0x4a(%r13)
xorps %xmm0, %xmm0
movups %xmm0, -0x58(%r13)
movups %xmm0, -0x68(%r13)
movups %xmm0, -0x40(%r13)
movups %xmm0, -0x30(%r13)
movq %rax, -0x22(%r13)
movb %al, -0x18(%r13)
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0xa0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
leaq 0xb0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x8d3a
leaq 0xb0(%rsp), %rsi
movq %r12, %rdi
callq 0x985a
leaq 0x1c8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c8a
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x33d0
leaq 0x1a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cab
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x33d0
movq 0x90(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6cc8
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x33d0
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x6ce2
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x33d0
movq %r12, %rdi
movq %r14, %rsi
callq 0x97f2
movq %rax, %r13
movl $0x0, 0xa8(%rax)
cmpl $0x0, 0xb837(%rip)      # 0x12538
je 0x6d38
movq 0x290(%r15), %r15
leaq 0xb0(%rsp), %rsi
movl $0x40, %edx
movq %r14, %rdi
movl $0x1, %ecx
callq 0xa578
leaq 0x608a(%rip), %rdi      # 0xcdb5
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x40b4
movq %rbx, 0xa0(%r13)
addq $0xa0, %r13
movq %r13, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x7bc4
jmp 0x6d70
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7c08
movq %rbx, %rdi
callq 0x35d0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movl %edx, %ebp
movq %rdi, %r13
movb 0x40(%rsp), %bl
cmpl $0x3, 0xb795(%rip)      # 0x12538
jl 0x6de4
movl %esi, 0x4(%rsp)
movq 0x290(%r13), %rsi
leaq 0x6040(%rip), %rax      # 0xcdf7
leaq 0x5485(%rip), %rdx      # 0xc243
testb %bl, %bl
cmovneq %rax, %rdx
leaq 0x6009(%rip), %rdi      # 0xcdd4
movl %ebp, %ecx
movq %r15, %r8
movq %r9, %r12
movq %r14, %r9
xorl %eax, %eax
callq 0x40b4
movl 0x4(%rsp), %esi
movq %r12, %r9
leaq 0xa0(%r13), %rax
addq $0x198, %r13            # imm = 0x198
testb %bl, %bl
cmoveq %rax, %r13
movzbl %sil, %esi
movq %r13, %rdi
movl %ebp, %edx
movq %r15, %rcx
movq %r14, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6e1a
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %r12d
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x5db2(%rip), %rsi      # 0xcdfc
xorl %eax, %eax
callq 0x34e0
testl %r12d, %r12d
je 0x7063
testl %ebp, %ebp
je 0x707b
movzbl 0x25(%r14), %eax
subl %eax, %ebp
jmp 0x7068
movzbl 0x25(%r14), %ebp
leaq 0x5d95(%rip), %rsi      # 0xce04
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x34e0
subq 0x8(%r14), %r15
shrq $0x3, %r15
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
movq %r15, %rax
mulq %rcx
shrq $0x4, %rdx
leaq 0x5d70(%rip), %rsi      # 0xce0e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x34e0
movss 0x18(%r14), %xmm0
mulss 0x50a6(%rip), %xmm0     # 0xc15c
cvtss2sd %xmm0, %xmm0
leaq 0x5d5a(%rip), %rsi      # 0xce1b
movq %rbx, %rdi
movb $0x1, %al
callq 0x34e0
movss 0x10(%r14), %xmm0
andps 0x4fc8(%rip), %xmm0     # 0xc0a0
cvtss2sd %xmm0, %xmm0
leaq 0x5d45(%rip), %rsi      # 0xce28
movq %rbx, %rdi
movb $0x1, %al
callq 0x34e0
xorps %xmm0, %xmm0
ucomiss 0x10(%r14), %xmm0
jbe 0x7110
leaq 0x5d38(%rip), %rdi      # 0xce36
movl $0xe, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3650
xorps %xmm0, %xmm0
cvtss2sd 0x14(%r14), %xmm0
leaq 0x5d25(%rip), %rsi      # 0xce45
movq %rbx, %rdi
movb $0x1, %al
callq 0x34e0
movss 0x20(%r14), %xmm0
mulss 0x5024(%rip), %xmm0     # 0xc15c
cvtss2sd %xmm0, %xmm0
leaq 0x5d11(%rip), %rsi      # 0xce54
movq %rbx, %rdi
movb $0x1, %al
callq 0x34e0
movss 0x5007(%rip), %xmm0     # 0xc15c
mulss 0x1c(%r14), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x5cfa(%rip), %rsi      # 0xce60
movq %rbx, %rdi
movb $0x1, %al
callq 0x34e0
leaq 0x6101(%rip), %rdi      # 0xd278
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3650
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
movq %rdi, %r14
leaq 0xa866(%rip), %rbp      # 0x11a10
leaq 0x6179(%rip), %r12      # 0xd32a
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %rbp, %r15
movq 0x10(%r13,%rbp), %rsi
testq %rsi, %rsi
je 0x71cf
movq %r14, %rdi
callq 0x34d0
testl %eax, %eax
je 0x7209
cmpb $0x0, 0x4(%rsp)
jne 0x71e5
movq %r14, %rdi
movq %r12, %rsi
callq 0x34d0
testl %eax, %eax
je 0x7213
incq %rbx
movq %rbx, %r15
shlq $0x5, %r15
addq %rbp, %r15
movq 0x28(%r13,%rbp), %r12
addq $0x20, %r13
cmpq $0x360, %r13            # imm = 0x360
jne 0x71b9
xorl %r15d, %r15d
jmp 0x7213
leaq 0xa800(%rip), %r15      # 0x11a10
addq %r13, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rax
testq %rdi, %rdi
je 0x7251
movl 0x18(%rdi), %eax
cmpl $0x1, %eax
setne %cl
testq %rdx, %rdx
setne %dil
orb %cl, %dil
je 0x725a
testl %eax, %eax
setne %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
je 0x7263
popq %rax
retq
leaq 0x5d0f(%rip), %rdi      # 0xcf67
jmp 0x726a
leaq 0x5d1a(%rip), %rdi      # 0xcf7b
jmp 0x726a
leaq 0x5d36(%rip), %rdi      # 0xcfa0
xorl %eax, %eax
callq 0x4147
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3180
movq %rax, %r15
testl %r15d, %r15d
jle 0x78e2
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movsbl (%r14,%r12), %edi
callq 0x35e0
testl %eax, %eax
je 0x78f1
incq %r12
cmpq %r12, %r15
jne 0x78cc
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x3767
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x797a
movq %rdi, %rbx
leaq 0x5794(%rip), %rsi      # 0xd09f
callq 0x3400
movb $0x1, %bpl
testl %eax, %eax
je 0x797c
leaq 0x5785(%rip), %rsi      # 0xd0a3
movq %rbx, %rdi
callq 0x3400
testl %eax, %eax
je 0x797c
leaq 0x5777(%rip), %rsi      # 0xd0a8
movq %rbx, %rdi
callq 0x3400
testl %eax, %eax
je 0x797c
leaq 0x5766(%rip), %rsi      # 0xd0aa
movq %rbx, %rdi
callq 0x3400
testl %eax, %eax
je 0x7976
leaq 0x5756(%rip), %rsi      # 0xd0ad
movq %rbx, %rdi
callq 0x3400
testl %eax, %eax
je 0x7976
leaq 0x47fa(%rip), %rsi      # 0xc164
movq %rbx, %rdi
callq 0x3400
testl %eax, %eax
jne 0x7985
xorl %ebp, %ebp
jmp 0x797c
movl %esi, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x5727(%rip), %rdi      # 0xd0b3
xorl %eax, %eax
callq 0x4147
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq %rsi, %rdi
movq %r14, %rsi
movl $0xa, %edx
callq 0x3130
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x79bd
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5737(%rip), %rdi      # 0xd0fb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4147
// File: /workspace/github_cpp_makefile_star2_O1/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 %rax
callq 0xa6ca
movq 0xaea5(%rip), %rcx      # 0x12880
cmpq %rcx, %rax
jb 0x79f3
movl %eax, %edx
subl %ecx, %edx
movq %rax, 0xae95(%rip)      # 0x12880
addl %edx, 0xae97(%rip)      # 0x12888
popq %rax
retq
leaq 0x575d(%rip), %rdi      # 0xd157
leaq 0x5765(%rip), %rsi      # 0xd166
leaq 0x576a(%rip), %rcx      # 0xd172
movl $0x3a9, %edx            # imm = 0x3A9
callq 0x3260
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %ebp
callq 0xa1f6
leaq 0xaeaf(%rip), %r15      # 0x128e0
movq %r15, %rdi
movl $0x2000, %esi           # imm = 0x2000
movl %ebp, %edx
movq %rax, %rcx
callq 0xae86
incl (%rbx)
movl 0xae09(%rip), %ebx      # 0x12854
movslq %eax, %r12
movq %r14, %rdi
callq 0x9f60
movq %rax, %r13
movq %r14, %rdi
callq 0x9f64
movl %ebx, %edi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
movq %r13, %r8
movl %eax, %r9d
callq 0x3040
testl %eax, %eax
jle 0x7a80
addl %eax, 0xce78(%rip)      # 0x148f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl $0x2, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x30d0
testl %eax, %eax
jle 0x9bc7
movl %eax, %ebx
leaq 0x8(%rsp), %r14
movl $0x110, %edx            # imm = 0x110
movq %r14, %rdi
xorl %esi, %esi
callq 0x31f0
leaq 0x4(%rsp), %r8
movl $0x110, (%r8)           # imm = 0x110
movl %ebx, %edi
xorl %esi, %esi
movl $0x30, %edx
movq %r14, %rcx
callq 0x32b0
testl %eax, %eax
jne 0x9bc0
callq 0x3030
cmpl $0x5c, (%rax)
je 0x9bc0
leaq 0x8999(%rip), %rax      # 0x12538
cmpl $0x0, (%rax)
je 0x9bb2
leaq 0x39f3(%rip), %rdi      # 0xd59e
xorl %eax, %eax
callq 0x40b4
leaq 0x19(%rip), %rax        # 0x9bd2
movq %rax, 0x8808(%rip)      # 0x123c8
movl %ebx, %edi
callq 0x3660
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq %rsp, %r15
xorl %ebp, %ebp
movl $0x88, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x31f0
leaq 0x8941(%rip), %rax      # 0x12540
movl (%rax), %eax
movl %eax, (%r15)
movzwl (%r14), %r15d
movl %r15d, %eax
orl $0x8, %eax
cmpl $0xa, %eax
jne 0x9c33
leaq 0x8(%rsp), %rdi
cmpw $0xa, %r15w
movl $0x1c, %eax
movl $0x10, %edx
cmoveq %rax, %rdx
movq %r14, %rsi
callq 0x3300
cmpw $0xa, %r15w
movl $0x29, %eax
cmovel %eax, %ebp
movq %rsp, %rcx
movl %ebx, %edi
movl %ebp, %esi
movl $0x2a, %edx
movl $0x88, %r8d
callq 0x3600
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
subq $0x18, %rsp
cmpw $0xa, (%rsi)
jne 0x9ca7
leaq 0x88ba(%rip), %rax      # 0x12540
movl (%rax), %eax
movq %rsp, %rcx
movl %eax, 0x10(%rcx)
movups 0x8(%rsi), %xmm0
movaps %xmm0, (%rcx)
movl $0x29, %esi
movl $0x14, %edx
movl $0x14, %r8d
jmp 0x9cc3
movq %rsp, %rcx
movq $0x0, (%rcx)
movl 0x4(%rsi), %eax
movl %eax, (%rcx)
xorl %esi, %esi
movl $0x23, %edx
movl $0x8, %r8d
callq 0x3600
addq $0x18, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebx
movl %edi, %ebp
leaq 0x8(%rsp), %r12
movl $0x108, %edx            # imm = 0x108
movq %r12, %rdi
xorl %esi, %esi
callq 0x31f0
leaq 0x881c(%rip), %rax      # 0x12540
movl (%rax), %eax
movl %eax, (%r12)
movzwl (%r15), %eax
movl %eax, %ecx
orl $0x8, %ecx
cmpl $0xa, %ecx
jne 0x9d57
leaq 0x10(%rsp), %rdi
cmpw $0xa, %ax
movl $0x1c, %eax
movl $0x10, %edx
cmoveq %rax, %rdx
movq %r15, %rsi
callq 0x3300
movzwl (%r14), %r15d
movl %r15d, %eax
orl $0x8, %eax
cmpl $0xa, %eax
jne 0x9d89
leaq 0x90(%rsp), %rdi
cmpw $0xa, %r15w
movl $0x1c, %eax
movl $0x10, %edx
cmoveq %rax, %rdx
movq %r14, %rsi
callq 0x3300
xorl %eax, %eax
cmpw $0xa, %r15w
movl $0x29, %esi
cmovnel %eax, %esi
leaq 0x8(%rsp), %rcx
movl %ebp, %edi
movl %ebx, %edx
movl $0x108, %r8d            # imm = 0x108
callq 0x3600
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movl %edx, 0x8(%rsp)
cmpw $0xa, (%rsi)
jne 0x9fa7
leaq 0x8(%rsp), %rcx
movl $0x29, %esi
movl $0x12, %edx
movl $0x4, %r8d
callq 0x3600
testl %eax, %eax
je 0x9fc6
xorl %ebx, %ebx
jmp 0x9fc8
leaq 0xc(%rsp), %rcx
movl %edx, (%rcx)
xorl %ebx, %ebx
xorl %esi, %esi
movl $0x21, %edx
movl $0x4, %r8d
callq 0x3600
testl %eax, %eax
jne 0x9fc8
movb $0x1, %bl
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movb $0x1, %al
cmpw $0xa, (%rsi)
jne 0xa029
pushq %rax
leaq 0x4(%rsp), %rcx
movl $0x1, (%rcx)
movl $0x29, %esi
movl $0x32, %edx
movl $0x4, %r8d
callq 0x3600
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
xorl %ebx, %ebx
movq %rsp, %rdi
xorl %esi, %esi
callq 0x3580
testl %eax, %eax
jne 0xa236
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x8(%rsp)
movq %rdx, %rbx
imulq $0x3e8, (%rsp), %rax    # imm = 0x3E8
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rbx
addq %rcx, %rbx
addq %rax, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
subq $0x78, %rsp
cmpw $0xa, (%rcx)
jne 0xa2c7
leaq 0x10(%rsp), %r9
movq $0x24, (%r9)
movabsq $0x3200000029, %rax     # imm = 0x3200000029
movq %rax, 0x8(%r9)
movups 0x8(%rcx), %xmm0
movaps %xmm0, 0x10(%r9)
xorl %ecx, %ecx
movl %ecx, 0x20(%r9)
leaq 0x40(%rsp), %rax
movq %r8, (%rax)
cmpw $0xa, (%r8)
movl $0x1c, %r8d
movl $0x10, %r10d
cmovel %r8d, %r10d
movl %r10d, 0x8(%rax)
movq %rsp, %r8
movq %r8, 0x10(%rax)
movq $0x1, 0x18(%rax)
movq %r9, 0x20(%rax)
movq $0x28, 0x28(%rax)
movl %ecx, 0x30(%rax)
movq %rsi, (%r8)
movslq %edx, %rcx
movq %rcx, 0x8(%r8)
movq %rax, %rsi
xorl %edx, %edx
callq 0x32f0
jmp 0xa2e5
movslq %edx, %rdx
cmpw $0xa, (%r8)
movl $0x1c, %eax
movl $0x10, %r9d
cmovel %eax, %r9d
xorl %ecx, %ecx
callq 0x3040
addq $0x78, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movl %ecx, %ebp
movl %edx, %ebx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movl $0x80, %edx
movq %r15, %rdi
callq 0x31c0
movq %r15, %rdi
movl $0x2f, %esi
callq 0x3160
testq %rax, %rax
je 0xa384
movb $0x0, (%rax)
incq %rax
jmp 0xa397
testb %bpl, %bpl
je 0xa395
leaq 0x7670(%rip), %rax      # 0x11a00
movq (%rax), %rax
jmp 0xa397
xorl %eax, %eax
xorps %xmm0, %xmm0
leaq 0x90(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, 0x20(%rdx)
leaq 0x838c(%rip), %rcx      # 0x12740
movl (%rcx), %ecx
movl %ecx, 0x4(%rdx)
movl $0x2, 0x8(%rdx)
xorl %ecx, %ecx
cmpb $0x0, 0x10(%rsp)
cmoveq %rcx, %r15
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %rax, %rsi
callq 0x3490
testl %eax, %eax
je 0xa3f7
movl %eax, %edi
callq 0x34c0
leaq 0x3282(%rip), %rdi      # 0xd66f
xorl %ebx, %ebx
movq %rax, %rsi
jmp 0xa48b
movq 0x8(%rsp), %r15
testq %r15, %r15
je 0xa473
leaq 0x8(%r14), %r12
movl 0x4(%r14), %ebp
movq 0x18(%r15), %rcx
movzwl (%rcx), %eax
movw %ax, (%r14)
cmpl $0xa, %eax
jne 0xa424
movups 0x8(%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0xa42b
movl 0x4(%rcx), %ebp
movl %ebp, 0x4(%r14)
movzwl 0x2(%rcx), %ecx
movw %cx, 0x2(%r14)
testb %bl, %bl
je 0xa449
cmpl $0x2, %eax
je 0xa457
cmpl $0xa, %eax
jne 0xa46a
cmpb $-0x1, 0x8(%r14)
jmp 0xa463
movq %r14, %rdi
callq 0xa4d8
testb %al, %al
jne 0xa46a
jmp 0xa4a4
movl %ebp, %eax
andl $0xf0, %eax
cmpl $0xe0, %eax
sete %al
testb %al, %al
jne 0xa4a4
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0xa409
movq 0x8(%rsp), %rdi
callq 0x34a0
leaq 0x3202(%rip), %rdi      # 0xd686
xorl %ebx, %ebx
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x40b4
movl %ebx, %eax
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rdi
callq 0x34a0
movb $0x1, %bl
jmp 0xa492
// File: /workspace/github_cpp_makefile_star2_O1/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:
movzwl (%rsi), %eax
movw %ax, (%rdi)
cmpw $0xa, %ax
jne 0xa4c8
movups 0x8(%rsi), %xmm0
movups %xmm0, 0x8(%rdi)
jmp 0xa4ce
movl 0x4(%rsi), %eax
movl %eax, 0x4(%rdi)
movzwl 0x2(%rsi), %eax
movw %ax, 0x2(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
movzwl (%rdi), %ecx
cmpl $0x2, %ecx
je 0xa501
movb $0x1, %al
cmpl $0xa, %ecx
jne 0xa508
xorl %eax, %eax
cmpl $0x0, 0x8(%rdi)
jne 0xa508
cmpl $0x0, 0xc(%rdi)
jne 0xa508
cmpl $0x0, 0x10(%rdi)
jne 0xa508
cmpl $0x0, 0x14(%rdi)
jmp 0xa505
cmpl $0x0, 0x4(%rdi)
sete %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rax
movq %rdi, %rdx
movzwl (%rdi), %eax
cmpl $0xa, %eax
je 0xa526
cmpl $0x2, %eax
jne 0xa53c
addq $0x4, %rdx
movl $0x2, %edi
jmp 0xa52f
addq $0x8, %rdx
movl $0xa, %edi
callq 0x3630
testl %eax, %eax
jle 0xa53c
movb $0x1, %al
jmp 0xa53e
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::to_string(char*, unsigned long, bool) const
char *address::to_string(char *str, size_t len, bool printport) const {
	uint16_t port;

	if (stor.ss_family == AF_INET6) {
		inet_ntop(AF_INET6, &v6()->sin6_addr, str, len);
		port = ntohs(v6()->sin6_port);
	} else if (stor.ss_family == AF_INET) {
		inet_ntop(AF_INET, &v4()->sin_addr, str, len);
		port = ntohs(v4()->sin_port);
	} else {
		return NULL;
	}

	if (printport)
		snprintf(str + strlen(str), len - strlen(str), "/%u", port);

	return str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movzwl (%rdi), %edi
cmpl $0xa, %edi
je 0xa5a3
cmpl $0x2, %edi
jne 0xa5e9
movl $0x2, %edi
movl $0x4, %esi
jmp 0xa5a8
movl $0x8, %esi
addq %r15, %rsi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x33f0
testb %bpl, %bpl
je 0xa5eb
movzwl 0x2(%r15), %ebp
rolw $0x8, %bp
movq %rbx, %rdi
callq 0x3180
leaq (%rbx,%rax), %rdi
subq %rax, %r14
movzwl %bp, %ecx
leaq 0x30be(%rip), %rdx      # 0xd69b
movq %r14, %rsi
xorl %eax, %eax
callq 0x3560
jmp 0xa5eb
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::is_equal(address const&) const
bool address::is_equal(const address &a) const {
	if (stor.ss_family != a.stor.ss_family)
		return false;
	if (stor.ss_family == AF_INET6)
		return memcmp(&v6()->sin6_addr, &a.v6()->sin6_addr, sizeof(in6_addr)) == 0;
	else if (stor.ss_family == AF_INET)
		return v4()->sin_addr.s_addr == a.v4()->sin_addr.s_addr;
	return false;
}

// Assembly:
movzwl (%rdi), %eax
cmpw (%rsi), %ax
jne 0xa68b
cmpl $0x2, %eax
je 0xa68e
cmpl $0xa, %eax
jne 0xa68b
movdqu 0x8(%rdi), %xmm0
movdqu 0x8(%rsi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jmp 0xa694
xorl %eax, %eax
retq
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
sete %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: dbeacon_daemonize(char const*)
int
dbeacon_daemonize(const char *pidfile)
{
	if (chdir("/") < 0)
		return -1;

	int ch = fork();
	if (ch < 0)
		return -1;

	/* exit parent */
	if (ch != 0)
		_exit(0);

	/* child, lets prepare for daemonizing */

	int null = open("/dev/null", O_RDWR);
	if (null >= 0) {
		dup2(null, 0);
		dup2(null, 1);
		dup2(null, 2);
	}

	umask(022);
	setsid();

	if (pidfile) {
		FILE *f = fopen(pidfile, "w");
		if (f) {
			fprintf(f, "%u\n", getpid());
			fclose(f);
		} else {
			d_log(LOG_ERR, "Failed to open PID file to write.");
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x2a37(%rip), %rdi      # 0xd13e
callq 0x3510
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0xa7cc
callq 0x30e0
testl %eax, %eax
js 0xa7cc
jne 0xa7d3
leaq 0x2f6c(%rip), %rdi      # 0xd69f
xorl %ebx, %ebx
movl $0x2, %esi
xorl %eax, %eax
callq 0x3290
testl %eax, %eax
js 0xa768
movl %eax, %ebp
movl %eax, %edi
xorl %esi, %esi
callq 0x3370
movl %ebp, %edi
movl $0x1, %esi
callq 0x3370
movl %ebp, %edi
movl $0x2, %esi
callq 0x3370
movl $0x12, %edi
callq 0x35f0
callq 0x3410
testq %r14, %r14
je 0xa7cc
leaq 0x27ad(%rip), %rsi      # 0xcf30
movq %r14, %rdi
callq 0x3430
testq %rax, %rax
je 0xa7b7
movq %rax, %r14
callq 0x3500
leaq 0x2f0a(%rip), %rsi      # 0xd6a9
xorl %ebx, %ebx
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x34e0
movq %r14, %rdi
callq 0x33b0
jmp 0xa7cc
leaq 0x2eef(%rip), %rsi      # 0xd6ad
xorl %ebx, %ebx
movl $0x3, %edi
xorl %eax, %eax
callq 0x3fdb
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %edi, %edi
callq 0x35a0
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: get_local_address_for(address const&)
address get_local_address_for(const address &remote)
{
	int tmpSock = socket(remote.family(), SOCK_DGRAM, 0);
	if (tmpSock < 0) {
		perror("Failed to create socket to discover local addr");
		exit(-1);
	}

	if (connect(tmpSock, remote.saddr(), remote.addrlen()) != 0) {
		perror("Failed to connect multicast socket");
		exit(-1);
	}

	address result(remote.family());
	if (result.fromsocket(tmpSock) < 0) {
		perror("getsockname");
		exit(-1);
	}

	close(tmpSock);
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movzwl (%rsi), %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x30d0
testl %eax, %eax
js 0xa88b
movl %eax, %ebp
cmpw $0xa, (%r14)
movl $0x1c, %r12d
movl $0x10, %r15d
movl $0x10, %edx
cmovel %r12d, %edx
movl %eax, %edi
movq %r14, %rsi
callq 0x3310
testl %eax, %eax
jne 0xa890
movzwl (%r14), %eax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movw %ax, (%rbx)
cmpw $0xa, %ax
cmovel %r12d, %r15d
leaq 0xc(%rsp), %rdx
movl %r15d, (%rdx)
movl %ebp, %edi
movq %rbx, %rsi
callq 0x3360
testl %eax, %eax
js 0xa895
movl %ebp, %edi
callq 0x3660
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x37e0
callq 0x37b6
callq 0x37cb
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/protocol.cpp
// Function: write_tlv_stats(unsigned char*, int, int&, unsigned char, unsigned int, int, beaconMcastState const&)
static bool write_tlv_stats(uint8_t *buff, int maxlen, int &ptr, uint8_t type,
			uint32_t age, int sttl, const beaconMcastState &st) {
	if (!write_tlv_start(buff, maxlen, ptr, type, 20))
		return false;

	uint8_t *b = buff + ptr;

	write_u32(b + 0, st.s.timestamp);
	write_u32(b + 4, age);

	b[8] = (sttl ? sttl : defaultTTL) - st.s.rttl;

	write_f(b + 9, st.s.avgdelay);
	write_f(b + 13, st.s.avgjitter);

	/* average loss in 0..255 range */
	b[17] = (uint8_t)(st.s.avgloss * 0xff);
	b[18] = st.s.avgdup > 10. ? 0xff : ((uint8_t)ceil(st.s.avgdup * 25.5));
	b[19] = (uint8_t)(st.s.avgooo * 0xff);

	ptr += 20;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movslq (%rdx), %rax
leal 0x16(%rax), %edx
cmpl %esi, %edx
jg 0xae7a
movq %rdi, %r14
movq 0x30(%rsp), %r12
movb %cl, (%rdi,%rax)
movslq (%rbx), %rax
movb $0x14, 0x1(%rdi,%rax)
movslq (%rbx), %rax
leaq 0x2(%rax), %r15
movl %r15d, (%rbx)
movl 0x28(%r12), %ecx
bswapl %ecx
movl %ecx, 0x2(%rdi,%rax)
bswapl %r8d
movl %r8d, 0x6(%rdi,%rax)
testl %r9d, %r9d
jne 0xadf9
leaq 0x1362(%rip), %rcx      # 0xc158
movl (%rcx), %r9d
subb 0x4d(%r12), %r9b
movb %r9b, 0xa(%r14,%rax)
movl 0x38(%r12), %ecx
bswapl %ecx
movl %ecx, 0xb(%r14,%rax)
movl 0x3c(%r12), %ecx
bswapl %ecx
movl %ecx, 0xf(%r14,%rax)
movss 0x40(%r12), %xmm0
mulss 0x28fa(%rip), %xmm0     # 0xd724
cvttss2si %xmm0, %ecx
movb %cl, 0x13(%r14,%rax)
movss 0x44(%r12), %xmm0
movb $-0x1, %al
ucomiss 0x28e5(%rip), %xmm0     # 0xd728
ja 0xae5a
cvtss2sd %xmm0, %xmm0
mulsd 0x28df(%rip), %xmm0     # 0xd730
callq 0x30a0
cvttsd2si %xmm0, %eax
movb %al, 0x12(%r14,%r15)
movss 0x48(%r12), %xmm0
mulss 0x28b6(%rip), %xmm0     # 0xd724
cvttss2si %xmm0, %eax
movb %al, 0x13(%r14,%r15)
addl $0x14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/ssmping.cpp
// Function: SetupSSMPing()
int SetupSSMPing() {
	address addr(beaconUnicastAddr.family());

	if (!addr.set_port(4321))
		return -1;

	ssmPingSocket = SetupSocket(addr, true, false);
	if (ssmPingSocket < 0)
		return -1;

	if (!SetHops(ssmPingSocket, addr, 64)) {
		close(ssmPingSocket);
		return -1;
	}

	if (!RequireToAddress(ssmPingSocket, addr)) {
		close(ssmPingSocket);
		return -1;
	}

	assert(SSMPingV4Addr.set_addr(SSMPingV4ResponseChannel));
	assert(SSMPingV6Addr.set_addr(SSMPingV6ResponseChannel));

	ListenTo(ssmPingSocket, handle_ssmping);

	return 0;
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
leaq 0x6d35(%rip), %rdi      # 0x124b8
callq 0x9cce
movq %rsp, %rbx
movq %rbx, %rdi
movl %eax, %esi
callq 0xa30e
movq %rbx, %rdi
movl $0x10e1, %esi           # imm = 0x10E1
callq 0xa540
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb %al, %al
je 0xb83c
movq %rsp, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x9dcc
movl %eax, 0x6c0c(%rip)      # 0x123d0
testl %eax, %eax
js 0xb83c
movq %rsp, %rsi
movl %eax, %edi
movl $0x40, %edx
callq 0x9f76
movl 0x6bf3(%rip), %edi      # 0x123d0
testb %al, %al
je 0xb837
movq %rsp, %rsi
callq 0x9ff7
testb %al, %al
je 0xb831
leaq 0x91a4(%rip), %rdi      # 0x14998
leaq 0x202f(%rip), %rsi      # 0xd82a
callq 0xa50a
testb %al, %al
je 0xb847
leaq 0x910d(%rip), %rdi      # 0x14918
leaq 0x2027(%rip), %rsi      # 0xd839
callq 0xa50a
testb %al, %al
je 0xb866
movl 0x6baf(%rip), %edi      # 0x123d0
leaq 0x5d(%rip), %rsi        # 0xb885
callq 0x5be3
xorl %ebx, %ebx
jmp 0xb83c
movl 0x6b99(%rip), %edi      # 0x123d0
callq 0x3660
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
retq
leaq 0x1f5b(%rip), %rdi      # 0xd7a9
leaq 0x1f85(%rip), %rsi      # 0xd7da
leaq 0x1f8a(%rip), %rcx      # 0xd7e6
movl $0x47, %edx
callq 0x3260
leaq 0x1f8c(%rip), %rdi      # 0xd7f9
leaq 0x1f66(%rip), %rsi      # 0xd7da
leaq 0x1f6b(%rip), %rcx      # 0xd7e6
movl $0x48, %edx
callq 0x3260
// File: /workspace/github_cpp_makefile_star2_O1/hugosantos[P]dbeacon/ssmping.cpp
// Function: handle_ssmping(int, Message const&)
static void handle_ssmping(int s, const Message &msg)
{
	if (msg.buffer[0] != SSMPING_REQUEST || msg.len > maxSSMPingMessage)
		return;

	if (verbose > 1) {
		char tmp[64];
		info("Got SSM Ping Request from %s",
			msg.from.to_string(tmp, sizeof(tmp)));
	}

	msg.buffer[0] = SSMPING_ANSWER;

	if (SendTo(s, msg.buffer, msg.len, msg.to, msg.from) < 0)
		return;

	address mcastDest(msg.from.family() == AF_INET6 ?
			SSMPingV6Addr : SSMPingV4Addr);
	mcastDest.set_port(msg.from.port());

	SendTo(s, msg.buffer, msg.len, msg.to, mcastDest);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq 0x110(%rsi), %rax
cmpb $0x51, (%rax)
jne 0xb970
movq %rsi, %r14
cmpq $0x3e8, 0x118(%rsi) # imm = 0x3E8
ja 0xb970
movl %edi, %ebx
leaq 0x6c78(%rip), %rax      # 0x12538
cmpl $0x2, (%rax)
jl 0xb8eb
movq %rsp, %rsi
movl $0x40, %edx
movq %r14, %rdi
movl $0x1, %ecx
callq 0xa578
leaq 0x1f68(%rip), %rdi      # 0xd849
movq %rax, %rsi
xorl %eax, %eax
callq 0x40b4
movq 0x110(%r14), %rax
movb $0x41, (%rax)
movq 0x110(%r14), %rsi
movl 0x118(%r14), %edx
leaq 0x80(%r14), %r15
movl %ebx, %edi
movq %r15, %rcx
movq %r14, %r8
callq 0xa23f
testl %eax, %eax
js 0xb970
movq %r14, %rdi
callq 0x9cce
cmpl $0xa, %eax
leaq 0x8feb(%rip), %rax      # 0x14918
leaq 0x9064(%rip), %rsi      # 0x14998
cmoveq %rax, %rsi
movq %rsp, %r12
movq %r12, %rdi
callq 0xa334
movq %r14, %rdi
callq 0xa55a
movq %r12, %rdi
movl %eax, %esi
callq 0xa540
movq 0x110(%r14), %rsi
movl 0x118(%r14), %edx
movl %ebx, %edi
movq %r15, %rcx
movq %r12, %r8
callq 0xa23f
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: total_cost(std::vector<unsigned int, std::allocator<unsigned int>>)
unsigned total_cost(solution s) {
  vector<unsigned> positions(costs.size(), 0);
  vector<unsigned> job_time(costs.size(), 0);
  vector<unsigned> machine_time(costs[0].size(), 0);

  for(unsigned j : s) {
    unsigned o = positions[j];
    unsigned m = ops[j][o].machine;
    unsigned time = costs[j][m] + max(job_time[j], machine_time[m]);
    job_time[j] = time;
    machine_time[m] = time;
    positions[j]++;
  }

  unsigned total = 0;
  for(unsigned m : machine_time)
    total = max(total, m);

  return total;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq 0x4c2a(%rip), %rsi      # 0x7130
subq 0x4c1b(%rip), %rsi      # 0x7128
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r15, %rsi
xorl %r12d, %r12d
leaq -0x58(%rbp), %rdx
movl %r12d, (%rdx)
leaq -0x70(%rbp), %rdi
leaq -0x40(%rbp), %r14
movq %r14, %rcx
callq 0x3d7e
movq 0x4bf0(%rip), %rsi      # 0x7130
subq 0x4be1(%rip), %rsi      # 0x7128
sarq $0x3, %rsi
imulq %r15, %rsi
movl %r12d, (%r14)
leaq -0x58(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x3d7e
movq 0x4bbe(%rip), %rax      # 0x7128
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x2, %rsi
leaq -0x28(%rbp), %rdx
movl $0x0, (%rdx)
leaq -0x40(%rbp), %rdi
leaq -0x21(%rbp), %rcx
callq 0x3d7e
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x25f9
movq -0x70(%rbp), %rdx
movq 0x4b9d(%rip), %rsi      # 0x7140
movq 0x4b7e(%rip), %rdi      # 0x7128
movq -0x58(%rbp), %r8
movq -0x40(%rbp), %r9
movl (%rax), %r10d
movl (%rdx,%r10,4), %r11d
leaq (,%r10,8), %rbx
leaq (%rbx,%rbx,2), %rbx
movq (%rsi,%rbx), %r14
movl (%r14,%r11,8), %r11d
movl (%r8,%r10,4), %r14d
movl (%r9,%r11,4), %r15d
cmpl %r15d, %r14d
cmoval %r14d, %r15d
movq (%rdi,%rbx), %rbx
addl (%rbx,%r11,4), %r15d
movl %r15d, (%r8,%r10,4)
movl %r15d, (%r9,%r11,4)
incl (%rdx,%r10,4)
addq $0x4, %rax
cmpq %rcx, %rax
jne 0x25b2
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x261f
xorl %edx, %edx
movq %rdi, %rcx
movl (%rcx), %ebx
cmpl %ebx, %edx
cmoval %edx, %ebx
addq $0x4, %rcx
movl %ebx, %edx
cmpq %rax, %rcx
jne 0x260b
jmp 0x2621
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x2632
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x2647
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x265c
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x2688
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2688
movq %rax, %rbx
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x269d
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: permutate(std::vector<unsigned int, std::allocator<unsigned int>>&)
solution permutate(solution &s) {
  unsigned size = s.size();
	int pos1 = 1 + rand() % (size / 4);
	int pos2 = pos1 + 1 + rand() % (size / 4);
	int pos3 = pos2 + 1 + rand() % (size / 4);

	int i;
  solution s_;

	for (i = 0; i < pos1; i++)
    s_.push_back(s[i]);
	for (i = pos3; i < size; i++)
    s_.push_back(s[i]);
	for (i = pos2; i < pos3; i++)
    s_.push_back(s[i]);
	for (i = pos1; i < pos2; i++)
    s_.push_back(s[i]);

  return s_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r15
subq (%rsi), %r15
shrq $0x2, %r15
callq 0x2060
movq %r15, -0x40(%rbp)
movl %r15d, %r13d
shrl $0x2, %r13d
xorl %r12d, %r12d
xorl %edx, %edx
divl %r13d
movl %edx, %r15d
callq 0x2060
xorl %edx, %edx
divl %r13d
leal (%r15,%rdx), %eax
movq %rax, -0x30(%rbp)
leal (%r15,%rdx), %eax
addl $0x2, %eax
movl %eax, -0x34(%rbp)
callq 0x2060
xorl %edx, %edx
divl %r13d
movq -0x30(%rbp), %rax
addl %edx, %eax
addl $0x3, %eax
movl %eax, -0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq $-0x1, %r13
movq (%r14), %rdx
addq %r12, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2747
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x274f
movq %rbx, %rdi
callq 0x408a
incq %r13
addq $0x4, %r12
cmpq %r15, %r13
jb 0x2729
movl -0x30(%rbp), %eax
cmpl -0x40(%rbp), %eax
movl -0x34(%rbp), %r13d
jae 0x279f
movslq -0x30(%rbp), %r12
leaq (,%r12,4), %rdx
addq (%r14), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x278e
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2796
movq %rbx, %rdi
callq 0x408a
incq %r12
cmpl -0x40(%rbp), %r12d
jb 0x276b
cmpl -0x30(%rbp), %r13d
jge 0x27dc
movl %r13d, %r12d
leaq (,%r12,4), %rdx
addq (%r14), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x27cb
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x27d3
movq %rbx, %rdi
callq 0x408a
incq %r12
cmpl %r12d, -0x30(%rbp)
jg 0x27a8
incl %r15d
cmpl %r13d, %r15d
jae 0x281d
movl %r15d, %r15d
movl %r13d, %r12d
leaq (,%r15,4), %rdx
addq (%r14), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x280d
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2815
movq %rbx, %rdi
callq 0x408a
incq %r15
cmpq %r12, %r15
jb 0x27ea
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2835
jmp 0x2835
jmp 0x2835
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x284c
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2140
movq %r14, %rdi
callq 0x21d0