// File: /workspace/github_cpp_makefile_star2_O3/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, -0x40(%rbp)
movq $0x0, 0x10(%rdi)
leaq 0x14275(%rip), %rsi     # 0x20d34
leaq -0x1a8(%rbp), %rdi
callq 0xd086
leaq -0x50(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x11080
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xcb05
movq 0x1b4bd(%rip), %rax     # 0x27fb0
cmpb $0x0, (%rax)
je 0xcb13
incl 0x8(%rdi)
movq %rcx, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
jmp 0xcb2b
movq %rcx, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
jmp 0xcb3e
lock
incl 0x8(%rdi)
movq %rcx, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
movq -0x48(%rbp), %rcx
movq %rcx, %rdi
testq %rcx, %rcx
je 0xcb3e
cmpb $0x0, (%rax)
je 0xcb35
incl 0x8(%rdi)
jmp 0xcb39
lock
incl 0x8(%rdi)
callq 0xd14a
leaq -0x38(%rbp), %r13
leaq -0x110(%rbp), %r15
leaq -0x150(%rbp), %r12
leaq -0xd0(%rbp), %rbx
cmpq $0x0, -0x30(%rbp)
je 0xce35
movq %r13, %rdi
callq 0xe850
movq %rax, %r14
movq %rax, %rdi
callq 0x15440
cmpb $0x3, %al
jne 0xce28
movq %r15, %rdi
movq %r14, %rsi
callq 0x15180
movq %r15, %rdi
callq 0x1bb40
testb %al, %al
jne 0xcc5f
movq %r12, %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x8206
movq %r12, %rdi
movq %r15, %rsi
callq 0xd1b6
leaq -0x90(%rbp), %r14
movq %r14, %rdi
callq 0x12f50
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1b600
movq %r15, %rdi
movq %rbx, %rsi
callq 0x43e0
movups -0xf0(%rbp), %xmm0
movq -0xe0(%rbp), %rax
movups -0xb0(%rbp), %xmm1
movups %xmm1, -0xf0(%rbp)
movq -0xa0(%rbp), %rcx
movq %rcx, -0xe0(%rbp)
movups %xmm0, -0x168(%rbp)
movq %rax, -0x158(%rbp)
leaq -0xb0(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq -0x168(%rbp), %rdi
callq 0x6950
movb -0x98(%rbp), %al
movb %al, -0xd8(%rbp)
movq %rbx, %rdi
callq 0x86ce
movq %rbx, %rdi
callq 0x69a6
movq %r14, %rdi
callq 0x69a6
movq %r12, %rdi
callq 0x69a6
cmpq $0x0, -0x108(%rbp)
je 0xcc97
movq -0xe8(%rbp), %rsi
addq $-0x48, %rsi
cmpb $0x0, -0xd8(%rbp)
cmovneq %r15, %rsi
movq %rbx, %rdi
callq 0x8206
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
jmp 0xccca
leaq -0xc0(%rbp), %rsi
movq %rsi, -0xd0(%rbp)
movq $0x0, -0xc8(%rbp)
movb $0x0, -0xc0(%rbp)
leaq -0xb0(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%rax)
movups %xmm0, (%rax)
xorl %edx, %edx
movq %r13, %r15
addq %rsi, %rdx
leaq -0x140(%rbp), %rax
movq %rax, -0x150(%rbp)
movq %r12, %rdi
callq 0x68ce
leaq -0x80(%rbp), %r13
movq %r13, -0x90(%rbp)
leaq -0x90(%rbp), %rdi
leaq 0x13366(%rip), %rsi     # 0x20065
leaq 0x13364(%rip), %rdx     # 0x2006a
callq 0x7b08
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 0xcd3e
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x4360
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
movq %r15, %r13
je 0xcd63
movq -0x140(%rbp), %rsi
incq %rsi
callq 0x4360
movq %rbx, %rdi
callq 0x69a6
cmpq $-0x1, %r14
leaq -0x110(%rbp), %r15
je 0xce20
movq %r12, %rdi
leaq 0x13fc5(%rip), %rsi     # 0x20d4b
callq 0xd0e8
cmpq $0x0, -0x108(%rbp)
je 0xcdb9
movq -0xe8(%rbp), %rsi
addq $-0x48, %rsi
cmpb $0x0, -0xd8(%rbp)
cmovneq %r15, %rsi
leaq -0x90(%rbp), %rdi
callq 0x8206
jmp 0xcdde
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)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8206
movq %rbx, %rdi
leaq -0x90(%rbp), %rsi
callq 0xd1b6
movq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0xd212
movq %rbx, %rdi
callq 0x69a6
leaq -0x90(%rbp), %rdi
callq 0x69a6
movq %r12, %rdi
callq 0x69a6
movq %r15, %rdi
callq 0x69a6
movq %r13, %rdi
callq 0xfde0
jmp 0xcb57
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xce43
callq 0xd14a
leaq -0x1a8(%rbp), %rdi
callq 0x69a6
movq -0x40(%rbp), %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xcf1d
movq %rax, %rbx
jmp 0xcf29
jmp 0xce7b
jmp 0xce95
jmp 0xce7b
movq %rax, %rbx
jmp 0xcea4
jmp 0xced8
jmp 0xce84
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x69a6
jmp 0xce98
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x69a6
leaq -0x150(%rbp), %rdi
jmp 0xcee7
jmp 0xced8
jmp 0xced8
movq %rax, %rbx
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0xcee0
movq -0x140(%rbp), %rsi
incq %rsi
callq 0x4360
jmp 0xcee0
movq %rax, %rbx
jmp 0xceec
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x69a6
leaq -0x110(%rbp), %rdi
callq 0x69a6
jmp 0xcf01
jmp 0xcefe
jmp 0xcefe
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0xcf0f
callq 0xd14a
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0xcf1d
callq 0xd14a
leaq -0x1a8(%rbp), %rdi
callq 0x69a6
movq -0x40(%rbp), %rdi
callq 0x7532
movq %rbx, %rdi
callq 0x45b0