// File: CMU-SAFARI[P]MQSim/src/ssd/NVM_PHY_ONFI_NVDDR2.cpp
// Function: SSD_Components::NVM_PHY_ONFI_NVDDR2::handle_ready_signal_from_chip(NVM::FlashMemory::Flash_Chip*, NVM::FlashMemory::Flash_Command*)
inline void NVM_PHY_ONFI_NVDDR2::handle_ready_signal_from_chip(NVM::FlashMemory::Flash_Chip* chip, NVM::FlashMemory::Flash_Command* command)
	{
		ChipBookKeepingEntry *chipBKE = &_my_instance->bookKeepingTable[chip->ChannelID][chip->ChipID];
		DieBookKeepingEntry *dieBKE = &(chipBKE->Die_book_keeping_records[command->Address[0].DieID]);

		switch (command->CommandCode)
		{
		case CMD_READ_PAGE:
		case CMD_READ_PAGE_MULTIPLANE:
			DEBUG("Chip " << chip->ChannelID << ", " << chip->ChipID << ": finished  read command")
			chipBKE->No_of_active_dies--;
			if (chipBKE->No_of_active_dies == 0)//After finishing the last command, the chip state is changed
				chipBKE->Status = ChipStatus::WAIT_FOR_DATA_OUT;

			for (std::list<NVM_Transaction_Flash*>::iterator it = dieBKE->ActiveTransactions.begin();
				it != dieBKE->ActiveTransactions.end(); it++)
			{
				chipBKE->WaitingReadTXCount++;
				if (_my_instance->channels[chip->ChannelID]->GetStatus() == BusChannelStatus::IDLE)
					_my_instance->transfer_read_data_from_chip(chipBKE, dieBKE, (*it));
				else
				{
					switch (dieBKE->ActiveTransactions.front()->Source)
					{
					case Transaction_Source_Type::CACHE:
					case Transaction_Source_Type::USERIO:
						_my_instance->WaitingReadTX[chip->ChannelID].push_back((*it));
						break;
					case Transaction_Source_Type::GC_WL:
						_my_instance->WaitingGCRead_TX[chip->ChannelID].push_back((*it));
						break;
					case Transaction_Source_Type::MAPPING:
						_my_instance->WaitingMappingRead_TX[chip->ChannelID].push_back((*it));
						break;
					}
				}
			}
			break;
		case CMD_READ_PAGE_COPYBACK:
		case CMD_READ_PAGE_COPYBACK_MULTIPLANE:
			chipBKE->No_of_active_dies--;
			if (chipBKE->No_of_active_dies == 0)
				chipBKE->Status = ChipStatus::WAIT_FOR_COPYBACK_CMD;
			if (_my_instance->channels[chip->ChannelID]->GetStatus() == BusChannelStatus::IDLE)
			{
				if (dieBKE->ActiveTransactions.size() > 1)
				{
					Stats::IssuedMultiplaneCopybackProgramCMD++;
					dieBKE->ActiveCommand->CommandCode = CMD_PROGRAM_PAGE_COPYBACK_MULTIPLANE;
				}
				else
				{
					Stats::IssuedCopybackProgramCMD++;
					dieBKE->ActiveCommand->CommandCode = CMD_PROGRAM_PAGE_COPYBACK;
				}

				for (std::list<NVM_Transaction_Flash*>::iterator it = dieBKE->ActiveTransactions.begin();
					it != dieBKE->ActiveTransactions.end(); it++)
				{
					(*it)->STAT_transfer_time += _my_instance->channels[chip->ChannelID]->ProgramCommandTime[dieBKE->ActiveTransactions.size()];
				}
				chip->StartCMDXfer();
				chipBKE->Status = ChipStatus::CMD_IN;
				Simulator->Register_sim_event(Simulator->Time() + _my_instance->channels[chip->ChannelID]->ProgramCommandTime[dieBKE->ActiveTransactions.size()],
					_my_instance, dieBKE, (int)NVDDR2_SimEventType::PROGRAM_COPYBACK_CMD_ADDR_TRANSFERRED);
				chipBKE->OngoingDieCMDTransfers.push(dieBKE);
				_my_instance->channels[chip->ChannelID]->SetStatus(BusChannelStatus::BUSY, chip);

				dieBKE->Expected_finish_time = Simulator->Time() + _my_instance->channels[chip->ChannelID]->ProgramCommandTime[dieBKE->ActiveTransactions.size()]
					+ chip->Get_command_execution_latency(dieBKE->ActiveCommand->CommandCode, dieBKE->ActiveCommand->Address[0].PageID);
				if (chipBKE->Expected_command_exec_finish_time < dieBKE->Expected_finish_time)
					chipBKE->Expected_command_exec_finish_time = dieBKE->Expected_finish_time;
#if 0	
				//Copyback data should be read out in order to get rid of bit error propagation
				Simulator->RegisterEvent(Simulator->Time() + channels[targetChip->ChannelID]->ProgramCommandTime + NVDDR2DataOutTransferTime(targetTransaction->SizeInByte, channels[targetChip->ChannelID]),
					this, targetTransaction, (int)NVDDR2_SimEventType::READ_DATA_TRANSFERRED);
				targetTransaction->STAT_TransferTime += NVDDR2DataOutTransferTime(targetTransaction->SizeInByte, channels[targetChip->ChannelID]);
#endif
			}
			else _my_instance->WaitingCopybackWrites->push_back(dieBKE);
			break;
		case CMD_PROGRAM_PAGE:
		case CMD_PROGRAM_PAGE_MULTIPLANE:
		case CMD_PROGRAM_PAGE_COPYBACK:
		case CMD_PROGRAM_PAGE_COPYBACK_MULTIPLANE:
		{
			DEBUG("Chip " << chip->ChannelID << ", " << chip->ChipID << ": finished program command")
			int i = 0;
			for (std::list<NVM_Transaction_Flash*>::iterator it = dieBKE->ActiveTransactions.begin();
				it != dieBKE->ActiveTransactions.end(); it++, i++)
			{
				((NVM_Transaction_Flash_WR*)(*it))->Content = command->Meta_data[i].LPA;
				_my_instance->broadcastTransactionServicedSignal(*it);
			}
			dieBKE->ActiveTransactions.clear();
			dieBKE->ClearCommand();

			chipBKE->No_of_active_dies--;
			if (chipBKE->No_of_active_dies == 0 && chipBKE->WaitingReadTXCount == 0)
				chipBKE->Status = ChipStatus::IDLE;
			//Since the time required to send the resume command is very small, we ignore it
			if (chipBKE->Status == ChipStatus::IDLE)
				if (chipBKE->HasSuspend)
					_my_instance->send_resume_command_to_chip(chip, chipBKE);
			break;
		}
		case CMD_ERASE_BLOCK:
		case CMD_ERASE_BLOCK_MULTIPLANE:
			DEBUG("Chip " << chip->ChannelID << ", " << chip->ChipID << ": finished erase command")
			for (std::list<NVM_Transaction_Flash*>::iterator it = dieBKE->ActiveTransactions.begin();
				it != dieBKE->ActiveTransactions.end(); it++)
				_my_instance->broadcastTransactionServicedSignal(*it);
			dieBKE->ActiveTransactions.clear();
			dieBKE->ClearCommand();

			chipBKE->No_of_active_dies--;
			if (chipBKE->No_of_active_dies == 0 && chipBKE->WaitingReadTXCount == 0)
				chipBKE->Status = ChipStatus::IDLE;
			//Since the time required to send the resume command is very small, we ignore it
			if (chipBKE->Status == ChipStatus::IDLE)
				if (chipBKE->HasSuspend)
					_my_instance->send_resume_command_to_chip(chip, chipBKE);
			break;
		default:
			break;
		}

		if (_my_instance->channels[chip->ChannelID]->GetStatus() == BusChannelStatus::IDLE)
			_my_instance->broadcastChannelIdleSignal(chip->ChannelID);
		else if (chipBKE->Status == ChipStatus::IDLE)
			_my_instance->broadcastChipIdleSignal(chip);
	}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq 0x496ba(%rip), %rax     # 0xda738
