// File: lrq3000[P]rfrb/./src/main.cpp
// Function: main
int main(int argc, char *argv[])
{
	//Check the Parameters
	std::string inPath;
	std::vector<std::string> paths;
	std::string outPath;
	int raidVersion = 6, stripeSize = -1, lostImages = -1;

	//Too few arguments
	if (argc < 5)
	{
		std::cout << "\"Raid faster - recover better\"(v0.8.0) will recover/rebuild a damaged raidsystem " << std::endl;
		std::cout << "from remaining images. It handles Raid-0, Raid-1 and Raid-5." << std::endl;
		std::cout << "Copyright (C) 2014 crisbi - Christian Zoubek, Sabine Seufert" << std::endl << std::endl;
		std::cerr << "Try: './rfrb [-P PathToImageFolder] [-o PathToOutputFolder] ([-r #RaidVersion] [-s #Stripesize] [-n #NumberOfLostImages])'" << std::endl;
		std::cerr << "or './rfrb [-p PathToImage1] [-p PathToImage2] ... [-o PathToOutputFolder] ([-r #RaidVersion] [-s #Stripesize] [-n #NumberOfLostImages])'" << std::endl;
		return 1;
	}

	bool in = false;
	bool out = false;
	for (int i = 1; i < argc-1; i=i+1)
	{
		std::string input = argv[i];
		if (input.compare("-h") == 0)
		{
			std::cout << "\"Raid faster - recover better\"(v0.8.0) will recover/rebuild a damaged raidsystem " << std::endl;
			std::cout << "from remaining images. It handles Raid-0, Raid-1 and Raid-5." << std::endl;
			std::cout << "Copyright (C) 2014 crisbi - Christian Zoubek, Sabine Seufert" << std::endl << std::endl;
			std::cerr << "Usage 1: './rfrb [-P PathToImageFolder] [-o PathToOutputFolder] ([-r #RaidVersion] [-s #Stripesize] [-n #NumberOfLostImages])'" << std::endl;
			std::cerr << "Usage 2: './rfrb [-p PathToImage1] [-p PathToImage2] ... [-o PathToOutputFolder] ([-r #RaidVersion] [-s #Stripesize] [-n #NumberOfLostImages])'" << std::endl;
			return 1;
		}
		if (input.compare("-P") == 0)
		{
			inPath = argv[i+1];
			in = true;
			std::cout << "Input Folder: " << inPath << std::endl;
		}
		else if (input.compare("-p") == 0)
		{
			paths.push_back(argv[i+1]);
			in = true;
			std::cout << "image: " << argv[i+1] << std::endl;
		}
		else if (input.compare("-o") == 0)
		{
			outPath = argv[i+1];
			out = true;
			std::cout << "Output Folder: " << outPath << std::endl;
		}
		else if (input.compare("-r") == 0)
		{
			raidVersion = atoi(argv[i+1]);
			std::cout << "RaidVersion: " << raidVersion << std::endl;
		}
		else if (input.compare("-s") == 0)
		{
			stripeSize = atoi(argv[i+1]);
			std::cout << "Stripesize: " << stripeSize << std::endl;
		}
		else if (input.compare("-n") == 0)
		{
			lostImages = atoi(argv[i+1]);
			std::cout << "Lost discs: " << lostImages << std::endl;
		}
		else
		{
			continue;
		}
	}

	//Check if input is valid
	if (in == true && out == true && ((inPath.size() > 0 && paths.empty()) || (paths.size()>0 && inPath == "")))
	{
		std::cout << "Valid Input" << std::endl;
	} else
	{
		std::cout << "Not a valid Input. Please try again." << std::endl;
		std::cout << "Please use: './rfrb [-P PathToImageFolder] [-o PathToOutput-Folder]'" << std::endl;
		std::cout << "or: './rfrb [-p PathToImage1] [-p PathToImage2] [-o PathToOutput-Folder]'" << std::endl;
		return 1;
	}

	RaidRecover *raidR;
	if (paths.empty())
	{
		if (!(inPath.at(inPath.size()-1) == '/'))
			inPath+="/";
		if (!(outPath.at(outPath.size()-1) == '/'))
			outPath += "/";
		raidR = new RaidRecover(inPath, outPath);
	}
	else
	{
		raidR = new RaidRecover(paths, outPath);
	}

	//Check if a valid RAID-level was set
	if (raidVersion != 0 && raidVersion != 1 && raidVersion != 5)
	{}
	else
	{
		raidR->setRaid(raidVersion);
	}

	//Stripesize was set
	if (stripeSize >= 0)
	{
		raidR->setStripeSize(stripeSize);
	}

	//Number of lost Images was set
	if (lostImages >= 0)
	{
		raidR->setLostImages(lostImages);
	}

	std::cout << "Interpreted parameters. Now starting to analyse the Raid system." << std::endl;

	//Call the RAID-recovery
	raidR->run();

	return  0;
}

