// File: CMU-SAFARI[P]optimal-seed-solver/testHashTree.cc
// Function: main
int main(int argc, const char* argv[]) {
	HashTree tree;
	KmerHash hash;
	unsigned int DNAHash;
	unsigned int estLength;


	if (argc != 2 && argc != 3) {
		cerr << "Help:" << endl;
		cerr << "To generate the tree, please run: $ ./testHashTree referenceName.fasta treeName.tree" << endl;
		cerr << "To query the tree, please run: $ ./testHashTree treeName.tree" << endl;
		exit(1);
	}

	if (argc == 3) {
		tree.generateTree(argv[1]);
		tree.storeTree(argv[2]);
		exit(0);
	}
	tree.loadTree(argv[1]);
	hash.setKmerSize(tree.getHashLength() );

	while (1) {
		cout << "Please input mode: (f) frequency test; (s) seed test (a) average test (t) table test: " << endl;
		char option;
		cin >> option;
		string DNA;
		int threshold;
		int depth;
		int avgfreq;
		int index;
		switch (option) {
			case 's':

				cout << "please input DNA string: " << endl;
				cin >> DNA;

				cout << "please input threshold: " << endl;
				cin >> threshold;

				tree.test(DNA);
				tree.query(DNA, threshold);
				cout << "eff length: " << tree.effectiveLength() << " frequency: " << tree.frequency() << " isLeaf: " << tree.isLeaf() << endl;
				break;

			case 'f':

				cout << "please input DNA string: " << endl;
				cin >> DNA;

				cout << "please input threshold: " << endl;
				cin >> threshold;

				DNAHash = hash.calculateHash(DNA, tree.getHashLength() );
				cout << "DNA Hash: " << DNAHash << endl;
				estLength = tree.estimateFreqLength(DNAHash, threshold/*, DNA*/);
				cout << "Estimated extension length to achieve " << threshold << " locations of DNA " << DNA << " is " << estLength << endl;
				break;

			case 'a':
				cout << "please tree hash: " << endl;
				cin >> index;

				cout << "please input depth: " << endl;
				cin >> depth;

				avgfreq = tree.averageFreqDepth(index, depth);
				cout << "Average weighted frequency at depth " << depth << " is " << avgfreq << endl;
				break;

			case 't':
				cout << "Testing table generation." << endl;

				cout << "Calculating table." << endl;
				tree.calculateLenToFreqTable();

				cout << "Printing Table." << endl;
				tree.printHashLenTable("table.txt");

				cout << "Storing table." << endl;
				tree.storeHashLenTable("table.tb");

				cout << "Loading table." << endl;
				tree.readHashLenTable("table.tb");

				cout << "Printing table." << endl;
				tree.printHashLenTable("table2.txt");
				break;

			default:
				cout << "Unrecognized option" << endl;
				break;
		}
	}

	return 0;
}

