// File: /workspace/github_cpp_makefile_star2_O1/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 0x4181e0
movq %rax, 0x204498(%rip)    # 0x60b640
movzbl 0x2043a7(%rip), %ebx    # 0x60b556
shll $0x2, %ebx
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x4181e0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq 0x20446c(%rip), %rax    # 0x60b640
movq %r14, (%rax,%r15,8)
incq %r15
cmpq $0x1, %r15
je 0x4071b5
movzwl 0x20436b(%rip), %r13d   # 0x60b554
leal (,%r13,8), %ebx
movq %rbx, %rdi
callq 0x4181e0
movq %rax, 0x204448(%rip)    # 0x60b648
movq %rbx, %rdi
callq 0x4181e0
movq %rax, 0x204441(%rip)    # 0x60b650
movq %rbx, %rdi
callq 0x4181e0
movq %rax, 0x20443a(%rip)    # 0x60b658
movq %rbx, %rdi
callq 0x4181e0
movq %rax, 0x204433(%rip)    # 0x60b660
addq $0x10, %rbx
movq %rbx, %rdi
callq 0x4181e0
movq %rax, 0x204428(%rip)    # 0x60b668
movq %rbx, %rdi
callq 0x4181e0
movq %rax, 0x204421(%rip)    # 0x60b670
movq %rbx, %rdi
callq 0x4181e0
movq %rax, 0x20441a(%rip)    # 0x60b678
movq %rbx, %rdi
callq 0x4181e0
movq %rax, 0x204413(%rip)    # 0x60b680
testl %r13d, %r13d
je 0x40736c
movzbl 0x2042d9(%rip), %ebx    # 0x60b556
movl %ebx, %eax
shll $0x3, %eax
leaq (%rax,%rax,2), %r14
addq $0x8, %r14
leaq (%rax,%rax,2), %rax
addq $-0x18, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %r15
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x4181e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq 0x204378(%rip), %rax    # 0x60b648
movzbl %bpl, %ebp
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x4181e0
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x4072f9
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x204350(%rip), %rax    # 0x60b650
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x4181e0
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x407325
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x20432c(%rip), %rax    # 0x60b658
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x4181e0
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x407351
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x204308(%rip), %rax    # 0x60b660
movq %r12, (%rax,%rbp,8)
incl %ebp
movzbl %bpl, %eax
cmpw %ax, %r13w
ja 0x4072b1
addl $0x2, %r13d
movzbl 0x2041df(%rip), %ebx    # 0x60b556
movl %ebx, %eax
shll $0x3, %eax
leaq (%rax,%rax,2), %r14
addq $0x8, %r14
leaq (%rax,%rax,2), %rax
addq $-0x18, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %r15
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x4181e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq 0x20429e(%rip), %rax    # 0x60b668
movzbl %bpl, %ebp
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x4181e0
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x4073f3
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x204276(%rip), %rax    # 0x60b670
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x4181e0
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x40741f
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x204252(%rip), %rax    # 0x60b678
movq %r12, (%rax,%rbp,8)
movq %r14, %rdi
callq 0x4181e0
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x40744b
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq 0x20422e(%rip), %rax    # 0x60b680
movq %r12, (%rax,%rbp,8)
incl %ebp
movzbl %bpl, %eax
cmpl %eax, %r13d
ja 0x4073ab
movzbl 0x2040ea(%rip), %ebx    # 0x60b556
movq %rbx, %rdi
callq 0x4181e0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq %r14, 0x20428d(%rip)    # 0x60b718
movq %rbx, %rdi
callq 0x4181e0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq %r14, 0x204276(%rip)    # 0x60b720
movq %rbx, %rdi
callq 0x4181e0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq %r14, 0x20425f(%rip)    # 0x60b728
movq %rbx, %rdi
callq 0x4181e0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x401088
movq %r14, 0x204248(%rip)    # 0x60b730
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop