// File: /workspace/github_cpp_makefile_star2_O1/p-ranav[P]video_device_discovery/src/helpers.cpp
// Function: get_video_device_files[abi:cxx11]()
std::vector<fs::path> get_video_device_files() {
  std::vector<fs::path> result; 
  auto root = fs::path("/sys/class/video4linux");
  for(auto& p: fs::directory_iterator(root)) {
    if (fs::is_symlink(p)) {
      auto absolute_path = fs::read_symlink(p);
      if (absolute_path.is_relative()) {
	absolute_path = fs::canonical(root / absolute_path);
      }
      if (string_contains(absolute_path.filename().string(), std::string{"video"}))
	result.push_back(fs::path{"/dev"} / absolute_path.filename());
    }
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
movq $0x0, 0x10(%rdi)
leaq 0x134ae(%rip), %rsi     # 0x1fd34
leaq -0x1b0(%rbp), %rdi
callq 0xce6e
leaq -0x50(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x10e60
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
testq %rcx, %rcx
je 0xc8c8
movq 0x1a6f6(%rip), %rdx     # 0x26fb0
cmpb $0x0, (%rdx)
je 0xc8c4
incl 0x8(%rcx)
jmp 0xc8c8
lock
incl 0x8(%rcx)
movq %rax, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xc8f8
movq 0x1a6d0(%rip), %rax     # 0x26fb0
cmpb $0x0, (%rax)
je 0xc8ea
incl 0x8(%rdi)
jmp 0xc8ee
lock
incl 0x8(%rdi)
testq %rdi, %rdi
je 0xc8f8
callq 0xcf32
leaq -0x40(%rbp), %r13
leaq -0x110(%rbp), %r15
leaq -0x170(%rbp), %r12
leaq -0xd0(%rbp), %rbx
cmpq $0x0, -0x38(%rbp)
je 0xcc0f
movq %r13, %rdi
callq 0xe630
movq %rax, %r14
movq %rax, %rdi
callq 0x15220
cmpb $0x3, %al
jne 0xcc02
movq %r15, %rdi
movq %r14, %rsi
callq 0x14f60
movq %r15, %rdi
callq 0x1b920
testb %al, %al
jne 0xca27
movq %r12, %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x81cc
movq %r12, %rdi
movq %r15, %rsi
callq 0xcf9e
leaq -0x90(%rbp), %r14
movq %r14, %rdi
callq 0x12d30
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1b3e0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x43e0
xorps %xmm0, %xmm0
movaps %xmm0, -0x130(%rbp)
movups -0xf0(%rbp), %xmm0
movq -0xe0(%rbp), %rax
movups -0xb0(%rbp), %xmm1
movups %xmm1, -0xf0(%rbp)
movq -0xa0(%rbp), %rcx
movq %rcx, -0xe0(%rbp)
movaps -0x130(%rbp), %xmm1
movaps %xmm0, -0x130(%rbp)
movq %rax, -0x120(%rbp)
movups %xmm1, -0xb0(%rbp)
movq $0x0, -0xa0(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x6948
movb -0x98(%rbp), %al
movb %al, -0xd8(%rbp)
movq %rbx, %rdi
callq 0x8694
movq %rbx, %rdi
callq 0x6998
movq %r14, %rdi
callq 0x6998
movq %r12, %rdi
callq 0x6998
cmpq $0x0, -0x108(%rbp)
je 0xca44
movb -0xd8(%rbp), %al
testb %al, %al
jne 0xca71
movq -0xe8(%rbp), %rcx
jmp 0xca73
leaq -0xc0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq $0x0, -0xc8(%rbp)
movb $0x0, -0xc0(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x19(%rax)
movups %xmm0, 0x10(%rax)
jmp 0xca89
xorl %ecx, %ecx
leaq -0x48(%rcx), %rsi
testb %al, %al
cmovneq %rcx, %rsi
cmovneq %r15, %rsi
movq %rbx, %rdi
callq 0x81cc
movq %r13, %r15
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x160(%rbp), %rax
movq %rax, -0x170(%rbp)
movq %r12, %rdi
callq 0x68ca
leaq -0x80(%rbp), %r13
movq %r13, -0x90(%rbp)
leaq -0x90(%rbp), %rdi
leaq 0x12599(%rip), %rsi     # 0x1f065
leaq 0x12597(%rip), %rdx     # 0x1f06a
callq 0x7ada
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rcx
movq %r12, %rdi
xorl %edx, %edx
callq 0x45a0
movq %rax, %r14
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0xcb0b
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x4360
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
movq %r15, %r13
je 0xcb30
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x4360
movq %rbx, %rdi
callq 0x6998
cmpq $-0x1, %r14
leaq -0x110(%rbp), %r15
je 0xcbfa
movq %r12, %rdi
leaq 0x131f8(%rip), %rsi     # 0x1fd4b
callq 0xced0
cmpq $0x0, -0x108(%rbp)
je 0xcb75
movb -0xd8(%rbp), %al
testb %al, %al
jne 0xcb9c
movq -0xe8(%rbp), %rcx
jmp 0xcb9e
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x0, -0x88(%rbp)
movb $0x0, -0x80(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x19(%rax)
movups %xmm0, 0x10(%rax)
jmp 0xcbb8
xorl %ecx, %ecx
leaq -0x48(%rcx), %rsi
testb %al, %al
cmovneq %rcx, %rsi
cmovneq %r15, %rsi
leaq -0x90(%rbp), %rdi
callq 0x81cc
movq %rbx, %rdi
movq %r12, %rsi
callq 0x81cc
movq %rbx, %rdi
leaq -0x90(%rbp), %rsi
callq 0xcf9e
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0xcffa
movq %rbx, %rdi
callq 0x6998
leaq -0x90(%rbp), %rdi
callq 0x6998
movq %r12, %rdi
callq 0x6998
movq %r15, %rdi
callq 0x6998
movq %r13, %rdi
callq 0xfbc0
jmp 0xc911
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xcc1d
callq 0xcf32
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xcc2b
callq 0xcf32
leaq -0x1b0(%rbp), %rdi
callq 0x6998
movq -0x30(%rbp), %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xcd05
movq %rax, %rbx
jmp 0xcd11
jmp 0xcc63
jmp 0xcc7d
jmp 0xcc63
movq %rax, %rbx
jmp 0xcc8c
jmp 0xccc0
jmp 0xcc6c
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x6998
jmp 0xcc80
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x6998
leaq -0x170(%rbp), %rdi
jmp 0xcccf
jmp 0xccc0
jmp 0xccc0
movq %rax, %rbx
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0xccc8
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x4360
jmp 0xccc8
movq %rax, %rbx
jmp 0xccd4
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x6998
leaq -0x110(%rbp), %rdi
callq 0x6998
jmp 0xcce9
jmp 0xcce6
jmp 0xcce6
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xccf7
callq 0xcf32
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xcd05
callq 0xcf32
leaq -0x1b0(%rbp), %rdi
callq 0x6998
movq -0x30(%rbp), %rdi
callq 0x7520
movq %rbx, %rdi
callq 0x45b0