// File: /workspace/github_cpp_makefile_star2_O3/helchr[P]reMap/sysinfo.cpp
// Function: SysInfo::getNumberOfChannels(unsigned int, unsigned int)
unsigned int SysInfo::getNumberOfChannels(unsigned int socket, unsigned int controller)
{
    unsigned int count = 0;
    for(unsigned int i = 0; i < 4; i++)
    {
        std::string path = pciDevPath + socketIds.at(socket) +"/" + controllerIds.at(controller) + "." + channelIds.at(i);
        if(fs::exists(path))
        {
            count++;
        }
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %edi, %eax
leaq 0x18(%rsp), %r14
movl %esi, %ebx
leaq 0x48(%rsp), %rbp
xorl %r15d, %r15d
movl $0x8, %r13d
movq %rax, 0x30(%rsp)
shlq $0x5, %rax
movq %rax, 0x80(%rsp)
movq %rbx, 0x28(%rsp)
shlq $0x5, %rbx
movq %rbx, 0x78(%rsp)
leaq 0xa8(%rsp), %r12
xorl %eax, %eax
movl %eax, 0x4(%rsp)
movq 0x1f728(%rip), %rdx     # 0x2c498
movq 0x1f719(%rip), %rax     # 0x2c490
subq %rax, %rdx
sarq $0x5, %rdx
cmpq 0x30(%rsp), %rdx
jbe 0xd075
addq 0x80(%rsp), %rax
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1f755(%rip), %rsi     # 0x2c4f8
movq %rax, %rdx
callq 0xe5e0
movq %rbx, %rdi
leaq 0x157c2(%rip), %rsi     # 0x22577
callq 0x5840
movq %r14, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xcddd
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xcde4
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1f6ad(%rip), %rdx     # 0x2c4b0
movq 0x1f69e(%rip), %rax     # 0x2c4a8
subq %rax, %rdx
sarq $0x5, %rdx
cmpq 0x28(%rsp), %rdx
jbe 0xd062
movq 0x78(%rsp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
leaq 0x8(%rsp), %rdi
callq 0x5190
movq %rbp, 0x38(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xce57
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0xce5e
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x38(%rsp), %rdi
leaq 0x154b8(%rip), %rsi     # 0x2233a
callq 0x5840
leaq 0xb8(%rsp), %rsi
movq %rsi, 0xa8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xcebb
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0xcec1
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xb0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1f605(%rip), %rdx     # 0x2c4e8
movq 0x1f5f6(%rip), %rax     # 0x2c4e0
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0xd051
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
movq %r12, %rdi
callq 0x5190
leaq 0x68(%rsp), %rsi
movq %rsi, 0x58(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xcf33
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0xcf39
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xcf76
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0xcf8d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xcfa4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xcfc9
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5470
movq %r12, %rdi
leaq 0x58(%rsp), %rsi
callq 0xe63a
movq %r12, %rdi
callq 0x179d0
movl $0xff, %ecx
andq %rcx, %rax
setne %r14b
cmpq %rcx, %rax
setne %bpl
movq %r12, %rdi
callq 0xe86c
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xd015
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5470
andb %bpl, %r14b
movzbl %r14b, %eax
movl 0x4(%rsp), %ecx
addl %eax, %ecx
movl %ecx, %eax
incq %r15
addq $0x20, %r13
cmpq $0x4, %r15
leaq 0x18(%rsp), %r14
leaq 0x48(%rsp), %rbp
jne 0xcd65
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x155b5(%rip), %rdi     # 0x2260d
movq %r15, %rsi
xorl %eax, %eax
callq 0x56a0
leaq 0x155a4(%rip), %rdi     # 0x2260d
movq 0x28(%rsp), %rsi
xorl %eax, %eax
callq 0x56a0
leaq 0x15591(%rip), %rdi     # 0x2260d
movq 0x30(%rsp), %rsi
xorl %eax, %eax
callq 0x56a0
movq %rax, %r15
jmp 0xd0fe
movq %rax, %r15
jmp 0xd0e2
movq %rax, %r15
jmp 0xd0e7
movq %rax, %r15
jmp 0xd0c6
jmp 0xd09e
movq %rax, %r15
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xd0c6
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xd0e2
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5470
leaq 0x18(%rsp), %r14
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xd0fe
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xd14e
movq 0x98(%rsp), %rsi
jmp 0xd146
movq %rax, %r15
jmp 0xd132
movq %rax, %r15
leaq 0xa8(%rsp), %rdi
callq 0xe86c
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xd14e
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5470
movq %r15, %rdi
callq 0x5790