// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: main
int main(int argc, char **argv) {
	int res;

	srand(time(NULL));

	char tmp[256];
	if (gethostname(tmp, sizeof(tmp)) != 0) {
		perror("Failed to get hostname");
		return -1;
	}

	beaconName = tmp;

	parse_arguments(argc, argv);

	MulticastStartup();

	if (beaconName.empty())
		fatal("No name supplied, check `dbeacon -h`.");

	if (!probeAddrLiteral.empty()) {
		if (!probeAddr.parse(probeAddrLiteral.c_str(), true))
			return -1;

		probeAddr.to_string(sessionName, sizeof(sessionName));

		if (!probeAddr.is_multicast())
			fatal("Specified probe addr (%s) is not of a multicast group.",
					sessionName);

		if (adminContact.empty())
			fatal("No administration contact supplied, check `dbeacon -h`.");

		mcastListen.push_back(ContentDesc(probeAddr, false));

		insert_event(SENDING_EVENT, 100);
		insert_event(REPORT_EVENT, 10000);
		insert_event(MAP_REPORT_EVENT, 30000);
		insert_event(WEBSITE_REPORT_EVENT, 120000);

		redist.push_back(probeAddr);

		if (useSSM) {
			if (probeSSMAddrLiteral.empty()) {
				int family = forceFamily;

				if (family == AF_UNSPEC) {
					family = probeAddr.family();
				}
				if (family == AF_INET) {
					probeSSMAddrLiteral = defaultIPv4SSMChannel;
				} else {
					probeSSMAddrLiteral = defaultIPv6SSMChannel;
				}
			}

			if (!ssmProbeAddr.parse(probeSSMAddrLiteral.c_str(), true)) {
				fatal("Bad address format for SSM channel.");
			} else if (!ssmProbeAddr.is_unspecified()) {
				insert_event(SSM_SENDING_EVENT, 100);
				insert_event(SSM_REPORT_EVENT, 15000);

				if (listenForSSM) {
					mcastListen.push_back(ContentDesc(ssmProbeAddr, true));
				}
			}
		}
	} else {
		if (mcastListen.empty())
			fatal("Nothing to do, check `dbeacon -h`.");
		else
			strcpy(sessionName, beaconName.c_str());
	}

	address local;
	local.set_family(probeAddr.family());

	mcastSock = SetupSocket(local, false, false);
	if (mcastSock < 0)
		return -1;

	if (beaconUnicastAddr.is_unspecified())
		beaconUnicastAddr = get_local_address_for(probeAddr);

	if (bind(mcastSock, beaconUnicastAddr.saddr(), beaconUnicastAddr.addrlen()) != 0) {
		perror("Failed to bind local socket");
		return -1;
	}

	if (beaconUnicastAddr.fromsocket(mcastSock) < 0) {
		perror("getsockname");
		return -1;
	}

	for (McastListen::const_iterator i = mcastListen.begin();
			i != mcastListen.end(); ++i) {
		int sock = SetupSocket(i->first, true, i->second);
		if (sock < 0)
			return -1;

		if (i->second) {
			ListenTo(sock, handle_ssm);
			ssmMcastSock = sock;
		} else {
			ListenTo(sock, handle_asm);
		}
	}

	if (useSSMPing) {
		if (SetupSSMPing() < 0)
			d_log(LOG_ERR, "Failed to setup SSM Ping.");
		else
			flags |= SSMPING_CAPABLE;
	}

	if (IsSSMEnabled()) {
		flags |= SSM_CAPABLE;

		uint64_t now = get_timestamp();
		for (vector<address>::const_iterator i = ssmBootstrap.begin();
				i != ssmBootstrap.end(); ++i)
			getSource(*i, 0, now, 0, false);
	} else if (!ssmBootstrap.empty())
		d_log(LOG_WARNING, "Tried to bootstrap using SSM when SSM is not enabled.");

	if (daemonize || use_syslog) {
		use_syslog = true;
		openlog("dbeacon", LOG_NDELAY | LOG_PID, LOG_DAEMON);
	}

	past_init = true;

	if (daemonize) {
		if (dbeacon_daemonize(pidfile)) {
			perror("Failed to daemon()ize.");
			return -1;
		}
	}

	// Init timer events
	insert_event(GARBAGE_COLLECT_EVENT, 30000);

	if (!dumpFile.empty())
		insert_event(DUMP_EVENT, dumpInterval * 1000);

	insert_event(DUMP_BW_EVENT, 10000);

	if (dumpBwReport)
		insert_event(DUMP_BIG_BW_EVENT, 600000);

	info("Local name is `%s` [Beacon group: %s, Local address: %s]",
		beaconName.c_str(), sessionName, beaconUnicastAddr.to_string(tmp, sizeof(tmp), false));

	send_report(WEBSITE_REPORT_EVENT);

	signal(SIGUSR1, dumpBigBwStats);
	signal(SIGINT, sendLeaveReport);
	signal(SIGTERM, sendLeaveReport);

	signal(SIGCHLD, waitForMe); // bloody fork, we dont want to wait for thee

	startTime = lastDumpBwTS = lastDumpDumpBwTS = get_timestamp();

	while (1) {
		fd_set readset;
		timeval eventm;

		FD_ZERO(&readset);

		for (McastSocks::const_iterator i = mcastSocks.begin();
				i != mcastSocks.end(); ++i)
			FD_SET(i->first, &readset);

		next_event(&eventm);

		res = select(mcastSocks.rbegin()->first + 1, &readset, 0, 0, &eventm);

		if (res < 0) {
			if (errno == EINTR)
				continue;
			fatal("Select failed: %s", strerror(errno));
		} else {
			for (McastSocks::const_iterator i = mcastSocks.begin();
					res > 0 && i != mcastSocks.end(); ++i) {
				if (FD_ISSET(i->first, &readset)) {
					handle_mcast(*i);
					res--;
				}
			}

			handle_event();
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x480, %rsp            # imm = 0x480
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x43f0
movl %eax, %edi
callq 0x4450
leaq -0x120(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x4640
cmpl $0x0, %eax
je 0x5367
leaq 0x1675c(%rip), %rdi     # 0x1bab2
callq 0x43b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d42
leaq -0x120(%rbp), %rsi
leaq 0x24133(%rip), %rdi     # 0x294a8
callq 0x45c0
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x5d50
callq 0x16e20
leaq 0x24116(%rip), %rdi     # 0x294a8
callq 0x46e0
testb $0x1, %al
jne 0x539d
jmp 0x53ab
leaq 0x16725(%rip), %rdi     # 0x1bac9
movb $0x0, %al
callq 0x5250
leaq 0x242c6(%rip), %rdi     # 0x29678
callq 0x46e0
testb $0x1, %al
jne 0x55f8
leaq 0x242b2(%rip), %rdi     # 0x29678
callq 0x41b0
movq %rax, %rsi
leaq 0x24223(%rip), %rdi     # 0x295f8
movl $0x1, %ecx
movl %ecx, %edx
callq 0x17bf0
testb $0x1, %al
jne 0x53f1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d42
leaq 0x24200(%rip), %rdi     # 0x295f8
leaq 0x24401(%rip), %rsi     # 0x29800
movl $0x100, %edx            # imm = 0x100
movl $0x1, %ecx
callq 0x18100
leaq 0x241e3(%rip), %rdi     # 0x295f8
callq 0x17520
testb $0x1, %al
jne 0x5433
leaq 0x166ca(%rip), %rdi     # 0x1baef
leaq 0x243d4(%rip), %rsi     # 0x29800
movb $0x0, %al
callq 0x5250
leaq 0x2408e(%rip), %rdi     # 0x294c8
callq 0x46e0
testb $0x1, %al
jne 0x5445
jmp 0x5453
leaq 0x166da(%rip), %rdi     # 0x1bb26
movb $0x0, %al
callq 0x5250
movb $0x0, -0x1a9(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq 0x24190(%rip), %rsi     # 0x295f8
leaq -0x1a9(%rbp), %rdx
callq 0xaa70
leaq 0x242fd(%rip), %rdi     # 0x29778
leaq -0x1a8(%rbp), %rsi
callq 0xaa40
movl $0x4, %edi
movl $0x64, %esi
callq 0x5fd0
movl $0x52, %edi
movl $0x2710, %esi           # imm = 0x2710
callq 0x5fd0
movl $0x54, %edi
movl $0x7530, %esi           # imm = 0x7530
callq 0x5fd0
movl $0x55, %edi
movl $0x1d4c0, %esi          # imm = 0x1D4C0
callq 0x5fd0
leaq 0x242f6(%rip), %rdi     # 0x297c0
leaq 0x24127(%rip), %rsi     # 0x295f8
callq 0xaab0
testb $0x1, 0x24423(%rip)     # 0x29900
je 0x55f6
leaq 0x241ae(%rip), %rdi     # 0x29698
callq 0x46e0
testb $0x1, %al
jne 0x54f5
jmp 0x554f
movl 0x242f5(%rip), %eax     # 0x297f0
movl %eax, -0x1b0(%rbp)
cmpl $0x0, -0x1b0(%rbp)
jne 0x551c
leaq 0x240e7(%rip), %rdi     # 0x295f8
callq 0x170e0
movl %eax, -0x1b0(%rbp)
cmpl $0x2, -0x1b0(%rbp)
jne 0x553a
leaq 0x2416c(%rip), %rdi     # 0x29698
leaq 0x1662b(%rip), %rsi     # 0x1bb5e
callq 0x45c0
jmp 0x554d
leaq 0x24157(%rip), %rdi     # 0x29698
leaq 0x16620(%rip), %rsi     # 0x1bb68
callq 0x45c0
jmp 0x554f
leaq 0x24142(%rip), %rdi     # 0x29698
callq 0x41b0
movq %rax, %rsi
leaq 0x24153(%rip), %rdi     # 0x296b8
movl $0x1, %ecx
movl %ecx, %edx
callq 0x17bf0
testb $0x1, %al
jne 0x5585
leaq 0x165f7(%rip), %rdi     # 0x1bb73
movb $0x0, %al
callq 0x5250
jmp 0x55f4
leaq 0x2412c(%rip), %rdi     # 0x296b8
callq 0x17ea0
testb $0x1, %al
jne 0x55f2
movl $0x6, %edi
movl $0x64, %esi
callq 0x5fd0
movl $0x53, %edi
movl $0x3a98, %esi           # imm = 0x3A98
callq 0x5fd0
testb $0x1, 0x24347(%rip)     # 0x29901
je 0x55f0
movb $0x1, -0x239(%rbp)
leaq -0x238(%rbp), %rdi
leaq 0x240e7(%rip), %rsi     # 0x296b8
leaq -0x239(%rbp), %rdx
callq 0xaa70
leaq 0x24194(%rip), %rdi     # 0x29778
leaq -0x238(%rbp), %rsi
callq 0xaa40
jmp 0x55f2
jmp 0x55f4
jmp 0x55f6
jmp 0x5637
leaq 0x24179(%rip), %rdi     # 0x29778
callq 0xab20
testb $0x1, %al
jne 0x560a
jmp 0x561a
leaq 0x16586(%rip), %rdi     # 0x1bb97
movb $0x0, %al
callq 0x5250
jmp 0x5635
leaq 0x23e87(%rip), %rdi     # 0x294a8
callq 0x41b0
movq %rax, %rsi
leaq 0x241d0(%rip), %rdi     # 0x29800
callq 0x4420
jmp 0x5637
leaq -0x2c0(%rbp), %rdi
callq 0x17b40
leaq 0x23fae(%rip), %rdi     # 0x295f8
callq 0x170e0
movl %eax, %esi
leaq -0x2c0(%rbp), %rdi
callq 0x17900
leaq -0x2c0(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x17250
movl %eax, 0x24291(%rip)     # 0x29904
cmpl $0x0, 0x2428a(%rip)     # 0x29904
jge 0x5688
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d42
leaq 0x23ed9(%rip), %rdi     # 0x29568
callq 0x17ea0
testb $0x1, %al
jne 0x569a
jmp 0x56c5
leaq -0x340(%rbp), %rdi
leaq 0x23f50(%rip), %rsi     # 0x295f8
callq 0x18640
leaq 0x23eb4(%rip), %rdi     # 0x29568
leaq -0x340(%rbp), %rsi
movl $0x80, %edx
callq 0x4390
movl 0x24239(%rip), %eax     # 0x29904
movl %eax, -0x454(%rbp)
leaq 0x23e90(%rip), %rdi     # 0x29568
callq 0x17940
movq %rax, -0x450(%rbp)
leaq 0x23e7d(%rip), %rdi     # 0x29568
callq 0x17450
movl -0x454(%rbp), %edi
movq -0x450(%rbp), %rsi
movl %eax, %edx
callq 0x40a0
cmpl $0x0, %eax
je 0x5721
leaq 0x164aa(%rip), %rdi     # 0x1bbba
callq 0x43b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d42
movl 0x241dd(%rip), %esi     # 0x29904
leaq 0x23e3a(%rip), %rdi     # 0x29568
callq 0x182f0
cmpl $0x0, %eax
jge 0x5750
leaq 0x16497(%rip), %rdi     # 0x1bbd6
callq 0x43b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d42
leaq 0x24021(%rip), %rdi     # 0x29778
callq 0xab60
movq %rax, -0x350(%rbp)
leaq -0x348(%rbp), %rdi
leaq -0x350(%rbp), %rsi
callq 0xab90
leaq 0x23ffb(%rip), %rdi     # 0x29778
callq 0xac10
movq %rax, -0x358(%rbp)
leaq -0x348(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0xabd0
testb $0x1, %al
jne 0x57a5
jmp 0x5855
leaq -0x348(%rbp), %rdi
callq 0xac40
movq %rax, -0x460(%rbp)
leaq -0x348(%rbp), %rdi
callq 0xac40
movq -0x460(%rbp), %rdi
movb 0x80(%rax), %al
movl $0x1, %esi
andb $0x1, %al
movzbl %al, %edx
callq 0x17250
movl %eax, -0x35c(%rbp)
cmpl $0x0, -0x35c(%rbp)
jge 0x57fb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d42
leaq -0x348(%rbp), %rdi
callq 0xac40
testb $0x1, 0x80(%rax)
je 0x5830
movl -0x35c(%rbp), %edi
leaq 0x823(%rip), %rsi       # 0x6040
callq 0x6000
movl -0x35c(%rbp), %eax
movl %eax, 0x240da(%rip)     # 0x29908
jmp 0x5842
movl -0x35c(%rbp), %edi
leaq 0x873(%rip), %rsi       # 0x60b0
callq 0x6000
jmp 0x5844
leaq -0x348(%rbp), %rdi
callq 0xac60
jmp 0x5776
testb $0x1, 0x240b0(%rip)     # 0x2990c
je 0x588e
callq 0x19df0
cmpl $0x0, %eax
jge 0x587d
movl $0x3, %edi
leaq 0x1636e(%rip), %rsi     # 0x1bbe2
movb $0x0, %al
callq 0x5020
jmp 0x588c
movl 0x23d69(%rip), %eax     # 0x295ec
orl $0x2, %eax
movl %eax, 0x23d60(%rip)     # 0x295ec
jmp 0x588e
callq 0x6120
testb $0x1, %al
jne 0x589c
jmp 0x593e
movl 0x23d4a(%rip), %eax     # 0x295ec
orl $0x1, %eax
movl %eax, 0x23d41(%rip)     # 0x295ec
callq 0x184e0
movq %rax, -0x368(%rbp)
leaq 0x23f1a(%rip), %rdi     # 0x297d8
callq 0xac80
movq %rax, -0x378(%rbp)
leaq -0x370(%rbp), %rdi
leaq -0x378(%rbp), %rsi
callq 0xacb0
leaq 0x23ef4(%rip), %rdi     # 0x297d8
callq 0xad30
movq %rax, -0x380(%rbp)
leaq -0x370(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0xacf0
testb $0x1, %al
jne 0x5909
jmp 0x593c
leaq -0x370(%rbp), %rdi
callq 0xad60
movq %rax, %rdi
movq -0x368(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
xorl %r8d, %r8d
movq %rcx, %rsi
callq 0x6140
leaq -0x370(%rbp), %rdi
callq 0xad80
jmp 0x58dd
jmp 0x5963
leaq 0x23e93(%rip), %rdi     # 0x297d8
callq 0xada0
testb $0x1, %al
jne 0x5961
movl $0x4, %edi
leaq 0x162a2(%rip), %rsi     # 0x1bbfc
movb $0x0, %al
callq 0x5020
jmp 0x5963
testb $0x1, 0x23e8a(%rip)     # 0x297f4
jne 0x5975
testb $0x1, 0x23e82(%rip)     # 0x297f5
je 0x5992
movb $0x1, 0x23e79(%rip)     # 0x297f5
leaq 0x162af(%rip), %rdi     # 0x1bc32
movl $0x9, %esi
movl $0x18, %edx
callq 0x43d0
movb $0x1, 0x23e5d(%rip)     # 0x297f6
testb $0x1, 0x23e54(%rip)     # 0x297f4
je 0x59cd
movq 0x23e4f(%rip), %rdi     # 0x297f8
callq 0x18520
cmpl $0x0, %eax
je 0x59cb
leaq 0x16280(%rip), %rdi     # 0x1bc3a
callq 0x43b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d42
jmp 0x59cd
xorl %edi, %edi
movl $0x7530, %esi           # imm = 0x7530
callq 0x5fd0
leaq 0x23d78(%rip), %rdi     # 0x29758
callq 0x46e0
testb $0x1, %al
jne 0x59fd
imull $0x3e8, 0x23a4d(%rip), %esi # imm = 0x3E8
movl $0x1, %edi
callq 0x5fd0
movl $0x2, %edi
movl $0x2710, %esi           # imm = 0x2710
callq 0x5fd0
testb $0x1, 0x23efa(%rip)     # 0x2990d
je 0x5a24
movl $0x3, %edi
movl $0x927c0, %esi          # imm = 0x927C0
callq 0x5fd0
leaq 0x23a7d(%rip), %rdi     # 0x294a8
callq 0x41b0
movq %rax, -0x468(%rbp)
leaq -0x120(%rbp), %rsi
leaq 0x23b23(%rip), %rdi     # 0x29568
movl $0x100, %edx            # imm = 0x100
xorl %ecx, %ecx
callq 0x18100
movq -0x468(%rbp), %rsi
movq %rax, %rcx
leaq 0x161ef(%rip), %rdi     # 0x1bc51
leaq 0x23d97(%rip), %rdx     # 0x29800
movb $0x0, %al
callq 0x51b0
movl $0x55, %edi
callq 0x63b0
movl $0xa, %edi
leaq 0xb9a(%rip), %rsi       # 0x6620
callq 0x4540
movl $0x2, %edi
leaq 0xc69(%rip), %rsi       # 0x6700
callq 0x4540
movl $0xf, %edi
leaq 0xc58(%rip), %rsi       # 0x6700
callq 0x4540
movl $0x11, %edi
leaq -0x7c9(%rip), %rsi      # 0x52f0
callq 0x4540
callq 0x184e0
movq %rax, 0x23e46(%rip)     # 0x29910
movq %rax, 0x23e47(%rip)     # 0x29918
movq %rax, 0x23e48(%rip)     # 0x29920
jmp 0x5ada
leaq -0x400(%rbp), %rax
movq %rax, -0x420(%rbp)
movl $0x0, -0x414(%rbp)
movl -0x414(%rbp), %eax
cmpq $0x10, %rax
jae 0x5b24
movq -0x420(%rbp), %rax
movl -0x414(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x414(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x414(%rbp)
jmp 0x5af2
jmp 0x5b26
leaq 0x23c63(%rip), %rdi     # 0x29790
callq 0xade0
movq %rax, -0x428(%rbp)
leaq 0x23c50(%rip), %rdi     # 0x29790
callq 0xae40
movq %rax, -0x430(%rbp)
leaq -0x428(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0xae10
testb $0x1, %al
jne 0x5b65
jmp 0x5bce
leaq -0x428(%rbp), %rdi
callq 0xae70
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x470(%rbp)
leaq -0x428(%rbp), %rdi
callq 0xae70
movq -0x470(%rbp), %rcx
movl (%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x400(%rbp,%rax,8), %rcx
movq %rcx, -0x400(%rbp,%rax,8)
leaq -0x428(%rbp), %rdi
callq 0xaea0
jmp 0x5b39
leaq -0x410(%rbp), %rdi
callq 0x6740
leaq -0x438(%rbp), %rdi
leaq 0x23ba8(%rip), %rsi     # 0x29790
callq 0xaed0
leaq -0x438(%rbp), %rdi
callq 0xaf00
movl (%rax), %edi
addl $0x1, %edi
leaq -0x400(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x410(%rbp), %r8
movq %rcx, %rdx
callq 0x4430
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x5c52
callq 0x4040
cmpl $0x4, (%rax)
jne 0x5c30
jmp 0x5ad8
callq 0x4040
movl (%rax), %edi
callq 0x4170
movq %rax, %rsi
leaq 0x16044(%rip), %rdi     # 0x1bc8a
movb $0x0, %al
callq 0x5250
jmp 0x5d3d
leaq 0x23b37(%rip), %rdi     # 0x29790
callq 0xade0
movq %rax, -0x440(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x14(%rbp)
movb %al, -0x471(%rbp)
jle 0x5c9f
leaq 0x23b16(%rip), %rdi     # 0x29790
callq 0xae40
movq %rax, -0x448(%rbp)
leaq -0x440(%rbp), %rdi
leaq -0x448(%rbp), %rsi
callq 0xae10
movb %al, -0x471(%rbp)
movb -0x471(%rbp), %al
testb $0x1, %al
jne 0x5cae
jmp 0x5d38
leaq -0x440(%rbp), %rdi
callq 0xae70
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
cltq
movq -0x400(%rbp,%rax,8), %rax
movq %rax, -0x480(%rbp)
leaq -0x440(%rbp), %rdi
callq 0xae70
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x480(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x5d25
leaq -0x440(%rbp), %rdi
callq 0xaf40
movq %rax, %rdi
callq 0x6800
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5d27
leaq -0x440(%rbp), %rdi
callq 0xaea0
jmp 0x5c65
callq 0x6910
jmp 0x5ad8
movl -0x4(%rbp), %eax
addq $0x480, %rsp            # imm = 0x480
popq %rbp
retq
nop