// Assembly:
subq $0x6b8, %rsp            # imm = 0x6B8
movl $0x0, 0x6b4(%rsp)
movl %edi, 0x6b0(%rsp)
movq %rsi, 0x6a8(%rsp)
leaq 0x350(%rsp), %rdi
movl $0xa, %esi
movl $0x1e, %edx
callq 0x5160
leaq 0x348(%rsp), %rdi
callq 0x11140
jmp 0x3857
cmpl $0x2, 0x6b0(%rsp)
je 0x3948
cmpl $0x3, 0x6b0(%rsp)
je 0x3948
movq 0x15776(%rip), %rdi     # 0x18ff0
leaq 0xe7d3(%rip), %rsi      # 0x12054
callq 0x3280
movq %rax, 0x1a0(%rsp)
jmp 0x3890
movq 0x1a0(%rsp), %rdi
movq 0x15719(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x38a6
movq 0x15743(%rip), %rdi     # 0x18ff0
leaq 0xe7a6(%rip), %rsi      # 0x1205a
callq 0x3280
movq %rax, 0x198(%rsp)
jmp 0x38c3
movq 0x198(%rsp), %rdi
movq 0x156e6(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x38d9
movq 0x15710(%rip), %rdi     # 0x18ff0
leaq 0xe7c8(%rip), %rsi      # 0x120af
callq 0x3280
movq %rax, 0x190(%rsp)
jmp 0x38f6
movq 0x190(%rsp), %rdi
movq 0x156b3(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x390c
movl $0x1, %edi
callq 0x3360
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0x4662
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0x4655
cmpl $0x3, 0x6b0(%rsp)
jne 0x3ae1
movq 0x6a8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x180(%rsp)
leaq 0x30f(%rsp), %rdi
movq %rdi, 0x188(%rsp)
callq 0x3590
movq 0x180(%rsp), %rsi
movq 0x188(%rsp), %rdx
leaq 0x310(%rsp), %rdi
callq 0x4680
jmp 0x399e
leaq 0x350(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x6400
jmp 0x39b5
leaq 0x310(%rsp), %rdi
callq 0x31b0
leaq 0x30f(%rsp), %rdi
callq 0x32f0
movq 0x6a8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x170(%rsp)
leaq 0x2e7(%rsp), %rdi
movq %rdi, 0x178(%rsp)
callq 0x3590
movq 0x170(%rsp), %rsi
movq 0x178(%rsp), %rdx
leaq 0x2e8(%rsp), %rdi
callq 0x4680
jmp 0x3a17
leaq 0x350(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0x87d0
jmp 0x3a2e
leaq 0x2e8(%rsp), %rdi
callq 0x31b0
leaq 0x2e7(%rsp), %rdi
callq 0x32f0
xorl %edi, %edi
callq 0x3360
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0x3a86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x310(%rsp), %rdi
callq 0x31b0
leaq 0x30f(%rsp), %rdi
callq 0x32f0
jmp 0x4655
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0x3acf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x2e8(%rsp), %rdi
callq 0x31b0
leaq 0x2e7(%rsp), %rdi
callq 0x32f0
jmp 0x4655
movq 0x6a8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x160(%rsp)
leaq 0x2bf(%rsp), %rdi
movq %rdi, 0x168(%rsp)
callq 0x3590
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
leaq 0x2c0(%rsp), %rdi
callq 0x4680
jmp 0x3b29
leaq 0x350(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
callq 0x8af0
jmp 0x3b40
leaq 0x2c0(%rsp), %rdi
callq 0x31b0
leaq 0x2bf(%rsp), %rdi
callq 0x32f0
leaq 0x350(%rsp), %rdi
callq 0x6860
movl %eax, 0x15c(%rsp)
jmp 0x3b70
movl 0x15c(%rsp), %esi
leaq 0x348(%rsp), %rdi
callq 0x11310
jmp 0x3b86
jmp 0x3b88
jmp 0x3b8a
movq 0x15437(%rip), %rdi     # 0x18fc8
leaq 0xe555(%rip), %rsi      # 0x120ed
callq 0x3280
movq %rax, 0x150(%rsp)
jmp 0x3ba7
movq 0x150(%rsp), %rdi
movq 0x15402(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x3bbd
movq 0x15414(%rip), %rdi     # 0x18fd8
leaq 0x2be(%rsp), %rsi
callq 0x3410
jmp 0x3bd3
leaq 0x298(%rsp), %rdi
callq 0x3450
movsbl 0x2be(%rsp), %eax
addl $-0x61, %eax
movl %eax, %ecx
movq %rcx, 0x148(%rsp)
subl $0x13, %eax
ja 0x4609
movq 0x148(%rsp), %rax
leaq 0xe3f7(%rip), %rcx      # 0x12004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0x3c4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x31b0
leaq 0x2bf(%rsp), %rdi
callq 0x32f0
jmp 0x4655
movq 0x15362(%rip), %rdi     # 0x18fc8
leaq 0xe4d7(%rip), %rsi      # 0x12144
callq 0x3280
movq %rax, 0x140(%rsp)
jmp 0x3c7c
movq 0x140(%rsp), %rdi
movq 0x1532d(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x3c92
movq 0x1533f(%rip), %rdi     # 0x18fd8
leaq 0x298(%rsp), %rsi
callq 0x33c0
jmp 0x3ca8
movq 0x15319(%rip), %rdi     # 0x18fc8
leaq 0xe4a8(%rip), %rsi      # 0x1215e
callq 0x3280
movq %rax, 0x138(%rsp)
jmp 0x3cc5
movq 0x138(%rsp), %rdi
movq 0x152e4(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x3cdb
movq 0x152f6(%rip), %rdi     # 0x18fd8
leaq 0x294(%rsp), %rsi
callq 0x31a0
jmp 0x3cf1
leaq 0x268(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x3140
jmp 0x3d08
leaq 0x350(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x8060
jmp 0x3d1f
leaq 0x268(%rsp), %rdi
callq 0x31b0
leaq 0x248(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x3140
jmp 0x3d43
movl 0x294(%rsp), %edx
leaq 0x350(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x6880
jmp 0x3d61
leaq 0x248(%rsp), %rdi
callq 0x31b0
movq 0x15253(%rip), %rdi     # 0x18fc8
leaq 0xe3fb(%rip), %rsi      # 0x12177
callq 0x3280
movq %rax, 0x130(%rsp)
jmp 0x3d8b
leaq 0x350(%rsp), %rdi
callq 0x6ac0
movl %eax, 0x12c(%rsp)
jmp 0x3da1
movl 0x12c(%rsp), %esi
movq 0x130(%rsp), %rdi
callq 0x3420
movq %rax, 0x120(%rsp)
jmp 0x3dbf
movq 0x120(%rsp), %rdi
leaq 0xe905(%rip), %rsi      # 0x126d3
callq 0x3280
movq %rax, 0x118(%rsp)
jmp 0x3ddd
leaq 0x350(%rsp), %rdi
callq 0x6ae0
movl %eax, 0x114(%rsp)
jmp 0x3df3
movl 0x114(%rsp), %esi
movq 0x118(%rsp), %rdi
callq 0x3420
movq %rax, 0x108(%rsp)
jmp 0x3e11
movq 0x108(%rsp), %rdi
leaq 0xe364(%rip), %rsi      # 0x12184
callq 0x3280
movq %rax, 0x100(%rsp)
jmp 0x3e2f
leaq 0x350(%rsp), %rdi
callq 0x6b30
movb %al, 0xff(%rsp)
jmp 0x3e45
movq 0x100(%rsp), %rdi
movb 0xff(%rsp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0x35a0
movq %rax, 0xf0(%rsp)
jmp 0x3e69
movq 0xf0(%rsp), %rdi
movq 0x15140(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x3e7f
jmp 0x4636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0x4648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x268(%rsp), %rdi
callq 0x31b0
jmp 0x4648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x248(%rsp), %rdi
callq 0x31b0
jmp 0x4648
movq 0x150d8(%rip), %rdi     # 0x18fc8
leaq 0xe24d(%rip), %rsi      # 0x12144
callq 0x3280
movq %rax, 0xe8(%rsp)
jmp 0x3f06
movq 0xe8(%rsp), %rdi
movq 0x150a3(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x3f1c
movq 0x150b5(%rip), %rdi     # 0x18fd8
leaq 0x298(%rsp), %rsi
callq 0x33c0
jmp 0x3f32
movq 0x1508f(%rip), %rdi     # 0x18fc8
leaq 0xe21e(%rip), %rsi      # 0x1215e
callq 0x3280
movq %rax, 0xe0(%rsp)
jmp 0x3f4f
movq 0xe0(%rsp), %rdi
movq 0x1505a(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x3f65
movq 0x1506c(%rip), %rdi     # 0x18fd8
leaq 0x294(%rsp), %rsi
callq 0x31a0
jmp 0x3f7b
leaq 0x350(%rsp), %rdi
callq 0x6860
movl %eax, 0xdc(%rsp)
jmp 0x3f91
movl 0xdc(%rsp), %edx
leaq 0x348(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x11190
movl %eax, 0xd8(%rsp)
jmp 0x3fb6
movl 0xd8(%rsp), %eax
movl %eax, 0x338(%rsp)
movq 0x14ffd(%rip), %rdi     # 0x18fc8
leaq 0xe1bc(%rip), %rsi      # 0x1218e
callq 0x3280
movq %rax, 0xd0(%rsp)
jmp 0x3fe1
movq 0xd0(%rsp), %rdi
movl 0x338(%rsp), %esi
callq 0x3420
movq %rax, 0xc8(%rsp)
jmp 0x3fff
movq 0xc8(%rsp), %rdi
movq 0x14faa(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x4015
movl 0x338(%rsp), %esi
movl 0x294(%rsp), %edx
leaq 0x350(%rsp), %rdi
callq 0x6b50
movl %eax, 0xc4(%rsp)
jmp 0x4039
movl 0xc4(%rsp), %eax
movl %eax, 0x334(%rsp)
movq 0x14f7a(%rip), %rdi     # 0x18fc8
leaq 0xe144(%rip), %rsi      # 0x12199
callq 0x3280
movq %rax, 0xb8(%rsp)
jmp 0x4064
movq 0xb8(%rsp), %rdi
movl 0x294(%rsp), %esi
callq 0x3560
movq %rax, 0xb0(%rsp)
jmp 0x4082
movq 0xb0(%rsp), %rdi
leaq 0xe12f(%rip), %rsi      # 0x121c0
callq 0x3280
movq %rax, 0xa8(%rsp)
jmp 0x40a0
movq 0xa8(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x3260
movq %rax, 0xa0(%rsp)
jmp 0x40bf
movq 0xa0(%rsp), %rdi
leaq 0xe105(%rip), %rsi      # 0x121d3
callq 0x3280
movq %rax, 0x98(%rsp)
jmp 0x40dd
movq 0x98(%rsp), %rdi
movl 0x334(%rsp), %esi
callq 0x3420
movq %rax, 0x90(%rsp)
jmp 0x40fb
movq 0x90(%rsp), %rdi
movq 0x14eae(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x4111
jmp 0x4636
movq 0x14eab(%rip), %rdi     # 0x18fc8
leaq 0xe0b4(%rip), %rsi      # 0x121d8
callq 0x3280
movq %rax, 0x88(%rsp)
jmp 0x4133
movq 0x88(%rsp), %rdi
movq 0x14e76(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x4149
movq 0x14e88(%rip), %rdi     # 0x18fd8
leaq 0x288(%rsp), %rsi
callq 0x31a0
jmp 0x415f
movq 0x14e62(%rip), %rdi     # 0x18fc8
leaq 0xe07e(%rip), %rsi      # 0x121eb
callq 0x3280
movq %rax, 0x80(%rsp)
jmp 0x417c
movq 0x80(%rsp), %rdi
movq 0x14e2d(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x4192
movq 0x14e3f(%rip), %rdi     # 0x18fd8
leaq 0x290(%rsp), %rsi
callq 0x31a0
jmp 0x41a8
movl 0x288(%rsp), %esi
movl 0x290(%rsp), %edx
leaq 0x350(%rsp), %rdi
callq 0x6db0
movl %eax, 0x7c(%rsp)
jmp 0x41c9
movl 0x7c(%rsp), %eax
movl %eax, 0x28c(%rsp)
movq 0x14ded(%rip), %rdi     # 0x18fc8
leaq 0xe01e(%rip), %rsi      # 0x12200
callq 0x3280
movq %rax, 0x70(%rsp)
jmp 0x41ee
movq 0x70(%rsp), %rdi
movl 0x290(%rsp), %esi
callq 0x3560
movq %rax, 0x68(%rsp)
jmp 0x4206
movq 0x68(%rsp), %rdi
leaq 0xdfc1(%rip), %rsi      # 0x121d3
callq 0x3280
movq %rax, 0x60(%rsp)
jmp 0x421e
movq 0x60(%rsp), %rdi
movl 0x28c(%rsp), %esi
callq 0x3560
movq %rax, 0x58(%rsp)
jmp 0x4236
movq 0x58(%rsp), %rdi
movq 0x14d76(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x4249
jmp 0x4636
movq 0x14d73(%rip), %rdi     # 0x18fc8
leaq 0xdfc9(%rip), %rsi      # 0x12225
callq 0x3280
movq %rax, 0x50(%rsp)
jmp 0x4268
movq 0x50(%rsp), %rdi
movq 0x14d44(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x427b
movq 0x14d46(%rip), %rdi     # 0x18fc8
leaq 0xdfb6(%rip), %rsi      # 0x1223f
callq 0x3280
movq %rax, 0x48(%rsp)
jmp 0x4295
movq 0x48(%rsp), %rdi
movq 0x14d17(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x42a8
leaq 0x350(%rsp), %rdi
callq 0x6ff0
jmp 0x42b7
movq 0x14d0a(%rip), %rdi     # 0x18fc8
leaq 0xdf8d(%rip), %rsi      # 0x12252
callq 0x3280
movq %rax, 0x40(%rsp)
jmp 0x42d1
movq 0x40(%rsp), %rdi
movq 0x14cdb(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x42e4
leaq 0x227(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x3590
movq 0x38(%rsp), %rdx
leaq 0xdf60(%rip), %rsi      # 0x12262
leaq 0x228(%rsp), %rdi
callq 0x4680
jmp 0x4311
leaq 0x350(%rsp), %rdi
leaq 0x228(%rsp), %rsi
callq 0x71d0
jmp 0x4328
leaq 0x228(%rsp), %rdi
callq 0x31b0
leaq 0x227(%rsp), %rdi
callq 0x32f0
movq 0x14c7f(%rip), %rdi     # 0x18fc8
leaq 0xdf1c(%rip), %rsi      # 0x1226c
callq 0x3280
movq %rax, 0x30(%rsp)
jmp 0x435c
movq 0x30(%rsp), %rdi
movq 0x14c50(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x436f
leaq 0x1ff(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x3590
movq 0x28(%rsp), %rdx
leaq 0xdeee(%rip), %rsi      # 0x1227b
leaq 0x200(%rsp), %rdi
callq 0x4680
jmp 0x439c
leaq 0x350(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x73d0
jmp 0x43b3
leaq 0x200(%rsp), %rdi
callq 0x31b0
leaq 0x1ff(%rsp), %rdi
callq 0x32f0
movq 0x14bf4(%rip), %rdi     # 0x18fc8
leaq 0xdea9(%rip), %rsi      # 0x12284
callq 0x3280
movq %rax, 0x20(%rsp)
jmp 0x43e7
movq 0x20(%rsp), %rdi
movq 0x14bc5(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x43fa
leaq 0x1d7(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x3590
movq 0x18(%rsp), %rdx
leaq 0xde63(%rip), %rsi      # 0x1227b
leaq 0x1d8(%rsp), %rdi
callq 0x4680
jmp 0x4427
leaq 0x350(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x75b0
jmp 0x443e
leaq 0x1d8(%rsp), %rdi
callq 0x31b0
leaq 0x1d7(%rsp), %rdi
callq 0x32f0
movq 0x14b69(%rip), %rdi     # 0x18fc8
leaq 0xde2d(%rip), %rsi      # 0x12293
callq 0x3280
movq %rax, 0x10(%rsp)
jmp 0x4472
movq 0x10(%rsp), %rdi
movq 0x14b3a(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x4485
leaq 0x1af(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x3590
movq 0x8(%rsp), %rdx
leaq 0xde00(%rip), %rsi      # 0x122a3
leaq 0x1b0(%rsp), %rdi
callq 0x4680
jmp 0x44b2
leaq 0x350(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x71d0
jmp 0x44c9
leaq 0x1b0(%rsp), %rdi
callq 0x31b0
leaq 0x1af(%rsp), %rdi
callq 0x32f0
jmp 0x4636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0x451f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x228(%rsp), %rdi
callq 0x31b0
leaq 0x227(%rsp), %rdi
callq 0x32f0
jmp 0x4648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0x4568
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x200(%rsp), %rdi
callq 0x31b0
leaq 0x1ff(%rsp), %rdi
callq 0x32f0
jmp 0x4648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0x45b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x1d8(%rsp), %rdi
callq 0x31b0
leaq 0x1d7(%rsp), %rdi
callq 0x32f0
jmp 0x4648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0x45fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x31b0
leaq 0x1af(%rsp), %rdi
callq 0x32f0
jmp 0x4648
movq 0x149b8(%rip), %rdi     # 0x18fc8
leaq 0xdc97(%rip), %rsi      # 0x122ae
callq 0x3280
movq %rax, (%rsp)
jmp 0x4622
movq (%rsp), %rdi
movq 0x1498b(%rip), %rsi     # 0x18fb8
callq 0x32d0
jmp 0x4634
jmp 0x4636
leaq 0x298(%rsp), %rdi
callq 0x31b0
jmp 0x3b88
leaq 0x298(%rsp), %rdi
callq 0x31b0
leaq 0x348(%rsp), %rdi
callq 0x112d0
leaq 0x350(%rsp), %rdi
callq 0x5310
movq 0x340(%rsp), %rdi
callq 0x3580
nopl (%rax)