// File: sagarvare[P]reinforcement-learning-rock-paper-scissor/main.cpp
// Function: main
int main(){
	int R = 3;//Number of steps back you want to remember
	int tot_states = pow(3,R); //Note, the total states will increase if comps states are included
	int initialize_from_previous = 1;
	string filename_previous = "filename.txt";
	string filename_logs = "game_play.log";

	// char valid_input[] = {'R','P','S','E'};
	string valid_input = "EPRS";

	//valid game play input: PRS
	string valid_move = "PRS";


	// typedef pair<int, int> Key;
	map < pair<int,int> , float> graph_state; //Check syntax for mapping from pair to a single transition number
	vector<int> out2 = decimal_to_ternary(101);
	int break_flag = 0;
	int old_state, new_state;//These contain the state numbers
	int counter = 0;//Number of moves played

	deque<int>  state_queue; //Contains the current state , i.e. last R moves
	char user_input;
	//Maybe add an option of initializing the 
	// graph from an earlier saved graph if available
	
	if (initialize_from_previous == 1){
		//Start My graph from the previous
		//Read the input?? Figure out how to save a map to and from the filename.txt
		//Use this to check it out
		cout << "Initialization from stored logs **NOT SUPPORTED** .This is just a tester inplace. I will add initializing logic later on.";

		//Go through the files and initialize the state_vector and the graph state appropriately.
		//Also make sure that the counter is also set appropriately
		string line;
		ifstream gameFile (filename_logs);
		if (gameFile.is_open() ) {
			while (getline(gameFile,line) ){
				string move; //Move is the read in 
				vector<string> results;
				results = parse_CSV(line);
				for (vector<string>::iterator i = results.begin(); i != results.end(); ++i){
					string move = *i;
					size_t found = valid_move.find(move);
					if (found!=string::npos && move != ""){
						//Add things to state_queue and make the game graph
						cout << "\n\ngoing to add:" << move;
						if (counter < R){
							int num_user_input = convert_user_input_to_num(valid_input, move[0]);
							state_queue.push_back(num_user_input);
						}else{ //There are more than R number of moves already done
							old_state = convert_queue_to_state(state_queue,R);
							int num_user_input = convert_user_input_to_num(valid_input, move[0]);
							state_queue.push_back(num_user_input); 
							state_queue.pop_front();
							new_state = convert_queue_to_state(state_queue,R);

							//Update the current graph
							if (graph_state.count(make_pair(old_state,new_state)) == 0){//Check syntax
								//This is a state that has not been seen before
								graph_state[make_pair(old_state,new_state)] = 1; //Check syntax
							}else{
								//This key is present
								graph_state[make_pair(old_state,new_state)]= 1 + graph_state[make_pair(old_state,new_state)]; //Check syntax
							}
						}
						counter++;

  					}
				}

				cout << "\n\n";
			}
			gameFile.close();
		}
		else{
			cout << "Unable to  open the FIle\n\n";
		}
	}


	
	//For generating random numbers
    mt19937 rng;
    rng.seed(random_device()());
    std::uniform_int_distribution<mt19937::result_type> dist6(1,3); // distribution in range [1, 6]

	//Open a file for logging all the users moves
	string file_name = "game_play.log";
	ofstream outfile;
	outfile.open(file_name, ios_base::app);

	//Open a file for logging all the computers moves
	string file_name_computer = "game_play_computer.log";
	ofstream outfile_computer;
	outfile_computer.open(file_name_computer, ios_base::app);

	//Open a file for logging the W/L numbers
	string file_name_WL = "game_WL_numbers.log";
	ofstream outfile_WL;
	outfile_WL.open(file_name_WL, ios_base::app);

	if (initialize_from_previous ==0){
	}
	int AI_loss = 0;
	int AI_wins = 0;
	int AI_draws = 0;



	while(break_flag == 0){
		cout << "\nEnter what you wanna play : R,P,S";
		cin >> user_input;

		// if (find(valid_input.begin(), valid_input.end(), user_input) != valid_input.end() ){
		if (valid_input.find(user_input) != string::npos){
			//Element part of valid input
			if (user_input == 'E'){
				//User wants to end the game
				cout << "\n\nThanks for playing";

				//Write the W/L numbers to logs
				outfile_WL << "wins:" << AI_wins<<"\n";
				outfile_WL << "draws:" << AI_draws <<"\n";
				outfile_WL << "loss:" << AI_loss << "\n";

				break_flag = 1;
				break;
			}
			outfile << user_input << ",";
			int num_user_input = convert_user_input_to_num(valid_input, user_input);
			//Else continue with normal game
			//Log the play, computer plays something, log the graph state and log the result
			

			//The first R moves are random
			if (counter < R){
				cout << "\n\n\n--------------------------------------ENTERING THE RANDOM PHASE!\n\n\n";
				//Computer plays something randomly
				char comp_move = valid_input[dist6(rng)];
				outfile_computer << comp_move << ",";

			    cout << "--------------------------------------------The computer played:" << comp_move << endl;

			    int result = check_result(num_user_input,comp_move);
				//Add the move to the queue
				state_queue.push_back(num_user_input);


				//Update who won
				if (user_won(user_input, comp_move) == 1 ){
					AI_loss ++;

				}else if (computer_won(user_input, comp_move) == 1){
					AI_wins ++;

				}else{
					AI_draws ++;
				}





			}else{
				// Implement a queue for appending the moves 
				// i.e. keep popping oldest and add the latest
				// all the states from the queue --> state transition --> update graph
				old_state = convert_queue_to_state(state_queue,R);
				// state_queue.push_back(num_user_input);
				// state_queue.pop_front();

				//currently old_state=new_state is NOT wrong
				//Because of an old bug that I corrected horribly
				//Now the bug is gone, but I am left with horrible code

				new_state = convert_queue_to_state(state_queue,R); 


				//Draw a random element from the graph before updating
				string possible_inputs = "PRS";
				int transition_counts[3];//Counts the previously seen transitions

				for (int char_temp = 0;char_temp<= 2;++char_temp){
					// Somehow temporarily append a number to a queue and then remove it
					// TO DO - Add some logic here
					deque<int> temp_queue(state_queue);//Assume temp_queue holds this 
					temp_queue.pop_back();
					// int num_char_temp = convert_user_input_to_num(valid_input, valid_input[char_temp+ 1]);
					temp_queue.push_back(char_temp);
					int possible_new_state;
					possible_new_state = convert_queue_to_state(temp_queue,R);
					transition_counts[char_temp] = graph_state[make_pair(old_state,possible_new_state)];
				}

				//transition counts holds the three transitions
				//Draw a random sample based on these probabilities of transition
				//Maybe just simply draw a random uniform and then use cdf concept
				float prior_count = 0.5;
				cout << "\n\n";
				for (int it =0;it<3;it++){
					cout << "\nCounts for playing the next one as:" << valid_input[it+ 1] << " is:" << transition_counts[it];
				}
				int int_comp_move= draw_sample(transition_counts,prior_count);
				//int_comp_move stores the computers move in integer value
				char exp_move = valid_input[int_comp_move];
				char comp_move = beating_move(exp_move);
				cout << "\n\n----------------------------------Computer played:"<< comp_move << "\n";
				//Update the state queue to keep track of this

				//print the old state and the new state
				state_queue.push_back(num_user_input);
				state_queue.pop_front();

				//Update the new state
				new_state = convert_queue_to_state(state_queue,R); 


				//Log the comp_move? Maybe......No harm right? Useless data but still...Debugging purposes?
				outfile_computer << comp_move << ",";

				//Update the current graph
				if (graph_state.count(make_pair(old_state,new_state)) == 0){//Check syntax
					//This is a state that has not been seen before
					graph_state[make_pair(old_state,new_state)] = 1; //Check syntax
				}else{
					//This key is present
					graph_state[make_pair(old_state,new_state)]= 1 + graph_state[make_pair(old_state,new_state)]; //Check syntax
				}

				//Update who won
				if (user_won(user_input, comp_move) ){
					AI_loss ++;

				}else if (computer_won(user_input, comp_move) ){
					AI_wins ++;

				}else{
					AI_draws ++;
				}



			}
			counter++;




			//Write the input to user game data





			//After every 100 data inputs, 
			//Save current graph 






			//If in the playing mode, pick an action based on the graph






			//Note down the result and keep doing statistical analysis






		}else{
			//Element not part of valid input
			cout << "Please enter a valid move";

		}
		// break_flag = 1;
	}
	return 0; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3760, %rsp           # imm = 0x3760
movl $0x0, -0x4(%rbp)
movl $0x3, -0x8(%rbp)
movl -0x8(%rbp), %esi
movl $0x3, %edi
callq 0x4d50
cvttsd2si %xmm0, %eax
movl %eax, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x3530(%rbp)
callq 0x3400
movq -0x3530(%rbp), %rdx
leaq 0x89d6(%rip), %rsi      # 0xc008
leaq -0x30(%rbp), %rdi
callq 0x4d80
jmp 0x363d
leaq -0x31(%rbp), %rdi
callq 0x3260
leaq -0x69(%rbp), %rdi
movq %rdi, -0x3538(%rbp)
callq 0x3400
movq -0x3538(%rbp), %rdx
leaq 0x89b1(%rip), %rsi      # 0xc015
leaq -0x68(%rbp), %rdi
callq 0x4d80
jmp 0x366f
leaq -0x69(%rbp), %rdi
callq 0x3260
leaq -0x91(%rbp), %rdi
movq %rdi, -0x3540(%rbp)
callq 0x3400
movq -0x3540(%rbp), %rdx
leaq 0x898a(%rip), %rsi      # 0xc023
leaq -0x90(%rbp), %rdi
callq 0x4d80
jmp 0x36a7
leaq -0x91(%rbp), %rdi
callq 0x3260
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x3548(%rbp)
callq 0x3400
movq -0x3548(%rbp), %rdx
leaq 0x8950(%rip), %rsi      # 0xc024
leaq -0xb8(%rbp), %rdi
callq 0x4d80
jmp 0x36e2
leaq -0xb9(%rbp), %rdi
callq 0x3260
leaq -0xf0(%rbp), %rdi
callq 0x4e30
leaq -0x108(%rbp), %rdi
movl $0x65, %esi
callq 0x9e70
jmp 0x370d
movl $0x0, -0x10c(%rbp)
movl $0x0, -0x118(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x4e50
jmp 0x372f
cmpl $0x1, -0x10(%rbp)
jne 0x3ea2
movq 0xe890(%rip), %rdi      # 0x11fd0
leaq 0x88e1(%rip), %rsi      # 0xc028
callq 0x3200
jmp 0x374e
leaq -0x190(%rbp), %rdi
callq 0x32f0
leaq -0x398(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movl $0x8, %edx
callq 0x3370
jmp 0x3771
leaq -0x398(%rbp), %rdi
callq 0x3360
movb %al, -0x3549(%rbp)
jmp 0x3785
movb -0x3549(%rbp), %al
testb $0x1, %al
jne 0x3794
jmp 0x3e54
jmp 0x3796
leaq -0x398(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x3050
movq %rax, -0x3558(%rbp)
jmp 0x37b2
movq -0x3558(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x32c0
movb %al, -0x3559(%rbp)
jmp 0x37d0
movb -0x3559(%rbp), %al
testb $0x1, %al
jne 0x37df
jmp 0x3e44
leaq -0x3b8(%rbp), %rdi
callq 0x32f0
leaq -0x3d0(%rbp), %rdi
callq 0x4e70
leaq -0x408(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x30c0
jmp 0x380c
leaq -0x3e8(%rbp), %rdi
leaq -0x408(%rbp), %rsi
callq 0x9c40
jmp 0x3821
leaq -0x3d0(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x4e90
leaq -0x3e8(%rbp), %rdi
callq 0x4ec0
leaq -0x408(%rbp), %rdi
callq 0x3120
leaq -0x3d0(%rbp), %rdi
callq 0x4f20
movq %rax, -0x410(%rbp)
leaq -0x3d0(%rbp), %rdi
callq 0x4f90
movq %rax, -0x418(%rbp)
leaq -0x410(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x4f50
testb $0x1, %al
jne 0x388e
jmp 0x3df8
leaq -0x410(%rbp), %rdi
callq 0x4fc0
movq %rax, %rsi
leaq -0x438(%rbp), %rdi
callq 0x30c0
jmp 0x38ab
leaq -0xb8(%rbp), %rdi
leaq -0x438(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3450
movq %rax, -0x440(%rbp)
cmpq $-0x1, -0x440(%rbp)
je 0x3dcd
leaq 0x8a30(%rip), %rsi      # 0xc30e
leaq -0x438(%rbp), %rdi
callq 0x4fe0
movb %al, -0x355a(%rbp)
jmp 0x38f2
movb -0x355a(%rbp), %al
testb $0x1, %al
jne 0x3901
jmp 0x3dcd
movq 0xe6c8(%rip), %rdi      # 0x11fd0
leaq 0x8793(%rip), %rsi      # 0xc0a2
callq 0x3200
movq %rax, -0x3568(%rbp)
jmp 0x391d
movq -0x3568(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x31d0
jmp 0x3932
movl -0x118(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x3ade
leaq -0x468(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x30c0
jmp 0x3956
xorl %eax, %eax
movl %eax, %esi
leaq -0x438(%rbp), %rdi
callq 0x3440
movq %rax, -0x3570(%rbp)
jmp 0x396f
movq -0x3570(%rbp), %rax
movsbl (%rax), %esi
leaq -0x468(%rbp), %rdi
callq 0xa310
movl %eax, -0x3574(%rbp)
jmp 0x398d
leaq -0x468(%rbp), %rdi
callq 0x3120
movl -0x3574(%rbp), %eax
movl %eax, -0x444(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x444(%rbp), %rsi
callq 0x5010
jmp 0x39ba
jmp 0x3dbe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x3260
jmp 0x4d38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x69(%rbp), %rdi
callq 0x3260
jmp 0x4d2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x3260
jmp 0x4d26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb9(%rbp), %rdi
callq 0x3260
jmp 0x4d1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4d02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4cf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4cea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e2a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x408(%rbp), %rdi
callq 0x3120
jmp 0x3e2a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3dea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x468(%rbp), %rdi
callq 0x3120
jmp 0x3dea
leaq -0x4b8(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x5070
jmp 0x3af3
movl -0x8(%rbp), %esi
leaq -0x4b8(%rbp), %rdi
callq 0x9fc0
movl %eax, -0x3578(%rbp)
jmp 0x3b0a
movl -0x3578(%rbp), %eax
movl %eax, -0x110(%rbp)
leaq -0x4b8(%rbp), %rdi
callq 0x5190
leaq -0x4e0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x30c0
jmp 0x3b37
xorl %eax, %eax
movl %eax, %esi
leaq -0x438(%rbp), %rdi
callq 0x3440
movq %rax, -0x3580(%rbp)
jmp 0x3b50
movq -0x3580(%rbp), %rax
movsbl (%rax), %esi
leaq -0x4e0(%rbp), %rdi
callq 0xa310
movl %eax, -0x3584(%rbp)
jmp 0x3b6e
leaq -0x4e0(%rbp), %rdi
callq 0x3120
movl -0x3584(%rbp), %eax
movl %eax, -0x4bc(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x4bc(%rbp), %rsi
callq 0x5010
jmp 0x3b9b
leaq -0x168(%rbp), %rdi
movq %rdi, -0x3590(%rbp)
callq 0x5200
movq -0x3590(%rbp), %rsi
leaq -0x530(%rbp), %rdi
callq 0x5070
jmp 0x3bc3
movl -0x8(%rbp), %esi
leaq -0x530(%rbp), %rdi
callq 0x9fc0
movl %eax, -0x3594(%rbp)
jmp 0x3bda
movl -0x3594(%rbp), %eax
movl %eax, -0x114(%rbp)
leaq -0x530(%rbp), %rdi
callq 0x5190
leaq -0x110(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x52d0
movq %rax, -0x35a0(%rbp)
jmp 0x3c0e
movq -0x35a0(%rbp), %rax
movq %rax, -0x538(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0x538(%rbp), %rsi
callq 0x5270
movq %rax, -0x35a8(%rbp)
jmp 0x3c38
movq -0x35a8(%rbp), %rax
cmpq $0x0, %rax
jne 0x3cfe
leaq -0x110(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x52d0
movq %rax, -0x35b0(%rbp)
jmp 0x3c65
movq -0x35b0(%rbp), %rax
movq %rax, -0x540(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0x540(%rbp), %rsi
callq 0x5300
movq %rax, -0x35b8(%rbp)
jmp 0x3c8f
movq -0x35b8(%rbp), %rax
movss 0x8366(%rip), %xmm0     # 0xc004
movss %xmm0, (%rax)
jmp 0x3dbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x4b8(%rbp), %rdi
callq 0x5190
jmp 0x3dea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x4e0(%rbp), %rdi
callq 0x3120
jmp 0x3dea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x530(%rbp), %rdi
callq 0x5190
jmp 0x3dea
leaq -0x110(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x52d0
movq %rax, -0x35c0(%rbp)
jmp 0x3d1a
movq -0x35c0(%rbp), %rax
movq %rax, -0x548(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0x548(%rbp), %rsi
callq 0x5300
movq %rax, -0x35c8(%rbp)
jmp 0x3d44
movq -0x35c8(%rbp), %rax
movss (%rax), %xmm0
movss 0x82ad(%rip), %xmm1     # 0xc004
addss %xmm1, %xmm0
movss %xmm0, -0x35d4(%rbp)
leaq -0x110(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x52d0
movq %rax, -0x35d0(%rbp)
jmp 0x3d7f
movq -0x35d0(%rbp), %rax
movq %rax, -0x550(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0x550(%rbp), %rsi
callq 0x5300
movq %rax, -0x35e0(%rbp)
jmp 0x3da9
movq -0x35e0(%rbp), %rax
movss -0x35d4(%rbp), %xmm0
movss %xmm0, (%rax)
jmp 0x3dbe
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
leaq -0x438(%rbp), %rdi
callq 0x3120
leaq -0x410(%rbp), %rdi
callq 0x53e0
jmp 0x385f
leaq -0x438(%rbp), %rdi
callq 0x3120
jmp 0x3e2a
movq 0xe1d1(%rip), %rdi      # 0x11fd0
leaq 0x8506(%rip), %rsi      # 0xc30c
callq 0x3200
jmp 0x3e0d
leaq -0x3d0(%rbp), %rdi
callq 0x4ec0
leaq -0x3b8(%rbp), %rdi
callq 0x3120
jmp 0x3796
leaq -0x3d0(%rbp), %rdi
callq 0x4ec0
leaq -0x3b8(%rbp), %rdi
callq 0x3120
jmp 0x3e85
leaq -0x398(%rbp), %rdi
callq 0x3060
jmp 0x3e52
jmp 0x3e6b
movq 0xe175(%rip), %rdi      # 0x11fd0
leaq 0x8250(%rip), %rsi      # 0xc0b2
callq 0x3200
jmp 0x3e69
jmp 0x3e6b
leaq -0x398(%rbp), %rdi
callq 0x3070
leaq -0x190(%rbp), %rdi
callq 0x3120
jmp 0x3ea2
leaq -0x398(%rbp), %rdi
callq 0x3070
leaq -0x190(%rbp), %rdi
callq 0x3120
jmp 0x4cea
leaq -0x18d8(%rbp), %rdi
callq 0x5400
jmp 0x3eb0
leaq -0x2c60(%rbp), %rdi
callq 0x54e0
jmp 0x3ebe
leaq -0x2c60(%rbp), %rdi
callq 0x5580
movl %eax, -0x35e4(%rbp)
jmp 0x3ed2
movl -0x35e4(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
leaq -0x18d8(%rbp), %rdi
callq 0x5420
jmp 0x3eea
leaq -0x2c60(%rbp), %rdi
callq 0x55a0
leaq -0x2c70(%rbp), %rdi
movl $0x1, %esi
movl $0x3, %edx
callq 0x55d0
jmp 0x3f0e
leaq -0x2c91(%rbp), %rdi
movq %rdi, -0x35f0(%rbp)
callq 0x3400
movq -0x35f0(%rbp), %rdx
leaq 0x80e6(%rip), %rsi      # 0xc015
leaq -0x2c90(%rbp), %rdi
callq 0x4d80
jmp 0x3f3d
leaq -0x2c91(%rbp), %rdi
callq 0x3260
leaq -0x2e98(%rbp), %rdi
callq 0x33c0
jmp 0x3f57
leaq -0x2e98(%rbp), %rdi
leaq -0x2c90(%rbp), %rsi
movl $0x1, %edx
callq 0x30e0
jmp 0x3f71
leaq -0x2eb9(%rbp), %rdi
movq %rdi, -0x35f8(%rbp)
callq 0x3400
movq -0x35f8(%rbp), %rdx
leaq 0x813b(%rip), %rsi      # 0xc0cd
leaq -0x2eb8(%rbp), %rdi
callq 0x4d80
jmp 0x3fa0
leaq -0x2eb9(%rbp), %rdi
callq 0x3260
leaq -0x30c0(%rbp), %rdi
callq 0x33c0
jmp 0x3fba
leaq -0x30c0(%rbp), %rdi
leaq -0x2eb8(%rbp), %rsi
movl $0x1, %edx
callq 0x30e0
jmp 0x3fd4
leaq -0x30e1(%rbp), %rdi
movq %rdi, -0x3600(%rbp)
callq 0x3400
movq -0x3600(%rbp), %rdx
leaq 0x80ef(%rip), %rsi      # 0xc0e4
leaq -0x30e0(%rbp), %rdi
callq 0x4d80
jmp 0x4003
leaq -0x30e1(%rbp), %rdi
callq 0x3260
leaq -0x32e8(%rbp), %rdi
callq 0x33c0
jmp 0x401d
leaq -0x32e8(%rbp), %rdi
leaq -0x30e0(%rbp), %rsi
movl $0x1, %edx
callq 0x30e0
jmp 0x4037
cmpl $0x0, -0x10(%rbp)
jne 0x4120
jmp 0x4120
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x2c60(%rbp), %rdi
callq 0x55a0
jmp 0x4cea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x2c91(%rbp), %rdi
callq 0x3260
jmp 0x4cea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4cde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4cd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x2eb9(%rbp), %rdi
callq 0x3260
jmp 0x4cd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4cc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4cba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30e1(%rbp), %rdi
callq 0x3260
jmp 0x4cba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4cae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4ca2
movl $0x0, -0x32ec(%rbp)
movl $0x0, -0x32f0(%rbp)
movl $0x0, -0x32f4(%rbp)
cmpl $0x0, -0x10c(%rbp)
jne 0x4bf9
movq 0xde7e(%rip), %rdi      # 0x11fd0
leaq 0x7f9f(%rip), %rsi      # 0xc0f8
callq 0x3200
jmp 0x4160
movq 0xde79(%rip), %rdi      # 0x11fe0
leaq -0x169(%rbp), %rsi
callq 0x32e0
jmp 0x4175
leaq -0x90(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movsbl -0x169(%rbp), %esi
callq 0x32d0
cmpq $-0x1, %rax
je 0x4bdd
movsbl -0x169(%rbp), %eax
cmpl $0x45, %eax
jne 0x42ae
movq 0xde23(%rip), %rdi      # 0x11fd0
leaq 0x7f67(%rip), %rsi      # 0xc11b
callq 0x3200
jmp 0x41bb
leaq 0x7f6e(%rip), %rsi      # 0xc130
leaq -0x32e8(%rbp), %rdi
callq 0x3200
movq %rax, -0x3608(%rbp)
jmp 0x41d7
movq -0x3608(%rbp), %rdi
movl -0x32f0(%rbp), %esi
callq 0x33d0
movq %rax, -0x3610(%rbp)
jmp 0x41f2
movq -0x3610(%rbp), %rdi
leaq 0x810d(%rip), %rsi      # 0xc30d
callq 0x3200
jmp 0x4207
leaq 0x7f28(%rip), %rsi      # 0xc136
leaq -0x32e8(%rbp), %rdi
callq 0x3200
movq %rax, -0x3618(%rbp)
jmp 0x4223
movq -0x3618(%rbp), %rdi
movl -0x32f4(%rbp), %esi
callq 0x33d0
movq %rax, -0x3620(%rbp)
jmp 0x423e
movq -0x3620(%rbp), %rdi
leaq 0x80c1(%rip), %rsi      # 0xc30d
callq 0x3200
jmp 0x4253
leaq 0x7ee3(%rip), %rsi      # 0xc13d
leaq -0x32e8(%rbp), %rdi
callq 0x3200
movq %rax, -0x3628(%rbp)
jmp 0x426f
movq -0x3628(%rbp), %rdi
movl -0x32ec(%rbp), %esi
callq 0x33d0
movq %rax, -0x3630(%rbp)
jmp 0x428a
movq -0x3630(%rbp), %rdi
leaq 0x8075(%rip), %rsi      # 0xc30d
callq 0x3200
jmp 0x429f
movl $0x1, -0x10c(%rbp)
jmp 0x4bf9
movsbl -0x169(%rbp), %esi
leaq -0x2e98(%rbp), %rdi
callq 0x32a0
movq %rax, -0x3638(%rbp)
jmp 0x42ca
movq -0x3638(%rbp), %rdi
leaq 0x8013(%rip), %rsi      # 0xc2eb
callq 0x3200
jmp 0x42df
leaq -0x3318(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x30c0
jmp 0x42f4
movsbl -0x169(%rbp), %esi
leaq -0x3318(%rbp), %rdi
callq 0xa310
movl %eax, -0x363c(%rbp)
jmp 0x430f
leaq -0x3318(%rbp), %rdi
callq 0x3120
movl -0x363c(%rbp), %eax
movl %eax, -0x32f8(%rbp)
movl -0x118(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x44ed
movq 0xdc93(%rip), %rdi      # 0x11fd0
leaq 0x7dff(%rip), %rsi      # 0xc143
callq 0x3200
jmp 0x434b
leaq -0x2c70(%rbp), %rdi
leaq -0x18d8(%rbp), %rsi
callq 0x5600
movq %rax, -0x3648(%rbp)
jmp 0x4367
movq -0x3648(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x3440
movq %rax, -0x3650(%rbp)
jmp 0x4383
movq -0x3650(%rbp), %rax
movb (%rax), %al
movb %al, -0x3319(%rbp)
movsbl -0x3319(%rbp), %esi
leaq -0x30c0(%rbp), %rdi
callq 0x32a0
movq %rax, -0x3658(%rbp)
jmp 0x43ae
movq -0x3658(%rbp), %rdi
leaq 0x7f2f(%rip), %rsi      # 0xc2eb
callq 0x3200
jmp 0x43c3
movq 0xdc06(%rip), %rdi      # 0x11fd0
leaq 0x7db9(%rip), %rsi      # 0xc18a
callq 0x3200
movq %rax, -0x3660(%rbp)
jmp 0x43df
movq -0x3660(%rbp), %rdi
movsbl -0x3319(%rbp), %esi
callq 0x32a0
movq %rax, -0x3668(%rbp)
jmp 0x43fb
movq -0x3668(%rbp), %rdi
movq 0xdbb7(%rip), %rsi      # 0x11fc0
callq 0x3240
jmp 0x4410
movsbl -0x32f8(%rbp), %edi
movsbl -0x3319(%rbp), %esi
callq 0x9f20
movl %eax, -0x366c(%rbp)
jmp 0x442b
movl -0x366c(%rbp), %eax
movl %eax, -0x3320(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x32f8(%rbp), %rsi
callq 0x5010
jmp 0x444c
movsbl -0x169(%rbp), %edi
movsbl -0x3319(%rbp), %esi
callq 0xa590
movl %eax, -0x3670(%rbp)
jmp 0x4467
movl -0x3670(%rbp), %eax
cmpl $0x1, %eax
jne 0x44a0
movl -0x32ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x32ec(%rbp)
jmp 0x44e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x3318(%rbp), %rdi
callq 0x3120
jmp 0x4ca2
movsbl -0x169(%rbp), %edi
movsbl -0x3319(%rbp), %esi
callq 0xa600
movl %eax, -0x3674(%rbp)
jmp 0x44bb
movl -0x3674(%rbp), %eax
cmpl $0x1, %eax
jne 0x44d7
movl -0x32f0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x32f0(%rbp)
jmp 0x44e6
movl -0x32f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x32f4(%rbp)
jmp 0x44e8
jmp 0x4bcc
leaq -0x3370(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x5070
jmp 0x4502
movl -0x8(%rbp), %esi
leaq -0x3370(%rbp), %rdi
callq 0x9fc0
movl %eax, -0x3678(%rbp)
jmp 0x4519
movl -0x3678(%rbp), %eax
movl %eax, -0x110(%rbp)
leaq -0x3370(%rbp), %rdi
callq 0x5190
leaq -0x33c0(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x5070
jmp 0x4546
movl -0x8(%rbp), %esi
leaq -0x33c0(%rbp), %rdi
callq 0x9fc0
movl %eax, -0x367c(%rbp)
jmp 0x455d
movl -0x367c(%rbp), %eax
movl %eax, -0x114(%rbp)
leaq -0x33c0(%rbp), %rdi
callq 0x5190
leaq -0x33e1(%rbp), %rdi
movq %rdi, -0x3688(%rbp)
callq 0x3400
movq -0x3688(%rbp), %rdx
leaq 0x7a8e(%rip), %rsi      # 0xc024
leaq -0x33e0(%rbp), %rdi
callq 0x4d80
jmp 0x45a4
leaq -0x33e1(%rbp), %rdi
callq 0x3260
movl $0x0, -0x33f4(%rbp)
cmpl $0x2, -0x33f4(%rbp)
jg 0x4766
leaq -0x3448(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x5070
jmp 0x45dc
leaq -0x3448(%rbp), %rdi
movq %rdi, -0x3690(%rbp)
callq 0x5630
movq -0x3690(%rbp), %rdi
leaq -0x33f4(%rbp), %rsi
callq 0x5010
jmp 0x4604
leaq -0x34a0(%rbp), %rdi
leaq -0x3448(%rbp), %rsi
callq 0x5070
jmp 0x4619
movl -0x8(%rbp), %esi
leaq -0x34a0(%rbp), %rdi
callq 0x9fc0
movl %eax, -0x3694(%rbp)
jmp 0x4630
movl -0x3694(%rbp), %eax
movl %eax, -0x344c(%rbp)
leaq -0x34a0(%rbp), %rdi
callq 0x5190
leaq -0x110(%rbp), %rdi
leaq -0x344c(%rbp), %rsi
callq 0x52d0
movq %rax, -0x36a0(%rbp)
jmp 0x4664
movq -0x36a0(%rbp), %rax
movq %rax, -0x34a8(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0x34a8(%rbp), %rsi
callq 0x5300
movq %rax, -0x36a8(%rbp)
jmp 0x468e
movq -0x36a8(%rbp), %rax
cvttss2si (%rax), %ecx
movslq -0x33f4(%rbp), %rax
movl %ecx, -0x33f0(%rbp,%rax,4)
leaq -0x3448(%rbp), %rdi
callq 0x5190
movl -0x33f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x33f4(%rbp)
jmp 0x45ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x3370(%rbp), %rdi
callq 0x5190
jmp 0x4ca2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x33c0(%rbp), %rdi
callq 0x5190
jmp 0x4ca2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x33e1(%rbp), %rdi
callq 0x3260
jmp 0x4ca2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4bbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4755
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x34a0(%rbp), %rdi
callq 0x5190
leaq -0x3448(%rbp), %rdi
callq 0x5190
jmp 0x4bbb
movl $0x3f000000, -0x34ac(%rbp) # imm = 0x3F000000
movq 0xd859(%rip), %rdi      # 0x11fd0
leaq 0x7b8e(%rip), %rsi      # 0xc30c
callq 0x3200
jmp 0x4785
movl $0x0, -0x34b0(%rbp)
cmpl $0x3, -0x34b0(%rbp)
jge 0x4845
movq 0xd82d(%rip), %rdi      # 0x11fd0
leaq 0x7a21(%rip), %rsi      # 0xc1cb
callq 0x3200
movq %rax, -0x36b0(%rbp)
jmp 0x47b8
movl -0x34b0(%rbp), %eax
incl %eax
movslq %eax, %rsi
leaq -0x90(%rbp), %rdi
callq 0x3440
movq %rax, -0x36b8(%rbp)
jmp 0x47d8
movq -0x36b0(%rbp), %rdi
movq -0x36b8(%rbp), %rax
movsbl (%rax), %esi
callq 0x32a0
movq %rax, -0x36c0(%rbp)
jmp 0x47f7
movq -0x36c0(%rbp), %rdi
leaq 0x79eb(%rip), %rsi      # 0xc1f0
callq 0x3200
movq %rax, -0x36c8(%rbp)
jmp 0x4813
movq -0x36c8(%rbp), %rdi
movslq -0x34b0(%rbp), %rax
movl -0x33f0(%rbp,%rax,4), %esi
callq 0x33d0
jmp 0x482f
jmp 0x4831
movl -0x34b0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34b0(%rbp)
jmp 0x478f
movss -0x34ac(%rbp), %xmm0
leaq -0x33f0(%rbp), %rdi
callq 0xa3b0
movl %eax, -0x36cc(%rbp)
jmp 0x4861
movl -0x36cc(%rbp), %eax
movl %eax, -0x34b4(%rbp)
movslq -0x34b4(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x3440
movq %rax, -0x36d8(%rbp)
jmp 0x4889
movq -0x36d8(%rbp), %rax
movb (%rax), %al
movb %al, -0x34b5(%rbp)
movsbl -0x34b5(%rbp), %edi
callq 0xa670
movb %al, -0x36d9(%rbp)
jmp 0x48ac
movb -0x36d9(%rbp), %al
movb %al, -0x34b6(%rbp)
movq 0xd711(%rip), %rdi      # 0x11fd0
leaq 0x792f(%rip), %rsi      # 0xc1f5
callq 0x3200
movq %rax, -0x36e8(%rbp)
jmp 0x48d4
movq -0x36e8(%rbp), %rdi
movsbl -0x34b6(%rbp), %esi
callq 0x32a0
movq %rax, -0x36f0(%rbp)
jmp 0x48f0
movq -0x36f0(%rbp), %rdi
leaq 0x7a0f(%rip), %rsi      # 0xc30d
callq 0x3200
jmp 0x4905
leaq -0x168(%rbp), %rdi
leaq -0x32f8(%rbp), %rsi
callq 0x5010
jmp 0x491a
leaq -0x168(%rbp), %rdi
movq %rdi, -0x36f8(%rbp)
callq 0x5200
movq -0x36f8(%rbp), %rsi
leaq -0x3508(%rbp), %rdi
callq 0x5070
jmp 0x4942
movl -0x8(%rbp), %esi
leaq -0x3508(%rbp), %rdi
callq 0x9fc0
movl %eax, -0x36fc(%rbp)
jmp 0x4959
movl -0x36fc(%rbp), %eax
movl %eax, -0x114(%rbp)
leaq -0x3508(%rbp), %rdi
callq 0x5190
movsbl -0x34b6(%rbp), %esi
leaq -0x30c0(%rbp), %rdi
callq 0x32a0
movq %rax, -0x3708(%rbp)
jmp 0x498d
movq -0x3708(%rbp), %rdi
leaq 0x7950(%rip), %rsi      # 0xc2eb
callq 0x3200
jmp 0x49a2
leaq -0x110(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x52d0
movq %rax, -0x3710(%rbp)
jmp 0x49be
movq -0x3710(%rbp), %rax
movq %rax, -0x3510(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0x3510(%rbp), %rsi
callq 0x5270
movq %rax, -0x3718(%rbp)
jmp 0x49e8
movq -0x3718(%rbp), %rax
cmpq $0x0, %rax
jne 0x4a70
leaq -0x110(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x52d0
movq %rax, -0x3720(%rbp)
jmp 0x4a11
movq -0x3720(%rbp), %rax
movq %rax, -0x3518(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0x3518(%rbp), %rsi
callq 0x5300
movq %rax, -0x3728(%rbp)
jmp 0x4a3b
movq -0x3728(%rbp), %rax
movss 0x75ba(%rip), %xmm0     # 0xc004
movss %xmm0, (%rax)
jmp 0x4b2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x3508(%rbp), %rdi
callq 0x5190
jmp 0x4bbb
leaq -0x110(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x52d0
movq %rax, -0x3730(%rbp)
jmp 0x4a8c
movq -0x3730(%rbp), %rax
movq %rax, -0x3520(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0x3520(%rbp), %rsi
callq 0x5300
movq %rax, -0x3738(%rbp)
jmp 0x4ab6
movq -0x3738(%rbp), %rax
movss (%rax), %xmm0
movss 0x753b(%rip), %xmm1     # 0xc004
addss %xmm1, %xmm0
movss %xmm0, -0x3744(%rbp)
leaq -0x110(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x52d0
movq %rax, -0x3740(%rbp)
jmp 0x4af1
movq -0x3740(%rbp), %rax
movq %rax, -0x3528(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0x3528(%rbp), %rsi
callq 0x5300
movq %rax, -0x3750(%rbp)
jmp 0x4b1b
movq -0x3750(%rbp), %rax
movss -0x3744(%rbp), %xmm0
movss %xmm0, (%rax)
movsbl -0x169(%rbp), %edi
movsbl -0x34b6(%rbp), %esi
callq 0xa590
movl %eax, -0x3754(%rbp)
jmp 0x4b49
movl -0x3754(%rbp), %eax
cmpl $0x0, %eax
je 0x4b65
movl -0x32ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x32ec(%rbp)
jmp 0x4bad
movsbl -0x169(%rbp), %edi
movsbl -0x34b6(%rbp), %esi
callq 0xa600
movl %eax, -0x3758(%rbp)
jmp 0x4b80
movl -0x3758(%rbp), %eax
cmpl $0x0, %eax
je 0x4b9c
movl -0x32f0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x32f0(%rbp)
jmp 0x4bab
movl -0x32f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x32f4(%rbp)
jmp 0x4bad
leaq -0x33e0(%rbp), %rdi
callq 0x3120
jmp 0x4bcc
leaq -0x33e0(%rbp), %rdi
callq 0x3120
jmp 0x4ca2
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
jmp 0x4bf4
movq 0xd3ec(%rip), %rdi      # 0x11fd0
leaq 0x763f(%rip), %rsi      # 0xc22a
callq 0x3200
jmp 0x4bf2
jmp 0x4bf4
jmp 0x413e
movl $0x0, -0x4(%rbp)
leaq -0x32e8(%rbp), %rdi
callq 0x3320
leaq -0x30e0(%rbp), %rdi
callq 0x3120
leaq -0x30c0(%rbp), %rdi
callq 0x3320
leaq -0x2eb8(%rbp), %rdi
callq 0x3120
leaq -0x2e98(%rbp), %rdi
callq 0x3320
leaq -0x2c90(%rbp), %rdi
callq 0x3120
leaq -0x168(%rbp), %rdi
callq 0x5190
leaq -0x108(%rbp), %rdi
callq 0x5690
leaq -0xf0(%rbp), %rdi
callq 0x56f0
leaq -0xb8(%rbp), %rdi
callq 0x3120
leaq -0x90(%rbp), %rdi
callq 0x3120
leaq -0x68(%rbp), %rdi
callq 0x3120
leaq -0x30(%rbp), %rdi
callq 0x3120
movl -0x4(%rbp), %eax
addq $0x3760, %rsp           # imm = 0x3760
popq %rbp
retq
leaq -0x32e8(%rbp), %rdi
callq 0x3320
leaq -0x30e0(%rbp), %rdi
callq 0x3120
leaq -0x30c0(%rbp), %rdi
callq 0x3320
leaq -0x2eb8(%rbp), %rdi
callq 0x3120
leaq -0x2e98(%rbp), %rdi
callq 0x3320
leaq -0x2c90(%rbp), %rdi
callq 0x3120
leaq -0x168(%rbp), %rdi
callq 0x5190
leaq -0x108(%rbp), %rdi
callq 0x5690
leaq -0xf0(%rbp), %rdi
callq 0x56f0
leaq -0xb8(%rbp), %rdi
callq 0x3120
leaq -0x90(%rbp), %rdi
callq 0x3120
leaq -0x68(%rbp), %rdi
callq 0x3120
leaq -0x30(%rbp), %rdi
callq 0x3120
movq -0x40(%rbp), %rdi
callq 0x33f0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)