// File: /workspace/github_cpp_makefile_star2_O1/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 0x1f6a2(%rip), %rdx     # 0x2c498
movq 0x1f693(%rip), %rax     # 0x2c490
subq %rax, %rdx
sarq $0x5, %rdx
cmpq 0x30(%rsp), %rdx
jbe 0xd0fb
addq 0x80(%rsp), %rax
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1f6cf(%rip), %rsi     # 0x2c4f8
movq %rax, %rdx
callq 0xe650
movq %rbx, %rdi
leaq 0x1573c(%rip), %rsi     # 0x22577
callq 0x5840
movq %r14, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xce63
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xce6a
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 0x1f627(%rip), %rdx     # 0x2c4b0
movq 0x1f618(%rip), %rax     # 0x2c4a8
subq %rax, %rdx
sarq $0x5, %rdx
cmpq 0x28(%rsp), %rdx
jbe 0xd0e8
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 0xcedd
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0xcee4
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 0x15432(%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 0xcf41
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0xcf47
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 0x1f57f(%rip), %rdx     # 0x2c4e8
movq 0x1f570(%rip), %rax     # 0x2c4e0
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0xd0d7
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 0xcfb9
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0xcfbf
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 0xcffc
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd013
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xd02a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xd04f
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5470
movq %r12, %rdi
leaq 0x58(%rsp), %rsi
callq 0xe6aa
movq %r12, %rdi
callq 0x17a50
movl $0xff, %ecx
andq %rcx, %rax
setne %r14b
cmpq %rcx, %rax
setne %bpl
movq %r12, %rdi
callq 0xe8da
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xd09b
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 0xcdeb
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1552f(%rip), %rdi     # 0x2260d
movq %r15, %rsi
xorl %eax, %eax
callq 0x56a0
leaq 0x1551e(%rip), %rdi     # 0x2260d
movq 0x28(%rsp), %rsi
xorl %eax, %eax
callq 0x56a0
leaq 0x1550b(%rip), %rdi     # 0x2260d
movq 0x30(%rsp), %rsi
xorl %eax, %eax
callq 0x56a0
movq %rax, %r15
jmp 0xd184
movq %rax, %r15
jmp 0xd168
movq %rax, %r15
jmp 0xd16d
movq %rax, %r15
jmp 0xd14c
jmp 0xd124
movq %rax, %r15
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xd14c
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xd168
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5470
leaq 0x18(%rsp), %r14
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xd184
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xd1d4
movq 0x98(%rsp), %rsi
jmp 0xd1cc
movq %rax, %r15
jmp 0xd1b8
movq %rax, %r15
leaq 0xa8(%rsp), %rdi
callq 0xe8da
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xd1d4
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5470
movq %r15, %rdi
callq 0x5790