#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
void show_help(char *name) {
  printf("cgichk "
         "2.60"
         "\n");
  printf("usage : %s host [-p n] [-D n] [-P s] [-A s] [-b n] [-g n] [-B s] "
         "[-qwhdHVifWC] [-o output]\n\n",
         name);
  puts("        -p n pauses n seconds between HTTP requests");
  puts("        -q   silences alert beeping");
  puts("        -w   retrieves whois (com/net/org) information on target");
  puts("        -o   dumps data to file (requires filename argument)");
  puts("        -h   help");
  puts("        -d   debugging info (shows results for !404 items)");
  puts("        -D n super debugging level (shows whatever extra I want :))");
  puts("        -V   version number and compile date");
  puts("        -i   turns ON descending into 'interest' directories for");
  puts("             exploitable files");
  puts("        -f   turns ON checking for FrontPage explotables");
  puts("        -W   specify alternate whois server");
  puts("        -C   specify alternate config file");
  puts("        -3   ignore 403's (forbidden) and 302's (moved)");
  puts("        -P s specify proxy host, or taken from $HTTP_PROXY");
  printf("        -A s alternate agent string, [%s]\n", "cgichk "
                                                        "2.60");
  printf("        -b n specify how much data to pull from page [%d bytes]\n",
         1024);
  puts("        -g n treat a specific result code as a 404.");
  puts("        -B s give cgichk an additional string to use to find "
       "pseudo-404's.");
  puts("        -H   only retrieve HTTP header, then quit.");
  puts("        -I   do NOT search inside 200 pages for 404-type strings.");
  puts("");
  exit(0);
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf07(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf47(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfad(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb3(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe2(%rip),%rdi
call   1030 <puts@plt>
lea    0x101a(%rip),%rdi
call   1030 <puts@plt>
lea    0x103b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1070(%rip),%rdi
call   1030 <puts@plt>
lea    0x1083(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b0(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d0(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ef(%rip),%rdi
call   1030 <puts@plt>
lea    0x111b(%rip),%rdi
call   1030 <puts@plt>
lea    0x114a(%rip),%rdi
lea    0x116e(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x116c(%rip),%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x119a(%rip),%rdi
call   1030 <puts@plt>
lea    0x11c2(%rip),%rdi
call   1030 <puts@plt>
lea    0x1201(%rip),%rdi
call   1030 <puts@plt>
lea    0x1228(%rip),%rdi
call   1030 <puts@plt>
lea    0xdfa(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<show_help>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x1366(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xea3(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeef(%rip),%rdi
call   1040 <puts@plt>
lea    0xf17(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf64(%rip),%rdi
call   1040 <puts@plt>
lea    0xf95(%rip),%rdi
call   1040 <puts@plt>
lea    0xf9b(%rip),%rdi
call   1040 <puts@plt>
lea    0xfca(%rip),%rdi
call   1040 <puts@plt>
lea    0x1002(%rip),%rdi
call   1040 <puts@plt>
lea    0x1023(%rip),%rdi
call   1040 <puts@plt>
lea    0x1058(%rip),%rdi
call   1040 <puts@plt>
lea    0x106b(%rip),%rdi
call   1040 <puts@plt>
lea    0x1098(%rip),%rdi
call   1040 <puts@plt>
lea    0x10b8(%rip),%rdi
call   1040 <puts@plt>
lea    0x10d7(%rip),%rdi
call   1040 <puts@plt>
lea    0x1103(%rip),%rdi
call   1040 <puts@plt>
lea    0x1132(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x114c(%rip),%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x117a(%rip),%rdi
call   1040 <puts@plt>
lea    0x11a2(%rip),%rdi
call   1040 <puts@plt>
lea    0x11e1(%rip),%rdi
call   1040 <puts@plt>
lea    0x1208(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"cgichk 2.60\0A\00"
@.str.1 = [93 x i8] c"usage : %s host [-p n] [-D n] [-P s] [-A s] [-b n] [-g n] [-B s] [-qwhdHVifWC] [-o output]\0A\0A\00"
@.str.2 = [52 x i8] c" -p n pauses n seconds between HTTP requests\00"
@.str.3 = [36 x i8] c" -q silences alert beeping\00"
@.str.4 = [65 x i8] c" -w retrieves whois (com/net/org) information on target\00"
@.str.5 = [61 x i8] c" -o dumps data to file (requires filename argument)\00"
@.str.6 = [18 x i8] c" -h help\00"
@.str.7 = [59 x i8] c" -d debugging info (shows results for !404 items)\00"
@.str.8 = [68 x i8] c" -D n super debugging level (shows whatever extra I want :))\00"
@.str.9 = [45 x i8] c" -V version number and compile date\00"
@.str.10 = [65 x i8] c" -i turns ON descending into 'interest' directories for\00"
@.str.11 = [31 x i8] c" exploitable files\00"
@.str.12 = [57 x i8] c" -f turns ON checking for FrontPage explotables\00"
@.str.13 = [44 x i8] c" -W specify alternate whois server\00"
@.str.14 = [43 x i8] c" -C specify alternate config file\00"
@.str.15 = [56 x i8] c" -3 ignore 403's (forbidden) and 302's (moved)\00"
@.str.16 = [59 x i8] c" -P s specify proxy host, or taken from $HTTP_PROXY\00"
@.str.17 = [43 x i8] c" -A s alternate agent string, [%s]\0A\00"
@.str.18 = [12 x i8] c"cgichk 2.60\00"
@.str.19 = [65 x i8] c" -b n specify how much data to pull from page [%d bytes]\0A\00"
@.str.20 = [52 x i8] c" -g n treat a specific result code as a 404.\00"
@.str.21 = [75 x i8] c" -B s give cgichk an additional string to use to find pseudo-404's.\00"
@.str.22 = [51 x i8] c" -H only retrieve HTTP header, then quit.\00"
@.str.23 = [66 x i8] c" -I do NOT search inside 200 pages for 404-type strings.\00"
@.str.24 = [1 x i8] zeroinitializer
define void @show_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 @puts(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 @puts(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 @puts(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.16, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.19, i64 0, i64 0), i32 1024)
%23 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.20, i64 0, i64 0))
%24 = call i32 @puts(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.21, i64 0, i64 0))
%25 = call i32 @puts(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.22, i64 0, i64 0))
%26 = call i32 @puts(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.23, i64 0, i64 0))
%27 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.24, i64 0, i64 0))
%28 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [93 x i8] c"usage : %s host [-p n] [-D n] [-P s] [-A s] [-b n] [-g n] [-B s] [-qwhdHVifWC] [-o output]\0A\0A\00"
@.str.2 = [52 x i8] c" -p n pauses n seconds between HTTP requests\00"
@.str.3 = [36 x i8] c" -q silences alert beeping\00"
@.str.4 = [65 x i8] c" -w retrieves whois (com/net/org) information on target\00"
@.str.5 = [61 x i8] c" -o dumps data to file (requires filename argument)\00"
@.str.6 = [18 x i8] c" -h help\00"
@.str.7 = [59 x i8] c" -d debugging info (shows results for !404 items)\00"
@.str.8 = [68 x i8] c" -D n super debugging level (shows whatever extra I want :))\00"
@.str.9 = [45 x i8] c" -V version number and compile date\00"
@.str.10 = [65 x i8] c" -i turns ON descending into 'interest' directories for\00"
@.str.11 = [31 x i8] c" exploitable files\00"
@.str.12 = [57 x i8] c" -f turns ON checking for FrontPage explotables\00"
@.str.13 = [44 x i8] c" -W specify alternate whois server\00"
@.str.14 = [43 x i8] c" -C specify alternate config file\00"
@.str.15 = [56 x i8] c" -3 ignore 403's (forbidden) and 302's (moved)\00"
@.str.16 = [59 x i8] c" -P s specify proxy host, or taken from $HTTP_PROXY\00"
@.str.17 = [43 x i8] c" -A s alternate agent string, [%s]\0A\00"
@.str.19 = [65 x i8] c" -b n specify how much data to pull from page [%d bytes]\0A\00"
@.str.20 = [52 x i8] c" -g n treat a specific result code as a 404.\00"
@.str.21 = [75 x i8] c" -B s give cgichk an additional string to use to find pseudo-404's.\00"
@.str.22 = [51 x i8] c" -H only retrieve HTTP header, then quit.\00"
@.str.23 = [66 x i8] c" -I do NOT search inside 200 pages for 404-type strings.\00"
@str = [12 x i8] c"cgichk 2.60\00"
define void @show_help(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.12, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.14, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.15, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.16, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.19, i64 0, i64 0), i32 1024)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.20, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @.str.21, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.22, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.23, i64 0, i64 0))
%25 = tail call i32 @putchar(i32 10)
%26 = tail call i32 @exit(i32 0)
unreachable
}