// Assembly:
subq $0x2b8, %rsp            # imm = 0x2B8
movl $0x0, 0x2b4(%rsp)
movl %edi, 0x2b0(%rsp)
movq %rsi, 0x2a8(%rsp)
leaq 0x288(%rsp), %rdi
callq 0x65c0
leaq 0x270(%rsp), %rdi
callq 0x18ef0
leaq 0x250(%rsp), %rdi
callq 0x65c0
movl $0x6, 0x24c(%rsp)
movl $0xffffffff, 0x248(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x244(%rsp) # imm = 0xFFFFFFFF
cmpl $0x5, 0x2b0(%rsp)
jge 0x38598
movq 0x1bb62(%rip), %rdi     # 0x53fb0
leaq 0x3e30(%rip), %rsi      # 0x3c285
callq 0x6420
movq %rax, 0x140(%rsp)
jmp 0x38464
movq 0x140(%rsp), %rdi
movq 0x1bafd(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x3847a
movq 0x1bb2f(%rip), %rdi     # 0x53fb0
leaq 0x3e4f(%rip), %rsi      # 0x3c2d7
callq 0x6420
movq %rax, 0x138(%rsp)
jmp 0x38497
movq 0x138(%rsp), %rdi
movq 0x1baca(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x384ad
movq 0x1bafc(%rip), %rdi     # 0x53fb0
leaq 0x3e59(%rip), %rsi      # 0x3c314
callq 0x6420
movq %rax, 0x130(%rsp)
jmp 0x384ca
movq 0x130(%rsp), %rdi
movq 0x1ba97(%rip), %rsi     # 0x53f70
callq 0x6470
movq %rax, 0x128(%rsp)
jmp 0x384e8
movq 0x128(%rsp), %rdi
movq 0x1ba79(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x384fe
movq 0x1baeb(%rip), %rdi     # 0x53ff0
leaq 0x3e45(%rip), %rsi      # 0x3c351
callq 0x6420
movq %rax, 0x120(%rsp)
jmp 0x3851b
movq 0x120(%rsp), %rdi
movq 0x1ba46(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38531
movq 0x1bab8(%rip), %rdi     # 0x53ff0
leaq 0x3e8d(%rip), %rsi      # 0x3c3cc
callq 0x6420
movq %rax, 0x118(%rsp)
jmp 0x3854e
movq 0x118(%rsp), %rdi
movq 0x1ba13(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38564
movl $0x1, 0x2b4(%rsp)
movl $0x1, 0x230(%rsp)
jmp 0x39152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
jmp 0x39188
movb $0x0, 0x22f(%rsp)
movb $0x0, 0x22e(%rsp)
movl $0x1, 0x228(%rsp)
movl 0x228(%rsp), %eax
movl 0x2b0(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x38c64
movq 0x2a8(%rsp), %rax
movslq 0x228(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x108(%rsp)
leaq 0x207(%rsp), %rdi
movq %rdi, 0x110(%rsp)
callq 0x6760
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
leaq 0x208(%rsp), %rdi
callq 0x65b0
jmp 0x3861c
leaq 0x207(%rsp), %rdi
callq 0x6490
leaq 0x208(%rsp), %rdi
leaq 0x3e1e(%rip), %rsi      # 0x3c456
callq 0x6130
cmpl $0x0, %eax
jne 0x387bd
movq 0x1b963(%rip), %rdi     # 0x53fb0
leaq 0x3c31(%rip), %rsi      # 0x3c285
callq 0x6420
movq %rax, 0x100(%rsp)
jmp 0x38663
movq 0x100(%rsp), %rdi
movq 0x1b8fe(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38679
movq 0x1b930(%rip), %rdi     # 0x53fb0
leaq 0x3c50(%rip), %rsi      # 0x3c2d7
callq 0x6420
movq %rax, 0xf8(%rsp)
jmp 0x38696
movq 0xf8(%rsp), %rdi
movq 0x1b8cb(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x386ac
movq 0x1b8fd(%rip), %rdi     # 0x53fb0
leaq 0x3c5a(%rip), %rsi      # 0x3c314
callq 0x6420
movq %rax, 0xf0(%rsp)
jmp 0x386c9
movq 0xf0(%rsp), %rdi
movq 0x1b898(%rip), %rsi     # 0x53f70
callq 0x6470
movq %rax, 0xe8(%rsp)
jmp 0x386e7
movq 0xe8(%rsp), %rdi
movq 0x1b87a(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x386fd
movq 0x1b8ec(%rip), %rdi     # 0x53ff0
leaq 0x3d4e(%rip), %rsi      # 0x3c459
callq 0x6420
movq %rax, 0xe0(%rsp)
jmp 0x3871a
movq 0xe0(%rsp), %rdi
movq 0x1b847(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38730
movq 0x1b8b9(%rip), %rdi     # 0x53ff0
leaq 0x3d9a(%rip), %rsi      # 0x3c4d8
callq 0x6420
movq %rax, 0xd8(%rsp)
jmp 0x3874d
movq 0xd8(%rsp), %rdi
movq 0x1b814(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38763
movl $0x1, 0x2b4(%rsp)
movl $0x1, 0x230(%rsp)
jmp 0x38c0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
leaq 0x207(%rsp), %rdi
callq 0x6490
jmp 0x39188
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
jmp 0x38c52
leaq 0x208(%rsp), %rdi
leaq 0x3d9c(%rip), %rsi      # 0x3c568
callq 0x6130
cmpl $0x0, %eax
jne 0x3885d
movq 0x2a8(%rsp), %rax
movslq 0x228(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
leaq 0x288(%rsp), %rdi
callq 0x65a0
jmp 0x387fe
movb $0x1, 0x22f(%rsp)
movq 0x1b7a3(%rip), %rdi     # 0x53fb0
leaq 0x3d57(%rip), %rsi      # 0x3c56b
callq 0x6420
movq %rax, 0xd0(%rsp)
jmp 0x38823
movq 0xd0(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x6390
movq %rax, 0xc8(%rsp)
jmp 0x38842
movq 0xc8(%rsp), %rdi
movq 0x1b71f(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38858
jmp 0x38c03
leaq 0x208(%rsp), %rdi
leaq 0x3d0e(%rip), %rsi      # 0x3c57a
callq 0x6130
cmpl $0x0, %eax
jne 0x389b1
movq 0x2a8(%rsp), %rax
movslq 0x228(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, 0xb8(%rsp)
leaq 0x1df(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0x6760
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
leaq 0x1e0(%rsp), %rdi
callq 0x65b0
jmp 0x388cb
leaq 0x270(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x391c0
jmp 0x388e2
leaq 0x1e0(%rsp), %rdi
callq 0x6260
leaq 0x1df(%rsp), %rdi
callq 0x6490
movb $0x1, 0x22f(%rsp)
movq 0x1b6a5(%rip), %rdi     # 0x53fb0
leaq 0x3c6b(%rip), %rsi      # 0x3c57d
callq 0x6420
movq %rax, 0xb0(%rsp)
jmp 0x38921
movq 0xb0(%rsp), %rdi
movq 0x2a8(%rsp), %rax
movslq 0x228(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
callq 0x6420
movq %rax, 0xa8(%rsp)
jmp 0x3894d
movq 0xa8(%rsp), %rdi
movq 0x1b614(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38963
jmp 0x38c01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
jmp 0x3899f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
leaq 0x1e0(%rsp), %rdi
callq 0x6260
leaq 0x1df(%rsp), %rdi
callq 0x6490
jmp 0x38c52
leaq 0x208(%rsp), %rdi
leaq 0x3bc5(%rip), %rsi      # 0x3c585
callq 0x6130
cmpl $0x0, %eax
jne 0x38a51
movq 0x2a8(%rsp), %rax
movslq 0x228(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
leaq 0x250(%rsp), %rdi
callq 0x65a0
jmp 0x389f2
movb $0x1, 0x22e(%rsp)
movq 0x1b5af(%rip), %rdi     # 0x53fb0
leaq 0x3b80(%rip), %rsi      # 0x3c588
callq 0x6420
movq %rax, 0xa0(%rsp)
jmp 0x38a17
movq 0xa0(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x6390
movq %rax, 0x98(%rsp)
jmp 0x38a36
movq 0x98(%rsp), %rdi
movq 0x1b52b(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38a4c
jmp 0x38bff
leaq 0x208(%rsp), %rdi
leaq 0x3b38(%rip), %rsi      # 0x3c598
callq 0x6130
cmpl $0x0, %eax
jne 0x38ae1
movq 0x2a8(%rsp), %rax
movslq 0x228(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x6670
movl %eax, 0x24c(%rsp)
movq 0x1b51e(%rip), %rdi     # 0x53fb0
leaq 0x3b02(%rip), %rsi      # 0x3c59b
callq 0x6420
movq %rax, 0x90(%rsp)
jmp 0x38aa8
movq 0x90(%rsp), %rdi
movl 0x24c(%rsp), %esi
callq 0x6720
movq %rax, 0x88(%rsp)
jmp 0x38ac6
movq 0x88(%rsp), %rdi
movq 0x1b49b(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38adc
jmp 0x38bfd
leaq 0x208(%rsp), %rdi
leaq 0x3ab9(%rip), %rsi      # 0x3c5a9
callq 0x6130
cmpl $0x0, %eax
jne 0x38b6b
movq 0x2a8(%rsp), %rax
movslq 0x228(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x6670
movl %eax, 0x248(%rsp)
movq 0x1b48e(%rip), %rdi     # 0x53fb0
leaq 0x1827(%rip), %rsi      # 0x3a350
callq 0x6420
movq %rax, 0x80(%rsp)
jmp 0x38b38
movq 0x80(%rsp), %rdi
movl 0x248(%rsp), %esi
callq 0x6720
movq %rax, 0x78(%rsp)
jmp 0x38b53
movq 0x78(%rsp), %rdi
movq 0x1b411(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38b66
jmp 0x38bfb
leaq 0x208(%rsp), %rdi
leaq 0x3a32(%rip), %rsi      # 0x3c5ac
callq 0x6130
cmpl $0x0, %eax
jne 0x38bec
movq 0x2a8(%rsp), %rax
movslq 0x228(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x6670
movl %eax, 0x244(%rsp)
movq 0x1b404(%rip), %rdi     # 0x53fb0
leaq 0x39fc(%rip), %rsi      # 0x3c5af
callq 0x6420
movq %rax, 0x70(%rsp)
jmp 0x38bbf
movq 0x70(%rsp), %rdi
movl 0x244(%rsp), %esi
callq 0x6720
movq %rax, 0x68(%rsp)
jmp 0x38bd7
movq 0x68(%rsp), %rdi
movq 0x1b38d(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38bea
jmp 0x38bf9
movl $0x4, 0x230(%rsp)
jmp 0x38c0e
jmp 0x38bfb
jmp 0x38bfd
jmp 0x38bff
jmp 0x38c01
jmp 0x38c03
movl $0x0, 0x230(%rsp)
leaq 0x208(%rsp), %rdi
callq 0x6260
movl 0x230(%rsp), %eax
movl %eax, 0x64(%rsp)
testl %eax, %eax
je 0x38c3a
jmp 0x38c2c
movl 0x64(%rsp), %eax
subl $0x4, %eax
je 0x38c3c
jmp 0x39152
jmp 0x38c3c
movl 0x228(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x228(%rsp)
jmp 0x385b3
leaq 0x208(%rsp), %rdi
callq 0x6260
jmp 0x39188
movb 0x22f(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x38d1b
movb 0x22e(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x38d1b
leaq 0x288(%rsp), %rdi
callq 0x62d0
cmpq $0x0, %rax
jbe 0x38cb2
leaq 0x270(%rsp), %rdi
callq 0x18f70
testb $0x1, %al
jne 0x38ce9
leaq 0x270(%rsp), %rdi
callq 0x18fc0
cmpq $0x0, %rax
jbe 0x38d1b
leaq 0x2cf8(%rip), %rsi      # 0x3b9c4
leaq 0x288(%rsp), %rdi
callq 0x9e10
movb %al, 0x63(%rsp)
jmp 0x38cdf
movb 0x63(%rsp), %al
testb $0x1, %al
jne 0x38ce9
jmp 0x38d1b
movq 0x1b2c0(%rip), %rdi     # 0x53fb0
leaq 0x38c5(%rip), %rsi      # 0x3c5bc
callq 0x6420
movq %rax, 0x58(%rsp)
jmp 0x38d03
movq 0x58(%rsp), %rdi
movq 0x1b261(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38d16
jmp 0x38dbd
movq 0x1b28e(%rip), %rdi     # 0x53fb0
leaq 0x389f(%rip), %rsi      # 0x3c5c8
callq 0x6420
movq %rax, 0x50(%rsp)
jmp 0x38d35
movq 0x50(%rsp), %rdi
movq 0x1b22f(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38d48
movq 0x1b261(%rip), %rdi     # 0x53fb0
leaq 0x3897(%rip), %rsi      # 0x3c5ed
callq 0x6420
movq %rax, 0x48(%rsp)
jmp 0x38d62
movq 0x48(%rsp), %rdi
movq 0x1b202(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38d75
movq 0x1b234(%rip), %rdi     # 0x53fb0
leaq 0x38af(%rip), %rsi      # 0x3c632
callq 0x6420
movq %rax, 0x40(%rsp)
jmp 0x38d8f
movq 0x40(%rsp), %rdi
movq 0x1b1d5(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x38da2
movl $0x1, 0x2b4(%rsp)
movl $0x1, 0x230(%rsp)
jmp 0x39152
leaq 0x270(%rsp), %rdi
callq 0x18f70
testb $0x1, %al
jne 0x38dd3
jmp 0x38f7b
leaq 0x288(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x62d0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x67a0
movq %rax, 0x38(%rsp)
jmp 0x38dfc
movq 0x38(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x38e21
leaq 0x386c(%rip), %rsi      # 0x3c67c
leaq 0x288(%rsp), %rdi
callq 0x6400
jmp 0x38e1f
jmp 0x38e21
leaq 0x250(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x62d0
movq 0x20(%rsp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x67a0
movq %rax, 0x28(%rsp)
jmp 0x38e4a
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x38e6f
leaq 0x381e(%rip), %rsi      # 0x3c67c
leaq 0x250(%rsp), %rdi
callq 0x6400
jmp 0x38e6d
jmp 0x38e6f
movl $0x50, %edi
callq 0x6430
movq %rax, 0x18(%rsp)
jmp 0x38e80
movb $0x1, 0x18f(%rsp)
leaq 0x1b0(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x6190
jmp 0x38e9f
leaq 0x190(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x6190
jmp 0x38eb6
movq 0x18(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
leaq 0x190(%rsp), %rdx
callq 0x37da0
jmp 0x38ed2
movq 0x18(%rsp), %rax
movb $0x0, 0x18f(%rsp)
movq %rax, 0x1d0(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x6260
leaq 0x1b0(%rsp), %rdi
callq 0x6260
jmp 0x39084
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
jmp 0x38f60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
jmp 0x38f53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x6260
leaq 0x1b0(%rsp), %rdi
callq 0x6260
testb $0x1, 0x18f(%rsp)
jne 0x38f6c
jmp 0x38f76
movq 0x18(%rsp), %rdi
callq 0x63f0
jmp 0x39188
movl $0x50, %edi
callq 0x6430
movq %rax, 0x10(%rsp)
jmp 0x38f8c
movb $0x1, 0x14f(%rsp)
leaq 0x170(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x391f0
jmp 0x38fab
leaq 0x150(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x6190
jmp 0x38fc2
movq 0x10(%rsp), %rdi
leaq 0x170(%rsp), %rsi
leaq 0x150(%rsp), %rdx
callq 0x37f90
jmp 0x38fde
movq 0x10(%rsp), %rax
movb $0x0, 0x14f(%rsp)
movq %rax, 0x1d0(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x6260
leaq 0x170(%rsp), %rdi
callq 0x190e0
jmp 0x39084
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
jmp 0x39069
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
jmp 0x3905c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x238(%rsp)
movl %eax, 0x234(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x6260
leaq 0x170(%rsp), %rdi
callq 0x190e0
testb $0x1, 0x14f(%rsp)
jne 0x39075
jmp 0x3907f
movq 0x10(%rsp), %rdi
callq 0x63f0
jmp 0x39188
cmpl $0x0, 0x24c(%rsp)
je 0x390a4
cmpl $0x1, 0x24c(%rsp)
je 0x390a4
cmpl $0x5, 0x24c(%rsp)
je 0x390a4
jmp 0x390bc
movq 0x1d0(%rsp), %rdi
movl 0x24c(%rsp), %esi
callq 0x38250
jmp 0x390ba
jmp 0x390bc
cmpl $0x0, 0x248(%rsp)
jl 0x390de
movq 0x1d0(%rsp), %rdi
movl 0x248(%rsp), %esi
callq 0x381f0
jmp 0x390dc
jmp 0x390de
cmpl $0x0, 0x244(%rsp)
jl 0x39100
movq 0x1d0(%rsp), %rdi
movl 0x244(%rsp), %esi
callq 0x38220
jmp 0x390fe
jmp 0x39100
movq 0x1aea9(%rip), %rdi     # 0x53fb0
leaq 0x3570(%rip), %rsi      # 0x3c67e
callq 0x6420
movq %rax, 0x8(%rsp)
jmp 0x3911a
movq 0x8(%rsp), %rdi
movq 0x1ae4a(%rip), %rsi     # 0x53f70
callq 0x6470
jmp 0x3912d
movq 0x1d0(%rsp), %rdi
callq 0x38280
jmp 0x3913c
movl $0x0, 0x2b4(%rsp)
movl $0x1, 0x230(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x6260
leaq 0x270(%rsp), %rdi
callq 0x190e0
leaq 0x288(%rsp), %rdi
callq 0x6260
movl 0x2b4(%rsp), %eax
addq $0x2b8, %rsp            # imm = 0x2B8
retq
leaq 0x250(%rsp), %rdi
callq 0x6260
leaq 0x270(%rsp), %rdi
callq 0x190e0
leaq 0x288(%rsp), %rdi
callq 0x6260
movq 0x238(%rsp), %rdi
callq 0x6750
nopl (%rax)