// File: hugosantos[P]dbeacon/dbeacon.cpp
// Function: do_dump()
void do_dump() {
	string tmpf = dumpFile;
	tmpf += ".working";

	FILE *fp = fopen(tmpf.c_str(), "w");
	if (!fp)
		return;

	uint64_t now = get_timestamp();
	uint64_t diff = now - lastDumpDumpBwTS;
	lastDumpDumpBwTS = now;

	double rxRate = dumpBytesReceived * 8 / ((double)diff);
	double txRate = dumpBytesSent * 8 / ((double)diff);
	dumpBytesReceived = 0;
	dumpBytesSent = 0;

	fprintf(fp, "<beacons rxrate=\"%.2f\" txrate=\"%.2f\" versioninfo=\"%s\">\n", rxRate, txRate, versionInfo);

	fprintf(fp, "<group addr=\"%s\"", sessionName);

	char tmp[64];

	if (IsSSMEnabled())
		fprintf(fp, " ssmgroup=\"%s\"", ssmProbeAddr.to_string(tmp, sizeof(tmp)));

	fprintf(fp, " int=\"%.2f\">\n", beacInt);

	if (!probeAddr.is_unspecified()) {
		fprintf(fp, "\t<beacon name=\"%s\" addr=\"%s\"", beaconName.c_str(),
				beaconUnicastAddr.to_string(tmp, sizeof(tmp)));
		if (!adminContact.empty())
			fprintf(fp, " contact=\"%s\"", adminContact.c_str());
		if (!twoLetterCC.empty())
			fprintf(fp, " country=\"%s\"", twoLetterCC.c_str());
		fprintf(fp, " age=\"%lu\" lastupdate=\"0\" rxlocal=\"true\">\n", (now - startTime) / 1000);

		for (uint32_t k = 0; k < KnownFlags; k++) {
			if (flags & (1 << k)) {
				fprintf(fp, "\t\t<flag name=\"%s\" value=\"true\" />\n", Flags[k]);
			}
		}

		for (WebSites::const_iterator j = webSites.begin(); j != webSites.end(); j++) {
			const char *typnam = j->first == T_WEBSITE_GENERIC ?
				"generic" : (j->first == T_WEBSITE_LG ? "lg" : "matrix");
			fprintf(fp, "\t\t<website type=\"%s\" url=\"%s\" />\n", typnam, j->second.c_str());
		}

		fprintf(fp, "\t\t<sources>\n");

		for (Sources::const_iterator i = sources.begin(); i != sources.end(); i++) {
			fprintf(fp, "\t\t\t<source addr=\"%s\"", i->first.to_string(tmp, sizeof(tmp)));
			if (i->second.identified) {
				fprintf(fp, " name=\"%s\"", i->second.name.c_str());
				if (!i->second.adminContact.empty())
					fprintf(fp, " contact=\"%s\"", i->second.adminContact.c_str());
			}

			if (!i->second.CC.empty())
				fprintf(fp, " country=\"%s\"", i->second.CC.c_str());

			fprintf(fp, " age=\"%lu\"", (now - i->second.creation) / 1000);
			fprintf(fp, " lastupdate=\"%lu\">\n", (now - i->second.lastevent) / 1000);

			if (i->second.ASM.s.valid)
				dumpStats(fp, "asm", i->second.ASM.s, now, i->second.sttl, true);

			if (i->second.SSM.s.valid)
				dumpStats(fp, "ssm", i->second.SSM.s, now, i->second.sttl, true);

			fprintf(fp, "\t\t\t</source>\n");
		}

		fprintf(fp, "\t\t</sources>\n");
		fprintf(fp, "\t</beacon>\n");
		fprintf(fp, "\n");
	}

	for (Sources::const_iterator i = sources.begin(); i != sources.end(); i++) {
		fprintf(fp, "\t<beacon");
		if (i->second.identified) {
			fprintf(fp, " name=\"%s\"", i->second.name.c_str());
			if (!i->second.adminContact.empty())
				fprintf(fp, " contact=\"%s\"", i->second.adminContact.c_str());
		}
		fprintf(fp, " addr=\"%s\"", i->first.to_string(tmp, sizeof(tmp)));
		fprintf(fp, " age=\"%lu\"", (now - i->second.creation) / 1000);
		fprintf(fp, " rxlocal=\"%s\"", i->second.rxlocal(now) ? "true" : "false");
		fprintf(fp, " lastupdate=\"%lu\">\n", (now - i->second.lastevent) / 1000);

		for (uint32_t k = 0; k < KnownFlags; k++) {
			if (i->second.Flags & (1 << k)) {
				fprintf(fp, "\t\t<flag name=\"%s\" value=\"true\" />\n", Flags[k]);
			}
		}

		for (WebSites::const_iterator j = i->second.webSites.begin();
						j != i->second.webSites.end(); j++) {
			const char *typnam = j->first == T_WEBSITE_GENERIC ?
				"generic" : (j->first == T_WEBSITE_LG ? "lg" : "matrix");
			fprintf(fp, "\t\t<website type=\"%s\" url=\"%s\" />\n",
						typnam, j->second.c_str());
		}

		fprintf(fp, "\t\t<sources>\n");

		for (beaconSource::ExternalSources::const_iterator j = i->second.externalSources.begin();
				j != i->second.externalSources.end(); j++) {
			fprintf(fp, "\t\t\t<source");
			if (j->second.identified) {
				fprintf(fp, " name=\"%s\"", j->second.name.c_str());
				fprintf(fp, " contact=\"%s\"", j->second.contact.c_str());
			}
			fprintf(fp, " addr=\"%s\"", j->first.to_string(tmp, sizeof(tmp)));
			fprintf(fp, " age=\"%u\">\n", j->second.age);
			if (j->second.ASM.valid)
				dumpStats(fp, "asm", j->second.ASM, now, i->second.sttl, false);
			if (j->second.SSM.valid)
				dumpStats(fp, "ssm", j->second.SSM, now, i->second.sttl, false);
			fprintf(fp, "\t\t\t</source>\n");
		}

		fprintf(fp, "\t\t</sources>\n");
		fprintf(fp, "\t</beacon>\n");
	}

	fprintf(fp, "</group>\n</beacons>\n");

	fclose(fp);

	rename(tmpf.c_str(), dumpFile.c_str());

	if (!launchSomething.empty())
		doLaunchSomething();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
leaq 0x20406(%rip), %rsi     # 0x29758
leaq -0x20(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x41c0
movq -0x170(%rbp), %rdi
leaq 0x12f2b(%rip), %rsi     # 0x1c29b
callq 0x4440
jmp 0x9377
leaq -0x20(%rbp), %rdi
callq 0x41b0
movq %rax, %rdi
leaq 0x12ca2(%rip), %rsi     # 0x1c02c
callq 0x4530
movq %rax, -0x178(%rbp)
jmp 0x9398
movq -0x178(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x93d0
movl $0x1, -0x3c(%rbp)
jmp 0xa435
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x47a8
jmp 0xa447
callq 0x184e0
movq %rax, -0x180(%rbp)
jmp 0x93de
movq -0x180(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x2051c(%rip), %rcx     # 0x29910
subq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, 0x2050a(%rip)     # 0x29910
movq 0x225bb(%rip), %rax     # 0x2b9c8
shlq $0x3, %rax
movq %rax, %xmm0
movaps 0x11c43(%rip), %xmm3    # 0x1b060
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x11c47(%rip), %xmm2    # 0x1b070
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x50(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm4
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm4, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movq 0x22570(%rip), %rax     # 0x2b9d0
shlq $0x3, %rax
movq %rax, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x50(%rbp), %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
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movq $0x0, 0x22520(%rip) # 0x2b9c8
movq $0x0, 0x2251d(%rip) # 0x2b9d0
movq -0x38(%rbp), %rdi
movsd -0x58(%rbp), %xmm0
movsd -0x60(%rbp), %xmm1
leaq 0x12ddc(%rip), %rsi     # 0x1c2a4
leaq 0x127ee(%rip), %rdx     # 0x1bcbd
movb $0x2, %al
callq 0x4600
movq -0x38(%rbp), %rdi
leaq 0x12dfb(%rip), %rsi     # 0x1c2dc
leaq 0x20318(%rip), %rdx     # 0x29800
movb $0x0, %al
callq 0x4600
callq 0x6120
testb $0x1, %al
jne 0x94fa
jmp 0x9547
movq -0x38(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq 0x201ac(%rip), %rdi     # 0x296b8
leaq -0xa0(%rbp), %rsi
movl $0x40, %edx
movl $0x1, %ecx
callq 0x18100
movq %rax, -0x188(%rbp)
jmp 0x952b
movq -0x188(%rbp), %rdx
movq -0x190(%rbp), %rdi
leaq 0x12dad(%rip), %rsi     # 0x1c2ed
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rdi
movsd 0x1fef5(%rip), %xmm0    # 0x29448
leaq 0x12da2(%rip), %rsi     # 0x1c2fc
movb $0x1, %al
callq 0x4600
leaq 0x20090(%rip), %rdi     # 0x295f8
callq 0x17ea0
movb %al, -0x191(%rbp)
jmp 0x9575
movb -0x191(%rbp), %al
testb $0x1, %al
jne 0x9c49
jmp 0x9585
movq -0x38(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq 0x1ff11(%rip), %rdi     # 0x294a8
callq 0x41b0
movq %rax, -0x1a8(%rbp)
leaq 0x1ffbe(%rip), %rdi     # 0x29568
leaq -0xa0(%rbp), %rsi
movl $0x40, %edx
movl $0x1, %ecx
callq 0x18100
movq %rax, -0x1a0(%rbp)
jmp 0x95c9
movq -0x1a0(%rbp), %rcx
movq -0x1a8(%rbp), %rdx
movq -0x1b0(%rbp), %rdi
leaq 0x12d25(%rip), %rsi     # 0x1c30a
movb $0x0, %al
callq 0x4600
leaq 0x1fed5(%rip), %rdi     # 0x294c8
callq 0x46e0
testb $0x1, %al
jne 0x962b
movq -0x38(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq 0x1feba(%rip), %rdi     # 0x294c8
callq 0x41b0
movq -0x1b8(%rbp), %rdi
movq %rax, %rdx
leaq 0x12d03(%rip), %rsi     # 0x1c327
movb $0x0, %al
callq 0x4600
leaq 0x1feb6(%rip), %rdi     # 0x294e8
callq 0x46e0
testb $0x1, %al
jne 0x966a
movq -0x38(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq 0x1fe9b(%rip), %rdi     # 0x294e8
callq 0x41b0
movq -0x1c0(%rbp), %rdi
movq %rax, %rdx
leaq 0x12cd2(%rip), %rsi     # 0x1c335
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rax
subq 0x202a7(%rip), %rax     # 0x29920
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
leaq 0x12cb6(%rip), %rsi     # 0x1c343
movb $0x0, %al
callq 0x4600
movl $0x0, -0xa4(%rbp)
cmpl $0x2, -0xa4(%rbp)
jae 0x96fb
movl 0x1ff3f(%rip), %eax     # 0x295ec
movl -0xa4(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x96e8
movq -0x38(%rbp), %rdi
movl -0xa4(%rbp), %eax
movl %eax, %ecx
leaq 0x1fd7a(%rip), %rax     # 0x29450
movq (%rax,%rcx,8), %rdx
leaq 0x12c8d(%rip), %rsi     # 0x1c36e
movb $0x0, %al
callq 0x4600
jmp 0x96ea
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x969e
leaq 0x1fe36(%rip), %rdi     # 0x29538
callq 0xf830
movq %rax, -0xb8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0xe150
leaq 0x1fe10(%rip), %rdi     # 0x29538
callq 0xdf80
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xe150
leaq -0xb0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xf860
testb $0x1, %al
jne 0x9763
jmp 0x9826
leaq -0xb0(%rbp), %rdi
callq 0xf890
cmpl $0x47, (%rax)
jne 0x9784
leaq 0x12c16(%rip), %rax     # 0x1c391
movq %rax, -0x1c8(%rbp)
jmp 0x97ae
leaq -0xb0(%rbp), %rdi
callq 0xf890
movl (%rax), %edx
leaq 0x1286a(%rip), %rax     # 0x1c003
leaq 0x1286d(%rip), %rcx     # 0x1c00d
cmpl $0x4c, %edx
cmoveq %rcx, %rax
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x1d0(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0xf890
movq %rax, %rdi
addq $0x8, %rdi
callq 0x41b0
movq -0x1d8(%rbp), %rdi
movq -0x1d0(%rbp), %rdx
movq %rax, %rcx
leaq 0x12b94(%rip), %rsi     # 0x1c399
movb $0x0, %al
callq 0x4600
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
callq 0xf8b0
movq %rax, -0xd8(%rbp)
jmp 0x9721
movq -0x38(%rbp), %rdi
leaq 0x12b8a(%rip), %rsi     # 0x1c3bb
movb $0x0, %al
callq 0x4600
leaq 0x1fcc9(%rip), %rdi     # 0x29508
callq 0xf550
movq %rax, -0xe8(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0xf8f0
leaq 0x1fca3(%rip), %rdi     # 0x29508
callq 0xb270
movq %rax, -0xf8(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0xf8f0
leaq -0xe0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xf910
testb $0x1, %al
jne 0x98a0
jmp 0x9c13
movq -0x38(%rbp), %rax
movq %rax, -0x1e8(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
leaq -0xa0(%rbp), %rsi
movl $0x40, %edx
movl $0x1, %ecx
callq 0x18100
movq %rax, -0x1e0(%rbp)
jmp 0x98d9
movq -0x1e0(%rbp), %rdx
movq -0x1e8(%rbp), %rdi
leaq 0x12ada(%rip), %rsi     # 0x1c3c8
movb $0x0, %al
callq 0x4600
leaq -0xe0(%rbp), %rdi
callq 0xf940
testb $0x1, 0x3d8(%rax)
je 0x99c0
movq -0x38(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x290, %rdi            # imm = 0x290
callq 0x41b0
movq -0x1f0(%rbp), %rdi
movq %rax, %rdx
leaq 0x12a91(%rip), %rsi     # 0x1c3dd
movb $0x0, %al
callq 0x4600
leaq -0xe0(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2b0, %rdi            # imm = 0x2B0
callq 0x46e0
testb $0x1, %al
jne 0x99be
movq -0x38(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2b0, %rdi            # imm = 0x2B0
callq 0x41b0
movq -0x1f8(%rbp), %rdi
movq %rax, %rdx
leaq 0x12970(%rip), %rsi     # 0x1c327
movb $0x0, %al
callq 0x4600
jmp 0x99c0
leaq -0xe0(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2d0, %rdi            # imm = 0x2D0
callq 0x46e0
testb $0x1, %al
jne 0x9a2b
movq -0x38(%rbp), %rax
movq %rax, -0x200(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2d0, %rdi            # imm = 0x2D0
callq 0x41b0
movq -0x200(%rbp), %rdi
movq %rax, %rdx
leaq 0x12911(%rip), %rsi     # 0x1c335
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0xf940
movq -0x220(%rbp), %rdi
movq %rax, %rcx
movq -0x218(%rbp), %rax
subq 0x100(%rcx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
leaq 0x1296f(%rip), %rsi     # 0x1c3e8
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0xf940
movq -0x210(%rbp), %rdi
movq %rax, %rcx
movq -0x208(%rbp), %rax
subq 0x110(%rcx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
leaq 0x12925(%rip), %rsi     # 0x1c3f3
movb $0x0, %al
callq 0x4600
leaq -0xe0(%rbp), %rdi
callq 0xf940
testb $0x1, 0x16c(%rax)
je 0x9b5e
movq -0x38(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0xf940
movq -0x240(%rbp), %rdi
addq $0x148, %rax            # imm = 0x148
movq %rax, -0x230(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x228(%rbp)
callq 0xf940
movq -0x238(%rbp), %rdi
movq -0x230(%rbp), %rdx
movq -0x228(%rbp), %rcx
movl 0x108(%rax), %r8d
leaq 0x128b8(%rip), %rsi     # 0x1c407
movl $0x1, %r9d
callq 0x7ff0
jmp 0x9b5c
jmp 0x9b5e
leaq -0xe0(%rbp), %rdi
callq 0xf940
testb $0x1, 0x264(%rax)
je 0x9be7
movq -0x38(%rbp), %rax
movq %rax, -0x258(%rbp)
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0xf940
movq -0x260(%rbp), %rdi
addq $0x240, %rax            # imm = 0x240
movq %rax, -0x250(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x248(%rbp)
callq 0xf940
movq -0x258(%rbp), %rdi
movq -0x250(%rbp), %rdx
movq -0x248(%rbp), %rcx
movl 0x108(%rax), %r8d
leaq 0x12833(%rip), %rsi     # 0x1c40b
movl $0x1, %r9d
callq 0x7ff0
jmp 0x9be5
jmp 0x9be7
movq -0x38(%rbp), %rdi
leaq 0x1281d(%rip), %rsi     # 0x1c40f
movb $0x0, %al
callq 0x4600
leaq -0xe0(%rbp), %rdi
xorl %esi, %esi
callq 0xf970
movq %rax, -0x100(%rbp)
jmp 0x985e
movq -0x38(%rbp), %rdi
leaq 0x127ff(%rip), %rsi     # 0x1c41d
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rdi
leaq 0x127fb(%rip), %rsi     # 0x1c42b
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rdi
leaq 0x116fc(%rip), %rsi     # 0x1b33e
movb $0x0, %al
callq 0x4600
leaq 0x1f8b8(%rip), %rdi     # 0x29508
callq 0xf550
movq %rax, -0x110(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0xf8f0
leaq 0x1f892(%rip), %rdi     # 0x29508
callq 0xb270
movq %rax, -0x120(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0xf8f0
leaq -0x108(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xf910
testb $0x1, %al
jne 0x9cb1
jmp 0xa3cd
movq -0x38(%rbp), %rdi
leaq 0x1277b(%rip), %rsi     # 0x1c437
movb $0x0, %al
callq 0x4600
leaq -0x108(%rbp), %rdi
callq 0xf940
testb $0x1, 0x3d8(%rax)
je 0x9d8e
movq -0x38(%rbp), %rax
movq %rax, -0x268(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x290, %rdi            # imm = 0x290
callq 0x41b0
movq -0x268(%rbp), %rdi
movq %rax, %rdx
leaq 0x126c3(%rip), %rsi     # 0x1c3dd
movb $0x0, %al
callq 0x4600
leaq -0x108(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2b0, %rdi            # imm = 0x2B0
callq 0x46e0
testb $0x1, %al
jne 0x9d8c
movq -0x38(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2b0, %rdi            # imm = 0x2B0
callq 0x41b0
movq -0x270(%rbp), %rdi
movq %rax, %rdx
leaq 0x125a2(%rip), %rsi     # 0x1c327
movb $0x0, %al
callq 0x4600
jmp 0x9d8e
movq -0x38(%rbp), %rax
movq %rax, -0x280(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
leaq -0xa0(%rbp), %rsi
movl $0x40, %edx
movl $0x1, %ecx
callq 0x18100
movq %rax, -0x278(%rbp)
jmp 0x9dc7
movq -0x278(%rbp), %rdx
movq -0x280(%rbp), %rdi
leaq 0x12540(%rip), %rsi     # 0x1c31c
xorl %eax, %eax
movb %al, -0x299(%rbp)
callq 0x4600
movq -0x38(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x2a8(%rbp)
leaq -0x108(%rbp), %rdi
movq %rdi, -0x298(%rbp)
callq 0xf940
movq -0x2b0(%rbp), %rdi
movq %rax, %rcx
movq -0x2a8(%rbp), %rax
movq 0x100(%rcx), %rcx
subq %rcx, %rax
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
movb -0x299(%rbp), %al
shrq $0x4, %rdx
leaq 0x12599(%rip), %rsi     # 0x1c3e8
callq 0x4600
movq -0x298(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rax, -0x290(%rbp)
callq 0xf940
movq %rax, %rdi
subq $-0x80, %rdi
movq -0x48(%rbp), %rsi
callq 0x7ea0
movb %al, -0x281(%rbp)
jmp 0x9e83
movq -0x290(%rbp), %rdi
movb -0x281(%rbp), %cl
leaq 0x1232a(%rip), %rdx     # 0x1c1c1
leaq 0x12319(%rip), %rax     # 0x1c1b7
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0x12594(%rip), %rsi     # 0x1c440
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x2b8(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xf940
movq -0x2c0(%rbp), %rdi
movq %rax, %rcx
movq -0x2b8(%rbp), %rax
subq 0x110(%rcx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
leaq 0x124f2(%rip), %rsi     # 0x1c3f3
movb $0x0, %al
callq 0x4600
movl $0x0, -0x124(%rbp)
cmpl $0x2, -0x124(%rbp)
jae 0x9f7b
leaq -0x108(%rbp), %rdi
callq 0xf940
movl 0x370(%rax), %eax
movl -0x124(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x9f68
movq -0x38(%rbp), %rdi
movl -0x124(%rbp), %eax
movl %eax, %ecx
leaq 0x1f4fa(%rip), %rax     # 0x29450
movq (%rax,%rcx,8), %rdx
leaq 0x1240d(%rip), %rsi     # 0x1c36e
movb $0x0, %al
callq 0x4600
jmp 0x9f6a
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0x9f12
leaq -0x108(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x328, %rdi            # imm = 0x328
callq 0xf9b0
movq %rax, -0x130(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x328, %rdi            # imm = 0x328
callq 0xf9e0
movq %rax, -0x138(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0xf860
testb $0x1, %al
jne 0x9fe9
jmp 0xa0ac
leaq -0x130(%rbp), %rdi
callq 0xf890
cmpl $0x47, (%rax)
jne 0xa00a
leaq 0x12390(%rip), %rax     # 0x1c391
movq %rax, -0x2c8(%rbp)
jmp 0xa034
leaq -0x130(%rbp), %rdi
callq 0xf890
movl (%rax), %edx
leaq 0x11fe4(%rip), %rax     # 0x1c003
leaq 0x11fe7(%rip), %rcx     # 0x1c00d
cmpl $0x4c, %edx
cmoveq %rcx, %rax
movq %rax, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x2d0(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xf890
movq %rax, %rdi
addq $0x8, %rdi
callq 0x41b0
movq -0x2d8(%rbp), %rdi
movq -0x2d0(%rbp), %rdx
movq %rax, %rcx
leaq 0x1230e(%rip), %rsi     # 0x1c399
movb $0x0, %al
callq 0x4600
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
callq 0xf8b0
movq %rax, -0x148(%rbp)
jmp 0x9fa4
movq -0x38(%rbp), %rdi
leaq 0x12304(%rip), %rsi     # 0x1c3bb
movb $0x0, %al
callq 0x4600
leaq -0x108(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
callq 0xfa10
movq %rax, -0x150(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xf940
movq %rax, %rdi
addq $0x80, %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
callq 0xfa70
movq %rax, -0x158(%rbp)
leaq -0x150(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0xfa40
testb $0x1, %al
jne 0xa12c
jmp 0xa38f
movq -0x38(%rbp), %rdi
leaq 0x12317(%rip), %rsi     # 0x1c44e
movb $0x0, %al
callq 0x4600
leaq -0x150(%rbp), %rdi
callq 0xfaa0
testb $0x1, 0xe0(%rax)
je 0xa1de
movq -0x38(%rbp), %rax
movq %rax, -0x2e8(%rbp)
leaq -0x150(%rbp), %rdi
callq 0xfaa0
movq %rax, %rdi
addq $0x80, %rdi
addq $0x68, %rdi
callq 0x41b0
movq -0x2e8(%rbp), %rdi
movq %rax, %rdx
leaq 0x1224b(%rip), %rsi     # 0x1c3dd
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rax
movq %rax, -0x2e0(%rbp)
leaq -0x150(%rbp), %rdi
callq 0xfaa0
movq %rax, %rdi
addq $0x80, %rdi
addq $0x88, %rdi
callq 0x41b0
movq -0x2e0(%rbp), %rdi
movq %rax, %rdx
leaq 0x12150(%rip), %rsi     # 0x1c327
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rax
movq %rax, -0x2f8(%rbp)
leaq -0x150(%rbp), %rdi
callq 0xfaa0
movq %rax, %rdi
leaq -0xa0(%rbp), %rsi
movl $0x40, %edx
movl $0x1, %ecx
callq 0x18100
movq %rax, -0x2f0(%rbp)
jmp 0xa217
movq -0x2f0(%rbp), %rdx
movq -0x2f8(%rbp), %rdi
leaq 0x120f0(%rip), %rsi     # 0x1c31c
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rax
movq %rax, -0x300(%rbp)
leaq -0x150(%rbp), %rdi
callq 0xfaa0
movq -0x300(%rbp), %rdi
movl 0x88(%rax), %edx
leaq 0x121fb(%rip), %rsi     # 0x1c459
movb $0x0, %al
callq 0x4600
leaq -0x150(%rbp), %rdi
callq 0xfaa0
testb $0x1, 0xb4(%rax)
je 0xa2e4
movq -0x38(%rbp), %rax
movq %rax, -0x318(%rbp)
leaq -0x150(%rbp), %rdi
callq 0xfaa0
addq $0x90, %rax
movq %rax, -0x310(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x308(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xf940
movq -0x318(%rbp), %rdi
movq -0x310(%rbp), %rdx
movq -0x308(%rbp), %rcx
movl 0x108(%rax), %r8d
leaq 0x1212f(%rip), %rsi     # 0x1c407
xorl %r9d, %r9d
callq 0x7ff0
jmp 0xa2e2
jmp 0xa2e4
leaq -0x150(%rbp), %rdi
callq 0xfaa0
testb $0x1, 0xdc(%rax)
je 0xa363
movq -0x38(%rbp), %rax
movq %rax, -0x330(%rbp)
leaq -0x150(%rbp), %rdi
callq 0xfaa0
addq $0xb8, %rax
movq %rax, -0x328(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x320(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xf940
movq -0x330(%rbp), %rdi
movq -0x328(%rbp), %rdx
movq -0x320(%rbp), %rcx
movl 0x108(%rax), %r8d
leaq 0x120b4(%rip), %rsi     # 0x1c40b
xorl %r9d, %r9d
callq 0x7ff0
jmp 0xa361
jmp 0xa363
movq -0x38(%rbp), %rdi
leaq 0x120a1(%rip), %rsi     # 0x1c40f
movb $0x0, %al
callq 0x4600
leaq -0x150(%rbp), %rdi
xorl %esi, %esi
callq 0xfad0
movq %rax, -0x160(%rbp)
jmp 0xa0e7
movq -0x38(%rbp), %rdi
leaq 0x12083(%rip), %rsi     # 0x1c41d
movb $0x0, %al
callq 0x4600
movq -0x38(%rbp), %rdi
leaq 0x1207f(%rip), %rsi     # 0x1c42b
movb $0x0, %al
callq 0x4600
leaq -0x108(%rbp), %rdi
xorl %esi, %esi
callq 0xf970
movq %rax, -0x168(%rbp)
jmp 0x9c6f
movq -0x38(%rbp), %rdi
leaq 0x1208d(%rip), %rsi     # 0x1c465
xorl %eax, %eax
callq 0x4600
movq -0x38(%rbp), %rdi
callq 0x4460
jmp 0xa3ea
leaq -0x20(%rbp), %rdi
callq 0x41b0
movq %rax, -0x338(%rbp)
leaq 0x1f357(%rip), %rdi     # 0x29758
callq 0x41b0
movq -0x338(%rbp), %rdi
movq %rax, %rsi
callq 0x4270
leaq 0x1f31c(%rip), %rdi     # 0x29738
callq 0x46e0
testb $0x1, %al
jne 0xa42e
callq 0xa6e0
jmp 0xa42c
jmp 0xa42e
movl $0x0, -0x3c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x47a8
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x46f0