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

	if(simu_parameters.perceptron_drawFeatureMaps)
	{
		stats_heatmap_weight = vector<vector<int> >(m_size, vector<int>());
		stats_heatmap_allocation = vector<vector<int> >(m_size, vector<int>());
		stats_allocation_buffer = vector<vector<int> >(m_size, vector<int>());
		stats_weight_buffer = vector<vector<int> >(m_size, vector<int>());

	}
}

// Assembly:
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdx, 0xc0(%rsp)
movb %cl, %al
movq %rdi, 0x1f0(%rsp)
movl %esi, 0x1ec(%rsp)
movq %rdx, 0x1e0(%rsp)
andb $0x1, %al
movb %al, 0x1df(%rsp)
movq 0x1f0(%rsp), %rdi
movq %rdi, 0xb0(%rsp)
addq $0x8, %rdi
movq %rdi, 0xb8(%rsp)
callq 0x5540
movq 0xb0(%rsp), %rdi
addq $0x30, %rdi
movq %rdi, 0x88(%rsp)
callq 0x2e680
movq 0xb0(%rsp), %rdi
addq $0x48, %rdi
movq %rdi, 0x90(%rsp)
callq 0xe860
movq 0xb0(%rsp), %rdi
addq $0x60, %rdi
movq %rdi, 0x98(%rsp)
callq 0xe860
movq 0xb0(%rsp), %rdi
addq $0x78, %rdi
movq %rdi, 0xa0(%rsp)
callq 0xe860
movq 0xb0(%rsp), %rdi
addq $0x90, %rdi
movq %rdi, 0xa8(%rsp)
callq 0xe860
movq 0xb0(%rsp), %rax
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
movl 0x1ec(%rsp), %ecx
movl %ecx, (%rax)
callq 0x5050
jmp 0x2c96a
movq 0xb0(%rsp), %rdi
movb 0x1df(%rsp), %al
andb $0x1, %al
movb %al, 0x28(%rdi)
leaq 0x6766b(%rip), %rax     # 0x93ff0
movl 0x1b0(%rax), %eax
movl %eax, 0x2c(%rdi)
addq $0x30, %rdi
movslq 0x1ec(%rsp), %rsi
callq 0x2e690
jmp 0x2c9a1
movl $0x0, 0x1c8(%rsp)
movq 0xb0(%rsp), %rcx
movl 0x1c8(%rsp), %eax
cmpl (%rcx), %eax
jge 0x2ca5c
movl $0x60, %edi
callq 0x53a0
movq %rax, 0x80(%rsp)
jmp 0x2c9d7
movq 0x80(%rsp), %rdi
callq 0x2e730
jmp 0x2c9e6
movq 0xb0(%rsp), %rdi
addq $0x30, %rdi
movslq 0x1c8(%rsp), %rsi
callq 0x2e7d0
movq 0x80(%rsp), %rcx
movq %rcx, (%rax)
movl 0x1c8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c8(%rsp)
jmp 0x2c9ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
jmp 0x2cded
movq 0x80(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
callq 0x5340
jmp 0x2cded
leaq 0x6758d(%rip), %rax     # 0x93ff0
testb $0x1, 0x1cc(%rax)
je 0x2cde5
movq 0xb0(%rsp), %rax
movslq (%rax), %rax
movq %rax, 0x68(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x190(%rsp)
movq $0x0, 0x1a0(%rsp)
leaq 0x190(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0xe8d0
leaq 0x18f(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0xedc0
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rcx
leaq 0x1b0(%rsp), %rdi
callq 0xedd0
jmp 0x2cad9
movq 0xb0(%rsp), %rdi
addq $0x48, %rdi
leaq 0x1b0(%rsp), %rsi
movq %rsi, 0x48(%rsp)
callq 0xee50
movq 0x48(%rsp), %rdi
callq 0xee90
leaq 0x18f(%rsp), %rdi
callq 0xeef0
leaq 0x190(%rsp), %rdi
callq 0xef00
movq 0xb0(%rsp), %rax
movslq (%rax), %rax
movq %rax, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x150(%rsp)
movq $0x0, 0x160(%rsp)
leaq 0x150(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0xe8d0
leaq 0x14f(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0xedc0
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
leaq 0x170(%rsp), %rdi
callq 0xedd0
jmp 0x2cb84
movq 0xb0(%rsp), %rdi
addq $0x60, %rdi
leaq 0x170(%rsp), %rsi
movq %rsi, 0x28(%rsp)
callq 0xee50
movq 0x28(%rsp), %rdi
callq 0xee90
leaq 0x14f(%rsp), %rdi
callq 0xeef0
leaq 0x150(%rsp), %rdi
callq 0xef00
movq 0xb0(%rsp), %rax
movslq (%rax), %rax
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x110(%rsp)
movq $0x0, 0x120(%rsp)
leaq 0x110(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xe8d0
leaq 0x10f(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xedc0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
leaq 0x130(%rsp), %rdi
callq 0xedd0
jmp 0x2cc2f
movq 0xb0(%rsp), %rdi
addq $0x78, %rdi
leaq 0x130(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0xee50
movq 0x8(%rsp), %rdi
callq 0xee90
leaq 0x10f(%rsp), %rdi
callq 0xeef0
leaq 0x110(%rsp), %rdi
callq 0xef00
movq 0xb0(%rsp), %rax
movslq (%rax), %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
movq $0x0, 0xe0(%rsp)
leaq 0xd0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xe8d0
leaq 0xcf(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xedc0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
leaq 0xf0(%rsp), %rdi
callq 0xedd0
jmp 0x2ccda
movq 0xb0(%rsp), %rdi
addq $0x90, %rdi
leaq 0xf0(%rsp), %rsi
callq 0xee50
leaq 0xf0(%rsp), %rdi
callq 0xee90
leaq 0xcf(%rsp), %rdi
callq 0xeef0
leaq 0xd0(%rsp), %rdi
callq 0xef00
jmp 0x2cde5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
leaq 0x18f(%rsp), %rdi
callq 0xeef0
leaq 0x190(%rsp), %rdi
callq 0xef00
jmp 0x2cded
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
leaq 0x14f(%rsp), %rdi
callq 0xeef0
leaq 0x150(%rsp), %rdi
callq 0xef00
jmp 0x2cded
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
leaq 0x10f(%rsp), %rdi
callq 0xeef0
leaq 0x110(%rsp), %rdi
callq 0xef00
jmp 0x2cded
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d0(%rsp)
movl %eax, 0x1cc(%rsp)
leaq 0xcf(%rsp), %rdi
callq 0xeef0
leaq 0xd0(%rsp), %rdi
callq 0xef00
jmp 0x2cded
addq $0x1f8, %rsp            # imm = 0x1F8
retq
movq 0xa8(%rsp), %rdi
callq 0xee90
movq 0xa0(%rsp), %rdi
callq 0xee90
movq 0x98(%rsp), %rdi
callq 0xee90
movq 0x90(%rsp), %rdi
callq 0xee90
movq 0x88(%rsp), %rdi
callq 0x2e7f0
movq 0xb8(%rsp), %rdi
callq 0x5768
movq 0x1d0(%rsp), %rdi
callq 0x5690
nopl (%rax,%rax)