// File: CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Manager_Base.cpp
// Function: SSD_Components::Data_Cache_Manager_Base::Data_Cache_Manager_Base(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, SSD_Components::Host_Interface_Base*, SSD_Components::NVM_Firmware*, unsigned int, unsigned int, unsigned int, unsigned long, unsigned long, unsigned long, SSD_Components::Caching_Mode*, SSD_Components::Cache_Sharing_Mode, unsigned int)
Data_Cache_Manager_Base::Data_Cache_Manager_Base(const sim_object_id_type& id, Host_Interface_Base* host_interface, NVM_Firmware* nvm_firmware,
		unsigned int dram_row_size, unsigned int dram_data_rate, unsigned int dram_busrt_size, sim_time_type dram_tRCD, sim_time_type dram_tCL, sim_time_type dram_tRP,
		Caching_Mode* caching_mode_per_input_stream, Cache_Sharing_Mode sharing_mode, unsigned int stream_count)
		: MQSimEngine::Sim_Object(id), host_interface(host_interface), nvm_firmware(nvm_firmware),
		dram_row_size(dram_row_size), dram_data_rate(dram_data_rate), dram_busrt_size(dram_busrt_size), dram_tRCD(dram_tRCD), dram_tCL(dram_tCL), dram_tRP(dram_tRP),
		sharing_mode(sharing_mode), stream_count(stream_count)
	{
		_my_instance = this;
		dram_burst_transfer_time_ddr = (double) ONE_SECOND / (dram_data_rate * 1000 * 1000);
		this->caching_mode_per_input_stream = new Caching_Mode[stream_count];
		for (unsigned int i = 0; i < stream_count; i++) {
			this->caching_mode_per_input_stream[i] = caching_mode_per_input_stream[i];
		}
	}

// Assembly:
subq $0x58, %rsp
movl 0x90(%rsp), %eax
movl 0x88(%rsp), %eax
movq 0x80(%rsp), %rax
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rax
movl 0x60(%rsp), %eax
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movl %r8d, 0x34(%rsp)
movl %r9d, 0x30(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq 0x48(%rsp), %rsi
callq 0x1fd60
movq 0x10(%rsp), %rdi
leaq 0x71865(%rip), %rax     # 0xd91f0
movq %rax, (%rdi)
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rdi)
movq 0x38(%rsp), %rax
movq %rax, 0x38(%rdi)
movl 0x34(%rsp), %eax
movl %eax, 0x40(%rdi)
movl 0x30(%rsp), %eax
movl %eax, 0x44(%rdi)
movl 0x60(%rsp), %eax
movl %eax, 0x48(%rdi)
movq 0x68(%rsp), %rax
movq %rax, 0x58(%rdi)
movq 0x70(%rsp), %rax
movq %rax, 0x60(%rdi)
movq 0x78(%rsp), %rax
movq %rax, 0x68(%rdi)
movl 0x88(%rsp), %eax
movl %eax, 0x70(%rdi)
movl 0x90(%rsp), %eax
movl %eax, 0x74(%rdi)
addq $0x78, %rdi
movq %rdi, (%rsp)
callq 0x67d40
movq 0x10(%rsp), %rdi
addq $0x90, %rdi
movq %rdi, 0x8(%rsp)
callq 0x67d50
movq 0x10(%rsp), %rax
movq %rax, 0x72ccd(%rip)     # 0xda6e0
movl 0x30(%rsp), %ecx
imull $0xf4240, %ecx, %ecx    # imm = 0xF4240
cvtsi2sd %rcx, %xmm1
movsd 0x43f7e(%rip), %xmm0    # 0xab9a8
divsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rax)
movl 0x90(%rsp), %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x8030
movq %rax, 0x18(%rsp)
jmp 0x67a4c
movq 0x18(%rsp), %rax
movq %rax, 0x72c90(%rip)     # 0xda6e8
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x90(%rsp), %eax
jae 0x67ac4
movq 0x80(%rsp), %rax
movl 0x20(%rsp), %ecx
movl (%rax,%rcx,4), %edx
movq 0x72c65(%rip), %rax     # 0xda6e8
movl 0x20(%rsp), %ecx
movl %edx, (%rax,%rcx,4)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x67a60
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x67d60
movq (%rsp), %rdi
callq 0x67dc0
movq 0x10(%rsp), %rdi
callq 0x1ff90
jmp 0x67ac9
addq $0x58, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x8770
nopw %cs:(%rax,%rax)