// File: /workspace/github_c_makefile_star2_O1/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 0x1873d(%rip), %rsi     # 0x21020
leaq 0x18742(%rip), %rdx     # 0x2102c
leaq -0x118(%rbp), %rdi
callq 0x9f82
leaq -0x130(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa304
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x892b
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
leaq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
movq %rax, (%rdi)
leaq 0x186ea(%rip), %rsi     # 0x2102d
leaq 0x186ed(%rip), %rdx     # 0x21037
callq 0x9f82
leaq -0x130(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa304
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8984
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
leaq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
movq %rax, (%rdi)
leaq 0x1869c(%rip), %rsi     # 0x21038
leaq 0x186a1(%rip), %rdx     # 0x21044
callq 0x9f82
leaq -0x130(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa304
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x89dd
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
leaq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
movq %rax, (%rdi)
leaq 0x18650(%rip), %rsi     # 0x21045
leaq 0x18653(%rip), %rdx     # 0x2104f
callq 0x9f82
leaq -0x130(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa304
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8a36
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
leaq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
movq %rax, (%rdi)
leaq 0x18602(%rip), %rsi     # 0x21050
leaq 0x18604(%rip), %rdx     # 0x21059
callq 0x9f82
leaq -0x130(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa304
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8a8f
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
xorps %xmm0, %xmm0
movaps %xmm0, -0x1d0(%rbp)
movq $0x0, -0x1c0(%rbp)
movq -0x130(%rbp), %rax
cmpq %rax, -0x128(%rbp)
je 0x8b76
movq (%rax), %rdi
leaq -0x118(%rbp), %rcx
xorl %esi, %esi
xorl %edx, %edx
callq 0x8360
movq -0x130(%rbp), %r14
addq $0x20, %r14
cmpq -0x128(%rbp), %r14
je 0x8b05
leaq -0x118(%rbp), %rbx
movq (%r14), %rdi
movl $0x20, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8360
addq $0x20, %r14
cmpq -0x128(%rbp), %r14
jne 0x8ae6
cmpq $0x0, -0x118(%rbp)
je 0x8b6a
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 0x9dac
movq %r15, %rdi
movq %rbx, %rsi
callq 0xa304
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x8b5e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8320
incq %r13
cmpq %r13, -0x118(%rbp)
ja 0x8b28
leaq -0x118(%rbp), %rdi
callq 0x8080
movq -0x1d0(%rbp), %r13
cmpq -0x1c8(%rbp), %r13
je 0x9202
leaq -0x178(%rbp), %r15
xorl %r12d, %r12d
leaq -0x168(%rbp), %rax
movq %rax, -0x178(%rbp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xa26a
movl $0x1, %ecx
movq %r15, %rdi
leaq 0x184c5(%rip), %rsi     # 0x21089
movq $-0x1, %rdx
callq 0x8460
cmpq $-0x1, %rax
je 0x8bf1
incq %rax
leaq -0x48(%rbp), %rdi
movq %r15, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x80a0
jmp 0x8c13
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0xa26a
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq %r12, -0x80(%rbp)
movb %r12b, -0x78(%rbp)
leaq -0x148(%rbp), %rax
movq %rax, -0x158(%rbp)
movq %r12, -0x150(%rbp)
movb %r12b, -0x148(%rbp)
movq -0x48(%rbp), %rdx
leaq -0x198(%rbp), %r15
movq %r15, %rdi
leaq 0x18403(%rip), %rsi     # 0x2105a
xorl %eax, %eax
callq 0x9462
movl $0x6, %edx
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
leaq 0x18403(%rip), %rcx     # 0x21073
callq 0x8440
testl %eax, %eax
je 0x8d42
movl $0x6, %edx
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
leaq 0x183eb(%rip), %rcx     # 0x2107a
callq 0x8440
testl %eax, %eax
je 0x8e4b
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x198(%rbp), %rsi
movq -0x190(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
callq 0xa26a
movq %rbx, %rdi
leaq 0x183b6(%rip), %rsi     # 0x21081
callq 0x8680
movq -0x68(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x82c0
testl %eax, %eax
jne 0x8d28
leaq -0x118(%rbp), %rbx
movq %rbx, %rdi
leaq -0x68(%rbp), %rsi
callq 0x9cef
leaq -0x158(%rbp), %rdi
movq %rbx, %rsi
callq 0x8400
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8d28
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x8f48
movq -0x58(%rbp), %rsi
jmp 0x8f40
leaq -0x1f0(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x9697
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9612
leaq -0x118(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9612
movq %r15, %rdi
movq %r14, %rsi
callq 0x8400
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8da2
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x8dbb
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x1f0(%rbp), %rdi
leaq -0x1e0(%rbp), %rax
cmpq %rax, %rdi
je 0x8ddd
movq -0x1e0(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x198(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x82c0
testl %eax, %eax
jne 0x8f48
leaq -0x118(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9717
leaq -0x88(%rbp), %rdi
movq %rbx, %rsi
callq 0x8400
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8e3b
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9a79
jmp 0x8f17
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9697
leaq -0x118(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9612
movq %r15, %rdi
movq %r14, %rsi
callq 0x8400
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8e99
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x8eb2
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x198(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x82c0
testl %eax, %eax
jne 0x8f48
leaq -0x118(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9717
leaq -0x88(%rbp), %rdi
movq %rbx, %rsi
callq 0x8400
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8f0c
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9a79
leaq -0x158(%rbp), %rdi
movq %rbx, %rsi
callq 0x8400
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x8f48
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
cmpq $0x0, -0x80(%rbp)
jne 0x8f5f
leaq -0x88(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x81c0
movq -0x150(%rbp), %rdx
testq %rdx, %rdx
jne 0x8f86
movl $0x3, %r8d
leaq -0x158(%rbp), %rdi
xorl %esi, %esi
leaq 0x18104(%rip), %rcx     # 0x21085
callq 0x8520
xorps %xmm0, %xmm0
movaps %xmm0, -0x1b0(%rbp)
movq $0x0, -0x1a0(%rbp)
leaq -0x1b0(%rbp), %rbx
movq %rbx, %rdi
leaq -0x88(%rbp), %rsi
callq 0x9f36
movq %rbx, %rdi
leaq -0x158(%rbp), %rsi
callq 0x9f36
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x8fe2
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x9004
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x9020
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9039
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8320
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 0xa26a
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 0xa26a
leaq -0x108(%rbp), %rax
movq %rax, -0x118(%rbp)
movq %r12, -0x110(%rbp)
movb %r12b, -0x108(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq %r12, -0xf0(%rbp)
movb %r12b, -0xe8(%rbp)
leaq -0xc8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq %r12, -0xd0(%rbp)
movb %r12b, -0xc8(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x81c0
leaq -0xf8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x81c0
leaq -0xd8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x81c0
movq -0x138(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x9dea
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x9143
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x9165
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x9187
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x91a3
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x91bc
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8320
leaq -0x1b0(%rbp), %rdi
callq 0x9e80
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x91ea
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x8320
addq $0x20, %r13
cmpq -0x1c8(%rbp), %r13
leaq -0x178(%rbp), %r15
jne 0x8b94
leaq -0x1d0(%rbp), %rdi
callq 0x9e80
leaq -0x130(%rbp), %rdi
callq 0x9e80
movq -0x138(%rbp), %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9243
jmp 0x9271
jmp 0x9243
jmp 0x9271
jmp 0x9243
jmp 0x9271
jmp 0x9243
jmp 0x9271
movq %rax, %rbx
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x9442
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0x9442
movq %rax, %rbx
jmp 0x9442
jmp 0x9346
jmp 0x9346
jmp 0x9346
jmp 0x9346
jmp 0x92d5
jmp 0x9346
jmp 0x92d5
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x92b7
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0x92b7
movq %rax, %rbx
movq -0x1f0(%rbp), %rdi
leaq -0x1e0(%rbp), %rax
cmpq %rax, %rdi
je 0x9349
movq -0x1e0(%rbp), %rsi
jmp 0x92e9
jmp 0x9346
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x9349
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0x9349
jmp 0x9346
jmp 0x9310
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x9436
movq -0x38(%rbp), %rsi
jmp 0x942e
movq %rax, %rbx
jmp 0x9436
movq %rax, %rbx
jmp 0x9414
movq %rax, %rbx
jmp 0x936b
movq %rax, %rbx
jmp 0x9408
movq %rax, %rbx
jmp 0x93ef
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x9e80
jmp 0x9349
movq %rax, %rbx
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x936b
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x938d
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x93a9
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9414
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0x9414
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x9e22
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x93ef
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x8320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9408
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8320
leaq -0x1b0(%rbp), %rdi
callq 0x9e80
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x9436
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x8320
leaq -0x1d0(%rbp), %rdi
callq 0x9e80
leaq -0x130(%rbp), %rdi
callq 0x9e80
movq -0x138(%rbp), %rdi
callq 0x9eea
movq %rbx, %rdi
callq 0x8600