// File: CMU-SAFARI[P]MQSim/src/main.cpp
// Function: read_workload_definitions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::vector<std::vector<IO_Flow_Parameter_Set*>*>* read_workload_definitions(const string workload_defs_file_path)
{
	std::vector<std::vector<IO_Flow_Parameter_Set*>*>* io_scenarios = new std::vector<std::vector<IO_Flow_Parameter_Set*>*>;

	ifstream workload_defs_file;
	workload_defs_file.open(workload_defs_file_path.c_str());
	bool use_default_workloads = true;
	if (!workload_defs_file) {
		PRINT_MESSAGE("The specified workload definition file does not exist!");
		PRINT_MESSAGE("Using MQSim's default workload definitions.");
		PRINT_MESSAGE("Writing the default workload definitions to the expected workload definition file.");
		PRINT_MESSAGE("[====================] Done!\n");
	} else {
		string line((std::istreambuf_iterator<char>(workload_defs_file)), std::istreambuf_iterator<char>());
		if (line.compare("USE_INTERNAL_PARAMS") != 0) {
			rapidxml::xml_document<> doc;
			// character type defaults to char
			char* temp_string = new char[line.length() + 1];
			strcpy(temp_string, line.c_str());
			doc.parse<0>(temp_string);
			rapidxml::xml_node<> *mqsim_io_scenarios = doc.first_node("MQSim_IO_Scenarios");
			if (mqsim_io_scenarios != NULL) {
				for (auto xml_io_scenario = mqsim_io_scenarios->first_node("IO_Scenario"); xml_io_scenario; xml_io_scenario = xml_io_scenario->next_sibling("IO_Scenario")) {
					std::vector<IO_Flow_Parameter_Set*>* scenario_definition = new std::vector<IO_Flow_Parameter_Set*>;
					for (auto flow_def = xml_io_scenario->first_node(); flow_def; flow_def = flow_def->next_sibling()) {
						IO_Flow_Parameter_Set* flow;
						if (strcmp(flow_def->name(), "IO_Flow_Parameter_Set_Synthetic") == 0) {
							flow = new IO_Flow_Parameter_Set_Synthetic;
							((IO_Flow_Parameter_Set_Synthetic*)flow)->XML_deserialize(flow_def);
						} else if (strcmp(flow_def->name(), "IO_Flow_Parameter_Set_Trace_Based") == 0) {
							flow = new IO_Flow_Parameter_Set_Trace_Based;
							((IO_Flow_Parameter_Set_Trace_Based*)flow)->XML_deserialize(flow_def);
						}
						scenario_definition->push_back(flow);
					}
					io_scenarios->push_back(scenario_definition);
					use_default_workloads = false;
				}
			} else {
				PRINT_MESSAGE("Error in the workload definition file!");
				PRINT_MESSAGE("Using MQSim's default workload definitions.");
				PRINT_MESSAGE("Writing the default workload definitions to the expected workload definition file.");
				PRINT_MESSAGE("[====================] Done!\n");
			}
		}
	}

	if (use_default_workloads) {
		std::vector<IO_Flow_Parameter_Set*>* scenario_definition = new std::vector<IO_Flow_Parameter_Set*>;
		IO_Flow_Parameter_Set_Synthetic* io_flow_1 = new IO_Flow_Parameter_Set_Synthetic;
		io_flow_1->Device_Level_Data_Caching_Mode = SSD_Components::Caching_Mode::WRITE_CACHE;
		io_flow_1->Type = Flow_Type::SYNTHETIC;
		io_flow_1->Priority_Class = IO_Flow_Priority_Class::HIGH;
		io_flow_1->Channel_No = 8;
		io_flow_1->Channel_IDs = new flash_channel_ID_type[8];
		io_flow_1->Channel_IDs[0] = 0; io_flow_1->Channel_IDs[1] = 1; io_flow_1->Channel_IDs[2] = 2; io_flow_1->Channel_IDs[3] = 3;
		io_flow_1->Channel_IDs[4] = 4; io_flow_1->Channel_IDs[5] = 5; io_flow_1->Channel_IDs[6] = 6; io_flow_1->Channel_IDs[7] = 7;
		io_flow_1->Chip_No = 4;
		io_flow_1->Chip_IDs = new flash_chip_ID_type[4];
		io_flow_1->Chip_IDs[0] = 0; io_flow_1->Chip_IDs[1] = 1; io_flow_1->Chip_IDs[2] = 2; io_flow_1->Chip_IDs[3] = 3;
		io_flow_1->Die_No = 2;
		io_flow_1->Die_IDs = new flash_die_ID_type[2];
		io_flow_1->Die_IDs[0] = 0; io_flow_1->Die_IDs[1] = 1;
		io_flow_1->Plane_No = 2;
		io_flow_1->Plane_IDs = new flash_plane_ID_type[2];
		io_flow_1->Plane_IDs[0] = 0; io_flow_1->Plane_IDs[1] = 1;
		io_flow_1->Initial_Occupancy_Percentage = 50;
		io_flow_1->Working_Set_Percentage = 85;
		io_flow_1->Synthetic_Generator_Type = Utils::Request_Generator_Type::QUEUE_DEPTH;
		io_flow_1->Read_Percentage = 100;
		io_flow_1->Address_Distribution = Utils::Address_Distribution_Type::RANDOM_UNIFORM;
		io_flow_1->Percentage_of_Hot_Region = 0;
		io_flow_1->Generated_Aligned_Addresses = true;
		io_flow_1->Address_Alignment_Unit = 16;
		io_flow_1->Request_Size_Distribution = Utils::Request_Size_Distribution_Type::FIXED;
		io_flow_1->Average_Request_Size = 8;
		io_flow_1->Variance_Request_Size = 0;
		io_flow_1->Seed = 12344;
		io_flow_1->Average_No_of_Reqs_in_Queue = 2;
		io_flow_1->Bandwidth = 262144;
		io_flow_1->Stop_Time = 1000000000;
		io_flow_1->Total_Requests_To_Generate = 0;
		scenario_definition->push_back(io_flow_1);

		IO_Flow_Parameter_Set_Synthetic* io_flow_2 = new IO_Flow_Parameter_Set_Synthetic;
		io_flow_2->Device_Level_Data_Caching_Mode = SSD_Components::Caching_Mode::WRITE_CACHE;
		io_flow_2->Type = Flow_Type::SYNTHETIC;
		io_flow_2->Priority_Class = IO_Flow_Priority_Class::HIGH;
		io_flow_2->Channel_No = 8;
		io_flow_2->Channel_IDs = new flash_channel_ID_type[8];
		io_flow_2->Channel_IDs[0] = 0; io_flow_2->Channel_IDs[1] = 1; io_flow_2->Channel_IDs[2] = 2; io_flow_2->Channel_IDs[3] = 3;
		io_flow_2->Channel_IDs[4] = 4; io_flow_2->Channel_IDs[5] = 5; io_flow_2->Channel_IDs[6] = 6; io_flow_2->Channel_IDs[7] = 7;
		io_flow_2->Chip_No = 4;
		io_flow_2->Chip_IDs = new flash_chip_ID_type[4];
		io_flow_2->Chip_IDs[0] = 0; io_flow_2->Chip_IDs[1] = 1; io_flow_2->Chip_IDs[2] = 2; io_flow_2->Chip_IDs[3] = 3;
		io_flow_2->Die_No = 2;
		io_flow_2->Die_IDs = new flash_die_ID_type[2];
		io_flow_2->Die_IDs[0] = 0; io_flow_2->Die_IDs[1] = 1;
		io_flow_2->Plane_No = 2;
		io_flow_2->Plane_IDs = new flash_plane_ID_type[2];
		io_flow_2->Plane_IDs[0] = 0; io_flow_2->Plane_IDs[1] = 1;
		io_flow_2->Initial_Occupancy_Percentage = 50;
		io_flow_2->Working_Set_Percentage = 85;
		io_flow_2->Synthetic_Generator_Type = Utils::Request_Generator_Type::QUEUE_DEPTH;
		io_flow_2->Read_Percentage = 100;
		io_flow_2->Address_Distribution = Utils::Address_Distribution_Type::RANDOM_UNIFORM;
		io_flow_2->Percentage_of_Hot_Region = 0;
		io_flow_2->Generated_Aligned_Addresses = true;
		io_flow_2->Address_Alignment_Unit = 16;
		io_flow_2->Request_Size_Distribution = Utils::Request_Size_Distribution_Type::FIXED;
		io_flow_2->Average_Request_Size = 8;
		io_flow_2->Variance_Request_Size = 0;
		io_flow_2->Seed = 6533;
		io_flow_2->Average_No_of_Reqs_in_Queue = 2;
		io_flow_2->Bandwidth = 131072;
		io_flow_2->Stop_Time = 1000000000;
		io_flow_2->Total_Requests_To_Generate = 0;
		scenario_definition->push_back(io_flow_2);

		io_scenarios->push_back(scenario_definition);

		PRINT_MESSAGE("Writing default workload parameters to the expected input file.")

		Utils::XmlWriter xmlwriter;
		string tmp;
		xmlwriter.Open(workload_defs_file_path.c_str());
		tmp = "MQSim_IO_Scenarios";
		xmlwriter.Write_open_tag(tmp);
		tmp = "IO_Scenario";
		xmlwriter.Write_open_tag(tmp);

		io_flow_1->XML_serialize(xmlwriter);
		io_flow_2->XML_serialize(xmlwriter);

		xmlwriter.Write_close_tag();
		xmlwriter.Write_close_tag();
		xmlwriter.Close();
	}
	workload_defs_file.close();

	return io_scenarios;
}

