// File: helchr[P]reMap/sysinfo.cpp
// Function: SysInfo::getImcs[abi:cxx11]()
std::vector<std::string> SysInfo::getImcs()
{
    static std::vector<std::string> imcs;
    if(imcs.empty())
    {
        std::string path = "/sys/bus/event_source/devices/";
        std::string imc = path+"uncore_imc";
        for (const auto & entry : fs::directory_iterator(path))
        {
            if(entry.path().string().rfind(imc,0) == 0)
            {
                imcs.push_back(entry.path());
            }
        }
        std::sort(imcs.begin(),imcs.end());
    }
    return imcs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x160(%rbp)
movq %rdi, %rax
movq %rax, -0x158(%rbp)
movq %rdi, -0x8(%rbp)
cmpb $0x0, 0x2c7e9(%rip)     # 0x46630
jne 0x19e8c
leaq 0x2c7e0(%rip), %rdi     # 0x46630
callq 0x69c0
cmpl $0x0, %eax
je 0x19e8c
leaq 0x2c7b7(%rip), %rdi     # 0x46618
callq 0x1aaa0
leaq -0xd4ad(%rip), %rdi     # 0xc9c0
leaq 0x2c7a4(%rip), %rsi     # 0x46618
leaq 0x2c6cd(%rip), %rdx     # 0x46548
callq 0x6510
leaq 0x2c7a9(%rip), %rdi     # 0x46630
callq 0x63d0
leaq 0x2c785(%rip), %rdi     # 0x46618
callq 0x1aac0
testb $0x1, %al
jne 0x19ea1
jmp 0x1a1aa
leaq -0x29(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x6960
movq -0x168(%rbp), %rdx
leaq 0x1976f(%rip), %rsi     # 0x3362e
leaq -0x28(%rbp), %rdi
callq 0x1a480
jmp 0x19eca
leaq -0x29(%rbp), %rdi
callq 0x65e0
leaq 0x19773(%rip), %rdx     # 0x3364d
leaq -0x60(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1ab00
jmp 0x19ee9
leaq -0xb8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1a9c0
jmp 0x19efb
leaq -0x78(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x1ab80
jmp 0x19f0d
leaq -0xb8(%rbp), %rdi
callq 0x1aa50
leaq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x1abe0
leaq -0xc8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x1abb0
leaq -0xd8(%rbp), %rdi
callq 0x1ac10
movq -0x68(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x1abe0
leaq -0xe8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x1ac30
leaq -0xf8(%rbp), %rdi
callq 0x1ac10
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x1ac70
movb %al, -0x169(%rbp)
jmp 0x19f9a
movb -0x169(%rbp), %al
testb $0x1, %al
jne 0x1a03a
jmp 0x19faa
leaq -0xe8(%rbp), %rdi
callq 0x1ac10
leaq -0xc8(%rbp), %rdi
callq 0x1ac10
leaq -0x78(%rbp), %rdi
callq 0x1ac10
jmp 0x1a140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x65e0
jmp 0x1a1cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a19f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a196
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x1aa50
jmp 0x1a196
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a11d
leaq -0xc8(%rbp), %rdi
callq 0x21aa0
movq %rax, -0x178(%rbp)
jmp 0x1a04f
movq -0x178(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rdi
callq 0x1aca0
movq %rax, %rsi
leaq -0x120(%rbp), %rdi
callq 0x1acb0
jmp 0x1a07a
leaq -0x120(%rbp), %rdi
leaq -0x60(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x6470
movq %rax, -0x180(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x6a88
movq -0x180(%rbp), %rax
cmpq $0x0, %rax
jne 0x1a108
movq -0x100(%rbp), %rdi
callq 0x1aca0
movq %rax, %rsi
leaq -0x140(%rbp), %rdi
callq 0x1ad60
jmp 0x1a0cb
leaq 0x2c546(%rip), %rdi     # 0x46618
leaq -0x140(%rbp), %rsi
callq 0x1ad30
jmp 0x1a0e0
leaq -0x140(%rbp), %rdi
callq 0x6a88
jmp 0x1a108
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x6a88
jmp 0x1a11d
jmp 0x1a10a
leaq -0xc8(%rbp), %rdi
callq 0x23030
jmp 0x1a118
jmp 0x19f7f
leaq -0xe8(%rbp), %rdi
callq 0x1ac10
leaq -0xc8(%rbp), %rdi
callq 0x1ac10
leaq -0x78(%rbp), %rdi
callq 0x1ac10
jmp 0x1a196
leaq 0x2c4d1(%rip), %rdi     # 0x46618
movq %rdi, -0x188(%rbp)
callq 0x1add0
movq -0x188(%rbp), %rdi
movq %rax, -0x148(%rbp)
callq 0x1ae00
movq %rax, -0x150(%rbp)
movq -0x148(%rbp), %rdi
movq -0x150(%rbp), %rsi
callq 0x1ad90
jmp 0x1a182
leaq -0x60(%rbp), %rdi
callq 0x6a88
leaq -0x28(%rbp), %rdi
callq 0x6a88
jmp 0x1a1aa
leaq -0x60(%rbp), %rdi
callq 0x6a88
leaq -0x28(%rbp), %rdi
callq 0x6a88
jmp 0x1a1cd
movq -0x160(%rbp), %rdi
leaq 0x2c460(%rip), %rsi     # 0x46618
callq 0x1ae30
movq -0x158(%rbp), %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x6950
nopw %cs:(%rax,%rax)