// File: manikandan5[P]Image-Matching-Stitching-Warping/a2.cpp
// Function: main
int main(int argc, char **argv)
{
  try {

		if(argc < 2)
		{
			cout << "Insufficent number of arguments; correct usage:" << endl;
			cout << "    a2-p1 part_id ..." << endl;
			return -1;
		}	

		
		string part = argv[1];
		
		if(part == "part1")
		{
			if(argc < 4)
			{
				//Ranking of each image from a group chosen randomly.
				Image::randomRanking();
				return -1;
			}			
			Image queryImage(argv[2]);
			vector<Image> images;
			for(int i = 3;i < argc;++i)
			{
				Image I(argv[i]);
				images.push_back(I);
			}
			
			//1 - ranking of all the images with respect to query images
			Image::descriptorMatching1(queryImage,images);
						
				
		}
		else if(part == "part1fast")
		{
			if(argc < 4)
			{
				//Ranking of each image from a group chosen randomly.
				Image::randomRanking(true);
				return -1;
			}
			
			Image queryImage(argv[2]);
			vector<Image> images;
			for(int i = 3;i < argc;++i)
			{
				Image I(argv[i]);
				images.push_back(I);
			}
			
			//3 - ranking of all the images with respect to query images - quantized projection function
			Image::descriptorMatching2(queryImage,images);
		}
		else if(part == "part2")
		{
			if(argc < 4)
			{
				//Lincoln Transformation
				Image I("lincoln.png");
				CImg<double> projection(3,3);
				projection(0,0) = 0.907;
				projection(1,0) = 0.258;
				projection(2,0) = -182;
				projection(0,1) = -0.153;
				projection(1,1) = 1.44;
				projection(2,1) = 58;
				projection(0,2) = -0.000306;
				projection(1,2) = 0.000731;
				projection(2,2) = 1;
			
				string lincolnName = "lincoln_transform.jpg";
				projectiveTransform(I,projection,lincolnName);
				
				return -1;
			}
			
			// Warping of query image in terms of all other images
			Image queryImage(argv[2]);
			vector<Image> images;
			for(int i = 3;i < argc;++i)
			{
				Image I(argv[i]);
				images.push_back(I);
			}
			
			warpingApplication(queryImage,images);
		}
		else
		throw std::string("unknown part!");

	}catch(const string &err) 
	{
		cerr << "Error: " << err << endl;
	}
}

