LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Host_Interface_SATA.cpp
// Function: SSD_Components::Host_Interface_SATA::Validate_simulation_config()
void Host_Interface_SATA::Validate_simulation_config()
	{
		Host_Interface_Base::Validate_simulation_config();
		if (this->input_stream_manager == NULL) {
			throw std::logic_error("Input stream manager is not set for Host Interface");
		}
		if (this->request_fetch_unit == NULL) {
			throw std::logic_error("Request fetch unit is not set for Host Interface");
		}
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x406d0
cmpq $0x0, 0x50(%rbx)
je 0x43c06
cmpq $0x0, 0x58(%rbx)
je 0x43c24
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x1637f(%rip), %rsi     # 0x59f99
movq %rax, %rdi
callq 0x7500
jmp 0x43c40
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x16394(%rip), %rsi     # 0x59fcc
movq %rax, %rdi
callq 0x7500
movq 0x2b379(%rip), %rsi     # 0x6efc0
movq 0x2b332(%rip), %rdx     # 0x6ef80
movq %rbx, %rdi
callq 0x75e0
jmp 0x43c58
movq %rax, %r14
movq %rbx, %rdi
callq 0x72c0
movq %r14, %rdi
callq 0x7620
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Host_Interface_SATA.cpp
// Function: SSD_Components::Input_Stream_Manager_SATA::Handle_new_arrived_request(SSD_Components::User_Request*)
inline void Input_Stream_Manager_SATA::Handle_new_arrived_request(User_Request* request)
	{
		((Input_Stream_SATA*)input_streams[SATA_STREAM_ID])->Submission_head_informed_to_host++;
		if (((Input_Stream_SATA*)input_streams[SATA_STREAM_ID])->Submission_head_informed_to_host == ncq_depth) {
			((Input_Stream_SATA*)input_streams[SATA_STREAM_ID])->Submission_head_informed_to_host = 0;
		}
		if (request->Type == UserRequestType::READ) {
			((Input_Stream_SATA*)input_streams[SATA_STREAM_ID])->Waiting_user_requests.push_back(request);
			((Input_Stream_SATA*)input_streams[SATA_STREAM_ID])->STAT_number_of_read_requests++;
			segment_user_request(request);

			((Host_Interface_SATA*)host_interface)->broadcast_user_request_arrival_signal(request);
		} else {//This is a write request
			((Input_Stream_SATA*)input_streams[SATA_STREAM_ID])->Waiting_user_requests.push_back(request);
			((Input_Stream_SATA*)input_streams[SATA_STREAM_ID])->STAT_number_of_write_requests++;
			((Host_Interface_SATA*)host_interface)->request_fetch_unit->Fetch_write_data(request);
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq (%rax), %r12
movzwl 0x6a(%r12), %eax
incl %eax
xorl %ecx, %ecx
cmpw 0x28(%rdi), %ax
cmovnel %eax, %ecx
movq %rsi, %rbx
movw %cx, 0x6a(%r12)
movl 0x64(%rsi), %ebp
leaq 0x78(%r12), %r15
movl $0x18, %edi
callq 0x73a0
movq %rbx, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x7060
incq 0x88(%r12)
movq 0x10(%r14), %rax
movq (%rax), %rax
testl %ebp, %ebp
je 0x44a79
incl 0xc(%rax)
movq 0x8(%r14), %rax
movq 0x58(%rax), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
incl 0x8(%rax)
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
movq 0x8(%r14), %r14
movq 0x68(%r14), %r15
cmpq 0x70(%r14), %r15
je 0x44aa2
movq %rbx, %rdi
callq *(%r15)
addq $0x8, %r15
jmp 0x44a90
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/NVM_PHY_ONFI.cpp
// Function: SSD_Components::NVM_PHY_ONFI::broadcastTransactionServicedSignal(SSD_Components::NVM_Transaction_Flash*)
void NVM_PHY_ONFI::broadcastTransactionServicedSignal(NVM_Transaction_Flash* transaction)
	{
		for (std::vector<TransactionServicedHandlerType>::iterator it = connectedTransactionServicedHandlers.begin();
			it != connectedTransactionServicedHandlers.end(); it++) {
			(*it)(transaction);
		}
		delete transaction;//This transaction has been consumed and no more needed
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x40(%rdi), %r15
cmpq 0x48(%rdi), %r15
je 0x44d93
movq %rdi, %r14
movq %rbx, %rdi
callq *(%r15)
addq $0x8, %r15
cmpq 0x48(%r14), %r15
jne 0x44d83
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7370
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/NVM_PHY_ONFI_NVDDR2.cpp
// Function: SSD_Components::NVM_PHY_ONFI_NVDDR2::Is_chip_busy_with_stream(SSD_Components::NVM_Transaction_Flash*)
NVM_Transaction_Flash* NVM_PHY_ONFI_NVDDR2::Is_chip_busy_with_stream(NVM_Transaction_Flash* transaction)
	{
		ChipBookKeepingEntry* chipBKE = &bookKeepingTable[transaction->Address.ChannelID][transaction->Address.ChipID];
		stream_id_type stream_id = transaction->Stream_id;

		for (unsigned int die_id = 0; die_id < die_no_per_chip; die_id++) {
			for (auto &tr : chipBKE->Die_book_keeping_records[die_id].ActiveTransactions) {
				if (tr->Stream_id == stream_id) {
					return tr;
				}
			}
		}

		return NULL;
	}

// Assembly:
movl 0x34(%rdi), %ecx
testq %rcx, %rcx
je 0x458dd
movzwl (%rsi), %edx
movl 0x38(%rsi), %eax
movl 0x3c(%rsi), %esi
movq 0x90(%rdi), %rdi
movq (%rdi,%rax,8), %rax
shlq $0x7, %rsi
movq 0x8(%rax,%rsi), %rsi
xorl %edi, %edi
imulq $0x68, %rdi, %rax
leaq (%rsi,%rax), %r8
addq $0x8, %r8
movq %r8, %r9
movq (%r9), %r9
cmpq %r8, %r9
je 0x458d5
movq 0x10(%r9), %rax
cmpw %dx, (%rax)
jne 0x458c2
jmp 0x458df
incq %rdi
cmpq %rcx, %rdi
jne 0x458b3
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/NVM_PHY_ONFI_NVDDR2.h
// Function: SSD_Components::DieBookKeepingEntry::PrepareSuspend()
void PrepareSuspend()
		{
			SuspendedCommand = ActiveCommand;
			RemainingExecTime = Expected_finish_time - Simulator->Time();
			SuspendedTransactions.insert(SuspendedTransactions.begin(), ActiveTransactions.begin(), ActiveTransactions.end());
			Suspended = true;
			ActiveCommand = NULL;
			ActiveTransactions.clear();
			Free = true;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x50(%rdi), %r14
movq %rax, 0x20(%rdi)
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq %rax, %r14
movq %r14, 0x58(%rbx)
leaq 0x28(%rbx), %rdi
movq 0x8(%rbx), %rdx
movq 0x28(%rbx), %rsi
leaq 0x8(%rbx), %r14
movq %r14, %rcx
callq 0x479d4
movb $0x1, 0x49(%rbx)
movq $0x0, (%rbx)
movq 0x8(%rbx), %rdi
cmpq %r14, %rdi
je 0x473a5
movq (%rdi), %r15
callq 0x7370
movq %r15, %rdi
cmpq %r14, %r15
jne 0x47395
movq %r14, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movb $0x1, 0x48(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/ONFI_Channel_Base.h
// Function: SSD_Components::ONFI_Channel_Base::SetStatus(SSD_Components::BusChannelStatus, NVM::FlashMemory::Flash_Chip*)
void SetStatus(BusChannelStatus new_status, NVM::FlashMemory::Flash_Chip* target_chip)
		{
			if (((status == BusChannelStatus::IDLE && new_status == BusChannelStatus::IDLE)
				|| (status == BusChannelStatus::BUSY && new_status == BusChannelStatus::BUSY))
				&& (current_active_chip != target_chip)) {
				PRINT_ERROR("Bus " << ChannelID << ": illegal bus status transition!")
			}

			status = new_status;
			if (status == BusChannelStatus::BUSY) {
				current_active_chip = target_chip;
			} else {
				current_active_chip = NULL;
			}
		}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rdi), %eax
movl %eax, %ecx
xorl $0x1, %ecx
movl %esi, %edi
xorl $0x1, %edi
orl %ecx, %edi
setne %cl
orl %esi, %eax
setne %al
testb %al, %cl
jne 0x473e8
cmpq %rdx, 0x18(%rbx)
jne 0x473ff
movl %esi, 0x14(%rbx)
xorl %eax, %eax
testl %esi, %esi
cmoveq %rdx, %rax
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x27bea(%rip), %r14     # 0x6eff0
leaq 0xf19b(%rip), %rsi      # 0x565a8
movq %r14, %rdi
callq 0x7390
leaq 0x12fd0(%rip), %rsi     # 0x5a3ec
movq %r14, %rdi
callq 0x7390
movl (%rbx), %esi
movq %rax, %rdi
callq 0x74c0
leaq 0x130b1(%rip), %rsi     # 0x5a4e6
movq %rax, %rdi
callq 0x7390
movq %rax, %rdi
callq 0x71c0
movq 0x27b84(%rip), %rdi     # 0x6efd0
callq 0x7430
movl $0x1, %edi
callq 0x7440
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/../nvm_chip/flash_memory/Flash_Chip.h
// Function: NVM::FlashMemory::Flash_Chip::EndCMDXfer(NVM::FlashMemory::Flash_Command*)
void EndCMDXfer(Flash_Command* command)//End transferring write data to the Flash chip
			{
				this->STAT_totalXferTime += (Simulator->Time() - this->lastTransferStart);
				if (this->idleDieNo != die_no)
					STAT_totalOverlappedXferExecTime += (Simulator->Time() - lastTransferStart);
				this->Dies[command->Address[0].DieID]->STAT_TotalXferTime += (Simulator->Time() - lastTransferStart);

				start_command_execution(command);

				this->lastTransferStart = INVALID_TIME;
			}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq 0x98(%rbx), %rax
addq %rax, 0xe0(%rbx)
movl 0x3c(%rbx), %eax
cmpl 0x48(%rbx), %eax
je 0x474a4
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq 0x98(%rbx), %rax
addq %rax, 0xe8(%rbx)
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq 0x98(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%r14), %rdx
movl 0x8(%rdx), %edx
movq (%rcx,%rdx,8), %rcx
addq %rax, 0x58(%rcx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26c86
movq $-0x1, 0x98(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/../nvm_chip/flash_memory/Flash_Chip.h
// Function: NVM::FlashMemory::Flash_Chip::EndCMDDataInXfer(NVM::FlashMemory::Flash_Command*)
void EndCMDDataInXfer(Flash_Command* command)//End transferring write data of a group of multi-plane transactions to the Flash chip
			{
				this->STAT_totalXferTime += (Simulator->Time() - this->lastTransferStart);
				if (this->idleDieNo != die_no)
					STAT_totalOverlappedXferExecTime += (Simulator->Time() - lastTransferStart);
				this->Dies[command->Address[0].DieID]->STAT_TotalXferTime += (Simulator->Time() - lastTransferStart);

				start_command_execution(command);

				this->lastTransferStart = INVALID_TIME;
			}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq 0x98(%rbx), %rax
addq %rax, 0xe0(%rbx)
movl 0x3c(%rbx), %eax
cmpl 0x48(%rbx), %eax
je 0x47532
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq 0x98(%rbx), %rax
addq %rax, 0xe8(%rbx)
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq 0x98(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%r14), %rdx
movl 0x8(%rdx), %edx
movq (%rcx,%rdx,8), %rcx
addq %rax, 0x58(%rcx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26c86
movq $-0x1, 0x98(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/../nvm_chip/flash_memory/Flash_Chip.h
// Function: NVM::FlashMemory::Flash_Chip::EndDataOutXfer(NVM::FlashMemory::Flash_Command*)
void EndDataOutXfer(Flash_Command* command)
			{
				this->STAT_totalXferTime += (Simulator->Time() - this->lastTransferStart);
				if (this->idleDieNo != die_no)
					STAT_totalOverlappedXferExecTime += (Simulator->Time() - lastTransferStart);
				this->Dies[command->Address[0].DieID]->STAT_TotalXferTime += (Simulator->Time() - lastTransferStart);

				this->lastTransferStart = INVALID_TIME;
			}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq 0x98(%rbx), %rax
addq %rax, 0xe0(%rbx)
movl 0x3c(%rbx), %eax
cmpl 0x48(%rbx), %eax
je 0x475c0
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq 0x98(%rbx), %rax
addq %rax, 0xe8(%rbx)
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq 0x98(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%r14), %rdx
movl 0x8(%rdx), %edx
movq (%rcx,%rdx,8), %rcx
addq %rax, 0x58(%rcx)
movq $-0x1, 0x98(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/NVM_PHY_ONFI_NVDDR2.h
// Function: SSD_Components::DieBookKeepingEntry::ClearCommand()
void ClearCommand()
		{
			delete ActiveCommand;
			ActiveCommand = NULL;
			ActiveTransactions.clear();
			Free = true;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x47626
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x47618
callq 0x7370
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x47626
callq 0x7370
movq %r14, %rdi
callq 0x7370
movq $0x0, (%rbx)
leaq 0x8(%rbx), %r14
movq 0x8(%rbx), %rdi
cmpq %r14, %rdi
je 0x47652
movq (%rdi), %r15
callq 0x7370
movq %r15, %rdi
cmpq %r14, %r15
jne 0x47642
movq %r14, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movb $0x1, 0x48(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/NVM_PHY_ONFI_NVDDR2.h
// Function: SSD_Components::DieBookKeepingEntry::PrepareResume()
void PrepareResume()
		{
			ActiveCommand = SuspendedCommand;
			Expected_finish_time = Simulator->Time() + RemainingExecTime;
			ActiveTransactions.insert(ActiveTransactions.begin(), SuspendedTransactions.begin(), SuspendedTransactions.end());
			Suspended = false;
			SuspendedCommand = NULL;
			SuspendedTransactions.clear();
			Free = false;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq %rax, (%rdi)
callq 0x28018
movq %rax, %rdi
callq 0x2841a
addq 0x58(%rbx), %rax
movq %rax, 0x50(%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x28(%rbx), %r14
movq 0x8(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rcx
callq 0x479d4
movb $0x0, 0x49(%rbx)
movq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
cmpq %r14, %rdi
je 0x47b49
movq (%rdi), %r15
callq 0x7370
movq %r15, %rdi
cmpq %r14, %r15
jne 0x47b39
movq %r14, 0x30(%rbx)
movq %r14, 0x28(%rbx)
movq $0x0, 0x38(%rbx)
movb $0x0, 0x48(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Queue_Probe.cpp
// Function: SSD_Components::Queue_Probe::EnqueueRequest(SSD_Components::NVM_Transaction*)
void Queue_Probe::EnqueueRequest(NVM_Transaction* transaction)
	{
		if (transaction == NULL)
			PRINT_ERROR("Inserting a null object to queue!")

		currentObjectsInQueue[transaction] = Simulator->Time();
		nRequests++;
		nRequestsEpoch++;
		setCount(count + 1);
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
testq %rsi, %rsi
je 0x4867a
movq %rdi, %rbx
callq 0x28018
movq %rax, %rdi
callq 0x2841a
movq %rax, %r14
leaq 0x80(%rbx), %rdi
movq %rsp, %rsi
callq 0x49bfc
movq %r14, (%rax)
incq 0x8(%rbx)
incq 0x30(%rbx)
movl (%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0x486be
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x2696f(%rip), %rbx     # 0x6eff0
leaq 0xdf20(%rip), %rsi      # 0x565a8
movq %rbx, %rdi
callq 0x7390
leaq 0x11e91(%rip), %rsi     # 0x5a528
movq %rbx, %rdi
callq 0x7390
movq %rax, %rdi
callq 0x71c0
movq 0x26922(%rip), %rdi     # 0x6efd0
callq 0x7430
movl $0x1, %edi
callq 0x7440
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Queue_Probe.cpp
// Function: SSD_Components::Queue_Probe::setCount(int)
void Queue_Probe::setCount(int val)
	{
		sim_time_type n = Simulator->Time();
		states[count].totalTime += n - lastCountChange;
		statesEpoch[count].totalTime += n - lastCountChange;

		lastCountChange = n;
		count = val;
		if (count > maxQueueLength) {
			maxQueueLength = count;
		}
		while (count + 1 > states.size()) {
			states.push_back(StateStatistics());
		}
		states[count].nEnterances++;
		while (count + 1 > statesEpoch.size()) {
			statesEpoch.push_back(StateStatistics());
		}
		statesEpoch[count].nEnterances++;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %r15d
movq %rdi, %rbx
callq 0x28018
movq %rax, %rdi
callq 0x2841a
movq %rax, %rsi
subq 0x20(%rbx), %rsi
movl (%rbx), %edi
movq 0x50(%rbx), %rdx
shlq $0x4, %rdi
addq %rsi, 0x8(%rdx,%rdi)
movq 0x68(%rbx), %rcx
addq %rsi, 0x8(%rcx,%rdi)
movq %rax, 0x20(%rbx)
movl %r15d, (%rbx)
cmpl %r15d, 0xb8(%rbx)
jae 0x48714
movl %r15d, 0xb8(%rbx)
leaq 0x68(%rbx), %r14
leal 0x1(%r15), %eax
movq 0x58(%rbx), %rsi
movq %rsi, %rdi
subq %rdx, %rdi
sarq $0x4, %rdi
cmpq %rax, %rdi
jae 0x48783
leaq 0x50(%rbx), %r12
xorps %xmm0, %xmm0
movq %rsp, %r13
movaps %xmm0, (%rsp)
cmpq 0x60(%rbx), %rsi
je 0x48754
movups %xmm0, (%rsi)
movq 0x58(%rbx), %rsi
addq $0x10, %rsi
movq %rsi, 0x58(%rbx)
jmp 0x48766
movq %r12, %rdi
movq %r13, %rdx
callq 0x49ac4
xorps %xmm0, %xmm0
movq 0x58(%rbx), %rsi
movl (%rbx), %r15d
leal 0x1(%r15), %eax
movq 0x50(%rbx), %rdx
movq %rsi, %rcx
subq %rdx, %rcx
sarq $0x4, %rcx
cmpq %rax, %rcx
jb 0x48739
movq (%r14), %rcx
movl %r15d, %edi
movq %rdi, %rsi
shlq $0x4, %rsi
incq (%rdx,%rsi)
movq 0x70(%rbx), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %rax, %rdx
jae 0x487ef
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%rsp)
cmpq 0x78(%rbx), %rsi
je 0x487c5
movups %xmm0, (%rsi)
movq 0x70(%rbx), %rsi
addq $0x10, %rsi
movq %rsi, 0x70(%rbx)
jmp 0x487d7
movq %r14, %rdi
movq %r15, %rdx
callq 0x49ac4
xorps %xmm0, %xmm0
movq 0x70(%rbx), %rsi
movl (%rbx), %edi
leal 0x1(%rdi), %eax
movq 0x68(%rbx), %rcx
movq %rsi, %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %rax, %rdx
jb 0x487aa
shlq $0x4, %rdi
incq (%rcx,%rdi)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Queue_Probe.cpp
// Function: SSD_Components::Queue_Probe::DequeueRequest(SSD_Components::NVM_Transaction*)
void Queue_Probe::DequeueRequest(NVM_Transaction* transaction)
	{
		nDepartures++;
		nDeparturesEpoch++;

		if (transaction == NULL)
			throw std::logic_error("Object can not be null if accurateTimingEnabled=ture");
		sim_time_type et = currentObjectsInQueue[transaction];
		currentObjectsInQueue.erase(transaction);
		sim_time_type tc = Simulator->Time() - et;
		totalWaitingTime += tc;
		if (tc > maxWaitingTime)
			maxWaitingTime = tc;
		totalWaitingTimeEpoch += tc;
		setCount(count - 1);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
incq 0x10(%rdi)
incq 0x38(%rdi)
testq %rsi, %rsi
je 0x48885
movq %rdi, %rbx
leaq 0x80(%rdi), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x49bfc
movq (%rax), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x49e82
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq %r12, %rax
addq %rax, 0x18(%rbx)
cmpq 0xc0(%rbx), %rax
jbe 0x48869
movq %rax, 0xc0(%rbx)
addq %rax, 0x40(%rbx)
movl (%rbx), %esi
decl %esi
movq %rbx, %rdi
callq 0x486be
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x11cb1(%rip), %rsi     # 0x5a54a
movq %rax, %rdi
callq 0x7500
movq 0x26718(%rip), %rsi     # 0x6efc0
movq 0x266d1(%rip), %rdx     # 0x6ef80
movq %rbx, %rdi
callq 0x75e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x72c0
movq %r14, %rdi
callq 0x7620
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Queue_Probe.cpp
// Function: SSD_Components::Queue_Probe::ResetEpochStatistics()
void Queue_Probe::ResetEpochStatistics()
	{
		nRequestsEpoch = 0;
		nDeparturesEpoch = 0;
		totalWaitingTimeEpoch = 0;
		epochStartTime = Simulator->Time();

		for(unsigned int i = 0; i < statesEpoch.size(); i++) {
			statesEpoch[i].totalTime = 0;
			statesEpoch[i].nEnterances = 0;
		}
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movq $0x0, 0x40(%rdi)
callq 0x28018
movq %rax, %rdi
callq 0x2841a
xorps %xmm0, %xmm0
movq 0x68(%rbx), %rcx
movq 0x70(%rbx), %rdx
movq %rax, 0x48(%rbx)
subq %rcx, %rdx
je 0x4891d
sarq $0x4, %rdx
movl $0x1, %eax
xorl %esi, %esi
shlq $0x4, %rsi
movups %xmm0, (%rcx,%rsi)
movl %eax, %edi
incl %eax
movq %rdi, %rsi
cmpq %rdi, %rdx
ja 0x48909
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Queue_Probe.cpp
// Function: SSD_Components::Queue_Probe::AvgQueueLength()
double Queue_Probe::AvgQueueLength()
	{
		sim_time_type sum = 0;
		for (unsigned int len = 0; len < states.size(); len++)
			sum += states[len].totalTime * len;
		return (double)sum / (double)Simulator->Time();
	}

// Assembly:
subq $0x18, %rsp
movq 0x50(%rdi), %rax
movq 0x58(%rdi), %rcx
subq %rax, %rcx
je 0x4968b
sarq $0x4, %rcx
addq $0x8, %rax
xorl %edx, %edx
xorl %esi, %esi
movq (%rax), %rdi
imulq %rdx, %rdi
addq %rdi, %rsi
incq %rdx
movl %edx, %edi
addq $0x10, %rax
cmpq %rdi, %rcx
ja 0x4964b
movq %rsi, %xmm0
punpckldq 0xe250(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xe258(%rip), %xmm0     # 0x578d0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
jmp 0x49694
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
callq 0x28018
movq %rax, %rdi
callq 0x2841a
movq %rax, %xmm0
punpckldq 0xe212(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xe21a(%rip), %xmm0     # 0x578d0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd (%rsp), %xmm0
divsd %xmm1, %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Queue_Probe.cpp
// Function: SSD_Components::Queue_Probe::STDevQueueLength()
double Queue_Probe::STDevQueueLength()
	{
		sim_time_type sum = 0;
		for (unsigned int len = 0; len < states.size(); len++) {
			sum += states[len].totalTime * len;
		}
		double mean = (double)sum / (double)Simulator->Time();
		double stdev = 0.0;
		for (unsigned int len = 0; len < states.size(); len++) {
			stdev += std::pow((double)states[len].totalTime * len / (double)Simulator->Time() - mean, 2);
		}

		return std::sqrt(stdev);
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x50(%rdi), %rax
movq 0x58(%rdi), %rcx
xorpd %xmm1, %xmm1
subq %rax, %rcx
je 0x497ea
sarq $0x4, %rcx
addq $0x8, %rax
xorl %edx, %edx
xorl %esi, %esi
movq (%rax), %rdi
imulq %rdx, %rdi
addq %rdi, %rsi
incq %rdx
movl %edx, %edi
addq $0x10, %rax
cmpq %rdi, %rcx
ja 0x497b1
movq %rsi, %xmm0
punpckldq 0xe0ea(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xe0f2(%rip), %xmm0     # 0x578d0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
callq 0x28018
movq %rax, %rdi
callq 0x2841a
movapd (%rsp), %xmm2
xorpd %xmm0, %xmm0
movq 0x50(%rbx), %rcx
cmpq %rcx, 0x58(%rbx)
je 0x498fb
movq %rax, %xmm0
punpckldq 0xe0a0(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xe0a8(%rip), %xmm0     # 0x578d0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm2
xorpd %xmm0, %xmm0
xorl %eax, %eax
xorl %r14d, %r14d
movapd %xmm2, (%rsp)
movsd %xmm0, 0x20(%rsp)
shlq $0x4, %rax
movsd 0x8(%rcx,%rax), %xmm2
movsd 0xe062(%rip), %xmm0     # 0x578c0
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movapd 0xe067(%rip), %xmm0     # 0x578d0
subpd %xmm0, %xmm2
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
addsd %xmm2, %xmm1
movl %r14d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
callq 0x28018
movq %rax, %rdi
callq 0x2841a
movapd (%rsp), %xmm2
movq %rax, %xmm0
punpckldq 0xe013(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xe01b(%rip), %xmm0     # 0x578d0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm3
divsd %xmm1, %xmm3
movsd 0x20(%rsp), %xmm0
subsd %xmm2, %xmm3
mulsd %xmm3, %xmm3
incl %r14d
movq 0x50(%rbx), %rcx
movq 0x58(%rbx), %rdx
addsd %xmm3, %xmm0
subq %rcx, %rdx
sarq $0x4, %rdx
movq %r14, %rax
cmpq %r14, %rdx
ja 0x49846
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x49911
sqrtsd %xmm0, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x72f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Queue_Probe.cpp
// Function: SSD_Components::Queue_Probe::AvgQueueLengthEpoch()
double Queue_Probe::AvgQueueLengthEpoch()
	{
		sim_time_type sum = 0;
		sim_time_type sumTime = 0;
		for (unsigned int len = 0; len < states.size(); len++) {
			sum += statesEpoch[len].totalTime * len;
			sumTime += statesEpoch[len].totalTime;
		}

		return (double)sum / (double)(Simulator->Time() - epochStartTime);
	}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x58(%rdi), %rax
movq 0x50(%rdi), %rcx
subq %rcx, %rax
je 0x49983
sarq $0x4, %rax
movq 0x68(%rbx), %rcx
addq $0x8, %rcx
xorl %edx, %edx
xorl %esi, %esi
movq (%rcx), %rdi
imulq %rdx, %rdi
addq %rdi, %rsi
incq %rdx
movl %edx, %edi
addq $0x10, %rcx
cmpq %rdi, %rax
ja 0x49943
movq %rsi, %xmm0
punpckldq 0xdf58(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xdf60(%rip), %xmm0     # 0x578d0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
jmp 0x4998c
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
callq 0x28018
movq %rax, %rdi
callq 0x2841a
subq 0x48(%rbx), %rax
movq %rax, %xmm0
punpckldq 0xdf16(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xdf1e(%rip), %xmm0     # 0x578d0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd (%rsp), %xmm0
divsd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Stats.cpp
// Function: SSD_Components::Stats::Clear_stats(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)
void Stats::Clear_stats(unsigned int channel_no, unsigned int chip_no_per_channel, unsigned int die_no_per_chip, unsigned int plane_no_per_die,
		unsigned int block_no_per_plane, unsigned int page_no_per_block, unsigned int max_allowed_block_erase_count)
	{
		for (unsigned int channel_cntr = 0; channel_cntr < channel_no; channel_cntr++) {
			for (unsigned int chip_cntr = 0; chip_cntr < chip_no_per_channel; chip_cntr++) {
				for (unsigned int die_cntr = 0; die_cntr < die_no_per_chip; die_cntr++) {
					for (unsigned int plane_cntr = 0; plane_cntr < plane_no_per_die; plane_cntr++) {
						delete[] Block_erase_histogram[channel_cntr][chip_cntr][die_cntr][plane_cntr];
					}
					delete[] Block_erase_histogram[channel_cntr][chip_cntr][die_cntr];
				}
				delete[] Block_erase_histogram[channel_cntr][chip_cntr];
			}
			delete[] Block_erase_histogram[channel_cntr];
		}
		delete[] Block_erase_histogram;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %eax
movq 0x263f9(%rip), %rdi     # 0x70730
testl %eax, %eax
je 0x4a434
movl %ecx, %ebx
movl %edx, %r12d
movl %eax, %eax
movq %rax, 0x10(%rsp)
movl %esi, %eax
movq %rax, 0x18(%rsp)
movl %edx, %eax
movq %rax, 0x20(%rsp)
movl %ecx, %r15d
xorl %r14d, %r14d
movl %edx, 0xc(%rsp)
movl %esi, 0x8(%rsp)
testl %esi, %esi
je 0x4a40a
xorl %ebp, %ebp
testl %r12d, %r12d
je 0x4a3db
xorl %r12d, %r12d
movl %ebx, %r13d
testl %ebx, %ebx
je 0x4a3ae
xorl %ebx, %ebx
movq (%rdi,%r14,8), %rax
movq (%rax,%rbp,8), %rax
movq (%rax,%r12,8), %rax
movq (%rax,%rbx,8), %rax
testq %rax, %rax
je 0x4a3a6
movq %rax, %rdi
callq 0x7480
movq 0x2638a(%rip), %rdi     # 0x70730
incq %rbx
cmpq %rbx, %r15
jne 0x4a382
movq (%rdi,%r14,8), %rax
movq (%rax,%rbp,8), %rax
movq (%rax,%r12,8), %rax
testq %rax, %rax
je 0x4a3ce
movq %rax, %rdi
callq 0x7480
movq 0x26362(%rip), %rdi     # 0x70730
incq %r12
cmpq 0x20(%rsp), %r12
movl %r13d, %ebx
jne 0x4a379
movq (%rdi,%r14,8), %rax
movq (%rax,%rbp,8), %rax
testq %rax, %rax
je 0x4a3f7
movq %rax, %rdi
callq 0x7480
movq 0x26339(%rip), %rdi     # 0x70730
incq %rbp
cmpq 0x18(%rsp), %rbp
movl 0xc(%rsp), %r12d
jne 0x4a371
movq (%rdi,%r14,8), %rax
testq %rax, %rax
je 0x4a422
movq %rax, %rdi
callq 0x7480
movq 0x2630e(%rip), %rdi     # 0x70730
incq %r14
cmpq 0x10(%rsp), %r14
movl 0x8(%rsp), %esi
jne 0x4a367
addq $0x28, %rsp
testq %rdi, %rdi
je 0x4a44c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7480
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/TSU_Base.cpp
// Function: SSD_Components::TSU_Base::Setup_triggers()
void TSU_Base::Setup_triggers()
	{
		Sim_Object::Setup_triggers();
		_NVMController->ConnectToTransactionServicedSignal(handle_transaction_serviced_signal_from_PHY);
		_NVMController->ConnectToChannelIdleSignal(handle_channel_idle_signal);
		_NVMController->ConnectToChipIdleSignal(handle_chip_idle_signal);
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb $0x1, 0x28(%rdi)
movq 0x38(%rdi), %rdi
leaq 0x27(%rip), %rsi        # 0x4a67e
callq 0x44d44
movq 0x38(%rbx), %rdi
leaq 0x19(%rip), %rsi        # 0x4a680
callq 0x44da0
movq 0x38(%rbx), %rdi
leaq 0x89(%rip), %rsi        # 0x4a700
popq %rbx
jmp 0x44df4
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/TSU_Base.cpp
// Function: SSD_Components::TSU_Base::handle_channel_idle_signal(unsigned int)
void TSU_Base::handle_channel_idle_signal(flash_channel_ID_type channelID)
	{
		for (unsigned int i = 0; i < _my_instance->chip_no_per_channel; i++) {
			//The TSU does not check if the chip is idle or not since it is possible to suspend a busy chip and issue a new command
			_my_instance->process_chip_requests(_my_instance->_NVMController->Get_chip(channelID, _my_instance->Round_robin_turn_of_channel[channelID]));
			_my_instance->Round_robin_turn_of_channel[channelID] = (flash_chip_ID_type)(_my_instance->Round_robin_turn_of_channel[channelID] + 1) % _my_instance->chip_no_per_channel;

			//A transaction has been started, so TSU should stop searching for another chip
			if (_my_instance->_NVMController->Get_channel_status(channelID) == BusChannelStatus::BUSY) {
				break;
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x2950a(%rip), %r14     # 0x73b98
cmpl $0x0, 0x48(%r14)
je 0x4a6f4
movl %edi, %ebx
movl %edi, %r15d
xorl %ebp, %ebp
movq 0x38(%r14), %rdi
movq 0x70(%r14), %rax
movl (%rax,%r15,4), %edx
movq (%rdi), %rax
movl %ebx, %esi
callq *0x30(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x4aa06
movq 0x294d6(%rip), %rcx     # 0x73b98
movq 0x70(%rcx), %rsi
movl (%rsi,%r15,4), %eax
incl %eax
xorl %edx, %edx
divl 0x48(%rcx)
movl %edx, (%rsi,%r15,4)
movq 0x38(%rcx), %rdi
movq (%rdi), %rax
movl %ebx, %esi
callq *0x28(%rax)
testl %eax, %eax
je 0x4a6f4
incl %ebp
movq 0x294aa(%rip), %r14     # 0x73b98
cmpl 0x48(%r14), %ebp
jb 0x4a69c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/TSU_OutofOrder.cpp
// Function: SSD_Components::TSU_OutOfOrder::service_erase_transaction(NVM::FlashMemory::Flash_Chip*)
bool TSU_OutOfOrder::service_erase_transaction(NVM::FlashMemory::Flash_Chip *chip)
{
	if (_NVMController->GetChipStatus(chip) != ChipStatus::IDLE)
	{
		return false;
	}

	Flash_Transaction_Queue *source_queue = &GCEraseTRQueue[chip->ChannelID][chip->ChipID];
	if (source_queue->size() == 0)
	{
		return false;
	}

	issue_command_to_chip(source_queue, NULL, Transaction_Type::ERASE, false);

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
testl %eax, %eax
je 0x4d9ee
xorl %eax, %eax
jmp 0x4da2b
movq 0xd0(%rbx), %rax
movl 0x2c(%r14), %ecx
movl 0x30(%r14), %edx
movq (%rax,%rcx,8), %rsi
movq %rdx, %rax
shlq $0x8, %rax
leaq (%rax,%rdx,8), %rax
cmpq $0x0, 0x18(%rsi,%rax)
je 0x4d9ea
addq %rax, %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x4a732
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Host_Interface_NVMe_Priorities.h
// Function: IO_Flow_Priority_Class::to_string[abi:cxx11](IO_Flow_Priority_Class::Priority)
static std::string to_string(Priority priority)
    {
        switch (priority)
        {
        case URGENT:
            return "URGENT";
        case HIGH:
            return "HIGH";
        case MEDIUM:
            return "MEDIUM";
        case LOW:
            return "LOW";
        default:
            return "";
        }
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpl $0x3, %esi
ja 0x5180d
movl %esi, %eax
leaq 0x908f(%rip), %rcx      # 0x5a848
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x5874(%rip), %rsi      # 0x5703d
leaq 0x5873(%rip), %rdx      # 0x57043
jmp 0x51800
leaq 0x5870(%rip), %rsi      # 0x57049
leaq 0x586f(%rip), %rdx      # 0x5704f
jmp 0x51800
leaq 0x5867(%rip), %rsi      # 0x57050
leaq 0x5863(%rip), %rdx      # 0x57053
jmp 0x51800
leaq 0x584b(%rip), %rsi      # 0x57044
leaq 0x5848(%rip), %rdx      # 0x57048
movq %rbx, %rdi
callq 0xafc8
movq %rbx, %rax
popq %rbx
retq
leaq 0x61c7(%rip), %rdx      # 0x579db
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0x51803
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/CMRRandomGenerator.cpp
// Function: Utils::CMRRandomGenerator::CMRRandomGenerator(long, int)
CMRRandomGenerator::CMRRandomGenerator(int64_t n, int32_t e)
	{
		for (int i = 0; i <= 1; i++) {
			for (int j = 0; j <= 2; j++) {
				s[i][j] = init_s[i][j];
			}
		}
		Advance(n, e);
	}

// Assembly:
movb $0x1, %al
xorl %r8d, %r8d
leaq 0x1db24(%rip), %rcx     # 0x6f500
shlq $0x3, %r8
leaq (%r8,%r8,2), %r8
leaq (%rdi,%r8), %r9
xorl %r10d, %r10d
leaq (%r8,%r10,8), %r11
movsd (%rcx,%r11), %xmm0
movsd %xmm0, (%r9,%r10,8)
incq %r10
cmpq $0x3, %r10
jne 0x519eb
movl $0x1, %r8d
testb $0x1, %al
movl $0x0, %eax
je 0x51a1a
jmp 0x519dc
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/CMRRandomGenerator.cpp
// Function: Utils::CMRRandomGenerator::NextDouble()
double CMRRandomGenerator::NextDouble()
	{
		double p1 = mod(a12 * s[0][1] + a13 * s[0][0], m1);
		s[0][0] = s[0][1];
		s[0][1] = s[0][2];
		s[0][2] = p1;
		double p2 = mod(a21 * s[1][2] + a23 * s[1][0], m2);
		s[1][0] = s[1][1];
		s[1][1] = s[1][2];
		s[1][2] = p2;
		double p = p1 - p2;
		if (p < 0.0) {
			p += m1;
		}

		return (p + 1) * norm;
	}

// Assembly:
movsd 0x1d818(%rip), %xmm1    # 0x6f4c8
movupd (%rdi), %xmm3
movupd 0x8(%rdi), %xmm2
movupd 0x20(%rdi), %xmm0
movsd 0x1d81a(%rip), %xmm4    # 0x6f4e0
movsd 0x1d80a(%rip), %xmm5    # 0x6f4d8
movupd %xmm2, (%rdi)
movhpd 0x1d816(%rip), %xmm4    # xmm4 = xmm4[0],mem[0]
movhpd 0x18(%rdi), %xmm3       # xmm3 = xmm3[0],mem[0]
mulpd %xmm4, %xmm3
movhpd 0x1d7fd(%rip), %xmm5    # xmm5 = xmm5[0],mem[0]
shufpd $0x2, %xmm0, %xmm2      # xmm2 = xmm2[0],xmm0[1]
mulpd %xmm5, %xmm2
addpd %xmm3, %xmm2
movapd %xmm1, %xmm3
movhpd 0x1d7cc(%rip), %xmm3    # xmm3 = xmm3[0],mem[0]
movapd %xmm2, %xmm4
divpd %xmm3, %xmm4
cvttsd2si %xmm4, %rax
unpckhpd %xmm4, %xmm4            # xmm4 = xmm4[1,1]
cvttsd2si %xmm4, %rcx
xorps %xmm4, %xmm4
cvtsi2sd %rax, %xmm4
xorps %xmm5, %xmm5
cvtsi2sd %rcx, %xmm5
unpcklpd %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0]
mulpd %xmm3, %xmm4
subpd %xmm4, %xmm2
xorpd %xmm4, %xmm4
movapd %xmm2, %xmm5
cmpltpd %xmm4, %xmm5
addpd %xmm2, %xmm3
andpd %xmm5, %xmm3
andnpd %xmm2, %xmm5
orpd %xmm3, %xmm5
movlpd %xmm5, 0x10(%rdi)
movupd %xmm0, 0x18(%rdi)
pshufd $0xee, %xmm5, %xmm2     # xmm2 = xmm5[2,3,2,3]
subsd %xmm2, %xmm5
addsd %xmm5, %xmm1
xorpd %xmm3, %xmm3
movapd %xmm5, %xmm0
cmpltsd %xmm3, %xmm0
andpd %xmm0, %xmm1
andnpd %xmm5, %xmm0
orpd %xmm1, %xmm0
addsd 0x5e85(%rip), %xmm0     # 0x57c10
movlpd %xmm2, 0x28(%rdi)
mulsd 0x1d728(%rip), %xmm0    # 0x6f4c0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/CMRRandomGenerator.h
// Function: Utils::CMRRandomGenerator::mm_mul(long (*) [3], long (*) [3], long (*) [3], long)
static void mm_mul(int64_t a[][3], int64_t b[][3], int64_t c[][3], int64_t m)
			{
				int64_t d [3][3];

				for (int i = 0; i <= 2; i++) {
					for (int j = 0; j <= 2; j++) {
						d[i][j] = 0;
						for (int k = 0; k <= 2; k++) {
							d[i][j] = (a[i][k] * b[k][j] + d[i][j]) % m;
						}
					}
				}
				m_copy(d, c);
			}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r8
xorl %r9d, %r9d
leaq (%r9,%r9,2), %rax
leaq (%rsp,%rax,8), %r10
addq $-0x48, %r10
movq %rsi, %r11
xorl %ebx, %ebx
leaq (%r10,%rbx,8), %r14
movq %r11, %r15
xorl %r12d, %r12d
xorl %edx, %edx
movq (%r15), %rax
imulq (%rdi,%r12,8), %rax
addq %rdx, %rax
cqto
idivq %rcx
incq %r12
addq $0x18, %r15
cmpq $0x3, %r12
jne 0x51dc4
movq %rdx, (%r14)
incq %rbx
addq $0x8, %r11
cmpq $0x3, %rbx
jne 0x51db8
incq %r9
addq $0x18, %rdi
cmpq $0x3, %r9
jne 0x51da7
xorl %eax, %eax
movq -0x38(%rsp,%rax), %rcx
movq %rcx, 0x10(%r8,%rax)
movups -0x48(%rsp,%rax), %xmm0
movups %xmm0, (%r8,%rax)
addq $0x18, %rax
cmpq $0x48, %rax
jne 0x51e00
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/Helper_Functions.cpp
// Function: Utils::Combination_count(double, double)
double Combination_count(double n, double k)
	{
		if (k > n) {
			return 0;
		}
		
		if (k * 2 > n) {
			k = n - k;
		}

		if (k == 0) {
			return 1;
		}

		double result = n;
		for (int i = 2; i <= k; ++i) {
			result *= (n - i + 1);
			result /= i;
		}

		return result;
	}

// Assembly:
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm1
ja 0x51ec1
movapd %xmm1, %xmm2
addsd %xmm1, %xmm2
movapd %xmm0, %xmm4
subsd %xmm1, %xmm4
movapd %xmm0, %xmm3
cmpltsd %xmm2, %xmm3
andpd %xmm3, %xmm4
andnpd %xmm1, %xmm3
orpd %xmm4, %xmm3
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm3
jne 0x51e71
jp 0x51e71
movsd 0x5da1(%rip), %xmm2     # 0x57c10
jmp 0x51ec1
ucomisd 0x8a97(%rip), %xmm3     # 0x5a910
jae 0x51e81
movapd %xmm0, %xmm2
jmp 0x51ec1
movsd 0x8a87(%rip), %xmm1     # 0x5a910
movl $0x3, %eax
movsd 0x5d7a(%rip), %xmm4     # 0x57c10
movapd %xmm0, %xmm5
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
addsd %xmm4, %xmm2
mulsd %xmm5, %xmm2
divsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
incl %eax
ucomisd %xmm1, %xmm3
movapd %xmm2, %xmm5
jae 0x51e9a
movapd %xmm2, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/Logical_Address_Partitioning_Unit.cpp
// Function: Utils::Logical_Address_Partitioning_Unit::Reset()
void Logical_Address_Partitioning_Unit::Reset()
	{
		initialized = false;
		pdas_per_flow.clear();
		start_lhas_per_flow.clear();
		end_lhas_per_flow.clear();
		stream_channel_ids.clear();
		stream_chip_ids.clear();
		stream_die_ids.clear();
		stream_plane_ids.clear();

		for (flash_channel_ID_type channel_id = 0; channel_id < channel_count; channel_id++) {
			for (flash_chip_ID_type chip_id = 0; chip_id < chip_no_per_channel; chip_id++) {
				for (flash_die_ID_type die_id = 0; die_id < die_no_per_chip; die_id++) {
					delete[] resource_list[channel_id][chip_id][die_id];
				}
				delete[] resource_list[channel_id][chip_id];
			}
			delete[] resource_list[channel_id];
		}

		delete[] resource_list;
	}

// Assembly:
movb $0x0, 0x21a09(%rip)     # 0x73cc4
movq 0x21a06(%rip), %rax     # 0x73cc8
cmpq %rax, 0x21a07(%rip)     # 0x73cd0
je 0x522d2
movq %rax, 0x219fe(%rip)     # 0x73cd0
movq 0x21a07(%rip), %rax     # 0x73ce0
cmpq %rax, 0x21a08(%rip)     # 0x73ce8
je 0x522e9
movq %rax, 0x219ff(%rip)     # 0x73ce8
movq 0x21a08(%rip), %rax     # 0x73cf8
cmpq %rax, 0x21a09(%rip)     # 0x73d00
je 0x52300
movq %rax, 0x21a00(%rip)     # 0x73d00
pushq %r15
pushq %r14
pushq %rbx
leaq 0x21954(%rip), %rdi     # 0x73c60
callq 0x531b8
leaq 0x21960(%rip), %rdi     # 0x73c78
callq 0x531b8
leaq 0x2196c(%rip), %rdi     # 0x73c90
callq 0x531b8
leaq 0x21978(%rip), %rdi     # 0x73ca8
callq 0x531b8
cmpl $0x0, 0x219d4(%rip)     # 0x73d10
movq 0x21915(%rip), %rdi     # 0x73c58
je 0x52403
movl 0x219c5(%rip), %esi     # 0x73d14
xorl %ebx, %ebx
testl %esi, %esi
je 0x523d1
movl 0x219bd(%rip), %ecx     # 0x73d18
movl %ecx, %edx
xorl %r14d, %r14d
testl %edx, %edx
je 0x5239b
xorl %r15d, %r15d
movq (%rdi,%rbx,8), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rax
testq %rax, %rax
je 0x5238d
movq %rax, %rdi
callq 0x7480
movq 0x218d1(%rip), %rdi     # 0x73c58
movl 0x2198b(%rip), %ecx     # 0x73d18
incq %r15
movl %ecx, %eax
movl %ecx, %edx
cmpq %rax, %r15
jb 0x52367
jmp 0x5239d
xorl %edx, %edx
movq (%rdi,%rbx,8), %rax
movq (%rax,%r14,8), %rax
testq %rax, %rax
je 0x523c1
movq %rax, %rdi
callq 0x7480
movl 0x21960(%rip), %ecx     # 0x73d18
movq 0x21899(%rip), %rdi     # 0x73c58
movl %ecx, %edx
incq %r14
movl 0x2194a(%rip), %esi     # 0x73d14
cmpq %rsi, %r14
jb 0x52360
jmp 0x523d3
xorl %esi, %esi
movq (%rdi,%rbx,8), %rax
testq %rax, %rax
je 0x523f1
movq %rax, %rdi
callq 0x7480
movl 0x2192a(%rip), %esi     # 0x73d14
movq 0x21867(%rip), %rdi     # 0x73c58
incq %rbx
movl 0x21916(%rip), %eax     # 0x73d10
cmpq %rax, %rbx
jb 0x52351
testq %rdi, %rdi
popq %rbx
popq %r14
popq %r15
jne 0x7480
retq
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/Logical_Address_Partitioning_Unit.cpp
// Function: Utils::Logical_Address_Partitioning_Unit::Start_lha_available_to_flow(unsigned short)
LHA_type Logical_Address_Partitioning_Unit::Start_lha_available_to_flow(stream_id_type stream_id)
	{
		if (initialized) {
			switch (hostinterface_type) {
				case HostInterface_Types::SATA:
					return start_lhas_per_flow[stream_id];
					break;
				case HostInterface_Types::NVME:
					return start_lhas_per_flow[stream_id];
					break;
				default:
					break;
			}
		}

		PRINT_ERROR("The address partitioning unit is not initialized!")
	}

// Assembly:
cmpb $0x1, 0x20d57(%rip)     # 0x73cc4
jne 0x52f87
cmpl $0x2, 0x20d4a(%rip)     # 0x73cc0
jae 0x52f87
movq 0x20d61(%rip), %rax     # 0x73ce0
movzwl %di, %ecx
movq (%rax,%rcx,8), %rax
retq
pushq %rbx
movq 0x1c061(%rip), %rbx     # 0x6eff0
leaq 0x3612(%rip), %rsi      # 0x565a8
movq %rbx, %rdi
callq 0x7390
leaq 0x797b(%rip), %rsi      # 0x5a920
movq %rbx, %rdi
callq 0x7390
movq %rax, %rdi
callq 0x71c0
movq 0x1c014(%rip), %rdi     # 0x6efd0
callq 0x7430
movl $0x1, %edi
callq 0x7440
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/Logical_Address_Partitioning_Unit.cpp
// Function: Utils::Logical_Address_Partitioning_Unit::End_lha_available_to_flow(unsigned short)
LHA_type Logical_Address_Partitioning_Unit::End_lha_available_to_flow(stream_id_type stream_id)
	{
		if (initialized) {
			switch (hostinterface_type) {
				case HostInterface_Types::SATA:
					return end_lhas_per_flow[stream_id];
					break;
				case HostInterface_Types::NVME:
					return end_lhas_per_flow[stream_id];
					break;
				default:
					break;
			}
		}
		PRINT_ERROR("The address partitioning unit is not initialized!")
	}

// Assembly:
cmpb $0x1, 0x20cf1(%rip)     # 0x73cc4
jne 0x52fed
cmpl $0x2, 0x20ce4(%rip)     # 0x73cc0
jae 0x52fed
movq 0x20d13(%rip), %rax     # 0x73cf8
movzwl %di, %ecx
movq (%rax,%rcx,8), %rax
retq
pushq %rbx
movq 0x1bffb(%rip), %rbx     # 0x6eff0
leaq 0x35ac(%rip), %rsi      # 0x565a8
movq %rbx, %rdi
callq 0x7390
leaq 0x7915(%rip), %rsi      # 0x5a920
movq %rbx, %rdi
callq 0x7390
movq %rax, %rdi
callq 0x71c0
movq 0x1bfae(%rip), %rdi     # 0x6efd0
callq 0x7430
movl $0x1, %edi
callq 0x7440
nop
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/Logical_Address_Partitioning_Unit.cpp
// Function: Utils::Logical_Address_Partitioning_Unit::LHA_count_allocate_to_flow_from_host_view(unsigned short)
LHA_type Logical_Address_Partitioning_Unit::LHA_count_allocate_to_flow_from_host_view(stream_id_type stream_id)
	{
		if (initialized) {
			switch (hostinterface_type) {
				case HostInterface_Types::SATA:
					return (end_lhas_per_flow[stream_id] - start_lhas_per_flow[stream_id] + 1);
					break;
				case HostInterface_Types::NVME:
					return (end_lhas_per_flow[stream_id] - start_lhas_per_flow[stream_id] + 1);
					break;
				default:
					break;
			}
		}
		PRINT_ERROR("The address partitioning unit is not initialized!")
	}

// Assembly:
cmpb $0x1, 0x20c8b(%rip)     # 0x73cc4
jne 0x53064
cmpl $0x2, 0x20c7e(%rip)     # 0x73cc0
jae 0x53064
movq 0x20cad(%rip), %rax     # 0x73cf8
movzwl %di, %ecx
shll $0x3, %ecx
movq (%rax,%rcx), %rax
movq 0x20c84(%rip), %rdx     # 0x73ce0
subq (%rdx,%rcx), %rax
incq %rax
retq
pushq %rbx
movq 0x1bf84(%rip), %rbx     # 0x6eff0
leaq 0x3535(%rip), %rsi      # 0x565a8
movq %rbx, %rdi
callq 0x7390
leaq 0x789e(%rip), %rsi      # 0x5a920
movq %rbx, %rdi
callq 0x7390
movq %rax, %rdi
callq 0x71c0
movq 0x1bf37(%rip), %rdi     # 0x6efd0
callq 0x7430
movl $0x1, %edi
callq 0x7440
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/Logical_Address_Partitioning_Unit.cpp
// Function: Utils::Logical_Address_Partitioning_Unit::LHA_count_allocate_to_flow_from_device_view(unsigned short)
LHA_type Logical_Address_Partitioning_Unit::LHA_count_allocate_to_flow_from_device_view(stream_id_type stream_id)
	{
		if (initialized) {
			switch (hostinterface_type) {
				case HostInterface_Types::SATA://It is not possible to differentiate between streams inside the device when a SATA host interface is used, so all lha space is available to all streams
					return total_lha_no;
					break;
				case HostInterface_Types::NVME:
					return (end_lhas_per_flow[stream_id] - start_lhas_per_flow[stream_id] + 1);
					break;
				default:
					break;
			}
		}
		PRINT_ERROR("The address partitioning unit is not initialized!")
	}

// Assembly:
cmpb $0x1, 0x20c15(%rip)     # 0x73cc4
jne 0x530e8
movl 0x20c09(%rip), %eax     # 0x73cc0
cmpl $0x1, %eax
je 0x530c8
testl %eax, %eax
jne 0x530e8
movq 0x20c61(%rip), %rax     # 0x73d28
retq
movq 0x20c29(%rip), %rax     # 0x73cf8
movzwl %di, %ecx
shll $0x3, %ecx
movq (%rax,%rcx), %rax
movq 0x20c00(%rip), %rdx     # 0x73ce0
subq (%rdx,%rcx), %rax
incq %rax
retq
pushq %rbx
movq 0x1bf00(%rip), %rbx     # 0x6eff0
leaq 0x34b1(%rip), %rsi      # 0x565a8
movq %rbx, %rdi
callq 0x7390
leaq 0x781a(%rip), %rsi      # 0x5a920
movq %rbx, %rdi
callq 0x7390
movq %rax, %rdi
callq 0x71c0
movq 0x1beb3(%rip), %rdi     # 0x6efd0
callq 0x7430
movl $0x1, %edi
callq 0x7440
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/Logical_Address_Partitioning_Unit.cpp
// Function: Utils::Logical_Address_Partitioning_Unit::PDA_count_allocate_to_flow(unsigned short)
PDA_type Logical_Address_Partitioning_Unit::PDA_count_allocate_to_flow(stream_id_type stream_id)
	{
		if (initialized) {
			switch (hostinterface_type) {
				case HostInterface_Types::SATA://It is not possible to differentiate between streams inside the device when a SATA host interface is used, so all lha space is available to all streams
					return total_pda_no;
				case HostInterface_Types::NVME:
					return pdas_per_flow[stream_id];
					break;
				default:
					break;
			}
		}
		PRINT_ERROR("The address partitioning unit is not initialized!")
	}

// Assembly:
cmpb $0x1, 0x20b91(%rip)     # 0x73cc4
jne 0x5315e
movl 0x20b85(%rip), %eax     # 0x73cc0
testl %eax, %eax
je 0x53153
cmpl $0x1, %eax
jne 0x5315e
movzwl %di, %eax
shll $0x3, %eax
addq 0x20b77(%rip), %rax     # 0x73cc8
jmp 0x5315a
leaq 0x20bc6(%rip), %rax     # 0x73d20
movq (%rax), %rax
retq
pushq %rbx
movq 0x1be8a(%rip), %rbx     # 0x6eff0
leaq 0x343b(%rip), %rsi      # 0x565a8
movq %rbx, %rdi
callq 0x7390
leaq 0x77a4(%rip), %rsi      # 0x5a920
movq %rbx, %rdi
callq 0x7390
movq %rax, %rdi
callq 0x71c0
movq 0x1be3d(%rip), %rdi     # 0x6efd0
callq 0x7430
movl $0x1, %edi
callq 0x7440
// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/utils/RandomGenerator.cpp
// Function: Utils::RandomGenerator::Erlang(double, double)
double RandomGenerator::Erlang(double x, double s)
	{
		int64_t i, k;
		double z;
		z = x / s;
		k = (uint64_t)(z * z);
		z = 1.0;
		for (i = 0; i < k; i++) {
			z *= FloatRandom();
		}
		return -(x / (double) k) * log(z);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movapd %xmm0, (%rsp)
divsd %xmm1, %xmm0
mulsd %xmm0, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1c5c(%rip), %xmm0     # 0x55050
cvttsd2si %xmm0, %r14
andq %rcx, %r14
orq %rax, %r14
jle 0x5342e
movq %rdi, %rbx
movsd 0x4804(%rip), %xmm1     # 0x57c10
movq %r14, %r15
movsd %xmm1, 0x18(%rsp)
movq (%rbx), %rdi
callq 0x51ca8
movsd 0x18(%rsp), %xmm1
mulsd %xmm0, %xmm1
decq %r15
jne 0x5340f
jmp 0x53436
movsd 0x47da(%rip), %xmm1     # 0x57c10
xorps %xmm0, %xmm0
cvtsi2sd %r14, %xmm0
movapd (%rsp), %xmm2
xorpd 0x5e25(%rip), %xmm2     # 0x59270
divsd %xmm0, %xmm2
movapd %xmm2, (%rsp)
movapd %xmm1, %xmm0
callq 0x7300
mulsd (%rsp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq