#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 usage(void) {
  printf("\nUsage: bmpedit [OPTIONS...] [input.bmp]\n\n");
  printf("DESCRIPTION:\n%s\n\n\n",
         "  This program does simple edits of BMP image files. When the "
         "program\n  runs it first prints out the width and the height of the "
         "input image\n  within the BMP file. Once this is done a filter (or "
         "sequence of\n  filters) are applied to the image. The resulting "
         "image is also stored\n  using BMP format into an output file.");
  printf(
      "OPTIONS:\n%s\n\n",
      "  -o [FILE]         Sets the output file (defaults to \"out.bmp\").\n  "
      "-t [0.0-1.0]      Applies this value to threshold filter (conflicts "
      "-b).\n  -b [0.0-1.0]      Applies this value to brightness filter "
      "(conflicts -t).\n  -h                Displays this usage message.");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
lea    0xf0e(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x103f(%rip),%rdi
lea    0x1046(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0x1142(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1009(%rip),%rdi
lea    0x1010(%rip),%rsi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\0AUsage: bmpedit [OPTIONS...] [input.bmp]\0A\0A\00"
@.str.1 = [19 x i8] c"DESCRIPTION:\0A%s\0A\0A\0A\00"
@.str.2 = [319 x i8] c" This program does simple edits of BMP image files. When the program\0A runs it first prints out the width and the height of the input image\0A within the BMP file. Once this is done a filter (or sequence of\0A filters) are applied to the image. The resulting image is also stored\0A using BMP format into an output file.\00"
@.str.3 = [14 x i8] c"OPTIONS:\0A%s\0A\0A\00"
@.str.4 = [266 x i8] c" -o [FILE] Sets the output file (defaults to \22out.bmp\22).\0A -t [0.0-1.0] Applies this value to threshold filter (conflicts -b).\0A -b [0.0-1.0] Applies this value to brightness filter (conflicts -t).\0A -h Displays this usage message.\00"
define void @usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([319 x i8], [319 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([266 x i8], [266 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"DESCRIPTION:\0A%s\0A\0A\0A\00"
@.str.2 = [319 x i8] c" This program does simple edits of BMP image files. When the program\0A runs it first prints out the width and the height of the input image\0A within the BMP file. Once this is done a filter (or sequence of\0A filters) are applied to the image. The resulting image is also stored\0A using BMP format into an output file.\00"
@.str.3 = [14 x i8] c"OPTIONS:\0A%s\0A\0A\00"
@.str.4 = [266 x i8] c" -o [FILE] Sets the output file (defaults to \22out.bmp\22).\0A -t [0.0-1.0] Applies this value to threshold filter (conflicts -b).\0A -b [0.0-1.0] Applies this value to brightness filter (conflicts -t).\0A -h Displays this usage message.\00"
@str = [42 x i8] c"\0AUsage: bmpedit [OPTIONS...] [input.bmp]\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([319 x i8], [319 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([266 x i8], [266 x i8]* @.str.4, i64 0, i64 0))
ret void
}