// File: 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
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movl $0x10, %edi
callq 0x425dd0
movq %rax, 0x216fe0(%rip)    # 0x61e640
movb $0x0, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
cmpl $0x2, %eax
jge 0x4076c8
movzbl 0x216ee2(%rip), %eax    # 0x61e556
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x20(%rbp)
callq 0x425dd0
movq -0x20(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x18(%rbp)
xorl %esi, %esi
callq 0x401080
movq -0x18(%rbp), %rdx
movq 0x216f8a(%rip), %rax    # 0x61e640
movzbl -0x9(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movb -0x9(%rbp), %al
addb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x407664
movzwl 0x216e85(%rip), %eax    # 0x61e554
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, 0x216f51(%rip)    # 0x61e648
movzwl 0x216e56(%rip), %eax    # 0x61e554
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, 0x216f2a(%rip)    # 0x61e650
movzwl 0x216e27(%rip), %eax    # 0x61e554
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, 0x216f03(%rip)    # 0x61e658
movzwl 0x216df8(%rip), %eax    # 0x61e554
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, 0x216edc(%rip)    # 0x61e660
movzwl 0x216dc9(%rip), %eax    # 0x61e554
addl $0x2, %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, 0x216eb0(%rip)    # 0x61e668
movzwl 0x216d95(%rip), %eax    # 0x61e554
addl $0x2, %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, 0x216e84(%rip)    # 0x61e670
movzwl 0x216d61(%rip), %eax    # 0x61e554
addl $0x2, %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, 0x216e58(%rip)    # 0x61e678
movzwl 0x216d2d(%rip), %eax    # 0x61e554
addl $0x2, %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, 0x216e2c(%rip)    # 0x61e680
movb $0x0, -0xa(%rbp)
movzbl -0xa(%rbp), %eax
movzwl 0x216cf1(%rip), %ecx    # 0x61e554
cmpl %ecx, %eax
jge 0x407aaa
movzbl 0x216ce4(%rip), %eax    # 0x61e556
movl %eax, %edi
movq %rdi, -0x40(%rbp)
callq 0x425dd0
movq -0x40(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x38(%rbp)
xorl %esi, %esi
callq 0x401080
movq -0x38(%rbp), %rdx
movq 0x216dae(%rip), %rax    # 0x61e648
movzbl -0xa(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movzbl 0x216cad(%rip), %eax    # 0x61e556
movq %rax, -0x30(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x28(%rbp)
cmpq $0x0, %rax
je 0x40792b
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x50(%rbp)
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x40f1e0
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x48(%rbp)
jne 0x407909
movq -0x28(%rbp), %rdx
movq 0x216d1a(%rip), %rax    # 0x61e650
movzbl -0xa(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movzbl 0x216c11(%rip), %eax    # 0x61e556
movq %rax, -0x68(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x60(%rbp)
cmpq $0x0, %rax
je 0x4079c7
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x78(%rbp)
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x40f1e0
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x70(%rbp)
jne 0x4079a5
movq -0x60(%rbp), %rdx
movq 0x216c86(%rip), %rax    # 0x61e658
movzbl -0xa(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movzbl 0x216b75(%rip), %eax    # 0x61e556
movq %rax, -0x90(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x88(%rbp)
cmpq $0x0, %rax
je 0x407a87
movq -0x88(%rbp), %rax
movq -0x90(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0xa0(%rbp)
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x40f1e0
movq -0xa8(%rbp), %rax
movq -0xa0(%rbp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x98(%rbp)
jne 0x407a56
movq -0x88(%rbp), %rdx
movq 0x216bcb(%rip), %rax    # 0x61e660
movzbl -0xa(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movb -0xa(%rbp), %al
addb $0x1, %al
movb %al, -0xa(%rbp)
jmp 0x407858
movb $0x0, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
movzwl 0x216a9b(%rip), %ecx    # 0x61e554
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x407d5d
movzbl 0x216a8b(%rip), %eax    # 0x61e556
movl %eax, %edi
movq %rdi, -0xc8(%rbp)
callq 0x425dd0
movq -0xc8(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0xc0(%rbp)
xorl %esi, %esi
callq 0x401080
movq -0xc0(%rbp), %rdx
movq 0x216b69(%rip), %rax    # 0x61e668
movzbl -0xb(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movzbl 0x216a48(%rip), %eax    # 0x61e556
movq %rax, -0xb8(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0xb0(%rbp)
cmpq $0x0, %rax
je 0x407bb4
movq -0xb0(%rbp), %rax
movq -0xb8(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0xd8(%rbp)
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x40f1e0
movq -0xe0(%rbp), %rax
movq -0xd8(%rbp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0xd0(%rbp)
jne 0x407b83
movq -0xb0(%rbp), %rdx
movq 0x216aae(%rip), %rax    # 0x61e670
movzbl -0xb(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movzbl 0x216985(%rip), %eax    # 0x61e556
movq %rax, -0xf0(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, %rcx
movq -0xf0(%rbp), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0xe8(%rbp)
cmpq $0x0, %rax
je 0x407c77
movq -0xe8(%rbp), %rax
movq -0xf0(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x40f1e0
movq -0x108(%rbp), %rax
movq -0x100(%rbp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0xf8(%rbp)
jne 0x407c46
movq -0xe8(%rbp), %rdx
movq 0x2169f3(%rip), %rax    # 0x61e678
movzbl -0xb(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movzbl 0x2168c2(%rip), %eax    # 0x61e556
movq %rax, -0x118(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x425dd0
movq %rax, %rcx
movq -0x118(%rbp), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x110(%rbp)
cmpq $0x0, %rax
je 0x407d3a
movq -0x110(%rbp), %rax
movq -0x118(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x128(%rbp)
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x40f1e0
movq -0x130(%rbp), %rax
movq -0x128(%rbp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x120(%rbp)
jne 0x407d09
movq -0x110(%rbp), %rdx
movq 0x216938(%rip), %rax    # 0x61e680
movzbl -0xb(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movb -0xb(%rbp), %al
addb $0x1, %al
movb %al, -0xb(%rbp)
jmp 0x407aae
movzbl 0x2167f2(%rip), %eax    # 0x61e556
movl %eax, %edi
movq %rdi, -0x170(%rbp)
callq 0x425dd0
movq -0x170(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x168(%rbp)
xorl %esi, %esi
callq 0x401080
movq -0x168(%rbp), %rax
movq %rax, 0x216980(%rip)    # 0x61e718
movzbl 0x2167b7(%rip), %eax    # 0x61e556
movl %eax, %edi
movq %rdi, -0x160(%rbp)
callq 0x425dd0
movq -0x160(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x158(%rbp)
xorl %esi, %esi
callq 0x401080
movq -0x158(%rbp), %rax
movq %rax, 0x21694d(%rip)    # 0x61e720
movzbl 0x21677c(%rip), %eax    # 0x61e556
movl %eax, %edi
movq %rdi, -0x150(%rbp)
callq 0x425dd0
movq -0x150(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x148(%rbp)
xorl %esi, %esi
callq 0x401080
movq -0x148(%rbp), %rax
movq %rax, 0x21691a(%rip)    # 0x61e728
movzbl 0x216741(%rip), %eax    # 0x61e556
movl %eax, %edi
movq %rdi, -0x140(%rbp)
callq 0x425dd0
movq -0x140(%rbp), %rdx
movq %rax, %rdi
movq %rdi, -0x138(%rbp)
xorl %esi, %esi
callq 0x401080
movq -0x138(%rbp), %rax
movq %rax, 0x2168e7(%rip)    # 0x61e730
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nopw %cs:(%rax,%rax)