// File: tplinderoth[P]introDist/introDist.cpp
// Function: comp3Dist(std::basic_fstream<char, std::char_traits<char>>&, std::basic_fstream<char, std::char_traits<char>>&, unsigned int, unsigned int)
int comp3Dist (std::fstream &freqfile, std::fstream &genofile, unsigned int window, unsigned int step) {

	std::vector<sitedist> dist;
	dist.resize(window);
	std::vector<sitedist>::iterator distiter = dist.begin();
	unsigned int lastidx = window-1;
	unsigned int nsites = 0;
	unsigned int dr_nsites = 0;
	double windD = 0.0;
	double logwinD = 0.0;
	unsigned int midpoint = 0;
	unsigned int i = 0;
	unsigned int n = window-step;

	std::stringstream ss;

	std::string(fline);
	std::string(fchr);
	unsigned int fpos;
	double p1f;
	double p2f;

	std::string(gline);
	std::string(gchr);
	unsigned int gpos;
	int geno1;
	int geno2;

	getline(freqfile, fline);
	getline(genofile, gline);

	// calculate windows
	while (!fline.empty()) {

		// parse frequency file lines
		ss.str(std::string());
		ss.clear();
		ss.str(fline);
		ss >> fchr >> fpos >> p1f >> p2f;

		// parse genotype file lines
		ss.str(std::string());
		ss.clear();
		ss.str(gline);
		ss >> gchr >> gpos >> geno1 >> geno2;

		// ensure that files are synched
		if (gchr.compare(fchr) != 0 || gpos != fpos) {
			std::cerr << "Positions in input files differ\n";
			return -1;
		}

		// update window
		distiter->first = gpos;
		distiter->second = (geno1 < 0 || geno2 < 0) ? -1.0 : calc3Dist(geno1, geno2, p1f, p2f);
		++distiter;
		++nsites;

		if (distiter == dist.end()) {
			windD = 0.0;
			dr_nsites = 0;
			for (distiter = dist.begin(); distiter != dist.end(); ++distiter) {
				if (distiter->second < 0) continue;
				windD += distiter->second;
				++dr_nsites;
			}
			if (dr_nsites > 0) {
				windD /= (double)dr_nsites;
			} else {
				std::cerr << "Warning: window " << gchr << " " << dist[0].first << "," << dist[lastidx].first << " has no sites with data\n";
			}
			midpoint = (dist[0].first + dist[lastidx].first)/2;
			logwinD = -log(1.0-windD);
			if (logwinD == 0.0) logwinD = 0.0; // no negative zero
			std::cout << gchr << "\t" << dist[0].first << "\t" << dist[lastidx].first << "\t" << midpoint << "\t" << logwinD << "\t" << dr_nsites << "\n";

			// prepare vector for new values
			for (i = 0; i < n; ++i) {
				dist[i].first = dist[step+i].first;
				dist[i].second = dist[step+i].second;
			}

			nsites = n;
			distiter = dist.begin() + n;
		}

		getline(freqfile, fline);
		getline(genofile, gline);
	}

	// print last window
	if (nsites > n && nsites < window) {
		unsigned int lastwinidx = nsites-1;
		windD = 0.0;
		dr_nsites = 0;
		for (i=0; i < lastwinidx; ++i) {
			if (dist[i].second < 0) continue;
			windD += dist[i].second;
			++dr_nsites;
		}
		if (dr_nsites > 0) {
			windD /= (double)nsites;
		} else {
			std::cerr << "Warning: window " << gchr << " " << dist[0].first << "," << dist[lastwinidx].first << " has no sites with data\n";
		}
		midpoint = (dist[0].first + dist[lastwinidx].first)/2;
		logwinD = -log(1.0-windD);
		if (logwinD == 0.0) logwinD = 0.0; // no negative zero
		std::cout << gchr << "\t" << dist[0].first << "\t" << dist[lastwinidx].first << "\t" << midpoint << "\t" << logwinD << "\t" << dr_nsites << "\n";
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x9240
movq -0x330(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %esi
callq 0x9260
jmp 0x447c
leaq -0x38(%rbp), %rdi
callq 0x92f0
movq %rax, -0x50(%rbp)
movl -0x1c(%rbp), %eax
decl %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x1c(%rbp), %eax
movl -0x20(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x7c(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x31f0
jmp 0x44d6
leaq -0x228(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x33d0
leaq -0x248(%rbp), %rdi
callq 0x33d0
leaq -0x280(%rbp), %rdi
callq 0x33d0
leaq -0x2a0(%rbp), %rdi
callq 0x33d0
movq -0x338(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x30b0
jmp 0x451f
movq -0x18(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x30b0
jmp 0x4531
jmp 0x4533
leaq -0x228(%rbp), %rdi
callq 0x3470
xorb $-0x1, %al
testb $0x1, %al
jne 0x454a
jmp 0x4cbb
leaq -0x2d0(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0x33d0
movq -0x340(%rbp), %rsi
leaq -0x208(%rbp), %rdi
callq 0x3340
jmp 0x4572
leaq -0x2d0(%rbp), %rdi
callq 0x31b0
movq -0x208(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x208(%rbp,%rax), %rdi
xorl %esi, %esi
callq 0x3480
jmp 0x459a
leaq -0x208(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x3340
jmp 0x45af
leaq -0x208(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x33a0
movq %rax, -0x348(%rbp)
jmp 0x45cb
movq -0x348(%rbp), %rdi
leaq -0x24c(%rbp), %rsi
callq 0x3060
movq %rax, -0x350(%rbp)
jmp 0x45e7
movq -0x350(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x3250
movq %rax, -0x358(%rbp)
jmp 0x4603
movq -0x358(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x3250
jmp 0x4618
leaq -0x2f0(%rbp), %rdi
movq %rdi, -0x360(%rbp)
callq 0x33d0
movq -0x360(%rbp), %rsi
leaq -0x208(%rbp), %rdi
callq 0x3340
jmp 0x4640
leaq -0x2f0(%rbp), %rdi
callq 0x31b0
movq -0x208(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x208(%rbp,%rax), %rdi
xorl %esi, %esi
callq 0x3480
jmp 0x4668
leaq -0x208(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x3340
jmp 0x467d
leaq -0x208(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x33a0
movq %rax, -0x368(%rbp)
jmp 0x4699
movq -0x368(%rbp), %rdi
leaq -0x2a4(%rbp), %rsi
callq 0x3060
movq %rax, -0x370(%rbp)
jmp 0x46b5
movq -0x370(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x31a0
movq %rax, -0x378(%rbp)
jmp 0x46d1
movq -0x378(%rbp), %rdi
leaq -0x2ac(%rbp), %rsi
callq 0x31a0
jmp 0x46e6
leaq -0x2a0(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x3040
movl %eax, -0x37c(%rbp)
jmp 0x4701
movl -0x37c(%rbp), %eax
cmpl $0x0, %eax
jne 0x471e
movl -0x2a4(%rbp), %eax
cmpl -0x24c(%rbp), %eax
je 0x47a5
movq 0x108cb(%rip), %rdi     # 0x14ff0
leaq 0xac65(%rip), %rsi      # 0xf391
callq 0x32c0
jmp 0x4733
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x2f4(%rbp)
jmp 0x5021
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x50ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5072
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x31b0
jmp 0x5072
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x31b0
jmp 0x5072
movl -0x2a4(%rbp), %eax
movl %eax, -0x380(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x9460
movl -0x380(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x0, -0x2a8(%rbp)
jl 0x47d4
cmpl $0x0, -0x2ac(%rbp)
jge 0x47e6
movsd 0xa834(%rip), %xmm0     # 0xf010
movsd %xmm0, -0x388(%rbp)
jmp 0x4827
cvtsi2sdl -0x2a8(%rbp), %xmm0
cvtsi2sdl -0x2ac(%rbp), %xmm1
movsd -0x258(%rbp), %xmm2
movsd -0x260(%rbp), %xmm3
callq 0x8d00
movsd %xmm0, -0x390(%rbp)
jmp 0x4815
movsd -0x390(%rbp), %xmm0
movsd %xmm0, -0x388(%rbp)
jmp 0x4827
movsd -0x388(%rbp), %xmm0
movsd %xmm0, -0x398(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x9460
movsd -0x398(%rbp), %xmm0
movsd %xmm0, 0x8(%rax)
leaq -0x50(%rbp), %rdi
callq 0x9480
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x94e0
movq %rax, -0x300(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x94a0
testb $0x1, %al
jne 0x4888
jmp 0x4c92
xorps %xmm0, %xmm0
movsd %xmm0, -0x68(%rbp)
movl $0x0, -0x5c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x92f0
movq %rax, -0x308(%rbp)
movq -0x308(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x94e0
movq %rax, -0x310(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x9510
testb $0x1, %al
jne 0x48d8
jmp 0x4919
leaq -0x50(%rbp), %rdi
callq 0x9460
xorps %xmm0, %xmm0
ucomisd 0x8(%rax), %xmm0
jbe 0x48ed
jmp 0x490e
leaq -0x50(%rbp), %rdi
callq 0x9460
movsd 0x8(%rax), %xmm0
addsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x9480
jmp 0x48b2
cmpl $0x0, -0x5c(%rbp)
jbe 0x493a
movl -0x5c(%rbp), %eax
cvtsi2sd %rax, %xmm1
movsd -0x68(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0x4a0a
movq 0x106af(%rip), %rdi     # 0x14ff0
leaq 0xab43(%rip), %rsi      # 0xf48b
callq 0x32c0
movq %rax, -0x3a0(%rbp)
jmp 0x4956
movq -0x3a0(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x3280
movq %rax, -0x3a8(%rbp)
jmp 0x4972
movq -0x3a8(%rbp), %rdi
leaq 0xb2b1(%rip), %rsi      # 0xfc31
callq 0x32c0
movq %rax, -0x3b0(%rbp)
jmp 0x498e
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movq -0x3b0(%rbp), %rdi
movl (%rax), %esi
callq 0x33b0
movq %rax, -0x3b8(%rbp)
jmp 0x49b2
movq -0x3b8(%rbp), %rdi
leaq 0xaadc(%rip), %rsi      # 0xf49c
callq 0x32c0
movq %rax, -0x3c0(%rbp)
jmp 0x49ce
movl -0x54(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movq -0x3c0(%rbp), %rdi
movl (%rax), %esi
callq 0x33b0
movq %rax, -0x3c8(%rbp)
jmp 0x49f3
movq -0x3c8(%rbp), %rdi
leaq 0xaa9d(%rip), %rsi      # 0xf49e
callq 0x32c0
jmp 0x4a08
jmp 0x4a0a
leaq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9550
movl (%rax), %eax
movl %eax, -0x3cc(%rbp)
movl -0x54(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movq %rax, %rcx
movl -0x3cc(%rbp), %eax
addl (%rcx), %eax
shrl %eax
movl %eax, -0x74(%rbp)
movsd 0xa5c3(%rip), %xmm0     # 0xf008
subsd -0x68(%rbp), %xmm0
callq 0x3240
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4a83
jp 0x4a83
xorps %xmm0, %xmm0
movsd %xmm0, -0x70(%rbp)
movq 0x1053e(%rip), %rdi     # 0x14fc8
leaq -0x2a0(%rbp), %rsi
callq 0x3280
movq %rax, -0x3d8(%rbp)
jmp 0x4a9f
movq -0x3d8(%rbp), %rdi
leaq 0xa876(%rip), %rsi      # 0xf323
callq 0x32c0
movq %rax, -0x3e0(%rbp)
jmp 0x4abb
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movq -0x3e0(%rbp), %rdi
movl (%rax), %esi
callq 0x33b0
movq %rax, -0x3e8(%rbp)
jmp 0x4adf
movq -0x3e8(%rbp), %rdi
leaq 0xa836(%rip), %rsi      # 0xf323
callq 0x32c0
movq %rax, -0x3f0(%rbp)
jmp 0x4afb
movl -0x54(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movq -0x3f0(%rbp), %rdi
movl (%rax), %esi
callq 0x33b0
movq %rax, -0x3f8(%rbp)
jmp 0x4b20
movq -0x3f8(%rbp), %rdi
leaq 0xa7f5(%rip), %rsi      # 0xf323
callq 0x32c0
movq %rax, -0x400(%rbp)
jmp 0x4b3c
movq -0x400(%rbp), %rdi
movl -0x74(%rbp), %esi
callq 0x33b0
movq %rax, -0x408(%rbp)
jmp 0x4b54
movq -0x408(%rbp), %rdi
leaq 0xa7c1(%rip), %rsi      # 0xf323
callq 0x32c0
movq %rax, -0x410(%rbp)
jmp 0x4b70
movq -0x410(%rbp), %rdi
movsd -0x70(%rbp), %xmm0
callq 0x3530
movq %rax, -0x418(%rbp)
jmp 0x4b8a
movq -0x418(%rbp), %rdi
leaq 0xa78b(%rip), %rsi      # 0xf323
callq 0x32c0
movq %rax, -0x420(%rbp)
jmp 0x4ba6
movq -0x420(%rbp), %rdi
movl -0x5c(%rbp), %esi
callq 0x33b0
movq %rax, -0x428(%rbp)
jmp 0x4bbe
movq -0x428(%rbp), %rdi
leaq 0xb020(%rip), %rsi      # 0xfbec
callq 0x32c0
jmp 0x4bd3
movl $0x0, -0x78(%rbp)
movl -0x78(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x4c59
movl -0x20(%rbp), %eax
addl -0x78(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movl (%rax), %eax
movl %eax, -0x434(%rbp)
movl -0x78(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movl -0x434(%rbp), %ecx
movl %ecx, (%rax)
movl -0x20(%rbp), %eax
addl -0x78(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x430(%rbp)
movl -0x78(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movsd -0x430(%rbp), %xmm0
movsd %xmm0, 0x8(%rax)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x4bda
movl -0x7c(%rbp), %eax
movl %eax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x92f0
movq %rax, -0x320(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, %esi
leaq -0x320(%rbp), %rdi
callq 0x95a0
movq %rax, -0x318(%rbp)
movq -0x318(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x30b0
jmp 0x4ca4
movq -0x18(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x30b0
jmp 0x4cb6
jmp 0x4533
movl -0x58(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jbe 0x5010
movl -0x58(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x5010
movl -0x58(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x324(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x68(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x78(%rbp), %eax
cmpl -0x324(%rbp), %eax
jae 0x4d4b
movl -0x78(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
xorps %xmm0, %xmm0
ucomisd 0x8(%rax), %xmm0
jbe 0x4d1a
jmp 0x4d40
movl -0x78(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movsd 0x8(%rax), %xmm0
addsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x4cf5
cmpl $0x0, -0x5c(%rbp)
jbe 0x4d6c
movl -0x58(%rbp), %eax
cvtsi2sd %rax, %xmm1
movsd -0x68(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0x4e3f
movq 0x1027d(%rip), %rdi     # 0x14ff0
leaq 0xa711(%rip), %rsi      # 0xf48b
callq 0x32c0
movq %rax, -0x440(%rbp)
jmp 0x4d88
movq -0x440(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x3280
movq %rax, -0x448(%rbp)
jmp 0x4da4
movq -0x448(%rbp), %rdi
leaq 0xae7f(%rip), %rsi      # 0xfc31
callq 0x32c0
movq %rax, -0x450(%rbp)
jmp 0x4dc0
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movq -0x450(%rbp), %rdi
movl (%rax), %esi
callq 0x33b0
movq %rax, -0x458(%rbp)
jmp 0x4de4
movq -0x458(%rbp), %rdi
leaq 0xa6aa(%rip), %rsi      # 0xf49c
callq 0x32c0
movq %rax, -0x460(%rbp)
jmp 0x4e00
movl -0x324(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movq -0x460(%rbp), %rdi
movl (%rax), %esi
callq 0x33b0
movq %rax, -0x468(%rbp)
jmp 0x4e28
movq -0x468(%rbp), %rdi
leaq 0xa668(%rip), %rsi      # 0xf49e
callq 0x32c0
jmp 0x4e3d
jmp 0x4e3f
leaq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9550
movl (%rax), %eax
movl %eax, -0x46c(%rbp)
movl -0x324(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movq %rax, %rcx
movl -0x46c(%rbp), %eax
addl (%rcx), %eax
shrl %eax
movl %eax, -0x74(%rbp)
movsd 0xa18b(%rip), %xmm0     # 0xf008
subsd -0x68(%rbp), %xmm0
callq 0x3240
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4ebb
jp 0x4ebb
xorps %xmm0, %xmm0
movsd %xmm0, -0x70(%rbp)
movq 0x10106(%rip), %rdi     # 0x14fc8
leaq -0x2a0(%rbp), %rsi
callq 0x3280
movq %rax, -0x478(%rbp)
jmp 0x4ed7
movq -0x478(%rbp), %rdi
leaq 0xa43e(%rip), %rsi      # 0xf323
callq 0x32c0
movq %rax, -0x480(%rbp)
jmp 0x4ef3
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movq -0x480(%rbp), %rdi
movl (%rax), %esi
callq 0x33b0
movq %rax, -0x488(%rbp)
jmp 0x4f17
movq -0x488(%rbp), %rdi
leaq 0xa3fe(%rip), %rsi      # 0xf323
callq 0x32c0
movq %rax, -0x490(%rbp)
jmp 0x4f33
movl -0x324(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x9550
movq -0x490(%rbp), %rdi
movl (%rax), %esi
callq 0x33b0
movq %rax, -0x498(%rbp)
jmp 0x4f5b
movq -0x498(%rbp), %rdi
leaq 0xa3ba(%rip), %rsi      # 0xf323
callq 0x32c0
movq %rax, -0x4a0(%rbp)
jmp 0x4f77
movq -0x4a0(%rbp), %rdi
movl -0x74(%rbp), %esi
callq 0x33b0
movq %rax, -0x4a8(%rbp)
jmp 0x4f8f
movq -0x4a8(%rbp), %rdi
leaq 0xa386(%rip), %rsi      # 0xf323
callq 0x32c0
movq %rax, -0x4b0(%rbp)
jmp 0x4fab
movq -0x4b0(%rbp), %rdi
movsd -0x70(%rbp), %xmm0
callq 0x3530
movq %rax, -0x4b8(%rbp)
jmp 0x4fc5
movq -0x4b8(%rbp), %rdi
leaq 0xa350(%rip), %rsi      # 0xf323
callq 0x32c0
movq %rax, -0x4c0(%rbp)
jmp 0x4fe1
movq -0x4c0(%rbp), %rdi
movl -0x5c(%rbp), %esi
callq 0x33b0
movq %rax, -0x4c8(%rbp)
jmp 0x4ff9
movq -0x4c8(%rbp), %rdi
leaq 0xabe5(%rip), %rsi      # 0xfbec
callq 0x32c0
jmp 0x500e
jmp 0x5010
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2f4(%rbp)
leaq -0x2a0(%rbp), %rdi
callq 0x31b0
leaq -0x280(%rbp), %rdi
callq 0x31b0
leaq -0x248(%rbp), %rdi
callq 0x31b0
leaq -0x228(%rbp), %rdi
callq 0x31b0
leaq -0x208(%rbp), %rdi
callq 0x3210
leaq -0x38(%rbp), %rdi
callq 0x9720
movl -0x4(%rbp), %eax
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbp
retq
leaq -0x2a0(%rbp), %rdi
callq 0x31b0
leaq -0x280(%rbp), %rdi
callq 0x31b0
leaq -0x248(%rbp), %rdi
callq 0x31b0
leaq -0x228(%rbp), %rdi
callq 0x31b0
leaq -0x208(%rbp), %rdi
callq 0x3210
leaq -0x38(%rbp), %rdi
callq 0x9720
movq -0x40(%rbp), %rdi
callq 0x34c0