#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void usage(FILE *fp, int argc, char **argv) {
  fprintf(fp,
          "Usage: %s [options]\n\n"
          "Options:\n"
          "-d | --device name   Video device name [/dev/video0] or "
          "prefix/serial no.\n"
          "-d | --device name   Eg. for serial number 12345, use 12345 or "
          "H12345 for H.264\n"
          "-d | --device name   Eg. for serial number 12345, use P12345 for "
          "preview\n"
          "-d | --device name   Eg. for serial number 12345, use D12345 for "
          "decode\n"
          "-h | --help          Print this message\n"
          "-c | --caption       Caption for OSD\n"
          "-x | --h264          h.264 elementary stream\n"
          "-y | --yuyv          YUYV raw video\n"
          "-u | --uyvy          UYVY raw video\n"
          "-8 | --y8            Y8 raw video\n"
          "-s | --size          Size 0=vga, 1=1/2 VGA, or NxN\n"
          "-o | --out name      Output file name (MPEG only)\n"
          "-b | --br bitrate    Set video bitrate(bps, 2mbit default)\n"
          "-p | --input         Set video input (see manual)\n"
          "-i | --int n         Interpolate field mode\n"
          "-f | --frames n      Capture n frames [default 250]\n"
          "                     (0=unlimited, use ctrl-c to stop)\n"
          "-D | --decimate n    Frame rate divider 1/2/3/5 (default 1)\n"
          "-G | --gop n         Set GOP size (0=default,\n"
          "                     otherwise every Nth frame)\n"
          "-I | --idr n         Set h.264 IDR frames (0=first GOP only,\n"
          "                     otherwise every Nth GOP)\n"
          "-a | --ainput n      Set audio input: 0=Mic 1=Line\n"
          "-r | --abr bitrate   Set audio bitrate(bps, 192k default)\n"
          "-g | --agc n         Set audio AGC 0=off 1=on (default)\n"
          "-O | --mono          Set mono audio\n"
          "-S | --stereo        Set stereo audio\n"
          "-U | --userdata s    Set user data in compressed stream.\n"
          "-N | --interval n    Set user data interval (0=one time,\n"
          "                     otherwise every Nth frame)\n"
          "-C | --cc            Enable closed captions in h.264 stream\n"
          "",
          argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    (%rdx),%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [1641 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-d | --device name Video device name [/dev/video0] or prefix/serial no.\0A-d | --device name Eg. for serial number 12345, use 12345 or H12345 for H.264\0A-d | --device name Eg. for serial number 12345, use P12345 for preview\0A-d | --device name Eg. for serial number 12345, use D12345 for decode\0A-h | --help Print this message\0A-c | --caption Caption for OSD\0A-x | --h264 h.264 elementary stream\0A-y | --yuyv YUYV raw video\0A-u | --uyvy UYVY raw video\0A-8 | --y8 Y8 raw video\0A-s | --size Size 0=vga, 1=1/2 VGA, or NxN\0A-o | --out name Output file name (MPEG only)\0A-b | --br bitrate Set video bitrate(bps, 2mbit default)\0A-p | --input Set video input (see manual)\0A-i | --int n Interpolate field mode\0A-f | --frames n Capture n frames [default 250]\0A (0=unlimited, use ctrl-c to stop)\0A-D | --decimate n Frame rate divider 1/2/3/5 (default 1)\0A-G | --gop n Set GOP size (0=default,\0A otherwise every Nth frame)\0A-I | --idr n Set h.264 IDR frames (0=first GOP only,\0A otherwise every Nth GOP)\0A-a | --ainput n Set audio input: 0=Mic 1=Line\0A-r | --abr bitrate Set audio bitrate(bps, 192k default)\0A-g | --agc n Set audio AGC 0=off 1=on (default)\0A-O | --mono Set mono audio\0A-S | --stereo Set stereo audio\0A-U | --userdata s Set user data in compressed stream.\0A-N | --interval n Set user data interval (0=one time,\0A otherwise every Nth frame)\0A-C | --cc Enable closed captions in h.264 stream\0A\00"
define void @usage(i32* %0, i32 %1, i8** %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8**
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32*, i32** %4
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([1641 x i8], [1641 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [1641 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-d | --device name Video device name [/dev/video0] or prefix/serial no.\0A-d | --device name Eg. for serial number 12345, use 12345 or H12345 for H.264\0A-d | --device name Eg. for serial number 12345, use P12345 for preview\0A-d | --device name Eg. for serial number 12345, use D12345 for decode\0A-h | --help Print this message\0A-c | --caption Caption for OSD\0A-x | --h264 h.264 elementary stream\0A-y | --yuyv YUYV raw video\0A-u | --uyvy UYVY raw video\0A-8 | --y8 Y8 raw video\0A-s | --size Size 0=vga, 1=1/2 VGA, or NxN\0A-o | --out name Output file name (MPEG only)\0A-b | --br bitrate Set video bitrate(bps, 2mbit default)\0A-p | --input Set video input (see manual)\0A-i | --int n Interpolate field mode\0A-f | --frames n Capture n frames [default 250]\0A (0=unlimited, use ctrl-c to stop)\0A-D | --decimate n Frame rate divider 1/2/3/5 (default 1)\0A-G | --gop n Set GOP size (0=default,\0A otherwise every Nth frame)\0A-I | --idr n Set h.264 IDR frames (0=first GOP only,\0A otherwise every Nth GOP)\0A-a | --ainput n Set audio input: 0=Mic 1=Line\0A-r | --abr bitrate Set audio bitrate(bps, 192k default)\0A-g | --agc n Set audio AGC 0=off 1=on (default)\0A-O | --mono Set mono audio\0A-S | --stereo Set stereo audio\0A-U | --userdata s Set user data in compressed stream.\0A-N | --interval n Set user data interval (0=one time,\0A otherwise every Nth frame)\0A-C | --cc Enable closed captions in h.264 stream\0A\00"
define void @usage(i32* nocapture %0, i32 %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([1641 x i8], [1641 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}