// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Manager_Flash_Simple.cpp
// Function: SSD_Components::Data_Cache_Manager_Flash_Simple::Data_Cache_Manager_Flash_Simple(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, SSD_Components::Host_Interface_Base*, SSD_Components::NVM_Firmware*, SSD_Components::NVM_PHY_ONFI*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned long, unsigned long, unsigned long, SSD_Components::Caching_Mode*, unsigned int, unsigned int, unsigned int)
Data_Cache_Manager_Flash_Simple::Data_Cache_Manager_Flash_Simple(const sim_object_id_type& id, Host_Interface_Base* host_interface, NVM_Firmware* firmware, NVM_PHY_ONFI* flash_controller,
		unsigned int total_capacity_in_bytes,
		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, unsigned int stream_count, unsigned int sector_no_per_page, unsigned int back_pressure_buffer_max_depth)
		: Data_Cache_Manager_Base(id, host_interface, firmware, dram_row_size, dram_data_rate, dram_busrt_size, dram_tRCD, dram_tCL, dram_tRP, caching_mode_per_input_stream, Cache_Sharing_Mode::SHARED, stream_count),
		flash_controller(flash_controller), capacity_in_bytes(total_capacity_in_bytes), sector_no_per_page(sector_no_per_page),	request_queue_turn(0), back_pressure_buffer_max_depth(back_pressure_buffer_max_depth)
	{
		capacity_in_pages = capacity_in_bytes / (SECTOR_SIZE_IN_BYTE * sector_no_per_page);
		data_cache = new Data_Cache_Flash(capacity_in_pages);
		dram_execution_queue = new std::queue<Memory_Transfer_Info*>[stream_count];
		waiting_user_requests_queue_for_dram_free_slot = new std::list<User_Request*>[stream_count];
		this->back_pressure_buffer_depth = 0;
		bloom_filter = new std::set<LPA_type>[stream_count];
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %ebp
movq %r8, %r14
movq %rdi, %rbx
movl 0xb8(%rsp), %r12d
movl 0xc0(%rsp), %r15d
movl 0x80(%rsp), %r8d
movl 0x88(%rsp), %r9d
movl 0x90(%rsp), %eax
movups 0x98(%rsp), %xmm0
movups 0xa8(%rsp), %xmm1
movl %r12d, 0x30(%rsp)
xorl %r13d, %r13d
movl %r13d, 0x28(%rsp)
movups %xmm1, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movl %eax, (%rsp)
callq 0x31ffc
leaq 0x398c8(%rip), %rax     # 0x6e2b8
movq %rax, (%rbx)
movq %r14, 0xa8(%rbx)
movl %ebp, 0xb0(%rbx)
movl %r15d, 0xb8(%rbx)
movl %r13d, 0xd8(%rbx)
movl 0xc8(%rsp), %eax
movl %eax, 0xdc(%rbx)
movq $0x3b9aca00, 0xf0(%rbx) # imm = 0x3B9ACA00
movq $0x0, 0xf8(%rbx)
shll $0x9, %r15d
movl %ebp, %eax
xorl %edx, %edx
divl %r15d
movl %eax, %ebp
movl %eax, 0xb4(%rbx)
movl $0x58, %edi
callq 0x73a0
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
callq 0x314e8
movq %r14, 0xc0(%rbx)
movl %r12d, %ebp
movq %rbp, %r13
shlq $0x4, %r13
leaq 0x8(,%r13,4), %rdi
addq %r13, %rdi
callq 0x7030
movq %rbp, (%rax)
movq %rax, 0x38(%rsp)
addq $0x8, %rax
movq %rax, 0x40(%rsp)
testl %r12d, %r12d
je 0x34ada
leaq (,%r13,4), %r14
addq %r13, %r14
negq %r14
xorl %r12d, %r12d
movq 0x40(%rsp), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%r15)
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
movq %r15, %rdi
xorl %esi, %esi
callq 0x345a2
addq $-0x50, %r12
addq $0x50, %r15
cmpq %r12, %r14
jne 0x34aa8
movq 0x40(%rsp), %rax
movq %rax, 0xc8(%rbx)
leaq (,%rbp,2), %r14
addq %rbp, %r14
leaq 0x8(,%r14,8), %rdi
callq 0x7030
movl 0xb8(%rsp), %r15d
movq %rax, %rcx
addq $0x8, %rax
movq %rbp, (%rcx)
testl %r15d, %r15d
je 0x34b34
leaq (%rax,%r14,8), %rcx
movq %rax, %rdx
movq %rdx, 0x8(%rdx)
movq %rdx, (%rdx)
movq $0x0, 0x10(%rdx)
addq $0x18, %rdx
cmpq %rcx, %rdx
jne 0x34b1c
movq %rax, 0xd0(%rbx)
movl $0x0, 0xe0(%rbx)
leaq 0x8(,%r13,2), %rdi
addq %r13, %rdi
callq 0x7030
leaq 0x8(%rax), %rcx
movq %rbp, (%rax)
testl %r15d, %r15d
je 0x34b92
addq $0x10, %rax
leaq (,%r13,2), %rdx
addq %r13, %rdx
xorl %esi, %esi
movl $0x0, (%rax)
movq %rsi, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rsi, 0x20(%rax)
addq $0x30, %rax
addq $-0x30, %rdx
jne 0x34b72
movq %rcx, 0xe8(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x7370
jmp 0x34be7
movq %rax, %r15
jmp 0x34be7
movq %rax, %r15
testq %r12, %r12
je 0x34bdd
negq %r12
movq 0x38(%rsp), %r14
addq $-0x48, %r14
leaq (%r14,%r12), %rdi
callq 0x34558
addq $-0x50, %r12
jne 0x34bce
movq 0x38(%rsp), %rdi
callq 0x7480
movq %rbx, %rdi
callq 0x32140
movq %r15, %rdi
callq 0x7620
nop