#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(const char *name) {
  printf("Recovering the Subpixel PSF from Two Photographs ");
  printf("at Different Distances\n");
  printf("Copyright M.Delbracio, A.Almansa, P.Muse. ");
  printf("Version 1.0 Feb 22, 2013\n\n");
  printf("Usage: %s [options] <input file 1> <input file 2> <output PSF txt> ",
         name);
  printf("<output inter-kernel txt>\n\n");
  printf("Only  PGM 16/8 bits images are supported.\n\n");
  printf("Options:\n");
  printf("   -s <number>   Super-resolution factor ");
  printf("(positive integer, default 3)\n");
  printf("   -k <number>   PSF support size (default 13)\n");
  printf("   -o <file>     Estimated PSF save to a 8bits PGM image \n");
  printf("   -i <file>     Estimated inter-image kernel save ");
  printf("to a 8bits PGM image \n");
  printf("   -d <file>     Save all the intermediate images in ");
  printf("files with prefix <file>\n");
  printf(
      "   -t 0,1        1 - Threshold negative values to zero (0-default)\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfbc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfde(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x100b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1023(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x104b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1057(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xffc(%rip),%rdi
call   1030 <puts@plt>
lea    0xeed(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xff9(%rip),%rdi
call   1030 <puts@plt>
lea    0xefe(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xff6(%rip),%rdi
call   1030 <puts@plt>
lea    0x1005(%rip),%rdi
call   1030 <puts@plt>
lea    0x1024(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1013(%rip),%rdi
call   1030 <puts@plt>
lea    0x1025(%rip),%rdi
call   1030 <puts@plt>
lea    0x1048(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1052(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x104e(%rip),%rdi
call   1030 <puts@plt>
lea    0x105b(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"Recovering the Subpixel PSF from Two Photographs \00"
@.str.1 = [24 x i8] c"at Different Distances\0A\00"
@.str.2 = [43 x i8] c"Copyright M.Delbracio, A.Almansa, P.Muse. \00"
@.str.3 = [27 x i8] c"Version 1.0 Feb 22, 2013\0A\0A\00"
@.str.4 = [68 x i8] c"Usage: %s [options] <input file 1> <input file 2> <output PSF txt> \00"
@.str.5 = [28 x i8] c"<output inter-kernel txt>\0A\0A\00"
@.str.6 = [44 x i8] c"Only PGM 16/8 bits images are supported.\0A\0A\00"
@.str.7 = [10 x i8] c"Options:\0A\00"
@.str.8 = [42 x i8] c" -s <number> Super-resolution factor \00"
@.str.9 = [31 x i8] c"(positive integer, default 3)\0A\00"
@.str.10 = [48 x i8] c" -k <number> PSF support size (default 13)\0A\00"
@.str.11 = [59 x i8] c" -o <file> Estimated PSF save to a 8bits PGM image \0A\00"
@.str.12 = [52 x i8] c" -i <file> Estimated inter-image kernel save \00"
@.str.13 = [23 x i8] c"to a 8bits PGM image \0A\00"
@.str.14 = [54 x i8] c" -d <file> Save all the intermediate images in \00"
@.str.15 = [26 x i8] c"files with prefix <file>\0A\00"
@.str.16 = [68 x i8] c" -t 0,1 1 - Threshold negative values to zero (0-default)\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.16, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"Recovering the Subpixel PSF from Two Photographs \00"
@.str.2 = [43 x i8] c"Copyright M.Delbracio, A.Almansa, P.Muse. \00"
@.str.4 = [68 x i8] c"Usage: %s [options] <input file 1> <input file 2> <output PSF txt> \00"
@.str.8 = [42 x i8] c" -s <number> Super-resolution factor \00"
@.str.12 = [52 x i8] c" -i <file> Estimated inter-image kernel save \00"
@.str.14 = [54 x i8] c" -d <file> Save all the intermediate images in \00"
@str = [23 x i8] c"at Different Distances\00"
@str.17 = [26 x i8] c"Version 1.0 Feb 22, 2013\0A\00"
@str.18 = [27 x i8] c"<output inter-kernel txt>\0A\00"
@str.19 = [43 x i8] c"Only PGM 16/8 bits images are supported.\0A\00"
@str.20 = [9 x i8] c"Options:\00"
@str.21 = [30 x i8] c"(positive integer, default 3)\00"
@str.22 = [47 x i8] c" -k <number> PSF support size (default 13)\00"
@str.23 = [58 x i8] c" -o <file> Estimated PSF save to a 8bits PGM image \00"
@str.24 = [22 x i8] c"to a 8bits PGM image \00"
@str.25 = [25 x i8] c"files with prefix <file>\00"
@str.26 = [67 x i8] c" -t 0,1 1 - Threshold negative values to zero (0-default)\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.17, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.18, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.19, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.20, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.21, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.22, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.23, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.24, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.14, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.25, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.26, i64 0, i64 0))
ret void
}