// Assembly:
subq $0x638, %rsp            # imm = 0x638
movl $0x0, 0x634(%rsp)
movl %edi, 0x630(%rsp)
movq %rsi, 0x628(%rsp)
cmpl $0x2, 0x630(%rsp)
jge 0x7b6e
movq 0xf84e2(%rip), %rdi     # 0xfffc8
leaq 0xc1ed4(%rip), %rsi     # 0xc99c1
callq 0x5520
movq %rax, 0x110(%rsp)
jmp 0x7afc
movq 0x110(%rsp), %rdi
movq 0xf8495(%rip), %rsi     # 0xfffa0
callq 0x5580
jmp 0x7b12
movq 0xf84af(%rip), %rdi     # 0xfffc8
leaq 0xc1ed1(%rip), %rsi     # 0xc99f1
callq 0x5520
movq %rax, 0x108(%rsp)
jmp 0x7b2f
movq 0x108(%rsp), %rdi
movq 0xf8462(%rip), %rsi     # 0xfffa0
callq 0x5580
jmp 0x7b45
movl $0xffffffff, 0x634(%rsp) # imm = 0xFFFFFFFF
jmp 0x8942
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x88d0
movq 0x628(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xf8(%rsp)
leaq 0x5f7(%rsp), %rdi
movq %rdi, 0x100(%rsp)
callq 0x5980
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
leaq 0x5f8(%rsp), %rdi
callq 0x56d0
jmp 0x7bb6
leaq 0x5f7(%rsp), %rdi
callq 0x5590
leaq 0xc1e3d(%rip), %rsi     # 0xc9a07
leaq 0x5f8(%rsp), %rdi
callq 0xb8a0
movb %al, 0xf7(%rsp)
jmp 0x7be0
movb 0xf7(%rsp), %al
testb $0x1, %al
jne 0x7bf0
jmp 0x7ed8
cmpl $0x4, 0x630(%rsp)
jge 0x7c5d
xorl %edi, %edi
callq 0xb8d0
jmp 0x7c03
movl $0xffffffff, 0x634(%rsp) # imm = 0xFFFFFFFF
movl $0x1, 0x5f0(%rsp)
jmp 0x88a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x5f7(%rsp), %rdi
callq 0x5590
jmp 0x88d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x88c3
movq 0x628(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0xe0(%rsp)
leaq 0x55f(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
callq 0x5980
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
leaq 0x560(%rsp), %rdi
callq 0x56d0
jmp 0x7ca5
leaq 0x580(%rsp), %rdi
leaq 0x560(%rsp), %rsi
callq 0xbfd0
jmp 0x7cbc
leaq 0x560(%rsp), %rdi
callq 0x5ae8
leaq 0x55f(%rsp), %rdi
callq 0x5590
leaq 0x540(%rsp), %rdi
callq 0xc220
movl $0x3, 0x53c(%rsp)
movl 0x53c(%rsp), %eax
cmpl 0x630(%rsp), %eax
jge 0x7e6f
movq 0x628(%rsp), %rax
movslq 0x53c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xd0(%rsp)
leaq 0x4a7(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
callq 0x5980
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
leaq 0x4a8(%rsp), %rdi
callq 0x56d0
jmp 0x7d52
leaq 0x4c8(%rsp), %rdi
leaq 0x4a8(%rsp), %rsi
callq 0xbfd0
jmp 0x7d69
leaq 0x4a8(%rsp), %rdi
callq 0x5ae8
leaq 0x4a7(%rsp), %rdi
callq 0x5590
leaq 0x540(%rsp), %rdi
leaq 0x4c8(%rsp), %rsi
callq 0xc230
jmp 0x7d9a
leaq 0x4c8(%rsp), %rdi
callq 0xc2a0
movl 0x53c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x53c(%rsp)
jmp 0x7cee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x7df4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x560(%rsp), %rdi
callq 0x5ae8
leaq 0x55f(%rsp), %rdi
callq 0x5590
jmp 0x88c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x7e3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x4a8(%rsp), %rdi
callq 0x5ae8
leaq 0x4a7(%rsp), %rdi
callq 0x5590
jmp 0x7eb9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x4c8(%rsp), %rdi
callq 0xc2a0
jmp 0x7eb9
leaq 0x580(%rsp), %rdi
leaq 0x540(%rsp), %rsi
callq 0xc2f0
jmp 0x7e86
leaq 0x540(%rsp), %rdi
callq 0xc690
leaq 0x580(%rsp), %rdi
callq 0xc2a0
jmp 0x8897
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x540(%rsp), %rdi
callq 0xc690
leaq 0x580(%rsp), %rdi
callq 0xc2a0
jmp 0x88c3
leaq 0xc1b2e(%rip), %rsi     # 0xc9a0d
leaq 0x5f8(%rsp), %rdi
callq 0xb8a0
movb %al, 0xcf(%rsp)
jmp 0x7ef5
movb 0xcf(%rsp), %al
testb $0x1, %al
jne 0x7f05
jmp 0x81b1
cmpl $0x4, 0x630(%rsp)
jge 0x7f36
movl $0x1, %edi
callq 0xb8d0
jmp 0x7f1b
movl $0xffffffff, 0x634(%rsp) # imm = 0xFFFFFFFF
movl $0x1, 0x5f0(%rsp)
jmp 0x88a2
movq 0x628(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0xb8(%rsp)
leaq 0x40f(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0x5980
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
leaq 0x410(%rsp), %rdi
callq 0x56d0
jmp 0x7f7e
leaq 0x430(%rsp), %rdi
leaq 0x410(%rsp), %rsi
callq 0xbfd0
jmp 0x7f95
leaq 0x410(%rsp), %rdi
callq 0x5ae8
leaq 0x40f(%rsp), %rdi
callq 0x5590
leaq 0x3f0(%rsp), %rdi
callq 0xc220
movl $0x3, 0x3ec(%rsp)
movl 0x3ec(%rsp), %eax
cmpl 0x630(%rsp), %eax
jge 0x8148
movq 0x628(%rsp), %rax
movslq 0x3ec(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xa8(%rsp)
leaq 0x357(%rsp), %rdi
movq %rdi, 0xb0(%rsp)
callq 0x5980
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
leaq 0x358(%rsp), %rdi
callq 0x56d0
jmp 0x802b
leaq 0x378(%rsp), %rdi
leaq 0x358(%rsp), %rsi
callq 0xbfd0
jmp 0x8042
leaq 0x358(%rsp), %rdi
callq 0x5ae8
leaq 0x357(%rsp), %rdi
callq 0x5590
leaq 0x3f0(%rsp), %rdi
leaq 0x378(%rsp), %rsi
callq 0xc230
jmp 0x8073
leaq 0x378(%rsp), %rdi
callq 0xc2a0
movl 0x3ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3ec(%rsp)
jmp 0x7fc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x80cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x410(%rsp), %rdi
callq 0x5ae8
leaq 0x40f(%rsp), %rdi
callq 0x5590
jmp 0x88c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x8116
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x358(%rsp), %rdi
callq 0x5ae8
leaq 0x357(%rsp), %rdi
callq 0x5590
jmp 0x8192
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x378(%rsp), %rdi
callq 0xc2a0
jmp 0x8192
leaq 0x430(%rsp), %rdi
leaq 0x3f0(%rsp), %rsi
callq 0xc6f0
jmp 0x815f
leaq 0x3f0(%rsp), %rdi
callq 0xc690
leaq 0x430(%rsp), %rdi
callq 0xc2a0
jmp 0x8895
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x3f0(%rsp), %rdi
callq 0xc690
leaq 0x430(%rsp), %rdi
callq 0xc2a0
jmp 0x88c3
leaq 0xc185f(%rip), %rsi     # 0xc9a17
leaq 0x5f8(%rsp), %rdi
callq 0xb8a0
movb %al, 0xa7(%rsp)
jmp 0x81ce
movb 0xa7(%rsp), %al
testb $0x1, %al
jne 0x81de
jmp 0x87ef
cmpl $0x4, 0x630(%rsp)
jge 0x858c
leaq 0x2bf(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x5980
movq 0x98(%rsp), %rdx
leaq 0xc180d(%rip), %rsi     # 0xc9a1d
leaq 0x2c0(%rsp), %rdi
callq 0x56d0
jmp 0x821f
leaq 0x2e0(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
callq 0xbfd0
jmp 0x8236
leaq 0x2c0(%rsp), %rdi
callq 0x5ae8
leaq 0x2bf(%rsp), %rdi
callq 0x5590
leaq 0x298(%rsp), %rdi
movl $0x3, %edx
movl $0x1, %r8d
movl %edx, %esi
movl %r8d, %ecx
callq 0xa580
jmp 0x826f
leaq 0x298(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x9850
movq %rax, 0x90(%rsp)
jmp 0x828a
movq 0x90(%rsp), %rax
movabsq $0x3fed0624dd2f1aa0, %rcx # imm = 0x3FED0624DD2F1AA0
movq %rcx, (%rax)
leaq 0x298(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x9850
movq %rax, 0x88(%rsp)
jmp 0x82bd
movq 0x88(%rsp), %rax
movabsq $0x3fd083126e978d50, %rcx # imm = 0x3FD083126E978D50
movq %rcx, (%rax)
leaq 0x298(%rsp), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x9850
movq %rax, 0x80(%rsp)
jmp 0x82f0
movq 0x80(%rsp), %rax
movabsq $-0x3f99400000000000, %rcx # imm = 0xC066C00000000000
movq %rcx, (%rax)
leaq 0x298(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x9850
movq %rax, 0x78(%rsp)
jmp 0x8320
movq 0x78(%rsp), %rax
movabsq $-0x403c6a7ef9db22d1, %rcx # imm = 0xBFC395810624DD2F
movq %rcx, (%rax)
leaq 0x298(%rsp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x9850
movq %rax, 0x70(%rsp)
jmp 0x834d
movq 0x70(%rsp), %rax
movabsq $0x3ff70a3d70a3d70a, %rcx # imm = 0x3FF70A3D70A3D70A
movq %rcx, (%rax)
leaq 0x298(%rsp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x9850
movq %rax, 0x68(%rsp)
jmp 0x837d
movq 0x68(%rsp), %rax
movabsq $0x404d000000000000, %rcx # imm = 0x404D000000000000
movq %rcx, (%rax)
leaq 0x298(%rsp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x9850
movq %rax, 0x60(%rsp)
jmp 0x83aa
movq 0x60(%rsp), %rax
movabsq $-0x40cbf22c01e68a0d, %rcx # imm = 0xBF340DD3FE1975F3
movq %rcx, (%rax)
leaq 0x298(%rsp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x9850
movq %rax, 0x58(%rsp)
jmp 0x83da
movq 0x58(%rsp), %rax
movabsq $0x3f47f4128bf3bea9, %rcx # imm = 0x3F47F4128BF3BEA9
movq %rcx, (%rax)
leaq 0x298(%rsp), %rdi
movl $0x2, %edx
movl %edx, %esi
callq 0x9850
movq %rax, 0x50(%rsp)
jmp 0x8407
movq 0x50(%rsp), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rax)
leaq 0x277(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x5980
movq 0x48(%rsp), %rdx
leaq 0xc15f2(%rip), %rsi     # 0xc9a29
leaq 0x278(%rsp), %rdi
callq 0x56d0
jmp 0x8446
leaq 0x277(%rsp), %rdi
callq 0x5590
leaq 0x2e0(%rsp), %rdi
leaq 0x298(%rsp), %rsi
leaq 0x278(%rsp), %rdx
callq 0x5d10
jmp 0x8472
movl $0xffffffff, 0x634(%rsp) # imm = 0xFFFFFFFF
movl $0x1, 0x5f0(%rsp)
leaq 0x278(%rsp), %rdi
callq 0x5ae8
leaq 0x298(%rsp), %rdi
callq 0xa540
leaq 0x2e0(%rsp), %rdi
callq 0xc2a0
jmp 0x88a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x84eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x5ae8
leaq 0x2bf(%rsp), %rdi
callq 0x5590
jmp 0x88c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x857a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x856d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x277(%rsp), %rdi
callq 0x5590
jmp 0x856d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x278(%rsp), %rdi
callq 0x5ae8
leaq 0x298(%rsp), %rdi
callq 0xa540
leaq 0x2e0(%rsp), %rdi
callq 0xc2a0
jmp 0x88c3
movq 0x628(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x38(%rsp)
leaq 0x1df(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x5980
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x1e0(%rsp), %rdi
callq 0x56d0
jmp 0x85c8
leaq 0x200(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0xbfd0
jmp 0x85df
leaq 0x1e0(%rsp), %rdi
callq 0x5ae8
leaq 0x1df(%rsp), %rdi
callq 0x5590
leaq 0x1c0(%rsp), %rdi
callq 0xc220
movl $0x3, 0x1bc(%rsp)
movl 0x1bc(%rsp), %eax
cmpl 0x630(%rsp), %eax
jge 0x8786
movq 0x628(%rsp), %rax
movslq 0x1bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x28(%rsp)
leaq 0x127(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x5980
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x128(%rsp), %rdi
callq 0x56d0
jmp 0x8669
leaq 0x148(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0xbfd0
jmp 0x8680
leaq 0x128(%rsp), %rdi
callq 0x5ae8
leaq 0x127(%rsp), %rdi
callq 0x5590
leaq 0x1c0(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0xc230
jmp 0x86b1
leaq 0x148(%rsp), %rdi
callq 0xc2a0
movl 0x1bc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1bc(%rsp)
jmp 0x8611
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x870b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x1e0(%rsp), %rdi
callq 0x5ae8
leaq 0x1df(%rsp), %rdi
callq 0x5590
jmp 0x88c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
jmp 0x8754
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x5ae8
leaq 0x127(%rsp), %rdi
callq 0x5590
jmp 0x87d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x148(%rsp), %rdi
callq 0xc2a0
jmp 0x87d0
leaq 0x200(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x77c0
jmp 0x879d
leaq 0x1c0(%rsp), %rdi
callq 0xc690
leaq 0x200(%rsp), %rdi
callq 0xc2a0
jmp 0x8893
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0xc690
leaq 0x200(%rsp), %rdi
callq 0xc2a0
jmp 0x88c3
movb $0x1, 0x125(%rsp)
movl $0x20, %edi
callq 0x5240
movq %rax, 0x18(%rsp)
movq %rax, 0x10(%rsp)
leaq 0x126(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x5980
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0xc1211(%rip), %rsi     # 0xc9a3f
callq 0x56d0
jmp 0x8835
movq 0x10(%rsp), %rdi
movb $0x0, 0x125(%rsp)
leaq 0xf72d7(%rip), %rsi     # 0xffb20
movq 0xf7758(%rip), %rdx     # 0xfffa8
callq 0x5920
jmp 0x8983
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
leaq 0x126(%rsp), %rdi
callq 0x5590
testb $0x1, 0x125(%rsp)
jne 0x8887
jmp 0x8891
movq 0x10(%rsp), %rdi
callq 0x53a0
jmp 0x88c3
jmp 0x8895
jmp 0x8897
movl $0x0, 0x5f0(%rsp)
leaq 0x5f8(%rsp), %rdi
callq 0x5ae8
movl 0x5f0(%rsp), %eax
testl %eax, %eax
je 0x88c1
jmp 0x88bc
jmp 0x8942
jmp 0x8942
leaq 0x5f8(%rsp), %rdi
callq 0x5ae8
movl 0x61c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x896e
movq 0x620(%rsp), %rdi
callq 0x51e0
movq %rax, 0x118(%rsp)
movq 0xf76f0(%rip), %rdi     # 0xffff0
leaq 0xc1146(%rip), %rsi     # 0xc9a4d
callq 0x5520
movq %rax, 0x8(%rsp)
jmp 0x8913
movq 0x8(%rsp), %rdi
movq 0x118(%rsp), %rsi
callq 0x54b0
movq %rax, (%rsp)
jmp 0x892b
movq (%rsp), %rdi
movq 0xf766a(%rip), %rsi     # 0xfffa0
callq 0x5580
jmp 0x893d
callq 0x58d0
movl 0x634(%rsp), %eax
addq $0x638, %rsp            # imm = 0x638
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x620(%rsp)
movl %eax, 0x61c(%rsp)
callq 0x58d0
jmp 0x896c
jmp 0x896e
movq 0x620(%rsp), %rdi
callq 0x5970
movq %rax, %rdi
callq 0xcb20
nopw %cs:(%rax,%rax)
nopl (%rax)