// File: /workspace/github_cpp_makefile_star2_O1/dguglielmi[P]dlan-linux-software/common/packetinterface-linux.cpp
// Function: CPacketInterfaceLinux::GetInterfaceNames(std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) const
bool CPacketInterfaceLinux::GetInterfaceNames(std::set<std::string>& setIfNames) const
{
    bool bResult = false;
    std::ifstream devfile("/proc/net/dev");
    if (devfile.is_open())
    {
        std::string buf;
        getline(devfile, buf);
        getline(devfile, buf);
        for (;;)
        {
            getline(devfile, buf);
            if (devfile.good() == false) break;
            std::string::size_type nameStart = 0, nameEnd;
            while (nameStart < buf.size() && isspace(buf[nameStart])) nameStart++;
            nameEnd = nameStart;
            while (nameEnd < buf.size() && buf[nameEnd] && buf[nameEnd] != ':' && !isspace(buf[nameEnd])) nameEnd++;
            if (nameStart != nameEnd && nameEnd < buf.size() && buf[nameEnd] == ':' && (nameEnd - nameStart) < IFNAMSIZ)
            {
                setIfNames.insert(buf.substr(nameStart, nameEnd-nameStart));
            }
        }
        devfile.close();
        bResult = true;
    }
    return bResult;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %r14
leaq 0x27d2(%rip), %rsi      # 0x16703
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x4410
leaq 0xb8(%rsp), %rdi
callq 0x40a0
movl %eax, %ebx
testb %al, %al
je 0x14110
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x40(%rsp), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %edx
leaq 0x40(%rsp), %r15
movq %rsp, %rsi
movq %r15, %rdi
callq 0x4420
movq 0x40(%rsp), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %edx
leaq 0x40(%rsp), %r15
movq %rsp, %rsi
movq %r15, %rdi
callq 0x4420
movq %rsp, %r12
leaq 0x20(%rsp), %r13
movabsq $0x400000100000001, %rbp # imm = 0x400000100000001
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x4420
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x60(%rsp,%rax)
jne 0x140eb
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x1403c
movq (%rsp), %rcx
xorl %edx, %edx
movzbl (%rcx,%rdx), %esi
leal -0x9(%rsi), %edi
cmpl $0x5, %edi
jae 0x14030
incq %rdx
cmpq %rdx, %rax
jne 0x1401a
jmp 0x14037
cmpl $0x20, %esi
je 0x14026
jmp 0x1403e
movq %rax, %rdx
jmp 0x1403e
xorl %edx, %edx
cmpq %rax, %rdx
setae %dil
jb 0x140b1
movq %rdx, %rsi
movq %rsi, %rcx
subq %rdx, %rcx
sete %al
orb %dil, %al
testb $0x1, %al
jne 0x13fd2
movq (%rsp), %rax
cmpb $0x3a, (%rax,%rsi)
jne 0x13fd2
cmpq $0xf, %rcx
ja 0x13fd2
movq %r13, %rdi
movq %r12, %rsi
callq 0x4290
movq %r14, %rdi
movq %r13, %rsi
callq 0x15686
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x13fd2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x13fd2
movq (%rsp), %rcx
movq %rdx, %rsi
movzbl (%rcx,%rsi), %r8d
cmpq $0x3a, %r8
ja 0x140c9
btq %r8, %rbp
jb 0x1404a
addb $-0xe, %r8b
cmpb $-0x6, %r8b
ja 0x1404a
incq %rsi
cmpq %rax, %rsi
setae %dil
jne 0x140b8
movq %rax, %rsi
jmp 0x1404a
leaq 0x40(%rsp), %rdi
callq 0x4090
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x14110
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4270
leaq 0x40(%rsp), %rdi
callq 0x40c0
movl %ebx, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x14156
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x14156
jmp 0x14153
jmp 0x14153
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x14171
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4270
leaq 0x40(%rsp), %rdi
callq 0x40c0
movq %rbx, %rdi
callq 0x43e0
nop