// File: /workspace/github_c_makefile_star2_O3/patriciogonzalezvivo[P]tprint/include/serial/list_ports_linux.cc
// Function: serial::list_ports()
vector<PortInfo>
serial::list_ports()
{
    vector<PortInfo> results;

    vector<string> search_globs;
    search_globs.push_back("/dev/ttyACM*");
    search_globs.push_back("/dev/ttyS*");
    search_globs.push_back("/dev/ttyUSB*");
    search_globs.push_back("/dev/tty.*");
    search_globs.push_back("/dev/cu.*");

    vector<string> devices_found = glob( search_globs );

    vector<string>::iterator iter = devices_found.begin();

    while( iter != devices_found.end() )
    {
        string device = *iter++;

        vector<string> sysfs_info = get_sysfs_info( device );

        string friendly_name = sysfs_info[0];

        string hardware_id = sysfs_info[1];

        PortInfo device_entry;
        device_entry.port = device;
        device_entry.description = friendly_name;
        device_entry.hardware_id = hardware_id;

        results.push_back( device_entry );

    }

    return results;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
xorl %eax, %eax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movq %rdi, -0x138(%rbp)
movups %xmm0, (%rdi)
movq %rax, -0x120(%rbp)
movaps %xmm0, -0x130(%rbp)
leaq -0x108(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1774d(%rip), %rsi     # 0x20020
leaq 0x17752(%rip), %rdx     # 0x2002c
leaq -0x118(%rbp), %rdi
callq 0x9f1e
leaq -0x130(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa280
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x891b
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
leaq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
movq %rax, (%rdi)
leaq 0x176fa(%rip), %rsi     # 0x2002d
leaq 0x176fd(%rip), %rdx     # 0x20037
callq 0x9f1e
leaq -0x130(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa280
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8974
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
leaq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
movq %rax, (%rdi)
leaq 0x176ac(%rip), %rsi     # 0x20038
leaq 0x176b1(%rip), %rdx     # 0x20044
callq 0x9f1e
leaq -0x130(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa280
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x89cd
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
leaq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
movq %rax, (%rdi)
leaq 0x17660(%rip), %rsi     # 0x20045
leaq 0x17663(%rip), %rdx     # 0x2004f
callq 0x9f1e
leaq -0x130(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa280
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8a26
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
leaq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
movq %rax, (%rdi)
leaq 0x17612(%rip), %rsi     # 0x20050
leaq 0x17614(%rip), %rdx     # 0x20059
callq 0x9f1e
leaq -0x130(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa280
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8a7f
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
xorps %xmm0, %xmm0
movaps %xmm0, -0x1d0(%rbp)
movq $0x0, -0x1c0(%rbp)
movq -0x130(%rbp), %rax
cmpq %rax, -0x128(%rbp)
je 0x91db
movq (%rax), %rdi
leaq -0x118(%rbp), %rcx
xorl %esi, %esi
xorl %edx, %edx
callq 0x8350
movq -0x130(%rbp), %r14
addq $0x20, %r14
cmpq -0x128(%rbp), %r14
je 0x8af5
leaq -0x118(%rbp), %rbx
movq (%r14), %rdi
movl $0x20, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8350
addq $0x20, %r14
cmpq -0x128(%rbp), %r14
jne 0x8ad6
cmpq $0x0, -0x118(%rbp)
je 0x8b5a
leaq -0x38(%rbp), %r12
xorl %r13d, %r13d
leaq -0x48(%rbp), %rbx
leaq -0x88(%rbp), %r14
leaq -0x1d0(%rbp), %r15
movq -0x110(%rbp), %rax
movq (%rax,%r13,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x9d44
movq %r15, %rdi
movq %rbx, %rsi
callq 0xa280
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x8b4e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8310
incq %r13
cmpq %r13, -0x118(%rbp)
ja 0x8b18
leaq -0x118(%rbp), %rdi
callq 0x8080
movq -0x1d0(%rbp), %r13
cmpq -0x1c8(%rbp), %r13
je 0x91db
leaq -0x178(%rbp), %r15
leaq -0x68(%rbp), %r14
leaq -0x168(%rbp), %rax
movq %rax, -0x178(%rbp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xa1e2
movl $0x1, %ecx
movq %r15, %rdi
leaq 0x174d4(%rip), %rsi     # 0x20089
movq $-0x1, %rdx
callq 0x8450
cmpq $-0x1, %rax
je 0x8be2
incq %rax
leaq -0x48(%rbp), %rdi
movq %r15, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x80a0
jmp 0x8c04
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0xa1e2
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x80(%rbp)
movb %cl, -0x78(%rbp)
leaq -0x148(%rbp), %rax
movq %rax, -0x158(%rbp)
movq %rcx, -0x150(%rbp)
movb %cl, -0x148(%rbp)
movq -0x48(%rbp), %rdx
leaq -0x198(%rbp), %r15
movq %r15, %rdi
leaq 0x17412(%rip), %rsi     # 0x2005a
xorl %eax, %eax
callq 0x943b
movl $0x6, %edx
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
leaq 0x17412(%rip), %rcx     # 0x20073
callq 0x8430
testl %eax, %eax
je 0x8d2b
movl $0x6, %edx
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
leaq 0x173fa(%rip), %rcx     # 0x2007a
callq 0x8430
testl %eax, %eax
je 0x8e2d
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x198(%rbp), %rsi
movq -0x190(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0xa1e2
movq %r14, %rdi
leaq 0x173c9(%rip), %rsi     # 0x20081
callq 0x8670
leaq -0x118(%rbp), %rbx
movq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x82b0
testl %eax, %eax
jne 0x8d11
movq -0x68(%rbp), %rsi
movq %rbx, %rdi
callq 0x9c8d
leaq -0x158(%rbp), %rdi
movq %rbx, %rsi
callq 0x83f0
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8d11
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x8f23
movq -0x58(%rbp), %rsi
jmp 0x8f1b
movq -0x198(%rbp), %rsi
leaq -0x1f0(%rbp), %rbx
movq %rbx, %rdi
callq 0x9634
movq %r14, %rdi
movq %rbx, %rsi
callq 0x95af
leaq -0x118(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x95af
movq %r15, %rdi
movq %rbx, %rsi
callq 0x83f0
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8d8b
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x8da4
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x1f0(%rbp), %rdi
leaq -0x1e0(%rbp), %rax
cmpq %rax, %rdi
je 0x8dc6
movq -0x1e0(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x198(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x82b0
testl %eax, %eax
jne 0x8f23
movq %rbx, %rdi
movq %r15, %rsi
callq 0x96bb
leaq -0x88(%rbp), %rdi
movq %rbx, %rsi
callq 0x83f0
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8e1d
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9a1a
jmp 0x8ef2
movq -0x198(%rbp), %rsi
movq %r14, %rdi
callq 0x9634
leaq -0x118(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x95af
movq %r15, %rdi
movq %rbx, %rsi
callq 0x83f0
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8e7b
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x8e94
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x198(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x82b0
testl %eax, %eax
jne 0x8f23
movq %rbx, %rdi
movq %r15, %rsi
callq 0x96bb
leaq -0x88(%rbp), %rdi
movq %rbx, %rsi
callq 0x83f0
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8ee7
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9a1a
leaq -0x158(%rbp), %rdi
movq %rbx, %rsi
callq 0x83f0
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8f23
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
cmpq $0x0, -0x80(%rbp)
jne 0x8f3a
leaq -0x88(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x81b0
cmpq $0x0, -0x150(%rbp)
jne 0x8f61
movl $0x3, %r8d
leaq -0x158(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x17129(%rip), %rcx     # 0x20085
callq 0x8510
xorps %xmm0, %xmm0
movaps %xmm0, -0x1b0(%rbp)
movq $0x0, -0x1a0(%rbp)
leaq -0x1b0(%rbp), %rbx
movq %rbx, %rdi
leaq -0x88(%rbp), %rsi
callq 0x9ed2
movq %rbx, %rdi
leaq -0x158(%rbp), %rsi
callq 0x9ed2
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
leaq -0x118(%rbp), %rbx
je 0x8fc4
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x8fe6
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x9002
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x901b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x1b0(%rbp), %rax
leaq -0x38(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0xa1e2
movq -0x1b0(%rbp), %rax
leaq -0x78(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0xa1e2
leaq -0x108(%rbp), %rax
movq %rax, -0x118(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x110(%rbp)
movb %cl, -0x108(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq %rcx, -0xf0(%rbp)
movb %cl, -0xe8(%rbp)
leaq -0xc8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq %rcx, -0xd0(%rbp)
movb %cl, -0xc8(%rbp)
movq %rbx, %rdi
leaq -0x178(%rbp), %rsi
callq 0x81b0
leaq -0xf8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x81b0
leaq -0xd8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x81b0
movq -0x138(%rbp), %rdi
movq %rbx, %rsi
callq 0x9d82
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x911c
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x913e
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x9160
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x917c
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9195
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8310
leaq -0x1b0(%rbp), %rdi
callq 0x9e18
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x91c3
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x8310
addq $0x20, %r13
cmpq -0x1c8(%rbp), %r13
leaq -0x178(%rbp), %r15
jne 0x8b85
leaq -0x1d0(%rbp), %rdi
callq 0x9e18
leaq -0x130(%rbp), %rdi
callq 0x9e18
movq -0x138(%rbp), %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x921c
jmp 0x924a
jmp 0x921c
jmp 0x924a
jmp 0x921c
jmp 0x924a
jmp 0x921c
jmp 0x924a
movq %rax, %rbx
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x941b
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8310
jmp 0x941b
movq %rax, %rbx
jmp 0x941b
jmp 0x931f
jmp 0x931f
jmp 0x931f
jmp 0x931f
jmp 0x92ae
jmp 0x931f
jmp 0x92ae
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x9290
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x8310
jmp 0x9290
movq %rax, %rbx
movq -0x1f0(%rbp), %rdi
leaq -0x1e0(%rbp), %rax
cmpq %rax, %rdi
je 0x9322
movq -0x1e0(%rbp), %rsi
jmp 0x92c2
jmp 0x931f
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x9322
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x8310
jmp 0x9322
jmp 0x931f
jmp 0x92ed
movq %rax, %rbx
jmp 0x93ed
movq %rax, %rbx
jmp 0x9344
movq %rax, %rbx
jmp 0x93e1
movq %rax, %rbx
jmp 0x93c8
movq %rax, %rbx
jmp 0x940f
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x940f
movq -0x38(%rbp), %rsi
jmp 0x9407
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x9e18
jmp 0x9322
movq %rax, %rbx
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x9344
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x9366
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x9382
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x93ed
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8310
jmp 0x93ed
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x9dba
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x93c8
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x8310
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x93e1
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8310
leaq -0x1b0(%rbp), %rdi
callq 0x9e18
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x940f
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x8310
leaq -0x1d0(%rbp), %rdi
callq 0x9e18
leaq -0x130(%rbp), %rdi
callq 0x9e18
movq -0x138(%rbp), %rdi
callq 0x9e86
movq %rbx, %rdi
callq 0x85f0