// File: /workspace/github_cpp_makefile_star2_O2/kebwi[P]Trifid/src/main.cpp
// Function: processArgs(int, char**)
void processArgs(int argc, char **argv)
{
	if (argc < 2)
		die("Enter -h flag to display help.");
	
	for (int argIdx = 1; argIdx < argc; argIdx++)
	{
		string prevArg(argv[argIdx - 1]);
		string argStr(argv[argIdx]);
		
		if (argStr[0] == '-')// && isalpha(argStr[1]))	//Flag
		{
			if (argStr.length() < 2)
				die("Flag is too short");
			if (argStr[1] != '-')	//A short flag
			{
				for (int charIdx = 1; charIdx < argStr.length(); charIdx++)
				{
					switch (argStr[charIdx])
					{
						case 'h':
							cout << "-" << argStr[charIdx] << " flag detected" << endl;
							displayHelp();
							exit(0);	//displayHelp() should exit the program
							break;
						case 'v':
							gVerbose = true;
							cout << "-" << argStr[charIdx] << " flag detected" << endl;
							break;
						case 'i':
							gGenerateIntermediateImages = true;
							cout << "-" << argStr[charIdx] << " flag detected" << endl;
							break;
						case 'N':	//Add noise to a pgm image
							cout << "-" << argStr[charIdx] << " flag detected" << endl;
							if (sProgramBehavior != PB_NONE)
								die("Please specify only one program behavior flag");
							sProgramBehavior = PB_NOISIFY;
							break;
						case 'n':	//Denoise a set of images
							cout << "-" << argStr[charIdx] << " flag detected" << endl;
							if (sProgramBehavior != PB_NONE && sProgramBehavior != PB_DENOISE)
								die("Please specify only one program behavior flag");
							sProgramBehavior = PB_DENOISE;
							break;
						case 'b':
							cout << "-" << argStr[charIdx] << " flag detected" << endl;
							if (sProgramBehavior != PB_NOISIFY)
								die("-b only works with -N");
							sBayerize = true;
							break;
						case 's':
							cout << "-" << argStr[charIdx] << " flag detected" << endl;
							if (sProgramBehavior != PB_DENOISE)
								die("-s only works with -n");
							break;
						default:
							die(string("Unknown flag: " + argStr).c_str());
					}	//switch argStr[charIdx]
				}	//Loop over flag chars
			}
			else	//argStr[1] == '-'
			{
				assert(argStr.length() >= 2);
				assert(argStr[0] == '-' && argStr[1] == '-');
				if (argStr.length() < 3)
					die("Flag is too short");
				
				if (argStr == "--testFT")
				{
					cout << argStr << " flag detected" << endl;
					if (sProgramBehavior != PB_NONE)
						die("Please specify only one program behavior flag");
					sProgramBehavior = PB_TEST_FOURIER;
				}
				else if (argStr == "--testFTconv")
				{
					cout << argStr << " flag detected" << endl;
					if (sProgramBehavior != PB_NONE)
						die("Please specify only one program behavior flag");
					sProgramBehavior = PB_TEST_FOURIER_CONVOLUTION;
				}
				else if (argStr == "--testColor")
				{
					cout << argStr << " flag detected" << endl;
					if (sProgramBehavior != PB_NONE)
						die("Please specify only one program behavior flag");
					sProgramBehavior = PB_TEST_RGB_XYZ_LAB;
				}
				else if (argStr == "--grayStat")
				{
					cout << argStr << " flag detected" << endl;
					if (sProgramBehavior != PB_NONE)
						die("Please specify only one program behavior flag");
					sProgramBehavior = PB_GRAY_IMG_PAIR_STATS;
				}
				else if (argStr == "--rgbStat")
				{
					cout << argStr << " flag detected" << endl;
					if (sProgramBehavior != PB_NONE)
						die("Please specify only one program behavior flag");
					sProgramBehavior = PB_RGB_IMG_PAIR_STATS;
				}
				else die(string("Unknown flag: " + argStr).c_str());
			}
		}
		else	//Nonflag
		{
			if (prevArg == "-N")
			{
				//Noise params file
				sNoiseParamsFilename = argStr;
				cout << "Noise params filename arg read: " << sNoiseParamsFilename << endl;
			}
			else if (prevArg == "-s")
			{
				//Denoise threshold
				
				string color = argStr.substr(0, 1);
				if (color[0] < '0' || color[0] > '3')
					die("Invalid shrinkage color argument");
				int colorIdx = color[0] - '1';
				
				string levelStr = argStr.substr(1, 2);
				
				char levelType = levelStr[0];
				if (levelType != 'A' && levelType != 'H' && levelType != 'B')
					die("Invalid shrinkage level type ('A' or 'H' or 'B')");
				
				int level = 0;
				if (levelType == 'B')
					level = levelStr[1] - '0';
				if (levelType == 'B' && (level < 0 || level > 9))
					die("Invalid shrinkage level (only levels 0-9 can be used with level type 'B')");
				
				sManualShrinkageThresholdStr += "-";
				sManualShrinkageThresholdStr += argStr;
				
				int thresholdStartPos = 2;
				if (levelType == 'B')
					thresholdStartPos = 3;
				stringstream ss(argStr.substr(thresholdStartPos, argStr.length() - thresholdStartPos));
				Float_t threshold;
				ss >> threshold;
				
				if (levelType == 'A')	//All levels
				{
					if (colorIdx > -1)
					{
						if (gManualShrinkageThresholds[colorIdx].size() < 11)
							gManualShrinkageThresholds[colorIdx].resize(11);
						for (int i = 0; i <= 9; i++)
							gManualShrinkageThresholds[colorIdx][i] = threshold;
					}
					else
					{
						for (int i = 0; i < 3; i++)
						{
							if (gManualShrinkageThresholds[i].size() < 11)
								gManualShrinkageThresholds[i].resize(11);
							for (int j = 0; j <= 9; j++)
								gManualShrinkageThresholds[i][j] = threshold;
						}
					}
					string colorName = "RGB";
					if (colorIdx == 0)
						colorName = "red";
					else if (colorIdx == 1)
						colorName = "green";
					else if (colorIdx == 2)
						colorName = "blue";
					cout << "All levels threshold argument read for color " << colorName
						<< ": " << threshold << endl;
				}
				else if (levelType == 'H')
				{
					if (colorIdx > -1)
					{
						if (gManualShrinkageThresholds[colorIdx].size() < 1)
							gManualShrinkageThresholds[colorIdx].resize(1);
						gManualShrinkageThresholds[colorIdx][0] = threshold;
					}
					else
					{
						for (int i = 0; i < 3; i++)
						{
							if (gManualShrinkageThresholds[i].size() < 1)
								gManualShrinkageThresholds[i].resize(1);
							gManualShrinkageThresholds[i][0] = threshold;
						}
					}
					string colorName = "RGB";
					if (colorIdx == 0)
						colorName = "red";
					else if (colorIdx == 1)
						colorName = "green";
					else if (colorIdx == 2)
						colorName = "blue";
					cout << "H threshold argument read for color " << colorName
						<< ": " << threshold << endl;
				}
				else
				{
					assert(levelType == 'B');
					
					if (colorIdx > -1)
					{
						if (gManualShrinkageThresholds[colorIdx].size() < level + 2)
							gManualShrinkageThresholds[colorIdx].resize(level + 2);
						gManualShrinkageThresholds[colorIdx][level + 1] = threshold;
					}
					else
					{
						for (int i = 0; i < 3; i++)
						{
							if (gManualShrinkageThresholds[i].size() < level + 2)
								gManualShrinkageThresholds[i].resize(level + 2);
							gManualShrinkageThresholds[i][level + 1] = threshold;
						}
					}
					string colorName = "RGB";
					if (colorIdx == 0)
						colorName = "red";
					else if (colorIdx == 1)
						colorName = "green";
					else if (colorIdx == 2)
						colorName = "blue";
					cout << "B threshold argument read for color " << colorName
						<< ", level " << level << ": " << threshold << endl;
				}
			}
			else
			{
				string filename(argv[argIdx]);
				sInputFilenames.push_back(filename);
				cout << "Input filename arg read: " << filename << endl;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rsi, 0x70(%rsp)
cmpl $0x2, %edi
jl 0x500e
movl %edi, %eax
movq %rax, 0x78(%rsp)
pushq $0x1
popq %r12
leaq 0xc0(%rsp), %r14
leaq 0xe0(%rsp), %rbp
leaq 0x1e016(%rip), %rax     # 0x2253f
movq %rax, 0x20(%rsp)
movq 0x2ba9b(%rip), %rbx     # 0x2ffd0
cmpq 0x78(%rsp), %r12
je 0x4f19
movq 0x70(%rsp), %r15
movq -0x8(%r15,%r12,8), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x7fcc
movq (%r15,%r12,8), %rsi
leaq 0x28(%rsp), %rdi
movq %rbp, %rdx
callq 0x7fcc
movq 0x28(%rsp), %rcx
cmpb $0x2d, (%rcx)
jne 0x45ed
movq 0x30(%rsp), %rax
cmpq $0x1, %rax
jbe 0x4fc1
cmpb $0x2d, 0x1(%rcx)
jne 0x46d8
cmpq $0x2, %rax
leaq 0x28(%rsp), %r14
je 0x4fc1
movq %r14, %rdi
leaq 0x1dd30(%rip), %rsi     # 0x222d2
callq 0x80ee
testb %al, %al
je 0x490b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3270
movq %rax, %rdi
leaq 0x1df8d(%rip), %rsi     # 0x22551
callq 0x32c0
movq %rax, %rdi
callq 0x3120
cmpl $0x0, 0x2c090(%rip)     # 0x30668
jne 0x4fb5
movl $0x1, 0x2c080(%rip)     # 0x30668
jmp 0x4df9
movq %r14, %rdi
leaq 0x1dfaa(%rip), %rsi     # 0x225a1
callq 0x80ee
testb %al, %al
je 0x463c
leaq 0x2bf01(%rip), %rdi     # 0x30508
leaq 0x28(%rsp), %rsi
callq 0x3150
movq %rbx, %rdi
leaq 0x1dfcd(%rip), %rsi     # 0x225e8
callq 0x32c0
movq %rax, %rdi
leaq 0x2bede(%rip), %rsi     # 0x30508
callq 0x3270
movq %rax, %rdi
callq 0x3120
jmp 0x4df9
movq %r14, %rdi
leaq 0x1dfc3(%rip), %rsi     # 0x22609
callq 0x80ee
testb %al, %al
je 0x48b9
leaq 0x80(%rsp), %rdi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
xorl %edx, %edx
pushq $0x1
popq %rcx
callq 0x3300
movq 0x80(%rsp), %rax
movzbl (%rax), %ecx
leal -0x34(%rcx), %eax
cmpb $-0x5, %al
jbe 0x4fcb
movq %rcx, 0x18(%rsp)
leaq 0xa0(%rsp), %rdi
movq %r14, %rsi
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
callq 0x3300
movq 0xa0(%rsp), %rax
movzbl (%rax), %ebp
movq $0x0, 0x68(%rsp)
cmpl $0x41, %ebp
je 0x49ca
cmpl $0x42, %ebp
je 0x49b1
movl $0x0, %r14d
cmpl $0x48, %ebp
je 0x49cd
jmp 0x4fd7
pushq $0x1
popq %r14
cmpq %r14, %rax
jbe 0x4df9
movq 0x28(%rsp), %rax
movzbl (%rax,%r14), %eax
cmpl $0x4e, %eax
je 0x47b5
cmpl $0x62, %eax
je 0x4860
leaq 0x2bdd9(%rip), %rcx     # 0x304e1
cmpl $0x69, %eax
je 0x472b
cmpl $0x6e, %eax
je 0x4809
cmpl $0x73, %eax
je 0x476b
cmpl $0x76, %eax
jne 0x4f2b
leaq 0x2bdb5(%rip), %rcx     # 0x304e0
movb $0x1, (%rcx)
movq %rbx, %rdi
leaq 0x1e222(%rip), %rsi     # 0x2295a
callq 0x32c0
movq 0x28(%rsp), %rcx
movsbl (%rcx,%r14), %esi
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
leaq 0x1ddf8(%rip), %rsi     # 0x22551
callq 0x32c0
movq %rax, %rdi
callq 0x3120
jmp 0x48ac
movq %rbx, %rdi
leaq 0x1e1e5(%rip), %rsi     # 0x2295a
callq 0x32c0
movq 0x28(%rsp), %rcx
movsbl (%rcx,%r14), %esi
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
leaq 0x1ddbb(%rip), %rsi     # 0x22551
callq 0x32c0
movq %rax, %rdi
callq 0x3120
cmpl $0x5, 0x2bebe(%rip)     # 0x30668
je 0x48ac
jmp 0x4f7a
movq %rbx, %rdi
leaq 0x1e19b(%rip), %rsi     # 0x2295a
callq 0x32c0
movq 0x28(%rsp), %rcx
movsbl (%rcx,%r14), %esi
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
leaq 0x1dd71(%rip), %rsi     # 0x22551
callq 0x32c0
movq %rax, %rdi
callq 0x3120
cmpl $0x0, 0x2be74(%rip)     # 0x30668
jne 0x4f71
movl $0x4, 0x2be64(%rip)     # 0x30668
jmp 0x48ac
movq %rbx, %rdi
leaq 0x1e147(%rip), %rsi     # 0x2295a
callq 0x32c0
movq 0x28(%rsp), %rcx
movsbl (%rcx,%r14), %esi
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
leaq 0x1dd1d(%rip), %rsi     # 0x22551
callq 0x32c0
movq %rax, %rdi
callq 0x3120
movl 0x2be21(%rip), %eax     # 0x30668
cmpl $0x5, %eax
je 0x4854
testl %eax, %eax
jne 0x4f71
movl $0x5, 0x2be0a(%rip)     # 0x30668
jmp 0x48ac
movq %rbx, %rdi
leaq 0x1e0f0(%rip), %rsi     # 0x2295a
callq 0x32c0
movq 0x28(%rsp), %rcx
movsbl (%rcx,%r14), %esi
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
leaq 0x1dcc6(%rip), %rsi     # 0x22551
callq 0x32c0
movq %rax, %rdi
callq 0x3120
cmpl $0x4, 0x2bdc9(%rip)     # 0x30668
jne 0x4f83
movb $0x1, 0x2bdc0(%rip)     # 0x3066c
incq %r14
movq 0x30(%rsp), %rax
jmp 0x46dc
movq 0x70(%rsp), %rax
movq (%rax,%r12,8), %rsi
movq %rbp, %rdi
leaq 0x80(%rsp), %rdx
callq 0x7fcc
leaq 0x2bc4f(%rip), %rdi     # 0x30528
movq %rbp, %rsi
callq 0x812e
movq %rbx, %rdi
leaq 0x1de5e(%rip), %rsi     # 0x22749
callq 0x32c0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3270
movq %rax, %rdi
callq 0x3120
movq %rbp, %rdi
jmp 0x4df4
movq %r14, %rdi
leaq 0x1d9ee(%rip), %rsi     # 0x22303
callq 0x80ee
testb %al, %al
je 0x495c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3270
movq %rax, %rdi
leaq 0x1dc1e(%rip), %rsi     # 0x22551
callq 0x32c0
movq %rax, %rdi
callq 0x3120
cmpl $0x0, 0x2bd21(%rip)     # 0x30668
jne 0x4fb5
movl $0x2, 0x2bd11(%rip)     # 0x30668
jmp 0x4df9
movq %r14, %rdi
leaq 0x1d9c3(%rip), %rsi     # 0x22329
callq 0x80ee
testb %al, %al
je 0x4ca1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3270
movq %rax, %rdi
leaq 0x1dbc9(%rip), %rsi     # 0x22551
callq 0x32c0
movq %rax, %rdi
callq 0x3120
cmpl $0x0, 0x2bccc(%rip)     # 0x30668
jne 0x4fb5
movl $0x3, 0x2bcbc(%rip)     # 0x30668
jmp 0x4df9
movsbl 0x1(%rax), %eax
addl $-0x30, %eax
movb $0x1, %r14b
movq %rax, 0x68(%rsp)
cmpl $0xa, %eax
jb 0x49cd
jmp 0x4fe3
xorl %r14d, %r14d
leaq 0x2bbb4(%rip), %r15     # 0x30588
movq %r15, %rdi
leaq 0x1df7c(%rip), %rsi     # 0x2295a
callq 0x3510
leaq 0x28(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x3530
movzbl %r14b, %edx
orq $0x2, %rdx
movq 0x30(%rsp), %rcx
subq %rdx, %rcx
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x3300
leaq 0xe0(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
pushq $0x18
popq %rdx
callq 0x3430
movq %r15, %rdi
callq 0x3548
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
callq 0x31b0
movq 0x18(%rsp), %rax
addl $-0x31, %eax
movl %eax, %eax
cmpl $0x48, %ebp
je 0x4ac4
cmpl $0x41, %ebp
jne 0x4b98
cmpb $0x30, 0x18(%rsp)
leaq 0xe0(%rsp), %rbp
jbe 0x4cf6
imulq $0x18, %rax, %r13
leaq 0x2bacc(%rip), %rcx     # 0x30540
movq (%r13,%rcx), %rax
movq 0x8(%r13,%rcx), %rcx
subq %rax, %rcx
cmpq $0x57, %rcx
ja 0x4aa8
leaq 0x2bab2(%rip), %rax     # 0x30540
addq %rax, %r13
movq %r13, %rdi
pushq $0xb
popq %rsi
callq 0x80fc
movq (%r13), %rax
leaq 0xe0(%rsp), %rbp
xorl %ecx, %ecx
cmpq $0xa, %rcx
je 0x4d53
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
jmp 0x4aaa
cmpb $0x30, 0x18(%rsp)
jbe 0x4e1b
imulq $0x18, %rax, %r13
leaq 0x2ba66(%rip), %rcx     # 0x30540
movq (%r13,%rcx), %rax
cmpq %rax, 0x8(%r13,%rcx)
leaq 0xe0(%rsp), %rbp
jne 0x4b0f
leaq 0x2ba4b(%rip), %rax     # 0x30540
addq %rax, %r13
movq %r13, %rdi
pushq $0x1
popq %rsi
callq 0x80fc
movq (%r13), %rax
leaq 0xe0(%rsp), %rbp
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x48(%rsp), %rdi
leaq 0x1db83(%rip), %rsi     # 0x226a8
leaq 0xf(%rsp), %rdx
callq 0x7fcc
movq 0x18(%rsp), %rax
addb $-0x31, %al
cmpb $0x3, %al
jae 0x4b52
movzbl %al, %eax
leaq 0x2b074(%rip), %rcx     # 0x2fbb8
movq (%rcx,%rax,8), %rsi
leaq 0x48(%rsp), %rdi
callq 0x3520
movq %rbx, %rdi
leaq 0x1db89(%rip), %rsi     # 0x226e5
callq 0x32c0
movq %rax, %rdi
leaq 0x48(%rsp), %rsi
callq 0x3270
movq %rax, %rdi
leaq 0x1e525(%rip), %rsi     # 0x2309d
callq 0x32c0
movsd 0x10(%rsp), %xmm0
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3120
jmp 0x4dcd
testb %r14b, %r14b
movq 0x18(%rsp), %rcx
je 0x4fef
movq 0x68(%rsp), %rdx
movl %edx, %r13d
cmpb $0x30, %cl
jbe 0x4e6c
imulq $0x18, %rax, %rbp
leaq 0x2b97e(%rip), %rcx     # 0x30540
movq (%rbp,%rcx), %rax
movq 0x8(%rbp,%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
leal 0x2(%rdx), %esi
cmpq %rsi, %rcx
jae 0x4bf1
leaq 0x2b95e(%rip), %rax     # 0x30540
addq %rax, %rbp
movq %rbp, %rdi
callq 0x80fc
movq (%rbp), %rax
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rax,%r13,8)
leaq 0x48(%rsp), %rdi
leaq 0x1da9e(%rip), %rsi     # 0x226a8
leaq 0xf(%rsp), %rdx
callq 0x7fcc
movq 0x18(%rsp), %rax
addb $-0x31, %al
cmpb $0x3, %al
leaq 0xe0(%rsp), %rbp
jae 0x4c3f
movzbl %al, %eax
leaq 0x2af87(%rip), %rcx     # 0x2fbb8
movq (%rcx,%rax,8), %rsi
leaq 0x48(%rsp), %rdi
callq 0x3520
movq %rbx, %rdi
leaq 0x1dad2(%rip), %rsi     # 0x2271b
callq 0x32c0
movq %rax, %rdi
leaq 0x48(%rsp), %rsi
callq 0x3270
movq %rax, %rdi
leaq 0x1dadb(%rip), %rsi     # 0x22740
callq 0x32c0
movq %rax, %rdi
movq 0x68(%rsp), %rsi
callq 0x34b0
movq %rax, %rdi
leaq 0x1e41c(%rip), %rsi     # 0x2309d
callq 0x32c0
movsd 0x10(%rsp), %xmm0
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3120
jmp 0x4dcd
movq %r14, %rdi
leaq 0x1d7c8(%rip), %rsi     # 0x22473
callq 0x80ee
testb %al, %al
je 0x4ec4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3270
movq %rax, %rdi
leaq 0x1d884(%rip), %rsi     # 0x22551
callq 0x32c0
movq %rax, %rdi
callq 0x3120
cmpl $0x0, 0x2b987(%rip)     # 0x30668
jne 0x4fb5
movl $0x6, 0x2b977(%rip)     # 0x30668
jmp 0x4df9
xorl %r14d, %r14d
cmpq $0x3, %r14
je 0x4d53
imulq $0x18, %r14, %r13
leaq 0x2b836(%rip), %rcx     # 0x30540
movq (%r13,%rcx), %rax
movq 0x8(%r13,%rcx), %rcx
subq %rax, %rcx
cmpq $0x57, %rcx
ja 0x4d36
leaq 0x2b81c(%rip), %rax     # 0x30540
addq %rax, %r13
movq %r13, %rdi
pushq $0xb
popq %rsi
callq 0x80fc
movq (%r13), %rax
xorl %ecx, %ecx
cmpq $0xa, %rcx
je 0x4d4e
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
jmp 0x4d38
incq %r14
jmp 0x4cf9
leaq 0x48(%rsp), %rdi
leaq 0x1d949(%rip), %rsi     # 0x226a8
leaq 0xf(%rsp), %rdx
callq 0x7fcc
movq 0x18(%rsp), %rax
addb $-0x31, %al
cmpb $0x3, %al
jae 0x4d8c
movzbl %al, %eax
leaq 0x2ae3a(%rip), %rcx     # 0x2fbb8
movq (%rcx,%rax,8), %rsi
leaq 0x48(%rsp), %rdi
callq 0x3520
movq %rbx, %rdi
leaq 0x1d921(%rip), %rsi     # 0x226b7
callq 0x32c0
movq %rax, %rdi
leaq 0x48(%rsp), %rsi
callq 0x3270
movq %rax, %rdi
leaq 0x1e2eb(%rip), %rsi     # 0x2309d
callq 0x32c0
movsd 0x10(%rsp), %xmm0
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3120
leaq 0x48(%rsp), %rdi
callq 0x3548
movq %rbp, %rdi
callq 0x3200
leaq 0xa0(%rsp), %rdi
callq 0x3548
leaq 0x80(%rsp), %rdi
callq 0x3548
leaq 0x28(%rsp), %rdi
callq 0x3548
leaq 0xc0(%rsp), %r14
movq %r14, %rdi
callq 0x3548
incq %r12
jmp 0x4535
xorl %r14d, %r14d
leaq 0xe0(%rsp), %rbp
cmpq $0x48, %r14
je 0x4b19
leaq 0x2b709(%rip), %rcx     # 0x30540
movq (%r14,%rcx), %rax
cmpq %rax, 0x8(%r14,%rcx)
jne 0x4e5c
leaq 0x2b6f7(%rip), %rax     # 0x30540
leaq (%rax,%r14), %r13
movq %r13, %rdi
pushq $0x1
popq %rsi
callq 0x80fc
movq (%r13), %rax
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x18, %r14
jmp 0x4e26
leal 0x2(%rdx), %ebp
xorl %r15d, %r15d
cmpq $0x48, %r15
je 0x4bfe
leaq 0x2b6bd(%rip), %rcx     # 0x30540
movq (%r15,%rcx), %rax
movq 0x8(%r15,%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbp, %rcx
jae 0x4eb1
leaq 0x2b6a1(%rip), %rax     # 0x30540
leaq (%rax,%r15), %r14
movq %r14, %rdi
movq %rbp, %rsi
callq 0x80fc
movq (%r14), %rax
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rax,%r13,8)
addq $0x18, %r15
jmp 0x4e72
movq %r14, %rdi
leaq 0x1d5ff(%rip), %rsi     # 0x224cd
callq 0x80ee
testb %al, %al
je 0x501a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3270
movq %rax, %rdi
leaq 0x1d661(%rip), %rsi     # 0x22551
callq 0x32c0
movq %rax, %rdi
callq 0x3120
cmpl $0x0, 0x2b764(%rip)     # 0x30668
jne 0x4fb5
movl $0x7, 0x2b754(%rip)     # 0x30668
jmp 0x4df9
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x68, %eax
jne 0x4f8f
movq 0x2b099(%rip), %rdi     # 0x2ffd0
leaq 0x1da1c(%rip), %rsi     # 0x2295a
callq 0x32c0
movq 0x28(%rsp), %rcx
movsbl (%rcx,%r14), %esi
movq %rax, %rdi
callq 0x3320
leaq 0x1d5f5(%rip), %rsi     # 0x22551
movq %rax, %rdi
callq 0x32c0
movq %rax, %rdi
callq 0x3120
callq 0x3ca1
leaq 0x1d5e8(%rip), %rdi     # 0x22560
jmp 0x4f8a
leaq 0x1d623(%rip), %rdi     # 0x225a4
jmp 0x4f8a
leaq 0x1d604(%rip), %rdi     # 0x2258e
callq 0x3b3c
leaq 0x1d624(%rip), %rsi     # 0x225ba
leaq 0xe0(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x8078
movq 0xe0(%rsp), %rdi
callq 0x3b3c
leaq 0x1d5a4(%rip), %rax     # 0x22560
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x3b3c
leaq 0x1d63a(%rip), %rdi     # 0x2260c
callq 0x3b3c
leaq 0x1d64f(%rip), %rdi     # 0x2262d
callq 0x3b3c
leaq 0x1d674(%rip), %rdi     # 0x2265e
callq 0x3b3c
leaq 0x1d714(%rip), %rdi     # 0x2270a
leaq 0x1d264(%rip), %rsi     # 0x22261
leaq 0x1d5c5(%rip), %rcx     # 0x225c9
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x31a0
leaq 0x1d50b(%rip), %rdi     # 0x22520
callq 0x3b3c
leaq 0x1d599(%rip), %rsi     # 0x225ba
leaq 0xe0(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x8078
movq 0xe0(%rsp), %rdi
callq 0x3b3c
jmp 0x50b4
jmp 0x50d3
jmp 0x508b
jmp 0x508b
jmp 0x508b
jmp 0x5075
jmp 0x5075
jmp 0x5064
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3548
jmp 0x509b
jmp 0x5075
movq %rax, %rbx
jmp 0x50a8
jmp 0x50d3
jmp 0x50d3
jmp 0x508b
jmp 0x507a
jmp 0x507a
jmp 0x508b
movq %rax, %rbx
jmp 0x509b
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3548
jmp 0x508e
jmp 0x508b
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x3200
leaq 0xa0(%rsp), %rdi
callq 0x3548
leaq 0x80(%rsp), %rdi
jmp 0x50bf
jmp 0x50b4
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x3548
jmp 0x50d6
jmp 0x50d3
movq %rax, %rbx
jmp 0x50e0
jmp 0x50d3
jmp 0x50d3
jmp 0x50d3
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3548
leaq 0xc0(%rsp), %rdi
callq 0x3548
movq %rbx, %rdi
callq 0x34d0