// File: /workspace/github_cpp_makefile_star2_O2/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), %edi
movl 0xc8(%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 %edi, 0x30(%rsp)
movups %xmm1, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
andl $0x0, 0x28(%rsp)
movl %eax, (%rsp)
movq %rbx, %rdi
callq 0x29400
leaq 0x35dda(%rip), %rax     # 0x61298
movq %rax, (%rbx)
movq %r14, 0xa8(%rbx)
movl %ebp, 0xb0(%rbx)
movl %r15d, 0xb8(%rbx)
andl $0x0, 0xd8(%rbx)
movl %r12d, 0xdc(%rbx)
movq $0x3b9aca00, 0xf0(%rbx) # imm = 0x3B9ACA00
andq $0x0, 0xf8(%rbx)
shll $0x9, %r15d
movl %ebp, %eax
xorl %edx, %edx
divl %r15d
movl %eax, %ebp
movl %eax, 0xb4(%rbx)
pushq $0x58
popq %rdi
callq 0x7370
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
callq 0x28798
movq %r14, 0xc0(%rbx)
movl 0xb8(%rsp), %r13d
imulq $0x50, %r13, %rdi
orq $0x8, %rdi
callq 0x7030
movq %r13, (%rax)
movq %rax, 0x40(%rsp)
leaq 0x8(%rax), %r12
cmpl $0x0, 0xb8(%rsp)
je 0x2b56e
imulq $-0x50, %r13, %r14
xorl %ebp, %ebp
movq %r12, %r15
movq %r15, %rdi
callq 0x2aaf0
addq $-0x50, %rbp
addq $0x50, %r15
cmpq %rbp, %r14
jne 0x2b559
movq %r12, 0xc8(%rbx)
imulq $0x18, %r13, %r14
leaq 0x8(%r14), %rdi
callq 0x7030
movq %rax, %rcx
addq $0x8, %rax
movq %r13, (%rcx)
cmpl $0x0, 0xb8(%rsp)
je 0x2b5b1
addq %rax, %r14
movq %rax, %rcx
movq %rcx, 0x8(%rcx)
movq %rcx, (%rcx)
andq $0x0, 0x10(%rcx)
addq $0x18, %rcx
cmpq %r14, %rcx
jne 0x2b59c
movq %rax, 0xd0(%rbx)
andl $0x0, 0xe0(%rbx)
imulq $0x30, %r13, %r14
leaq 0x8(%r14), %rdi
callq 0x7030
leaq 0x8(%rax), %rcx
movq %r13, (%rax)
cmpl $0x0, 0xb8(%rsp)
je 0x2b600
addq $0x10, %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
addq $0x30, %rax
addq $-0x30, %r14
jne 0x2b5e1
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 0x7340
jmp 0x2b655
movq %rax, %r15
jmp 0x2b655
movq %rax, %r15
testq %rbp, %rbp
je 0x2b64b
negq %rbp
movq 0x40(%rsp), %r14
addq $-0x48, %r14
leaq (%r14,%rbp), %rdi
callq 0x2ad54
addq $-0x50, %rbp
jne 0x2b63c
movq 0x40(%rsp), %rdi
callq 0x7430
movq %rbx, %rdi
callq 0x294fe
movq %r15, %rdi
callq 0x75d0
nop