LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Cached_Mapping_Table::Is_dirty(unsigned short, unsigned long)
bool Cached_Mapping_Table::Is_dirty(const stream_id_type streamID, const LPA_type lpa)
	{
		LPA_type key = LPN_TO_UNIQUE_KEY(streamID, lpa);
		auto it = addressMap.find(key);
		if (it == addressMap.end())
		{
			throw std::logic_error("The requested slot does not exist!");
		}

		return it->second->Dirty;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
shlq $0x38, %rsi
orq %rdx, %rsi
movq %rsp, %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x279bc
testq %rax, %rax
je 0x20e3f
movq 0x10(%rax), %rax
movb 0x10(%rax), %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x71b0
movq %rax, %rbx
leaq 0x25847(%rip), %rsi     # 0x46698
movq %rax, %rdi
callq 0x74b0
movq 0x41160(%rip), %rsi     # 0x61fc0
movq 0x41109(%rip), %rdx     # 0x61f70
movq %rbx, %rdi
callq 0x7590
movq %rax, %r14
movq %rbx, %rdi
callq 0x72a0
movq %r14, %rdi
callq 0x75d0
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Cached_Mapping_Table::Make_clean(unsigned short, unsigned long)
void Cached_Mapping_Table::Make_clean(const stream_id_type streamID, const LPA_type lpn)
	{
		LPA_type key = LPN_TO_UNIQUE_KEY(streamID, lpn);
		auto it = addressMap.find(key);
		if (it == addressMap.end()) {
			throw std::logic_error("The requested slot does not exist!");
		}

		it->second->Dirty = false;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
shlq $0x38, %rsi
orq %rdx, %rsi
movq %rsp, %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x279bc
testq %rax, %rax
je 0x20eb0
movq 0x10(%rax), %rax
movb $0x0, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x71b0
movq %rax, %rbx
leaq 0x257d6(%rip), %rsi     # 0x46698
movq %rax, %rdi
callq 0x74b0
movq 0x410ef(%rip), %rsi     # 0x61fc0
movq 0x41098(%rip), %rdx     # 0x61f70
movq %rbx, %rdi
callq 0x7590
movq %rax, %r14
movq %rbx, %rdi
callq 0x72a0
movq %r14, %rdi
callq 0x75d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::AddressMappingDomain::~AddressMappingDomain()
AddressMappingDomain::~AddressMappingDomain()
	{
		delete CMT;
		delete[] GlobalMappingTable;
		delete[] GlobalTranslationDirectory;

		auto read_entry = Waiting_unmapped_read_transactions.begin();
		while (read_entry != Waiting_unmapped_read_transactions.end()) {
			delete read_entry->second;
			Waiting_unmapped_read_transactions.erase(read_entry++);
		}

		auto entry_write = Waiting_unmapped_program_transactions.begin();
		while (entry_write != Waiting_unmapped_program_transactions.end()) {
			delete entry_write->second;
			Waiting_unmapped_program_transactions.erase(entry_write++);
		}

		delete[] Channel_ids;
		delete[] Chip_ids;
		delete[] Die_ids;
		delete[] Plane_ids;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x21385
movq %r14, %rdi
callq 0x209e6
movq %r14, %rdi
callq 0x7340
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2139b
callq 0x7430
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x213a8
callq 0x7430
leaq 0x28(%rbx), %r14
movq 0x40(%rbx), %r15
leaq 0x30(%rbx), %r13
cmpq %r13, %r15
je 0x213dd
movq 0x28(%r15), %rdi
callq 0x7340
movq %r15, %rdi
callq 0x7280
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x27e6c
movq %r12, %r15
jmp 0x213b4
leaq 0x58(%rbx), %r15
movq 0x70(%rbx), %r12
leaq 0x60(%rbx), %rbp
cmpq %rbp, %r12
je 0x21413
movq 0x28(%r12), %rdi
callq 0x7340
movq %r12, %rdi
callq 0x7280
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x27e6c
movq %r13, %r12
jmp 0x213e9
movq 0x210(%rbx), %rdi
testq %rdi, %rdi
je 0x21424
callq 0x7430
movq 0x220(%rbx), %rdi
testq %rdi, %rdi
je 0x21435
callq 0x7430
movq 0x230(%rbx), %rdi
testq %rdi, %rdi
je 0x21446
callq 0x7430
movq 0x240(%rbx), %rdi
testq %rdi, %rdi
je 0x21457
callq 0x7430
leaq 0x1d8(%rbx), %rdi
callq 0x27180
leaq 0x1a8(%rbx), %rdi
callq 0x27180
leaq 0x178(%rbx), %rdi
callq 0x271c8
leaq 0x148(%rbx), %rdi
callq 0x271c8
leaq 0x118(%rbx), %rdi
callq 0x27180
leaq 0xe8(%rbx), %rdi
callq 0x11eea
leaq 0xb8(%rbx), %rdi
callq 0x27180
addq $0x88, %rbx
movq %rbx, %rdi
callq 0x27210
movq %r15, %rdi
callq 0x271c8
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x271c8
jmp 0x214da
movq %rax, %rdi
callq 0x9c29
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::Store_mapping_table_on_flash_at_start()
void Address_Mapping_Unit_Page_Level::Store_mapping_table_on_flash_at_start()
	{
		if (mapping_table_stored_on_flash) {
			return;
		}
		//Since address translation functions work on flash transactions
		NVM_Transaction_Flash_WR* dummy_tr = new NVM_Transaction_Flash_WR(Transaction_Source_Type::MAPPING, 0, 0,
			NO_LPA, 0, NULL, 0, NULL, 0, 0);

		for (unsigned int stream_id = 0; stream_id < no_of_input_streams; stream_id++) {
			dummy_tr->Stream_id = stream_id;
			for (MVPN_type translation_page_id = 0; translation_page_id < domains[stream_id]->Total_translation_pages_no; translation_page_id++) {
				dummy_tr->LPA = (LPA_type)translation_page_id;
				allocate_plane_for_translation_write(dummy_tr);
				allocate_page_in_plane_for_translation_write(dummy_tr, (MVPN_type)dummy_tr->LPA, false);
				flash_controller->Change_flash_page_status_for_preconditioning(dummy_tr->Address, dummy_tr->LPA);
			}
		}
		mapping_table_stored_on_flash = true;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
cmpb $0x0, 0xa1(%rdi)
jne 0x21d37
movq %rdi, %rbx
movl $0xb0, %edi
callq 0x7370
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movups %xmm0, (%rsp)
andq $0x0, 0x20(%rsp)
pushq $0x3
popq %rsi
pushq $-0x1
popq %r8
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x3a2c6
movq %r14, %r15
addq $0x38, %r15
xorl %r12d, %r12d
movl 0x50(%rbx), %eax
cmpq %rax, %r12
jae 0x21d30
movw %r12w, (%r14)
xorl %r13d, %r13d
movq 0xa8(%rbx), %rax
movq (%rax,%r12,8), %rax
movl 0x268(%rax), %eax
cmpq %rax, %r13
jae 0x21d2b
movq %r13, 0x58(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2278e
movl 0x58(%r14), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x21d5e
movq 0x38(%rbx), %rdi
movq 0x58(%r14), %rdx
movq (%rdi), %rax
movq %r15, %rsi
callq *0x60(%rax)
incq %r13
jmp 0x21cdf
incq %r12
jmp 0x21cd0
movb $0x1, 0xa1(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x7340
movq %rbx, %rdi
callq 0x75d0
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::allocate_page_in_plane_for_translation_write(SSD_Components::NVM_Transaction_Flash*, unsigned int, bool)
void Address_Mapping_Unit_Page_Level::allocate_page_in_plane_for_translation_write(NVM_Transaction_Flash* transaction, MVPN_type mvpn, bool is_for_gc)
	{
		AddressMappingDomain* domain = domains[transaction->Stream_id];

		MPPN_type old_MPPN = domain->GlobalTranslationDirectory[mvpn].MPPN;
		/*this is the first access to the mvpn*/
		if (old_MPPN == NO_MPPN) {
			if (is_for_gc) {
				PRINT_ERROR("Unexpected mapping table status in allocate_page_in_plane_for_translation_write for a GC/WL write!")
			}
		} else {
			NVM::FlashMemory::Physical_Page_Address prevAddr;
			Convert_ppa_to_address(old_MPPN, prevAddr);
			block_manager->Invalidate_page_in_block(transaction->Stream_id, prevAddr);
		}

		block_manager->Allocate_block_and_page_in_plane_for_translation_write(transaction->Stream_id, transaction->Address, false);
		transaction->PPA = Convert_address_to_ppa(transaction->Address);
		domain->GlobalTranslationDirectory[mvpn].MPPN = (MPPN_type)transaction->PPA;
		domain->GlobalTranslationDirectory[mvpn].TimeStamp = CurrentTimeStamp;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0xa8(%rdi), %rsi
movzwl (%rbx), %eax
movq (%rsi,%rax,8), %r12
movq (%r12), %rsi
movl %edx, %r13d
shlq $0x4, %r13
movl (%rsi,%r13), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rdx, %rsi
je 0x21dcb
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rdx
callq *0x88(%rax)
movq 0x40(%r14), %rdi
movzwl (%rbx), %esi
movq (%rdi), %rax
movq %r15, %rdx
callq *0x30(%rax)
movzwl (%rbx), %eax
jmp 0x21dcf
testb %cl, %cl
jne 0x21e25
movq 0x40(%r14), %rdi
leaq 0x38(%rbx), %r15
movq (%rdi), %r8
movzwl %ax, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq *0x20(%r8)
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x90(%rax)
movq %rax, 0x60(%rbx)
movq (%r12), %rcx
movl %eax, (%rcx,%r13)
callq 0x1f784
movq %rax, %rdi
callq 0x1fafc
movq (%r12), %rcx
movq %rax, 0x8(%rcx,%r13)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x401c4(%rip), %rbx     # 0x61ff0
leaq 0x22755(%rip), %rsi     # 0x44588
movq %rbx, %rdi
callq 0x7360
leaq 0x24be9(%rip), %rsi     # 0x46a2b
movq %rbx, %rdi
callq 0x7360
movq %rax, %rdi
callq 0x71a0
movq 0x40177(%rip), %rdi     # 0x61fd0
callq 0x73d0
pushq $0x1
popq %rdi
callq 0x73e0
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::Bring_to_CMT_for_preconditioning(unsigned short, unsigned long)
int Address_Mapping_Unit_Page_Level::Bring_to_CMT_for_preconditioning(stream_id_type stream_id, LPA_type lpa)
	{
		if (domains[stream_id]->GlobalMappingTable[lpa].PPA == NO_PPA) {
			PRINT_ERROR("Touching an unallocated logical address in preconditioning!")
		}

		if (domains[stream_id]->CMT->Exists(stream_id, lpa)) {
			return domains[stream_id]->No_of_inserted_entries_in_preconditioning;
		}

		if (domains[stream_id]->CMT->Check_free_slot_availability()) {
			domains[stream_id]->CMT->Reserve_slot_for_lpn(stream_id, lpa);
			domains[stream_id]->CMT->Insert_new_mapping_info(stream_id, lpa,
				domains[stream_id]->GlobalMappingTable[lpa].PPA, domains[stream_id]->GlobalMappingTable[lpa].WrittenStateBitmap);
		} else {
			LPA_type evicted_lpa;
			domains[stream_id]->CMT->Evict_one_slot(evicted_lpa);
			domains[stream_id]->CMT->Reserve_slot_for_lpn(stream_id, lpa);
			domains[stream_id]->CMT->Insert_new_mapping_info(stream_id, lpa,
				domains[stream_id]->GlobalMappingTable[lpa].PPA, domains[stream_id]->GlobalMappingTable[lpa].WrittenStateBitmap);
		}
		domains[stream_id]->No_of_inserted_entries_in_preconditioning++;
		
		return domains[stream_id]->No_of_inserted_entries_in_preconditioning;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0xa8(%rdi), %rax
movl %esi, %r15d
movq (%rax,%r15,8), %rax
movq 0x20(%rax), %rcx
imulq $0x18, %rdx, %r12
cmpq $-0x1, (%rcx,%r12)
je 0x21f5f
movq %rdx, %r14
movq %rdi, %rbx
movq 0x10(%rax), %rdi
movzwl %si, %ebp
movl %ebp, %esi
callq 0x264a2
movq 0xa8(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
testb %al, %al
je 0x21ec0
movl 0x18(%rcx), %eax
jmp 0x21f50
movq 0x10(%rcx), %rsi
movl 0x50(%rsi), %eax
cmpq %rax, 0x18(%rsi)
jae 0x21ee7
movq %rsi, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x20c7c
movq 0xa8(%rbx), %rax
movq (%rax,%r15,8), %rax
jmp 0x21f22
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x20d7a
movq 0xa8(%rbx), %rax
leal (,%r15,8), %r13d
movq (%rax,%r13), %rax
movq 0x10(%rax), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x20c7c
movq 0xa8(%rbx), %rax
movq (%rax,%r13), %rax
movq 0x10(%rax), %rdi
movq 0x20(%rax), %rax
movq (%rax,%r12), %rcx
movq 0x8(%rax,%r12), %r8
movl %ebp, %esi
movq %r14, %rdx
callq 0x20bba
movq 0xa8(%rbx), %rax
movq (%rax,%r15,8), %rcx
movl 0x18(%rcx), %eax
incl %eax
movl %eax, 0x18(%rcx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4008a(%rip), %rbx     # 0x61ff0
leaq 0x2261b(%rip), %rsi     # 0x44588
movq %rbx, %rdi
callq 0x7360
leaq 0x247e2(%rip), %rsi     # 0x4675e
movq %rbx, %rdi
callq 0x7360
movq %rax, %rdi
callq 0x71a0
movq 0x4003d(%rip), %rdi     # 0x61fd0
callq 0x73d0
pushq $0x1
popq %rdi
callq 0x73e0
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::Translate_lpa_to_ppa_and_dispatch(std::__cxx11::list<SSD_Components::NVM_Transaction*, std::allocator<SSD_Components::NVM_Transaction*>> const&)
void Address_Mapping_Unit_Page_Level::Translate_lpa_to_ppa_and_dispatch(const std::list<NVM_Transaction*>& transactionList)
	{
		for (std::list<NVM_Transaction*>::const_iterator it = transactionList.begin();
			it != transactionList.end(); ) {
			if (is_lpa_locked_for_gc((*it)->Stream_id, ((NVM_Transaction_Flash*)(*it))->LPA)) {
				//iterator should be post-incremented since the iterator may be deleted from list
				manage_user_transaction_facing_barrier((NVM_Transaction_Flash*)*(it++));
			} else {
				query_cmt((NVM_Transaction_Flash*)(*it++));
			}
		}

		if (transactionList.size() > 0) {
			ftl->TSU->Prepare_for_transaction_submit();
			for (std::list<NVM_Transaction*>::const_iterator it = transactionList.begin();
				it != transactionList.end(); it++) {
				if (((NVM_Transaction_Flash*)(*it))->Physical_address_determined) {
					ftl->TSU->Submit_transaction(static_cast<NVM_Transaction_Flash*>(*it));
					if (((NVM_Transaction_Flash*)(*it))->Type == Transaction_Type::WRITE) {
						if (((NVM_Transaction_Flash_WR*)(*it))->RelatedRead != NULL) {
							ftl->TSU->Submit_transaction(((NVM_Transaction_Flash_WR*)(*it))->RelatedRead);
						}
					}
				}
			}
			
			ftl->TSU->Schedule();
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
cmpq %r14, %r15
je 0x2200e
movq 0x10(%r15), %rax
movzwl (%rax), %esi
movq 0x58(%rax), %rdx
movq (%rbx), %rax
movq %rbx, %rdi
callq *0xe8(%rax)
movq (%r15), %r12
movq 0x10(%r15), %rsi
movq (%rbx), %rcx
movq %rbx, %rdi
testb %al, %al
je 0x22003
callq *0xd8(%rcx)
movq %r12, %r15
jmp 0x21fcb
callq *0xc8(%rcx)
movq %r12, %r15
jmp 0x21fcb
cmpq $0x0, 0x10(%r14)
je 0x22082
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rdi
callq 0x264ce
movq %r14, %r15
movq (%r15), %r15
cmpq %r14, %r15
je 0x22069
movq 0x10(%r15), %rsi
cmpb $0x1, 0x69(%rsi)
jne 0x22025
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rdi
callq 0x264ec
movq 0x10(%r15), %rax
cmpl $0x1, 0x8(%rax)
jne 0x22025
movq 0x88(%rax), %rsi
testq %rsi, %rsi
je 0x22025
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rdi
callq 0x264ec
jmp 0x22025
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rdi
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *0x30(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::translate_lpa_to_ppa(unsigned short, SSD_Components::NVM_Transaction_Flash*)
bool Address_Mapping_Unit_Page_Level::translate_lpa_to_ppa(stream_id_type streamID, NVM_Transaction_Flash* transaction)
	{
		PPA_type ppa = domains[streamID]->Get_ppa(ideal_mapping_table, streamID, transaction->LPA);

		if (transaction->Type == Transaction_Type::READ) {
			if (ppa == NO_PPA) {
				ppa = online_create_entry_for_reads(transaction->LPA, streamID, transaction->Address, ((NVM_Transaction_Flash_RD*)transaction)->read_sectors_bitmap);
			}
			transaction->PPA = ppa;
			Convert_ppa_to_address(transaction->PPA, transaction->Address);
			block_manager->Read_transaction_issued(transaction->Address);
			transaction->Physical_address_determined = true;
			
			return true;
		} else {//This is a write transaction
			allocate_plane_for_user_write((NVM_Transaction_Flash_WR*)transaction);
			//there are too few free pages remaining only for GC
			if (ftl->GC_and_WL_Unit->Stop_servicing_writes(transaction->Address)){
				return false;
			}
			allocate_page_in_plane_for_user_write((NVM_Transaction_Flash_WR*)transaction, false);
			transaction->Physical_address_determined = true;
			
			return true;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq 0xa8(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rdi
movzbl 0x4c(%r14), %esi
movq 0x58(%rdx), %rcx
movl %ebp, %edx
callq 0x26518
cmpl $0x0, 0x8(%rbx)
je 0x222ec
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2278e
movq 0x30(%r14), %rax
movq 0x48(%rax), %rdi
leaq 0x38(%rbx), %rsi
callq 0x3376a
testb %al, %al
je 0x22338
xorl %eax, %eax
jmp 0x2234b
cmpq $-0x1, %rax
jne 0x22310
leaq 0x38(%rbx), %rcx
movq 0x58(%rbx), %rsi
movq 0x90(%rbx), %r8
movq (%r14), %rax
movzwl %bp, %edx
movq %r14, %rdi
callq *0xd0(%rax)
movq %rax, 0x60(%rbx)
leaq 0x38(%rbx), %r15
movq (%r14), %rcx
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq *0x88(%rcx)
movq 0x40(%r14), %rdi
movq %r15, %rsi
callq 0x31b8a
jmp 0x22345
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x232ce
movb $0x1, 0x69(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::Start_servicing_writes_for_overfull_plane(NVM::FlashMemory::Physical_Page_Address)
void Address_Mapping_Unit_Page_Level::Start_servicing_writes_for_overfull_plane(const NVM::FlashMemory::Physical_Page_Address plane_address)
	{
		std::set<NVM_Transaction_Flash_WR*>& waiting_write_list = Write_transactions_for_overfull_planes[plane_address.ChannelID][plane_address.ChipID][plane_address.DieID][plane_address.PlaneID];

		ftl->TSU->Prepare_for_transaction_submit();
		auto program = waiting_write_list.begin();
		while (program != waiting_write_list.end()) {
			if (translate_lpa_to_ppa((*program)->Stream_id, *program)) {
				ftl->TSU->Submit_transaction(*program);
				if ((*program)->RelatedRead != NULL) {
					ftl->TSU->Submit_transaction((*program)->RelatedRead);
				}
				waiting_write_list.erase(program++);
			}
			else {
				break;
			}
		}
		ftl->TSU->Schedule();
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0xb8(%rdi), %rcx
movl (%rsi), %edx
movl 0x4(%rsi), %edi
movq (%rcx,%rdx,8), %rcx
movq (%rcx,%rdi,8), %rcx
movl 0x8(%rsi), %edx
movq (%rcx,%rdx,8), %r15
movl 0xc(%rsi), %ecx
imulq $0x30, %rcx, %r12
leaq (%r15,%r12), %r14
movq 0x50(%rax), %rdi
callq 0x264ce
leaq (%r15,%r12), %r13
addq $0x8, %r13
movq 0x10(%r13), %r15
cmpq %r13, %r15
je 0x260c6
movq 0x20(%r15), %rdx
movzwl (%rdx), %esi
movq %rbx, %rdi
callq 0x22296
testb %al, %al
je 0x260c6
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rdi
movq 0x20(%r15), %rsi
callq 0x264ec
movq 0x20(%r15), %rax
movq 0x88(%rax), %rsi
testq %rsi, %rsi
je 0x260ab
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rdi
callq 0x264ec
movq %r15, %rdi
callq 0x73b0
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2874c
movq %r12, %r15
jmp 0x26065
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rdi
movq (%rdi), %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *0x30(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Cached_Mapping_Table::Exists(unsigned short, unsigned long)
inline bool Cached_Mapping_Table::Exists(const stream_id_type streamID, const LPA_type lpa)
	{
		LPA_type key = LPN_TO_UNIQUE_KEY(streamID, lpa);
		auto it = addressMap.find(key);
		if (it == addressMap.end()) {
			DEBUG("Address mapping table query - Stream ID:" << streamID << ", LPA:" << lpa << ", MISS")
				return false;
		}
		if (it->second->Status != CMTEntryStatus::VALID) {
			DEBUG("Address mapping table query - Stream ID:" << streamID << ", LPA:" << lpa << ", MISS")
			return false;
		}

		DEBUG("Address mapping table query - Stream ID:" << streamID << ", LPA:" << lpa << ", HIT")
		return true;
	}

// Assembly:
pushq %rax
shlq $0x38, %rsi
orq %rdx, %rsi
movq %rsp, %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x279bc
testq %rax, %rax
je 0x264ca
movq 0x10(%rax), %rax
cmpl $0x2, 0x14(%rax)
sete %al
jmp 0x264cc
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::AddressMappingDomain::Update_mapping_info(bool, unsigned short, unsigned long, unsigned long, unsigned long)
inline void AddressMappingDomain::Update_mapping_info(const bool ideal_mapping, const stream_id_type stream_id, const LPA_type lpa, const PPA_type ppa, const page_status_type page_status_bitmap)
	{
		if (ideal_mapping) {
			GlobalMappingTable[lpa].PPA = ppa;
			GlobalMappingTable[lpa].WrittenStateBitmap = page_status_bitmap;
			GlobalMappingTable[lpa].TimeStamp = CurrentTimeStamp;
		} else {
			CMT->Update_mapping_info(stream_id, lpa, ppa, page_status_bitmap);
		}
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x265e0
movq 0x20(%rbx), %rax
imulq $0x18, %rcx, %r14
movq %r8, (%rax,%r14)
movq %r9, 0x8(%rax,%r14)
callq 0x1f784
movq %rax, %rdi
callq 0x1fafc
movq 0x20(%rbx), %rcx
movq %rax, 0x10(%rcx,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x10(%rbx), %rdi
movzwl %dx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r9, %r8
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20b32
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::Get_data_mapping_info_for_gc(unsigned short, unsigned long, unsigned long&, unsigned long&)
inline void Address_Mapping_Unit_Page_Level::Get_data_mapping_info_for_gc(const stream_id_type stream_id, const LPA_type lpa, PPA_type& ppa, page_status_type& page_state)
	{
		if (domains[stream_id]->Mapping_entry_accessible(ideal_mapping_table, stream_id, lpa)) {
			ppa = domains[stream_id]->Get_ppa(ideal_mapping_table, stream_id, lpa);
			page_state = domains[stream_id]->Get_page_status(ideal_mapping_table, stream_id, lpa);
		} else {
			ppa = domains[stream_id]->GlobalMappingTable[lpa].PPA;
			page_state = domains[stream_id]->GlobalMappingTable[lpa].WrittenStateBitmap;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %r13d
movq %rdi, %r12
movq 0xa8(%rdi), %rax
leal (,%r13,8), %ebp
movq (%rax,%rbp), %rdi
movzbl 0x4c(%r12), %esi
movl %r13d, %edx
movq %r14, %rcx
callq 0x26502
movq 0xa8(%r12), %rcx
movq (%rcx,%rbp), %rdi
testb %al, %al
je 0x266c2
movq %rbx, (%rsp)
movl %r13d, %ebx
movzbl 0x4c(%r12), %esi
movzwl %r13w, %ebp
movl %ebp, %edx
movq %r14, %rcx
callq 0x26518
movq %rax, (%r15)
movq 0xa8(%r12), %rax
movq (%rax,%rbx,8), %rdi
movq (%rsp), %rbx
movzbl 0x4c(%r12), %esi
movl %ebp, %edx
movq %r14, %rcx
callq 0x265fc
jmp 0x266d6
movq 0x20(%rdi), %rax
imulq $0x18, %r14, %rcx
movq (%rax,%rcx), %rdx
movq %rdx, (%r15)
movq 0x8(%rax,%rcx), %rax
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::Convert_ppa_to_address(unsigned long)
inline NVM::FlashMemory::Physical_Page_Address Address_Mapping_Unit_Page_Level::Convert_ppa_to_address(const PPA_type ppa)
	{
		NVM::FlashMemory::Physical_Page_Address target;
		target.ChannelID = (flash_channel_ID_type)(ppa / page_no_per_channel);
		target.ChipID = (flash_chip_ID_type)((ppa % page_no_per_channel) / page_no_per_chip);
		target.DieID = (flash_die_ID_type)(((ppa % page_no_per_channel) % page_no_per_chip) / page_no_per_die);
		target.PlaneID = (flash_plane_ID_type)((((ppa % page_no_per_channel) % page_no_per_chip) % page_no_per_die) / page_no_per_plane);
		target.BlockID = (flash_block_ID_type)(((((ppa % page_no_per_channel) % page_no_per_chip) % page_no_per_die) % page_no_per_plane) / pages_no_per_block);
		target.PageID = (flash_page_ID_type)((((((ppa % page_no_per_channel) % page_no_per_chip) % page_no_per_die) % page_no_per_plane) % pages_no_per_block) % pages_no_per_block);

		return target;
	}

// Assembly:
movq %rdx, %rax
movl 0x88(%rsi), %ecx
xorl %edx, %edx
divq %rcx
movl %eax, (%rdi)
movl %edx, %eax
xorl %edx, %edx
divl 0x8c(%rsi)
movl %eax, 0x4(%rdi)
movl %edx, %eax
xorl %edx, %edx
divl 0x90(%rsi)
movl %eax, 0x8(%rdi)
movl %edx, %eax
xorl %edx, %edx
divl 0x94(%rsi)
movl %eax, 0xc(%rdi)
movl %edx, %eax
xorl %edx, %edx
divl 0x78(%rsi)
movl %eax, 0x10(%rdi)
movl %edx, 0x14(%rdi)
movq %rdi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::Convert_ppa_to_address(unsigned long, NVM::FlashMemory::Physical_Page_Address&)
inline void Address_Mapping_Unit_Page_Level::Convert_ppa_to_address(const PPA_type ppn, NVM::FlashMemory::Physical_Page_Address& address)
	{
		address.ChannelID = (flash_channel_ID_type)(ppn / page_no_per_channel);
		address.ChipID = (flash_chip_ID_type)((ppn % page_no_per_channel) / page_no_per_chip);
		address.DieID = (flash_die_ID_type)(((ppn % page_no_per_channel) % page_no_per_chip) / page_no_per_die);
		address.PlaneID = (flash_plane_ID_type)((((ppn % page_no_per_channel) % page_no_per_chip) % page_no_per_die) / page_no_per_plane);
		address.BlockID = (flash_block_ID_type)(((((ppn % page_no_per_channel) % page_no_per_chip) % page_no_per_die) % page_no_per_plane) / pages_no_per_block);
		address.PageID = (flash_page_ID_type)((((((ppn % page_no_per_channel) % page_no_per_chip) % page_no_per_die) % page_no_per_plane) % pages_no_per_block) % pages_no_per_block);

	}

// Assembly:
movq %rdx, %rcx
movq %rsi, %rax
movl 0x88(%rdi), %esi
xorl %edx, %edx
divq %rsi
movl %eax, (%rcx)
movl %edx, %eax
xorl %edx, %edx
divl 0x8c(%rdi)
movl %eax, 0x4(%rcx)
movl %edx, %eax
xorl %edx, %edx
divl 0x90(%rdi)
movl %eax, 0x8(%rcx)
movl %edx, %eax
xorl %edx, %edx
divl 0x94(%rdi)
movl %eax, 0xc(%rcx)
movl %edx, %eax
xorl %edx, %edx
divl 0x78(%rdi)
movl %eax, 0x10(%rcx)
movl %edx, 0x14(%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::Set_barrier_for_accessing_lpa(unsigned short, unsigned long)
inline void Address_Mapping_Unit_Page_Level::Set_barrier_for_accessing_lpa(stream_id_type stream_id, LPA_type lpa)
	{
		auto itr = domains[stream_id]->Locked_LPAs.find(lpa);
		if (itr != domains[stream_id]->Locked_LPAs.end()) {
			PRINT_ERROR("Illegal operation: Locking an LPA that has already been locked!");
		}
		domains[stream_id]->Locked_LPAs.insert(lpa);
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %rsi
movq %rdx, (%rsi)
movq 0xa8(%rdi), %rax
shll $0x3, %ebx
movl $0xe8, %edi
addq (%rax,%rbx), %rdi
callq 0x275aa
movq 0xa8(%r14), %rcx
movq (%rcx,%rbx), %rdi
leaq 0xf0(%rdi), %rcx
cmpq %rcx, %rax
jne 0x26a0b
addq $0xe8, %rdi
movq %rsp, %rsi
callq 0x1c49c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x3b5de(%rip), %rbx     # 0x61ff0
leaq 0x1db6f(%rip), %rsi     # 0x44588
movq %rbx, %rdi
callq 0x7360
leaq 0x201fb(%rip), %rsi     # 0x46c23
movq %rbx, %rdi
callq 0x7360
movq %rax, %rdi
callq 0x71a0
movq 0x3b591(%rip), %rdi     # 0x61fd0
callq 0x73d0
pushq $0x1
popq %rdi
callq 0x73e0
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Address_Mapping_Unit_Page_Level::Set_barrier_for_accessing_mvpn(unsigned short, unsigned int)
inline void Address_Mapping_Unit_Page_Level::Set_barrier_for_accessing_mvpn(stream_id_type stream_id, MVPN_type mvpn)
	{
		auto itr = domains[stream_id]->Locked_MVPNs.find(mvpn);
		if (itr != domains[stream_id]->Locked_MVPNs.end()) {
			PRINT_ERROR("Illegal operation: Locking an MVPN that has already been locked!");
		}
		domains[stream_id]->Locked_MVPNs.insert(mvpn);
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x4(%rsp), %rsi
movl %edx, (%rsi)
movq 0xa8(%rdi), %rax
shll $0x3, %ebx
movl $0x118, %edi            # imm = 0x118
addq (%rax,%rbx), %rdi
callq 0x28510
movq 0xa8(%r14), %rcx
movq (%rcx,%rbx), %rdi
leaq 0x120(%rdi), %rcx
cmpq %rcx, %rax
jne 0x26aa4
addq $0x118, %rdi            # imm = 0x118
leaq 0x4(%rsp), %rsi
callq 0x27600
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x3b545(%rip), %rbx     # 0x61ff0
leaq 0x1dad6(%rip), %rsi     # 0x44588
movq %rbx, %rdi
callq 0x7360
leaq 0x201a2(%rip), %rsi     # 0x46c63
movq %rbx, %rdi
callq 0x7360
movq %rax, %rdi
callq 0x71a0
movq 0x3b4f8(%rip), %rdi     # 0x61fd0
callq 0x73d0
pushq $0x1
popq %rdi
callq 0x73e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Flash.cpp
// Function: SSD_Components::Data_Cache_Flash::Get_slot(unsigned short, unsigned long)
Data_Cache_Slot_Type Data_Cache_Flash::Get_slot(const stream_id_type stream_id, const LPA_type lpn)
	{
		LPA_type key = LPN_TO_UNIQUE_KEY(stream_id, lpn);
		auto it = slots.find(key);
		assert(it != slots.end());
		if (lru_list.begin()->first != key) {
			lru_list.splice(lru_list.begin(), lru_list, it->second->lru_list_ptr);
		}

		return *(it->second);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
shlq $0x38, %rdx
orq %rcx, %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, (%rsi)
movq %r14, %rdi
callq 0x28e4e
testq %rax, %rax
je 0x2889d
movq %rax, %r15
movq 0x38(%r14), %rsi
movq 0x10(%rsi), %rax
cmpq 0x8(%rsp), %rax
je 0x28876
addq $0x38, %r14
movq 0x10(%r15), %rax
movq 0x28(%rax), %rcx
movq %r14, %rdi
movq %r14, %rdx
callq 0x28eca
movq 0x10(%r15), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1e47d(%rip), %rdi     # 0x46d21
leaq 0x1e488(%rip), %rsi     # 0x46d33
leaq 0x1e49e(%rip), %rcx     # 0x46d50
pushq $0x1e
popq %rdx
callq 0x7260
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Flash.cpp
// Function: SSD_Components::Data_Cache_Flash::Evict_one_dirty_slot()
Data_Cache_Slot_Type Data_Cache_Flash::Evict_one_dirty_slot()
	{
		assert(slots.size() > 0);
		auto itr = lru_list.rbegin();
		while (itr != lru_list.rend()) {
			if ((*itr).second->Status == Cache_Slot_Status::DIRTY_NO_FLASH_WRITEBACK) {
				break;
			}
			itr++;
		}

		Data_Cache_Slot_Type evicted_item = *lru_list.back().second;
		if (itr == lru_list.rend()) {
			evicted_item.Status = Cache_Slot_Status::EMPTY;
			return evicted_item;
		}

		slots.erase(lru_list.back().first);
		delete lru_list.back().second;
		lru_list.pop_back();
		
		return evicted_item;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0x18(%rsi)
je 0x28977
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x38(%rsi), %r14
movq 0x38(%rsi), %rax
movq %r14, %rdx
cmpq %rax, %rdx
je 0x28921
movq %rdx, %rcx
movq 0x8(%rdx), %rdx
movq 0x18(%rdx), %rsi
cmpl $0x2, 0x20(%rsi)
jne 0x28909
jmp 0x28924
movq %rax, %rcx
movq 0x40(%r15), %rsi
movq 0x18(%rsi), %rdx
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups 0x20(%rdx), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
cmpq %rax, %rcx
je 0x2896a
addq $0x10, %rsi
movq %r15, %rdi
callq 0x28f04
movq 0x40(%r15), %rax
movq 0x18(%rax), %rdi
callq 0x7340
movq %r14, %rdi
callq 0x28d80
jmp 0x2896e
andl $0x0, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1e438(%rip), %rdi     # 0x46db6
leaq 0x1e3ae(%rip), %rsi     # 0x46d33
leaq 0x1e43b(%rip), %rcx     # 0x46dc7
pushq $0x3c
popq %rdx
callq 0x7260
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Flash.cpp
// Function: SSD_Components::Data_Cache_Flash::Evict_one_slot_lru()
Data_Cache_Slot_Type Data_Cache_Flash::Evict_one_slot_lru()
	{
		assert(slots.size() > 0);
		slots.erase(lru_list.back().first);
		Data_Cache_Slot_Type evicted_item = *lru_list.back().second;
		delete lru_list.back().second;
		lru_list.pop_back();

		return evicted_item;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0x18(%rsi)
je 0x289ee
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsi), %r15
movq 0x40(%rsi), %rsi
addq $0x10, %rsi
movq %r14, %rdi
callq 0x28f04
movq 0x40(%r14), %rax
movq 0x18(%rax), %rdi
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups 0x20(%rdi), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
callq 0x7340
movq %r15, %rdi
callq 0x28d80
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1e3c1(%rip), %rdi     # 0x46db6
leaq 0x1e337(%rip), %rsi     # 0x46d33
leaq 0x1e412(%rip), %rcx     # 0x46e15
pushq $0x54
popq %rdx
callq 0x7260
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Flash.cpp
// Function: SSD_Components::Data_Cache_Flash::Change_slot_status_to_writeback(unsigned short, unsigned long)
void Data_Cache_Flash::Change_slot_status_to_writeback(const stream_id_type stream_id, const LPA_type lpn)
	{
		LPA_type key = LPN_TO_UNIQUE_KEY(stream_id, lpn);
		auto it = slots.find(key);
		assert(it != slots.end());
		it->second->Status = Cache_Slot_Status::DIRTY_FLASH_WRITEBACK;
	}

// Assembly:
pushq %rax
shlq $0x38, %rsi
orq %rdx, %rsi
movq %rsp, %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x28e4e
testq %rax, %rax
je 0x28a34
movq 0x10(%rax), %rax
movl $0x3, 0x20(%rax)
popq %rax
retq
leaq 0x1e2e6(%rip), %rdi     # 0x46d21
leaq 0x1e2f1(%rip), %rsi     # 0x46d33
leaq 0x1e418(%rip), %rcx     # 0x46e61
pushq $0x61
popq %rdx
callq 0x7260
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Flash.cpp
// Function: SSD_Components::Data_Cache_Flash::Insert_read_data(unsigned short, unsigned long, unsigned long, unsigned long, unsigned long)
void Data_Cache_Flash::Insert_read_data(const stream_id_type stream_id, const LPA_type lpn, const data_cache_content_type content,
		const data_timestamp_type timestamp, const page_status_type state_bitmap_of_read_sectors)
	{
		LPA_type key = LPN_TO_UNIQUE_KEY(stream_id, lpn);
		
		if (slots.find(key) != slots.end()) {
			throw std::logic_error("Duplicate lpn insertion into data cache!");
		}
		if (slots.size() >= capacity_in_pages) {
			throw std::logic_error("Data cache overfull!");
		}

		Data_Cache_Slot_Type* cache_slot = new Data_Cache_Slot_Type();
		cache_slot->LPA = lpn;
		cache_slot->State_bitmap_of_existing_sectors = state_bitmap_of_read_sectors;
		cache_slot->Content = content;
		cache_slot->Timestamp = timestamp;
		cache_slot->Status = Cache_Slot_Status::CLEAN;
		lru_list.push_front(std::pair<LPA_type, Data_Cache_Slot_Type*>(key, cache_slot));
		cache_slot->lru_list_ptr = lru_list.begin();
		slots[key] = cache_slot;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
shlq $0x38, %rsi
orq %rdx, %rsi
movq %rsp, %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x28e4e
testq %rax, %rax
jne 0x28afe
movl 0x50(%rbx), %eax
cmpq %rax, 0x18(%rbx)
jae 0x28b1a
pushq $0x30
popq %rdi
callq 0x7370
movq %rax, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rax)
movq %r13, 0x8(%rax)
movq %r15, (%rax)
movq %r12, 0x10(%rax)
movq %r14, 0x18(%rax)
movl $0x1, 0x20(%rax)
leaq 0x38(%rbx), %rdi
movq %rsp, %r14
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rbp, 0x8(%rsi)
callq 0x28d8a
movq 0x38(%rbx), %rax
movq %rax, 0x28(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x290ca
movq %rbp, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x71b0
movq %rax, %rbx
leaq 0x1e3be(%rip), %rsi     # 0x46ece
movq %rax, %rdi
callq 0x74b0
jmp 0x28b34
pushq $0x10
popq %rdi
callq 0x71b0
movq %rax, %rbx
leaq 0x1e3cb(%rip), %rsi     # 0x46ef7
movq %rax, %rdi
callq 0x74b0
movq 0x39485(%rip), %rsi     # 0x61fc0
movq 0x3942e(%rip), %rdx     # 0x61f70
movq %rbx, %rdi
callq 0x7590
jmp 0x28b4c
movq %rax, %r14
movq %rbx, %rdi
callq 0x72a0
movq %r14, %rdi
callq 0x75d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Flash.cpp
// Function: SSD_Components::Data_Cache_Flash::Insert_write_data(unsigned short, unsigned long, unsigned long, unsigned long, unsigned long)
void Data_Cache_Flash::Insert_write_data(const stream_id_type stream_id, const LPA_type lpn, const data_cache_content_type content,
		const data_timestamp_type timestamp, const page_status_type state_bitmap_of_write_sectors)
	{
		LPA_type key = LPN_TO_UNIQUE_KEY(stream_id, lpn);
		
		if (slots.find(key) != slots.end()) {
			throw std::logic_error("Duplicate lpn insertion into data cache!!");
		}
		
		if (slots.size() >= capacity_in_pages) {
			throw std::logic_error("Data cache overfull!");
		}

		Data_Cache_Slot_Type* cache_slot = new Data_Cache_Slot_Type();
		cache_slot->LPA = lpn;
		cache_slot->State_bitmap_of_existing_sectors = state_bitmap_of_write_sectors;
		cache_slot->Content = content;
		cache_slot->Timestamp = timestamp;
		cache_slot->Status = Cache_Slot_Status::DIRTY_NO_FLASH_WRITEBACK;
		lru_list.push_front(std::pair<LPA_type, Data_Cache_Slot_Type*>(key, cache_slot));
		cache_slot->lru_list_ptr = lru_list.begin();
		slots[key] = cache_slot;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
shlq $0x38, %rsi
orq %rdx, %rsi
movq %rsp, %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x28e4e
testq %rax, %rax
jne 0x28c0c
movl 0x50(%rbx), %eax
cmpq %rax, 0x18(%rbx)
jae 0x28c28
pushq $0x30
popq %rdi
callq 0x7370
movq %rax, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rax)
movq %r13, 0x8(%rax)
movq %r15, (%rax)
movq %r12, 0x10(%rax)
movq %r14, 0x18(%rax)
movl $0x2, 0x20(%rax)
leaq 0x38(%rbx), %rdi
movq %rsp, %r14
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rbp, 0x8(%rsi)
callq 0x28d8a
movq 0x38(%rbx), %rax
movq %rax, 0x28(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x290ca
movq %rbp, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x71b0
movq %rax, %rbx
leaq 0x1e2ee(%rip), %rsi     # 0x46f0c
movq %rax, %rdi
callq 0x74b0
jmp 0x28c42
pushq $0x10
popq %rdi
callq 0x71b0
movq %rax, %rbx
leaq 0x1e2bd(%rip), %rsi     # 0x46ef7
movq %rax, %rdi
callq 0x74b0
movq 0x39377(%rip), %rsi     # 0x61fc0
movq 0x39320(%rip), %rdx     # 0x61f70
movq %rbx, %rdi
callq 0x7590
jmp 0x28c5a
movq %rax, %r14
movq %rbx, %rdi
callq 0x72a0
movq %r14, %rdi
callq 0x75d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Flash.cpp
// Function: SSD_Components::Data_Cache_Flash::Update_data(unsigned short, unsigned long, unsigned long, unsigned long, unsigned long)
void Data_Cache_Flash::Update_data(const stream_id_type stream_id, const LPA_type lpn, const data_cache_content_type content,
		const data_timestamp_type timestamp, const page_status_type state_bitmap_of_write_sectors)
	{
		LPA_type key = LPN_TO_UNIQUE_KEY(stream_id, lpn);
		auto it = slots.find(key);
		assert(it != slots.end());

		it->second->LPA = lpn;
		it->second->State_bitmap_of_existing_sectors = state_bitmap_of_write_sectors;
		it->second->Content = content;
		it->second->Timestamp = timestamp;
		it->second->Status = Cache_Slot_Status::DIRTY_NO_FLASH_WRITEBACK;
		if (lru_list.begin()->first != key) {
			lru_list.splice(lru_list.begin(), lru_list, it->second->lru_list_ptr);
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r9, %r15
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
shlq $0x38, %rsi
orq %rdx, %rsi
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x28e4e
testq %rax, %rax
je 0x28cf0
movq 0x10(%rax), %rax
movq %r13, 0x8(%rax)
movq %r15, (%rax)
movq %r12, 0x10(%rax)
movq %r14, 0x18(%rax)
movl $0x2, 0x20(%rax)
movq 0x38(%rbx), %rsi
movq 0x10(%rsi), %rcx
cmpq 0x8(%rsp), %rcx
je 0x28ce2
addq $0x38, %rbx
movq 0x28(%rax), %rcx
movq %rbx, %rdi
movq %rbx, %rdx
callq 0x28eca
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1e02a(%rip), %rdi     # 0x46d21
leaq 0x1e035(%rip), %rsi     # 0x46d33
leaq 0x1e231(%rip), %rcx     # 0x46f36
movl $0x99, %edx
callq 0x7260
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Flash.cpp
// Function: SSD_Components::Data_Cache_Flash::Remove_slot(unsigned short, unsigned long)
void Data_Cache_Flash::Remove_slot(const stream_id_type stream_id, const LPA_type lpn)
	{
		LPA_type key = LPN_TO_UNIQUE_KEY(stream_id, lpn);
		auto it = slots.find(key);
		assert(it != slots.end());
		lru_list.erase(it->second->lru_list_ptr);
		delete it->second;
		slots.erase(it);
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
shlq $0x38, %rsi
orq %rdx, %rsi
movq %rsp, %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x28e4e
testq %rax, %rax
je 0x28d61
movq %rax, %r14
leaq 0x38(%rbx), %rdi
movq 0x10(%rax), %rax
movq 0x28(%rax), %rsi
callq 0x28d96
movq 0x10(%r14), %rdi
callq 0x7340
movq %rbx, %rdi
movq %r14, %rsi
callq 0x293b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1dfb9(%rip), %rdi     # 0x46d21
leaq 0x1dfc4(%rip), %rsi     # 0x46d33
leaq 0x1e26b(%rip), %rcx     # 0x46fe1
movl $0xa9, %edx
callq 0x7260
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movl %r8d, %r14d
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %rbx
movl 0x70(%rsp), %r13d
callq 0x11bca
leaq 0x37d9d(%rip), %rax     # 0x611c8
movq %rax, (%rbx)
movq %r12, 0x30(%rbx)
movq %r15, 0x38(%rbx)
movl %r14d, 0x40(%rbx)
movl %ebp, 0x44(%rbx)
movl 0x40(%rsp), %eax
movl %eax, 0x48(%rbx)
movups 0x48(%rsp), %xmm0
movups %xmm0, 0x58(%rbx)
movq 0x58(%rsp), %rax
movq %rax, 0x68(%rbx)
movl 0x68(%rsp), %eax
movl %eax, 0x70(%rbx)
movl %r13d, 0x74(%rbx)
leaq 0x78(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movq %rbx, 0x3916f(%rip)     # 0x625f0
imull $0xf4240, %ebp, %eax    # imm = 0xF4240
cvtsi2sd %rax, %xmm0
movsd 0x1c3a4(%rip), %xmm1    # 0x45838
divsd %xmm0, %xmm1
movsd %xmm1, 0x50(%rbx)
leaq (,%r13,4), %rdi
callq 0x7030
movq 0x60(%rsp), %rcx
movq %rax, 0x39142(%rip)     # 0x625f8
xorl %edx, %edx
cmpq %rdx, %r13
je 0x294c8
movl (%rcx,%rdx,4), %esi
movl %esi, (%rax,%rdx,4)
incq %rdx
jmp 0x294b8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x90(%rbx), %rdi
callq 0x29786
movq %r14, %rdi
callq 0x29778
movq %rbx, %rdi
callq 0x11c8c
movq %r15, %rdi
callq 0x75d0
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Manager_Flash_Advanced.cpp
// Function: SSD_Components::Data_Cache_Manager_Flash_Advanced::service_dram_access_request(SSD_Components::Memory_Transfer_Info*)
void Data_Cache_Manager_Flash_Advanced::service_dram_access_request(Memory_Transfer_Info* request_info)
	{
		if (memory_channel_is_busy) {
			if(shared_dram_request_queue) {
				dram_execution_queue[0].push(request_info);
			} else {
				dram_execution_queue[request_info->Stream_id].push(request_info);
			}
		} else {
			Simulator->Register_sim_event(Simulator->Time() + estimate_dram_access_time(request_info->Size_in_bytes, dram_row_size,
				dram_busrt_size, dram_burst_transfer_time_ddr, dram_tRCD, dram_tCL, dram_tRP),
				this, request_info, static_cast<int>(request_info->next_event_type));
			memory_channel_is_busy = true;
			dram_execution_list_turn = request_info->Stream_id;
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, (%rsp)
cmpb $0x1, 0xc8(%rdi)
jne 0x2a4e3
movq 0xd0(%r14), %rdi
cmpb $0x1, 0xe0(%r14)
je 0x2a4d9
movzwl 0x14(%rbx), %eax
imulq $0x50, %rax, %rax
addq %rax, %rdi
movq %rsp, %rsi
callq 0x2b262
jmp 0x2a547
callq 0x1f784
movq %rax, %r15
callq 0x1f784
movq %rax, %rdi
callq 0x1fafc
movq %rax, %r12
movl (%rbx), %edi
movl 0x40(%r14), %esi
movl 0x48(%r14), %edx
movsd 0x50(%r14), %xmm0
movq 0x58(%r14), %rcx
movq 0x60(%r14), %r8
movq 0x68(%r14), %r9
callq 0x2abb8
addq %rax, %r12
movl 0x10(%rbx), %r8d
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1fb00
movb $0x1, 0xc8(%r14)
movzwl 0x14(%rbx), %eax
movl %eax, 0xe4(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// 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()
Data_Cache_Manager_Flash_Simple::~Data_Cache_Manager_Flash_Simple()
	{
		for (unsigned int i = 0; i < stream_count; i++) {
			while (dram_execution_queue[i].size()) {
				delete dram_execution_queue[i].front();
				dram_execution_queue[i].pop();
			}
			for (auto &req : waiting_user_requests_queue_for_dram_free_slot[i]) {
				delete req;
			}
		}

		delete data_cache;
		delete[] dram_execution_queue;
		delete[] waiting_user_requests_queue_for_dram_free_slot;
		delete[] bloom_filter;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x35c1f(%rip), %rax     # 0x61298
movq %rax, (%rdi)
xorl %r15d, %r15d
movl 0x74(%rbx), %eax
cmpq %rax, %r15
jb 0x2b6ac
jmp 0x2b6fb
movq 0xc8(%rbx), %rax
movq 0x10(%rax,%r14), %rax
movq (%rax), %rdi
callq 0x7340
addq 0xc8(%rbx), %r14
movq %r14, %rdi
callq 0x2b006
imulq $0x50, %r15, %r14
movq 0xc8(%rbx), %rdi
addq %r14, %rdi
callq 0x2afbe
testq %rax, %rax
jne 0x2b689
imulq $0x18, %r15, %r12
addq 0xd0(%rbx), %r12
movq %r12, %r13
movq (%r13), %r13
cmpq %r12, %r13
je 0x2b6f6
movq 0x10(%r13), %r14
testq %r14, %r14
je 0x2b6ec
movq %r14, %rdi
callq 0x2ab0c
movq %r14, %rdi
callq 0x7340
jmp 0x2b6d2
incq %r15
jmp 0x2b67f
movq 0xc0(%rbx), %r14
testq %r14, %r14
je 0x2b70f
movq %r14, %rdi
callq 0x287ec
movq %r14, %rdi
callq 0x7340
movq 0xc8(%rbx), %r15
testq %r15, %r15
je 0x2b74f
leaq -0x8(%r15), %r14
movq -0x8(%r15), %rax
testq %rax, %rax
je 0x2b747
addq $-0x50, %r15
imulq $0x50, %rax, %r12
leaq (%r15,%r12), %rdi
callq 0x2ad54
addq $-0x50, %r12
jne 0x2b738
movq %r14, %rdi
callq 0x7430
movq 0xd0(%rbx), %r15
testq %r15, %r15
je 0x2b787
leaq -0x8(%r15), %r14
movq -0x8(%r15), %rax
testq %rax, %rax
je 0x2b77f
addq $-0x18, %r15
imulq $0x18, %rax, %r12
leaq (%r15,%r12), %rdi
callq 0x2ada0
addq $-0x18, %r12
jne 0x2b770
movq %r14, %rdi
callq 0x7430
movq 0xe8(%rbx), %r15
testq %r15, %r15
je 0x2b7bf
leaq -0x8(%r15), %r14
movq -0x8(%r15), %rax
testq %rax, %rax
je 0x2b7b7
addq $-0x30, %r15
imulq $0x30, %rax, %r12
leaq (%r15,%r12), %rdi
callq 0x11eea
addq $-0x30, %r12
jne 0x2b7a8
movq %r14, %rdi
callq 0x7430
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x294fe