// File: gvaumour[P]cache-simulator/src/SimpleFeatureTable.cc
// Function: SimpleFeatureTable::SimpleFeatureTable(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
SimpleFeatureTable::SimpleFeatureTable( int size, string name, bool isBP)
{
	m_size = size;
	m_name = name;
	m_counter_size = simu_parameters.perceptron_counter_size;
	
	m_table.resize(size);
	for(int i = 0 ; i < m_size; i++)
		m_table[i] = new SimpleFeatureEntry();

	if(simu_parameters.perceptron_drawFeatureMaps)
	{
		stats_heatmap_counter = vector<vector<int> >(m_size, vector<int>());
		stats_counter_buffer = vector<vector<int> >(m_size, vector<int>());
	}
}

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq %rdx, 0x70(%rsp)
movb %cl, %al
movq %rdi, 0x120(%rsp)
movl %esi, 0x11c(%rsp)
movq %rdx, 0x110(%rsp)
andb $0x1, %al
movb %al, 0x10f(%rsp)
movq 0x120(%rsp), %rdi
movq %rdi, 0x60(%rsp)
addq $0x8, %rdi
movq %rdi, 0x68(%rsp)
callq 0x5540
movq 0x60(%rsp), %rdi
addq $0x30, %rdi
movq %rdi, 0x48(%rsp)
callq 0x5f050
movq 0x60(%rsp), %rdi
addq $0x48, %rdi
movq %rdi, 0x50(%rsp)
callq 0xe860
movq 0x60(%rsp), %rdi
addq $0x60, %rdi
movq %rdi, 0x58(%rsp)
callq 0xe860
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movl 0x11c(%rsp), %ecx
movl %ecx, (%rax)
callq 0x5050
jmp 0x5e1e1
movq 0x60(%rsp), %rdi
leaq 0x35e03(%rip), %rax     # 0x93ff0
movl 0x1b0(%rax), %eax
movl %eax, 0x28(%rdi)
addq $0x30, %rdi
movslq 0x11c(%rsp), %rsi
callq 0x5f060
jmp 0x5e209
movl $0x0, 0xf8(%rsp)
movq 0x60(%rsp), %rcx
movl 0xf8(%rsp), %eax
cmpl (%rcx), %eax
jge 0x5e2b2
movl $0x8, %edi
callq 0x53a0
movq %rax, 0x40(%rsp)
jmp 0x5e239
movq 0x40(%rsp), %rdi
callq 0x5f100
jmp 0x5e245
movq 0x60(%rsp), %rdi
addq $0x30, %rdi
movslq 0xf8(%rsp), %rsi
callq 0x5f130
movq 0x40(%rsp), %rcx
movq %rcx, (%rax)
movl 0xf8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf8(%rsp)
jmp 0x5e214
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x5e46f
movq 0x40(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
callq 0x5340
jmp 0x5e46f
leaq 0x35d37(%rip), %rax     # 0x93ff0
testb $0x1, 0x1cc(%rax)
je 0x5e467
movq 0x60(%rsp), %rax
movslq (%rax), %rax
movq %rax, 0x28(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
movq $0x0, 0xd0(%rsp)
leaq 0xc0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xe8d0
leaq 0xbf(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xedc0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0xe0(%rsp), %rdi
callq 0xedd0
jmp 0x5e32c
movq 0x60(%rsp), %rdi
addq $0x48, %rdi
leaq 0xe0(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0xee50
movq 0x8(%rsp), %rdi
callq 0xee90
leaq 0xbf(%rsp), %rdi
callq 0xeef0
leaq 0xc0(%rsp), %rdi
callq 0xef00
movq 0x60(%rsp), %rax
movslq (%rax), %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
leaq 0x80(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xe8d0
leaq 0x7f(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xedc0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
leaq 0xa0(%rsp), %rdi
callq 0xedd0
jmp 0x5e3ce
movq 0x60(%rsp), %rdi
addq $0x60, %rdi
leaq 0xa0(%rsp), %rsi
callq 0xee50
leaq 0xa0(%rsp), %rdi
callq 0xee90
leaq 0x7f(%rsp), %rdi
callq 0xeef0
leaq 0x80(%rsp), %rdi
callq 0xef00
jmp 0x5e467
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xbf(%rsp), %rdi
callq 0xeef0
leaq 0xc0(%rsp), %rdi
callq 0xef00
jmp 0x5e46f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0x7f(%rsp), %rdi
callq 0xeef0
leaq 0x80(%rsp), %rdi
callq 0xef00
jmp 0x5e46f
addq $0x128, %rsp            # imm = 0x128
retq
movq 0x58(%rsp), %rdi
callq 0xee90
movq 0x50(%rsp), %rdi
callq 0xee90
movq 0x48(%rsp), %rdi
callq 0x5f150
movq 0x68(%rsp), %rdi
callq 0x5768
movq 0x100(%rsp), %rdi
callq 0x5690
nopw %cs:(%rax,%rax)