#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 *, char *);
int /*<<< orphan*/ puts(char *);
void help(int argc, char **argv) {
  puts("****************************************************************");
  puts(" * Moravec Point Feature Detector");
  puts(" * @Author: Gnat TANG");
  puts(" * @Email: gnat_tang@yeah.net");
  puts(" * @Date: Wednesday, March 26 2014");
  puts(" * @Github: "
       "https://github.com/district10/homework/blob/master/2014/Photogrammetry/"
       "moravec.c");
  puts("");
  puts(" * How to compile: gcc -std=c99 moravec.c -o moravec -g -O0");
  puts("");
  puts(" * Usage(3 ways)");
  printf(" *     [1] %s\n", argv[0]);
  printf(" *     [2] %s <raw_img_path> <row> <col> <kernel_size> <threshold>\n",
         argv[0]);
  printf(" *     [3] %s <raw_img_path> <row> <col> <kernel_size> 0 "
         "<threshold1> <threshold2> ...\n",
         argv[0]);
  puts("");
  puts(" * For example:");
  puts(" *       [1]: ./moravec");
  puts(" *       [2]: ./moravec data/u0367panLeft.raw 887 805 7 30");
  puts(
      " *       [3]: ./moravec data/u0367panLeft.raw 887o 805 7 0 20 40 60 80");
  return;
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
lea    0xeff(%rip),%rdi
call   1030 <puts@plt>
lea    0xf15(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf31(%rip),%rdi
call   1030 <puts@plt>
lea    0xf48(%rip),%rdi
call   1030 <puts@plt>
lea    0x1090(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8d(%rip),%rdi
call   1030 <puts@plt>
lea    0x1078(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb1(%rip),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xfaf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xfab(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xfdc(%rip),%rdi
call   1040 <printf@plt>
lea    0x1027(%rip),%rdi
call   1030 <puts@plt>
lea    0x101c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1020(%rip),%rdi
call   1030 <puts@plt>
lea    0x102c(%rip),%rdi
call   1030 <puts@plt>
lea    0x105b(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbx
mov    %rsi,%rbx
lea    0xec5(%rip),%rdi
call   1040 <puts@plt>
lea    0xefa(%rip),%rdi
call   1040 <puts@plt>
lea    0xf10(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf43(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf8a(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfb0(%rip),%rdi
call   1040 <puts@plt>
mov    (%rbx),%rsi
lea    0xfb2(%rip),%rdi
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xfb2(%rip),%rdi
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xfe7(%rip),%rdi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1029(%rip),%rdi
call   1040 <puts@plt>
lea    0x102d(%rip),%rdi
call   1040 <puts@plt>
lea    0x1039(%rip),%rdi
call   1040 <puts@plt>
lea    0x1068(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"****************************************************************\00"
@.str.1 = [34 x i8] c" * Moravec Point Feature Detector\00"
@.str.2 = [22 x i8] c" * @Author: Gnat TANG\00"
@.str.3 = [30 x i8] c" * @Email: gnat_tang@yeah.net\00"
@.str.4 = [35 x i8] c" * @Date: Wednesday, March 26 2014\00"
@.str.5 = [93 x i8] c" * @Github: https://github.com/district10/homework/blob/master/2014/Photogrammetry/moravec.c\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [60 x i8] c" * How to compile: gcc -std=c99 moravec.c -o moravec -g -O0\00"
@.str.8 = [17 x i8] c" * Usage(3 ways)\00"
@.str.9 = [15 x i8] c" * [1] %s\0A\00"
@.str.10 = [68 x i8] c" * [2] %s <raw_img_path> <row> <col> <kernel_size> <threshold>\0A\00"
@.str.11 = [88 x i8] c" * [3] %s <raw_img_path> <row> <col> <kernel_size> 0 <threshold1> <threshold2> ...\0A\00"
@.str.12 = [16 x i8] c" * For example:\00"
@.str.13 = [24 x i8] c" * [1]: ./moravec\00"
@.str.14 = [59 x i8] c" * [2]: ./moravec data/u0367panLeft.raw 887 805 7 30\00"
@.str.15 = [71 x i8] c" * [3]: ./moravec data/u0367panLeft.raw 887o 805 7 0 20 40 60 80\00"
define void @help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @puts(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%15 = load i8**, i8*** %4
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8* %17)
%19 = load i8**, i8*** %4
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.10, i64 0, i64 0), i8* %21)
%23 = load i8**, i8*** %4
%24 = getelementptr inbounds i8*, i8** %23, i64 0
%25 = load i8*, i8** %24
%26 = call i32 @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.11, i64 0, i64 0), i8* %25)
%27 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
%28 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%29 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%30 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.14, i64 0, i64 0))
%31 = call i32 @puts(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.15, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"****************************************************************\00"
@.str.1 = [34 x i8] c" * Moravec Point Feature Detector\00"
@.str.2 = [22 x i8] c" * @Author: Gnat TANG\00"
@.str.3 = [30 x i8] c" * @Email: gnat_tang@yeah.net\00"
@.str.4 = [35 x i8] c" * @Date: Wednesday, March 26 2014\00"
@.str.5 = [93 x i8] c" * @Github: https://github.com/district10/homework/blob/master/2014/Photogrammetry/moravec.c\00"
@.str.7 = [60 x i8] c" * How to compile: gcc -std=c99 moravec.c -o moravec -g -O0\00"
@.str.8 = [17 x i8] c" * Usage(3 ways)\00"
@.str.9 = [15 x i8] c" * [1] %s\0A\00"
@.str.10 = [68 x i8] c" * [2] %s <raw_img_path> <row> <col> <kernel_size> <threshold>\0A\00"
@.str.11 = [88 x i8] c" * [3] %s <raw_img_path> <row> <col> <kernel_size> 0 <threshold1> <threshold2> ...\0A\00"
@.str.12 = [16 x i8] c" * For example:\00"
@.str.13 = [24 x i8] c" * [1]: ./moravec\00"
@.str.14 = [59 x i8] c" * [2]: ./moravec data/u0367panLeft.raw 887 805 7 30\00"
@.str.15 = [71 x i8] c" * [3]: ./moravec data/u0367panLeft.raw 887o 805 7 0 20 40 60 80\00"
define void @help(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 @putchar(i32 10)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%13 = load i8*, i8** %1
%14 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8* %13)
%15 = load i8*, i8** %1
%16 = tail call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.10, i64 0, i64 0), i8* %15)
%17 = load i8*, i8** %1
%18 = tail call i32 @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.11, i64 0, i64 0), i8* %17)
%19 = tail call i32 @putchar(i32 10)
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.14, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str.15, i64 0, i64 0))
ret void
}