// File: /workspace/github_cpp_makefile_star2_O1/sorazy[P]canny/main.cpp
// Function: main
int main(int argc, char **argv)
{
	// Exit program if proper arguments are not provided by user
	if (argc != 4)
	{
		cout << "Proper syntax: ./a.out <input_filename> <high_threshold> <sigma_value>" << endl;
		return 0;
	}

	// Exit program if file doesn't open
	string filename(argv[1]);
	string path = "./input_images/" + filename;
	ifstream infile(path, ios::binary);
	if (!infile.is_open())
	{
		cout << "File " << path << " not found in directory." << endl;
		return 0;
	}	

	// Opening output files
	ofstream img1("./output_images/canny_mag.pgm", ios::binary);
	ofstream img2("./output_images/canny_peaks.pgm", ios::binary);		
	ofstream img3("./output_images/canny_final.pgm", ios::binary);

	::hi = stoi(argv[2]);
	::lo = .35 * hi;
	::sig = stoi(argv[3]);

	// Storing header information and copying into the new ouput images
	infile >> ::type >> ::width >> ::height >> ::intensity;
	img1 << type << endl << width << " " << height << endl << intensity << endl;
	img2 << type << endl << width << " " << height << endl << intensity << endl;
	img3 << type << endl << width << " " << height << endl << intensity << endl;

	// These matrices will hold the integer values of the input image and masks.
	// I'm dynamically allocating arrays to easily pass them into functions.
	double **pic = new double*[height], **mag = new double*[height], **final = new double*[height];
	double **x = new double*[height], **y = new double*[height];

	for (int i = 0; i < height; i++)
	{
		pic[i] = new double[width];
		mag[i] = new double[width];
		final[i] = new double[width];
		x[i] = new double[width];
		y[i] = new double[width];
	}

	// Reading in the input image as integers
	for (int i = 0; i < height; i++)
		for (int j = 0; j < width; j++)
			pic[i][j] = (int)infile.get();

	// Create the magniute matrix
	magnitude_matrix(pic, mag, x, y);

	// Get all the peaks and store them in vector
	HashMap *peaks = new HashMap();
	vector<Point*> v = peak_detection(mag, peaks, x, y);

	// Go through the vector and call the recursive function and each point. If the value
	// in the mag matrix is hi, then immediately accept it in final. If lo, then immediately
	// reject. If between lo and hi, then check if it's next to a hi pixel using recursion
	HashMap *h = new HashMap();
	int a, b;
	for (int i = 0; i < v.size(); i++)
	{
		a = v.at(i)->x;
		b = v.at(i)->y;

		if (mag[a][b] >= hi)
			final[a][b] = 255;
		else if (mag[a][b] < lo)
			final[a][b] = 0;
		else
			recursiveDT(mag, final, h, peaks, a, b, 0);
	}

	// ================================= IMAGE OUTPUT =================================
	// Outputting the 'mag' matrix to img1. It's very important to cast it to a char.
	// To make sure that the decimal doesn't produce any wonky results, cast to an int
	// ================================= IMAGE OUTPUT =================================
	for (int i = 0; i < height; i++)
		for (int j = 0; j < width; j++)
			img1 << (char)((int)mag[i][j]);

	// Outputting the points stored in the vector to img2
	int k = 0;
	for (int i = 0; i < v.size(); i++)
	{
		while(k++ != (v.at(i)->x * height + v.at(i)->y - 1))
			img2 << (char)(0);

		img2 << (char)(255);
	}

	// Output the 'final' matrix to img1
	for (int i = 0; i < height; i++)
		for (int j = 0; j < width; j++)
			img3 << (char)((int)final[i][j]);		

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x898, %rsp            # imm = 0x898
cmpl $0x4, %edi
jne 0x2db9
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
leaq -0xb0(%rbp), %r14
leaq -0x2b8(%rbp), %rdx
movq %r14, %rdi
callq 0x3072
leaq 0x2bc2(%rip), %rsi      # 0x505f
leaq -0x90(%rbp), %rdi
movq %r14, %rdx
callq 0x30af
leaq -0x2b8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x4, %edx
callq 0x2230
leaq -0x240(%rbp), %rdi
callq 0x2070
testb %al, %al
je 0x2e00
leaq 0x2baf(%rip), %rsi      # 0x508e
leaq -0x8b8(%rbp), %rdi
movl $0x4, %edx
callq 0x21a0
leaq 0x2bb5(%rip), %rsi      # 0x50ac
leaq -0x6b8(%rbp), %rdi
movl $0x4, %edx
callq 0x21a0
leaq 0x2bbd(%rip), %rsi      # 0x50cc
leaq -0x4b8(%rbp), %rdi
movl $0x4, %edx
callq 0x21a0
movq 0x10(%rbx), %rsi
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x3072
movq -0x58(%rbp), %r15
callq 0x2050
movq %rax, %r14
movl (%rax), %r13d
movl $0x0, (%rax)
leaq -0x38(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %r15, (%r12)
je 0x2f0e
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x2f1a
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x2f1a
testl %ecx, %ecx
jne 0x2583
movl %r13d, (%r14)
movl %eax, 0x4c07(%rip)      # 0x7190
leaq -0x48(%rbp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x25a3
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2190
cvtsi2sdl 0x4be5(%rip), %xmm0 # 0x7190
mulsd 0x2a55(%rip), %xmm0     # 0x5008
cvttsd2si %xmm0, %eax
movl %eax, 0x4bd7(%rip)      # 0x7194
movq 0x18(%rbx), %rsi
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x3072
movq -0x58(%rbp), %rbx
movl (%r14), %r13d
movl $0x0, (%r14)
leaq -0x38(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x21d0
cmpq %rbx, (%r15)
je 0x2f26
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rdx
cmpq %rcx, %rdx
jb 0x2f32
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x2f32
testl %ecx, %ecx
jne 0x2626
movl %r13d, (%r14)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x4b63(%rip)     # 0x7198
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x264a
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2190
leaq -0x2b8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq -0x2a8(%rbp,%rax), %rbx
leaq 0x4b12(%rip), %rsi      # 0x7179
movl $0xa, %edx
callq 0x2260
movq -0x2b8(%rbp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x298(%rbp,%rax)
jne 0x26a6
addq $-0xb, %rbx
cmpq $-0xb, %rbx
ja 0x26a6
movq -0x1d0(%rbp,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x2ed9
leaq 0x4adb(%rip), %rsi      # 0x7188
leaq -0x2b8(%rbp), %rdi
callq 0x20f0
leaq 0x4ac4(%rip), %rsi      # 0x7184
movq %rax, %rdi
callq 0x20f0
leaq 0x4abd(%rip), %rsi      # 0x718c
movq %rax, %rdi
callq 0x20f0
leaq 0x4a9b(%rip), %r14      # 0x7179
movq %r14, %rdi
callq 0x20c0
leaq -0x8b8(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x21b0
movq -0x8b8(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
leaq -0x8b8(%rbp), %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
movl 0x4a58(%rip), %esi      # 0x7188
movq %rax, %rdi
callq 0x2270
movq %rax, %rbx
leaq 0x2abd(%rip), %rsi      # 0x51ff
movl $0x1, %edx
movq %rax, %rdi
callq 0x21b0
movl 0x4a2f(%rip), %esi      # 0x7184
movq %rbx, %rdi
callq 0x2270
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
movl 0x49ff(%rip), %esi      # 0x718c
movq %rax, %rdi
callq 0x2270
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
leaq 0x49b3(%rip), %r14      # 0x7179
movq %r14, %rdi
callq 0x20c0
leaq -0x6b8(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x21b0
movq -0x6b8(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
leaq -0x6b8(%rbp), %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
movl 0x4970(%rip), %esi      # 0x7188
movq %rax, %rdi
callq 0x2270
movq %rax, %rbx
leaq 0x29d5(%rip), %rsi      # 0x51ff
movl $0x1, %edx
movq %rax, %rdi
callq 0x21b0
movl 0x4947(%rip), %esi      # 0x7184
movq %rbx, %rdi
callq 0x2270
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
movl 0x4917(%rip), %esi      # 0x718c
movq %rax, %rdi
callq 0x2270
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
leaq 0x48cb(%rip), %r14      # 0x7179
movq %r14, %rdi
callq 0x20c0
leaq -0x4b8(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x21b0
movq -0x4b8(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
leaq -0x4b8(%rbp), %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
movl 0x4888(%rip), %esi      # 0x7188
movq %rax, %rdi
callq 0x2270
movq %rax, %rbx
leaq 0x28ed(%rip), %rsi      # 0x51ff
movl $0x1, %edx
movq %rax, %rdi
callq 0x21b0
movl 0x485f(%rip), %esi      # 0x7184
movq %rbx, %rdi
callq 0x2270
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
movl 0x482f(%rip), %esi      # 0x718c
movq %rax, %rdi
callq 0x2270
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
movslq 0x47ee(%rip), %r12      # 0x7184
leaq (,%r12,8), %rax
testq %r12, %r12
movq $-0x1, %rbx
cmovnsq %rax, %rbx
movq %rbx, %rdi
callq 0x2030
movq %rax, %r14
movq %rbx, %rdi
callq 0x2030
movq %rax, %r13
movq %rbx, %rdi
callq 0x2030
movq %rax, -0x60(%rbp)
movq %rbx, %rdi
callq 0x2030
movq %rax, -0x70(%rbp)
movq %rbx, %rdi
callq 0x2030
movq %rax, -0x68(%rbp)
testl %r12d, %r12d
jle 0x2a5c
movslq 0x4796(%rip), %rax      # 0x7188
leaq (,%rax,8), %rcx
testq %rax, %rax
movq $-0x1, %rbx
cmovnsq %rcx, %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x2030
movq %rax, (%r14,%r15,8)
movq %rbx, %rdi
callq 0x2030
movq %rax, (%r13,%r15,8)
movq %rbx, %rdi
callq 0x2030
movq -0x60(%rbp), %rcx
movq %rax, (%rcx,%r15,8)
movq %rbx, %rdi
callq 0x2030
movq -0x70(%rbp), %rcx
movq %rax, (%rcx,%r15,8)
movq %rbx, %rdi
callq 0x2030
movq -0x68(%rbp), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
cmpq %r15, %r12
jne 0x2a0b
cmpl $0x0, 0x4721(%rip)      # 0x7184
jle 0x2ab2
xorl %r15d, %r15d
leaq -0x2b8(%rbp), %rbx
cmpl $0x0, 0x4712(%rip)      # 0x7188
jle 0x2aa3
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x21c0
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movq (%r14,%r15,8), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq 0x46ea(%rip), %rax      # 0x7188
cmpq %rax, %r12
jl 0x2a7b
incq %r15
movslq 0x46d7(%rip), %rax      # 0x7184
cmpq %rax, %r15
jl 0x2a6f
movq %r14, %rdi
movq %r13, %rsi
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x31dc
movl $0x40, %edi
callq 0x2180
movq %rax, %r14
movq %rax, %rdi
callq 0x3c9a
leaq -0x58(%rbp), %rdi
movq %r13, %rsi
movq %r14, %rdx
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %r8
callq 0x361d
movl $0x40, %edi
callq 0x2180
movq %rax, %r15
movq %rax, %rdi
callq 0x3c9a
movq -0x58(%rbp), %rax
cmpq %rax, -0x50(%rbp)
je 0x2b9e
xorl %ebx, %ebx
movq (%rax,%rbx,8), %rax
movslq (%rax), %r8
movslq 0x4(%rax), %r9
movq (%r13,%r8,8), %rax
xorps %xmm0, %xmm0
cvtsi2sdl 0x465f(%rip), %xmm0 # 0x7190
movsd (%rax,%r9,8), %xmm1
ucomisd %xmm0, %xmm1
movsd 0x24cd(%rip), %xmm0     # 0x5010
jae 0x2b5a
xorps %xmm2, %xmm2
cvtsi2sdl 0x4644(%rip), %xmm2 # 0x7194
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm2
jbe 0x2b6a
movq -0x60(%rbp), %rax
movq (%rax,%r8,8), %rax
movsd %xmm0, (%rax,%r9,8)
jmp 0x2b83
movl $0x0, (%rsp)
movq %r13, %rdi
movq -0x60(%rbp), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x38f1
incq %rbx
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
ja 0x2b16
cmpl $0x0, 0x45df(%rip)      # 0x7184
jle 0x2bfd
xorl %r15d, %r15d
leaq -0x8b8(%rbp), %rbx
leaq -0x38(%rbp), %r14
cmpl $0x0, 0x45cc(%rip)      # 0x7188
jle 0x2bee
xorl %r12d, %r12d
movq (%r13,%r15,8), %rax
cvttsd2si (%rax,%r12,8), %eax
movb %al, -0x38(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r12
movslq 0x459f(%rip), %rax      # 0x7188
cmpq %rax, %r12
jl 0x2bc1
incq %r15
movslq 0x458c(%rip), %rax      # 0x7184
cmpq %rax, %r15
jl 0x2bb5
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x2ca7
xorl %ebx, %ebx
leaq -0x6b8(%rbp), %r14
leaq -0x38(%rbp), %r15
xorl %r13d, %r13d
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rbx, %rdx
jbe 0x2ec8
incl %r13d
movq (%rax,%rbx,8), %rax
movl 0x4544(%rip), %ecx      # 0x7184
imull (%rax), %ecx
addl 0x4(%rax), %ecx
cmpl %ecx, %r13d
je 0x2c7b
movb $0x0, -0x38(%rbp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21b0
incl %r13d
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rbx, %rdx
ja 0x2c36
jmp 0x2ec8
movb $-0x1, -0x38(%rbp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21b0
incq %rbx
movq -0x50(%rbp), %rax
subq -0x58(%rbp), %rax
sarq $0x3, %rax
cmpq %rbx, %rax
ja 0x2c1b
cmpl $0x0, 0x44d6(%rip)      # 0x7184
movq -0x60(%rbp), %r13
jle 0x2d0a
xorl %r15d, %r15d
leaq -0x4b8(%rbp), %rbx
leaq -0x38(%rbp), %r14
cmpl $0x0, 0x44bf(%rip)      # 0x7188
jle 0x2cfb
xorl %r12d, %r12d
movq (%r13,%r15,8), %rax
cvttsd2si (%rax,%r12,8), %eax
movb %al, -0x38(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21b0
incq %r12
movslq 0x4492(%rip), %rax      # 0x7188
cmpq %rax, %r12
jl 0x2cce
incq %r15
movslq 0x447f(%rip), %rax      # 0x7184
cmpq %rax, %r15
jl 0x2cc2
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x2d1f
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x2190
movq 0x42aa(%rip), %rax      # 0x6fd0
movq (%rax), %rbx
movq 0x18(%rax), %r14
leaq -0x4b0(%rbp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, -0x4b8(%rbp,%rax)
callq 0x2150
movl $0xf8, %r15d
leaq -0x4b8(%rbp), %rdi
addq %r15, %rdi
callq 0x20a0
leaq -0x6b0(%rbp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, -0x6b8(%rbp,%rax)
callq 0x2150
leaq -0x6b8(%rbp), %rdi
addq %r15, %rdi
callq 0x20a0
leaq -0x8b0(%rbp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, -0x8b8(%rbp,%rax)
callq 0x2150
leaq -0x8b8(%rbp), %rdi
addq %r15, %rdi
callq 0x20a0
jmp 0x2e70
movq 0x4218(%rip), %rbx      # 0x6fd8
leaq 0x2251(%rip), %rsi      # 0x5018
movl $0x46, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
jmp 0x2eb4
movq 0x41d1(%rip), %rdi      # 0x6fd8
leaq 0x2261(%rip), %rsi      # 0x506f
movl $0x5, %edx
callq 0x21b0
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x41ab(%rip), %rdi      # 0x6fd8
callq 0x21b0
movq %rax, %rbx
leaq 0x2239(%rip), %rsi      # 0x5075
movl $0x18, %edx
movq %rax, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
leaq -0x2b8(%rbp), %rdi
callq 0x2080
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e95
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2190
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2eb4
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2190
xorl %eax, %eax
addq $0x898, %rsp            # imm = 0x898
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x224c(%rip), %rdi      # 0x511b
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2200
movq (%rdi), %rax
callq *0x48(%rax)
cmpl $-0x1, %eax
jne 0x26a6
movq -0x2b8(%rbp), %rax
movq -0x18(%rax), %rax
leaq (%rax,%rbp), %rdi
addq $-0x2b8, %rdi           # imm = 0xFD48
movl 0x20(%rdi), %esi
orl $0x2, %esi
callq 0x2250
jmp 0x26a6
leaq 0x21d7(%rip), %rdi      # 0x50ec
callq 0x20e0
leaq 0x21cb(%rip), %rdi      # 0x50ec
callq 0x21e0
leaq 0x21bf(%rip), %rdi      # 0x50ec
callq 0x20e0
leaq 0x21b3(%rip), %rdi      # 0x50ec
callq 0x21e0
movq %rax, %rbx
movl $0x40, %esi
movq %r15, %rdi
callq 0x2190
jmp 0x2fed
jmp 0x2fea
jmp 0x2fe3
movq %rax, %rbx
movl $0x40, %esi
movq %r14, %rdi
jmp 0x2ffd
jmp 0x2fe3
jmp 0x2fe3
jmp 0x2fe3
jmp 0x2fe3
jmp 0x2fe3
jmp 0x2fe3
jmp 0x2fe3
movq %rax, %rbx
jmp 0x300e
movq %rax, %rbx
jmp 0x301a
jmp 0x2fd4
jmp 0x2fe3
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x2f9b
movl %r13d, (%r14)
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
jne 0x2fbf
jmp 0x3002
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x2fb2
movl %r13d, (%r14)
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3002
movq -0x48(%rbp), %rsi
incq %rsi
jmp 0x2ffd
movq %rax, %rbx
jmp 0x3032
movq %rax, %rbx
jmp 0x304b
jmp 0x2fea
movq %rax, %rbx
jmp 0x3026
jmp 0x2fea
jmp 0x2fe3
jmp 0x2fe3
jmp 0x2fea
jmp 0x2fea
movq %rax, %rbx
jmp 0x3002
jmp 0x2fea
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x3002
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x2190
leaq -0x4b8(%rbp), %rdi
callq 0x21f0
leaq -0x6b8(%rbp), %rdi
callq 0x21f0
leaq -0x8b8(%rbp), %rdi
callq 0x21f0
leaq -0x2b8(%rbp), %rdi
callq 0x2080
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x304b
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2190
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x306a
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x2280