// File: /workspace/github_cpp_makefile_star2_O1/gvaumour[P]cache-simulator/src/Level.cc
// Function: Level::Level(int, std::vector<ConfigCache, std::allocator<ConfigCache>>, Hierarchy*)
Level::Level(int id_core, std::vector<ConfigCache> configs, Hierarchy* system) : m_IDcore(id_core), m_system(system){
	assert(configs.size()  >  0);
	
	m_isUnified = true;
	m_printStats = configs[0].m_printStats;
	
	m_dcache = new HybridCache(m_IDcore, false, configs[0].m_size, configs[0].m_assoc , \
					configs[0].m_blocksize, configs[0].m_nbNVMways, configs[0].m_policy, this);
	
	m_dcache->setPrintState(m_printStats);
	m_icache = NULL;	
	if(configs.size() == 2){
		m_isUnified = false;
		m_icache = new HybridCache(m_IDcore, true, configs[1].m_size, configs[1].m_assoc , \
					configs[1].m_blocksize, configs[1].m_nbNVMways, configs[1].m_policy, this);
		m_icache->setPrintState(m_printStats);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq (%rdx), %rbx
cmpq %rbx, 0x8(%rdx)
je 0x1eb81
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
movb $0x1, 0x20(%rdi)
movb 0x34(%rbx), %al
movb %al, 0x21(%rdi)
movl $0x230, %edi            # imm = 0x230
callq 0x52e0
movq %rax, %r12
movl (%rbx), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rbx), %r13d
movl 0x8(%rbx), %eax
movl %eax, 0x14(%rsp)
movl 0x30(%rbx), %eax
movq %rax, 0x8(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0xcc1c
subq $0x8, %rsp
movq %r12, %rdi
movl %ebp, %esi
xorl %edx, %edx
movl 0xc(%rsp), %ecx
movl %r13d, %r8d
movl 0x1c(%rsp), %r9d
pushq %r14
pushq %rbx
pushq 0x20(%rsp)
callq 0x18854
addq $0x20, %rsp
movq %r12, (%r14)
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x1eaa9
callq 0x52a0
movq (%r14), %rax
movb 0x21(%r14), %cl
movb %cl, 0x90(%rax)
movq $0x0, 0x8(%r14)
movq (%r15), %r13
movq 0x8(%r15), %rax
subq %r13, %rax
cmpq $0x70, %rax
jne 0x1eb72
movb $0x0, 0x20(%r14)
movl $0x230, %edi            # imm = 0x230
callq 0x52e0
movq %rax, %rbx
movl 0x10(%r14), %r12d
movl 0x38(%r13), %eax
movl %eax, 0x4(%rsp)
movl 0x3c(%r13), %ebp
movl 0x40(%r13), %r15d
movl 0x68(%r13), %eax
movq %rax, 0x8(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x48(%r13), %rsi
movq 0x50(%r13), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0xcc1c
subq $0x8, %rsp
movq %rbx, %rdi
movl %r12d, %esi
movl $0x1, %edx
movl 0xc(%rsp), %ecx
movl %ebp, %r8d
movl %r15d, %r9d
pushq %r14
pushq %r13
pushq 0x20(%rsp)
callq 0x18854
addq $0x20, %rsp
movq %rbx, 0x8(%r14)
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x1eb64
callq 0x52a0
movq 0x8(%r14), %rax
movb 0x21(%r14), %cl
movb %cl, 0x90(%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1738c(%rip), %rdi     # 0x35f14
leaq 0x17398(%rip), %rsi     # 0x35f27
leaq 0x1739e(%rip), %rcx     # 0x35f34
movl $0x16, %edx
callq 0x51d0
movq %rbx, %r12
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x1ebd8
jmp 0x1ebce
movq %rbx, %r12
jmp 0x1ebd5
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x1ebd8
callq 0x52a0
jmp 0x1ebd8
movq %rax, %r14
movq %r12, %rdi
callq 0x52a0
movq %r14, %rdi
callq 0x55a0