movq 0x90(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %edx
movl 0x30(%rcx), %ecx
movq (%rax,%rdx,8), %rax
shlq $0x7, %rcx
addq %rcx, %rax
movq %rax, 0x120(%rsp)
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x128(%rsp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x45760
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movl 0x8(%rcx), %ecx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x118(%rsp)
movq 0x128(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
subq $0x30, %rax
je 0x911ac
jmp 0x9110b
movq 0xa8(%rsp), %rax
subq $0x32, %rax
je 0x911ac
jmp 0x9111f
movq 0xa8(%rsp), %rax
subq $0x35, %rax
je 0x913fc
jmp 0x91133
movq 0xa8(%rsp), %rax
subq $0x321, %rax            # imm = 0x321
je 0x913fc
jmp 0x91149
movq 0xa8(%rsp), %rax
addq $-0x60d0, %rax          # imm = 0x9F30
subq $0x2, %rax
jb 0x918fc
jmp 0x91163
movq 0xa8(%rsp), %rax
addq $-0x8010, %rax          # imm = 0xFFFF7FF0
subq $0x2, %rax
jb 0x9177a
jmp 0x9117d
movq 0xa8(%rsp), %rax
subq $0x8510, %rax           # imm = 0x8510
je 0x9177a
jmp 0x91193
movq 0xa8(%rsp), %rax
subq $0x85111, %rax          # imm = 0x85111
je 0x9177a
jmp 0x91a1a
movq 0x120(%rsp), %rax
movl 0x7c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x7c(%rax)
movq 0x120(%rsp), %rax
cmpl $0x0, 0x7c(%rax)
jne 0x911d9
movq 0x120(%rsp), %rax
movl $0x7, (%rax)
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x7ff20
movq %rax, 0x110(%rsp)
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x5d430
movq %rax, 0x108(%rsp)
leaq 0x110(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x80030
testb $0x1, %al
jne 0x91229
jmp 0x913f7
movq 0x120(%rsp), %rax
movl 0x78(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x78(%rax)
movq 0x494f7(%rip), %rax     # 0xda738
movq 0x88(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x91a90
cmpl $0x1, %eax
jne 0x912c2
movq 0x494d0(%rip), %rax     # 0xda738
movq %rax, 0x88(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x7fda0
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq (%rax), %rcx
callq 0x92380
jmp 0x913d9
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x7fe10
movq (%rax), %rax
movl 0x4(%rax), %eax
movl %eax, 0x84(%rsp)
subl $0x2, %eax
jb 0x9130a
jmp 0x912e7
movl 0x84(%rsp), %eax
subl $0x2, %eax
je 0x91351
jmp 0x912f5
movl 0x84(%rsp), %eax
subl $0x3, %eax
je 0x91395
jmp 0x913d7
movq 0x49427(%rip), %rax     # 0xda738
movq 0x98(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %ecx
imulq $0x108, %rcx, %rcx      # imm = 0x108
addq %rcx, %rax
movq %rax, 0x78(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x7fda0
movq 0x78(%rsp), %rdi
movq %rax, %rsi
callq 0x7ef00
jmp 0x913d7
movq 0x493e0(%rip), %rax     # 0xda738
movq 0xa0(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %ecx
imulq $0x108, %rcx, %rcx      # imm = 0x108
addq %rcx, %rax
movq %rax, 0x70(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x7fda0
movq 0x70(%rsp), %rdi
movq %rax, %rsi
callq 0x7ef00
jmp 0x913d7
movq 0x4939c(%rip), %rax     # 0xda738
movq 0xa8(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %ecx
imulq $0x108, %rcx, %rcx      # imm = 0x108
addq %rcx, %rax
movq %rax, 0x68(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x7fda0
movq 0x68(%rsp), %rdi
movq %rax, %rsi
callq 0x7ef00
jmp 0x913d9
jmp 0x913db
leaq 0x110(%rsp), %rdi
xorl %esi, %esi
callq 0x91c50
movq %rax, 0x100(%rsp)
jmp 0x911f2
jmp 0x91a1c
movq 0x120(%rsp), %rax
movl 0x7c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x7c(%rax)
movq 0x120(%rsp), %rax
cmpl $0x0, 0x7c(%rax)
jne 0x91429
movq 0x120(%rsp), %rax
movl $0x8, (%rax)
movq 0x49308(%rip), %rax     # 0xda738
movq 0x88(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x91a90
cmpl $0x1, %eax
jne 0x9175a
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x91c80
cmpq $0x1, %rax
jbe 0x91497
leaq 0x49326(%rip), %rax     # 0xda798
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x49318(%rip), %rax     # 0xda798
movq %rcx, (%rax)
movq 0x118(%rsp), %rax
movq (%rax), %rax
movq $0x85111, (%rax)        # imm = 0x85111
jmp 0x914c1
leaq 0x49312(%rip), %rax     # 0xda7b0
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x49304(%rip), %rax     # 0xda7b0
movq %rcx, (%rax)
movq 0x118(%rsp), %rax
movq (%rax), %rax
movq $0x8510, (%rax)         # imm = 0x8510
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x7ff20
movq %rax, 0xf8(%rsp)
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x5d430
movq %rax, 0xf0(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x80030
testb $0x1, %al
jne 0x9150e
jmp 0x9158c
movq 0x49223(%rip), %rax     # 0xda738
movq 0x88(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x58(%rsp)
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x91c80
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq 0x78(%rax,%rcx,8), %rax
movq %rax, 0x60(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x7fda0
movq 0x60(%rsp), %rcx
movq (%rax), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
leaq 0xf8(%rsp), %rdi
xorl %esi, %esi
callq 0x91c50
movq %rax, 0xe8(%rsp)
jmp 0x914da
movq 0x130(%rsp), %rdi
callq 0x91cb0
movq 0x120(%rsp), %rax
movl $0x1, (%rax)
callq 0x46500
movq %rax, 0x20(%rsp)
callq 0x46500
movq %rax, %rdi
callq 0x46c50
movq %rax, 0x18(%rsp)
movq 0x4916e(%rip), %rax     # 0xda738
movq 0x88(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x28(%rsp)
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x91c80
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movq 0x28(%rsp), %rax
addq 0x78(%rax,%rcx,8), %rsi
movq 0x49124(%rip), %rdx     # 0xda738
movq 0x118(%rsp), %rcx
movl $0x3, %r8d
callq 0x46c60
movq 0x120(%rsp), %rdi
addq $0x28, %rdi
leaq 0x118(%rsp), %rsi
callq 0x91cf0
movq 0x490f1(%rip), %rax     # 0xda738
movq 0x88(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %ecx
movq (%rax,%rcx,8), %rdi
movq 0x130(%rsp), %rdx
xorl %esi, %esi
callq 0x91d60
callq 0x46500
movq %rax, %rdi
callq 0x46c50
movq %rax, 0x38(%rsp)
movq 0x490b3(%rip), %rax     # 0xda738
movq 0x88(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x30(%rsp)
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x91c80
movq 0x30(%rsp), %rcx
movq %rax, %rdx
movq 0x38(%rsp), %rax
addq 0x78(%rcx,%rdx,8), %rax
movq %rax, 0x50(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x118(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x118(%rsp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x45760
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x14(%rax), %edx
callq 0x457a0
movq 0x50(%rsp), %rcx
addq %rax, %rcx
movq 0x118(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x120(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x118(%rsp), %rcx
cmpq 0x50(%rcx), %rax
jae 0x91758
movq 0x118(%rsp), %rax
movq 0x50(%rax), %rcx
movq 0x120(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x91775
movq 0x48fd7(%rip), %rax     # 0xda738
movq 0xb0(%rax), %rdi
leaq 0x118(%rsp), %rsi
callq 0x94520
jmp 0x91a1c
movl $0x0, 0xe4(%rsp)
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x7ff20
movq %rax, 0xd8(%rsp)
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x5d430
movq %rax, 0xd0(%rsp)
leaq 0xd8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x80030
testb $0x1, %al
jne 0x917d5
jmp 0x91865
movq 0x128(%rsp), %rdi
addq $0x20, %rdi
movslq 0xe4(%rsp), %rsi
callq 0x45990
movq (%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x7fda0
movq 0x8(%rsp), %rcx
movq (%rax), %rax
movq %rcx, 0x80(%rax)
movq 0x48f1f(%rip), %rax     # 0xda738
movq %rax, 0x10(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x7fda0
movq 0x10(%rsp), %rdi
movq (%rax), %rsi
callq 0x8bc80
leaq 0xd8(%rsp), %rdi
xorl %esi, %esi
callq 0x91c50
movq %rax, 0xc8(%rsp)
movl 0xe4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe4(%rsp)
jmp 0x9179e
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x5d190
movq 0x118(%rsp), %rdi
callq 0x92130
movq 0x120(%rsp), %rax
movl 0x7c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x7c(%rax)
movq 0x120(%rsp), %rax
cmpl $0x0, 0x7c(%rax)
jne 0x918be
movq 0x120(%rsp), %rax
cmpl $0x0, 0x78(%rax)
jne 0x918be
movq 0x120(%rsp), %rax
movl $0x0, (%rax)
movq 0x120(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x918f7
movq 0x120(%rsp), %rax
testb $0x1, 0x20(%rax)
je 0x918f5
movq 0x48e58(%rip), %rdi     # 0xda738
movq 0x130(%rsp), %rsi
movq 0x120(%rsp), %rdx
callq 0x92190
jmp 0x918f7
jmp 0x91a1c
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x7ff20
movq %rax, 0xc0(%rsp)
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x5d430
movq %rax, 0xb8(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x80030
testb $0x1, %al
jne 0x91949
jmp 0x91986
movq 0x48de8(%rip), %rax     # 0xda738
movq %rax, (%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x7fda0
movq (%rsp), %rdi
movq (%rax), %rsi
callq 0x8bc80
leaq 0xc0(%rsp), %rdi
xorl %esi, %esi
callq 0x91c50
movq %rax, 0xb0(%rsp)
jmp 0x91915
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0x5d190
movq 0x118(%rsp), %rdi
callq 0x92130
movq 0x120(%rsp), %rax
movl 0x7c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x7c(%rax)
movq 0x120(%rsp), %rax
cmpl $0x0, 0x7c(%rax)
jne 0x919df
movq 0x120(%rsp), %rax
cmpl $0x0, 0x78(%rax)
jne 0x919df
movq 0x120(%rsp), %rax
movl $0x0, (%rax)
movq 0x120(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x91a18
movq 0x120(%rsp), %rax
testb $0x1, 0x20(%rax)
je 0x91a16
movq 0x48d37(%rip), %rdi     # 0xda738
movq 0x130(%rsp), %rsi
movq 0x120(%rsp), %rdx
callq 0x92190
jmp 0x91a18
jmp 0x91a1c
jmp 0x91a1c
movq 0x48d15(%rip), %rax     # 0xda738
movq 0x88(%rax), %rax
movq 0x130(%rsp), %rcx
movl 0x2c(%rcx), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x91a90
cmpl $0x1, %eax
jne 0x91a5c
movq 0x48cee(%rip), %rdi     # 0xda738
movq 0x130(%rsp), %rax
movl 0x2c(%rax), %esi
callq 0x8bd50
jmp 0x91a7f
movq 0x120(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x91a7d
movq 0x48cc8(%rip), %rdi     # 0xda738
movq 0x130(%rsp), %rsi
callq 0x8be00
jmp 0x91a7f
addq $0x138, %rsp            # imm = 0x138
retq
nopw (%rax,%rax)