// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x10
popq %rdi
callq 0x414190
movq %rax, 0x2025e2(%rip)    # 0x608640
movzbl 0x2024f1(%rip), %ebx    # 0x608556
movl %ebx, %r14d
shll $0x2, %r14d
xorl %r12d, %r12d
cmpq $0x2, %r12
je 0x40609d
movq %r14, %rdi
callq 0x414190
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401080
movq 0x2025ac(%rip), %rax    # 0x608640
movq %r15, (%rax,%r12,8)
incq %r12
jmp 0x40606f
movzwl 0x2024b0(%rip), %eax    # 0x608554
movq %rax, (%rsp)
leal (,%rax,8), %r14d
movq %r14, %rdi
callq 0x414190
movq %rax, 0x202589(%rip)    # 0x608648
movq %r14, %rdi
callq 0x414190
movq %rax, 0x202582(%rip)    # 0x608650
movq %r14, %rdi
callq 0x414190
movq %rax, 0x20257b(%rip)    # 0x608658
movq %r14, %rdi
callq 0x414190
movq %rax, 0x202574(%rip)    # 0x608660
addq $0x10, %r14
movq %r14, %rdi
callq 0x414190
movq %rax, 0x202569(%rip)    # 0x608668
movq %r14, %rdi
callq 0x414190
movq %rax, 0x202562(%rip)    # 0x608670
movq %r14, %rdi
callq 0x414190
movq %rax, 0x20255b(%rip)    # 0x608678
movq %r14, %rdi
callq 0x414190
movq %rax, 0x202554(%rip)    # 0x608680
imulq $0x18, %rbx, %rcx
leaq 0x8(%rcx), %r14
leaq -0x18(%rcx), %rax
xorl %ebp, %ebp
pushq $0x18
popq %rsi
xorl %edx, %edx
divq %rsi
negq %rdx
leaq (%rcx,%rdx), %r15
addq $-0x18, %r15
addq $0x18, %r15
movzbl %bpl, %r13d
cmpw %r13w, (%rsp)
jbe 0x40620c
movq %rbx, %rdi
callq 0x414190
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401080
movq 0x2024c9(%rip), %rax    # 0x608648
movq %r12, (%rax,%r13,8)
movq %r14, %rdi
callq 0x414190
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testb %bl, %bl
je 0x4061a3
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401080
movq 0x2024a6(%rip), %rax    # 0x608650
movq %r12, (%rax,%r13,8)
movq %r14, %rdi
callq 0x414190
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testb %bl, %bl
je 0x4061ce
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401080
movq 0x202483(%rip), %rax    # 0x608658
movq %r12, (%rax,%r13,8)
movq %r14, %rdi
callq 0x414190
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testb %bl, %bl
je 0x4061f9
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401080
movq 0x202460(%rip), %rax    # 0x608660
movq %r12, (%rax,%r13,8)
incb %bpl
jmp 0x406151
movq (%rsp), %rax
addl $0x2, %eax
movq %rax, (%rsp)
xorl %ebp, %ebp
movzbl %bpl, %r13d
movq %rbx, %rdi
callq 0x414190
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401080
cmpl %r13d, (%rsp)
jbe 0x4062d3
movq 0x202422(%rip), %rax    # 0x608668
movq %r12, (%rax,%r13,8)
movq %r14, %rdi
callq 0x414190
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testb %bl, %bl
je 0x40626a
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401080
movq 0x2023ff(%rip), %rax    # 0x608670
movq %r12, (%rax,%r13,8)
movq %r14, %rdi
callq 0x414190
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testb %bl, %bl
je 0x406295
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401080
movq 0x2023dc(%rip), %rax    # 0x608678
movq %r12, (%rax,%r13,8)
movq %r14, %rdi
callq 0x414190
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testb %bl, %bl
je 0x4062c0
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401080
movq 0x2023b9(%rip), %rax    # 0x608680
movq %r12, (%rax,%r13,8)
incb %bpl
jmp 0x406219
movq %r12, 0x20243e(%rip)    # 0x608718
movq %rbx, %rdi
callq 0x414190
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401080
movq %r14, 0x202427(%rip)    # 0x608720
movq %rbx, %rdi
callq 0x414190
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401080
movq %r14, 0x202410(%rip)    # 0x608728
movq %rbx, %rdi
callq 0x414190
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401080
movq %r14, 0x2023f9(%rip)    # 0x608730
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq