// File: /workspace/github_cpp_makefile_star2_O3/MPSLab-ASU[P]DiRAC/./src/baseAccelSim.cc
// Function: baseAccelSim::define_vars_SPM_management()
void baseAccelSim::define_vars_SPM_management()
{
	operand_start_addr_SPM_buffer = new uint32_t*[SPM_buffers];
	for(uint8_t buf=0; buf < SPM_buffers; buf++)
		operand_start_addr_SPM_buffer[buf] = new uint32_t[total_operands]();

	read_operand_SPM_pass											= new bool*[SPM_passes];
	read_operand_offset_base_addr_SPM 				= new std::vector<uint32_t>*[SPM_passes];
	read_operand_burst_width_bytes_SPM_pass		= new std::vector<uint32_t>*[SPM_passes];
	read_operand_offset_base_addr_DRAM				= new std::vector<uint32_t>*[SPM_passes];
	write_operand_SPM_pass										= new bool*[SPM_passes + WB_delay_SPM_pass];
	write_operand_offset_base_addr_SPM			 	= new std::vector<uint32_t>*[SPM_passes + WB_delay_SPM_pass];
	write_operand_burst_width_bytes_SPM_pass	= new std::vector<uint32_t>*[SPM_passes + WB_delay_SPM_pass];
	write_operand_offset_base_addr_DRAM				= new std::vector<uint32_t>*[SPM_passes + WB_delay_SPM_pass];
	for(uint8_t it=0; it < SPM_passes; it++)
	{
		read_operand_SPM_pass[it]											= new bool[total_operands]();
		read_operand_offset_base_addr_SPM[it]					= new std::vector<uint32_t>[total_operands];
		read_operand_burst_width_bytes_SPM_pass[it]		= new std::vector<uint32_t>[total_operands];
		read_operand_offset_base_addr_DRAM[it]				= new std::vector<uint32_t>[total_operands];
	}
	for(uint8_t it=0; it < SPM_passes+WB_delay_SPM_pass; it++)
	{
		write_operand_SPM_pass[it]										= new bool[total_operands]();
		write_operand_offset_base_addr_SPM[it]				= new std::vector<uint32_t>[total_operands];
		write_operand_burst_width_bytes_SPM_pass[it]	= new std::vector<uint32_t>[total_operands];
		write_operand_offset_base_addr_DRAM[it]				= new std::vector<uint32_t>[total_operands];
	}

	spm_buffer_number_op_prefetch		= new uint8_t[total_operands]();
	spm_buffer_number_op_writeback	= new uint8_t[total_operands]();
	spm_buffer_number_op_comp_read	= new uint8_t[total_operands]();
	spm_buffer_number_op_comp_write	= new uint8_t[total_operands]();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x10, %edi
callq 0x418d20
movq %rax, 0x2044a6(%rip)    # 0x60b640
movzbl 0x2043b5(%rip), %ebx    # 0x60b556
leal (,%rbx,4), %r14d
movq %r14, %rdi
callq 0x418d20
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401088
movq 0x204478(%rip), %rax    # 0x60b640
movq %r15, (%rax)
movq %r14, %rdi
callq 0x418d20
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401088
movq 0x204456(%rip), %rax    # 0x60b640
movq %r15, 0x8(%rax)
movzwl 0x20435e(%rip), %r13d   # 0x60b554
leal (,%r13,8), %r14d
movq %r14, %rdi
callq 0x418d20
movq %rax, 0x20443b(%rip)    # 0x60b648
movq %r14, %rdi
callq 0x418d20
movq %rax, 0x204434(%rip)    # 0x60b650
movq %r14, %rdi
callq 0x418d20
movq %rax, 0x20442d(%rip)    # 0x60b658
movq %r14, %rdi
callq 0x418d20
movq %rax, 0x204426(%rip)    # 0x60b660
addq $0x10, %r14
movq %r14, %rdi
callq 0x418d20
movq %rax, 0x20441b(%rip)    # 0x60b668
movq %r14, %rdi
callq 0x418d20
movq %rax, 0x204414(%rip)    # 0x60b670
movq %r14, %rdi
callq 0x418d20
movq %rax, 0x20440d(%rip)    # 0x60b678
movq %r14, %rdi
callq 0x418d20
movl %ebx, %ecx
shll $0x3, %ecx
movq %rax, 0x204401(%rip)    # 0x60b680
leaq (%rcx,%rcx,2), %rax
leaq (%rcx,%rcx,2), %r14
addq $0x8, %r14
addq $-0x18, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %r15
testl %r13d, %r13d
je 0x40736f
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x418d20
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq 0x204372(%rip), %rax    # 0x60b648
movzbl %bpl, %ebp
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x418d20
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testb %bl, %bl
je 0x4072fe
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x20434b(%rip), %rax    # 0x60b650
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x418d20
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testb %bl, %bl
je 0x407329
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x204328(%rip), %rax    # 0x60b658
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x418d20
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testb %bl, %bl
je 0x407354
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x204305(%rip), %rax    # 0x60b660
movq %r12, (%rax,%rbp,8)
incl %ebp
movzbl %bpl, %eax
cmpw %ax, %r13w
ja 0x4072b7
addl $0x2, %r13d
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x418d20
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq 0x2042d4(%rip), %rax    # 0x60b668
movzbl %bpl, %ebp
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x418d20
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x4073bd
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x2042ac(%rip), %rax    # 0x60b670
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x418d20
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x4073e9
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x204288(%rip), %rax    # 0x60b678
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x418d20
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x407415
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x204264(%rip), %rax    # 0x60b680
movq %r12, (%rax,%rbp,8)
incl %ebp
movzbl %bpl, %eax
cmpl %eax, %r13d
ja 0x407375
movq %rbx, %rdi
callq 0x418d20
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq %r14, 0x2042ca(%rip)    # 0x60b718
movq %rbx, %rdi
callq 0x418d20
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq %r14, 0x2042b3(%rip)    # 0x60b720
movq %rbx, %rdi
callq 0x418d20
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq %r14, 0x20429c(%rip)    # 0x60b728
movq %rbx, %rdi
callq 0x418d20
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq %r14, 0x204285(%rip)    # 0x60b730
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq