// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/TSU_Base.cpp
// Function: SSD_Components::TSU_Base::TSU_Base(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, SSD_Components::FTL*, SSD_Components::NVM_PHY_ONFI_NVDDR2*, SSD_Components::Flash_Scheduling_Type, unsigned int, unsigned int, unsigned int, unsigned int, bool, bool, unsigned long, unsigned long, unsigned long)
TSU_Base::TSU_Base(const sim_object_id_type& id, FTL* ftl, NVM_PHY_ONFI_NVDDR2* NVMController, Flash_Scheduling_Type Type,
		unsigned int ChannelCount, unsigned int chip_no_per_channel, unsigned int DieNoPerChip, unsigned int PlaneNoPerDie,
		bool EraseSuspensionEnabled, bool ProgramSuspensionEnabled,
		sim_time_type WriteReasonableSuspensionTimeForRead,
		sim_time_type EraseReasonableSuspensionTimeForRead,
		sim_time_type EraseReasonableSuspensionTimeForWrite)
		: Sim_Object(id), ftl(ftl), _NVMController(NVMController), type(Type),
		channel_count(ChannelCount), chip_no_per_channel(chip_no_per_channel), die_no_per_chip(DieNoPerChip), plane_no_per_die(PlaneNoPerDie),
		eraseSuspensionEnabled(EraseSuspensionEnabled), programSuspensionEnabled(ProgramSuspensionEnabled),
		writeReasonableSuspensionTimeForRead(WriteReasonableSuspensionTimeForRead), eraseReasonableSuspensionTimeForRead(EraseReasonableSuspensionTimeForRead),
		eraseReasonableSuspensionTimeForWrite(EraseReasonableSuspensionTimeForWrite), opened_scheduling_reqs(0)
	{
		_my_instance = this;
		Round_robin_turn_of_channel = new flash_chip_ID_type[channel_count];
		for (unsigned int channelID = 0; channelID < channel_count; channelID++) {
			Round_robin_turn_of_channel[channelID] = 0;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebp
movl %r8d, 0xc(%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, %r12
movq %rdi, %rbx
movq 0xa8(%rsp), %rax
movq %rax, 0x18(%rsp)
movups 0x98(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movb 0x90(%rsp), %al
movb %al, 0xb(%rsp)
movb 0x88(%rsp), %al
movb %al, 0xa(%rsp)
movl 0x80(%rsp), %r13d
movl 0x78(%rsp), %r15d
movl 0x70(%rsp), %r14d
callq 0x164ce
leaq 0x246f1(%rip), %rax     # 0x6ebb8
movq %rax, (%rbx)
movq %r12, 0x30(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x40(%rbx)
movl %ebp, 0x44(%rbx)
movl %r14d, 0x48(%rbx)
movl %r15d, 0x4c(%rbx)
movl %r13d, 0x50(%rbx)
movb 0xa(%rsp), %al
movb %al, 0x54(%rbx)
movb 0xb(%rsp), %al
movb %al, 0x55(%rbx)
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x58(%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x68(%rbx)
leaq 0x78(%rbx), %rax
movq %rax, 0x80(%rbx)
movq %rax, 0x78(%rbx)
xorl %eax, %eax
movq %rax, 0x88(%rbx)
leaq 0x90(%rbx), %rcx
movq %rcx, 0x98(%rbx)
movq %rcx, 0x90(%rbx)
movq %rax, 0xa0(%rbx)
movl $0x0, 0xa8(%rbx)
movq %rbx, 0x29646(%rip)     # 0x73b98
movl %ebp, %r14d
shlq $0x2, %r14
movq %r14, %rdi
callq 0x7030
movq %rax, 0x70(%rbx)
testl %ebp, %ebp
je 0x4a584
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7230
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rbx), %rdi
leaq 0x234c7(%rip), %rax     # 0x6da68
movq %rax, (%rbx)
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x4a5b2
callq 0x7370
movq %r14, %rdi
callq 0x7620