#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct v4l2_capability {
  char *driver;
  char *card;
  char *bus_info;
  int capabilities;
};

/* Variables and functions */
int V4L2_CAP_ASYNCIO;
int V4L2_CAP_AUDIO;
int V4L2_CAP_HW_FREQ_SEEK;
int V4L2_CAP_MODULATOR;
int V4L2_CAP_RADIO;
int V4L2_CAP_RDS_CAPTURE;
int V4L2_CAP_RDS_OUTPUT;
int V4L2_CAP_READWRITE;
int V4L2_CAP_SLICED_VBI_CAPTURE;
int V4L2_CAP_SLICED_VBI_OUTPUT;
int V4L2_CAP_STREAMING;
int V4L2_CAP_TUNER;
int V4L2_CAP_VBI_CAPTURE;
int V4L2_CAP_VBI_OUTPUT;
int V4L2_CAP_VIDEO_CAPTURE;
int V4L2_CAP_VIDEO_OUTPUT;
int V4L2_CAP_VIDEO_OUTPUT_OVERLAY;
int V4L2_CAP_VIDEO_OVERLAY;
int /*<<< orphan*/ VIDIOC_QUERYCAP;
int ioctl(int, int /*<<< orphan*/, struct v4l2_capability *);
int /*<<< orphan*/ memset(struct v4l2_capability *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
void show_device_capabilities(int fd) {
  struct v4l2_capability cap;
  memset(&cap, 0, sizeof(struct v4l2_capability));
  printf("Device capabilities:\n");
  if (ioctl(fd, VIDIOC_QUERYCAP, &cap) != -1) {
    printf("  driver: %s\n", cap.driver);
    printf("  card: %s\n", cap.card);
    printf("  bus_info: %s\n", cap.bus_info);
    printf("  capabilities:\n");
    if ((cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == V4L2_CAP_VIDEO_CAPTURE)
      printf("  - %s\n", "V4L2_CAP_VIDEO_CAPTURE");
    ;
    if ((cap.capabilities & V4L2_CAP_VIDEO_OUTPUT) == V4L2_CAP_VIDEO_OUTPUT)
      printf("  - %s\n", "V4L2_CAP_VIDEO_OUTPUT");
    ;
    if ((cap.capabilities & V4L2_CAP_VIDEO_OVERLAY) == V4L2_CAP_VIDEO_OVERLAY)
      printf("  - %s\n", "V4L2_CAP_VIDEO_OVERLAY");
    ;
    if ((cap.capabilities & V4L2_CAP_VBI_CAPTURE) == V4L2_CAP_VBI_CAPTURE)
      printf("  - %s\n", "V4L2_CAP_VBI_CAPTURE");
    ;
    if ((cap.capabilities & V4L2_CAP_VBI_OUTPUT) == V4L2_CAP_VBI_OUTPUT)
      printf("  - %s\n", "V4L2_CAP_VBI_OUTPUT");
    ;
    if ((cap.capabilities & V4L2_CAP_SLICED_VBI_CAPTURE) ==
        V4L2_CAP_SLICED_VBI_CAPTURE)
      printf("  - %s\n", "V4L2_CAP_SLICED_VBI_CAPTURE");
    ;
    if ((cap.capabilities & V4L2_CAP_SLICED_VBI_OUTPUT) ==
        V4L2_CAP_SLICED_VBI_OUTPUT)
      printf("  - %s\n", "V4L2_CAP_SLICED_VBI_OUTPUT");
    ;
    if ((cap.capabilities & V4L2_CAP_RDS_CAPTURE) == V4L2_CAP_RDS_CAPTURE)
      printf("  - %s\n", "V4L2_CAP_RDS_CAPTURE");
    ;
    if ((cap.capabilities & V4L2_CAP_VIDEO_OUTPUT_OVERLAY) ==
        V4L2_CAP_VIDEO_OUTPUT_OVERLAY)
      printf("  - %s\n", "V4L2_CAP_VIDEO_OUTPUT_OVERLAY");
    ;
    if ((cap.capabilities & V4L2_CAP_HW_FREQ_SEEK) == V4L2_CAP_HW_FREQ_SEEK)
      printf("  - %s\n", "V4L2_CAP_HW_FREQ_SEEK");
    ;
    if ((cap.capabilities & V4L2_CAP_RDS_OUTPUT) == V4L2_CAP_RDS_OUTPUT)
      printf("  - %s\n", "V4L2_CAP_RDS_OUTPUT");
    ;
    if ((cap.capabilities & V4L2_CAP_TUNER) == V4L2_CAP_TUNER)
      printf("  - %s\n", "V4L2_CAP_TUNER");
    ;
    if ((cap.capabilities & V4L2_CAP_AUDIO) == V4L2_CAP_AUDIO)
      printf("  - %s\n", "V4L2_CAP_AUDIO");
    ;
    if ((cap.capabilities & V4L2_CAP_RADIO) == V4L2_CAP_RADIO)
      printf("  - %s\n", "V4L2_CAP_RADIO");
    ;
    if ((cap.capabilities & V4L2_CAP_MODULATOR) == V4L2_CAP_MODULATOR)
      printf("  - %s\n", "V4L2_CAP_MODULATOR");
    ;
    if ((cap.capabilities & V4L2_CAP_READWRITE) == V4L2_CAP_READWRITE)
      printf("  - %s\n", "V4L2_CAP_READWRITE");
    ;
    if ((cap.capabilities & V4L2_CAP_ASYNCIO) == V4L2_CAP_ASYNCIO)
      printf("  - %s\n", "V4L2_CAP_ASYNCIO");
    ;
    if ((cap.capabilities & V4L2_CAP_STREAMING) == V4L2_CAP_STREAMING)
      printf("  - %s\n", "V4L2_CAP_STREAMING");
    ;
  } else {
    perror("  ioctl() VIDIOC_QUERYCAP");
  }
}


x86 assembly (clang, -O0):
<show_device_capabilities>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2ddd(%rip),%rax
mov    (%rax),%esi
lea    -0x28(%rbp),%rdx
call   1050 <ioctl@plt>
cmp    $0xffffffff,%eax
je     1530 <show_device_capabilities+0x3f0>
mov    -0x28(%rbp),%rsi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2df3(%rip),%rcx
and    (%rcx),%eax
mov    0x2dea(%rip),%rcx
cmp    (%rcx),%eax
jne    11fb <show_device_capabilities+0xbb>
lea    0xe64(%rip),%rdi
lea    0xe65(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2dbb(%rip),%rcx
and    (%rcx),%eax
mov    0x2db2(%rip),%rcx
cmp    (%rcx),%eax
jne    122b <show_device_capabilities+0xeb>
lea    0xe34(%rip),%rdi
lea    0xe4c(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2d3b(%rip),%rcx
and    (%rcx),%eax
mov    0x2d32(%rip),%rcx
cmp    (%rcx),%eax
jne    125b <show_device_capabilities+0x11b>
lea    0xe04(%rip),%rdi
lea    0xe32(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2d8b(%rip),%rcx
and    (%rcx),%eax
mov    0x2d82(%rip),%rcx
cmp    (%rcx),%eax
jne    128b <show_device_capabilities+0x14b>
lea    0xdd4(%rip),%rdi
lea    0xe19(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2ce3(%rip),%rcx
and    (%rcx),%eax
mov    0x2cda(%rip),%rcx
cmp    (%rcx),%eax
jne    12bb <show_device_capabilities+0x17b>
lea    0xda4(%rip),%rdi
lea    0xdfe(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2cbb(%rip),%rcx
and    (%rcx),%eax
mov    0x2cb2(%rip),%rcx
cmp    (%rcx),%eax
jne    12eb <show_device_capabilities+0x1ab>
lea    0xd74(%rip),%rdi
lea    0xde2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2c9b(%rip),%rcx
and    (%rcx),%eax
mov    0x2c92(%rip),%rcx
cmp    (%rcx),%eax
jne    131b <show_device_capabilities+0x1db>
lea    0xd44(%rip),%rdi
lea    0xdce(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2c73(%rip),%rcx
and    (%rcx),%eax
mov    0x2c6a(%rip),%rcx
cmp    (%rcx),%eax
jne    134b <show_device_capabilities+0x20b>
lea    0xd14(%rip),%rdi
lea    0xdb9(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2bf3(%rip),%rcx
and    (%rcx),%eax
mov    0x2bea(%rip),%rcx
cmp    (%rcx),%eax
jne    137b <show_device_capabilities+0x23b>
lea    0xce4(%rip),%rdi
lea    0xd9e(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2c4b(%rip),%rcx
and    (%rcx),%eax
mov    0x2c42(%rip),%rcx
cmp    (%rcx),%eax
jne    13ab <show_device_capabilities+0x26b>
lea    0xcb4(%rip),%rdi
lea    0xd8c(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2bab(%rip),%rcx
and    (%rcx),%eax
mov    0x2ba2(%rip),%rcx
cmp    (%rcx),%eax
jne    13db <show_device_capabilities+0x29b>
lea    0xc84(%rip),%rdi
lea    0xd72(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2bd3(%rip),%rcx
and    (%rcx),%eax
mov    0x2bca(%rip),%rcx
cmp    (%rcx),%eax
jne    140b <show_device_capabilities+0x2cb>
lea    0xc54(%rip),%rdi
lea    0xd56(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2b53(%rip),%rcx
and    (%rcx),%eax
mov    0x2b4a(%rip),%rcx
cmp    (%rcx),%eax
jne    143b <show_device_capabilities+0x2fb>
lea    0xc24(%rip),%rdi
lea    0xd35(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2b93(%rip),%rcx
and    (%rcx),%eax
mov    0x2b8a(%rip),%rcx
cmp    (%rcx),%eax
jne    146b <show_device_capabilities+0x32b>
lea    0xbf4(%rip),%rdi
lea    0xd14(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2b13(%rip),%rcx
and    (%rcx),%eax
mov    0x2b0a(%rip),%rcx
cmp    (%rcx),%eax
jne    149b <show_device_capabilities+0x35b>
lea    0xbc4(%rip),%rdi
lea    0xcf3(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2b3b(%rip),%rcx
and    (%rcx),%eax
mov    0x2b32(%rip),%rcx
cmp    (%rcx),%eax
jne    14cb <show_device_capabilities+0x38b>
lea    0xb94(%rip),%rdi
lea    0xcd6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2ad3(%rip),%rcx
and    (%rcx),%eax
mov    0x2aca(%rip),%rcx
cmp    (%rcx),%eax
jne    14fb <show_device_capabilities+0x3bb>
lea    0xb64(%rip),%rdi
lea    0xcb9(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    0x2aab(%rip),%rcx
and    (%rcx),%eax
mov    0x2aa2(%rip),%rcx
cmp    (%rcx),%eax
jne    152b <show_device_capabilities+0x3eb>
lea    0xb34(%rip),%rdi
lea    0xc9a(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    153c <show_device_capabilities+0x3fc>
lea    0xc9a(%rip),%rdi
call   1060 <perror@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_device_capabilities>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %edi,%ebx
lea    0x8(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1050 <memset@plt>
lea    0x1050(%rip),%rdi
call   1030 <puts@plt>
mov    0x2dd0(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    %r14,%rdx
call   1060 <ioctl@plt>
cmp    $0xffffffff,%eax
je     14b0 <show_device_capabilities+0x360>
mov    0x8(%rsp),%rsi
lea    0xe5f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%rsi
lea    0xe5a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%rsi
lea    0xe53(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1004(%rip),%rdi
call   1030 <puts@plt>
mov    0x20(%rsp),%eax
mov    0x2de3(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    1206 <show_device_capabilities+0xb6>
lea    0xe36(%rip),%rdi
lea    0xe37(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2db3(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    122e <show_device_capabilities+0xde>
lea    0xe0e(%rip),%rdi
lea    0xe26(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2d3b(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    1256 <show_device_capabilities+0x106>
lea    0xde6(%rip),%rdi
lea    0xe14(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2d93(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    127e <show_device_capabilities+0x12e>
lea    0xdbe(%rip),%rdi
lea    0xe03(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2cf3(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    12a6 <show_device_capabilities+0x156>
lea    0xd96(%rip),%rdi
lea    0xdf0(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2cd3(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    12ce <show_device_capabilities+0x17e>
lea    0xd6e(%rip),%rdi
lea    0xddc(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2cbb(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    12f6 <show_device_capabilities+0x1a6>
lea    0xd46(%rip),%rdi
lea    0xdd0(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2c9b(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    131e <show_device_capabilities+0x1ce>
lea    0xd1e(%rip),%rdi
lea    0xdc3(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2c23(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    1346 <show_device_capabilities+0x1f6>
lea    0xcf6(%rip),%rdi
lea    0xdb0(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2c83(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    136e <show_device_capabilities+0x21e>
lea    0xcce(%rip),%rdi
lea    0xda6(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2beb(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    1396 <show_device_capabilities+0x246>
lea    0xca6(%rip),%rdi
lea    0xd94(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2c1b(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    13be <show_device_capabilities+0x26e>
lea    0xc7e(%rip),%rdi
lea    0xd80(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2ba3(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    13e6 <show_device_capabilities+0x296>
lea    0xc56(%rip),%rdi
lea    0xd67(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2beb(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    140e <show_device_capabilities+0x2be>
lea    0xc2e(%rip),%rdi
lea    0xd4e(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2b73(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    1436 <show_device_capabilities+0x2e6>
lea    0xc06(%rip),%rdi
lea    0xd35(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2ba3(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    145e <show_device_capabilities+0x30e>
lea    0xbde(%rip),%rdi
lea    0xd20(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2b43(%rip),%rcx
mov    %eax,%edx
not    %edx
test   %edx,(%rcx)
jne    1486 <show_device_capabilities+0x336>
lea    0xbb6(%rip),%rdi
lea    0xd0b(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%eax
mov    0x2b23(%rip),%rcx
not    %eax
test   %eax,(%rcx)
jne    14a8 <show_device_capabilities+0x358>
lea    0xb90(%rip),%rdi
lea    0xcf6(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret
lea    0xcf3(%rip),%rdi
call   1070 <perror@plt>
jmp    14a8 <show_device_capabilities+0x358>

LLVM IR (-O0):
%struct.v4l2_capability = type { i8*, i8*, i8*, i32 }
@.str = [22 x i8] c"Device capabilities:\0A\00"
@VIDIOC_QUERYCAP = global i32 0
@.str.1 = [14 x i8] c" driver: %s\0A\00"
@.str.2 = [12 x i8] c" card: %s\0A\00"
@.str.3 = [16 x i8] c" bus_info: %s\0A\00"
@.str.4 = [17 x i8] c" capabilities:\0A\00"
@V4L2_CAP_VIDEO_CAPTURE = global i32 0
@.str.5 = [8 x i8] c" - %s\0A\00"
@.str.6 = [23 x i8] c"V4L2_CAP_VIDEO_CAPTURE\00"
@V4L2_CAP_VIDEO_OUTPUT = global i32 0
@.str.7 = [22 x i8] c"V4L2_CAP_VIDEO_OUTPUT\00"
@V4L2_CAP_VIDEO_OVERLAY = global i32 0
@.str.8 = [23 x i8] c"V4L2_CAP_VIDEO_OVERLAY\00"
@V4L2_CAP_VBI_CAPTURE = global i32 0
@.str.9 = [21 x i8] c"V4L2_CAP_VBI_CAPTURE\00"
@V4L2_CAP_VBI_OUTPUT = global i32 0
@.str.10 = [20 x i8] c"V4L2_CAP_VBI_OUTPUT\00"
@V4L2_CAP_SLICED_VBI_CAPTURE = global i32 0
@.str.11 = [28 x i8] c"V4L2_CAP_SLICED_VBI_CAPTURE\00"
@V4L2_CAP_SLICED_VBI_OUTPUT = global i32 0
@.str.12 = [27 x i8] c"V4L2_CAP_SLICED_VBI_OUTPUT\00"
@V4L2_CAP_RDS_CAPTURE = global i32 0
@.str.13 = [21 x i8] c"V4L2_CAP_RDS_CAPTURE\00"
@V4L2_CAP_VIDEO_OUTPUT_OVERLAY = global i32 0
@.str.14 = [30 x i8] c"V4L2_CAP_VIDEO_OUTPUT_OVERLAY\00"
@V4L2_CAP_HW_FREQ_SEEK = global i32 0
@.str.15 = [22 x i8] c"V4L2_CAP_HW_FREQ_SEEK\00"
@V4L2_CAP_RDS_OUTPUT = global i32 0
@.str.16 = [20 x i8] c"V4L2_CAP_RDS_OUTPUT\00"
@V4L2_CAP_TUNER = global i32 0
@.str.17 = [15 x i8] c"V4L2_CAP_TUNER\00"
@V4L2_CAP_AUDIO = global i32 0
@.str.18 = [15 x i8] c"V4L2_CAP_AUDIO\00"
@V4L2_CAP_RADIO = global i32 0
@.str.19 = [15 x i8] c"V4L2_CAP_RADIO\00"
@V4L2_CAP_MODULATOR = global i32 0
@.str.20 = [19 x i8] c"V4L2_CAP_MODULATOR\00"
@V4L2_CAP_READWRITE = global i32 0
@.str.21 = [19 x i8] c"V4L2_CAP_READWRITE\00"
@V4L2_CAP_ASYNCIO = global i32 0
@.str.22 = [17 x i8] c"V4L2_CAP_ASYNCIO\00"
@V4L2_CAP_STREAMING = global i32 0
@.str.23 = [19 x i8] c"V4L2_CAP_STREAMING\00"
@.str.24 = [26 x i8] c" ioctl() VIDIOC_QUERYCAP\00"
define void @show_device_capabilities(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.v4l2_capability
store i32 %0, i32* %2
%4 = call i32 @memset(%struct.v4l2_capability* %3, i32 0, i32 32)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = load i32, i32* @VIDIOC_QUERYCAP
%8 = call i32 @ioctl(i32 %6, i32 %7, %struct.v4l2_capability* %3)
%9 = icmp ne i32 %8, -1
br i1 %9, label %10, label %183
10: ; preds = %1
%11 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 0
%12 = load i8*, i8** %11
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 1
%15 = load i8*, i8** %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 2
%18 = load i8*, i8** %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %18)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%21 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%22 = load i32, i32* %21
%23 = load i32, i32* @V4L2_CAP_VIDEO_CAPTURE
%24 = and i32 %22, %23
%25 = load i32, i32* @V4L2_CAP_VIDEO_CAPTURE
%26 = icmp eq i32 %24, %25
br i1 %26, label %27, label %29
27: ; preds = %10
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
br label %29
29: ; preds = %27, %10
%30 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%31 = load i32, i32* %30
%32 = load i32, i32* @V4L2_CAP_VIDEO_OUTPUT
%33 = and i32 %31, %32
%34 = load i32, i32* @V4L2_CAP_VIDEO_OUTPUT
%35 = icmp eq i32 %33, %34
br i1 %35, label %36, label %38
36: ; preds = %29
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
br label %38
38: ; preds = %36, %29
%39 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%40 = load i32, i32* %39
%41 = load i32, i32* @V4L2_CAP_VIDEO_OVERLAY
%42 = and i32 %40, %41
%43 = load i32, i32* @V4L2_CAP_VIDEO_OVERLAY
%44 = icmp eq i32 %42, %43
br i1 %44, label %45, label %47
45: ; preds = %38
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
br label %47
47: ; preds = %45, %38
%48 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%49 = load i32, i32* %48
%50 = load i32, i32* @V4L2_CAP_VBI_CAPTURE
%51 = and i32 %49, %50
%52 = load i32, i32* @V4L2_CAP_VBI_CAPTURE
%53 = icmp eq i32 %51, %52
br i1 %53, label %54, label %56
54: ; preds = %47
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
br label %56
56: ; preds = %54, %47
%57 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%58 = load i32, i32* %57
%59 = load i32, i32* @V4L2_CAP_VBI_OUTPUT
%60 = and i32 %58, %59
%61 = load i32, i32* @V4L2_CAP_VBI_OUTPUT
%62 = icmp eq i32 %60, %61
br i1 %62, label %63, label %65
63: ; preds = %56
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
br label %65
65: ; preds = %63, %56
%66 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%67 = load i32, i32* %66
%68 = load i32, i32* @V4L2_CAP_SLICED_VBI_CAPTURE
%69 = and i32 %67, %68
%70 = load i32, i32* @V4L2_CAP_SLICED_VBI_CAPTURE
%71 = icmp eq i32 %69, %70
br i1 %71, label %72, label %74
72: ; preds = %65
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
br label %74
74: ; preds = %72, %65
%75 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%76 = load i32, i32* %75
%77 = load i32, i32* @V4L2_CAP_SLICED_VBI_OUTPUT
%78 = and i32 %76, %77
%79 = load i32, i32* @V4L2_CAP_SLICED_VBI_OUTPUT
%80 = icmp eq i32 %78, %79
br i1 %80, label %81, label %83
81: ; preds = %74
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
br label %83
83: ; preds = %81, %74
%84 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%85 = load i32, i32* %84
%86 = load i32, i32* @V4L2_CAP_RDS_CAPTURE
%87 = and i32 %85, %86
%88 = load i32, i32* @V4L2_CAP_RDS_CAPTURE
%89 = icmp eq i32 %87, %88
br i1 %89, label %90, label %92
90: ; preds = %83
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
br label %92
92: ; preds = %90, %83
%93 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%94 = load i32, i32* %93
%95 = load i32, i32* @V4L2_CAP_VIDEO_OUTPUT_OVERLAY
%96 = and i32 %94, %95
%97 = load i32, i32* @V4L2_CAP_VIDEO_OUTPUT_OVERLAY
%98 = icmp eq i32 %96, %97
br i1 %98, label %99, label %101
99: ; preds = %92
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0))
br label %101
101: ; preds = %99, %92
%102 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%103 = load i32, i32* %102
%104 = load i32, i32* @V4L2_CAP_HW_FREQ_SEEK
%105 = and i32 %103, %104
%106 = load i32, i32* @V4L2_CAP_HW_FREQ_SEEK
%107 = icmp eq i32 %105, %106
br i1 %107, label %108, label %110
108: ; preds = %101
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0))
br label %110
110: ; preds = %108, %101
%111 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%112 = load i32, i32* %111
%113 = load i32, i32* @V4L2_CAP_RDS_OUTPUT
%114 = and i32 %112, %113
%115 = load i32, i32* @V4L2_CAP_RDS_OUTPUT
%116 = icmp eq i32 %114, %115
br i1 %116, label %117, label %119
117: ; preds = %110
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0))
br label %119
119: ; preds = %117, %110
%120 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%121 = load i32, i32* %120
%122 = load i32, i32* @V4L2_CAP_TUNER
%123 = and i32 %121, %122
%124 = load i32, i32* @V4L2_CAP_TUNER
%125 = icmp eq i32 %123, %124
br i1 %125, label %126, label %128
126: ; preds = %119
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0))
br label %128
128: ; preds = %126, %119
%129 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%130 = load i32, i32* %129
%131 = load i32, i32* @V4L2_CAP_AUDIO
%132 = and i32 %130, %131
%133 = load i32, i32* @V4L2_CAP_AUDIO
%134 = icmp eq i32 %132, %133
br i1 %134, label %135, label %137
135: ; preds = %128
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0))
br label %137
137: ; preds = %135, %128
%138 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%139 = load i32, i32* %138
%140 = load i32, i32* @V4L2_CAP_RADIO
%141 = and i32 %139, %140
%142 = load i32, i32* @V4L2_CAP_RADIO
%143 = icmp eq i32 %141, %142
br i1 %143, label %144, label %146
144: ; preds = %137
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0))
br label %146
146: ; preds = %144, %137
%147 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%148 = load i32, i32* %147
%149 = load i32, i32* @V4L2_CAP_MODULATOR
%150 = and i32 %148, %149
%151 = load i32, i32* @V4L2_CAP_MODULATOR
%152 = icmp eq i32 %150, %151
br i1 %152, label %153, label %155
153: ; preds = %146
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.20, i64 0, i64 0))
br label %155
155: ; preds = %153, %146
%156 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%157 = load i32, i32* %156
%158 = load i32, i32* @V4L2_CAP_READWRITE
%159 = and i32 %157, %158
%160 = load i32, i32* @V4L2_CAP_READWRITE
%161 = icmp eq i32 %159, %160
br i1 %161, label %162, label %164
162: ; preds = %155
%163 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0))
br label %164
164: ; preds = %162, %155
%165 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%166 = load i32, i32* %165
%167 = load i32, i32* @V4L2_CAP_ASYNCIO
%168 = and i32 %166, %167
%169 = load i32, i32* @V4L2_CAP_ASYNCIO
%170 = icmp eq i32 %168, %169
br i1 %170, label %171, label %173
171: ; preds = %164
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.22, i64 0, i64 0))
br label %173
173: ; preds = %171, %164
%174 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 3
%175 = load i32, i32* %174
%176 = load i32, i32* @V4L2_CAP_STREAMING
%177 = and i32 %175, %176
%178 = load i32, i32* @V4L2_CAP_STREAMING
%179 = icmp eq i32 %177, %178
br i1 %179, label %180, label %182
180: ; preds = %173
%181 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.23, i64 0, i64 0))
br label %182
182: ; preds = %180, %173
br label %185
183: ; preds = %1
%184 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.24, i64 0, i64 0))
br label %185
185: ; preds = %183, %182
ret void
}

LLVM IR (-O2):
%struct.v4l2_capability = type { i8*, i8*, i8*, i32 }
@VIDIOC_QUERYCAP = global i32 0
@.str.1 = [14 x i8] c" driver: %s\0A\00"
@.str.2 = [12 x i8] c" card: %s\0A\00"
@.str.3 = [16 x i8] c" bus_info: %s\0A\00"
@V4L2_CAP_VIDEO_CAPTURE = global i32 0
@.str.5 = [8 x i8] c" - %s\0A\00"
@.str.6 = [23 x i8] c"V4L2_CAP_VIDEO_CAPTURE\00"
@V4L2_CAP_VIDEO_OUTPUT = global i32 0
@.str.7 = [22 x i8] c"V4L2_CAP_VIDEO_OUTPUT\00"
@V4L2_CAP_VIDEO_OVERLAY = global i32 0
@.str.8 = [23 x i8] c"V4L2_CAP_VIDEO_OVERLAY\00"
@V4L2_CAP_VBI_CAPTURE = global i32 0
@.str.9 = [21 x i8] c"V4L2_CAP_VBI_CAPTURE\00"
@V4L2_CAP_VBI_OUTPUT = global i32 0
@.str.10 = [20 x i8] c"V4L2_CAP_VBI_OUTPUT\00"
@V4L2_CAP_SLICED_VBI_CAPTURE = global i32 0
@.str.11 = [28 x i8] c"V4L2_CAP_SLICED_VBI_CAPTURE\00"
@V4L2_CAP_SLICED_VBI_OUTPUT = global i32 0
@.str.12 = [27 x i8] c"V4L2_CAP_SLICED_VBI_OUTPUT\00"
@V4L2_CAP_RDS_CAPTURE = global i32 0
@.str.13 = [21 x i8] c"V4L2_CAP_RDS_CAPTURE\00"
@V4L2_CAP_VIDEO_OUTPUT_OVERLAY = global i32 0
@.str.14 = [30 x i8] c"V4L2_CAP_VIDEO_OUTPUT_OVERLAY\00"
@V4L2_CAP_HW_FREQ_SEEK = global i32 0
@.str.15 = [22 x i8] c"V4L2_CAP_HW_FREQ_SEEK\00"
@V4L2_CAP_RDS_OUTPUT = global i32 0
@.str.16 = [20 x i8] c"V4L2_CAP_RDS_OUTPUT\00"
@V4L2_CAP_TUNER = global i32 0
@.str.17 = [15 x i8] c"V4L2_CAP_TUNER\00"
@V4L2_CAP_AUDIO = global i32 0
@.str.18 = [15 x i8] c"V4L2_CAP_AUDIO\00"
@V4L2_CAP_RADIO = global i32 0
@.str.19 = [15 x i8] c"V4L2_CAP_RADIO\00"
@V4L2_CAP_MODULATOR = global i32 0
@.str.20 = [19 x i8] c"V4L2_CAP_MODULATOR\00"
@V4L2_CAP_READWRITE = global i32 0
@.str.21 = [19 x i8] c"V4L2_CAP_READWRITE\00"
@V4L2_CAP_ASYNCIO = global i32 0
@.str.22 = [17 x i8] c"V4L2_CAP_ASYNCIO\00"
@V4L2_CAP_STREAMING = global i32 0
@.str.23 = [19 x i8] c"V4L2_CAP_STREAMING\00"
@.str.24 = [26 x i8] c" ioctl() VIDIOC_QUERYCAP\00"
@str = [21 x i8] c"Device capabilities:\00"
@str.25 = [16 x i8] c" capabilities:\00"
define void @show_device_capabilities(i32 %0) {
%2 = alloca %struct.v4l2_capability
%3 = bitcast %struct.v4l2_capability* %2 to i8*
%4 = call i32 @memset(%struct.v4l2_capability* %2, i32 0, i32 32)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* @VIDIOC_QUERYCAP
%7 = call i32 @ioctl(i32 %0, i32 %6, %struct.v4l2_capability* %2)
%8 = icmp eq i32 %7, -1
br i1 %8, label %163, label %9
9: ; preds = %1
%10 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %2, i64 0, i32 0
%11 = load i8*, i8** %10
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %2, i64 0, i32 1
%14 = load i8*, i8** %13
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %2, i64 0, i32 2
%17 = load i8*, i8** %16
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.25, i64 0, i64 0))
%20 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %2, i64 0, i32 3
%21 = load i32, i32* %20
%22 = load i32, i32* @V4L2_CAP_VIDEO_CAPTURE
%23 = and i32 %22, %21
%24 = icmp eq i32 %23, %22
br i1 %24, label %25, label %28
25: ; preds = %9
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%27 = load i32, i32* %20
br label %28
28: ; preds = %25, %9
%29 = phi i32 [ %27, %25 ], [ %21, %9 ]
%30 = load i32, i32* @V4L2_CAP_VIDEO_OUTPUT
%31 = and i32 %30, %29
%32 = icmp eq i32 %31, %30
br i1 %32, label %33, label %36
33: ; preds = %28
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
%35 = load i32, i32* %20
br label %36
36: ; preds = %33, %28
%37 = phi i32 [ %35, %33 ], [ %29, %28 ]
%38 = load i32, i32* @V4L2_CAP_VIDEO_OVERLAY
%39 = and i32 %38, %37
%40 = icmp eq i32 %39, %38
br i1 %40, label %41, label %44
41: ; preds = %36
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
%43 = load i32, i32* %20
br label %44
44: ; preds = %41, %36
%45 = phi i32 [ %43, %41 ], [ %37, %36 ]
%46 = load i32, i32* @V4L2_CAP_VBI_CAPTURE
%47 = and i32 %46, %45
%48 = icmp eq i32 %47, %46
br i1 %48, label %49, label %52
49: ; preds = %44
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
%51 = load i32, i32* %20
br label %52
52: ; preds = %49, %44
%53 = phi i32 [ %51, %49 ], [ %45, %44 ]
%54 = load i32, i32* @V4L2_CAP_VBI_OUTPUT
%55 = and i32 %54, %53
%56 = icmp eq i32 %55, %54
br i1 %56, label %57, label %60
57: ; preds = %52
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%59 = load i32, i32* %20
br label %60
60: ; preds = %57, %52
%61 = phi i32 [ %59, %57 ], [ %53, %52 ]
%62 = load i32, i32* @V4L2_CAP_SLICED_VBI_CAPTURE
%63 = and i32 %62, %61
%64 = icmp eq i32 %63, %62
br i1 %64, label %65, label %68
65: ; preds = %60
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
%67 = load i32, i32* %20
br label %68
68: ; preds = %65, %60
%69 = phi i32 [ %67, %65 ], [ %61, %60 ]
%70 = load i32, i32* @V4L2_CAP_SLICED_VBI_OUTPUT
%71 = and i32 %70, %69
%72 = icmp eq i32 %71, %70
br i1 %72, label %73, label %76
73: ; preds = %68
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
%75 = load i32, i32* %20
br label %76
76: ; preds = %73, %68
%77 = phi i32 [ %75, %73 ], [ %69, %68 ]
%78 = load i32, i32* @V4L2_CAP_RDS_CAPTURE
%79 = and i32 %78, %77
%80 = icmp eq i32 %79, %78
br i1 %80, label %81, label %84
81: ; preds = %76
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
%83 = load i32, i32* %20
br label %84
84: ; preds = %81, %76
%85 = phi i32 [ %83, %81 ], [ %77, %76 ]
%86 = load i32, i32* @V4L2_CAP_VIDEO_OUTPUT_OVERLAY
%87 = and i32 %86, %85
%88 = icmp eq i32 %87, %86
br i1 %88, label %89, label %92
89: ; preds = %84
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0))
%91 = load i32, i32* %20
br label %92
92: ; preds = %89, %84
%93 = phi i32 [ %91, %89 ], [ %85, %84 ]
%94 = load i32, i32* @V4L2_CAP_HW_FREQ_SEEK
%95 = and i32 %94, %93
%96 = icmp eq i32 %95, %94
br i1 %96, label %97, label %100
97: ; preds = %92
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0))
%99 = load i32, i32* %20
br label %100
100: ; preds = %97, %92
%101 = phi i32 [ %99, %97 ], [ %93, %92 ]
%102 = load i32, i32* @V4L2_CAP_RDS_OUTPUT
%103 = and i32 %102, %101
%104 = icmp eq i32 %103, %102
br i1 %104, label %105, label %108
105: ; preds = %100
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0))
%107 = load i32, i32* %20
br label %108
108: ; preds = %105, %100
%109 = phi i32 [ %107, %105 ], [ %101, %100 ]
%110 = load i32, i32* @V4L2_CAP_TUNER
%111 = and i32 %110, %109
%112 = icmp eq i32 %111, %110
br i1 %112, label %113, label %116
113: ; preds = %108
%114 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0))
%115 = load i32, i32* %20
br label %116
116: ; preds = %113, %108
%117 = phi i32 [ %115, %113 ], [ %109, %108 ]
%118 = load i32, i32* @V4L2_CAP_AUDIO
%119 = and i32 %118, %117
%120 = icmp eq i32 %119, %118
br i1 %120, label %121, label %124
121: ; preds = %116
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0))
%123 = load i32, i32* %20
br label %124
124: ; preds = %121, %116
%125 = phi i32 [ %123, %121 ], [ %117, %116 ]
%126 = load i32, i32* @V4L2_CAP_RADIO
%127 = and i32 %126, %125
%128 = icmp eq i32 %127, %126
br i1 %128, label %129, label %132
129: ; preds = %124
%130 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0))
%131 = load i32, i32* %20
br label %132
132: ; preds = %129, %124
%133 = phi i32 [ %131, %129 ], [ %125, %124 ]
%134 = load i32, i32* @V4L2_CAP_MODULATOR
%135 = and i32 %134, %133
%136 = icmp eq i32 %135, %134
br i1 %136, label %137, label %140
137: ; preds = %132
%138 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.20, i64 0, i64 0))
%139 = load i32, i32* %20
br label %140
140: ; preds = %137, %132
%141 = phi i32 [ %139, %137 ], [ %133, %132 ]
%142 = load i32, i32* @V4L2_CAP_READWRITE
%143 = and i32 %142, %141
%144 = icmp eq i32 %143, %142
br i1 %144, label %145, label %148
145: ; preds = %140
%146 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0))
%147 = load i32, i32* %20
br label %148
148: ; preds = %145, %140
%149 = phi i32 [ %147, %145 ], [ %141, %140 ]
%150 = load i32, i32* @V4L2_CAP_ASYNCIO
%151 = and i32 %150, %149
%152 = icmp eq i32 %151, %150
br i1 %152, label %153, label %156
153: ; preds = %148
%154 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.22, i64 0, i64 0))
%155 = load i32, i32* %20
br label %156
156: ; preds = %153, %148
%157 = phi i32 [ %155, %153 ], [ %149, %148 ]
%158 = load i32, i32* @V4L2_CAP_STREAMING
%159 = and i32 %158, %157
%160 = icmp eq i32 %159, %158
br i1 %160, label %161, label %165
161: ; preds = %156
%162 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.23, i64 0, i64 0))
br label %165
163: ; preds = %1
%164 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.24, i64 0, i64 0))
br label %165
165: ; preds = %156, %161, %163
ret void
}