// File: /workspace/github_cpp_makefile_star2_O2/scattana[P]Crossword-Anagram-CPP/crossword.cpp
// Function: main
int main(int argc, char *argv[]){
	// display welcome message
	cout << "\n\n------------------------------------------------" << endl;
	cout << "Welcome to the Crossword Anagram Puzzle Program" << endl;
	cout << "------------------------------------------------\n\n" << endl;
	// create a vector list of strings either from user input
	// or from a text file passed at command line
	vector<string> list;
	string temp;

	if(argc == 1) {
		// create vector<string> list from user input
		cout << "Entering manual input mode" << endl;
		cout << "Instructions: Enter  a list of up to 20 words, max 15";
		cout << " letters each.\nType RETURN after each word, and enter a period";
		cout << " '.' after the final word:" << endl;
		getline(cin, temp);
		while(temp[0] != '.'){
			if(list.size()==20){
				cout << "--------------------------------------------" << endl;
				cout << "20 words have been placed - Maximum Reached" << endl;
				cout << "--------------------------------------------" << endl;
				cout << "\n" << endl;
				break;
			}
			if(checkForLetters(temp)){
				list.push_back(temp);
			}
			else{
				cout << "Error: " << temp << " is not a valid word";
				cout << " or has too many letters (max 15)" << endl;
			}

			getline(cin, temp);
		}

		cout << "\nThank you, the list has been saved.\n" << endl;
	}
	if(argc==2 || argc==3) {
		// read data file from argument and create vector<string> list
		ifstream ifs;
		string file = argv[1];
		ifs.open(file);

		// check for valid file; if not valid, prompt for valid file or exit
		while(!ifs){
			cout << "\nInvalid file name. Please enter valid file, ";
			cout << "or type 'quit' to exit the program: " << endl;
			getline(cin, file);
			if(file=="quit"||file=="Quit"||file=="QUIT"){
				return 1;
			}
			ifs.open(file);
		}

		// populate list from file
		while(ifs.peek() != '.'){
			if(list.size()==20){
				cout << "--------------------------------------------" << endl;
				cout << "20 words have been placed - Maximum Reached" << endl;
				cout << "--------------------------------------------" << endl;
				cout << "\n" << endl;
				break;
			}
			getline(ifs, temp, '\n');
			if(checkForLetters(temp)){
				list.push_back(temp);
			}
			else{
				cout << "Error: " << temp << " is not a valid word";
				cout << " or has too many letters (max 15)" << endl;
			}
		}
	}

	// create Board object
	Board board;

	// sort list and make all capital
	sortHighLow(list);
	makeCaps(list);

	// print list in sorted order
	cout << "\nHere's the list of words to be placed: " << endl;
	cout << "--------------------------------------" << endl;
	for(int a=0; a<list.size(); a++){
		cout << list[a] << endl;
	}
	cout << endl;

	// place list on board
	board.placeList(list);

	// print solution board
	cout << "---------------------------------------------" << endl;
	cout << "Your crossword puzzle has been generated!" << endl;
	cout << "Here's the solution:\n" << endl;
	board.printBoard();

	// print "disguised" crossword
	cout << "\n\nHere's the hidden crossword puzzle:\n" << endl;
	board.printHidden();

	// generate and display clues (anagrams)
	cout<<"\n\nHere are the clues! Each clue is an anagram of its solution\n"<<endl;
	for(int s=0; s<list.size(); s++){
		random_shuffle(list[s].begin(), list[s].end());
	}

	for(int t=0; t<list.size(); t++){
		if(list[t][0] != ' '){
			cout << "Row: "<<board.getRowLoc(t)<<", Column: "<<board.getColLoc(t);
			cout << "\t" << board.getDir(t);
			cout << "\t\t" << list[t] << endl;
		}
	}

	// lastly, if 3 arguments are provided at the command line, output
	// the words, solution, crossword, and clues to the file
	if(argc==3){
		ofstream ofs;
		string fileout = argv[2];
		ofs.open(fileout);
		if(!ofs){
			cout << "\n-------------------------------------" << endl;
			cout << "Error: Could not open file '" << fileout << "'" << endl;
			cout << "-------------------------------------\n" << endl;
		}

		ofs << "\n-----------------------------" << endl;
		ofs << "   CROSSWORD PUZZLE SOLUTION   " << endl;
		ofs << "-----------------------------\n" << endl;
		// output to file the solution board
		for(int i=0; i<15; i++){
			for(int j=0; j<15; j++){
				ofs << board.getSpot(i,j) << " ";
			}
			ofs << endl;
		}
		ofs << "\n\n" << endl;

		// output to file the  hidden board
		ofs << "\n-----------------------------" << endl;
		ofs << "  GENERATED CROSSWORD PUZZLE   " << endl;
		ofs << "-----------------------------\n" << endl;
		for(int i=0; i<15; i++){
			for(int j=0; j<15; j++){
				if(board.getSpot(i,j)=='_') ofs << "# ";
				else ofs << "_ ";
			}
			ofs << endl;
		}
		ofs << "\n\n" << endl;

		// lastly, output to file the anagram clues
		ofs << "Here are the clues! Each clue is an anagram of its solution" << endl;
		ofs <<"-----------------------------------------------------------" << endl;
		for(int t=0; t<list.size(); t++){
			if(list[t][0] != ' '){
				ofs << "Row: "<<board.getRowLoc(t)<<", Column: "<<board.getColLoc(t);
				ofs << "\t\t" << board.getDir(t);
				ofs << "\t\t" << list[t] << endl;
			}
		}

		ofs.close();
	} // end of "if(argc==3)" statement

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6d8, %rsp            # imm = 0x6D8
movq %rsi, -0x50(%rbp)
movl %edi, %r14d
movq 0x3bd2(%rip), %rbx      # 0x5fd0
leaq 0x1bff(%rip), %rsi      # 0x4004
movq %rbx, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq 0x1c1b(%rip), %rsi      # 0x4037
movq %rbx, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq 0x1c34(%rip), %rsi      # 0x4067
movq %rbx, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
andq $0x0, -0x30(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movb $0x0, (%rax)
movl %r14d, -0x44(%rbp)
cmpl $0x1, %r14d
jne 0x261b
movq 0x3b5c(%rip), %rdi      # 0x5fd0
leaq 0x1c1f(%rip), %rsi      # 0x409a
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x3b41(%rip), %rdi      # 0x5fd0
leaq 0x1c1f(%rip), %rsi      # 0x40b5
callq 0x2160
movq 0x3b2e(%rip), %rdi      # 0x5fd0
leaq 0x1c42(%rip), %rsi      # 0x40eb
callq 0x2160
movq 0x3b1b(%rip), %rdi      # 0x5fd0
leaq 0x1c6e(%rip), %rsi      # 0x412a
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x3b10(%rip), %rdi      # 0x5fe0
leaq -0x70(%rbp), %rsi
callq 0x2030
leaq -0x2f0(%rbp), %rbx
leaq -0x70(%rbp), %r14
movq 0x3af5(%rip), %r12      # 0x5fe0
movq 0x3ade(%rip), %r13      # 0x5fd0
movq -0x70(%rbp), %rax
cmpb $0x2e, (%rax)
je 0x2600
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
cmpq $0x280, %rax            # imm = 0x280
je 0x2594
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x2f8d
movl %eax, %r15d
movq %rbx, %rdi
callq 0x20c0
testb %r15b, %r15b
je 0x2544
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x312e
jmp 0x2584
movq %r13, %rdi
leaq 0x1c23(%rip), %rsi      # 0x4171
callq 0x2160
movq %rax, %rdi
movq %r14, %rsi
callq 0x2140
movq %rax, %rdi
leaq 0x1c11(%rip), %rsi      # 0x4179
callq 0x2160
movq %r13, %rdi
leaq 0x1c17(%rip), %rsi      # 0x418e
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq %r12, %rdi
movq %r14, %rsi
callq 0x2030
jmp 0x24f2
movq 0x3a35(%rip), %rdi      # 0x5fd0
leaq 0x1a68(%rip), %rsi      # 0x400a
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x3a1a(%rip), %rdi      # 0x5fd0
leaq 0x1b88(%rip), %rsi      # 0x4145
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x39ff(%rip), %rdi      # 0x5fd0
leaq 0x1a32(%rip), %rsi      # 0x400a
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x39e4(%rip), %rdi      # 0x5fd0
leaq 0x1aa5(%rip), %rsi      # 0x4098
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x39c9(%rip), %rdi      # 0x5fd0
leaq 0x1ba2(%rip), %rsi      # 0x41b0
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movl -0x44(%rbp), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x287e
leaq -0x700(%rbp), %rdi
callq 0x2180
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x2b0(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x20a0
leaq -0x700(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x2120
movq 0x3962(%rip), %rbx      # 0x5fd0
leaq -0x2b0(%rbp), %r14
leaq 0x1bad(%rip), %r13      # 0x4229
pushq $0x1
popq %r15
movq -0x700(%rbp), %rax
movq -0x18(%rax), %rax
movl -0x6e0(%rbp,%rax), %r12d
testb $0x5, %r12b
je 0x272a
movq %rbx, %rdi
leaq 0x1b2f(%rip), %rsi      # 0x41d6
callq 0x2160
movq %rbx, %rdi
leaq 0x1b4e(%rip), %rsi      # 0x4204
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x3916(%rip), %rdi      # 0x5fe0
movq %r14, %rsi
callq 0x2030
movq %r14, %rdi
movq %r13, %rsi
callq 0x3169
testb %al, %al
jne 0x285c
movq %r14, %rdi
leaq 0x1b3f(%rip), %rsi      # 0x422e
callq 0x3169
testb %al, %al
jne 0x285c
movq %r14, %rdi
leaq 0x1b2d(%rip), %rsi      # 0x4233
callq 0x3169
testb %al, %al
jne 0x285c
leaq -0x700(%rbp), %rdi
movq %r14, %rsi
pushq $0x8
popq %rdx
callq 0x2120
jmp 0x2680
leaq -0x700(%rbp), %rbx
leaq -0x70(%rbp), %r14
leaq -0x2d0(%rbp), %r13
movq %rbx, %rdi
callq 0x2090
xorl %r15d, %r15d
cmpl $0x2e, %eax
je 0x285c
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
cmpq $0x280, %rax            # imm = 0x280
je 0x27f0
movq %rbx, %rdi
movq %r14, %rsi
pushq $0xa
popq %rdx
callq 0x2240
movq %r13, %rdi
movq %r14, %rsi
callq 0x21b0
movq %r13, %rdi
callq 0x2f8d
movl %eax, %r15d
movq %r13, %rdi
callq 0x20c0
testb %r15b, %r15b
je 0x27a3
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x312e
jmp 0x273c
movq 0x3826(%rip), %rdi      # 0x5fd0
leaq 0x19c0(%rip), %rsi      # 0x4171
callq 0x2160
movq %rax, %rdi
movq %r14, %rsi
callq 0x2140
movq %rax, %rdi
leaq 0x19ae(%rip), %rsi      # 0x4179
callq 0x2160
movq 0x37f9(%rip), %rdi      # 0x5fd0
leaq 0x19b0(%rip), %rsi      # 0x418e
callq 0x2160
movq %rax, %rdi
callq 0x20e0
jmp 0x273c
movq 0x37d9(%rip), %rdi      # 0x5fd0
leaq 0x180c(%rip), %rsi      # 0x400a
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x37be(%rip), %rdi      # 0x5fd0
leaq 0x192c(%rip), %rsi      # 0x4145
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x37a3(%rip), %rdi      # 0x5fd0
leaq 0x17d6(%rip), %rsi      # 0x400a
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x3788(%rip), %rdi      # 0x5fd0
leaq 0x1849(%rip), %rsi      # 0x4098
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq -0x2b0(%rbp), %rdi
callq 0x20c0
leaq -0x700(%rbp), %rdi
callq 0x2040
testb $0x5, %r12b
jne 0x2eb2
leaq -0x700(%rbp), %rdi
callq 0x3428
leaq -0x40(%rbp), %rdi
callq 0x2fc8
leaq -0x40(%rbp), %rdi
callq 0x30c3
movq 0x372d(%rip), %rdi      # 0x5fd0
leaq 0x198e(%rip), %rsi      # 0x4238
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x3712(%rip), %rdi      # 0x5fd0
leaq 0x174b(%rip), %rsi      # 0x4010
callq 0x2160
movq %rax, %rdi
callq 0x20e0
xorl %r14d, %r14d
movq 0x36f4(%rip), %rbx      # 0x5fd0
xorl %r15d, %r15d
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x290f
addq %r14, %rsi
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20e0
incq %r15
addq $0x20, %r14
jmp 0x28df
movq 0x36ba(%rip), %rdi      # 0x5fd0
callq 0x20e0
leaq -0x700(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3658
movq 0x369e(%rip), %rdi      # 0x5fd0
leaq 0x16d0(%rip), %rsi      # 0x4009
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x3683(%rip), %rdi      # 0x5fd0
leaq 0x190d(%rip), %rsi      # 0x4261
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x3668(%rip), %rdi      # 0x5fd0
leaq 0x191c(%rip), %rsi      # 0x428b
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq -0x700(%rbp), %rdi
callq 0x352c
movq 0x3641(%rip), %rdi      # 0x5fd0
leaq 0x190b(%rip), %rsi      # 0x42a1
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq -0x700(%rbp), %rdi
callq 0x359a
movq 0x361a(%rip), %rdi      # 0x5fd0
leaq 0x190b(%rip), %rsi      # 0x42c8
callq 0x2160
movq %rax, %rdi
callq 0x20e0
pushq $0x8
popq %rbx
xorl %r14d, %r14d
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r14, %rdx
jbe 0x2a01
movq -0x8(%rax,%rbx), %rdi
movq (%rax,%rbx), %rsi
addq %rdi, %rsi
callq 0x3179
incq %r14
addq $0x20, %rbx
jmp 0x29d0
xorl %r15d, %r15d
leaq -0x700(%rbp), %r13
leaq -0x2b0(%rbp), %r12
xorl %r14d, %r14d
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r14, %rdx
jbe 0x2afc
movq (%rax,%r15), %rdx
cmpb $0x20, (%rdx)
je 0x2af0
movq 0x3594(%rip), %rdi      # 0x5fd0
leaq 0x18c4(%rip), %rsi      # 0x4307
callq 0x2160
movq %rax, %rbx
movq %r13, %rdi
movl %r14d, %esi
callq 0x3634
movq %rbx, %rdi
movl %eax, %esi
callq 0x2220
movq %rax, %rdi
leaq 0x18a3(%rip), %rsi      # 0x430d
callq 0x2160
movq %rax, %rbx
movq %r13, %rdi
movl %r14d, %esi
callq 0x3646
movq %rbx, %rdi
movl %eax, %esi
callq 0x2220
movq 0x3542(%rip), %rdi      # 0x5fd0
leaq 0x1884(%rip), %rsi      # 0x4319
callq 0x2160
movq %rax, %rbx
movq %r12, %rdi
movq %r13, %rsi
movl %r14d, %edx
callq 0x3bac
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2140
movq %r12, %rdi
callq 0x20c0
movq 0x350b(%rip), %rdi      # 0x5fd0
leaq 0x184c(%rip), %rsi      # 0x4318
callq 0x2160
movq -0x40(%rbp), %rsi
addq %r15, %rsi
movq %rax, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20e0
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
incq %r14
addq $0x20, %r15
jmp 0x2a15
cmpl $0x3, -0x44(%rbp)
jne 0x2ea3
leaq -0x2b0(%rbp), %rdi
callq 0x2210
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x20a0
leaq -0x2b0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x20d0
movq -0x2b0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x290(%rbp,%rax)
je 0x2bc7
movq 0x3471(%rip), %rdi      # 0x5fd0
leaq 0x17b5(%rip), %rsi      # 0x431b
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x3456(%rip), %rdi      # 0x5fd0
leaq 0x17c1(%rip), %rsi      # 0x4342
callq 0x2160
leaq -0x90(%rbp), %rsi
movq %rax, %rdi
callq 0x2140
leaq 0x17c1(%rip), %rsi      # 0x435d
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
movq 0x341d(%rip), %rdi      # 0x5fd0
leaq 0x17a5(%rip), %rsi      # 0x435f
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq 0x17b8(%rip), %rsi      # 0x4386
leaq -0x2b0(%rbp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq 0x17bc(%rip), %rsi      # 0x43a5
leaq -0x2b0(%rbp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq 0x1763(%rip), %rsi      # 0x4367
leaq -0x2b0(%rbp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
xorl %ebx, %ebx
leaq -0x2b0(%rbp), %r14
leaq -0x700(%rbp), %r15
leaq 0x17b4(%rip), %r12      # 0x43e3
cmpl $0xf, %ebx
je 0x2c71
xorl %r13d, %r13d
cmpl $0xf, %r13d
je 0x2c65
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x3b96
movsbl %al, %esi
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
movq %r12, %rsi
callq 0x2160
incl %r13d
jmp 0x2c37
movq %r14, %rdi
callq 0x20e0
incl %ebx
jmp 0x2c2f
leaq 0x141f(%rip), %rsi      # 0x4097
leaq -0x2b0(%rbp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq 0x16f3(%rip), %rsi      # 0x4386
leaq -0x2b0(%rbp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq 0x1717(%rip), %rsi      # 0x43c5
leaq -0x2b0(%rbp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq 0x169e(%rip), %rsi      # 0x4367
leaq -0x2b0(%rbp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
xorl %ebx, %ebx
leaq -0x2b0(%rbp), %r14
leaq -0x700(%rbp), %r15
leaq 0x16f1(%rip), %r13      # 0x43e5
cmpl $0xf, %ebx
je 0x2d36
xorl %r12d, %r12d
cmpl $0xf, %r12d
je 0x2d2a
movq %r15, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x3b96
movq %r13, %rsi
cmpb $0x5f, %al
je 0x2d1d
leaq 0x16cb(%rip), %rsi      # 0x43e8
movq %r14, %rdi
callq 0x2160
incl %r12d
jmp 0x2cfc
movq %r14, %rdi
callq 0x20e0
incl %ebx
jmp 0x2cf4
leaq 0x135a(%rip), %rsi      # 0x4097
leaq -0x2b0(%rbp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq 0x1693(%rip), %rsi      # 0x43eb
leaq -0x2b0(%rbp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
leaq 0x16b4(%rip), %rsi      # 0x4427
leaq -0x2b0(%rbp), %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20e0
xorl %r14d, %r14d
leaq -0x700(%rbp), %r15
leaq -0xb0(%rbp), %rbx
xorl %r12d, %r12d
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r12, %rcx
jbe 0x2e7f
movq (%rax,%r14), %rax
cmpb $0x20, (%rax)
je 0x2e73
leaq -0x2b0(%rbp), %rdi
leaq 0x1539(%rip), %rsi      # 0x4307
callq 0x2160
movq %rax, %r13
movq %r15, %rdi
movl %r12d, %esi
callq 0x3634
movq %r13, %rdi
movl %eax, %esi
callq 0x2220
movq %rax, %rdi
leaq 0x1518(%rip), %rsi      # 0x430d
callq 0x2160
movq %rax, %r13
movq %r15, %rdi
movl %r12d, %esi
callq 0x3646
movq %r13, %rdi
movl %eax, %esi
callq 0x2220
leaq -0x2b0(%rbp), %rdi
leaq 0x14f8(%rip), %rsi      # 0x4318
callq 0x2160
movq %rax, %r13
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x3bac
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x20c0
leaq -0x2b0(%rbp), %rdi
leaq 0x14c1(%rip), %rsi      # 0x4318
callq 0x2160
movq -0x40(%rbp), %rsi
addq %r14, %rsi
movq %rax, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20e0
incq %r12
addq $0x20, %r14
jmp 0x2d9b
leaq -0x2b0(%rbp), %rdi
callq 0x21c0
leaq -0x90(%rbp), %rdi
callq 0x20c0
leaq -0x2b0(%rbp), %rdi
callq 0x21e0
leaq -0x700(%rbp), %rdi
callq 0x3500
xorl %r15d, %r15d
leaq -0x70(%rbp), %rdi
callq 0x20c0
leaq -0x40(%rbp), %rdi
callq 0x31cc
movl %r15d, %eax
addq $0x6d8, %rsp            # imm = 0x6D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2f5b
jmp 0x2f45
movq %rax, %rbx
jmp 0x2f2c
jmp 0x2f3c
jmp 0x2f3c
jmp 0x2f1d
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x20c0
jmp 0x2f4f
jmp 0x2f4c
jmp 0x2f3c
jmp 0x2f4c
jmp 0x2f4c
jmp 0x2f4c
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
callq 0x20c0
jmp 0x2f67
jmp 0x2f45
jmp 0x2f1d
jmp 0x2f45
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
callq 0x20c0
leaq -0x700(%rbp), %rdi
callq 0x2040
jmp 0x2f73
jmp 0x2f45
movq %rax, %rbx
jmp 0x2f73
jmp 0x2f45
jmp 0x2f4c
movq %rax, %rbx
jmp 0x2f67
jmp 0x2f4c
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x20c0
leaq -0x2b0(%rbp), %rdi
callq 0x21e0
leaq -0x700(%rbp), %rdi
callq 0x3500
leaq -0x70(%rbp), %rdi
callq 0x20c0
leaq -0x40(%rbp), %rdi
callq 0x31cc
movq %rbx, %rdi
callq 0x2230