// Assembly:
subq $0x10758, %rsp          # imm = 0x10758
movq %rdi, 0x130(%rsp)
movq %rdi, 0x10750(%rsp)
movl $0x18, %edi
callq 0x8450
movq %rax, %rdi
movq %rdi, 0x128(%rsp)
callq 0xcaa0
movq 0x128(%rsp), %rax
movq %rax, 0x10748(%rsp)
leaq 0x10540(%rsp), %rdi
movq %rdi, 0x138(%rsp)
callq 0x84d0
movq 0x130(%rsp), %rdi
callq 0x8190
movq 0x138(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x82c0
jmp 0xa46a
movb $0x1, 0x10533(%rsp)
movq 0x10540(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x10540(%rsp,%rax), %rdi
callq 0x81e0
movb %al, 0x127(%rsp)
jmp 0xa494
movb 0x127(%rsp), %al
testb $0x1, %al
jne 0xa4a4
jmp 0xa58e
movq 0xcfaed(%rip), %rdi     # 0xd9f98
leaq 0x9ec7e(%rip), %rsi     # 0xa9130
callq 0x8440
movq %rax, 0x118(%rsp)
jmp 0xa4c1
movq 0x118(%rsp), %rdi
movq 0xcfa88(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0xa4d7
movq 0xcfaba(%rip), %rdi     # 0xd9f98
leaq 0x9ec82(%rip), %rsi     # 0xa9167
callq 0x8440
movq %rax, 0x110(%rsp)
jmp 0xa4f4
movq 0x110(%rsp), %rdi
movq 0xcfa55(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0xa50a
movq 0xcfa87(%rip), %rdi     # 0xd9f98
leaq 0x9ec7b(%rip), %rsi     # 0xa9193
callq 0x8440
movq %rax, 0x108(%rsp)
jmp 0xa527
movq 0x108(%rsp), %rdi
movq 0xcfa22(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0xa53d
movq 0xcfa54(%rip), %rdi     # 0xd9f98
leaq 0x9eb76(%rip), %rsi     # 0xa90c1
callq 0x8440
movq %rax, 0x100(%rsp)
jmp 0xa55a
movq 0x100(%rsp), %rdi
movq 0xcf9ef(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0xa570
jmp 0xab0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
jmp 0xb522
leaq 0x10500(%rsp), %rdi
leaq 0x10540(%rsp), %rsi
callq 0xc6c0
leaq 0x104f0(%rsp), %rdi
callq 0xc720
leaq 0x104ef(%rsp), %rdi
movq %rdi, 0xf8(%rsp)
callq 0x8780
movq 0xf8(%rsp), %r9
movq 0x10500(%rsp), %rsi
movl 0x10508(%rsp), %edx
movq 0x104f0(%rsp), %rcx
movl 0x104f8(%rsp), %r8d
leaq 0x10510(%rsp), %rdi
callq 0xc750
jmp 0xa5fb
leaq 0x104ef(%rsp), %rdi
callq 0x84a0
leaq 0x10510(%rsp), %rdi
leaq 0x9eac8(%rip), %rsi     # 0xa90df
callq 0x8140
cmpl $0x0, %eax
je 0xaaed
leaq 0x460(%rsp), %rdi
callq 0xc7f0
jmp 0xa634
leaq 0x10510(%rsp), %rdi
callq 0x8660
movq %rax, %rdi
incq %rdi
callq 0x8030
movq %rax, 0xf0(%rsp)
jmp 0xa656
movq 0xf0(%rsp), %rax
movq %rax, 0x458(%rsp)
movq 0x458(%rsp), %rax
movq %rax, 0xe8(%rsp)
leaq 0x10510(%rsp), %rdi
callq 0x8190
movq 0xe8(%rsp), %rdi
movq %rax, %rsi
callq 0x8400
movq 0x458(%rsp), %rsi
leaq 0x460(%rsp), %rdi
callq 0xc820
jmp 0xa6aa
leaq 0x9eb35(%rip), %rsi     # 0xa91e6
xorl %eax, %eax
movl %eax, %edx
leaq 0x460(%rsp), %rdi
movl $0x1, %ecx
callq 0xc960
movq %rax, 0xe0(%rsp)
jmp 0xa6d1
movq 0xe0(%rsp), %rax
movq %rax, 0x450(%rsp)
cmpq $0x0, 0x450(%rsp)
je 0xaa07
movq 0x450(%rsp), %rdi
leaq 0x9eafa(%rip), %rsi     # 0xa91f9
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xc960
movq %rax, 0xd8(%rsp)
jmp 0xa717
movq 0xd8(%rsp), %rax
movq %rax, 0x448(%rsp)
cmpq $0x0, 0x448(%rsp)
je 0xaa02
movl $0x18, %edi
callq 0x8450
movq %rax, 0xd0(%rsp)
jmp 0xa74a
movq 0xd0(%rsp), %rdi
callq 0xcab0
movq 0xd0(%rsp), %rax
movq %rax, 0x440(%rsp)
movq 0x448(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xc960
movq %rax, 0xc8(%rsp)
jmp 0xa78a
movq 0xc8(%rsp), %rax
movq %rax, 0x438(%rsp)
cmpq $0x0, 0x438(%rsp)
je 0xa9a7
movq 0x438(%rsp), %rdi
callq 0xcac0
movq %rax, 0xc0(%rsp)
jmp 0xa7c0
movq 0xc0(%rsp), %rdi
leaq 0x9ea36(%rip), %rsi     # 0xa9205
callq 0x85f0
cmpl $0x0, %eax
jne 0xa8ae
movl $0x90, %edi
callq 0x8450
movq %rax, 0xb8(%rsp)
jmp 0xa7f1
movq 0xb8(%rsp), %rdi
callq 0xcb00
jmp 0xa800
movq 0xb8(%rsp), %rax
movq %rax, 0x430(%rsp)
movq 0x430(%rsp), %rdi
movq 0x438(%rsp), %rsi
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
jmp 0xa82b
jmp 0xa956
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
leaq 0x104ef(%rsp), %rdi
callq 0x84a0
jmp 0xb522
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
jmp 0xaafc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
jmp 0xaade
movq 0xb8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
callq 0x8410
jmp 0xaade
movq 0x438(%rsp), %rdi
callq 0xcac0
movq %rax, 0xb0(%rsp)
jmp 0xa8c5
movq 0xb0(%rsp), %rdi
leaq 0x9e951(%rip), %rsi     # 0xa9225
callq 0x85f0
cmpl $0x0, %eax
jne 0xa954
movl $0x80, %edi
callq 0x8450
movq %rax, 0xa8(%rsp)
jmp 0xa8f2
movq 0xa8(%rsp), %rdi
callq 0xcb40
jmp 0xa901
movq 0xa8(%rsp), %rax
movq %rax, 0x430(%rsp)
movq 0x430(%rsp), %rdi
movq 0x438(%rsp), %rsi
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
jmp 0xa92c
jmp 0xa954
movq 0xa8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
callq 0x8410
jmp 0xaade
jmp 0xa956
movq 0x440(%rsp), %rdi
leaq 0x430(%rsp), %rsi
callq 0xcb90
jmp 0xa96d
jmp 0xa96f
movq 0x438(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xcc00
movq %rax, 0xa0(%rsp)
jmp 0xa992
movq 0xa0(%rsp), %rax
movq %rax, 0x438(%rsp)
jmp 0xa79a
movq 0x10748(%rsp), %rdi
leaq 0x440(%rsp), %rsi
callq 0xcd10
jmp 0xa9be
movb $0x0, 0x10533(%rsp)
movq 0x448(%rsp), %rdi
leaq 0x9e824(%rip), %rsi     # 0xa91f9
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xcc00
movq %rax, 0x98(%rsp)
jmp 0xa9ed
movq 0x98(%rsp), %rax
movq %rax, 0x448(%rsp)
jmp 0xa727
jmp 0xaacf
movq 0xcf58a(%rip), %rdi     # 0xd9f98
leaq 0x9e832(%rip), %rsi     # 0xa9247
callq 0x8440
movq %rax, 0x90(%rsp)
jmp 0xaa24
movq 0x90(%rsp), %rdi
movq 0xcf525(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0xaa3a
movq 0xcf557(%rip), %rdi     # 0xd9f98
leaq 0x9e71f(%rip), %rsi     # 0xa9167
callq 0x8440
movq %rax, 0x88(%rsp)
jmp 0xaa57
movq 0x88(%rsp), %rdi
movq 0xcf4f2(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0xaa6d
movq 0xcf524(%rip), %rdi     # 0xd9f98
leaq 0x9e718(%rip), %rsi     # 0xa9193
callq 0x8440
movq %rax, 0x80(%rsp)
jmp 0xaa8a
movq 0x80(%rsp), %rdi
movq 0xcf4bf(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0xaaa0
movq 0xcf4f1(%rip), %rdi     # 0xd9f98
leaq 0x9e613(%rip), %rsi     # 0xa90c1
callq 0x8440
movq %rax, 0x78(%rsp)
jmp 0xaaba
movq 0x78(%rsp), %rdi
movq 0xcf492(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0xaacd
jmp 0xaacf
leaq 0x460(%rsp), %rdi
callq 0xca80
jmp 0xaaed
leaq 0x460(%rsp), %rdi
callq 0xca80
jmp 0xaafc
leaq 0x10510(%rsp), %rdi
callq 0x8848
jmp 0xab0e
leaq 0x10510(%rsp), %rdi
callq 0x8848
jmp 0xb522
testb $0x1, 0x10533(%rsp)
je 0xb4ee
movl $0x18, %edi
callq 0x8450
movq %rax, 0x70(%rsp)
jmp 0xab2d
movq 0x70(%rsp), %rdi
callq 0xcab0
movq 0x70(%rsp), %rax
movq %rax, 0x428(%rsp)
movl $0x90, %edi
callq 0x8450
movq %rax, 0x68(%rsp)
jmp 0xab55
movq 0x68(%rsp), %rdi
callq 0xcb00
jmp 0xab61
movq 0x68(%rsp), %rax
movq %rax, 0x420(%rsp)
movq 0x420(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x420(%rsp), %rax
movl $0x0, 0xc(%rax)
movq 0x420(%rsp), %rax
movl $0x1, 0x10(%rax)
movq 0x420(%rsp), %rax
movl $0x8, 0x3c(%rax)
movl $0x20, %edi
callq 0x8030
movq %rax, 0x60(%rsp)
jmp 0xabbb
movq 0x60(%rsp), %rcx
movq 0x420(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x420(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x0, (%rax)
movq 0x420(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x1, 0x4(%rax)
movq 0x420(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x2, 0x8(%rax)
movq 0x420(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x3, 0xc(%rax)
movq 0x420(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x4, 0x10(%rax)
movq 0x420(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x5, 0x14(%rax)
movq 0x420(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x6, 0x18(%rax)
movq 0x420(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x7, 0x1c(%rax)
movq 0x420(%rsp), %rax
movl $0x4, 0x40(%rax)
movl $0x10, %edi
callq 0x8030
movq %rax, 0x58(%rsp)
jmp 0xac83
movq 0x58(%rsp), %rcx
movq 0x420(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x420(%rsp), %rax
movq 0x20(%rax), %rax
movl $0x0, (%rax)
movq 0x420(%rsp), %rax
movq 0x20(%rax), %rax
movl $0x1, 0x4(%rax)
movq 0x420(%rsp), %rax
movq 0x20(%rax), %rax
movl $0x2, 0x8(%rax)
movq 0x420(%rsp), %rax
movq 0x20(%rax), %rax
movl $0x3, 0xc(%rax)
movq 0x420(%rsp), %rax
movl $0x2, 0x44(%rax)
movl $0x8, %edi
callq 0x8030
movq %rax, 0x50(%rsp)
jmp 0xacff
movq 0x50(%rsp), %rcx
movq 0x420(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x420(%rsp), %rax
movq 0x28(%rax), %rax
movl $0x0, (%rax)
movq 0x420(%rsp), %rax
movq 0x28(%rax), %rax
movl $0x1, 0x4(%rax)
movq 0x420(%rsp), %rax
movl $0x2, 0x48(%rax)
movl $0x8, %edi
callq 0x8030
movq %rax, 0x48(%rsp)
jmp 0xad55
movq 0x48(%rsp), %rcx
movq 0x420(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x420(%rsp), %rax
movq 0x30(%rax), %rax
movl $0x0, (%rax)
movq 0x420(%rsp), %rax
movq 0x30(%rax), %rax
movl $0x1, 0x4(%rax)
movq 0x420(%rsp), %rax
movl $0x32, 0x38(%rax)
movq 0x420(%rsp), %rax
movl $0x55, 0x4c(%rax)
movq 0x420(%rsp), %rax
movl $0x1, 0x50(%rax)
movq 0x420(%rsp), %rax
movb $0x64, 0x54(%rax)
movq 0x420(%rsp), %rax
movl $0x2, 0x58(%rax)
movq 0x420(%rsp), %rax
movb $0x0, 0x5c(%rax)
movq 0x420(%rsp), %rax
movb $0x1, 0x5d(%rax)
movq 0x420(%rsp), %rax
movl $0x10, 0x60(%rax)
movq 0x420(%rsp), %rax
movl $0x0, 0x64(%rax)
movq 0x420(%rsp), %rax
movl $0x8, 0x68(%rax)
movq 0x420(%rsp), %rax
movl $0x0, 0x6c(%rax)
movq 0x420(%rsp), %rax
movl $0x3038, 0x70(%rax)     # imm = 0x3038
movq 0x420(%rsp), %rax
movl $0x2, 0x74(%rax)
movq 0x420(%rsp), %rax
movl $0x40000, 0x78(%rax)    # imm = 0x40000
movq 0x420(%rsp), %rax
movq $0x3b9aca00, 0x80(%rax) # imm = 0x3B9ACA00
movq 0x420(%rsp), %rax
movl $0x0, 0x88(%rax)
movq 0x428(%rsp), %rdi
movq 0x420(%rsp), %rax
movq %rax, 0x418(%rsp)
leaq 0x418(%rsp), %rsi
callq 0xcd80
jmp 0xaea0
movl $0x90, %edi
callq 0x8450
movq %rax, 0x40(%rsp)
jmp 0xaeb1
movq 0x40(%rsp), %rdi
callq 0xcb00
jmp 0xaebd
movq 0x40(%rsp), %rax
movq %rax, 0x410(%rsp)
movq 0x410(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x410(%rsp), %rax
movl $0x0, 0xc(%rax)
movq 0x410(%rsp), %rax
movl $0x1, 0x10(%rax)
movq 0x410(%rsp), %rax
movl $0x8, 0x3c(%rax)
movl $0x20, %edi
callq 0x8030
movq %rax, 0x38(%rsp)
jmp 0xaf17
movq 0x38(%rsp), %rcx
movq 0x410(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x410(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x0, (%rax)
movq 0x410(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x1, 0x4(%rax)
movq 0x410(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x2, 0x8(%rax)
movq 0x410(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x3, 0xc(%rax)
movq 0x410(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x4, 0x10(%rax)
movq 0x410(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x5, 0x14(%rax)
movq 0x410(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x6, 0x18(%rax)
movq 0x410(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x7, 0x1c(%rax)
movq 0x410(%rsp), %rax
movl $0x4, 0x40(%rax)
movl $0x10, %edi
callq 0x8030
movq %rax, 0x30(%rsp)
jmp 0xafdf
movq 0x30(%rsp), %rcx
movq 0x410(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x410(%rsp), %rax
movq 0x20(%rax), %rax
movl $0x0, (%rax)
movq 0x410(%rsp), %rax
movq 0x20(%rax), %rax
movl $0x1, 0x4(%rax)
movq 0x410(%rsp), %rax
movq 0x20(%rax), %rax
movl $0x2, 0x8(%rax)
movq 0x410(%rsp), %rax
movq 0x20(%rax), %rax
movl $0x3, 0xc(%rax)
movq 0x410(%rsp), %rax
movl $0x2, 0x44(%rax)
movl $0x8, %edi
callq 0x8030
movq %rax, 0x28(%rsp)
jmp 0xb05b
movq 0x28(%rsp), %rcx
movq 0x410(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x410(%rsp), %rax
movq 0x28(%rax), %rax
movl $0x0, (%rax)
movq 0x410(%rsp), %rax
movq 0x28(%rax), %rax
movl $0x1, 0x4(%rax)
movq 0x410(%rsp), %rax
movl $0x2, 0x48(%rax)
movl $0x8, %edi
callq 0x8030
movq %rax, 0x20(%rsp)
jmp 0xb0b1
movq 0x20(%rsp), %rcx
movq 0x410(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x410(%rsp), %rax
movq 0x30(%rax), %rax
movl $0x0, (%rax)
movq 0x410(%rsp), %rax
movq 0x30(%rax), %rax
movl $0x1, 0x4(%rax)
movq 0x410(%rsp), %rax
movl $0x32, 0x38(%rax)
movq 0x410(%rsp), %rax
movl $0x55, 0x4c(%rax)
movq 0x410(%rsp), %rax
movl $0x1, 0x50(%rax)
movq 0x410(%rsp), %rax
movb $0x64, 0x54(%rax)
movq 0x410(%rsp), %rax
movl $0x2, 0x58(%rax)
movq 0x410(%rsp), %rax
movb $0x0, 0x5c(%rax)
movq 0x410(%rsp), %rax
movb $0x1, 0x5d(%rax)
movq 0x410(%rsp), %rax
movl $0x10, 0x60(%rax)
movq 0x410(%rsp), %rax
movl $0x0, 0x64(%rax)
movq 0x410(%rsp), %rax
movl $0x8, 0x68(%rax)
movq 0x410(%rsp), %rax
movl $0x0, 0x6c(%rax)
movq 0x410(%rsp), %rax
movl $0x1985, 0x70(%rax)     # imm = 0x1985
movq 0x410(%rsp), %rax
movl $0x2, 0x74(%rax)
movq 0x410(%rsp), %rax
movl $0x20000, 0x78(%rax)    # imm = 0x20000
movq 0x410(%rsp), %rax
movq $0x3b9aca00, 0x80(%rax) # imm = 0x3B9ACA00
movq 0x410(%rsp), %rax
movl $0x0, 0x88(%rax)
movq 0x428(%rsp), %rdi
movq 0x410(%rsp), %rax
movq %rax, 0x408(%rsp)
leaq 0x408(%rsp), %rsi
callq 0xcd80
jmp 0xb1fc
movq 0x10748(%rsp), %rdi
leaq 0x428(%rsp), %rsi
callq 0xcd10
jmp 0xb213
movq 0xced7e(%rip), %rdi     # 0xd9f98
leaq 0x9e04d(%rip), %rsi     # 0xa926e
callq 0x8440
movq %rax, 0x18(%rsp)
jmp 0xb22d
movq 0x18(%rsp), %rdi
movq 0xced1f(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0xb240
leaq 0x1c8(%rsp), %rdi
callq 0xc640
jmp 0xb24f
leaq 0x1a8(%rsp), %rdi
callq 0x85e0
movq 0x130(%rsp), %rdi
callq 0x8190
movq %rax, 0x8(%rsp)
leaq 0x187(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x8780
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x188(%rsp), %rdi
callq 0x85d0
jmp 0xb299
leaq 0x1c8(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0xa7cb0
jmp 0xb2b0
leaq 0x188(%rsp), %rdi
callq 0x8848
leaq 0x187(%rsp), %rdi
callq 0x84a0
leaq 0x9df15(%rip), %rsi     # 0xa91e6
leaq 0x1a8(%rsp), %rdi
callq 0x85c0
jmp 0xb2e0
leaq 0x160(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x81a0
jmp 0xb2f7
leaq 0x1c8(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0xa7d60
jmp 0xb30e
leaq 0x160(%rsp), %rdi
callq 0x8848
leaq 0x9ded7(%rip), %rsi     # 0xa91f9
leaq 0x1a8(%rsp), %rdi
callq 0x85c0
jmp 0xb331
leaq 0x140(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x81a0
jmp 0xb348
leaq 0x1c8(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0xa7d60
jmp 0xb35f
leaq 0x140(%rsp), %rdi
callq 0x8848
movq 0x420(%rsp), %rdi
movq (%rdi), %rax
movq (%rax), %rax
leaq 0x1c8(%rsp), %rsi
callq *%rax
jmp 0xb386
movq 0x410(%rsp), %rdi
movq (%rdi), %rax
movq (%rax), %rax
leaq 0x1c8(%rsp), %rsi
callq *%rax
jmp 0xb3a0
leaq 0x1c8(%rsp), %rdi
callq 0xa80f0
jmp 0xb3af
leaq 0x1c8(%rsp), %rdi
callq 0xa80f0
jmp 0xb3be
leaq 0x1c8(%rsp), %rdi
callq 0xa7d30
jmp 0xb3cd
leaq 0x1a8(%rsp), %rdi
callq 0x8848
leaq 0x1c8(%rsp), %rdi
callq 0xc680
jmp 0xb4ee
movq 0x68(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
callq 0x8410
jmp 0xb522
movq 0x40(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
callq 0x8410
jmp 0xb522
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
jmp 0xb469
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x8848
leaq 0x187(%rsp), %rdi
callq 0x84a0
jmp 0xb4d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
jmp 0xb4d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x8848
jmp 0xb4d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10538(%rsp)
movl %eax, 0x10534(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x8848
leaq 0x1a8(%rsp), %rdi
callq 0x8848
leaq 0x1c8(%rsp), %rdi
callq 0xc680
jmp 0xb522
leaq 0x10540(%rsp), %rdi
callq 0x80d0
jmp 0xb4fd
movq 0x10748(%rsp), %rax
movq %rax, (%rsp)
leaq 0x10540(%rsp), %rdi
callq 0x8120
movq (%rsp), %rax
addq $0x10758, %rsp          # imm = 0x10758
retq
leaq 0x10540(%rsp), %rdi
callq 0x8120
movq 0x10538(%rsp), %rdi
callq 0x8770
nopl (%rax)