#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/video]\n"
      "-p | --port [addr:]port  HTTP daemon port to bind (default: 8080)\n"
      "-D | --daemon            Detach and run as a daemon\n"
      "-U | --url-prefix        Static prefix to URL, e.g. /camera\n"
      "-s | --size widxhgt      Size, e.g. 640x480\n"
      "-f | --fps num           Frames per second\n"
      "-q | --quality num       JPEG quality, 0-100\n"
      "-F FMT | --format FMT    Camera image format, e.g. mjpeg, jpeg, yuyv\n"
      "-M | --monochrome        Grayscale only, if possible\n"
      "-h | --help              Print this message\n"
      "-m | --mmap              Use memory mapped buffers\n"
      "-r | --read              Use read() calls\n"
      "-u | --userp             Use application allocated buffers\n"
      "-v | --verbose           Print a lot of debug messages\n"
      "-P | --probe             Probe the camera capabilities\n"
      "-I | --pid               File to write the pid for daemon mode\n"
      "-i | --uid               Change to this uid after opening camera and "
      "port\n"
      "-C | --chroot            Chroot to this path after initializing\n"
      "--password               Authorization to see images, e.g. "
      "user:password\n"
      "--setup-password         Authorization to control camera.\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 = [1157 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-d | --device name Video device name [/dev/video]\0A-p | --port [addr:]port HTTP daemon port to bind (default: 8080)\0A-D | --daemon Detach and run as a daemon\0A-U | --url-prefix Static prefix to URL, e.g. /camera\0A-s | --size widxhgt Size, e.g. 640x480\0A-f | --fps num Frames per second\0A-q | --quality num JPEG quality, 0-100\0A-F FMT | --format FMT Camera image format, e.g. mjpeg, jpeg, yuyv\0A-M | --monochrome Grayscale only, if possible\0A-h | --help Print this message\0A-m | --mmap Use memory mapped buffers\0A-r | --read Use read() calls\0A-u | --userp Use application allocated buffers\0A-v | --verbose Print a lot of debug messages\0A-P | --probe Probe the camera capabilities\0A-I | --pid File to write the pid for daemon mode\0A-i | --uid Change to this uid after opening camera and port\0A-C | --chroot Chroot to this path after initializing\0A--password Authorization to see images, e.g. user:password\0A--setup-password Authorization to control camera.\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 ([1157 x i8], [1157 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [1157 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-d | --device name Video device name [/dev/video]\0A-p | --port [addr:]port HTTP daemon port to bind (default: 8080)\0A-D | --daemon Detach and run as a daemon\0A-U | --url-prefix Static prefix to URL, e.g. /camera\0A-s | --size widxhgt Size, e.g. 640x480\0A-f | --fps num Frames per second\0A-q | --quality num JPEG quality, 0-100\0A-F FMT | --format FMT Camera image format, e.g. mjpeg, jpeg, yuyv\0A-M | --monochrome Grayscale only, if possible\0A-h | --help Print this message\0A-m | --mmap Use memory mapped buffers\0A-r | --read Use read() calls\0A-u | --userp Use application allocated buffers\0A-v | --verbose Print a lot of debug messages\0A-P | --probe Probe the camera capabilities\0A-I | --pid File to write the pid for daemon mode\0A-i | --uid Change to this uid after opening camera and port\0A-C | --chroot Chroot to this path after initializing\0A--password Authorization to see images, e.g. user:password\0A--setup-password Authorization to control camera.\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 ([1157 x i8], [1157 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}