// File: /workspace/github_c_makefile_star2_O0/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
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x220(%rbp)
movq %rdi, %rax
movq %rax, -0x218(%rbp)
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
callq 0xf250
leaq -0x28(%rbp), %rdi
callq 0xf270
leaq -0x49(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0xd760
movq -0x210(%rbp), %rdx
leaq 0x1f584(%rip), %rsi     # 0x2d004
leaq -0x48(%rbp), %rdi
callq 0xf2c0
jmp 0xda8b
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xf290
jmp 0xda9a
leaq -0x48(%rbp), %rdi
callq 0xd240
leaq -0x49(%rbp), %rdi
callq 0xd430
leaq -0x81(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0xd760
movq -0x228(%rbp), %rdx
leaq 0x1f544(%rip), %rsi     # 0x2d011
leaq -0x80(%rbp), %rdi
callq 0xf2c0
jmp 0xdad8
leaq -0x28(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xf290
jmp 0xdae7
leaq -0x80(%rbp), %rdi
callq 0xd240
leaq -0x81(%rbp), %rdi
callq 0xd430
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0xd760
movq -0x230(%rbp), %rdx
leaq 0x1f4ff(%rip), %rsi     # 0x2d01c
leaq -0xa8(%rbp), %rdi
callq 0xf2c0
jmp 0xdb2b
leaq -0x28(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xf290
jmp 0xdb3d
leaq -0xa8(%rbp), %rdi
callq 0xd240
leaq -0xa9(%rbp), %rdi
callq 0xd430
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0xd760
movq -0x238(%rbp), %rdx
leaq 0x1f4b3(%rip), %rsi     # 0x2d029
leaq -0xd0(%rbp), %rdi
callq 0xf2c0
jmp 0xdb84
leaq -0x28(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xf290
jmp 0xdb96
leaq -0xd0(%rbp), %rdi
callq 0xd240
leaq -0xd1(%rbp), %rdi
callq 0xd430
leaq -0xf9(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0xd760
movq -0x240(%rbp), %rdx
leaq 0x1f465(%rip), %rsi     # 0x2d034
leaq -0xf8(%rbp), %rdi
callq 0xf2c0
jmp 0xdbdd
leaq -0x28(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0xf290
jmp 0xdbef
leaq -0xf8(%rbp), %rdi
callq 0xd240
leaq -0xf9(%rbp), %rdi
callq 0xd430
leaq -0x118(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xdfa0
jmp 0xdc19
leaq -0x118(%rbp), %rdi
callq 0xf370
movq %rax, -0x120(%rbp)
leaq -0x118(%rbp), %rdi
callq 0xf3e0
movq %rax, -0x128(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xf3a0
testb $0x1, %al
jne 0xdc5b
jmp 0xdf2d
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
callq 0xf410
movq %rax, -0x150(%rbp)
leaq -0x150(%rbp), %rdi
callq 0xf450
movq %rax, %rsi
leaq -0x148(%rbp), %rdi
callq 0xd190
jmp 0xdc8d
leaq -0x168(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0xe1b0
jmp 0xdca2
xorl %eax, %eax
movl %eax, %esi
leaq -0x168(%rbp), %rdi
callq 0xf470
movq %rax, %rsi
leaq -0x188(%rbp), %rdi
callq 0xd190
jmp 0xdcc3
leaq -0x168(%rbp), %rdi
movl $0x1, %esi
callq 0xf470
movq %rax, %rsi
leaq -0x1a8(%rbp), %rdi
callq 0xd190
jmp 0xdce5
leaq -0x208(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0xf490
movq -0x248(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0xd050
jmp 0xdd0d
leaq -0x1e8(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0xd050
jmp 0xdd22
leaq -0x1c8(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0xd050
jmp 0xdd37
movq -0x220(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0xf4d0
jmp 0xdd4c
leaq -0x208(%rbp), %rdi
callq 0xf540
leaq -0x1a8(%rbp), %rdi
callq 0xd240
leaq -0x188(%rbp), %rdi
callq 0xd240
leaq -0x168(%rbp), %rdi
callq 0xf580
leaq -0x148(%rbp), %rdi
callq 0xd240
jmp 0xdc2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xddb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xd240
leaq -0x49(%rbp), %rdi
callq 0xd430
jmp 0xdf5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xdde1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xd240
leaq -0x81(%rbp), %rdi
callq 0xd430
jmp 0xdf5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xde18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xd240
leaq -0xa9(%rbp), %rdi
callq 0xd430
jmp 0xdf5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xde4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0xd240
leaq -0xd1(%rbp), %rdi
callq 0xd430
jmp 0xdf5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xde86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0xd240
leaq -0xf9(%rbp), %rdi
callq 0xd430
jmp 0xdf5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xdf5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xdf4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xdf1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xdf13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xdf07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x208(%rbp), %rdi
callq 0xf540
leaq -0x1a8(%rbp), %rdi
callq 0xd240
leaq -0x188(%rbp), %rdi
callq 0xd240
leaq -0x168(%rbp), %rdi
callq 0xf580
leaq -0x148(%rbp), %rdi
callq 0xd240
jmp 0xdf4e
movb $0x1, -0x9(%rbp)
leaq -0x118(%rbp), %rdi
callq 0xf580
leaq -0x28(%rbp), %rdi
callq 0xf580
testb $0x1, -0x9(%rbp)
jne 0xdf7d
jmp 0xdf71
leaq -0x118(%rbp), %rdi
callq 0xf580
leaq -0x28(%rbp), %rdi
callq 0xf580
movq -0x220(%rbp), %rdi
callq 0xf5e0
jmp 0xdf8d
movq -0x220(%rbp), %rdi
callq 0xf5e0
movq -0x218(%rbp), %rax
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0xd750
nopw %cs:(%rax,%rax)