// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movl %ecx, -0x64(%rbp)
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
xorpd %xmm0, %xmm0
leaq -0x60(%rbp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl %edx, %esi
callq 0x81c6
movq -0x60(%rbp), %r14
leaq -0x2c8(%rbp), %rdi
callq 0x3170
leaq -0xc8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x108(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xe8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x98(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %edx
leaq -0xd8(%rbp), %rsi
movq %r12, %rdi
callq 0x33d0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %edx
leaq -0xf8(%rbp), %rsi
movq %r15, %rdi
callq 0x33d0
leal -0x1(%rbx), %eax
movq %rbx, -0x120(%rbp)
movl %ebx, %ecx
subl -0x64(%rbp), %ecx
movl %eax, %eax
movl %ecx, -0x44(%rbp)
movl %ecx, %ecx
shlq $0x4, %rcx
movq %rcx, -0x128(%rbp)
movq $0x0, -0x40(%rbp)
shlq $0x4, %rax
movq %rax, -0x30(%rbp)
leaq -0x2c8(%rbp), %rbx
cmpq $0x0, -0xd0(%rbp)
je 0x4582
leaq -0x78(%rbp), %r13
movq %r13, -0x88(%rbp)
movq $0x0, -0x80(%rbp)
movb $0x0, -0x78(%rbp)
leaq -0x2b0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x32c0
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x402d
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x2c8(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x3350
leaq -0x2b0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x32c0
movq %rbx, %rdi
leaq -0x118(%rbp), %rsi
callq 0x3280
movq %rax, %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3380
movq %rax, %rdi
leaq -0x140(%rbp), %rsi
callq 0x3140
movq %rax, %rdi
leaq -0x138(%rbp), %rsi
callq 0x3140
movq %r13, -0x88(%rbp)
movq $0x0, -0x80(%rbp)
movb $0x0, -0x78(%rbp)
leaq -0x2b0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x32c0
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x40cf
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x2c8(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x3350
leaq -0x2b0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x32c0
movq %rbx, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3280
movq %rax, %rdi
leaq -0xb4(%rbp), %rsi
callq 0x3380
movq %rax, %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3130
movq %rax, %rdi
leaq -0xac(%rbp), %rsi
callq 0x3130
movq %r12, %rbx
movq %r15, %r12
movq -0xa0(%rbp), %r13
movq -0x110(%rbp), %r15
cmpq %r13, %r15
movq %r13, %rdx
cmovbq %r15, %rdx
testq %rdx, %rdx
je 0x4170
movq -0x118(%rbp), %rsi
movq -0xa8(%rbp), %rdi
callq 0x3230
testl %eax, %eax
sete %al
jmp 0x4172
movb $0x1, %al
testb %al, %al
je 0x4560
cmpq %r15, %r13
jne 0x4560
movl -0xb4(%rbp), %eax
cmpl -0xb8(%rbp), %eax
jne 0x4560
movl %eax, (%r14)
movl -0xb0(%rbp), %eax
movl -0xac(%rbp), %ecx
movl %eax, %edx
orl %ecx, %edx
movsd 0x5e68(%rip), %xmm0     # 0xa018
js 0x4251
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
cvtsi2sd %ecx, %xmm1
movsd -0x140(%rbp), %xmm2
movsd -0x138(%rbp), %xmm3
movapd %xmm2, %xmm4
addsd %xmm2, %xmm4
movsd 0x5e27(%rip), %xmm6     # 0xa008
movapd %xmm6, %xmm5
subsd %xmm2, %xmm5
mulsd %xmm4, %xmm2
mulsd %xmm4, %xmm5
addsd %xmm2, %xmm5
movapd %xmm3, %xmm2
addsd %xmm3, %xmm2
movapd %xmm6, %xmm4
subsd %xmm3, %xmm4
mulsd %xmm2, %xmm3
mulsd %xmm2, %xmm4
addsd %xmm3, %xmm4
movapd %xmm0, %xmm2
subsd %xmm5, %xmm2
movapd 0x5e2f(%rip), %xmm3     # 0xa050
andpd %xmm3, %xmm2
subsd %xmm1, %xmm0
subsd %xmm4, %xmm1
andpd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd 0x5de3(%rip), %xmm1     # 0xa020
andpd %xmm3, %xmm0
mulsd 0x5ddf(%rip), %xmm0     # 0xa028
addsd %xmm6, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%r14)
addq $0x10, %r14
movq -0x58(%rbp), %rcx
cmpq %rcx, %r14
movq %r12, %r15
je 0x4280
movq -0x40(%rbp), %rax
incl %eax
movq %rax, -0x40(%rbp)
movq %rbx, %r12
leaq -0x2c8(%rbp), %rbx
jmp 0x450e
movq -0x60(%rbp), %rdx
cmpq %rcx, %rdx
movq %rbx, %r12
je 0x42d1
xorl %eax, %eax
xorpd %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
leaq -0x2c8(%rbp), %rbx
movsd 0x8(%rdx), %xmm0
xorl %esi, %esi
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
setbe %dil
ja 0x42c1
movsd -0x40(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movb %dil, %sil
addl %esi, %eax
addq $0x10, %rdx
cmpq %rcx, %rdx
jne 0x429e
jmp 0x42e3
xorpd %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
xorl %eax, %eax
leaq -0x2c8(%rbp), %rbx
movl %eax, %ecx
testl %eax, %eax
movq %rcx, -0x130(%rbp)
je 0x430b
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movsd -0x40(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
jmp 0x43a0
movl $0x10, %edx
movq 0x9cd9(%rip), %rdi      # 0xdff0
leaq 0x6133(%rip), %rsi      # 0xa451
callq 0x3250
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq 0x9cb8(%rip), %rdi      # 0xdff0
callq 0x3250
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x68a8(%rip), %rsi      # 0xabf7
callq 0x3250
movq -0x60(%rbp), %rax
movl (%rax), %esi
movq %r13, %rdi
callq 0x3150
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x60ee(%rip), %rsi      # 0xa462
callq 0x3250
movq -0x60(%rbp), %rax
movq -0x30(%rbp), %rcx
movl (%rax,%rcx), %esi
movq %r13, %rdi
callq 0x3150
movl $0x18, %edx
movq %rax, %rdi
leaq 0x60c9(%rip), %rsi      # 0xa464
callq 0x3250
movq -0x60(%rbp), %rax
movq -0x30(%rbp), %rcx
movl (%rax,%rcx), %r14d
addl (%rax), %r14d
movsd 0x5c51(%rip), %xmm0     # 0xa008
subsd -0x40(%rbp), %xmm0
callq 0x31b0
movapd %xmm0, -0x40(%rbp)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq 0x9bed(%rip), %rdi      # 0xdfc8
callq 0x3250
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5ef7(%rip), %rsi      # 0xa2e9
callq 0x3250
movq -0x60(%rbp), %rax
movl (%rax), %esi
movq %r13, %rdi
callq 0x3150
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5ed2(%rip), %rsi      # 0xa2e9
callq 0x3250
movq -0x60(%rbp), %rax
movq -0x30(%rbp), %rcx
movl (%rax,%rcx), %esi
movq %r13, %rdi
callq 0x3150
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5ea8(%rip), %rsi      # 0xa2e9
callq 0x3250
shrl %r14d
movl %r14d, %esi
movq %r13, %rdi
callq 0x3150
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5e83(%rip), %rsi      # 0xa2e9
callq 0x3250
movapd -0x40(%rbp), %xmm0
movapd %xmm0, %xmm1
xorpd 0x5be4(%rip), %xmm1     # 0xa060
cmpeqsd %xmm1, %xmm0
andnpd %xmm1, %xmm0
movq %r13, %rdi
callq 0x3320
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5e4a(%rip), %rsi      # 0xa2e9
callq 0x3250
movq %r13, %rdi
movq -0x130(%rbp), %rsi
callq 0x3150
movl $0x1, %edx
movq %rax, %rdi
leaq 0x66f0(%rip), %rsi      # 0xabb2
callq 0x3250
cmpl $0x0, -0x44(%rbp)
movq -0x128(%rbp), %r8
je 0x4500
movq -0x60(%rbp), %rax
movl -0x64(%rbp), %ecx
xorl %edx, %edx
movl %ecx, %esi
shlq $0x4, %rsi
movl (%rax,%rsi), %edi
movl %edi, (%rax,%rdx)
movsd 0x8(%rax,%rsi), %xmm0
movsd %xmm0, 0x8(%rax,%rdx)
addq $0x10, %rdx
incl %ecx
cmpq %rdx, %r8
jne 0x44dd
movq -0x60(%rbp), %r14
addq %r8, %r14
movl -0x44(%rbp), %eax
movq %rax, -0x40(%rbp)
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %edx
movq %r12, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x33d0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %edx
movq %r15, %rdi
leaq -0xf8(%rbp), %rsi
callq 0x33d0
jmp 0x3fdd
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0x9a84(%rip), %rdi      # 0xdff0
leaq 0x5de4(%rip), %rsi      # 0xa357
movl $0x20, %edx
callq 0x3250
jmp 0x47e0
movq -0x40(%rbp), %r8
cmpl -0x44(%rbp), %r8d
setbe %al
cmpl -0x120(%rbp), %r8d
setae %cl
orb %al, %cl
jne 0x47de
movl %r8d, %eax
decl %eax
movl %eax, %r15d
je 0x45f7
movq -0x60(%rbp), %rax
movq %r15, %rcx
shlq $0x4, %rcx
xorl %edx, %edx
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movsd %xmm1, -0x30(%rbp)
xorl %r14d, %r14d
movsd 0x8(%rax,%rdx), %xmm1
xorl %esi, %esi
ucomisd %xmm1, %xmm0
setbe %dil
ja 0x45e6
movsd -0x30(%rbp), %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, -0x30(%rbp)
movb %dil, %sil
addl %esi, %r14d
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x45c6
jmp 0x4603
xorl %r14d, %r14d
xorpd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
testl %r14d, %r14d
je 0x4626
movl %r8d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
jmp 0x46be
movq 0x99c3(%rip), %rdi      # 0xdff0
leaq 0x5e1d(%rip), %rsi      # 0xa451
movl $0x10, %edx
callq 0x3250
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq 0x999d(%rip), %rdi      # 0xdff0
callq 0x3250
movq %rax, %rbx
leaq 0x6595(%rip), %rsi      # 0xabf7
movl $0x1, %edx
movq %rax, %rdi
callq 0x3250
movq -0x60(%rbp), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x3150
movq %rax, %rbx
leaq 0x5ddb(%rip), %rsi      # 0xa462
movl $0x1, %edx
movq %rax, %rdi
callq 0x3250
movq -0x60(%rbp), %rax
movq %r15, %rcx
shlq $0x4, %rcx
movl (%rax,%rcx), %esi
movq %rbx, %rdi
callq 0x3150
leaq 0x5db3(%rip), %rsi      # 0xa464
movl $0x18, %edx
movq %rax, %rdi
callq 0x3250
movq -0x60(%rbp), %rax
shlq $0x4, %r15
movl (%rax,%r15), %r12d
addl (%rax), %r12d
movsd 0x5933(%rip), %xmm0     # 0xa008
subsd -0x30(%rbp), %xmm0
callq 0x31b0
movapd %xmm0, -0x40(%rbp)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq 0x98cf(%rip), %rdi      # 0xdfc8
callq 0x3250
movq %rax, %rbx
leaq 0x5be1(%rip), %rsi      # 0xa2e9
movl $0x1, %edx
movq %rax, %rdi
callq 0x3250
movq -0x60(%rbp), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x3150
movq %rax, %rbx
leaq 0x5bbc(%rip), %rsi      # 0xa2e9
movl $0x1, %edx
movq %rax, %rdi
callq 0x3250
movq -0x60(%rbp), %rax
movl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x3150
movq %rax, %rbx
leaq 0x5b95(%rip), %rsi      # 0xa2e9
movl $0x1, %edx
movq %rax, %rdi
callq 0x3250
shrl %r12d
movl %r12d, %esi
movq %rbx, %rdi
callq 0x3150
movq %rax, %rbx
leaq 0x5b70(%rip), %rsi      # 0xa2e9
movl $0x1, %edx
movq %rax, %rdi
callq 0x3250
movapd 0x58d2(%rip), %xmm1     # 0xa060
movapd -0x40(%rbp), %xmm0
xorpd %xmm0, %xmm1
cmpeqsd %xmm1, %xmm0
andnpd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x3320
movq %rax, %rbx
leaq 0x5b37(%rip), %rsi      # 0xa2e9
movl $0x1, %edx
movq %rax, %rdi
callq 0x3250
movl %r14d, %esi
movq %rbx, %rdi
callq 0x3150
leaq 0x63e1(%rip), %rsi      # 0xabb2
movl $0x1, %edx
movq %rax, %rdi
callq 0x3250
xorl %ebx, %ebx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x4802
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x4824
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x4846
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x4868
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x3220
movq 0x9741(%rip), %rsi      # 0xdfb0
leaq -0x2c8(%rbp), %rdi
callq 0x3190
leaq -0x248(%rbp), %rdi
callq 0x30e0
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x489c
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x3220
movl %ebx, %eax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x48b2
movq %rax, %rbx
jmp 0x4987
jmp 0x48dd
jmp 0x48dd
jmp 0x48c0
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x48e0
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x48e0
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x4902
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x4924
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x4946
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x4968
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x3220
movq 0x9641(%rip), %rsi      # 0xdfb0
leaq -0x2c8(%rbp), %rdi
callq 0x3190
leaq -0x248(%rbp), %rdi
callq 0x30e0
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x499c
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x3390