// File: /workspace/github_cpp_makefile_star2_O2/Slexis-Works[P]texture-packing/texture-packing.cpp
// Function: main
int main (int argc, char *argv[]) {

	// Paramètres et valeurs par défaut
	coord minSize(16);
	coord maxSize(256);
	size_t nbRects(1000);
	coord texWidth(2048);
	coord texHeight(2048);
	std::string outputFolder;
	std::string outputRect;
	size_t nbTests(1);
	std::vector<std::string> algosChoisis;
	std::map<std::string, funcAlgo> algosDispos;
	algosDispos["FF"] = algoFF;
	algosDispos["FFDH"] = algoFFDH;
	algosDispos["NFDH"] = algoNFDH;
	algosDispos["BFDH"] = algoBFDH;
	//algosDispos.push_back("AD");
	//algosDispos.push_back("Harmonic");
	//algosDispos.push("");

	// http://www.cplusplus.com/reference/random/
	auto seed = std::chrono::system_clock::now().time_since_epoch().count();


	// Traitement des arguments

	for (int an=1 ; an<argc ; ++an) {
		std::string arg(argv[an]);

		if (arg == "--help") {
			if (an == 1 && argc == 2) {
				showHelp(argv[0]);
				return 0;
			} else {
				std::cerr << "Erreur : --help doit apparaître seul." << std::endl;
				showUsage(argv[0]);
				return 1;
			}
		} else if (arg == "--seed") {
			++an;
			if (an == argc || (isBadInt(argv[an]) && argv[an][0] != '-')) {
				std::cerr << "Erreur : --seed doit être suivi de la graine voulue" << std::endl;
				showUsage(argv[0]);
				return 3;
			}
			seed = std::stol(argv[an]);
		} else if (arg == "--tmin") {
			++an;
			if (an == argc || isBadInt(argv[an])) {
				std::cerr << "Erreur : --tmin doit être suivi de la taille minimale voulue en pixels" << std::endl;
				showUsage(argv[0]);
				return 4;
			}
			minSize = std::stoi(argv[an]);
		} else if (arg == "--tmax") {
			++an;
			if (an == argc || isBadInt(argv[an])) {
				std::cerr << "Erreur : --tmax doit être suivi de la taille maximale voulue en pixels" << std::endl;
				showUsage(argv[0]);
				return 5;
			}
			maxSize = std::stoi(argv[an]);
		} else if (arg == "--nbrect") {
			++an;
			if (an == argc || isBadInt(argv[an])) {
				std::cerr << "Erreur : --nbrect doit être suivi du nombre de rectangles à générer" << std::endl;
				showUsage(argv[0]);
				return 6;
			}
			nbRects = std::stoi(argv[an]);
		} else if (arg == "--lt") {
			++an;
			if (an == argc || isBadInt(argv[an])) {
				std::cerr << "Erreur : --lt doit être suivi de la largeur de la texture voulue en pixels" << std::endl;
				showUsage(argv[0]);
				return 7;
			}
			texWidth = std::stoi(argv[an]);
		} else if (arg == "--ht") {
			++an;
			if (an == argc || isBadInt(argv[an])) {
				std::cerr << "Erreur : --ht doit être suivi de la hauteur de la texture voulue en pixels" << std::endl;
				showUsage(argv[0]);
				return 8;
			}
			texHeight = std::stoi(argv[an]);
		} else if (arg == "--sortie") {
			++an;
			if (an == argc || !*(argv[an])) {
				std::cerr << "Erreur : le nom du dossier des résultats ne peut être vide" << std::endl;
				showUsage(argv[0]);
				return 9;
			}
			outputFolder = argv[an];
		} else if (arg == "--tests") {
			++an;
			if (an == argc || isBadInt(argv[an])) {
				std::cerr << "Erreur : --tests doit être suivi du nombre de tests à effectuer" << std::endl;
				showUsage(argv[0]);
				return 10;
			}
			nbTests = std::stoi(argv[an]);
		} else if (arg == "--rectangles") {
			++an;
			if (an == argc || !*(argv[an])) {
				std::cerr << "Erreur : le nom du dossier des rectangles ne peut être vide" << std::endl;
				showUsage(argv[0]);
				return 11;
			}
			outputRect = argv[an];
		} else if (algosDispos.count(arg) == 1) {
			if (std::find(algosChoisis.begin(), algosChoisis.end(), arg) != algosChoisis.end()) {
				std::cerr << "Attention : algorithme " << arg << " déjà spécifié" << std::endl;
			} else {
				algosChoisis.push_back(arg);
			}
		} else {
			std::cerr << "Erreur : paramètre ou algorithme inconnu : " << arg << std::endl;
			showUsage(argv[0]);
			return 12;
		}

	}

	// Vérification des paramètres
	if (minSize == 0 || maxSize == 0 || texWidth == 0 || texHeight == 0) {
		std::cerr << "Erreur : aucune taille ne peut être égale à 0" << std::endl;
		return 20;
	}

	if (maxSize > texWidth || maxSize > texHeight) {
		std::cerr << "Erreur : la taille maximale des rectangles ne peut dépasser la taille de la texture" << std::endl;
		return 21;
	}

	if (minSize > maxSize) {
		coord tmp = minSize;
		minSize = maxSize;
		maxSize = tmp;
		std::cerr << "Attention : les tailles minimale et maximale des rectangles ont été interverties pour être cohérentes" << std::endl;
	}

	if (nbTests == 0) {
		std::cerr << "Erreur : il faut au moins un test pour ce programme" << std::endl;
		return 22;
	}

	if (nbRects == 0) {
		std::cerr << "Erreur : il faut générer au moins un rectangle" << std::endl;
		return 23;
	}

	if (algosChoisis.empty()) {
		for (std::map<std::string, funcAlgo>::iterator it=algosDispos.begin(), end=algosDispos.end() ; it != end ; ++it) {
			algosChoisis.push_back(it->first);
		}
	}

	// Démarrage du programme

	std::cout << "Configuration OK" << std::endl;
	std::cout << "Graine utilisée : " << seed << std::endl;
	//std::cout << nbTests << " tests par algorithme" << std::endl;
	if (outputFolder.empty()) {
		std::stringstream seedConv;
		seedConv << seed << "_";
		if (algosChoisis.size() == 1)
			seedConv << algosChoisis[0];
		seedConv >> outputFolder;
	}

	std::default_random_engine randGen(seed);
	std::uniform_int_distribution<coord> distriSize(minSize, maxSize);
	std::uniform_int_distribution<coord> distriColor(0, 0xFFFFFF);

	if (nbTests == 1) {
		if (algosChoisis.size() > 1) {
			std::cout << "Les algorithmes ne seront traités qu'une fois avec les mêmes données" << std::endl;
		} else {
			std::cout << "L'algorithme ne sera traité qu'une seule fois" << std::endl;
		}
		std::vector<Rectangle> rects;
		for (size_t i=0 ; i<nbRects ; ++i) {
			rects.push_back(Rectangle(
				distriSize(randGen),
				distriSize(randGen),
				distriColor(randGen)
			));
		}
		if (!outputRect.empty()) {
			std::cout << "Les rectangles générés n'ont pas été mis dans " << outputRect << std::endl;
		}
		if (algosChoisis.size() > 1) {
			std::cout << "Les résultats seront dans " << outputFolder << "*nom algo*" << std::endl;
		} else {
			std::cout << "Les résultats seront dans " << outputFolder << std::endl;
		}
		for (std::string alg : algosChoisis) {
			std::cout << "Traitement de l'algorithme " << alg << std::endl;
			std::vector<Bin> res;
			algosDispos[alg](rects, res, texWidth, texHeight);

			std::cout << "Terminé. " << res.size() << " boîtes utilisées" << std::endl;
			std::string currentOutputF = outputFolder;
			if (algosChoisis.size() > 1) {
				currentOutputF += alg;
			}
			if (mkdir(currentOutputF.c_str(), 0777)) {
				perror("mkdir");
			}

			for (size_t i = 0 ; i < res.size() ; ++i) {
				std::stringstream binPath;
				binPath << currentOutputF << "/" << (i+1) << ".ppm";
				PPMImage curBinImg(texWidth, texHeight);
				res[i].drawOn(curBinImg);
				curBinImg.saveImage(binPath.str());
			}
		}
	} else {
		if (!outputRect.empty()) {
			std::cerr << "Attention : les rectangles ne peuvent être enregistrés s'il y a plusieurs tests" << std::endl;
		}

		std::cout << "Démarrage de " << nbTests << " tests par classe et par nombre de blocs pour " << algosChoisis.size() << " algorithme(s)" << std::endl;
		size_t nbBlocsParTest[] = {20, 40, 60, 80, 100};

		std::uniform_int_distribution<unsigned char> probaType(0, 9);
		std::uniform_int_distribution<coord> typesDistriL[] = {
			std::uniform_int_distribution<coord>(100*2/3, 100),
			std::uniform_int_distribution<coord>(1, 100/2),
			std::uniform_int_distribution<coord>(100/2, 100),
			std::uniform_int_distribution<coord>(1, 100/2)
		};
		std::uniform_int_distribution<coord> typesDistriH[] = {
			std::uniform_int_distribution<coord>(1, 100/2),
			std::uniform_int_distribution<coord>(100*2/3, 100),
			std::uniform_int_distribution<coord>(100/2, 100),
			std::uniform_int_distribution<coord>(1, 100/2)
		};

		std::map<std::string, long> scoresAlgos;
		for (std::string alg : algosChoisis) {
			scoresAlgos[alg] = 0;
		}
		for (size_t nbBI = 0 ; nbBI < 5 ; ++nbBI) {
			for (size_t classe = 0 ; classe < 4 ; ++classe) {
				for (size_t t = 0 ; t < nbTests ; ++t) {
					std::vector<Rectangle> rects;
					long lowerBound = 0;
					for (size_t r = 0 ; r < nbBlocsParTest[nbBI] ; ++r) {
						unsigned char resProba, type;
						resProba = probaType(randGen);
						if (resProba < 7) {
							type = classe;
						} else {
							type = (classe + resProba - 6)%4;
						}
						int rL = typesDistriL[type](randGen);
						int rH = typesDistriH[type](randGen);
						rects.push_back(Rectangle(rL, rH, distriColor(randGen)));
						lowerBound += rL * rH;
					}
					lowerBound = ceil(((float)lowerBound)/10000.0);
					//std::cout << "LowerBound pour ces rectangles : " << lowerBound << std::endl;
					for (std::string alg : algosChoisis) {
						std::vector<Bin> res;
						algosDispos[alg](rects, res, 100, 100);
						scoresAlgos[alg] += res.size() - lowerBound;
						//std::cout << "Résultat " << t << " pour algo " << alg << " avec " << rects.size() << " blocs pour la classe " << classe << " : " << res.size() << " boîtes (" << (res.size() - lowerBound) << ")" << std::endl;
					}
				}
			}
		}
		for (std::string alg : algosChoisis) {
			std::cout << alg << " : " << scoresAlgos[alg] << " blocs de différence pour une moyenne de " << ((double)scoresAlgos[alg])/(double)(nbTests*20) << std::endl;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5d8, %rsp            # imm = 0x5D8
movq %rsi, %r13
movl %edi, %r15d
leaq 0x150(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0x1c0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x168(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x5a29(%rip), %rsi      # 0x8078
leaq 0x1f0(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x41fc
leaq 0x160(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x4196
leaq 0x38cf(%rip), %rcx      # 0x5f4c
movq %rcx, (%rax)
leaq 0x1f0(%rsp), %rdi
callq 0x20f0
leaq 0x59e7(%rip), %rsi      # 0x807b
leaq 0x1f0(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x41fc
leaq 0x160(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x4196
leaq 0x3e7a(%rip), %rcx      # 0x653c
movq %rcx, (%rax)
leaq 0x1f0(%rsp), %rdi
callq 0x20f0
leaq 0x59a7(%rip), %rsi      # 0x8080
leaq 0x1f0(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x41fc
leaq 0x160(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x4196
leaq 0x4b31(%rip), %rcx      # 0x7238
movq %rcx, (%rax)
leaq 0x1f0(%rsp), %rdi
callq 0x20f0
leaq 0x5967(%rip), %rsi      # 0x8085
leaq 0x1f0(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x41fc
leaq 0x160(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x4196
leaq 0x4d34(%rip), %rcx      # 0x7480
movq %rcx, (%rax)
leaq 0x1f0(%rsp), %r12
movq %r12, %rdi
callq 0x20f0
movq $0x0, 0x8(%rsp)
pushq $0x10
popq %rax
movl %eax, 0xa0(%rsp)
movl $0x100, 0x8c(%rsp) # imm = 0x100
movl $0x3e8, %eax            # imm = 0x3E8
movq %rax, 0x80(%rsp)
movl $0x800, 0x78(%rsp)      # imm = 0x800
pushq $0x1
popq %rax
movq %rax, 0x68(%rsp)
pushq $0x1
popq %rbx
callq 0x2060
movq %rax, 0x70(%rsp)
leaq 0x30(%rsp), %rbp
leaq 0x1d0(%rsp), %r14
movl %ebx, %eax
movq %r12, %rbx
movl $0x800, 0x90(%rsp) # imm = 0x800
cmpl %r15d, %eax
jge 0x313a
movl %eax, %r12d
cltq
movq (%r13,%rax,8), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %rbx, %rdi
leaq 0x5f25(%rip), %rsi      # 0x8711
callq 0x4237
testb %al, %al
je 0x2845
cmpl $0x2, %r15d
jne 0x28b9
cmpl $0x1, %r12d
jne 0x28b9
movq (%r13), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x3f18
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0x1
popq %r12
movq $0x0, 0x8(%rsp)
leaq 0x1f0(%rsp), %rbx
jmp 0x2fb5
movq %rbx, %rdi
leaq 0x5862(%rip), %rsi      # 0x80b1
callq 0x4237
testb %al, %al
je 0x2905
movl %r12d, %eax
incl %eax
movl %eax, %r12d
cmpl %r15d, %eax
jne 0x29ba
movq 0xa77c(%rip), %rdi      # 0xcff0
leaq 0x583d(%rip), %rsi      # 0x80b8
callq 0x2210
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x4b8(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0x3
jmp 0x2f2e
movq 0xa730(%rip), %rdi      # 0xcff0
leaq 0x57c3(%rip), %rsi      # 0x808a
callq 0x2210
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x4d8(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0x1
jmp 0x2f2e
movq %rbx, %rdi
leaq 0x57de(%rip), %rsi      # 0x80ed
callq 0x4237
testb %al, %al
movl %r12d, %r14d
je 0x2a17
incl %r14d
cmpl %r15d, %r14d
je 0x2966
movl %r14d, %r12d
movslq %r14d, %rbp
movq (%r13,%rbp,8), %rsi
leaq 0x598(%rsp), %r14
movq %r14, %rdi
leaq 0x30(%rsp), %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x417e
movq %r14, %rdi
movl %eax, %r14d
callq 0x20f0
testb %r14b, %r14b
movl %r12d, %r14d
je 0x2c6c
movl %r14d, %r12d
movq 0xa680(%rip), %rdi      # 0xcff0
leaq 0x577d(%rip), %rsi      # 0x80f4
callq 0x2210
leaq 0x30(%rsp), %rbp
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x498(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0x4
jmp 0x2f2e
movl %r15d, %ebx
movslq %r12d, %r14
movq (%r13,%r14,8), %rsi
leaq 0x5b8(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r15, %rdi
callq 0x417e
testb %al, %al
je 0x2b7b
movq (%r13,%r14,8), %rax
movb (%rax), %bpl
movq %r15, %rdi
callq 0x20f0
cmpb $0x2d, %bpl
leaq 0x30(%rsp), %rbp
movl %ebx, %r15d
leaq 0x1f0(%rsp), %rbx
jne 0x286d
jmp 0x2b8e
movq %rbx, %rdi
leaq 0x571b(%rip), %rsi      # 0x813c
callq 0x4237
testb %al, %al
je 0x2ac9
incl %r14d
cmpl %r15d, %r14d
je 0x2a75
movl %r14d, %r12d
movslq %r14d, %rbp
movq (%r13,%rbp,8), %rsi
leaq 0x578(%rsp), %r14
movq %r14, %rdi
leaq 0x30(%rsp), %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x417e
movq %r14, %rdi
movl %eax, %r14d
callq 0x20f0
testb %r14b, %r14b
movl %r12d, %r14d
je 0x2d51
movl %r14d, %r12d
movq 0xa571(%rip), %rdi      # 0xcff0
leaq 0x56bd(%rip), %rsi      # 0x8143
callq 0x2210
leaq 0x30(%rsp), %rbp
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x478(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0x5
jmp 0x2f2e
movq %rbx, %rdi
leaq 0x56b8(%rip), %rsi      # 0x818b
callq 0x4237
testb %al, %al
je 0x2bba
incl %r14d
cmpl %r15d, %r14d
je 0x2b27
movl %r14d, %r12d
movslq %r14d, %rbp
movq (%r13,%rbp,8), %rsi
leaq 0x558(%rsp), %r14
movq %r14, %rdi
leaq 0x30(%rsp), %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x417e
movq %r14, %rdi
movl %eax, %r14d
callq 0x20f0
testb %r14b, %r14b
movl %r12d, %r14d
je 0x2dcc
movl %r14d, %r12d
movq 0xa4bf(%rip), %rdi      # 0xcff0
leaq 0x565c(%rip), %rsi      # 0x8194
callq 0x2210
leaq 0x30(%rsp), %rbp
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x458(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0x6
jmp 0x2f2e
movq %r15, %rdi
callq 0x20f0
movl %ebx, %r15d
leaq 0x1f0(%rsp), %rbx
movq (%r13,%r14,8), %rsi
movq %rbp, %rdi
leaq 0xd0(%rsp), %rdx
callq 0x41fc
movq %rbp, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x4244
movq %rax, 0x70(%rsp)
jmp 0x2faa
movq %rbx, %rdi
leaq 0x5618(%rip), %rsi      # 0x81dc
callq 0x4237
testb %al, %al
je 0x2c9f
incl %r14d
cmpl %r15d, %r14d
je 0x2c18
movl %r14d, %r12d
movslq %r14d, %rbp
movq (%r13,%rbp,8), %rsi
leaq 0x538(%rsp), %r14
movq %r14, %rdi
leaq 0x30(%rsp), %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x417e
movq %r14, %rdi
movl %eax, %r14d
callq 0x20f0
testb %r14b, %r14b
movl %r12d, %r14d
je 0x2eb1
movl %r14d, %r12d
movq 0xa3ce(%rip), %rdi      # 0xcff0
leaq 0x55b8(%rip), %rsi      # 0x81e1
callq 0x2210
leaq 0x30(%rsp), %rbp
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x438(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0x7
jmp 0x2f2e
movq (%r13,%rbp,8), %rsi
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
leaq 0xd0(%rsp), %rdx
callq 0x41fc
movq %rbp, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x4260
movl %eax, 0xa0(%rsp)
jmp 0x2faa
movq %rbx, %rdi
leaq 0x5584(%rip), %rsi      # 0x822d
callq 0x4237
testb %al, %al
je 0x2d84
incl %r14d
cmpl %r15d, %r14d
je 0x2cfd
movl %r14d, %r12d
movslq %r14d, %rbp
movq (%r13,%rbp,8), %rsi
leaq 0x518(%rsp), %r14
movq %r14, %rdi
leaq 0x30(%rsp), %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x417e
movq %r14, %rdi
movl %eax, %r14d
callq 0x20f0
testb %r14b, %r14b
movl %r12d, %r14d
je 0x2f7f
movl %r14d, %r12d
movq 0xa2e9(%rip), %rdi      # 0xcff0
leaq 0x5524(%rip), %rsi      # 0x8232
callq 0x2210
leaq 0x30(%rsp), %rbp
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x418(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0x8
jmp 0x2f2e
movq (%r13,%rbp,8), %rsi
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
leaq 0xd0(%rsp), %rdx
callq 0x41fc
movq %rbp, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x4260
movl %eax, 0x8c(%rsp)
jmp 0x2faa
movq %rbx, %rdi
leaq 0x54f0(%rip), %rsi      # 0x827e
callq 0x4237
testb %al, %al
je 0x2e02
incl %r14d
cmpl %r15d, %r14d
je 0x2ee4
movslq %r14d, %rax
movq (%r13,%rax,8), %rsi
cmpb $0x0, (%rsi)
je 0x2ee4
movl %r14d, %r12d
movb $0x1, %r14b
leaq 0x140(%rsp), %rdi
callq 0x2350
jmp 0x2fb5
movq (%r13,%rbp,8), %rsi
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
leaq 0xd0(%rsp), %rdx
callq 0x41fc
movq %rbp, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x4260
cltq
movq %rax, 0x80(%rsp)
jmp 0x2faa
movq %rbx, %rdi
leaq 0x54b8(%rip), %rsi      # 0x82c4
callq 0x4237
testb %al, %al
je 0x2f36
incl %r14d
cmpl %r15d, %r14d
je 0x2e60
movl %r14d, %r12d
movslq %r14d, %rbp
movq (%r13,%rbp,8), %rsi
leaq 0x4f8(%rsp), %r14
movq %r14, %rdi
leaq 0x30(%rsp), %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x417e
movq %r14, %rdi
movl %eax, %r14d
callq 0x20f0
testb %r14b, %r14b
movl %r12d, %r14d
je 0x309b
movl %r14d, %r12d
movq 0xa186(%rip), %rdi      # 0xcff0
leaq 0x545b(%rip), %rsi      # 0x82cc
callq 0x2210
leaq 0x30(%rsp), %rbp
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x3d8(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0xa
jmp 0x2f2e
movq (%r13,%rbp,8), %rsi
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
leaq 0xd0(%rsp), %rdx
callq 0x41fc
movq %rbp, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x4260
movl %eax, 0x90(%rsp)
jmp 0x2faa
movl %r14d, %r12d
movq 0xa102(%rip), %rdi      # 0xcff0
leaq 0x5392(%rip), %rsi      # 0x8287
callq 0x2210
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x3f8(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0x9
popq %rax
movq %rax, 0x8(%rsp)
jmp 0x2fb5
movq %rbx, %rdi
leaq 0x53ce(%rip), %rsi      # 0x830e
callq 0x4237
testb %al, %al
je 0x2fd8
incl %r14d
cmpl %r15d, %r14d
je 0x304c
movslq %r14d, %rax
movq (%r13,%rax,8), %rsi
cmpb $0x0, (%rsi)
je 0x304c
movl %r14d, %r12d
movb $0x1, %r14b
leaq 0x1b0(%rsp), %rdi
callq 0x2350
jmp 0x2fb5
movq (%r13,%rbp,8), %rsi
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
leaq 0xd0(%rsp), %rdx
callq 0x41fc
movq %rbp, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x4260
movl %eax, 0x78(%rsp)
movq %rbp, %rdi
callq 0x20f0
movb $0x1, %r14b
movq %rbx, %rdi
callq 0x20f0
movl %r12d, %eax
incl %eax
testb %r14b, %r14b
leaq 0x1d0(%rsp), %r14
jne 0x27c4
jmp 0x3430
leaq 0x160(%rsp), %rdi
movq %rbx, %rsi
callq 0x427c
cmpq $0x1, %rax
jne 0x30ce
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rbx, %rdx
callq 0x4b5c
cmpq 0x18(%rsp), %rax
je 0x3125
movq 0x9fda(%rip), %rdi      # 0xcff0
leaq 0x533b(%rip), %rsi      # 0x8358
callq 0x2210
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21f0
movq %rax, %rdi
leaq 0x5339(%rip), %rsi      # 0x8370
callq 0x2210
movb $0x1, %r14b
movq %rax, %rdi
callq 0x2110
jmp 0x2fb5
movl %r14d, %r12d
movq 0x9f9a(%rip), %rdi      # 0xcff0
leaq 0x52be(%rip), %rsi      # 0x831b
callq 0x2210
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x3b8(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0xb
jmp 0x2f2e
movq (%r13,%rbp,8), %rsi
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
leaq 0xd0(%rsp), %rdx
callq 0x41fc
movq %rbp, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x4260
cltq
movq %rax, 0x68(%rsp)
jmp 0x2faa
movq 0x9f1b(%rip), %rdi      # 0xcff0
leaq 0x52a7(%rip), %rsi      # 0x8383
callq 0x2210
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21f0
movq %rax, %rdi
callq 0x2110
movq (%r13), %rsi
leaq 0x398(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
callq 0x41fc
movq %r14, %rdi
callq 0x4103
movq %r14, %rdi
callq 0x20f0
xorl %r14d, %r14d
pushq $0xc
jmp 0x2f2e
movb $0x1, %r14b
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x4296
jmp 0x2fb5
movl 0xa0(%rsp), %ebx
testl %ebx, %ebx
sete %al
movl 0x8c(%rsp), %r12d
testl %r12d, %r12d
sete %cl
orb %al, %cl
movl 0x90(%rsp), %edi
testl %edi, %edi
sete %al
movl 0x78(%rsp), %esi
testl %esi, %esi
sete %dl
orb %al, %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x3196
movq 0x9e75(%rip), %rdi      # 0xcff0
leaq 0x522e(%rip), %rsi      # 0x83b0
callq 0x2210
movq %rax, %rdi
callq 0x2110
pushq $0x14
jmp 0x342a
cmpl %edi, %r12d
seta %al
cmpl %esi, %r12d
seta %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x31cb
movq 0x9e40(%rip), %rdi      # 0xcff0
leaq 0x522a(%rip), %rsi      # 0x83e1
callq 0x2210
movq %rax, %rdi
callq 0x2110
pushq $0x15
jmp 0x342a
cmpl %r12d, %ebx
jbe 0x31f7
movq 0x9e19(%rip), %rdi      # 0xcff0
leaq 0x5258(%rip), %rsi      # 0x8436
callq 0x2210
leaq 0x168(%rsp), %r15
movq %rax, %rdi
callq 0x2110
movl %ebx, %ebp
jmp 0x3205
movl %r12d, %ebp
movl %ebx, %r12d
leaq 0x168(%rsp), %r15
cmpq $0x0, 0x68(%rsp)
je 0x33ee
cmpq $0x0, 0x80(%rsp)
je 0x340d
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x387c
movq 0x9d91(%rip), %rdi      # 0xcfc8
leaq 0x52c7(%rip), %rsi      # 0x8505
callq 0x2210
movq 0x70(%rsp), %r14
movq %rax, %rdi
callq 0x2110
movq 0x9d71(%rip), %rdi      # 0xcfc8
leaq 0x52b8(%rip), %rsi      # 0x8516
callq 0x2210
movq %rax, %rdi
movq %r14, %rsi
callq 0x2200
movq %rax, %rdi
callq 0x2110
cmpq $0x0, 0x148(%rsp)
jne 0x32ed
leaq 0x1f0(%rsp), %rdi
callq 0x2180
leaq 0x200(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2200
leaq 0x5282(%rip), %rsi      # 0x852a
movq %rax, %rdi
callq 0x2210
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
cmpq $0x20, %rax
jne 0x32cb
movq %rbx, %rdi
callq 0x21f0
leaq 0x1f0(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x2260
leaq 0x1f0(%rsp), %rdi
callq 0x21a0
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %r14, %rax
xorl %edx, %edx
divq %rcx
cmpq $0x1, %rdx
adcq $0x0, %rdx
movq %rdx, 0xa8(%rsp)
movl %r12d, 0xf8(%rsp)
movl %ebp, 0xfc(%rsp)
movabsq $0xffffff00000000, %rax # imm = 0xFFFFFF00000000
movq %rax, 0xf0(%rsp)
cmpq $0x1, 0x68(%rsp)
jne 0x3478
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
cmpq $0x21, %rax
leaq 0x51e0(%rip), %rax      # 0x852c
leaq 0x5221(%rip), %rsi      # 0x8574
cmovaeq %rax, %rsi
movq 0x9c6a(%rip), %rdi      # 0xcfc8
callq 0x2210
movq %rax, %rdi
callq 0x2110
xorpd %xmm0, %xmm0
leaq 0x190(%rsp), %rbx
movapd %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
leaq 0xf8(%rsp), %r14
leaq 0xa8(%rsp), %r15
leaq 0x1f0(%rsp), %r13
subq $0x1, 0x80(%rsp)
jb 0x3802
movq %r14, %rdi
movq %r15, %rsi
callq 0x42c2
movl %eax, %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x42c2
movl %eax, %r12d
leaq 0xf0(%rsp), %rdi
movq %r15, %rsi
callq 0x42c2
movq %r13, %rdi
movl %ebp, %esi
movl %r12d, %edx
movl %eax, %ecx
callq 0x5c80
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4f92
jmp 0x3398
movq 0x9bfb(%rip), %rdi      # 0xcff0
leaq 0x50a4(%rip), %rsi      # 0x84a0
callq 0x2210
movq %rax, %rdi
callq 0x2110
pushq $0x16
jmp 0x342a
movq 0x9bdc(%rip), %rdi      # 0xcff0
leaq 0x50b9(%rip), %rsi      # 0x84d4
callq 0x2210
movq %rax, %rdi
callq 0x2110
pushq $0x17
popq %rax
movq %rax, 0x8(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x45cc
leaq 0x10(%rsp), %rdi
callq 0x43c0
leaq 0x1b0(%rsp), %rdi
callq 0x20f0
leaq 0x140(%rsp), %rdi
callq 0x20f0
movq 0x8(%rsp), %rax
addq $0x5d8, %rsp            # imm = 0x5D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x1b8(%rsp)
je 0x349e
movq 0x9b66(%rip), %rdi      # 0xcff0
leaq 0x51b5(%rip), %rsi      # 0x8646
callq 0x2210
movq %rax, %rdi
callq 0x2110
movq 0x9b23(%rip), %rdi      # 0xcfc8
leaq 0x51ec(%rip), %rsi      # 0x8698
callq 0x2210
movq %rax, %rdi
movq 0x68(%rsp), %rsi
callq 0x2160
leaq 0x51e2(%rip), %rsi      # 0x86a7
movq %rax, %rdi
callq 0x2210
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x5, %rsi
movq %rax, %rdi
callq 0x2160
leaq 0x5396(%rip), %rsi      # 0x8880
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
callq 0x2110
movq $0x14, 0x30(%rsp)
movq $0x28, 0x38(%rsp)
movq $0x3c, 0x40(%rsp)
movq $0x50, 0x48(%rsp)
movq $0x64, 0x50(%rsp)
movw $0x900, 0x66(%rsp)      # imm = 0x900
movaps 0x4adb(%rip), %xmm0     # 0x8010
movaps %xmm0, 0xd0(%rsp)
movapd 0x4adb(%rip), %xmm0     # 0x8020
movapd %xmm0, 0xe0(%rsp)
movapd 0x4ada(%rip), %xmm1     # 0x8030
movapd %xmm1, 0x190(%rsp)
movapd %xmm0, 0x1a0(%rsp)
leaq 0x1f8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r12
leaq 0xb0(%rsp), %r14
leaq 0x1f0(%rsp), %r15
cmpq %r12, %rbx
je 0x35cc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2280
movq %r15, %rdi
movq %r14, %rsi
callq 0x4352
andq $0x0, (%rax)
movq %r14, %rdi
callq 0x20f0
addq $0x20, %rbx
jmp 0x359f
xorl %eax, %eax
leaq 0xb0(%rsp), %r15
leaq 0xa8(%rsp), %rbp
cmpq $0x5, %rax
je 0x3b45
movq %rax, 0x80(%rsp)
movq 0x30(%rsp,%rax,8), %rax
movq %rax, 0xa0(%rsp)
xorl %ebx, %ebx
cmpq $0x4, %rbx
je 0x37f2
movzbl %bl, %eax
movq %rax, 0x70(%rsp)
xorl %r13d, %r13d
movq %rbx, 0x78(%rsp)
cmpq 0x68(%rsp), %r13
je 0x37ea
andq $0x0, 0x110(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x100(%rsp)
movq 0xa0(%rsp), %r14
xorl %ebx, %ebx
movq %r13, 0x90(%rsp)
subq $0x1, %r14
jb 0x36f8
leaq 0x66(%rsp), %rdi
movq %rbp, %rsi
callq 0x43b8
movq 0x70(%rsp), %rdx
leal (%rax,%rdx), %ecx
andb $0x3, %cl
xorb $0x2, %cl
cmpb $0x7, %al
movzbl %cl, %eax
cmovbl %edx, %eax
movzbl %al, %r13d
leaq (%rsp,%r13,8), %rdi
addq $0xd0, %rdi
movq %rbp, %rsi
callq 0x42c2
movl %eax, %r12d
leaq (%rsp,%r13,8), %rdi
addq $0x190, %rdi            # imm = 0x190
movq %rbp, %rsi
callq 0x42c2
movl %eax, %r13d
leaq 0xf0(%rsp), %rdi
movq %rbp, %rsi
callq 0x42c2
movq %r15, %rdi
movl %r12d, %esi
movl %r13d, %edx
movl %eax, %ecx
callq 0x5c80
leaq 0x100(%rsp), %rdi
movq %r15, %rsi
callq 0x4f92
imull %r12d, %r13d
movslq %r13d, %rax
addq %rax, %rbx
leaq 0xa8(%rsp), %rbp
movq 0x90(%rsp), %r13
jmp 0x364c
cvtsi2ss %rbx, %xmm0
cvtss2sd %xmm0, %xmm0
divsd 0x4967(%rip), %xmm0     # 0x8070
callq 0x2080
cvttsd2si %xmm0, %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %r14
cmpq %r14, %r12
movq 0x78(%rsp), %rbx
je 0x37cd
movq %r15, %rdi
movq %r12, %rsi
callq 0x2280
xorpd %xmm0, %xmm0
movapd %xmm0, 0x120(%rsp)
andq $0x0, 0x130(%rsp)
leaq 0x160(%rsp), %rdi
movq %r15, %rsi
callq 0x42ca
leaq 0x100(%rsp), %rdi
leaq 0x120(%rsp), %rsi
pushq $0x64
popq %rcx
movl %ecx, %edx
callq *(%rax)
movq 0x120(%rsp), %rbp
movq 0x128(%rsp), %r13
leaq 0x1f0(%rsp), %rdi
movq %r15, %rsi
callq 0x4352
subq %rbp, %r13
sarq $0x5, %r13
subq 0x8(%rsp), %r13
addq %r13, (%rax)
leaq 0x120(%rsp), %rdi
callq 0x4330
movq %r15, %rdi
callq 0x20f0
addq $0x20, %r12
movq 0x90(%rsp), %r13
jmp 0x3722
leaq 0x100(%rsp), %rdi
callq 0x4e4a
incq %r13
leaq 0xa8(%rsp), %rbp
jmp 0x3619
incq %rbx
jmp 0x35ff
movq 0x80(%rsp), %rax
incq %rax
jmp 0x35de
cmpq $0x0, 0x1b8(%rsp)
je 0x3838
movq 0x97b4(%rip), %rdi      # 0xcfc8
leaq 0x4d88(%rip), %rsi      # 0x85a3
callq 0x2210
leaq 0x1b0(%rsp), %rsi
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2110
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
cmpq $0x21, %rax
jb 0x38ab
movq 0x9779(%rip), %rdi      # 0xcfc8
leaq 0x4d81(%rip), %rsi      # 0x85d7
callq 0x2210
leaq 0x140(%rsp), %rsi
movq %rax, %rdi
callq 0x21f0
leaq 0x4d81(%rip), %rsi      # 0x85f3
movq %rax, %rdi
callq 0x2210
jmp 0x38ce
movq 0x178(%rsp), %r14
leaq 0x10(%rsp), %rbx
cmpq %r15, %r14
je 0x3230
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x4296
movq %r14, %rdi
callq 0x2170
movq %rax, %r14
jmp 0x3889
movq 0x9716(%rip), %rdi      # 0xcfc8
leaq 0x4d1e(%rip), %rsi      # 0x85d7
callq 0x2210
leaq 0x140(%rsp), %rsi
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2110
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0xd0(%rsp), %r13
leaq 0x1f0(%rsp), %rbp
leaq 0x100(%rsp), %r14
leaq 0x378(%rsp), %r15
cmpq 0x70(%rsp), %rsi
je 0x3b2a
leaq 0x30(%rsp), %rdi
movq %rsi, 0x8(%rsp)
callq 0x2280
movq 0x96a2(%rip), %rdi      # 0xcfc8
leaq 0x4cd1(%rip), %rsi      # 0x85fe
callq 0x2210
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x21f0
movq %rax, %rdi
callq 0x2110
xorpd %xmm0, %xmm0
movapd %xmm0, 0xb0(%rsp)
andq $0x0, 0xc0(%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x42ca
leaq 0x190(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl 0x90(%rsp), %edx
movl 0x78(%rsp), %ecx
callq *(%rax)
movq 0x9635(%rip), %rdi      # 0xcfc8
leaq 0x4c80(%rip), %rsi      # 0x861a
callq 0x2210
movq 0xb8(%rsp), %rsi
subq 0xb0(%rsp), %rsi
sarq $0x5, %rsi
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
leaq 0x4c60(%rip), %rsi      # 0x8625
callq 0x2210
movq %rax, %rdi
callq 0x2110
movq %r13, %rdi
leaq 0x140(%rsp), %rsi
callq 0x2280
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
cmpq $0x21, %rax
jb 0x39ff
movq %r13, %rdi
leaq 0x30(%rsp), %rsi
callq 0x2370
movq 0xd0(%rsp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x2100
testl %eax, %eax
jne 0x3b19
pushq $0x1
popq %r12
xorl %ebx, %ebx
leaq -0x1(%r12), %rax
movq 0xb8(%rsp), %rcx
subq 0xb0(%rsp), %rcx
sarq $0x5, %rcx
cmpq %rcx, %rax
jae 0x3aec
movq %rbp, %rdi
callq 0x2180
leaq 0x200(%rsp), %rdi
movq %r13, %rsi
callq 0x21f0
movq %rax, %rdi
leaq 0x4bdc(%rip), %rsi      # 0x863f
callq 0x2210
movq %rax, %rdi
movq %r12, %rsi
callq 0x2160
movq %rax, %rdi
leaq 0x4bc4(%rip), %rsi      # 0x8641
callq 0x2210
movq %r14, %rdi
movl 0x90(%rsp), %esi
movl 0x78(%rsp), %edx
movl $0xffffff, %ecx         # imm = 0xFFFFFF
callq 0x5760
movq 0xb0(%rsp), %rdi
addq %rbx, %rdi
movq %r14, %rsi
callq 0x5f20
movq %r15, %rdi
leaq 0x208(%rsp), %rsi
callq 0x22e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x5848
movq %r15, %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x57ba
movq %rbp, %rdi
callq 0x21a0
addq $0x20, %rbx
incq %r12
jmp 0x3a1f
movq %r13, %rdi
callq 0x20f0
leaq 0xb0(%rsp), %rdi
callq 0x4330
leaq 0x30(%rsp), %rdi
callq 0x20f0
movq 0x8(%rsp), %rsi
addq $0x20, %rsi
jmp 0x3905
leaq 0x4b19(%rip), %rdi      # 0x8639
callq 0x21d0
jmp 0x3a19
leaq 0x190(%rsp), %rdi
callq 0x4e4a
movq $0x0, 0x8(%rsp)
jmp 0x3430
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r12
imulq $0x14, 0x68(%rsp), %rax
movq %rax, %xmm0
punpckldq 0x44de(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x44e6(%rip), %xmm0     # 0x8050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x90(%rsp)
leaq 0xb0(%rsp), %r14
leaq 0x1f0(%rsp), %r13
leaq 0x4b40(%rip), %rbp      # 0x86d6
cmpq %r12, %rbx
je 0x3c29
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2280
movq 0x9417(%rip), %rdi      # 0xcfc8
movq %r14, %rsi
callq 0x21f0
movq %rax, %rdi
leaq 0x4963(%rip), %rsi      # 0x8526
callq 0x2210
movq %rax, %r15
movq %r13, %rdi
movq %r14, %rsi
callq 0x4352
movq (%rax), %rsi
movq %r15, %rdi
callq 0x2200
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2210
movq %rax, %r15
movq %r13, %rdi
movq %r14, %rsi
callq 0x4352
cvtsi2sdq (%rax), %xmm0
divsd 0x90(%rsp), %xmm0
movq %r15, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x20f0
addq $0x20, %rbx
jmp 0x3b96
leaq 0x1f0(%rsp), %rdi
callq 0x4568
jmp 0x3b37
movq %rax, %rbx
leaq 0x398(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
jmp 0x3dbb
jmp 0x3e18
jmp 0x3e18
movq %rax, %rbx
leaq 0x3b8(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
jmp 0x3e18
jmp 0x3e10
movq %rax, %rbx
leaq 0x3d8(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
jmp 0x3dbb
jmp 0x3e18
movq %rax, %rbx
leaq 0x3f8(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
jmp 0x3dbb
jmp 0x3e18
jmp 0x3e18
movq %rax, %rbx
leaq 0x1f0(%rsp), %rdi
callq 0x21a0
jmp 0x3edf
movq %rax, %rbx
leaq 0x418(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
jmp 0x3d79
jmp 0x3dbb
jmp 0x3e18
jmp 0x3e18
jmp 0x3e10
jmp 0x3de0
movq %rax, %rbx
leaq 0x438(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
jmp 0x3e10
jmp 0x3dbb
jmp 0x3e18
jmp 0x3e18
movq %rax, %rbx
leaq 0x458(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
jmp 0x3e2f
jmp 0x3dbb
jmp 0x3e18
jmp 0x3e18
jmp 0x3e10
movq %rax, %rbx
leaq 0x478(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
jmp 0x3e0b
jmp 0x3de0
movq %rax, %rbx
jmp 0x3ed2
jmp 0x3d83
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x20f0
jmp 0x3ed2
jmp 0x3e18
jmp 0x3e18
jmp 0x3e10
jmp 0x3e18
jmp 0x3e10
jmp 0x3e18
jmp 0x3e10
jmp 0x3e18
jmp 0x3e10
jmp 0x3e10
movq %rax, %rbx
leaq 0x498(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
jmp 0x3e18
movq %rax, %rbx
jmp 0x3e82
movq %rax, %rbx
leaq 0x4b8(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
movq %rax, %rbx
jmp 0x3e8c
movq %rax, %rbx
leaq 0x1d0(%rsp), %rdi
jmp 0x3e02
jmp 0x3e18
movq %rax, %rbx
leaq 0x4d8(%rsp), %rdi
callq 0x20f0
jmp 0x3e1b
jmp 0x3e18
movq %rax, %rbx
jmp 0x3e75
movq %rax, %rbx
jmp 0x3edf
movq %rax, %rbx
leaq 0x1f0(%rsp), %rdi
callq 0x20f0
jmp 0x3edf
jmp 0x3e58
movq %rax, %rbx
jmp 0x3e68
movq %rax, %rbx
leaq 0x378(%rsp), %rdi
callq 0x20f0
jmp 0x3e49
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x57ba
jmp 0x3e5b
movq %rax, %rbx
leaq 0x1f0(%rsp), %rdi
callq 0x21a0
leaq 0xd0(%rsp), %rdi
callq 0x20f0
leaq 0xb0(%rsp), %rdi
callq 0x4330
leaq 0x30(%rsp), %rdi
callq 0x20f0
leaq 0x190(%rsp), %rdi
callq 0x4e4a
jmp 0x3edf
jmp 0x3ec2
jmp 0x3ec2
jmp 0x3ec2
jmp 0x3ec2
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0x4330
leaq 0xb0(%rsp), %rdi
callq 0x20f0
jmp 0x3ec5
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x4e4a
leaq 0x1f0(%rsp), %rdi
callq 0x4568
leaq 0x160(%rsp), %rdi
callq 0x45cc
leaq 0x10(%rsp), %rdi
callq 0x43c0
leaq 0x1b0(%rsp), %rdi
callq 0x20f0
leaq 0x140(%rsp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2330