#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_help(int argc, char **argv) {
  printf("\n\t\t%s - Linux console webcam screenshot utility\n\n", argv[0]);
  printf("Usage: %s [OPTIONS]\n", argv[0]);
  printf("\nOptions:\n");
  printf("\t--help\t\t-h\tPrints this help.\n");
  printf("\t--device dev\t-d dev\tWorks with the dev device (default "
         "/dev/video0)\n");
  printf("\t--outdir dir\t-o dir\tSaves all output in dir (default /tmp)\n");
  printf(
      "\t--format fmt\t-f fmt\tSaves images in the fmt format (see below)\n");
  printf("\t--info\t\t-i\tPrints info about the video device and stops.\n");
  printf("\t--width num\t-W num\tSets the desired width (if the camera "
         "supports it)\n");
  printf("\t--height num\t-H num\tSets the desired height (if the camera "
         "supports it)\n");
  printf("\t--pipe file\t-p file\tUses named pipe file as output for images\n");
  printf("\t--shm id\t-s id\tUses shared memory as output for images. See "
         "below for more info\n");
  printf("\nImage formats (fmt):\n");
  printf("\trgb - raw rqb binary file\n");
  printf("\tbmp - bmp image (default)\n");
  printf("\nOption --shm id / -s id:\n");
  printf("\tIf you choose this option camshot will store the images from the "
         "camera to a region of memory which it will share with a key id so a "
         "users process can use this region for its input. The writes to this "
         "region are protected  by a semaphore with the same key as the memory "
         "region. It is important that the user process uses this semaphore "
         "while reading the buffer!\n");
  printf("\nAuthor:\n");
  printf("\tThis software was written by Gabriel Zabusek "
         "(gabriel.zabusek@gmail.com)\n");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfcc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1006(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1042(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1074(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10b8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10c1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10cf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10dd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10ea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1248(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1244(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rsi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rsi
lea    0xef3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf43(%rip),%rdi
call   1030 <puts@plt>
lea    0xf73(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa7(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd5(%rip),%rdi
call   1030 <puts@plt>
lea    0x1010(%rip),%rdi
call   1030 <puts@plt>
lea    0x104d(%rip),%rdi
call   1030 <puts@plt>
lea    0x1080(%rip),%rdi
call   1030 <puts@plt>
lea    0x10c5(%rip),%rdi
call   1030 <puts@plt>
lea    0x10cf(%rip),%rdi
call   1030 <puts@plt>
lea    0x10de(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ed(%rip),%rdi
call   1030 <puts@plt>
lea    0x10fb(%rip),%rdi
call   1030 <puts@plt>
lea    0x125a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1257(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"\0A\09\09%s - Linux console webcam screenshot utility\0A\0A\00"
@.str.1 = [21 x i8] c"Usage: %s [OPTIONS]\0A\00"
@.str.2 = [11 x i8] c"\0AOptions:\0A\00"
@.str.3 = [31 x i8] c"\09--help\09\09-h\09Prints this help.\0A\00"
@.str.4 = [70 x i8] c"\09--device dev\09-d dev\09Works with the dev device (default /dev/video0)\0A\00"
@.str.5 = [61 x i8] c"\09--outdir dir\09-o dir\09Saves all output in dir (default /tmp)\0A\00"
@.str.6 = [65 x i8] c"\09--format fmt\09-f fmt\09Saves images in the fmt format (see below)\0A\00"
@.str.7 = [59 x i8] c"\09--info\09\09-i\09Prints info about the video device and stops.\0A\00"
@.str.8 = [72 x i8] c"\09--width num\09-W num\09Sets the desired width (if the camera supports it)\0A\00"
@.str.9 = [74 x i8] c"\09--height num\09-H num\09Sets the desired height (if the camera supports it)\0A\00"
@.str.10 = [64 x i8] c"\09--pipe file\09-p file\09Uses named pipe file as output for images\0A\00"
@.str.11 = [82 x i8] c"\09--shm id\09-s id\09Uses shared memory as output for images. See below for more info\0A\00"
@.str.12 = [23 x i8] c"\0AImage formats (fmt):\0A\00"
@.str.13 = [28 x i8] c"\09rgb - raw rqb binary file\0A\00"
@.str.14 = [28 x i8] c"\09bmp - bmp image (default)\0A\00"
@.str.15 = [27 x i8] c"\0AOption --shm id / -s id:\0A\00"
@.str.16 = [364 x i8] c"\09If you choose this option camshot will store the images from the camera to a region of memory which it will share with a key id so a users process can use this region for its input. The writes to this region are protected by a semaphore with the same key as the memory region. It is important that the user process uses this semaphore while reading the buffer!\0A\00"
@.str.17 = [10 x i8] c"\0AAuthor:\0A\00"
@.str.18 = [75 x i8] c"\09This software was written by Gabriel Zabusek (gabriel.zabusek@gmail.com)\0A\00"
define void @print_help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.6, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.8, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.9, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.10, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.11, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([364 x i8], [364 x i8]* @.str.16, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.18, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"\0A\09\09%s - Linux console webcam screenshot utility\0A\0A\00"
@.str.1 = [21 x i8] c"Usage: %s [OPTIONS]\0A\00"
@str = [10 x i8] c"\0AOptions:\00"
@str.19 = [30 x i8] c"\09--help\09\09-h\09Prints this help.\00"
@str.20 = [69 x i8] c"\09--device dev\09-d dev\09Works with the dev device (default /dev/video0)\00"
@str.21 = [60 x i8] c"\09--outdir dir\09-o dir\09Saves all output in dir (default /tmp)\00"
@str.22 = [64 x i8] c"\09--format fmt\09-f fmt\09Saves images in the fmt format (see below)\00"
@str.23 = [58 x i8] c"\09--info\09\09-i\09Prints info about the video device and stops.\00"
@str.24 = [71 x i8] c"\09--width num\09-W num\09Sets the desired width (if the camera supports it)\00"
@str.25 = [73 x i8] c"\09--height num\09-H num\09Sets the desired height (if the camera supports it)\00"
@str.26 = [63 x i8] c"\09--pipe file\09-p file\09Uses named pipe file as output for images\00"
@str.27 = [81 x i8] c"\09--shm id\09-s id\09Uses shared memory as output for images. See below for more info\00"
@str.28 = [22 x i8] c"\0AImage formats (fmt):\00"
@str.29 = [27 x i8] c"\09rgb - raw rqb binary file\00"
@str.30 = [27 x i8] c"\09bmp - bmp image (default)\00"
@str.31 = [26 x i8] c"\0AOption --shm id / -s id:\00"
@str.32 = [363 x i8] c"\09If you choose this option camshot will store the images from the camera to a region of memory which it will share with a key id so a users process can use this region for its input. The writes to this region are protected by a semaphore with the same key as the memory region. It is important that the user process uses this semaphore while reading the buffer!\00"
@str.33 = [9 x i8] c"\0AAuthor:\00"
@str.34 = [74 x i8] c"\09This software was written by Gabriel Zabusek (gabriel.zabusek@gmail.com)\00"
define void @print_help(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.19, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.20, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.21, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.22, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.23, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.24, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.25, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.26, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.27, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.28, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.29, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.30, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.31, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([363 x i8], [363 x i8]* @str.32, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.33, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.34, i64 0, i64 0))
ret void
}