LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Cached_Mapping_Table::Reserve_slot_for_lpn(unsigned short, unsigned long)
void Cached_Mapping_Table::Reserve_slot_for_lpn(const stream_id_type streamID, const LPA_type lpn)
	{
		LPA_type key = LPN_TO_UNIQUE_KEY(streamID, lpn);

		if (addressMap.find(key) != addressMap.end()) {
			throw std::logic_error("Duplicate lpa insertion into CMT!");
		}
		if (addressMap.size() >= capacity) {
			throw std::logic_error("CMT overfull!");
		}

		CMTSlotType* cmtEnt = new CMTSlotType();
		cmtEnt->Dirty = false;
		cmtEnt->Stream_id = streamID;
		lruList.push_front(std::pair<LPA_type, CMTSlotType*>(key, cmtEnt));
		cmtEnt->Status = CMTEntryStatus::WAITING;
		cmtEnt->listPtr = lruList.begin();
		addressMap[key] = cmtEnt;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movq %r15, %r14
shlq $0x38, %r14
orq %rdx, %r14
movq %r14, (%rsp)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
xorl %r9d, %r9d
movq %r14, %rax
xorl %edx, %edx
divq %rdi
movq (%rsi,%rdx,8), %rax
testq %rax, %rax
je 0x29a41
movq (%rax), %r8
movq %rax, %r9
cmpq 0x8(%r8), %r14
je 0x29a41
movq %rdx, %rcx
movq %r8, %r10
movq (%r8), %r8
testq %r8, %r8
je 0x29a3e
movq 0x8(%r8), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movl $0x0, %r9d
cmpq %rcx, %rdx
jne 0x29a41
movq %r10, %r9
cmpq %rsi, %r14
jne 0x29a12
jmp 0x29a41
xorl %r9d, %r9d
testq %r9, %r9
je 0x29a50
cmpq $0x0, (%r9)
jne 0x29aec
movl 0x50(%rbx), %eax
cmpq %rax, 0x18(%rbx)
jae 0x29ace
movl $0x28, %edi
callq 0x73a0
movq %rax, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movw %r15w, 0x20(%rax)
movq 0x38(%rbx), %r15
movl $0x20, %edi
callq 0x73a0
movq %r14, 0x10(%rax)
movq %r12, 0x18(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x7060
incq 0x48(%rbx)
movl $0x1, 0x14(%r12)
movq 0x38(%rbx), %rax
movq %rax, 0x18(%r12)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x312e8
movq %r12, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x2ec75(%rip), %rsi     # 0x58757
movq %rax, %rdi
callq 0x7500
jmp 0x29b08
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x2ec35(%rip), %rsi     # 0x58735
movq %rax, %rdi
callq 0x7500
movq 0x454b1(%rip), %rsi     # 0x6efc0
movq 0x45472(%rip), %rdx     # 0x6ef88
movq %rbx, %rdi
callq 0x75e0
jmp 0x29b20
movq %rax, %r14
movq %rbx, %rdi
callq 0x72c0
movq %r14, %rdi
callq 0x7620
nop
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]MQSim/src/ssd/Address_Mapping_Unit_Page_Level.cpp
// Function: SSD_Components::Cached_Mapping_Table::Evict_one_slot(unsigned long&)
CMTSlotType Cached_Mapping_Table::Evict_one_slot(LPA_type& lpa)
	{
		assert(addressMap.size() > 0);
		addressMap.erase(lruList.back().first);
		lpa = UNIQUE_KEY_TO_LPN(lruList.back().second->Stream_id,lruList.back().first);
		CMTSlotType evictedItem = *lruList.back().second;
		delete lruList.back().second;
		lruList.pop_back();
	
		return evictedItem;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0x18(%rsi)
je 0x29bb3
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rsi), %rsi
addq $0x10, %rsi
movq %r14, %rdi
callq 0x3155a
movq 0x40(%r14), %rax
movq 0x18(%rax), %rdi
movl 0x20(%rdi), %ecx
shlq $0x38, %rcx
notq %rcx
andq 0x10(%rax), %rcx
movq %rcx, (%r15)
movq 0x20(%rdi), %rax
movq %rax, 0x20(%rbx)
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x29b92
callq 0x7370
movq 0x40(%r14), %r15
decq 0x48(%r14)
movq %r15, %rdi
callq 0x7580
movq %r15, %rdi
callq 0x7370
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2ebab(%rip), %rdi     # 0x58765
leaq 0x2e996(%rip), %rsi     # 0x58557
leaq 0x2ebb3(%rip), %rcx     # 0x5877b
movl $0x85, %edx
callq 0x7270
// File: /workspace/github_cpp_makefile_star2_O1/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 (%rdi), %r9
movq 0x8(%rdi), %r8
xorl %r10d, %r10d
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%r9,%rdx,8), %rax
testq %rax, %rax
je 0x29c36
movq (%rax), %r9
movq %rax, %r10
cmpq 0x8(%r9), %rsi
je 0x29c36
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x29c33
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x29c36
movq %r11, %r10
cmpq %rdi, %rsi
jne 0x29c07
jmp 0x29c36
xorl %r10d, %r10d
testq %r10, %r10
je 0x29c40
movq (%r10), %rax
jmp 0x29c42
xorl %eax, %eax
testq %rax, %rax
je 0x29c56
movq 0x10(%rax), %rax
movb 0x10(%rax), %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x2eb5e(%rip), %rsi     # 0x587c8
movq %rax, %rdi
callq 0x7500
movq 0x45347(%rip), %rsi     # 0x6efc0
movq 0x45308(%rip), %rdx     # 0x6ef88
movq %rbx, %rdi
callq 0x75e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x72c0
movq %r14, %rdi
callq 0x7620
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 (%rdi), %r9
movq 0x8(%rdi), %r8
xorl %r10d, %r10d
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%r9,%rdx,8), %rax
testq %rax, %rax
je 0x29d00
movq (%rax), %r9
movq %rax, %r10
cmpq 0x8(%r9), %rsi
je 0x29d00
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x29cfd
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x29d00
movq %r11, %r10
cmpq %rdi, %rsi
jne 0x29cd1
jmp 0x29d00
xorl %r10d, %r10d
testq %r10, %r10
je 0x29d0a
movq (%r10), %rax
jmp 0x29d0c
xorl %eax, %eax
testq %rax, %rax
je 0x29d21
movq 0x10(%rax), %rax
movb $0x0, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x2ea93(%rip), %rsi     # 0x587c8
movq %rax, %rdi
callq 0x7500
movq 0x4527c(%rip), %rsi     # 0x6efc0
movq 0x4523d(%rip), %rdx     # 0x6ef88
movq %rbx, %rdi
callq 0x75e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x72c0
movq %r14, %rdi
callq 0x7620
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2a233
movq %r14, %rdi
callq 0x2952a
movq %r14, %rdi
callq 0x7370
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2a241
callq 0x7480
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2a24e
callq 0x7480
leaq 0x28(%rbx), %r14
movq 0x40(%rbx), %r15
leaq 0x30(%rbx), %r13
cmpq %r13, %r15
je 0x2a288
movq 0x28(%r15), %rdi
testq %rdi, %rdi
je 0x2a26d
callq 0x7370
movq %r15, %rdi
callq 0x72a0
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x315aa
movq %r12, %r15
jmp 0x2a25a
leaq 0x58(%rbx), %r15
movq 0x70(%rbx), %r12
leaq 0x60(%rbx), %rbp
cmpq %rbp, %r12
je 0x2a2c3
movq 0x28(%r12), %rdi
testq %rdi, %rdi
je 0x2a2a8
callq 0x7370
movq %r12, %rdi
callq 0x72a0
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x315aa
movq %r13, %r12
jmp 0x2a294
movq 0x210(%rbx), %rdi
testq %rdi, %rdi
je 0x2a2d4
callq 0x7480
movq 0x220(%rbx), %rdi
testq %rdi, %rdi
je 0x2a2e5
callq 0x7480
movq 0x230(%rbx), %rdi
testq %rdi, %rdi
je 0x2a2f6
callq 0x7480
movq 0x240(%rbx), %rdi
testq %rdi, %rdi
je 0x2a307
callq 0x7480
leaq 0x1d8(%rbx), %rdi
callq 0x30d22
leaq 0x1a8(%rbx), %rdi
callq 0x30d22
leaq 0x178(%rbx), %rdi
callq 0x30d6c
leaq 0x148(%rbx), %rdi
callq 0x30d6c
leaq 0x118(%rbx), %rdi
callq 0x30d22
leaq 0xe8(%rbx), %rdi
callq 0x1676e
leaq 0xb8(%rbx), %rdi
callq 0x30d22
addq $0x88, %rbx
movq %rbx, %rdi
callq 0x30db6
movq %r15, %rdi
callq 0x30d6c
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30d6c
jmp 0x2a38a
movq %rax, %rdi
callq 0xaf65
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2ace1
movq %rdi, %rbx
movl $0xb0, %edi
callq 0x73a0
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movups %xmm0, (%rsp)
movq $0x0, 0x20(%rsp)
movq %rax, %rdi
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq $-0x1, %r8
xorl %r9d, %r9d
callq 0x48c24
cmpl $0x0, 0x50(%rbx)
je 0x2acda
movq %r14, %r15
addq $0x38, %r15
xorl %r12d, %r12d
movw %r12w, (%r14)
movq 0xa8(%rbx), %rax
movq (%rax,%r12,8), %rax
cmpl $0x0, 0x268(%rax)
je 0x2accf
xorl %r13d, %r13d
movq %r13, 0x58(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b926
movl 0x58(%r14), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x2ad08
movq 0x38(%rbx), %rdi
movq 0x58(%r14), %rdx
movq (%rdi), %rax
movq %r15, %rsi
callq *0x60(%rax)
incq %r13
movq 0xa8(%rbx), %rax
movq (%rax,%r12,8), %rax
movl 0x268(%rax), %eax
cmpq %rax, %r13
jb 0x2ac85
incq %r12
movl 0x50(%rbx), %eax
cmpq %rax, %r12
jb 0x2ac6a
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 0x7370
movq %rbx, %rdi
callq 0x7620
// File: /workspace/github_cpp_makefile_star2_O1/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), %rax
movzwl (%rsi), %esi
movq (%rax,%rsi,8), %r12
movq (%r12), %rax
movl %edx, %r13d
shlq $0x4, %r13
movl (%rax,%r13), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rsi
je 0x2ad75
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
movq $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)
jmp 0x2ad79
testb %cl, %cl
jne 0x2adce
movq 0x40(%r14), %rdi
movzwl (%rbx), %esi
leaq 0x38(%rbx), %r15
movq (%rdi), %rax
movq %r15, %rdx
xorl %ecx, %ecx
callq *0x20(%rax)
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x90(%rax)
movq %rax, 0x60(%rbx)
movq (%r12), %rcx
movl %eax, (%rcx,%r13)
callq 0x281b4
movq %rax, %rdi
callq 0x285a6
movq (%r12), %rcx
movq %rax, 0x8(%rcx,%r13)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x4421b(%rip), %rbx     # 0x6eff0
leaq 0x2b7cc(%rip), %rsi     # 0x565a8
movq %rbx, %rdi
callq 0x7390
leaq 0x2dd70(%rip), %rsi     # 0x58b5b
movq %rbx, %rdi
callq 0x7390
movq %rax, %rdi
callq 0x71c0
movq 0x441ce(%rip), %rdi     # 0x6efd0
callq 0x7430
movl $0x1, %edi
callq 0x7440
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
cmpq %rsi, %r15
je 0x2b02e
movq %r15, %r12
movq 0x10(%r15), %rax
movzwl (%rax), %esi
movq 0x58(%rax), %rdx
movq (%rbx), %rax
movq %rbx, %rdi
callq *0xe8(%rax)
movq (%r15), %r15
movq 0x10(%r12), %rsi
movq (%rbx), %rcx
movq %rbx, %rdi
testb %al, %al
je 0x2b023
callq *0xd8(%rcx)
jmp 0x2b029
callq *0xc8(%rcx)
cmpq %r14, %r15
jne 0x2afef
cmpq $0x0, 0x10(%r14)
je 0x2b0f2
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rdi
callq 0x2fd9e
movq (%r14), %r12
cmpq %r14, %r12
je 0x2b0d6
movq 0x10(%r12), %r13
cmpb $0x1, 0x69(%r13)
jne 0x2b0cd
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rbp
leaq 0x78(%rbp), %r15
movl $0x18, %edi
callq 0x73a0
movq %r13, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x7060
incq 0x88(%rbp)
movq 0x10(%r12), %rax
cmpl $0x1, 0x8(%rax)
jne 0x2b0cd
movq 0x88(%rax), %r13
testq %r13, %r13
je 0x2b0cd
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rbp
leaq 0x78(%rbp), %r15
movl $0x18, %edi
callq 0x73a0
movq %r13, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x7060
incq 0x88(%rbp)
movq (%r12), %r12
jmp 0x2b049
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rdi
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x30(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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), %rax
movq 0x58(%rdx), %rdx
cmpb $0x1, 0x4c(%rdi)
jne 0x2b3ec
movq 0x20(%rax), %rax
leaq (%rdx,%rdx,2), %rcx
movq (%rax,%rcx,8), %rax
jmp 0x2b3f8
movq 0x10(%rax), %rdi
movzwl %bp, %esi
callq 0x29600
cmpl $0x0, 0x8(%rbx)
je 0x2b422
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b926
movq 0x30(%r14), %rax
movq 0x48(%rax), %rdi
leaq 0x38(%rbx), %rsi
callq 0x40366
testb %al, %al
je 0x2b46e
xorl %eax, %eax
jmp 0x2b481
cmpq $-0x1, %rax
jne 0x2b446
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 0x3e230
jmp 0x2b47b
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2c468
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_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
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), %r14
movl 0xc(%rsi), %ecx
leaq (%rcx,%rcx,2), %r12
shlq $0x4, %r12
movq 0x50(%rax), %rdi
callq 0x2fd9e
movq %r14, (%rsp)
leaq (%r14,%r12), %r13
addq $0x8, %r13
movq 0x10(%r13), %r15
cmpq %r13, %r15
je 0x2f83a
addq %r12, (%rsp)
movq 0x20(%r15), %rdx
movzwl (%rdx), %esi
movq %rbx, %rdi
callq 0x2b3b8
testb %al, %al
je 0x2f83a
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rbp
movq 0x20(%r15), %r14
leaq 0x78(%rbp), %r12
movl $0x18, %edi
callq 0x73a0
movq %r14, 0x10(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x7060
incq 0x88(%rbp)
movq 0x20(%r15), %rax
movq 0x88(%rax), %rbp
testq %rbp, %rbp
je 0x2f817
movq 0x30(%rbx), %rax
movq 0x50(%rax), %r14
leaq 0x78(%r14), %r12
movl $0x18, %edi
callq 0x73a0
movq %rbp, 0x10(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x7060
incq 0x88(%r14)
movq %r15, %rdi
callq 0x7410
movq %rax, %r12
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x31cca
movq %r12, %r15
cmpq %r13, %r12
jne 0x2f794
movq 0x30(%rbx), %rax
movq 0x50(%rax), %rdi
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x30(%rax)
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]MQSim/src/ssd/TSU_Base.h
// Function: SSD_Components::TSU_Base::Prepare_for_transaction_submit()
void Prepare_for_transaction_submit()
	{
		opened_scheduling_reqs++;
		if (opened_scheduling_reqs > 1)
		{
			return;
		}
		transaction_receive_slots.clear();
	}

// Assembly:
movl 0xa8(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0xa8(%rdi)
testl %eax, %eax
jle 0x2fdb2
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x78(%rdi), %r14
movq 0x78(%rdi), %rdi
cmpq %r14, %rdi
je 0x2fdd7
movq (%rdi), %r15
callq 0x7370
movq %r15, %rdi
cmpq %r14, %r15
jne 0x2fdc7
movq %r14, 0x80(%rbx)
movq %r14, 0x78(%rbx)
movq $0x0, 0x88(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r12
movq 0xa8(%rdi), %rax
movl %esi, %r13d
movq (%rax,%r13,8), %r8
movb 0x4c(%rdi), %r9b
testb %r9b, %r9b
je 0x2fe7f
movq 0x20(%r8), %rax
leaq (%r14,%r14,2), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%r15)
movq 0xa8(%r12), %rax
movq (%rax,%r13,8), %rax
cmpb $0x1, 0x4c(%r12)
jne 0x2feeb
movq 0x20(%rax), %rax
leaq (%r14,%r14,2), %rcx
jmp 0x2ff4f
movq %r15, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq 0x10(%r8), %rax
movq %r13, %rcx
shlq $0x38, %rcx
orq %r14, %rcx
movq (%rax), %rdi
movq 0x8(%rax), %r10
xorl %ebx, %ebx
movq %rcx, %rax
xorl %edx, %edx
divq %r10
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x2fefe
movq (%rax), %r11
movq %rax, %rbx
cmpq 0x8(%r11), %rcx
je 0x2fefe
movq %rdx, %rsi
movq %r11, %r15
movq (%r11), %r11
testq %r11, %r11
je 0x2fefc
movq 0x8(%r11), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r10
movl $0x0, %ebx
cmpq %rsi, %rdx
jne 0x2fefe
movq %r15, %rbx
cmpq %rdi, %rcx
jne 0x2fec0
jmp 0x2fefe
movq 0x10(%rax), %rdi
movzwl %bp, %esi
movq %r14, %rdx
callq 0x296d8
jmp 0x2ff54
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x2ff08
movq (%rbx), %rax
jmp 0x2ff0a
xorl %eax, %eax
movq 0x10(%rsp), %rbx
movq 0x8(%rsp), %r15
testq %rax, %rax
je 0x2ff40
movq 0x10(%rax), %rax
cmpl $0x2, 0x14(%rax)
jne 0x2ff40
testb %r9b, %r9b
jne 0x2fe4f
movq 0x10(%r8), %rdi
movzwl %bp, %esi
movq %r14, %rdx
callq 0x29600
jmp 0x2fe5b
movq 0x20(%r8), %rax
leaq (%r14,%r14,2), %rcx
movq (%rax,%rcx,8), %rdx
movq %rdx, (%r15)
movq 0x8(%rax,%rcx,8), %rax
movq %rax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl 0x88(%rsi), %ecx
xorl %edx, %edx
divq %rcx
movl %eax, (%rdi)
movl 0x8c(%rsi), %ecx
movq %rdx, %rax
xorl %edx, %edx
divq %rcx
movl %eax, 0x4(%rdi)
movl 0x90(%rsi), %ecx
movq %rdx, %rax
xorl %edx, %edx
divq %rcx
movl %eax, 0x8(%rdi)
movl 0x94(%rsi), %ecx
movq %rdx, %rax
xorl %edx, %edx
divq %rcx
movl %eax, 0xc(%rdi)
movl 0x78(%rsi), %ecx
movq %rdx, %rax
xorl %edx, %edx
divq %rcx
movl %eax, 0x10(%rdi)
movl %edx, 0x14(%rdi)
movq %rdi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x8c(%rdi), %esi
movq %rdx, %rax
xorl %edx, %edx
divq %rsi
movl %eax, 0x4(%rcx)
movl 0x90(%rdi), %esi
movq %rdx, %rax
xorl %edx, %edx
divq %rsi
movl %eax, 0x8(%rcx)
movl 0x94(%rdi), %esi
movq %rdx, %rax
xorl %edx, %edx
divq %rsi
movl %eax, 0xc(%rcx)
movl 0x78(%rdi), %esi
movq %rdx, %rax
xorl %edx, %edx
divq %rsi
movl %eax, 0x10(%rcx)
movl %edx, 0x14(%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rdx, 0x8(%rsp)
movq 0xa8(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rdi
movq 0xf8(%rdi), %rsi
leaq 0xf0(%rdi), %rax
movq %rax, %rcx
testq %rsi, %rsi
je 0x3033f
movq %rax, %rcx
xorl %r8d, %r8d
cmpq %rdx, 0x20(%rsi)
setb %r8b
cmovaeq %rsi, %rcx
movq 0x10(%rsi,%r8,8), %rsi
testq %rsi, %rsi
jne 0x30326
movq %rax, %rsi
cmpq %rax, %rcx
je 0x30352
cmpq %rdx, 0x20(%rcx)
cmovaq %rax, %rcx
movq %rcx, %rsi
cmpq %rax, %rsi
jne 0x3036e
addq $0xe8, %rdi
leaq 0x8(%rsp), %rsi
callq 0x245a0
addq $0x10, %rsp
popq %rbx
retq
movq 0x3ec7b(%rip), %rbx     # 0x6eff0
leaq 0x2622c(%rip), %rsi     # 0x565a8
movq %rbx, %rdi
callq 0x7390
leaq 0x289c8(%rip), %rsi     # 0x58d53
movq %rbx, %rdi
callq 0x7390
movq %rax, %rdi
callq 0x71c0
movq 0x3ec2e(%rip), %rdi     # 0x6efd0
callq 0x7430
movl $0x1, %edi
callq 0x7440
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movl %edx, 0xc(%rsp)
movq 0xa8(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x128(%rdi), %rsi
leaq 0x120(%rdi), %rax
movq %rax, %rcx
testq %rsi, %rsi
je 0x303f9
movq %rax, %rcx
xorl %r8d, %r8d
cmpl %edx, 0x20(%rsi)
setb %r8b
cmovaeq %rsi, %rcx
movq 0x10(%rsi,%r8,8), %rsi
testq %rsi, %rsi
jne 0x303e1
movq %rax, %rsi
cmpq %rax, %rcx
je 0x3040b
cmpl %edx, 0x20(%rcx)
cmovaq %rax, %rcx
movq %rcx, %rsi
cmpq %rax, %rsi
jne 0x30427
addq $0x118, %rdi            # imm = 0x118
leaq 0xc(%rsp), %rsi
callq 0x30f50
addq $0x10, %rsp
popq %rbx
retq
movq 0x3ebc2(%rip), %rbx     # 0x6eff0
leaq 0x26173(%rip), %rsi     # 0x565a8
movq %rbx, %rdi
callq 0x7390
leaq 0x2894f(%rip), %rsi     # 0x58d93
movq %rbx, %rdi
callq 0x7390
movq %rax, %rdi
callq 0x71c0
movq 0x3eb75(%rip), %rdi     # 0x6efd0
callq 0x7430
movl $0x1, %edi
callq 0x7440
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movl %edx, %r8d
movq %rsi, %r9
movq %rdi, %rbx
shlq $0x38, %r8
orq %rcx, %r8
movq (%rsi), %rdi
movq 0x8(%rsi), %rcx
xorl %r11d, %r11d
movq %r8, %rax
xorl %edx, %edx
divq %rcx
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x31e69
movq (%rax), %r10
movq %rax, %r11
cmpq 0x8(%r10), %r8
je 0x31e69
movq %rdx, %rsi
movq %r10, %r14
movq (%r10), %r10
testq %r10, %r10
je 0x31e66
movq 0x8(%r10), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %rcx
movl $0x0, %r11d
cmpq %rsi, %rdx
jne 0x31e69
movq %r14, %r11
cmpq %rdi, %r8
jne 0x31e3a
jmp 0x31e69
xorl %r11d, %r11d
testq %r11, %r11
je 0x31e73
movq (%r11), %r14
jmp 0x31e76
xorl %r14d, %r14d
testq %r14, %r14
je 0x31ec1
movq 0x38(%r9), %rsi
cmpq %r8, 0x10(%rsi)
je 0x31e9c
addq $0x38, %r9
movq 0x10(%r14), %rax
movq 0x28(%rax), %rcx
movq %r9, %rdi
movq %r9, %rdx
callq 0x32676
movq 0x10(%r14), %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 $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x26f89(%rip), %rdi     # 0x58e51
leaq 0x26f94(%rip), %rsi     # 0x58e63
leaq 0x26faa(%rip), %rcx     # 0x58e80
movl $0x1e, %edx
callq 0x7270
// File: /workspace/github_cpp_makefile_star2_O1/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 0x31fb1
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsi), %rdx
movq 0x38(%rsi), %rax
movq %rdx, %rcx
cmpq %rax, %rdx
je 0x31f46
movq 0x8(%rcx), %rdx
movq 0x18(%rdx), %rsi
cmpl $0x2, 0x20(%rsi)
jne 0x31f30
movq 0x40(%r14), %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 0x31fa1
addq $0x10, %rsi
movq %r14, %rdi
callq 0x326b0
movq 0x40(%r14), %rax
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x31f87
callq 0x7370
movq 0x40(%r14), %r15
decq 0x48(%r14)
movq %r15, %rdi
callq 0x7580
movq %r15, %rdi
callq 0x7370
jmp 0x31fa8
movl $0x0, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x26f2e(%rip), %rdi     # 0x58ee6
leaq 0x26ea4(%rip), %rsi     # 0x58e63
leaq 0x26f31(%rip), %rcx     # 0x58ef7
movl $0x3c, %edx
callq 0x7270
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3203b
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rsi), %rsi
addq $0x10, %rsi
movq %r14, %rdi
callq 0x326b0
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)
testq %rdi, %rdi
je 0x3201a
callq 0x7370
movq 0x40(%r14), %r15
decq 0x48(%r14)
movq %r15, %rdi
callq 0x7580
movq %r15, %rdi
callq 0x7370
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x26ea4(%rip), %rdi     # 0x58ee6
leaq 0x26e1a(%rip), %rsi     # 0x58e63
leaq 0x26ef5(%rip), %rcx     # 0x58f45
movl $0x54, %edx
callq 0x7270
// File: /workspace/github_cpp_makefile_star2_O1/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 (%rdi), %r9
movq 0x8(%rdi), %r8
xorl %r10d, %r10d
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%r9,%rdx,8), %rax
testq %rax, %rax
je 0x320bb
movq (%rax), %r9
movq %rax, %r10
cmpq 0x8(%r9), %rsi
je 0x320bb
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x320b8
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x320bb
movq %r11, %r10
cmpq %rdi, %rsi
jne 0x3208c
jmp 0x320bb
xorl %r10d, %r10d
testq %r10, %r10
je 0x320c5
movq (%r10), %rax
jmp 0x320c7
xorl %eax, %eax
testq %rax, %rax
je 0x320d9
movq 0x10(%rax), %rax
movl $0x3, 0x20(%rax)
popq %rax
retq
leaq 0x26d71(%rip), %rdi     # 0x58e51
leaq 0x26d7c(%rip), %rsi     # 0x58e63
leaq 0x26ea3(%rip), %rcx     # 0x58f91
movl $0x61, %edx
callq 0x7270
// File: /workspace/github_cpp_makefile_star2_O1/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 %rcx, 0x8(%rsp)
movq %rdx, %rbp
movl %esi, %r14d
movq %rdi, %rbx
shlq $0x38, %r14
orq %rdx, %r14
movq %r14, 0x10(%rsp)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
xorl %r15d, %r15d
movq %r14, %rax
xorl %edx, %edx
divq %rdi
movq (%rsi,%rdx,8), %rax
testq %rax, %rax
je 0x32179
movq (%rax), %r11
movq %rax, %r15
cmpq 0x8(%r11), %r14
je 0x32179
movq %rdx, %rcx
movq %r11, %r10
movq (%r11), %r11
testq %r11, %r11
je 0x32176
movq 0x8(%r11), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movl $0x0, %r15d
cmpq %rcx, %rdx
jne 0x32179
movq %r10, %r15
cmpq %rsi, %r14
jne 0x3214a
jmp 0x32179
xorl %r15d, %r15d
testq %r15, %r15
je 0x32188
cmpq $0x0, (%r15)
jne 0x3223c
movl 0x50(%rbx), %eax
cmpq %rax, 0x18(%rbx)
jae 0x3221e
movq %r9, %r13
movq %r8, %r12
movl $0x30, %edi
callq 0x73a0
movq %rax, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movq %rbp, 0x8(%rax)
movq %r13, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%r15)
movq %r12, 0x18(%r15)
movl $0x1, 0x20(%r15)
movq 0x38(%rbx), %r12
movl $0x20, %edi
callq 0x73a0
movq %r14, 0x10(%rax)
movq %r15, 0x18(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x7060
incq 0x48(%rbx)
movq 0x38(%rbx), %rax
movq %rax, 0x28(%r15)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3279a
movq %r15, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x26df5(%rip), %rsi     # 0x59027
movq %rax, %rdi
callq 0x7500
jmp 0x32258
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x26dae(%rip), %rsi     # 0x58ffe
movq %rax, %rdi
callq 0x7500
movq 0x3cd61(%rip), %rsi     # 0x6efc0
movq 0x3cd22(%rip), %rdx     # 0x6ef88
movq %rbx, %rdi
callq 0x75e0
jmp 0x32270
movq %rax, %r14
movq %rbx, %rdi
callq 0x72c0
movq %r14, %rdi
callq 0x7620
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rcx, 0x8(%rsp)
movq %rdx, %rbp
movl %esi, %r14d
movq %rdi, %rbx
shlq $0x38, %r14
orq %rdx, %r14
movq %r14, 0x10(%rsp)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
xorl %r15d, %r15d
movq %r14, %rax
xorl %edx, %edx
divq %rdi
movq (%rsi,%rdx,8), %rax
testq %rax, %rax
je 0x32305
movq (%rax), %r11
movq %rax, %r15
cmpq 0x8(%r11), %r14
je 0x32305
movq %rdx, %rcx
movq %r11, %r10
movq (%r11), %r11
testq %r11, %r11
je 0x32302
movq 0x8(%r11), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movl $0x0, %r15d
cmpq %rcx, %rdx
jne 0x32305
movq %r10, %r15
cmpq %rsi, %r14
jne 0x322d6
jmp 0x32305
xorl %r15d, %r15d
testq %r15, %r15
je 0x32314
cmpq $0x0, (%r15)
jne 0x323c8
movl 0x50(%rbx), %eax
cmpq %rax, 0x18(%rbx)
jae 0x323aa
movq %r9, %r13
movq %r8, %r12
movl $0x30, %edi
callq 0x73a0
movq %rax, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movq %rbp, 0x8(%rax)
movq %r13, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%r15)
movq %r12, 0x18(%r15)
movl $0x2, 0x20(%r15)
movq 0x38(%rbx), %r12
movl $0x20, %edi
callq 0x73a0
movq %r14, 0x10(%rax)
movq %r15, 0x18(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x7060
incq 0x48(%rbx)
movq 0x38(%rbx), %rax
movq %rax, 0x28(%r15)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3279a
movq %r15, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x26c69(%rip), %rsi     # 0x59027
movq %rax, %rdi
callq 0x7500
jmp 0x323e4
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x26c60(%rip), %rsi     # 0x5903c
movq %rax, %rdi
callq 0x7500
movq 0x3cbd5(%rip), %rsi     # 0x6efc0
movq 0x3cb96(%rip), %rdx     # 0x6ef88
movq %rbx, %rdi
callq 0x75e0
jmp 0x323fc
movq %rax, %r14
movq %rbx, %rdi
callq 0x72c0
movq %r14, %rdi
callq 0x7620
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdx, %r10
movl %esi, %r14d
shlq $0x38, %r14
orq %rdx, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %rsi
xorl %r12d, %r12d
movq %r14, %rax
xorl %edx, %edx
divq %rsi
movq (%rbx,%rdx,8), %rax
testq %rax, %rax
je 0x3247f
movq (%rax), %r15
movq %rax, %r12
cmpq 0x8(%r15), %r14
je 0x3247f
movq %rdx, %r11
movq %r15, %r13
movq (%r15), %r15
testq %r15, %r15
je 0x3247c
movq 0x8(%r15), %rbx
movq %rbx, %rax
xorl %edx, %edx
divq %rsi
movl $0x0, %r12d
cmpq %r11, %rdx
jne 0x3247f
movq %r13, %r12
cmpq %rbx, %r14
jne 0x32450
jmp 0x3247f
xorl %r12d, %r12d
testq %r12, %r12
je 0x3248a
movq (%r12), %rax
jmp 0x3248c
xorl %eax, %eax
testq %rax, %rax
je 0x324d8
movq 0x10(%rax), %rax
movq %r10, 0x8(%rax)
movq %r9, (%rax)
movq %rcx, 0x10(%rax)
movq %r8, 0x18(%rax)
movl $0x2, 0x20(%rax)
movq 0x38(%rdi), %rsi
cmpq %r14, 0x10(%rsi)
jne 0x324bf
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
addq $0x38, %rdi
movq 0x28(%rax), %rcx
movq %rdi, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x32676
leaq 0x26972(%rip), %rdi     # 0x58e51
leaq 0x2697d(%rip), %rsi     # 0x58e63
leaq 0x26b79(%rip), %rcx     # 0x59066
movl $0x99, %edx
callq 0x7270
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
shlq $0x38, %rsi
orq %rdx, %rsi
movq (%rdi), %rdi
movq 0x8(%rbx), %r8
xorl %r10d, %r10d
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x32560
movq (%rax), %r9
movq %rax, %r10
cmpq 0x8(%r9), %rsi
je 0x32560
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x3255d
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x32560
movq %r11, %r10
cmpq %rdi, %rsi
jne 0x32531
jmp 0x32560
xorl %r10d, %r10d
testq %r10, %r10
je 0x3256a
movq (%r10), %r14
jmp 0x3256d
xorl %r14d, %r14d
testq %r14, %r14
je 0x325ac
movq 0x10(%r14), %rax
movq 0x28(%rax), %r15
decq 0x48(%rbx)
movq %r15, %rdi
callq 0x7580
movq %r15, %rdi
callq 0x7370
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x3259c
callq 0x7370
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x32a0c
leaq 0x2689e(%rip), %rdi     # 0x58e51
leaq 0x268a9(%rip), %rsi     # 0x58e63
leaq 0x26b50(%rip), %rcx     # 0x59111
movl $0xa9, %edx
callq 0x7270
nop