// File: /workspace/github_c_makefile_star2_O2/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 $0x198, %rsp            # imm = 0x198
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x68(%rbp)
andq $0x0, 0x10(%rdi)
movaps %xmm0, -0x60(%rbp)
andq $0x0, -0x50(%rbp)
leaq 0xf7b1(%rip), %rsi      # 0x18020
leaq -0xe8(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x95bc
leaq -0x60(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x9a32
leaq -0xe8(%rbp), %rdi
callq 0x8170
leaq 0xf78b(%rip), %rsi      # 0x1802d
leaq -0xe8(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x95bc
leaq -0x60(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x9a32
leaq -0xe8(%rbp), %rdi
callq 0x8170
leaq 0xf763(%rip), %rsi      # 0x18038
leaq -0xe8(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x95bc
leaq -0x60(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x9a32
leaq -0xe8(%rbp), %rdi
callq 0x8170
leaq 0xf73d(%rip), %rsi      # 0x18045
leaq -0xe8(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x95bc
leaq -0x60(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x9a32
leaq -0xe8(%rbp), %rdi
callq 0x8170
leaq 0xf715(%rip), %rsi      # 0x18050
leaq -0xe8(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x95bc
leaq -0x60(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x9a32
leaq -0xe8(%rbp), %rdi
callq 0x8170
xorps %xmm0, %xmm0
andq $0x0, -0x130(%rbp)
movaps %xmm0, -0x140(%rbp)
movq -0x60(%rbp), %rax
cmpq %rax, -0x58(%rbp)
je 0x8a26
movq (%rax), %rdi
leaq -0xe8(%rbp), %rbx
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8350
movq -0x60(%rbp), %r15
addq $0x20, %r15
pushq $0x20
popq %r14
cmpq -0x58(%rbp), %r15
je 0x89c5
movq (%r15), %rdi
movl %r14d, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8350
addq $0x20, %r15
jmp 0x89a9
xorl %r12d, %r12d
leaq -0x48(%rbp), %rbx
leaq -0x88(%rbp), %r14
leaq -0x140(%rbp), %r15
cmpq %r12, -0xe8(%rbp)
jbe 0x8a11
movq -0xe0(%rbp), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x95bc
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9a32
movq %rbx, %rdi
callq 0x8170
incq %r12
jmp 0x89da
leaq -0xe8(%rbp), %rdi
callq 0x8080
movq -0x140(%rbp), %r14
jmp 0x8a29
xorl %r14d, %r14d
leaq -0xe8(%rbp), %r15
cmpq -0x138(%rbp), %r14
je 0x8e2b
leaq -0x180(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x8450
movq %r12, %rdi
leaq 0xf630(%rip), %rsi      # 0x18089
pushq $-0x1
popq %rdx
callq 0x8580
cmpq $-0x1, %rax
je 0x8a81
incq %rax
movq %r15, %rdi
leaq -0x180(%rbp), %rsi
movq %rax, %rdx
pushq $-0x1
popq %rcx
callq 0x80a0
jmp 0x8a90
movq %r15, %rdi
leaq -0x180(%rbp), %rsi
callq 0x8450
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
andq $0x0, -0x40(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
andq $0x0, -0x80(%rbp)
xorl %eax, %eax
movb %al, -0x38(%rbp)
movb %al, -0x78(%rbp)
movq -0xe8(%rbp), %rdx
leaq -0x120(%rbp), %rdi
leaq 0xf590(%rip), %rsi      # 0x1805a
xorl %eax, %eax
callq 0x8f9c
movq %r15, %rdi
xorl %esi, %esi
pushq $0x6
popq %rdx
leaq 0xf593(%rip), %rcx      # 0x18073
callq 0x8430
testl %eax, %eax
je 0x8b5f
movq %r15, %rdi
xorl %esi, %esi
pushq $0x6
popq %rdx
leaq 0xf582(%rip), %rcx      # 0x1807a
callq 0x8430
testl %eax, %eax
je 0x8c0d
leaq -0x160(%rbp), %r12
movq %r12, %rdi
leaq -0x120(%rbp), %rsi
leaq 0xf564(%rip), %rdx      # 0x18081
callq 0x96c3
movq %r12, %rdi
callq 0x91b3
testb %al, %al
je 0x8b57
leaq -0x1a0(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x952c
leaq -0x88(%rbp), %rdi
movq %rbx, %rsi
callq 0x83e0
movq %rbx, %rdi
callq 0x8170
movq %r12, %rdi
jmp 0x8ca6
leaq -0x1c0(%rbp), %r12
movq %r12, %rdi
leaq -0x120(%rbp), %rsi
callq 0x9159
leaq -0x1a0(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x90f3
leaq -0x160(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x90f3
leaq -0x120(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x83e0
movq %r13, %rdi
callq 0x8170
movq %rbx, %rdi
callq 0x8170
leaq -0x1c0(%rbp), %rdi
callq 0x8170
movq %r12, %rdi
callq 0x91b3
testb %al, %al
je 0x8cab
leaq -0x160(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x91db
leaq -0x48(%rbp), %rdi
movq %rbx, %rsi
callq 0x83e0
movq %rbx, %rdi
callq 0x8170
movq %rbx, %rdi
movq %r12, %rsi
callq 0x93c9
jmp 0x8c94
leaq -0x1a0(%rbp), %rbx
movq %rbx, %rdi
leaq -0x120(%rbp), %rsi
callq 0x9159
leaq -0x160(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x90f3
leaq -0x120(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x83e0
movq %r13, %rdi
callq 0x8170
movq %rbx, %rdi
callq 0x8170
movq %r12, %rdi
callq 0x91b3
testb %al, %al
je 0x8cab
leaq -0x160(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x91db
leaq -0x48(%rbp), %rdi
movq %rbx, %rsi
callq 0x83e0
movq %rbx, %rdi
callq 0x8170
movq %rbx, %rdi
movq %r12, %rsi
callq 0x93c9
leaq -0x88(%rbp), %rdi
movq %rbx, %rsi
callq 0x83e0
movq %rbx, %rdi
callq 0x8170
cmpq $0x0, -0x40(%rbp)
jne 0x8cbe
leaq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x81c0
cmpq $0x0, -0x80(%rbp)
jne 0x8cd8
leaq -0x88(%rbp), %rdi
leaq 0xf3b2(%rip), %rsi      # 0x18085
callq 0x8640
xorps %xmm0, %xmm0
movaps %xmm0, -0x100(%rbp)
andq $0x0, -0xf0(%rbp)
leaq -0x100(%rbp), %rbx
movq %rbx, %rdi
leaq -0x48(%rbp), %rsi
callq 0x96fc
leaq -0x88(%rbp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x96fc
leaq -0x120(%rbp), %rdi
callq 0x8170
movq %r12, %rdi
callq 0x8170
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x8170
movq %r15, %rdi
callq 0x8170
movq -0x100(%rbp), %rsi
movq %rbx, %rdi
callq 0x8450
movq -0x100(%rbp), %rsi
addq $0x20, %rsi
movq %r12, %rdi
callq 0x8450
leaq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
andq $0x0, -0xe0(%rbp)
xorl %ecx, %ecx
movb %cl, -0xd8(%rbp)
leaq -0xb8(%rbp), %rax
movq %rax, -0xc8(%rbp)
andq $0x0, -0xc0(%rbp)
movb %cl, -0xb8(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
andq $0x0, -0xa0(%rbp)
movb %cl, -0x98(%rbp)
movq %r15, %rdi
leaq -0x180(%rbp), %rsi
callq 0x81c0
leaq -0xc8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x81c0
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x81c0
movq -0x68(%rbp), %rdi
movq %r15, %rsi
callq 0x95f8
addq $0x20, %r14
movq %r15, %rdi
callq 0x9634
leaq -0x88(%rbp), %rdi
callq 0x8170
leaq -0x48(%rbp), %rdi
callq 0x8170
leaq -0x100(%rbp), %rdi
callq 0x965e
leaq -0x180(%rbp), %rdi
callq 0x8170
jmp 0x8a30
leaq -0x140(%rbp), %rdi
callq 0x965e
leaq -0x60(%rbp), %rdi
callq 0x965e
movq -0x68(%rbp), %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8e66
jmp 0x8e7a
jmp 0x8e66
jmp 0x8e7a
jmp 0x8e66
jmp 0x8e7a
jmp 0x8e66
jmp 0x8e7a
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x8170
jmp 0x8f82
movq %rax, %rbx
jmp 0x8f82
jmp 0x8f08
jmp 0x8f08
jmp 0x8f08
jmp 0x8f08
movq %rax, %rbx
leaq -0x160(%rbp), %rdi
jmp 0x8ec2
jmp 0x8f08
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
jmp 0x8ec2
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x8170
jmp 0x8ebb
movq %rax, %rbx
leaq -0x1c0(%rbp), %rdi
callq 0x8170
jmp 0x8f0b
jmp 0x8f08
jmp 0x8f08
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
jmp 0x8f71
jmp 0x8ee0
movq %rax, %rbx
jmp 0x8f17
movq %rax, %rbx
jmp 0x8f76
movq %rax, %rbx
jmp 0x8f5e
movq %rax, %rbx
jmp 0x8f55
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x965e
jmp 0x8f0b
movq %rax, %rbx
jmp 0x8f6a
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x8170
leaq -0x88(%rbp), %rdi
callq 0x8170
leaq -0x48(%rbp), %rdi
callq 0x8170
leaq -0xe8(%rbp), %rdi
callq 0x8170
jmp 0x8f6a
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x9634
leaq -0x88(%rbp), %rdi
callq 0x8170
leaq -0x48(%rbp), %rdi
callq 0x8170
leaq -0x100(%rbp), %rdi
callq 0x965e
leaq -0x180(%rbp), %rdi
callq 0x8170
leaq -0x140(%rbp), %rdi
callq 0x965e
leaq -0x60(%rbp), %rdi
callq 0x965e
movq -0x68(%rbp), %rdi
callq 0x968a
movq %rbx, %rdi
callq 0x85c0